@adyen/kyc-components 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("whatwg-fetch"),t=require("preact"),a=require("classnames"),r=require("phone");const n=process.env.KYC_API_URL;function i(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a}function o(e,t,a,r){return new(a||(a=Promise))((function(n,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}const s="en-US",l={individual:"Individual",payoutAccount:"Payout account",payinAccount:"Payin account",firstName:"First name",lastName:"Last name",country:"Country",street:"Street",houseNumber:"House number",houseNumberOptional:"House number (optional)",houseNumberOrName:"House number or name",postalCode:"Postal code",city:"City",cityTown:"City / Town",state:"State",provinceOrTerritory:"Province or territory",selectProvinceOrTerritory:"Select a province or territory",zipCode:"ZIP code",apartmentSuite:"Apartment / Suite",apartmentSuiteOptional:"Apartment / Suite (optional)",phoneNumber:"Phone number",email:"Email address",birthdate:"Date of birth",code:"Code",invalidEmail:"Please enter a valid email",invalidPhoneNumber:"Please enter a valid phone number",invalidCountryCode:"Please select a country code",birthDate:"Date of birth",idNumber:"Identity number",selectState:"Select a state",selectCountry:"Select a country",search:"Search",noOptionsFound:"No options found",SSNFormatUS:"*** \u2014 ** \u2014 XXXX",SSNFormatUS9Digits:"XXXXXXXXX",SINFormatCA:"XXXXXXXXX",useSSNFormatUS:"Please provide last 4 digits",use9DigitsSSNFormatUS:"Please use the SSN format: XXXXXXXXX",useSSNFormatCA:"Please use the SIN format: XXXXXXXXX",invalidFormat:"Invalid format",fieldIsRequired:"Field is required",tooManyFiles:"Too many files",duplicatedFiles:"Duplicated files",unsupportedFiletype:"Unsupported filetype",maximumFileSizeExceeded:"Maximum file size exceeded",personalDetails:"Personal details",invalidBirthDate:"Enter a valid birth date (TODO - explain why this is invalid)",address:"Address",contactDetails:"Contact Details",uploadDocument:"Upload Document",individualDetails:"Individual details",socialSecurityNumber:"Last 4 digits of Social Security Number (SSN)",socialSecurityNumber9Digits:"Social Security Number (SSN)",codiceFiscale:"Codice fiscale",personnummer:"Personnummer (PIN)",dniNumber:"DNI Number",cadastroDePessoasFisicas:"Cadastro de Pessoas F\xedsicas (CFP)",invalidFormatExpects:"Invalid format. Expected format: %{format}",invalidFormatForAuPassportNumber:"This isn't a valid Australian passport number. Expected format: 1-2 letters followed by 7 numbers.",invalidFormatForAuDriversLicenseNumber:"This isn't a valid Australian driver's license number. Expected format: 6-10 alphanumeric characters.",invalidFormatForAuDriversLicenseCardNumber:"This isn't a valid Australian driver's license card number. Expected format: 6-10 alphanumeric characters.",invalidFormatForAuProofOfIdentityCardNumber:"This isn't a valid Australian proof of identity card number. Expected format: 6-10 alphanumeric characters.",residencyCountry:"Country of residence",stateOrProvince:"State or province",selectStateOrProvince:"Select a state or province",dragYourFilesHereOr:"Drag your files here, or",browse:"Browse",supports:"Supports: %{fileTypes}. Size up to %{maxSize}. Maximum %{maxFiles} page.",complete:"Complete",summary:"Summary",selectDocument:"Select a document",passport:"Passport",passportNumber:"Passport number",id:"ID",driversLicense:"Driver's license",issuerState:"Issuing state",licenseNumber:"Driver license number",licenseCardNumber:"Card number",documents:"Documents",idDocument:"ID Document",documentType:"Document type",frontPage:"Front page",backPage:"Back page",fileName:"File name",proofOfNationality:"Proof of nationality",uploadDocumentForSsn:"Upload an ID document instead of SSN",operationalAddressHeader:"Additional address",operationalAddressHeaderDescription:"Is there a different address for your company\u2019s main business operations?",operationalAddressIsSame:"Is there a different address for your company\u2019s main business operations?",operationalAddressIsSameItemName:"No, the registered address is where we operate",operationalAddressIsNotSameItemName:"Yes, our headquarters are at a different location",verifyPrefilledInfoIsCorrect:"Verify if your prefilled information is correct",legalStructureHeader:"Tell us your legal structure",whatTypeOfCompanyDoYouHave:"What type of company do you have?",privateCompanyTitle:"Private company",privateCompanyDescription:"Owned privately. The shareholders don\u2019t necessarily trade on public exchanges (like the stock market).",publicCompanyTitle:"Public company",publicCompanyDescription:"Owned by public shareholders. They\u2019re also required to disclose financial information to the public regularly.",incorporatedPartnershipTitle:"Incorporated partnership",incorporatedPartnershipDescription:"An agreement between two or more people who run a business together.",nonProfitOrCharitableOrgTitle:"Non-profit or charitable organization",nonProfitOrCharitableOrgDescription:"An organization that has an official status as not for profit or tax exempt, sometimes called an NGO.",governmentalOrganizationTitle:"Governmental organization",governmentalOrganizationDescription:"Owned by the government or state.",associationIncorporatedTitle:"Incorporated association",associationIncorporatedDescription:"A registered entity without profit that's organized around a purpose such as recreation, culture, or charity.",jobTitle:"Job title",legalStructure:"Legal structure",entityType:"Entity type",registrationDetails:"Registration details",registeredAddress:"Registered address",registrationAddress:"Registration address",registeredAddressHeaderDescription:"The address registered to your company with the Chamber of Commerce.",registeredAddressTrustHeaderDescription:"The address registered to your trust",operationalAddress:"Operational address",provideRegistrationDetails:"Provide registration details",companyStructure:"Company structure",providePersonalDetails:"Provide personal details",providePersonalAddress:"Provide personal address",provideContactDetails:"Provide contact details",correctErrorsResubmit:"Correct the following errors and resubmit the form",registrationDocument:"Registration document",taxDocument:"Tax document",provideCompanyDetails:"Provide company details",companyDetails:"Company details",invalidRegistrationNumber:"Invalid registration number",tradingName:"Trading name",chamberOfCommerceRegistrationNumber:"Chamber of Commerce registration number",taxId:"Tax ID",exemptedFromTax:"Exempted from tax",doNotHaveEIN:"I do not have an Employer Identification Number",doNotHaveFirmenbuchnummer:"I do not have a Firmenbuchnummer",doNotHaveOrganisationsnummer:"I do not have an Organisationsnummer",taxIdAbsenceReason:"Tax ID absence reason",vatNumberExempted:"Exempted from VAT",vatNumberAbsenceReason:"VAT number absence reason",belowTaxThreshold:"Below tax threshold",industryExemption:"Industry exemption",validationPleaseEnterAValidRegistrationNumber:"Please enter a valid company registration number",validationPleaseEnterAValidRegistrationNumberWithFormat:"Please enter a valid company registration number. Expected format: %{format}",validationPleaseEnterAValidVatNumber:"Please enter a valid Tax id number",validationPleaseEnterAValidVatNumberWithFormat:"Please enter a valid Tax id number. Expected format: %{format}",validationPleaseEnterAValidTaxIdNumber:"Please enter a valid Tax id number",validationPleaseEnterAValidTaxIdNumberWithFormat:"Please enter a valid Tax id number. Expected format: %{format}",aValidAbnShouldBe11Digits:"A valid ABN should be 11 digits.",validationPleaseEnterAValidIban:"Please enter a valid IBAN",validation8Or11Characters:"Please enter either 8 or 11 characters.",validationCharacters:"Please enter %{length} characters.",validationDigitsBetween:"Please enter a number between %{start} and %{end} digits",validationDigits:"Please enter %{length} digits",enterValidRegistrationNumber:"Please enter a valid registration number",stockExchangeMIC:"Stock Exchange MIC",stockExchangeMICHelper:"Market Identifier Code, as defined in ISO 10383",stockISINHelper:"International Securities Identification Number, as defined in ISO 10383",stockISIN:"Stock ISIN",validationPleaseEnterAValidMarketIdentifier:"Please enter a valid Market identifier code",validationPleaseEnterAValidStockISIN:"Please enter a valid International Securities Identification Number",shareholderDocument:"Shareholder document",role:"Role",rolePlaceholder:"Select the applicable role(s)",back:"Back",next:"Next",submit:"Submit",nameAndCountry:"Name and country",companyCountry:"Where is your business located?",legalCompanyName:"Legal name of the company",legalCompanyNameHelper:"Enter the name exactly as it is on your Chamber of Commerce registration",accountDetailsDescription:"Provide few details about you to start accepting live payments.",provideDetails:"Provide details",payoutAccountsDescription:"To set up your account, let us know where to send your payouts.",payinAccountsDescription:"To complete your account, let us know where to send your payins.",providePayoutDetails:"Provide payout details",providePayinDetails:"Provide payin details",addExtraPayoutAccount:"Add extra payout account",addExtraPayinAccount:"Add extra payin account",payoutDetails:"Payout details",payinDetails:"Payin details",addPayoutAccount:"Add a payout account",addPayinAccount:"Add a payin account",failedToFetchPayoutAccount:"failed to fetch payout account",toCompleteProcessReviewAndSignOfficialDocumentation:"To complete this process, review and sign the official documentation.",sign:"Sign",signer:"Signer",selectSigner:"Select signer",pciSignedSuccessfully:"PCI signed successfully",pciSignFailed:"PCI signing failed",byClickingSignIAcknowledgeAndAgree:"By clicking the Sign button, I acknowledge and agree to the following: ",acknowledgePciRequirements:"We hereby acknowledge that we must remain compliant with the aforementioned PCI DSS requirements at all times as long as we want to receive payments. Consequently, we must continuously reassess our environment and implement any additional PCI DSS requirements if our environment changes.",basedOnTheAboveSignatory:"Based on the above, the signatory above asserts that the information within this attestation form fairly represents the results of the assessment.",failedToGetPciStatus:"Failed to get the PCI status",failedToGetPciTemplate:"Failed to get PCI template",failedToGetPciTemplateInSelectedLanguageFallbackToEn:"Failed to get the PCI template in the selected language. Falling back to English.",failedToDownloadPci:"Failed to download PCI document(s)",signServiceAgreement:"Sign services agreement",pciDssQuestionnaire:"PCI DSS questionnaire",serviceAgreementSignedSuccessfully:"Service agreement signed successfully",serviceAgreementSignFailed:"Service agreement signing failed",failedToGetServiceAgreementStatus:"Failed to get the service agreement status",failedToGetServiceAgreement:"Failed to get the service agreement",failedToGetServiceAgreementInSelectedLanguageFallbackToEn:"Failed to get the service agreement in the selected language. Falling back to English.",iHaveReadAndIAcceptTheseTerms:"I have read and I accept these terms and confirm that I am a legal representative authorized to accept these terms on behalf of the company. I have taken notice of the privacy statement (www.adyen.com/privacy) and I consent to my (personal) data being used for the purposes described therein.",finished:"Finished",invalidRole:"Please select a role",unableToVerifyTheIdNumber:"Unable to verify the Id number for the given country",download:"Download",accountHolder:"Account holder",accountHolderDescriptionCompany:"The bank account holder has to have the same name as your company.",accountHolderDescriptionIndividual:"This should be you, since the bank account has to be in your name",accountHolderDescriptionSoleProp:" The bank account holder has to have the same name as your sole proprietorship",bankCountry:"Bank country",bankAccountCountry:"Bank account country",currencyCode:"Currency code",currencyPlaceholder:"Select a currency code",bankAccountNumber:"Account number",iban:"IBAN",swiftCode:"Swift code",bsbNumber:"BSB Number",branchCode:"Branch code",transitNumber:"Transit number",listitemVoidedChequeBankLetterBankStatementOnline:"Voided cheque/Bank letter/Bank statement/Online banking environment",instructionNumber:"Instruction number",institutionNumber:"Institution number",sortCode:"Sort code",bankCityTown:"Bank city/town",clearingCode:"Clearing code",bankCode:"Bank code",bankName:"Bank name",achRoutingNumber:"ACH routing number",decisionMaker:"Decision-makers",decisionMakerDescription:"Provide the information of the owners, controlling persons, and signatories in your company. Keep in mind that one person may hold multiple roles. The requirements are as follows:",owner:"Owner",ownerDescription:"Someone who owns 25% or more of the company(directly or indirectly)",controllingPerson:"Controlling person",controllingPersonDescription:"Not an owner, but with authority to make major business decisions",signatory:"Signatory",signatoryDescription:"Authorized to sign the contracts on behalf of the company",director:"Director",directorDescription:"Someone appointed to manage a company's business and affairs",provideAllDirectorsYouShouldHaveAtLeastOne:"Provide <strong>all directors</strong>. You should have at least one.",provideAllDirectorsYouShouldHaveAtLeastThree:"Provide <strong>all directors</strong>. You should have at least three.",provideAllDirectorsYouShouldHaveAtLeast3AndAtMost15:"Provide <strong>all directors</strong>. You should have at least 3, and at most 15",addDecisionMaker:"Add decision maker",addDecisionMakers:"Add decision makers",goToOverview:"Go to overview",saveAndGoToOverview:"Save and go to overview",edit:"Edit",remove:"Remove",toggleAssociationMenu:"toggle menu of %{name} ",editDecisionMakerDetails:"edit details of %{decisionMaker}",removeDecisionMaker:"remove %{decisionMaker}",verifyDecisionMakerDetails:"verify details of %{decisionMaker}",goToMenu:"Go to Menu",confirm:"Confirm",goToDecisionMakers:"Go to list of decision makers",theSubmitWasSuccessful:"The submit was successful",thereWasAnErrorTryAgain:"There was an error, please try again",proofOfIdentityCard:"State-issued proof of identity card",proofOfIdentityCardNumber:"Identity card number",proofOfResidence:"Proof of residency",proofOfNationalId:"Proof of national ID",backToTaskList:"Back to task list",proofOfResidenceDocumentTypeLabel:"Upload a document as proof of address for %{name}. We need to see this document so we can more accurately verify their identity.",utilityBill:"Utility bill",governmentIssuedCorrespondence:"Government-issued correspondence",taxationDocument:"Taxation document",extractFromMunicipalPersonalRecordsDatabase:"Extract from Municipal Personal Records database",salarySlip:"Salary slip",mortgageStatement:"Mortgage statement",certificateOfVoterRegistration:"Certificate of voter registration",businessAccountDetailsDescription:"To prepare your account, we need information about your business.",documentAddressedToName:"The document has to be addressed to %{name}",showAddressStateCountry:"Shows address, state, and country of residence",dateOnDocumentNoOlderThanXMonths:"The date on the document is no older than %{numberOfMonths} months",fullDocumentVisibleWithReadableText:"The full document needs to be visible, with all text readable",documentCannotBeDamaged:"The document cannot be damaged",verify:"Verify",go:"Go",idUploadDocumentSubtitle:"Upload a government-issued photo ID document that belongs to <strong>%{name}</strong>. We need to see this document so we can verify their identity.",documentNotExpiredOrDamaged:"The document cannot be expired or damaged",includeFrontAndBack:"Include both the front and back side, each in separate file",fullDocumentVisible:"The full document needs to be visible, with all text readable",imagesInColor:"Images have to be in color",birthDatePlaceholder:"dd/mm/yyyy",onlyEnterNormalCharacters:"Please only enter normal characters",verifyCompanyInfoIsUpToDate:"You need to verify that your company information is up to date",failedToFetchRelevantDocuments:"Failed to fetch relevant documents",failedToFetchRelevantAccounts:"Failed to fetch relevant accounts",processing:"Processing",unsuccessful:"Unsuccessful",invalidDateOfBirth:"Please enter a valid date of birth",successfullyUpdatedDetails:"Successfully updated details",failedToUpdateDetails:"Failed to update details",successfullyVerifiedIdNumber:"Successfully verified %{idNumber}",failedFetchingDecisionMaker:"Failed to get decision maker details",fileUpload:"File upload",bankStatement:"Bank statement",bankStatementOptional:"Bank statement (optional)",bankAccountVerification:"Bank account verification",bankStatementDocumentTypeLabel:"Upload a document to confirm your bank account information. We need to see this document so we can set up your payouts.",requirements:"Requirements:",accountHolderNameMatchesWithBusinessOrTradingName:"The account holder name on the document has to match the legal business or trading name of your company",accountNumberOrIbanVisible:"The account number or IBAN needs to be visible",showsCountryOfBankAccount:"Shows the country where the bank account is located (for banks in the EU, the country is included in the IBAN)",hasTobeOfficialDocumentFromBank:"It has to be official document from a bank, demonstrated by a bank logo, the bank name, or a bank-specific font",ifDocumentMoreThan12months:"If your document is older than 12 months, then it should contain a statement with the company\u2019s assets and liabilities. You will need to have it signed and dated by someone with decision-making or signing power within the company. Make sure the date, title, and legal entity name are included.",whyDoINeedToFillInThisInformation:"Why do I need to fill in this information?",reasonForFillingCompanyRegistrationDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingCompanyAddressDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingIndividualPersonalDetails:"We have to make sure that everyone who uses our services is who they say they are. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingIndividualAddressDetails:"We have to make sure that everyone who uses our services is who they say they are. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingPayoutAccountDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingPayoutDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",whatIsTheDifferenceBetweenTheseRoles:"What is the difference between these roles?",ownerGuideDescription:"An <strong>owner</strong> is someone who owns 25% or more of the company, through voting rights, equity, or similar.",controllingPersonGuideDescription:"A <strong>controlling person</strong> is not an owner, but has the authority to make major business decisions.",signatoryGuideDescription:"A <strong>signatory</strong> has been given authority to sign official documents on behalf of the company. Usually a signatory is also an owner or a controlling person.",directorGuideDescription:"A <strong>director</strong> is someone appointed to manage a company's business and affairs. Who your directors are can be found on the companies register.",someoneAppointedToManageACompanysBusinessAndAffairs:"Someone appointed to manage a company's business and affairs.",whatIfDocumentIsMoreThan12MonthsOld:"What if my document is more than 12 months old?",description:"Description (optional)",descriptionHelper:"Attach description to this payout account",depositTicket:"Deposit ticket / deposit form",screenshotOfOnlineBankingEnviroment:"Screenshot of online banking environment",officialEmailOrALetterFromYourBank:"Official email or a letter from your bank",cheques:"Cheques",releveDidentiteBancaire:"Relev\xe9 d'Identit\xe9 Bancaire (RIB)",successFullyRemovedDecisionMaker:"Successfully removed a decision maker",failedToRemoveDecisionMaker:"Failed to remove a decision maker",chamberOfCommerceExtract:"Chamber of Commerce extract",taxNumberCorporateNumber:"Tax Number / Corporate Number",companyLegalName:"Company legal name",companyName:"Company name",companyType:"Company type",taxReferenceNumber:"Tax reference number",SST:"SST",companyProfile:"Company profile",companyNumber:"Company number",RfcDocument:"RFC Document",RFC:"RFC",companyRegistrationDocument:"Company registration document",businessName:"Business name",typeOfCompany:"Type of company",typeOfIdentity:"Type of identity",typeOfIdentitySubtitle:"We need to see a government-issued photo ID document that belongs to the person mentioned above.",CNPJ:"CNPJ",businessNumber:"Business number",doingBusinessAs:"Doing business as",taxIdentificationNumber:"Tax identification number",irdDocument:"IRD document",irdNumber:"IRD number",australianBusinessNumberAbn:"Australian business number (ABN)",australianBusinessNumberAcn:"Australian company number (ACN)",enterpriseNumber:"Enterprise Number",NIP:"NIP (Numer identyfikacji podatkowej)",NIPC:"NIPC (N\xfamero de Identifica\xe7\xe3o de Pessoa Colectiva)",numerodeIVA:"N\xfamero de IVA",NIF:"NIF (N\xfamero de Identificaci\xf3n Fiscal)",NIFdeIVA:"N\xfamero de Identificaci\xf3n a efectos de IVA",partitaIVA:"Partita IVA",organisationsnummer:"Organisationsnummer",momsregistreringsnummer:"Momsregistreringsnummer",codiceFiscaleOrCCIAA:"Codice fiscale or CCIAA","UST-ID":"UST-ID (Umsatzsteuer-Identifikationsnummer)",DIC:"DI\u010c (Da\u0148ov\xe9 identifika\u010dn\xed \u010d\xedslo)",ICO:"IC\u030cO (Identifikac\u030cni\u0301 c\u030ci\u0301slo)","USt-IdNr":"USt-IdNr. (Umsatzsteuer-Identifikationsnummer)",handelsregisternummer:"Handelsregisternummer",NumeroDeTVA:"Num\xe9ro de TVA",organisasjonsnummer:"Organisasjonsnummer",skattenummer:"Skattenummer",verificationErrorMessage:"Some information couldn\u2019t be verified. Click to see what needs to be adjusted.",remediationFormErrorMessage:"Some information couldn\u2019t be verified. Information in this form may need to be adjusted.",youHaveUnsavedChanges:"You have unsaved changes",areYouSureToLeave:"Are you sure you want to leave?",cancel:"Cancel","save&Leave":"Save & leave",leave:"Leave",employerIdentificationNumber:"Employer identification number",companyRegistrationNumber:"Company registration number",euVatNumber:"EU VAT number",vatNumber:"VAT number",regonKrsNumber:"REGON / KRS number",registrationNumber:"Registration number",charityNumber:"Charity number",SIRETOrSIREN:"SIRET or SIREN","RNA/SIREN/SIRETNumber":"RNA number/SIREN number/SIRET number",firmenbuchnummer:"Firmenbuchnummer",firmenbuchnummerOrZVR:"Firmenbuchnummer or ZVR number","stepsX/YofForm":"Step %{activeFormIndex}/ %{totalForms} of %{taskName}",areYouPartOfTrust:"Are you part of a trust?",isBusinessPartOfTrust:"Is your business part of a trust?",no:"No",yes:"Yes",isPartOfTrust:"Is part of a trust",informationCouldNotBeSubmitted:"Information couldn\u2019t be submitted",fieldHasUnsupportedFormats:"%{fieldName} has an unsupported format.",updateTheInformation:"Update the information",andResubmit:"and submit again.",someFieldsHaveUnsupportedFormatedUpdateInfoAndResubmit:"Some fields have unsupported formats. Update the information and submit again.",trustType:"Type of trust agreement",cashManagementTrust:"Cash management trust",corporateUnitTrust:"Corporate unit trust",deceasedEstate:"Deceased estate",discretionaryInvestmentTrust:"Discretionary investment trust",discretionaryServicesManagementTrust:"Discretionary services management trust",discretionaryTradingTrust:"Discretionary trading trust",firstHomeSaverAccountsTrust:"First home saver accounts trust",fixedTrust:"Fixed trust",fixedUnitTrust:"Fixed unit trust",hybridTrust:"Hybrid trust",listedPublicUnitTrust:"Listed public unit trust",otherTrust:"Other trust",pooledSuperannuationTrust:"Pooled superannuation trust",publicTradingTrust:"Public trading trust",unlistedPublicUnitTrust:"Unlisted public unit trust",countryOfEstablishment:"Country of establishment",nameOfTrustAgreement:"Name of trust agreement",typeOfTrustAgreement:"Type of trust agreement",weFoundTheFollowingIssues:"We found the following issues:",reviewTheInformationBelowAndCorrectMistakesOr:"Review the information below and correct any mistakes, or",uploadTheRequestedDocuments:"upload the requested documents",uploadTheFollowingDocuments:"upload the following documents:",uploadDocumentAndDocument:"%{uploadDocumentOne} and %{documentTwo}",thenResubmit:"Then resubmit.",isTrustOperationAddressSame:"Is there a different address for your trust's operations?",trustDetails:"Trust Details",trustDetailsDescription:"To prepare your account, we need information about your trust.",provideTrustDetails:"Enter trust details",addTrustMembers:"Add trust members",trustDocument:"Trust document",trustDocumentDescription:"We won\u2019t be able to verify your trust without all required information. Make sure the following information is visible on your document:",nameOfTrust:"Name of trust",fullLegalNamesOfAnyAppointers:"Full legal name of any appointers included in the deed",dateDeedWasSigned:"Date deed was signed",settlerDetailsIncl:"Settlor details including their full legal name and home address",trusteeDetailsIncl:"Trustee details including full legal name, CAN or ABN, and address",beneficiariesDetailsIncl:"Beneficiaries details including number of beneficiaries, full legal names, and any default beneficiaries",trustMembers:"Trust members",trustMembersDescription:"Provide information for the secondary trustee, settlor, protector and beneficiary associated with the trust contract.",trustee:"Trustee",beneficiary:"Beneficiary",protector:"Protector",settlor:"Settlor",ultimateBeneficialOwner:"Ultimate beneficial owner",addTrustMember:"Add trust member",beneficialOwnersOfTrustProperty:"The beneficial owners of the trust property.",personAppointmentUnderTrustInstrument:"The person appointed under the trust instrument to direct or restrain the trustees in relation to their administration of the trust.",legalOwnerOfProperty:"The legal owner of the property in trust.",entityEstablishingTrust:"The entity that establishes a trust.",entityOwning25OrMoreOfTrust:"The entity who owns 25% or more of the property in trust.",failedToFetchTrustDetails:"Failed to fetch the trust details",failedToFetchTrustMemberDetails:"Failed to fetch the trust member details",failedToFetchLegalEntityDetails:"Failed to fetch the legal entity's details",editTrustMember:"Edit details of %{trustMember} ",removeTrustMember:"Remove %{trustMember}",successFullyRemovedTrustMember:"Successfully removed trust member",failedToRemoveTrustMember:"Failed to remove trust member",editEntityDetails:"Edit entity details",editOwnerOfTrustMember:"Edit owner of %{trustMember}",editEntityOwner:"Edit owner details",addEntityOwner:"Add owner details",addOwnerToTrustMember:"Add owner of %{trustMember}",whatTypeOfYourMembersEntity:"What\u2019s the type of your member\u2019s entity?",naturalPersonTitle:"Natural person",naturalPersonDescription:"He/she doesn\u2019t have any business.",businessEntityTitle:"Business entity",businessEntityDescription:"This is usually a sole proprietor, private company, public corporation, partnership, or non profit.",roleAndEntityType:"Role and entity type",helpUsVerifyCompany:"Help us verify this company.",providePersonalDetailsOfOwner:"Please provide the personal details of the owner.",memberDetails:"Member details",good:"Good",notCutOff:"Not cut off",notBlurry:"Not blurry",notExpired:"Not Expired",noGlare:"No glare",selectDocumentType:"Select document type",registrationDocumentSubTitle:"Upload your company\u2019s business registration document. We need to see this document so we can verify your company.",documentIssuedByGovernmentAuthority:"The document has to be issued by a government authority. It\u2019s usually given when a business is created at the local commercial register",uploadTaxationDocument:"Upload a a tax return or taxation registration document. We need to see this document so we can verify that your tax ID number belongs to your company.",containsNameOfCompany:"Contains the name of your company or organization",documentShowsTaxIdOfCompany:"The document shows the tax ID number of the company",issuedByTheTaxAuthority:"Issued by the tax authority or government of the country where the company is registered",providePageWithPhotoAndCode:"Provide the page with the photo, including the code on the bottom",constitutionalDocument:"Constitutional document",solePropDetails:"Sole proprietor details",enterSoleProprietorDetails:"Enter sole proprietor details",selectAccountHolder:"Select account holder",nameOfBankAccountHolder:"We need to know about the bank account where you want to receive your payouts. What is the name of the account holder of that bank account?",myName:"My name",myNameDescription:"It\u2019s a personal bank account held in my own name",mySoleTraderName:"My sole trader name",mySoleTraderNameDescription:"The account is in my name, but I am registered as a sole trader, sole proprietor, or freelancer",theCompanyIWorkFor:"The company I work for",theCompanyIWorkForDescription:"It is a company bank account for a private, public, or non-profit organization",aTrust:"A trust",aTrustDescription:"The account belongs to a trust, a trustee controls the account for the benefit of a beneficiary",aPartnership:"A partnership",aPartnershipDescription:"The account belongs to a jointly owned business where two or more people operate and share profits",anAssociation:"An association",anAssociationDescription:"The account belongs to a group of people acting together for a specific non-commercial purpose",legalNameOfSoleProprietor:"Legal name of sole proprietor",failedToFetchSoleProp:"Failed to fetch the sole propietor",uniqueIdentificationCode:"\u0415\u0418\u041a, Unique Identification Code (UIC)",identifikacionenNomerDDS:"VAT number (\u0414\u0414\u0421)",MBS:"Mati\u010dni broj subjekta trgova\u010dkog suda (MBS)",PDVIdBrojOIB:"PDV Id. Broj OIB",cyRegistrationNumber:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u0395\u03b3\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2",arithmosEngraphes:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u0395\u03b3\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2 \u03a6.\u03a0.\u0391.","CVR-nummer":"CVR-nummer",momsregistreringsnummerOrStamregister:"Momsregistreringsnummer (CVR) or Stamregister erhverv (SE-nummer)",registrikood:"Registrikood",kaibemaksukohustuslaseNumber:"K\xe4ibemaksukohustuslase number","Y-TUNNUS":"Y-TUNNUS",arvonlisaveronumeroMervardesskattenummer:"Arvonlis\xe4veronumero Merv\xe4rdesskattenummer","GEMI-number":"GEMI number or \u0391\u03a1\u0399\u0398\u039c\u039f\u03a3 \u0393.\u0395.\u039c\u0397 (\u0393\u03b5\u03bd\u03b9\u03ba\u03bf\u03c5\u0301 \u0395\u03bc\u03c0\u03bf\u03c1\u03b9\u03ba\u03bf\u03c5\u0301 \u039c\u03b7\u03c4\u03c1\u03c9\u0301\u03bf\u03c5)",grTaxId:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03a6\u03bf\u03c1\u03bf\u03bb\u03bf\u03b3\u03b9\u03ba\u03bf\u03cd \u039c\u03b7\u03c4\u03c1\u03ce\u03bf\u03c5 Arithm\xf3s Forologikou M\u0113tr\u1e53ou (\u0391\u03a6\u039c)",huRegistrationNumber:"Ce\u0301gjegyze\u0301ksza\u0301m",huTaxId:"K\xf6z\xf6ss\xe9gi ad\xf3sz\xe1m",valueAddedTaxIdentificationNumber:"Value added tax identification number (VAT)",lvRegistrationNumber:"Komersanta re\u0123istr\u0101cijas numurs (NBR)",lvTaxId:"Pievienot\u0101s v\u0113rt\u012bbas nodok\u013ca re\u0123istr\u0101cijas numurs (PVN)",ltRegistrationNumber:"Juridini\u0173 asmen\u0173 registro kodas",PVMmoketojoKodas:"PVM mok\u0117tojo kodas",luRegistrationNumber:"Num\xe9ro registre de commerce et des soci\xe9t\xe9s (RCS)",numeroDIdentificationALATaxe:"Num\xe9ro d'identification \xe0 la taxe sur la valeur ajout\xe9e (No. TVA)",numarOrdineRegistrulComertului:"Numar de ordine in registrul comertului",codulDeIdentificareFiscala:"Codul de identificare fiscal\u0103 (CIF)",skRegistrationNumber:"Identifikac\u030cne\u0301 c\u030ci\u0301slo (I\u010cO)",skTaxId:"Identifika\u010dn\xe9 \u010d\xedslo pre da\u0148 z pridanej hodnoty (I\u010c DPH)",siRegistrationNumber:"Mati\u010dna \u0161tevilka",siTaxId:"Identifikacijska \u0161tevilka za DDV (ID za DDV)","unternehmens-Identifikationsnummer":"Unternehmens-Identifikationsnummer (UID), Num\xe9ro d\u2019identification des entreprises (IDE), Numero d\u2019identificazione delle imprese (IDI), or CH-number",Mehrwertsteuernummer:"Mehrwertsteuernummer (MwST), Num\xe9ro de TVA, Numero dell\u2019imposta sul valore aggiunto (IVA), VAT number",Xdigits:"%{digits} digits",XtoYdigits:"%{x} to %{y} digits",XorYdigits:"%{x} or %{y} digits",Xcharacters:"%{x} characters","9digitsOr14digits":"9 digits or 14 digits","1character5to7digits":"1 letter + 5-7 digits",Wchar9or14digits:"W123456789, 9 or 14 digits","1char8digits":"X99999999","2characteres6or7digits":"11 digits, XX123456 or XX1234567","7or8or12characteres":"7, 8 or 12 digits or characters",Cchar5digits:"C99999",cop1to8digits:"C, O, or P, followed by a number from 1 up to 8 digits",selectAccountHolderDescription:"We need to know about the bank account where you want to receive your payouts. What is the name of the account holder of that bank account?","8digitsOptional-":'8 digits; last digit can be preceded by an optional "-"',provideAllOwners:"Provide <strong>all owners</strong> holding 25% or more of your company.",ifNoOwnersSpecifyControllingPersons:"If you don\u2019t have any owners holding 25% or more, then specify <strong>all controlling persons</strong>. Otherwise you can skip this.",provideAtLeastOneSignatory:"Provide at least <strong>1 signatory</strong>.",provideOneControllingPerson:"Provide <strong>1 controlling person</strong>.",textToVerifyAccount:"For you to receive your payouts, we need a verified bank account.",mobileApplication:"Mobile Application",onOnlineBankingEnvironment:"Or web version of online banking environment",dontHaveAccessOnlineBanking:"Don\u2019t have access to online banking environment?",confirmPayoutManually:"Confirm the payout account manually",noteManualTakesLonger:"Note that manual review takes longer.",accountVerification:"Account Verification",verifyWith:"Verify with",documentVerification:"Document verification",weNeedToSeeAGovermentIssuedPhotoId:"We need to see your ID so we can verify your identity. You\u2019ll be asked to take a photo of the original document with your phone (no scans or copies!) for instant verification on our verification partner\u2019s secure upload page.",youHaveSuccessfullyProvidedTheIdDocument:"You\u2019ve successfully provided the ID document.",submitIdDocumentsAgain:"Submit ID documents again",doYouHaveTheIdDocumentByHand:"Do you have the ID document by hand?",goThroughInstantVerification:"Go through instant verification",madeAMistake:"Made a mistake?",canNotCompleteInstantVerification:"Can not complete instant verification?",goBackAndProvideDocumentScans:"Go back and provide document scans",acceptedIdDocuments:"Accepted ID documents:",identityCard:"Identity card",IDontHaveAnIdDocumentAvailable:"I don\u2019t have an ID document available on hand.",weTakeYourSecurityVerySeriously:"We take your security very seriously. This personal data is stored securely and only used for identity verification purposes.",uploadOneOfTheFollowing:"Upload one of the following so we can verify your information:",documentIssuedWithinLastYear:"Note! The document needs to be issued within the last year. If it is older, make sure it contains a signature and a state of affair not older than a year.",learnMore:"Learn more.",doingBusinessAsNameFiling:"Doing business as-name filling",taxFiling:"Tax-filling",continueAsCompany:"Continue as a company?",continueAsIndividual:"Continue as an individual?",indicatedPayoutToCompany:"You indicated that you want to be paid out to a bank account that is owned by a company, such as a private company, public company, partnership, or non-profit organization. This means that we need to collect some information about your company too.",continueSigningUpAsCompany:"Do you want to continue signing up with your company information?",indicatedPayoutToPersonalAccount:"You indicated that you want to be paid out to a bank account that is owned by you personally. This means you will continue as an individual, not a company. However, if you operate as a private company, public company, partnership, or non-profit organization, then you cannot continue as an individual.",continueSigningUpAsIndividual:"Do you want to continue signing up as an individual?",continue:"Continue",noGoBack:"No, go back",continueCompany:"Continue as company",continueIndividual:"Continue as individual",addManually:"Add manually",searchAddress:"Search address",startTypingTheAddress:"Start typing the address",addresses:"Addresses",loading:"Loading",incorporationNumber:"Incorporation number",socialInsuranceNumber:"Social insurance number",navigateToManualUpload:"Navigate to manual flow for uploading documents",navigateToInstantVerification:"Navigate to instant verification flow",verificationMethod:"Verification Method",verifyViaMobileBankAppOrBankWebsite:"Verify the account via mobile bank app or bank website",provideAccountDetailsAndUploadBankStatement:"Provide account details and upload a scan of a bank statement",instantVerificationDescription:"To quickly and safely verify the account you need access to the online banking environment associated with this account holder.",manualVerificationDescription:"Manually provide your account details and upload a bank statement.",poweredBy:"Powered by",youSuccessfullyVerifiedAccount:"You\u2019ve successfully verified your bank account.",verifyBankAccountAgain:"Verify bank account again",accountName:"Account name",mayTakeAFewHoursOrDays:"May take a few hours or days",instant:"Instant",tink:"Tink",trustly:"Trustly",isOurTrustedPartnerHelpingSpeedUpSetup:"%{provider} is our trusted partner helping speed up your account setup by instantly verifying your bank account.",howDoesVerificationWithOurPartnerWorks:"How does verification with our partner %{provider} work?",selectTheBankToReceivePayouts:"After this page, you can select the bank where you would like to receive the payouts.",loginIntoYourBankingEnvironment:"Log into your banking environment via mobile app or internet browser.",yourBankWillConfirmYourAccountDetails:"Your bank will confirm your account details to us.",adyenWillOnlyGetTemporaryAccess:"Adyen will only gain temporary access to your bank details, and your data is never shared with third parties.",instantVerification:"Instant verification",xCharactersLeft:"%{charactersLeft} characters left",goBack:"Go back",doNotHaveABN:"I do not have an ABN","doNotHaveUEN/GST":"I do not have an/a UEN/GST","doNotHaveIRD/GST":"I do not have an/a IRD/GST",businessRegistrationNumber:"Business Registration Number",doNotHaveBusinessRegistrationNumber:"I do not have a Business Registration Number","UEN/GST":"Unique Entity Number (UEN)/Goods and Services Tax (GST)","IRD/GST":"Inland Revenue Department Number (IRD No)/Goods and Services Tax (GST)",enterNameExactlyAsAppearInID:"Enter your first name(s) exactly as it appears on your identity document",enterLastNameExactlyAsAppearInID:"Enter your last name(s) exactly as it appears on your identity document",errorMessage_1_10:"Information couldn\u2019t be verified",errorMessage_1_11:"Document didn\u2019t meet requirements",errorMessage_1_12:"Legal entity declined",errorMessage_1_30:"Individual details couldn't be verified",errorMessage_1_31:"ID document is needed",errorMessage_1_32:"ID document couldn\u2019t be processed",errorMessage_1_33:"ID document didn\u2019t meet requirements",errorMessage_1_34:"Image of the ID document didn\u2019t meet requirements",errorMessage_1_35:"Individual details didn't match the ID document",errorMessage_1_36:"Proof of residency didn\u2019t meet requirements",errorMessage_1_37:"Image of the proof of residency didn't meet the requirements",errorMessage_1_38:"Individual details didn't match the proof of residency",errorMessage_1_39:"Proof of national ID number didn't meet requirements",errorMessage_1_40:"Image of the proof of national ID number didn't meet the requirements",errorMessage_1_41:"Individual details didn't match the proof of national ID number",errorMessage_1_50:"Organization details couldn\u2019t be verified",errorMessage_1_51:"Organization details didn't match the document",errorMessage_1_52:"Registration document didn\u2019t meet requirements",errorMessage_1_53:"Tax document didn't meet requirements",errorMessage_1_54:"Proof of address didn't meet requirements",errorMessage_1_55:"Proof of ownership is needed",errorMessage_1_56:"Organization ownership couldn't be verified",errorMessage_1_57:"Submitted affiliation document didn't meet the requirements",errorMessage_1_60:"Legal entity details couldn't be verified",errorMessage_1_61:"Constitutional document didn't meet requirements",errorMessage_1_62:"Legal entity details didn't match the constitutional document",errorMessage_1_70:"Bank account couldn't be verified",errorMessage_1_71:"Bank account details couldn't be verified",errorMessage_1_72:"Verification could not be completed",errorMessage_1_73:"Bank account access could not be authenticated",errorMessage_1_74:"Bank statement is needed",errorMessage_1_75:"Bank statement didn\u2019t meet requirements",errorMessage_1_76:"Bank details didn't match the bank statement",errorMessage_1_1000:"Verification failed. Legal entity declined",errorMessage_1_1001:"There were some technical issues in the verification process.",errorMessage_1_1002:"There are more questions about the submitted information.",errorMessage_1_1003:"The document contained sensitive data.",errorMessage_1_3000:"The user couldn't be verified.",errorMessage_1_3001:"The name and date of birth couldn't be verified.",errorMessage_1_3002:"The name and national ID number couldn't be verified.",errorMessage_1_3003:"The name and residence state couldn't be verified.",errorMessage_1_3004:"The name and residence country couldn't be verified.",errorMessage_1_3005:"The national ID number was entered incorrectly.",errorMessage_1_3006:"The name didn't match the national ID number.",errorMessage_1_3007:"An incorrect national ID number was entered.",errorMessage_1_3008:"The ID document image was incomplete.",errorMessage_1_3009:"The photo on the ID document couldn\u2019t be recognized.",errorMessage_1_3010:"The ID document image was incomplete or too blurry.",errorMessage_1_3011:"The ID document image was in black and white.",errorMessage_1_3012:"The image couldn\u2019t be recognized as a supported ID document.",errorMessage_1_3013:"The ID document wasn't a supported document type.",errorMessage_1_3014:"The ID document image didn\u2019t contain the MRZ code.",errorMessage_1_3015:"The ID document was expired.",errorMessage_1_3016:"The ID document image was of too low quality.",errorMessage_1_3017:"The ID document image was a scan.",errorMessage_1_3018:"The ID document image was too blurry.",errorMessage_1_3019:"The ID document was expired.",errorMessage_1_3020:"The ID document wasn't a supported document type.",errorMessage_1_3021:"The ID document MRZ code is unreadable.",errorMessage_1_3022:"The ID document image only showed one side of the ID document.",errorMessage_1_3023:"The ID document image only showed parts of the ID document.",errorMessage_1_3024:"The ID document wasn't valid.",errorMessage_1_3025:"The state didn\u2019t match the one on the ID document.",errorMessage_1_3026:"The ID document didn\u2019t show an issuing state.",errorMessage_1_3027:"The ID document wasn't valid.",errorMessage_1_3028:"The ID number didn\u2019t match the one on the document.",errorMessage_1_3029:"The ID document didn\u2019t show a document number.",errorMessage_1_3030:"The ID document wasn't valid.",errorMessage_1_3031:"The ID document wasn't valid.",errorMessage_1_3032:"The first name didn\u2019t match the one on the ID document.",errorMessage_1_3033:"The last name didn\u2019t match the one on the ID document.",errorMessage_1_3034:"The date of birth didn\u2019t match the one on the ID document.",errorMessage_1_3035:"The country didn\u2019t match the one on the ID document.",errorMessage_1_3036:"The ID document image was too low quality.",errorMessage_1_3037:"The last name didn't match the one on the proof of residential address.",errorMessage_1_3038:"The first name didn\u2019t match the one on the proof of residential address.",errorMessage_1_3039:"The date of birth didn\u2019t match the one on the proof of residential address.",errorMessage_1_3040:"The proof of residential address didn\u2019t show the date it was issued.",errorMessage_1_3041:"The proof of residential address didn\u2019t show a name.",errorMessage_1_3042:"The proof of residential address didn't show an issuing country.",errorMessage_1_3043:"The proof of residential address wasn't a supported document type.",errorMessage_1_3044:"The proof of residential address was too old.",errorMessage_1_3045:"The proof of residential address image was of too low quality.",errorMessage_1_3046:"The address on the proof of residential address was a PO box.",errorMessage_1_3047:"The proof of national ID number wasn't a supported document type.",errorMessage_1_3048:"The last name didn\u2019t match the one on the proof of national ID number.",errorMessage_1_3049:"The first name didn\u2019t match the one on the proof of national ID number.",errorMessage_1_3050:"The date of birth didn\u2019t match the one on the proof of national ID number.",errorMessage_1_3051:"The proof of national ID number image was of too low quality.",errorMessage_1_3062:"The name and 4 digit SSN couldn't be verified.",errorMessage_1_5000:"The legal business name couldn't be verified.",errorMessage_1_5001:"The tax ID number couldn't be verified.",errorMessage_1_5002:"The state couldn't be verified.",errorMessage_1_5003:"The legal name didn't match the one on the registry.",errorMessage_1_5004:"The legal name didn't match the one on the registry.",errorMessage_1_5005:"The legal name didn't match the one on the registry.",errorMessage_1_5006:"The country didn't match the one on the registry.",errorMessage_1_5007:"The registration number didn't match the one on the registry.",errorMessage_1_5008:"The tax ID didn't match the one on the registry.",errorMessage_1_5009:"The registration number was provided as tax ID.",errorMessage_1_5010:"The company details couldn't be verified. ",errorMessage_1_5011:"The trade name (doing business as) was entered.",errorMessage_1_5012:"The submitted company type didn\u2019t match the one on the registry.",errorMessage_1_5013:"The company was not found in the database.",errorMessage_1_5014:"The registration number couldn't be verified. ",errorMessage_1_5015:"The registration number didn't match the legal business name.",errorMessage_1_5016:"The tax ID number couldn't be verified.",errorMessage_1_5017:"The tax ID number didn't match the legal business name.",errorMessage_1_5018:"The business address couldn't be verified.",errorMessage_1_5019:"The trade name (doing business as) was entered instead of the legal name.",errorMessage_1_5020:"Registration document is missing.",errorMessage_1_5021:"The registration document was too low quality.",errorMessage_1_5022:"The registration document was too old.",errorMessage_1_5023:"The submitted company type didn't match the one on the registration document.",errorMessage_1_5024:"The registration document did not show the company type.",errorMessage_1_5025:"The address on the company registration document was a residential address.",errorMessage_1_5026:"The address on the company registration document was a PO box.",errorMessage_1_5027:"The business address didn't match the one on the company registration document.",errorMessage_1_5028:"The registration number didn't match the one on the company registration document.",errorMessage_1_5029:"The legal business name didn't match the one on the company registration document.",errorMessage_1_5030:"The country didn't match the one on the company registration document.",errorMessage_1_5031:"The company registration document didn't show a legal business name.",errorMessage_1_5032:"The company registration document didn't show a registration number.",errorMessage_1_5033:"The state didn't match the one on the company registration document.",errorMessage_1_5034:"The company registration document wasn't a supported document type.",errorMessage_1_5035:"The company registration document is not supported.",errorMessage_1_5036:"Tax document is missing.",errorMessage_1_5037:"The country didn't match the one on the tax document.",errorMessage_1_5038:"The tax document wasn't a supported document type.",errorMessage_1_5039:"The tax document was too low quality.",errorMessage_1_5040:"The tax document was too old.",errorMessage_1_5041:"The legal name didn't match the one on the tax document.",errorMessage_1_5042:"The tax ID number didn't match the legal business name.",errorMessage_1_5043:"The tax document didn't show a tax ID number.",errorMessage_1_5044:"The tax document didn't show a legal business name.",errorMessage_1_5045:"The state didn't match the one on the proof of address.",errorMessage_1_5046:"Ownership data seems incorrect.",errorMessage_1_5047:"Ownership data seems to be missing.",errorMessage_1_5048:"Provide official ownership documentation.",errorMessage_1_5049:"The affiliation document was not sufficient to prove the 100% affiliation.",errorMessage_1_5050:"The affiliation document was not official.",errorMessage_1_5051:"Signing person on the affiliation document could not be verified",errorMessage_1_5052:"The affiliation document verifies the payout entity is not 100% affiliated with the company. Setup can't be continued.",errorMessage_1_5053:"The affiliation document was not issued within the last 6 months",errorMessage_1_6000:"The legal name couldn't be verified.",errorMessage_1_6001:"The legal name didn't match the registration number.",errorMessage_1_6002:"The registration number couldn't be verified.",errorMessage_1_6003:"Legal entity type couldn't be verified.",errorMessage_1_6004:"The country of governing law couldn't be verified.",errorMessage_1_6005:"Constitutional document is missing.",errorMessage_1_6006:"The constitutional document was too old.",errorMessage_1_6007:"Legal name didn't match the constitutional document.",errorMessage_1_6008:"Country of governing law didn't match the constitutional document.",errorMessage_1_6009:"The constitutional document didn't show a legal name.",errorMessage_1_6010:"The constitutional document didn't show a registration number.",errorMessage_1_6011:"The legal entity type didn't match the one on the constitutional document.",errorMessage_1_7000:"The bank account couldn't be verified.",errorMessage_1_7001:"The routing number wasn't valid.",errorMessage_1_7002:"The bank account number wasn't valid.",errorMessage_1_7003:"The bank account couldn't be verified.",errorMessage_1_7004:"The bank account entered was invalid.",errorMessage_1_7005:"The verification code wasn't valid.",errorMessage_1_7006:"There were too many attempts to request the verification code.",errorMessage_1_7007:"The verification code wasn't entered.",errorMessage_1_7008:"There is no bank document to verify.",errorMessage_1_7009:"The bank document didn't show a bank account number.",errorMessage_1_7010:"The bank document didn't show the account owner name.",errorMessage_1_7011:"The bank account number didn't match the one on the bank document.",errorMessage_1_7012:"The bank account owner name appearing in the document does not match the verified legal name.",errorMessage_1_7013:"The bank document was too low quality.",errorMessage_1_7014:"The bank document wasn't a supported document type.",errorMessage_1_7015:"The bank account country didn't match the one on the bank document.",errorMessage_1_7016:"The branch code didn\u2019t match the one on the bank document.",errorMessage_1_7017:"The bank account currency didn't match the one on the bank document.",errorMessage_1_7018:"The bank document wasn't officially issued by the bank.",errorMessage_1_7019:"The bank document wasn't issued in the past 12 months.",errorMessage_1_7020:"The bank name didn't match the one on the bank document.",errorMessage_1_7021:"The bank document didn't show an official bank logo.",errorMessage_1_7022:"The bank document didn't show an official bank stamp.",remediationMessage_1_100:"No remediation possible",remediationMessage_1_101:"Contact Support",remediationMessage_1_102:"Upload a different document",remediationMessage_1_300:"Update individual details",remediationMessage_1_301:"Upload an ID document",remediationMessage_1_302:"Upload a different ID document",remediationMessage_1_303:"Upload a different image of the ID document",remediationMessage_1_304:"Upload proof of residency",remediationMessage_1_305:"Upload a different proof of residency",remediationMessage_1_306:"Upload a different image of the proof of residency",remediationMessage_1_307:"Upload a proof of national ID number",remediationMessage_1_308:"Upload a different proof of national ID number",remediationMessage_1_309:"Upload a different image of the proof of national ID number",remediationMessage_1_316:"Provide complete 9-digits Social Security Number number or upload an ID document if you don\u2019t have SSN.",remediationMessage_1_500:"Update organization details",remediationMessage_1_501:"Upload a registration document",remediationMessage_1_502:"Upload a different registration document",remediationMessage_1_503:"Upload a tax document",remediationMessage_1_504:"Upload a different tax document",remediationMessage_1_505:"Upload a proof of address",remediationMessage_1_506:"Upload a different proof of address",remediationMessage_1_507:"Update organization ownership details",remediationMessage_1_508:"Upload a proof of ownership",remediationMessage_1_509:"Upload a different affiliation document",remediationMessage_1_510:"Ensure signing person has the rights to represent the organization or is a listed professional member (lawyer, accountant) in your country of business and upload the right document",remediationMessage_1_511:"Upload a document that proves the payout entity is 100% affiliated with the legal entity",remediationMessage_1_600:"Update legal entity details",remediationMessage_1_601:"Upload a constitutional document",remediationMessage_1_602:"Upload a different constitutional document",remediationMessage_1_700:"Update bank account details",remediationMessage_1_701:"Use different bank account",remediationMessage_1_702:"Use other means of bank account verification",remediationMessage_1_703:"Upload a bank statement",remediationMessage_1_704:"Upload a different bank statement",remediationMessage_1_705:"Upload an official bank statement",sameNameAsLegalName:"Same as legal name of the company",whereCanIFindTheseNumbersOnMyDriversLicense:"Where can I find these numbers on my driver's license?",whereToFindNumbersOnDriversLicense:"Depending on the issuing state the position of these numbers might differ, but the license number is always on the front side of the card and the card number is in most cases located on the back of the license.",iStillCantFindIt:"I still can't find it.",patriotActDisclosureTitle:"Important Information You Need to Know About Opening An Account",patriotActDisclosureTextParagraph1:"To help the government fight the funding of terrorism and money laundering activities, Federal law requires financial institutions to obtain, verify, and record information that identifies each person (individual or entity) who opens an account and certain individuals who are associated with an account.",patriotActDisclosureTextParagraph2:"What this means: when you open an account, we will ask for your name, address, taxpayer identification number and other information that will allow us to identify you."},d={},c={},u="countries",m=e=>`states/${e}`,p="phone-prefixes",g="translations";function y(e){return{getCountryName:t=>{const a=f(u,e);return b(a,t)},getStateName:(t,a)=>{const r=f(m(a),e);return b(r,t)},getPhonePrefix:t=>{const a=f(p,e);return b(a,t)},setDataset:(t,a)=>{const r=f(t,e);c[r]=a},getDataset:t=>{const a=f(t,e);return c[a]},getDatasetKey:t=>f(t,e)}}const b=(e,t)=>{if(c[e]){const a=(e=>(d[e]||(d[e]={},c[e].forEach((({id:t,name:a})=>{d[e][t]=a}))),d[e]))(e);return a[t]}return null},f=(e,t)=>`${e}_${t}`.toLowerCase(),h="fetch"in window?window.fetch:e.fetch;function v(e,t){switch(t){case"silent":return null;case"info":case"warn":case"error":return console[t](e);default:throw new Error(e)}}function _(e,t,a="json"){const{errorLevel:r="warn",loadingContext:n,path:i,clientKey:o=""}=e,s=function(e,t){const{headers:a=[],method:r="GET"}=e;return Object.assign({method:r,mode:"cors",cache:"default",credentials:"same-origin",headers:Object.assign({Accept:"application/json, text/plain, */*","Content-Type":"POST"===r?"application/json":"text/plain"},a),redirect:"follow",referrerPolicy:"no-referrer-when-downgrade"},t&&{body:JSON.stringify(t)})}(e,t),l=function(e,t,a){let r=`${e}${t}`;return a&&(r+=`?clientKey=${a}`),r}(n,i,o);return h(l,s).then((t=>{if(t.ok)return t[a]();const n=e.errorMessage||`Service at ${l} is not available`;return e.errorHandler?e.errorHandler(t[a]()):v(n,r)})).catch((t=>v(e.errorMessage||`Call to ${l} failed. Error= ${t}`,r)))}function N(e,t){return _(Object.assign(Object.assign({},e),{method:"GET"}),t)}function O(e,t){return _(Object.assign(Object.assign({},e),{method:"POST"}),t)}function I(e,t,a,r){const n=y(a),i=n.getDataset(e);if(i)return new Promise((e=>e(i)));return N({loadingContext:t,errorLevel:"warn",errorMessage:`Dataset ${e} is not available`,path:a?`datasets/${e}/${a}`:`datasets/${e}`,clientKey:r}).then((t=>(n.setDataset(e,t),t)))}const E=e=>e.toLowerCase().substring(0,2);function T(e){const t=e.replace("_","-");if(new RegExp("([a-z]{2})([-])([A-Z]{2})").test(t))return t;const[a,r]=t.split("-");if(!a||!r)return null;const n=[a.toLowerCase(),r.toUpperCase()].join("-");return 5===n.length?n:null}function A(e,t=[]){if(!e||e.length<1||e.length>5)return s;const a=T(e);return t.indexOf(a)>-1?a:function(e,t){return e&&"string"==typeof e&&t.find((t=>E(t)===E(e)))||null}(a||e,t)}const S=(e,t)=>e.replace(/%{(\w+)}/g,((e,a)=>{var r,n;return null!==(n=null===(r=t[a])||void 0===r?void 0:r.toString())&&void 0!==n?n:""}));class C{constructor(){this.translations=l}get(e,t){const a=((e,t,a={values:{},count:0})=>{const r=`${t}__plural`,n=e=>`${t}__${e}`;return Object.prototype.hasOwnProperty.call(e,n(a.count))?S(e[n(a.count)],a.values):Object.prototype.hasOwnProperty.call(e,r)&&a.count>1?S(e[r],a.values):Object.prototype.hasOwnProperty.call(e,t)?S(e[t],a.values):null})(this.translations,e,t);return null!==a?a:e}date(e,t={}){return new Date(e).toLocaleDateString(this.locale,Object.assign({year:"numeric",month:"2-digit",day:"2-digit"},t))}initialize({customTranslations:e={},locale:t=s,allowedLocales:a=[],loadingContext:r,clientKey:n}){return o(this,void 0,void 0,(function*(){this.customTranslations=function(e={},t){return Object.keys(e).reduce(((a,r)=>{const n=T(r)||A(r,t);return n&&(a[n]=e[r]),a}),{})}(e,a);const i=Object.keys(this.customTranslations);this.supportedLocales=[...a,...i].filter(((e,t,a)=>a.indexOf(e)===t)),this.locale=T(t)||A(t,this.supportedLocales),yield this.loadTranslations({locale:this.locale,loadingContext:r,clientKey:n})}))}loadTranslations({locale:e=this.locale,loadingContext:t,clientKey:a}){return o(this,void 0,void 0,(function*(){let r;!this.supportedLocales.includes(e)&&(e=s),r=e===s?Object.assign(Object.assign({},l),!!this.customTranslations[e]&&this.customTranslations[e]):yield(({locale:e,loadingContext:t,clientKey:a,customTranslations:r={}})=>o(void 0,void 0,void 0,(function*(){let n={};try{n=yield I(g,t,e,a)}catch(e){console.error(e)}return Object.assign(Object.assign(Object.assign({},l),n),!!r[e]&&r[e])})))({locale:e,loadingContext:t,clientKey:a,customTranslations:this.customTranslations});const n=(e=>{if(!e)return"";const[t]=e.split("-");return t})(e);return this.locale=e,this.translations=r,this.languageCode=n,r}))}}var R=0;function D(e,a,r,n,i){var o,s,l={};for(s in a)"ref"==s?o=a[s]:l[s]=a[s];var d={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--R,__source:i,__self:n};if("function"==typeof e&&(o=e.defaultProps))for(s in o)void 0===l[s]&&(l[s]=o[s]);return t.options.vnode&&t.options.vnode(d),d}class k{constructor(){this.events={},this.on=(e,t)=>{this.events[e]=this.events[e]||[],this.events[e].push(t)},this.off=(e,t)=>{this.events[e]&&(this.events[e]=this.events[e].reduce(((e,a)=>(a!==t&&e.push(a),e)),[]))},this.emit=(e,t)=>{this.events[e]&&this.events[e].forEach((e=>{e(t)}))}}}function L(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}class w{constructor(e){this._id=`${this.constructor.type}-${L()}`,this.eventEmitter=new k,this._resizeObserver=null,this.props=this.formatProps(Object.assign(Object.assign({},this.constructor.defaultProps),e)),this._parentInstance=this.props._parentInstance,this._node=null,this.state={}}formatProps(e){return e}formatData(){return{}}setState(e){this.state=Object.assign(Object.assign({},this.state),e)}get data(){return Object.assign({},this.formatData())}render(){throw new Error("Kyc Forms cannot be rendered")}observeContainerSize(e){window.ResizeObserver&&(this._resizeObserver=new ResizeObserver((t=>{this.assignLayout(t,e)})),this._resizeObserver.observe(e))}assignLayout(e,t){return null}mount(e){const a="string"==typeof e?document.querySelector(e):e;if(!a)throw new Error("Component could not mount. Root node was not found.");if(this._node)throw new Error("Component is already mounted.");return this._node=a,this._component=this.render(),this.observeContainerSize(a),t.render(this._component,a),this}update(e){return this.props=this.formatProps(Object.assign(Object.assign({},this.props),e)),this.state={},this.unmount().remount()}updateLocale(e){this.eventEmitter.emit("updateLocale",e)}remount(e){if(!this._node)throw new Error("Component is not mounted.");const a=e||this.render();return t.render(a,this._node,null),this}unmount(){return this._node&&t.render(null,this._node),this._resizeObserver&&(this._resizeObserver=this._resizeObserver.disconnect()),this}remove(){this.unmount(),this._parentInstance&&this._parentInstance.remove(this)}}w.defaultProps={};var P=new class{constructor(){return this.queue=[],this.subscriptions=new Set,this}add(...e){this.queue.push(...e)}notifySubscribers(){for(;this.queue.length>0;){const e=this.queue.pop();this.subscriptions.forEach((t=>t(e)))}}addEvent(e,t){this.add(["add_event",Object.assign({key:e},t)]),this.notifySubscribers()}addPageView(e){this.add(["track_pageview",e]),this.notifySubscribers()}startEvent(e){this.add(["start_event",e]),this.notifySubscribers()}endEvent(e,t){this.add(["end_event",t?Object.assign({key:e},t):e]),this.notifySubscribers()}subscribe(e){this.subscriptions.add(e)}unsubscribe(e){this.subscriptions.has(e)&&this.subscriptions.delete(e)}};class j extends w{constructor(e){super(e),e.onUserEvent&&P.subscribe(e.onUserEvent),this.submit=this.submit.bind(this),this.setState=this.setState.bind(this),this.onValid=this.onValid.bind(this),this.onComplete=this.onComplete.bind(this),this.elementRef=e&&e.elementRef||this}setState(e){this.state=Object.assign(Object.assign({},this.state),e),this.onChange()}onChange(){const e=this.isValid,t={data:this.data,errors:this.state.errors,valid:this.state.valid,isValid:e};return this.props.onChange&&this.props.onChange(t,this.elementRef),e&&this.onValid(),t}onValid(){const e={data:this.data};return this.props.onValid&&this.props.onValid(e,this.elementRef),e}submit(){const{onSubmit:e=(()=>{})}=this.props,{data:t,isValid:a}=this;return a?e({data:t,isValid:a},this.elementRef):(this.showValidation(),!1)}onComplete(e){this.props.onComplete&&this.props.onComplete(e,this.elementRef)}showValidation(){return this.componentRef&&this.componentRef.showValidation&&this.componentRef.showValidation(),this}setStatus(e){return this.componentRef&&this.componentRef.setStatus&&this.componentRef.setStatus(e),this}get isValid(){return!1}get displayName(){return this.props.name||this.constructor.type}}const x=t.createContext({i18n:new C,translations:null,setLocale:null,loadingContext:"",clientKey:"",setContextCountry:null,contextCountry:"",setPayoutDefaultCurrency:null,payoutDefaultCurrency:"",commonProps:{},isReview:!1,isLegalEntityPartOfTrust:!1,setIsLegalEntityPartOfTrust:null,setAccountHolder:null,accountHolder:""}),M=e=>{const t=`${`${e}static/fonts`}/adyen-kyc-icons`;((e,t,a,r,n)=>{const i=document.createElement("style");i.setAttribute("type","text/css"),i.innerText=((e,t,a,r,n)=>{const i=[`font-family: '${e}'`,`font-style: ${t}`,`font-weight: ${a}`,`src: url(${r})`],o=[];return n.eot&&o.push(`url(${n.eot}) format('embedded-opentype')`),n.woff&&o.push(`url(${n.woff}) format('woff')`),n.woff2&&o.push(`url(${n.woff2}) format('woff2')`),n.ttf&&o.push(`url(${n.ttf}) format('truetype')`),n.otf&&o.push(`url(${n.otf}) format('opentype')`),o.length>0&&i.push("src: "+o.join(",")+";"),`@font-face {${i.join(";")}}`})(e,t,a,r,n),document.body.insertBefore(i,document.body.firstChild)})("adyen-kyc-icons","normal","normal",`${t}.eot`,{eot:`${t}.eot`,woff:`${t}.woff`,woff2:`${t}.woff2`,ttf:`${t}.ttf`,otf:`${t}.otf`})};function F(e){return"object"==typeof e&&null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function V(...e){const t=F(e[0])?e[0]:e;return{from:e=>t.map((t=>t in e?{[t]:e[t]}:{})).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})}}function U(...e){const t=F(e[0])?e[0]:e;return{from:e=>{const a=Object.keys(e).filter((e=>!t.includes(e)));return V(...a).from(e)}}}function B(e,t){return e.length===t.length&&e.every((function(e){return t.includes(e)}))}const W=(e,t)=>{const a=typeof e;return e&&t&&"object"===a&&a===typeof t?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every((a=>W(e[a],t[a]))):e===t};function H(e){return structuredClone(e)}function q(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e])))}function G(e,{type:t="conjunction",style:a="long",stringify:r=(e=>e.toString())}={}){const n=e.map((e=>r(e)));return new Intl.ListFormat("en",{style:a,type:t}).format(n)}const $=()=>{};function X({loadingContext:e,clientKey:t,country:a,capabilities:r,legalEntityType:n}){return O({loadingContext:e,errorLevel:"warn",errorMessage:"Configuration is not available",path:"v1/configuration",clientKey:t},{capabilities:r,country:a,legalEntityType:n})}class Y extends t.Component{constructor(){super(...arguments),this.state={loaded:!1,contextCountry:this.props.contextCountry,payoutDefaultCurrency:"",i18n:this.props.i18n,isLegalEntityPartOfTrust:!1,accountHolder:""},this.setContextCountry=e=>{this.setState({contextCountry:e})},this.setPayoutDefaultCurrency=e=>{this.setState({payoutDefaultCurrency:e})},this.setLocale=({locale:e})=>{var t;this.setState({loaded:!1});const a=null===(t=this.state.i18n)||void 0===t?void 0:t.locale;this.props.i18n.loadTranslations({locale:e,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey}).then((()=>{P.addEvent("Changed page language",{segmentation:{originalLanguage:a,newLanguage:e}}),this.setState({loaded:!0})}))},this.setIsLegalEntityPartOfTrust=e=>this.setState({isLegalEntityPartOfTrust:e}),this.setAccountHolder=e=>{this.setState({accountHolder:e})}}componentDidMount(){return o(this,void 0,void 0,(function*(){const{contextCountry:e,locale:t,loadingContext:a,clientKey:r}=this.props;M(a);try{let n=t;const{locales:i=[]}=yield function({loadingContext:e,clientKey:t}){return N({loadingContext:e,errorLevel:"warn",errorMessage:"Locales configuration is not available",path:"v1/configuration/locales",clientKey:t})}({loadingContext:a,clientKey:r}),{countries:o=[]}=yield function({loadingContext:e,clientKey:t}){return N({loadingContext:e,errorLevel:"warn",errorMessage:"Countries configuration is not available",path:"v1/configuration/countries",clientKey:t})}({loadingContext:a,clientKey:r});if(o&&!o.includes(e))throw new Error(`\n\n"${e}" isn't a supported country. Please use one of the following:\n- ${G(o)}.\n `);i&&!i.includes(t)&&(console.error(`\n"${t}" isn't a supported locale. Please use one of the following:\n- ${G(i)}. falling back to "${s}"`),n=s),this.props.i18n?(yield this.props.i18n.initialize({locale:n,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,customTranslations:this.props.translations,allowedLocales:i}),this.setState({loaded:!0})):this.setState({loaded:!0})}catch(e){console.log(e)}}))}shouldComponentUpdate(e,t){return this.state.contextCountry!==t.contextCountry||this.state.payoutDefaultCurrency!==t.payoutDefaultCurrency||!1===this.state.loaded||this.state.isLegalEntityPartOfTrust!==t.isLegalEntityPartOfTrust||this.state.accountHolder!==t.accountHolder}render({children:e}){return this.state.loaded?D(x.Provider,Object.assign({value:{i18n:this.state.i18n,setLocale:this.setLocale,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,translations:this.props.translations,setContextCountry:this.setContextCountry,contextCountry:this.state.contextCountry,setPayoutDefaultCurrency:this.setPayoutDefaultCurrency,payoutDefaultCurrency:this.state.payoutDefaultCurrency,commonProps:this.props.commonProps||{},isReview:this.props.isReview,isLegalEntityPartOfTrust:this.state.isLegalEntityPartOfTrust,setIsLegalEntityPartOfTrust:this.setIsLegalEntityPartOfTrust,setAccountHolder:this.setAccountHolder,accountHolder:this.state.accountHolder}},{children:t.toChildArray(e)})):null}}var K,z,Z,Q,J=0,ee=[],te=[],ae=t.options.__b,re=t.options.__r,ne=t.options.diffed,ie=t.options.__c,oe=t.options.unmount;function se(e,a){t.options.__h&&t.options.__h(z,e,J||a),J=0;var r=z.__H||(z.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:te}),r.__[e]}function le(e){return J=1,de(Oe,e)}function de(e,t,a){var r=se(K++,2);if(r.t=e,!r.__c&&(r.__=[a?a(t):Oe(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],a=r.t(t,e);t!==a&&(r.__N=[a,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var n=z.shouldComponentUpdate;z.shouldComponentUpdate=function(e,t,a){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!n||n.call(this,e,t,a);var o=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&r.__c.props===e)&&(!n||n.call(this,e,t,a))}}return r.__N||r.__}function ce(e,a){var r=se(K++,3);!t.options.__s&&Ne(r.__H,a)&&(r.__=e,r.i=a,z.__H.__h.push(r))}function ue(e,a){var r=se(K++,4);!t.options.__s&&Ne(r.__H,a)&&(r.__=e,r.i=a,z.__h.push(r))}function me(e){return J=5,pe((function(){return{current:e}}),[])}function pe(e,t){var a=se(K++,7);return Ne(a.__H,t)?(a.__V=e(),a.i=t,a.__h=e,a.__V):a.__}function ge(e,t){return J=8,pe((function(){return e}),t)}function ye(e){var t=z.context[e.__c],a=se(K++,9);return a.c=e,t?(null==a.__&&(a.__=!0,t.sub(z)),t.props.value):e.__}function be(){for(var e;e=ee.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ve),e.__H.__h.forEach(_e),e.__H.__h=[]}catch(a){e.__H.__h=[],t.options.__e(a,e.__v)}}t.options.__b=function(e){z=null,ae&&ae(e)},t.options.__r=function(e){re&&re(e),K=0;var t=(z=e.__c).__H;t&&(Z===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=te,e.__N=e.i=void 0}))):(t.__h.forEach(ve),t.__h.forEach(_e),t.__h=[])),Z=z},t.options.diffed=function(e){ne&&ne(e);var a=e.__c;a&&a.__H&&(a.__H.__h.length&&(1!==ee.push(a)&&Q===t.options.requestAnimationFrame||((Q=t.options.requestAnimationFrame)||he)(be)),a.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==te&&(e.__=e.__V),e.i=void 0,e.__V=te}))),Z=z=null},t.options.__c=function(e,a){a.some((function(e){try{e.__h.forEach(ve),e.__h=e.__h.filter((function(e){return!e.__||_e(e)}))}catch(r){a.some((function(e){e.__h&&(e.__h=[])})),a=[],t.options.__e(r,e.__v)}})),ie&&ie(e,a)},t.options.unmount=function(e){oe&&oe(e);var a,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{ve(e)}catch(e){a=e}})),r.__H=void 0,a&&t.options.__e(a,r.__v))};var fe="function"==typeof requestAnimationFrame;function he(e){var t,a=function(){clearTimeout(r),fe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(a,100);fe&&(t=requestAnimationFrame(a))}function ve(e){var t=z,a=e.__c;"function"==typeof a&&(e.__c=void 0,a()),z=t}function _e(e){var t=z;e.__c=e.__(),z=t}function Ne(e,t){return!e||e.length!==t.length||t.some((function(t,a){return t!==e[a]}))}function Oe(e,t){return"function"==typeof t?t(e):t}const Ie=["street","houseNumberOrName","postalCode","city","stateOrProvince","country"],[Ee,Te,Ae,Se,Ce,Re]=Ie,De=["BR","CA","US","AU"],ke=["US","GB"],Le={CA:[Re,Ee,Te,Se,Ae,Ce],GB:[Re,Te,Ee,Se,Ae,Ce],US:[Re,Ee,Te,Se,Ce,Ae],AU:[Re,Ee,Se,Ce,Ae],default:[Re,Ee,Te,Ae,Se,Ce]},we={city:{GB:"cityTown",default:Se},country:{default:Re},houseNumberOrName:{CA:"apartmentSuite",US:"apartmentSuiteOptional",GB:"houseNumberOptional",default:"houseNumber"},postalCode:{US:"zipCode",default:Ae},stateOrProvince:{BR:"state",CA:"provinceOrTerritory",US:"state",AU:"state",default:Ce},stateOrProvincePlaceholder:{BR:"selectState",CA:"selectProvinceOrTerritory",US:"selectState",AU:"selectState",default:"selectStateOrProvince"},street:{CA:"address",US:"address",AU:"address",default:Ee}},Pe=(e,t)=>we[e][t]||we[e].default,je=(e,t)=>{const a=e.country;return a?Object.entries(e).reduce(((e,[r,n])=>{const i=Pe(r,a);return e[i]="country"===r?t.getCountryName(n):"stateOrProvince"===r?t.getStateName(n,a):n,e}),{}):e},xe=({inline:e=!1,size:t="large"})=>D("div",Object.assign({className:"adyen-kyc-spinner__wrapper "+(e?"adyen-kyc-spinner__wrapper--inline":"")},{children:D("div",{className:`adyen-kyc-spinner adyen-kyc-spinner--${t}`})})),Me=({className:e="",name:t})=>D("i",{className:a("adyen-kyc-icon",`adyen-kyc-icon-${t}`,e),role:"img","aria-hidden":!0}),Fe="-ariaError";let Ve=Date.now();const Ue=(e="id")=>(Ve+=1,`${e}-${Ve}`);class Be extends t.Component{constructor(e){super(e),this.state={focused:!1},this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.uniqueId=Ue(`adyen-kyc-${this.props.name}`)}onFocus(e){this.setState({focused:!0},(()=>{this.props.onFocus&&this.props.onFocus(e)}))}onBlur(e){this.setState({focused:!1},(()=>{this.props.onBlur&&this.props.onBlur(e),this.props.onFieldBlur&&this.props.onFieldBlur(e)}))}static getDerivedStateFromProps(e,t){return void 0!==e.focused&&e.focused!==t.focused?{focused:e.focused}:void 0!==e.filled&&e.filled!==t.filled?{filled:e.filled}:null}renderContent({name:e,children:r,errorMessage:n,helper:i,inputWrapperModifiers:o,isLoading:s,isValid:l,label:d}){return D(t.Fragment,{children:["string"==typeof d&&D("span",Object.assign({className:a({"adyen-kyc-label__text":!0,"adyen-kyc-label__text--error":n})},{children:d})),"function"==typeof d&&d(),i&&D("span",Object.assign({className:"adyen-kyc-helper-text"},{children:i})),D("div",Object.assign({className:a(["adyen-kyc-input-wrapper",...o.map((e=>`adyen-kyc-input-wrapper--${e}`))])},{children:[t.toChildArray(r).map((a=>{const r=Object.assign({isValid:l,onFocusHandler:this.onFocus,onBlurHandler:this.onBlur,isInvalid:!!n},e&&{uniqueId:this.uniqueId});return t.cloneElement(a,r)})),s&&D("span",Object.assign({className:"adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--loading"},{children:D(xe,{size:"small"})})),l&&D("span",Object.assign({className:"adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--valid"},{children:D(Me,{name:"check"})})),n&&D("span",Object.assign({className:"adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--invalid"},{children:D(Me,{name:"field-error"})}))]})),n&&n.length&&D("span",Object.assign({className:"adyen-kyc-error-text","aria-live":"polite",id:`${this.uniqueId}${Fe}`},{children:n}))]})}render({name:e,className:t="",classNameModifiers:r=[],children:n,errorMessage:i,helper:o,inputWrapperModifiers:s=[],isLoading:l,isValid:d,label:c,useLabelElement:u=!0,dataPlaceholder:m}){return D("div",Object.assign({className:a("adyen-kyc-field",t,r.map((e=>`adyen-kyc-field--${e}`)),{"adyen-kyc-field--error":i,"adyen-kyc-field--valid":d}),"data-placeholder":m},{children:D(We,Object.assign({onFocusField:this.props.onFocusField,name:e,disabled:this.props.disabled,filled:this.state.filled,focused:this.state.focused,useLabelElement:u,uniqueId:this.uniqueId},{children:this.renderContent({name:e,children:n,errorMessage:i,helper:o,inputWrapperModifiers:s,isLoading:l,isValid:d,label:c})}))}))}}const We=({onFocusField:e,focused:t,filled:r,disabled:n,name:i,uniqueId:o,useLabelElement:s,children:l})=>{const d={onClick:e,className:a({"adyen-kyc-label":!0,"adyen-kyc-label--focused":t,"adyen-kyc-label--filled":r,"adyen-kyc-label--disabled":n})};return s?D("label",Object.assign({},d,{htmlFor:i&&o},{children:l})):D("div",Object.assign({},d,{role:"form"},{children:l}))},He=()=>ye(x);var qe="Select-module_adyen-kyc-dropdown__e1hdP",Ge="Select-module_adyen-kyc-dropdown-button__FdX-b",$e="Select-module_adyen-kyc-dropdown-button--active__AGNoA",Xe="Select-module_adyen-kyc-filter-input__4JVhc",Ye="Select-module_adyen-kyc-dropdown-list__9PypK",Ke="Select-module_adyen-kyc-dropdown-list--active__lE-9R",ze="Select-module_adyen-kyc-dropdown-element__v4sS7";const Ze=({className:e,isBasic:t=!1,children:r})=>{const n=a("adl-tag",e,{"adl-tag--basic":t});return D("span",Object.assign({className:n},{children:r}))},Qe=({inline:e=!1,size:t="large",dot:r=!1})=>D("div",Object.assign({className:"adl-loader__wrapper "+(e?"adl-loader__wrapper--inline":"")},{children:D("div",{className:a("adl-loading-indicator",`adl-loading-indicator--${t}`,{"adl-loading-indicator--dot":r})})}));function Je(e){var{filterable:t,isMulti:a,toggleButtonRef:r,isSearch:n}=e,o=i(e,["filterable","isMulti","toggleButtonRef","isSearch"]);return D(t||a||n?"div":"button",Object.assign({},o,{ref:r}))}function et({active:e,readonly:t,showList:r,isInvalid:n,isValid:i,toggleList:o,onButtonKeyDown:s,filterable:l,placeholder:d,toggleButtonRef:c,ariaDescribedBy:u,selectListId:m,filterInputRef:p,onInput:g,isMulti:y,id:b,isSearch:f,loading:h,textFilter:v}){return D(Je,Object.assign({"aria-disabled":t,"aria-expanded":r,"aria-haspopup":"listbox",className:a({"adyen-kyc-dropdown-button":!0,[Ge]:!0,"adyen-kyc-dropdown-button--readonly":t,"adyen-kyc-dropdown-button--active":r,[$e]:r,"adyen-kyc-dropdown-button--invalid":n,"adyen-kyc-dropdown-field--valid":i,"adyen-kyc-dropdown-button-search":f}),filterable:l,onClick:t?null:o,onKeyDown:t?null:s,role:l||y?"button":null,tabIndex:"0",title:e.join(",")||d,toggleButtonRef:c,type:l||y?null:"button","aria-describedby":u,isMulti:y,id:b,isSearch:f},{children:y?D(at,{active:e,placeholder:d}):D(tt,{active:e,placeholder:d,selectListId:m,showList:r,filterInputRef:p,filterable:l,onInput:g,isSearch:f,loading:h,textFilter:v})}))}const tt=({active:e,placeholder:r,selectListId:n,showList:i,filterInputRef:o,filterable:s,onInput:l,isSearch:d,loading:c,textFilter:u})=>{const m=e.pop();return D(t.Fragment,i&&s?{children:[d&&D(Me,{name:"search",className:"adyen-kyc-dropdown-button-search__icon"}),D("input",{"aria-autocomplete":"list","aria-controls":n,"aria-expanded":i,"aria-owns":n,autoComplete:"off",className:a("adyen-kyc-filter-input",[Xe]),onInput:l,placeholder:r,ref:o,role:"combobox",type:"text",value:u}),d&&c&&D(Qe,{size:"xsmall",dot:!0})]}:{children:[(null==m?void 0:m.sprite)&&D("svg",Object.assign({className:"adyen-kyc-dropdown-button__icon",role:"img"},{children:D("use",{href:m.sprite})})),d&&D(Me,{name:"search",className:"adyen-kyc-dropdown-button-search__icon"}),D("span",Object.assign({className:a("adyen-kyc-dropdown-button__text",{"adyen-kyc-dropdown-button__text--placeholder":!m})},{children:(null==m?void 0:m.selectedOptionName)||(null==m?void 0:m.name)||u||r}))]})},at=({active:e,placeholder:t})=>e&&e.length>0?D("div",Object.assign({className:"adyen-kyc-dropdown-selected-items"},{children:e.map(((e,a)=>D(Ze,Object.assign({className:e.className,isBasic:!0},{children:(null==e?void 0:e.selectedOptionName)||(null==e?void 0:e.name)||t}),a)))})):D("span",Object.assign({className:"adyen-kyc-dropdown-button__text"},{children:t}));function rt(e){var{classNameModifiers:t=[],label:r,isInvalid:n,onChange:o,helper:s}=e,l=i(e,["classNameModifiers","label","isInvalid","onChange","helper"]);return D("label",Object.assign({className:"adyen-kyc-checkbox"},{children:[D("input",Object.assign({},l,{className:a(["adyen-kyc-checkbox__input",[l.className],{"adyen-kyc-checkbox__input--invalid":n},t.map((e=>`adyen-kyc-input--${e}`))]),type:"checkbox",onChange:o})),D("span",Object.assign({className:"adyen-kyc-checkbox__label"},{children:r})),s&&D("span",Object.assign({className:"adyen-kyc-checkbox__helper-text"},{children:s}))]}))}rt.defaultProps={onChange:()=>{}};const nt=e=>{var{item:r,selected:n,isMulti:o,isSearch:s,children:l}=e,d=i(e,["item","selected","isMulti","isSearch","children"]);return D("li",Object.assign({"aria-disabled":!!r.disabled,"aria-selected":n,className:a(["adyen-kyc-dropdown-element",ze,{"adyen-kyc-dropdown-element--active":n,"adyen-kyc-dropdown-element--disabled":!!r.disabled,"adyen-kyc-dropdown-multi-element":o,"adyen-kyc-dropdown-element-description":!o&&!s&&r.description,"adyen-kyc-dropdown-search-element":s}]),"data-disabled":!!r.disabled,"data-value":r.id,onClick:d.onSelect,onKeyDown:d.onKeyDown,role:"option",tabIndex:-1},{children:o?D(rt,{label:r.name,helper:null==r?void 0:r.description,checked:n,name:`adyen-kyc-dropdown-element__checkbox adyen-kyc-dropdown-element__checkbox--${r.id}`}):l?[l]:D(t.Fragment,{children:[r.sprite?D("svg",Object.assign({className:"adyen-kyc-dropdown-element__icon",role:"img"},{children:D("use",{href:r.sprite})})):r.icon&&D("img",{className:"adyen-kyc-dropdown-element__icon",alt:r.name,src:r.icon}),r.description?D(t.Fragment,{children:[D("span",Object.assign({className:"adyen-kyc-dropdown-element__label adl-u-font-weight-semi-bold"},{children:r.name})),D("span",Object.assign({className:"adyen-kyc-dropdown-element-description__text"},{children:r.description}))]}):D("span",Object.assign({className:"adyen-kyc-dropdown-element__label"},{children:r.name}))]})}))};function it(e){var{active:t,items:r,showList:n,textFilter:o,isMulti:s,showAbove:l,isSearch:d,loading:c,getSearchItem:u}=e,m=i(e,["active","items","showList","textFilter","isMulti","showAbove","isSearch","loading","getSearchItem"]);const{i18n:p}=He(),g=r.filter((e=>{var t;return d?e:!o||(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes(o))})),[y,b]=le([]);return ce((()=>{b(g.map((e=>D(nt,Object.assign({item:e,onKeyDown:m.onKeyDown,onSelect:m.onSelect,selected:!!t.find((t=>t.id===e.id)),isMulti:s,isSearch:d},{children:u&&u(e)}),e.id))))}),[g.length,null==t?void 0:t.length,r]),D("ul",Object.assign({className:a({test:!0,"adyen-kyc-dropdown-list--above":l,"adyen-kyc-dropdown-list":!0,[Ye]:!0,"adyen-kyc-dropdown-list--active":n,[Ke]:n}),id:m.selectListId,ref:m.selectListRef,role:"listbox"},{children:c?D("div",Object.assign({className:"adyen-kyc-dropdown-element adyen-kyc-dropdown-element--no-options"},{children:p.get("loading")})):d&&(!o||o.length<3)?null:y.length?y:D("div",Object.assign({className:"adyen-kyc-dropdown-element adyen-kyc-dropdown-element--no-options"},{children:p.get("noOptionsFound")}))}))}const ot=e=>{const t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return e?"visible"!==t&&"hidden"!==t?e:ot(e.parentNode)||document.body:-1},st={arrowDown:"ArrowDown",arrowUp:"ArrowUp",enter:"Enter",escape:"Escape",space:" ",tab:"Tab"},lt="30_102";function dt(e,t=20){let a;return(...r)=>{clearTimeout(a),a=setTimeout((()=>e(...r)),t)}}const ct=({items:e=[],className:t="",classNameModifiers:r=[],filterable:n=!0,readonly:i=!1,onChange:o,selected:s,name:l,isInvalid:d=!1,isValid:c,placeholder:u,showInlineErrors:m,isMulti:p,uniqueId:g,showSelectedItemsAsTags:y=!1,isSearch:b=!1,onSearch:f=(()=>{}),resetSearch:h=!1,loading:v=!1,getSearchItem:_,searchText:N,showSearchList:O})=>{const I=me(null),E=me(null),T=me(null),A=me(null),[S,C]=le(null),[R,k]=le(!1),w=pe((()=>`select-${L()}`),[]),P=e.filter((e=>p?null==s?void 0:s.includes(e.id):e.id===s))||[],[j,x]=le(!1),[M,F]=le(null),V=()=>{C(null),k(!1),T.current&&T.current.focus()},U=e=>{e.preventDefault();const t=A.current.contains(e.currentTarget)?e.currentTarget:A.current.firstElementChild,a="true"===t.getAttribute("data-disabled");if(!i&&!a){const e=t.getAttribute("data-value");if(p){const t=P.find((t=>t.id===e))?[...P.filter((t=>t.id!==e)).map((e=>e.id))]:[...P.map((e=>e.id)),e];o({target:{value:t,name:l}})}else V(),o({target:{value:e,name:l}})}},B=()=>{let e=M;if(e||(e=ot(T.current),F(e)),-1!==e){const{bottom:t}=e.getBoundingClientRect(),{bottom:a}=T.current.getBoundingClientRect();x(!(t-a>145))}k(!0)},W=e=>{E.current.contains(e.target)||k(!1)};return ce((()=>{h&&C("")}),[h]),ce((()=>{C(N)}),[N]),ce((()=>{R&&n&&I.current&&I.current.focus()}),[R]),ce((()=>{k(O)}),[O]),ce((()=>(document.addEventListener("click",W,!0),()=>{document.removeEventListener("click",W,!0)})),[]),D("div",Object.assign({className:a(["adyen-kyc-dropdown",qe,t,...r.map((e=>`adyen-kyc-dropdown--${e}`))]),ref:E},{children:[D(et,{id:null!=g?g:null,active:P,filterInputRef:I,filterable:n,isInvalid:d,isValid:c,onButtonKeyDown:e=>{var t;if(e.key===st.enter&&n&&R&&S){const t=e.target.value;(b&&t.length>2||!b)&&(U(e),B())}else e.key===st.escape?V():![st.arrowUp,st.arrowDown,st.enter].includes(e.key)&&(e.key!==st.space||n&&R)?(e.shiftKey&&e.key===st.tab||e.key===st.tab)&&V():(e.preventDefault(),B(),(null===(t=A.current)||void 0===t?void 0:t.firstElementChild)&&A.current.firstElementChild.focus())},onInput:e=>{const t=e.target.value;b&&t.length>2&&dt(f(t),500),C(t.toLowerCase())},placeholder:u,readonly:i,selectListId:w,showList:R,toggleButtonRef:T,toggleList:e=>{e.preventDefault(),R?k(!1):B()},ariaDescribedBy:m&&g?`${g}${Fe}`:null,isMulti:p,showSelectedItemsAsTags:y,isSearch:b,loading:v,textFilter:S}),D(it,{active:P,items:e,onKeyDown:e=>{const t=e.target;switch(e.key){case st.escape:e.preventDefault(),V();break;case st.space:case st.enter:U(e);break;case st.arrowDown:e.preventDefault(),t.nextElementSibling&&t.nextElementSibling.focus();break;case st.arrowUp:e.preventDefault(),t.previousElementSibling?t.previousElementSibling.focus():n&&I.current&&I.current.focus();break;case st.tab:V()}},onSelect:U,selectListId:w,selectListRef:A,showList:R,textFilter:S,isMulti:p,showAbove:j,isSearch:b,getSearchItem:_,loading:v})]}))},ut=e=>{const{i18n:a}=He(),[r,n]=le([]),[i,s]=le(!1),{handleChangeFor:l,data:d,autocompleteAddressForm:c}=e,[u,m]=le(!1),[p,g]=le(null),[y,b]=le(!1);ce((()=>{n([]),m(!0)}),[d.country]);const f=(e,t)=>{const a=[];let r=0;return""===e[0]?[t]:(e.forEach((e=>{const n=e.split("-"),i=parseInt(n[0]),o=parseInt(n[1]);if(r<i){const e=t.substring(r,i);a.push(`${e}`)}const s=t.substring(i,o);a.push(D("span",Object.assign({className:"adyen-kyc-dropdown-search-element__description--highlight"},{children:s}))),r=o})),r<t.length&&a.push(`${t.substring(r)}`),a)},h=e=>{const{text:t,highlight:a,description:r}=e;let n=[];if(""===a)r?n.push(`${t}, ${r}`):n.push(t);else{const e=a.split(";");n=f(e[0].split(","),t),e.length>1?(n.push(", "),n.push(f(e[1].split(","),r))):r&&n.push(`, ${r}`)}return n};return D(Be,Object.assign({name:"searchAddress",className:"adl-u-margin-bottom-8",label:a.get("searchAddress")},{children:D(ct,{onChange:t=>{const a=t.target.value;l("searchAddress","blur")(a),m(!1),s(!0);const i=r.filter((e=>e.id===a))[0];"Address"===i.type?((t=>{o(void 0,void 0,void 0,(function*(){try{const a=yield e.handleFindAddress(t);c(a)}catch(e){console.error(e)}}))})(i.id),g(`${i.text} ${i.description}`),b(!1)):((t=>{o(void 0,void 0,void 0,(function*(){try{const a=yield e.handleAddressSearch({text:t.text,country:d.country,container:t.id},e.legalEntityId);n((null==a?void 0:a.results)||[])}catch(e){console.error(e)}}))})(i),g(`${i.text}`),b(!0)),s(!1)},name:"searchAddress",placeholder:a.get("startTypingTheAddress"),selected:d.searchAddress,items:r,isSearch:!0,resetSearch:u,onSearch:t=>o(void 0,void 0,void 0,(function*(){if(t){s(!0);try{const a=yield e.handleAddressSearch({text:t,country:d.country},e.legalEntityId);if(null==a?void 0:a.results){const e=a.results.map((e=>(e=>{if(e.description.includes("Addresses")){const t=e.description.split(" - ");return 1===t.length?Object.assign(Object.assign({},e),{description:void 0,addressAmount:t[0].replace("Addresses","")}):Object.assign(Object.assign({},e),{description:t[0],addressAmount:t[1].replace("Addresses","")})}return e})(e)));n(e)}else n([])}catch(e){console.error(e)}s(!1)}else n([])})),loading:i,getSearchItem:e=>D(t.Fragment,{children:[D("span",Object.assign({className:"adyen-kyc-dropdown-search-element__description"},{children:h(e)})),e.addressAmount&&D("div",Object.assign({className:"adyen-kyc-dropdown-search-element__addresses"},{children:[e.addressAmount," ",D("span",Object.assign({className:"adyen-kyc-dropdown-search-element__addresses--text"},{children:[" ",a.get("addresses")]})),D(Me,{name:"arrow-right",className:"adyen-kyc-dropdown-search-element__addresses--icon"})]}))]}),isInvalid:!1,searchText:p,showSearchList:y})}))},mt=e=>e.replace(/[\uff01-\uff5e]/g,(e=>String.fromCharCode(e.charCodeAt(0)-65248)));function pt(e,t){for(var a in t)e[a]=t[a];return e}function gt(e,t){for(var a in e)if("__source"!==a&&!(a in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function yt(e){this.props=e}function bt(e,a){function r(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),a?!a(this.props,e)||!r:gt(this.props,e)}function n(a){return this.shouldComponentUpdate=r,t.createElement(e,a)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(yt.prototype=new t.Component).isPureReactComponent=!0,yt.prototype.shouldComponentUpdate=function(e,t){return gt(this.props,e)||gt(this.state,t)};var ft=t.options.__b;t.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ft&&ft(e)};var ht="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function vt(e){function t(t){var a=pt({},t);return delete a.ref,e(a,t.ref||null)}return t.$$typeof=ht,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var _t=t.options.__e;t.options.__e=function(e,t,a,r){if(e.then)for(var n,i=t;i=i.__;)if((n=i.__c)&&n.__c)return null==t.__e&&(t.__e=a.__e,t.__k=a.__k),n.__c(e,t);_t(e,t,a,r)};var Nt=t.options.unmount;function Ot(e,t,a){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=pt({},e)).__c&&(e.__c.__P===a&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ot(e,t,a)}))),e}function It(e,t,a){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return It(e,t,a)})),e.__c&&e.__c.__P===t&&(e.__e&&a.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=a)),e}function Et(){this.__u=0,this.t=null,this.__b=null}function Tt(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function At(){this.u=null,this.o=null}t.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Nt&&Nt(e)},(Et.prototype=new t.Component).__c=function(e,t){var a=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(a);var n=Tt(r.__v),i=!1,o=function(){i||(i=!0,a.__R=null,n?n(s):s())};a.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=It(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},Et.prototype.componentWillUnmount=function(){this.t=[]},Et.prototype.render=function(e,a){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Ot(this.__b,r,n.__O=n.__P)}this.__b=null}var i=a.__a&&t.createElement(t.Fragment,null,e.fallback);return i&&(i.__h=null),[t.createElement(t.Fragment,null,a.__a?null:e.children),i]};var St=function(e,t,a){if(++a[1]===a[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(a=e.u;a;){for(;a.length>3;)a.pop()();if(a[1]<a[0])break;e.u=a=a[2]}};(At.prototype=new t.Component).__a=function(e){var t=this,a=Tt(t.__v),r=t.o.get(e);return r[0]++,function(n){var i=function(){t.props.revealOrder?(r.push(n),St(t,e,r)):n()};a?a(i):i()}},At.prototype.render=function(e){this.u=null,this.o=new Map;var a=t.toChildArray(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&a.reverse();for(var r=a.length;r--;)this.o.set(a[r],this.u=[1,0,this.u]);return e.children},At.prototype.componentDidUpdate=At.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,a){St(e,a,t)}))};var Ct="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Rt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Dt="undefined"!=typeof document,kt=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};t.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(t.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Lt=t.options.event;function wt(){}function Pt(){return this.cancelBubble}function jt(){return this.defaultPrevented}t.options.event=function(e){return Lt&&(e=Lt(e)),e.persist=wt,e.isPropagationStopped=Pt,e.isDefaultPrevented=jt,e.nativeEvent=e};var xt={configurable:!0,get:function(){return this.class}},Mt=t.options.vnode;t.options.vnode=function(e){var a=e.type,r=e.props,n=r;if("string"==typeof a){var i=-1===a.indexOf("-");for(var o in n={},r){var s=r[o];Dt&&"children"===o&&"noscript"===a||"value"===o&&"defaultValue"in r&&null==s||("defaultValue"===o&&"value"in r&&null==r.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+a)&&!kt(r.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&Rt.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===s&&(s=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),n[o]&&(o="oninputCapture")),n[o]=s)}"select"==a&&n.multiple&&Array.isArray(n.value)&&(n.value=t.toChildArray(r.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==a&&null!=n.defaultValue&&(n.value=t.toChildArray(r.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),e.props=n,r.class!=r.className&&(xt.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",xt))}e.$$typeof=Ct,Mt&&Mt(e)};var Ft=t.options.__r;t.options.__r=function(e){Ft&&Ft(e),e.__c};const Vt=vt(((e,t)=>{const{autoCorrect:r,classNameModifiers:n=[],isInvalid:o,isValid:s,readonly:l=null,spellCheck:d,type:c="text",disabled:u,showInlineErrors:m,uniqueId:p}=e,g=a("adyen-kyc-input",[`adyen-kyc-input--${c}`],e.className,{"adyen-kyc-input--invalid":o,"adyen-kyc-field--valid":s,"adyen-kyc-input--disabled":u},n.map((e=>`adyen-kyc-input--${e}`))),y=i(e,["classNameModifiers","uniqueId","showInlineErrors"]);return D("input",Object.assign({ref:t,id:p},y,{type:c,className:g,readOnly:l,spellCheck:d,autoCorrect:r},u&&{"aria-disabled":!0},{"aria-describedby":m?`${p}${Fe}`:null,onInput:t=>{var a;t.target.value=mt(t.target.value),null===(a=null==e?void 0:e.onInput)||void 0===a||a.call(e,t)},onBlur:t=>{var a,r;null===(a=null==e?void 0:e.onBlurHandler)||void 0===a||a.call(e,t),e.trimOnBlur&&(t.target.value=t.target.value.trim()),null===(r=null==e?void 0:e.onBlur)||void 0===r||r.call(e,t)},onFocus:t=>{var a;null===(a=null==e?void 0:e.onFocusHandler)||void 0===a||a.call(e,t)}}))}));Vt.displayName="InputBase";const Ut=vt(((e,t)=>{var{transformInput:a,onInput:r}=e,n=i(e,["transformInput","onInput"]);const[o,s]=le(),l=me(null),d=null!=t?t:l,c=ge(a?e=>{const t=e.target,n=a(t.value);s(t.selectionStart);const i=Object.assign(Object.assign({},e),{target:Object.assign(Object.assign({},e.target),{value:n})});r(i)}:r,[a,r]);return ue((()=>{var e;null===(e=d.current)||void 0===e||e.setSelectionRange(o,o,"none")}),[o]),D(Vt,Object.assign({classNameModifiers:["large"]},n,{type:"text",onInput:r?c:void 0,ref:d}))}));Ut.displayName="InputText";const Bt=()=>{const e=document.createElement("input");return e.setAttribute("type","date"),"date"===e.type};function Wt(e){const t=pe(Bt,[]);return D(Vt,t?Object.assign({},e,{type:"date"}):Object.assign({},e,{onInput:t=>{const{value:a}=t.target;t.target.value=(e=>{const t=e.replace(/\D|\s/g,"").replace(/^(00)(.*)?/,"01$2").replace(/^(3[2-9])(.*)?/,"0$1$2").replace(/^([4-9])(.*)?/,"0$1").replace(/^([0-9]{2})(00)(.*)?/,"$101").replace(/^(3[01])(02)(.*)?/,"29$2").replace(/^([0-9]{2})([2-9]|1[3-9])(.*)?/,"$10$2").replace(/^([0-9]{2})([0-9]{2})([0-9])/,"$1/$2/$3").replace(/^([0-9]{2})([0-9])/,"$1/$2"),[a="",r="",n=""]=t.split("/");return 4===n.length&&"29"===a&&"02"===r&&(Number(n)%4!=0||"00"===n.substr(2,2)&&Number(n)%400!=0)?t.replace(/^29/,"28"):t})(a),e.onInput(t)},maxLength:10}))}function Ht(e){return D(Vt,Object.assign({},e,{type:"tel"}))}function qt(e){return D(Vt,Object.assign({},e,{type:"email",autoCapitalize:"off"}))}const Gt=e=>D("input",Object.assign({},e,{className:a("adl-input-radio__input",e.className)}));function $t(e){const{items:t,i18n:r,name:n,onChange:i,value:o,isInvalid:s,uniqueId:l,disabled:d=!1}=e,c=null==l?void 0:l.replace(/[0-9]/g,"").substring(0,l.lastIndexOf("-"));return D("div",Object.assign({className:"adyen-kyc-radio-group"},{children:t.map((t=>{const l=Ue(c);return D("label",Object.assign({htmlFor:l,className:"adl-input-radio"},{children:[D(Gt,{id:l,type:"radio",checked:o===t.id,"aria-checked":o===t.id,className:"adyen-kyc-radio-group__input",name:n,onChange:i,onClick:i,value:t.id,disabled:d}),D("span",Object.assign({className:a(["adl-input-radio__label","adyen-kyc-label__text",e.className,{"adyen-kyc-radio-group__label--invalid":s}])},{children:r.get(t.name)}))]}),t.id)}))}))}function Xt(e){return D(Vt,Object.assign({classNameModifiers:["large"]},e,{type:"file"}))}$t.defaultProps={onChange:()=>{},items:[]};const Yt=()=>null,Kt=()=>null,zt=()=>null,Zt=({item:e,name:t,uniqueId:r,i18n:n,isInvalid:i,value:o,onChange:s=(()=>{}),labelClassName:l,className:d,children:c})=>{let u,m,p;if(c)if(Array.isArray(c))u=c.find((e=>(null==e?void 0:e.type)===Yt)),m=c.find((e=>(null==e?void 0:e.type)===Kt)),p=c.find((e=>(null==e?void 0:e.type)===zt));else switch(c.type){case Yt:u=c;break;case Kt:m=c;break;case zt:p=c}return D("label",Object.assign({htmlFor:r,className:a(["adl-radio-card",l])},{children:[u&&D("div",Object.assign({className:"adl-u-margin-bottom-16 adl-radio-card__icon","aria-hidden":"true"},{children:u.props.children})),D("div",Object.assign({className:"adl-radio-card__content"},{children:[D("div",Object.assign({className:"adl-radio-card__header adl-u-display-flex adl-u-align-items-center"},{children:[D("div",Object.assign({className:a(["adl-label","adyen-kyc-radio-group-card__label","adl-u-margin-bottom-16",d,{"adyen-kyc-radio-group-card__label--invalid":i}])},{children:[e.subtitle&&D("div",Object.assign({className:"adyen-kyc-radio-group-card__subtitle"},{children:n.get(e.subtitle)})),n.get(e.name)]})),D(Gt,{id:r,type:"radio",checked:o===e.id,className:"adyen-kyc-radio-group-card__input",name:t,onChange:s,onClick:s,value:e.id,"aria-checked":o===e.id})]})),D("div",m?Object.assign({className:"adl-radio-card__body adl-u-margin-bottom-16"},{children:m.props.children}):Object.assign({className:"adl-radio-card__body adl-u-margin-bottom-16"},{children:n.get(e.description)})),p&&D("div",Object.assign({className:"adl-u-margin-bottom-16"},{children:p.props.children}))]}))]}),e.id)};function Qt(e){const{items:t,i18n:a,name:r,onChange:n,value:i,isInvalid:o,uniqueId:s}=e,l=null==s?void 0:s.replace(/[0-9]/g,"").substring(0,s.lastIndexOf("-"));return D("div",Object.assign({className:"adyen-kyc-radio-group-card"},{children:t.map((e=>{const t=Ue(l);return D(Zt,{item:e,uniqueId:t,i18n:a,isInvalid:o,value:i,onChange:n,name:r},e.id)}))}))}function Jt(e){const{autoCorrect:t,classNameModifiers:r,isInvalid:n,isValid:o,readonly:s=null,spellCheck:l,disabled:d,showInlineErrors:c,uniqueId:u,maxLength:m}=e,{i18n:p}=He(),[g,y]=le("");Object.prototype.hasOwnProperty.call(e,"onChange")&&console.error("Error: Form fields that rely on InputBase may not have an onChange property");const b=a("adyen-kyc-input","adyen-kyc-input--textarea",e.className,{"adyen-kyc-input--invalid":n,"adyen-kyc-field--valid":o,"adyen-kyc-input--disabled":d},r.map((e=>`adyen-kyc-input--${e}`))),f=i(e,["classNameModifiers","uniqueId","showInlineErrors"]),h=m-g.length;return D("div",Object.assign({className:"adyen-kyc-input-wrapper"},{children:[D("textarea",Object.assign({id:u},f,{className:b,readOnly:s,spellCheck:l,autoCorrect:t},d&&{"aria-disabled":!0},{"aria-describedby":c?`${u}${Fe}`:null,onInput:t=>{var a;t.target.value=mt(t.target.value),y(t.target.value),null===(a=null==e?void 0:e.onInput)||void 0===a||a.call(e,t)},onBlur:t=>{var a,r;null===(a=null==e?void 0:e.onBlurHandler)||void 0===a||a.call(e,t),e.trimOnBlur&&(t.target.value=t.target.value.trim()),null===(r=null==e?void 0:e.onBlur)||void 0===r||r.call(e,t)},onFocus:t=>{var a;null===(a=null==e?void 0:e.onFocusHandler)||void 0===a||a.call(e,t)}})),m&&h>=0?D("span",Object.assign({className:"adyen-kyc-input__counter"},{children:p.get("xCharactersLeft",{values:{charactersLeft:h}})})):null]}))}Zt.Icon=Yt,Zt.Body=Kt,Zt.Footer=zt,Qt.defaultProps={onChange:()=>{},items:[]};const ea=(e,t)=>{const a={boolean:rt,radio:$t,select:ct,radioCard:Qt,date:Wt,emailAddress:qt,email:qt,tel:Ht,text:Ut,file:Xt,textArea:Jt,default:Ut};return D(a[e]||a.default,Object.assign({},t))};function ta(e,t){const{i18n:a,loadingContext:r,clientKey:n}=He(),[i,o]=le([]),[s,l]=le(!1);return ce((()=>{t||I(e,r,a.locale,n).then((e=>{const t=e&&e.length?e:[];o(t),l(!0)})).catch((()=>{o([]),l(!0)}))}),[e,r,a.locale,n,t]),{dataset:i,loaded:s}}function aa(e){const{classNameModifiers:t,selectedCountry:a,onDropdownChange:r,value:n,readOnly:i}=e,{i18n:o,commonProps:s}=He(),l=Pe("stateOrProvince",a),d=Pe("stateOrProvincePlaceholder",a),{dataset:c,loaded:u}=ta(m(a),!a||!De.includes(a));return u&&c.length?D(Be,Object.assign({name:"stateOrProvince",label:o.get(l),classNameModifiers:t,errorMessage:e.errorMessage,isValid:!!n,showInlineErrors:s.showInlineErrors},{children:ea("select",{name:"stateOrProvince",onChange:r,selected:n,placeholder:o.get(d),items:c,readonly:i&&!!n,showInlineErrors:s.showInlineErrors})})):null}function ra(e){const{allowedCountries:t=[],classNameModifiers:a=[],errorMessage:r,onDropdownChange:n,value:i}=e,{i18n:o,commonProps:s}=He(),{dataset:l}=ta(u),d=l.filter((e=>!t.length||t.includes(e.id))).map((e=>Object.assign(Object.assign({},e),{sprite:`#adl-flag-${e.id.toLowerCase()}`}))),c=1===d.length||e.readOnly;return D(Be,Object.assign({name:"country",label:e.label||o.get("country"),errorMessage:r,classNameModifiers:a,isValid:!!i,showInlineErrors:s.showInlineErrors},{children:ea("select",{onChange:n,name:"country",placeholder:o.get("selectCountry"),selected:i,items:d,readonly:c&&!!i,showInlineErrors:s.showInlineErrors})}))}var na=(e,t)=>({getPlaceholder:(a,r=null)=>{var n,i,o;const s=null!==(o=null!==(i=null===(n=e.placeholders)||void 0===n?void 0:n[a])&&void 0!==i?i:r)&&void 0!==o?o:a;return t.get(s)},getLabel:(a,r=null)=>{var n,i,o;const s=null!==(o=null!==(i=null===(n=e.labels)||void 0===n?void 0:n[a])&&void 0!==i?i:r)&&void 0!==o?o:a;return t.get(s)},isRequiredField:(t,a=!0)=>e.requiredFields?e.requiredFields.includes(t)&&("role"!==t||"role"===t&&"individual"!==e.taskType):a,isOptionalField:t=>{var a;return null===(a=e.optionalFields)||void 0===a?void 0:a.includes(t)},isVisibleField:function(e,t=!0){return this.isRequiredField(e,t)||this.isOptionalField(e)},isReadOnly:t=>e.readOnly||!!e.readOnlyFields&&e.readOnlyFields.includes(t),getVal:e=>{if("string"==typeof e)return t.get(e);let a="error";if(e&&"object"==typeof e){const{translationKey:r,translationObject:n}=e;a=t.get(r,n)}return a},getErrorMessage:(e,a,r)=>{var n;const i=null===(n=null==a?void 0:a[e])||void 0===n?void 0:n.errorMessage;if("object"==typeof i){const{translationKey:e,translationObject:a}=i;return t.get(e,a)}return i?t.get(i):Boolean(null==r?void 0:r[e])}});function ia(e){const{i18n:t,commonProps:a}=He(),{classNameModifiers:r=[],data:n,valid:i,errors:o,fieldProblems:s,fieldName:l,onInput:d,onBlur:c,trimOnBlur:u}=e,m=na(e,t).getErrorMessage(l,o,s),p=n[l],g=Pe(l,n.country),y=o=>{switch(o){case"country":return D(ra,{classNameModifiers:r,allowedCountries:e.allowedCountries,errorMessage:m,onDropdownChange:e.onDropdownChange,value:p,className:e.hideField?"adl-u-display-none":""});case"stateOrProvince":return D(aa,{classNameModifiers:r,selectedCountry:n.country,errorMessage:m,onDropdownChange:e.onDropdownChange,value:p});default:return D(Be,Object.assign({name:o,label:t.get(g),classNameModifiers:r,errorMessage:m,isValid:i[o],showInlineErrors:a.showInlineErrors},{children:ea("text",{classNameModifiers:r,name:o,value:p,onInput:d,onBlur:c,maxlength:e.maxlength,"aria-required":!0,"aria-label":e["aria-label"],"aria-invalid":!i[o],showInlineErrors:a.showInlineErrors,trimOnBlur:u})}))}};return e.hideField?D("div",Object.assign({className:"adl-u-display-none"},{children:y(l)})):y(l)}class oa{constructor(e){this.validationResults=e}get isValid(){return this.validationResults.reduce(((e,t)=>e&&t.isValid),!0)}hasError(){return Boolean(this.getError())}getError(){return this.validationResults.find((e=>e.hasError))}getAllErrors(){return this.validationResults.filter((e=>e.hasError))}}const sa={validate:()=>!0,modes:["blur","input"]};class la{constructor(e){this.setRules(e)}setRules(e){this.rules=Object.assign(Object.assign({},this.rules),e)}getRulesFor(e){var t;const a=null!==(t=this.rules[e])&&void 0!==t?t:[sa];return Array.isArray(a)?a:[a]}validate({key:e,value:t,mode:a="blur"},r){const n=this.getRulesFor(e).map((e=>((e,t,a,r)=>{const n=e.validate(t,r),i=e.modes.includes(a);return{isValid:n,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t,r):e.errorMessage,hasError:i&&!n}})(e,t,a,r)));return new oa(n)}}const da=(e,t)=>Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,a)=>(t[a]=e[a],t)),{}),ca=(e,t,a,r,n)=>t.reduce(((e,t)=>{var i,o,s;return Object.assign(Object.assign({},e),{[t]:null!==(s=null!==(o=null!==(i=e[t])&&void 0!==i?i:null==n?void 0:n[t])&&void 0!==o?o:null==r?void 0:r[t])&&void 0!==s?s:a})}),e);function ua({schema:e,defaultData:t,processField:a,fieldProblems:r,maskedFields:n}){const i=e=>{var i,o;if(void 0===t[e])return{valid:!1,errors:null,data:null,fieldProblems:null!==(i=null==r?void 0:r[e])&&void 0!==i?i:null};const[s,l]=a({key:e,value:t[e],mode:"blur",defaultData:t,maskedFields:n},{state:{data:t}});return{valid:l.isValid&&!(null==r?void 0:r[e])||!1,errors:l.hasError()?l.getError():null,data:s,fieldProblems:null!==(o=null==r?void 0:r[e])&&void 0!==o?o:null}},o=e.reduce(((e,t)=>{const{valid:a,errors:r,data:n,fieldProblems:o}=i(t);return{valid:Object.assign(Object.assign({},e.valid),{[t]:a}),errors:Object.assign(Object.assign({},e.errors),{[t]:r}),data:Object.assign(Object.assign({},e.data),{[t]:n}),fieldProblems:Object.assign(Object.assign({},e.fieldProblems),{[t]:o})}}),{data:{},valid:{},errors:{},fieldProblems:{}});return{schema:e,data:o.data,valid:o.valid,errors:o.errors,fieldProblems:o.fieldProblems,maskedFields:n}}function ma({rules:e,schema:t,formatters:a,defaultData:r={},fieldProblems:n,maskedFields:i}){var o;const s=pe((()=>new la(e)),[e]),l=ge("function"==typeof t?t:()=>t,[t]),d=({key:e,value:t,mode:r,defaultData:n,maskedFields:i},o)=>{var l;const d=(null===(l=null==a?void 0:a[e])||void 0===l?void 0:l.formatter)?a[e].formatter:null==a?void 0:a[e],c=d&&"function"==typeof d?d(null!=t?t:"",o):t;return[c,!((null==i?void 0:i.includes(e))&&n[e]===t&&n[e])?s.validate({key:e,value:c,mode:r},o):{isValid:!0,hasError:()=>null}]},[c,u]=de(function(e){return function(t,{type:a,key:r,value:n,mode:i,schema:o,defaultData:s,formValue:l,selectedSchema:d,maskedFields:c,fieldProblems:u}){var m,p,g,y,b;const f=d||t.schema;switch(a){case"setData":return Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),{[r]:n})});case"setValid":return Object.assign(Object.assign({},t),{valid:Object.assign(Object.assign({},t.valid),{[r]:n})});case"setErrors":return Object.assign(Object.assign({},t),{errors:Object.assign(Object.assign({},t.errors),{[r]:n})});case"setFieldProblems":return null!==(p=null===(m=null==t?void 0:t.schema)||void 0===m?void 0:m.reduce(((e,a)=>{var r,n;return Object.assign(Object.assign({},e),{fieldProblems:Object.assign(Object.assign({},t.fieldProblems),{[a]:null!==(r=null==u?void 0:u[a])&&void 0!==r?r:null}),valid:Object.assign(Object.assign({},t.valid),{[a]:(null===(n=t.valid)||void 0===n?void 0:n[a])&&!u[a]})})}),t))&&void 0!==p?p:t;case"updateField":{const[a,o]=e({key:r,value:n,mode:i,defaultData:s,maskedFields:c},{state:t}),l=t.data[r],d=Object.assign({},t.fieldProblems);return l!==a&&(d[r]=null),Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),{[r]:a}),errors:Object.assign(Object.assign({},t.errors),{[r]:o.hasError()?o.getError():null}),valid:Object.assign(Object.assign({},t.valid),{[r]:o.isValid&&!d[r]||!1}),fieldProblems:d})}case"mergeForm":{const e=Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),l.data),errors:Object.assign(Object.assign({},t.errors),l.errors),valid:Object.assign(Object.assign({},t.valid),l.valid),fieldProblems:Object.assign(Object.assign({},t.fieldProblems),l.fieldProblems)});return e.valid&&(e.isValid=Object.values(e.valid).every((e=>e))),e}case"setSchema":{const a=ua({schema:o,defaultData:s,processField:e,fieldProblems:u,maskedFields:c}),r=t.schema.filter((e=>!o.includes(e))),n=o.filter((e=>!t.schema.includes(e))),i={data:da(t.data,n),errors:da(t.errors,n),valid:da(t.valid,n)},l=ca(da(t.data,r),n,null,a.data,null===(g=t.local)||void 0===g?void 0:g.data),d=ca(da(t.valid,r),n,!1,a.valid,null===(y=t.local)||void 0===y?void 0:y.valid),m=ca(da(t.errors,r),n,null,a.errors,null===(b=t.local)||void 0===b?void 0:b.errors);return Object.assign(Object.assign({},t),{schema:o,data:l,valid:d,errors:m,local:i})}case"validateForm":{const a=f.reduce(((a,r)=>{const[,n]=e({key:r,value:t.data[r],mode:"blur",defaultData:s,maskedFields:c},{state:t});return{valid:Object.assign(Object.assign({},a.valid),{[r]:n.isValid&&!t.fieldProblems[r]||!1}),errors:Object.assign(Object.assign({},a.errors),{[r]:n.hasError()?n.getError():null})}}),{valid:t.valid,errors:t.errors});return Object.assign(Object.assign({},t),{valid:a.valid,errors:a.errors})}default:throw new Error("Undefined useForm action")}}}(d),{defaultData:r,schema:null!==(o=l(r))&&void 0!==o?o:[],processField:d,fieldProblems:n,maskedFields:i},ua),m=pe((()=>c.schema.reduce(((e,t)=>e&&c.valid[t]),!0)),[c.schema,c.valid]),p=ge(((e=null)=>{u({type:"validateForm",selectedSchema:e,defaultData:r,maskedFields:i})}),[]),g=ge(((e,t)=>u({type:"setErrors",key:e,value:t})),[]),y=ge(((e,t)=>u({type:"setValid",key:e,value:t})),[]),b=ge(((e,t)=>u({type:"setData",key:e,value:t})),[]),f=ge((e=>u({type:"setSchema",schema:e,defaultData:r})),[c.schema]),h=ge((e=>u({type:"mergeForm",formValue:e})),[]),v=ge((e=>u({type:"setFieldProblems",fieldProblems:e})),[c.schema]);return ce((()=>{const e=l(c.data);B(c.schema,e)||f(e)}),[c.schema,c.data,f,l]),ce((()=>{v(null!=n?n:{})}),[JSON.stringify(n)]),{handleChangeFor:(e,t="blur")=>a=>{const n=((e,t)=>t.target?"checkbox"===t.target.type?!c.data[e]:t.target.value:t)(e,a);u({type:"updateField",key:e,value:n,mode:t,defaultData:r,maskedFields:i})},triggerValidation:p,setData:b,setValid:y,setErrors:g,isValid:m,mergeForm:h,setFieldProblems:v,schema:c.schema,valid:c.valid,errors:c.errors,data:c.data,fieldProblems:c.fieldProblems}}var pa="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ga={},ya={get exports(){return ga},set exports(e){ga=e}},ba=function(e){return e&&e.Math==Math&&e},fa=ba("object"==typeof globalThis&&globalThis)||ba("object"==typeof window&&window)||ba("object"==typeof self&&self)||ba("object"==typeof pa&&pa)||function(){return this}()||Function("return this")(),ha={},va=function(e){try{return!!e()}catch(e){return!0}},_a=!va((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),Na=!va((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Oa=Na,Ia=Function.prototype.call,Ea=Oa?Ia.bind(Ia):function(){return Ia.apply(Ia,arguments)},Ta={},Aa={}.propertyIsEnumerable,Sa=Object.getOwnPropertyDescriptor,Ca=Sa&&!Aa.call({1:2},1);Ta.f=Ca?function(e){var t=Sa(this,e);return!!t&&t.enumerable}:Aa;var Ra,Da,ka=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},La=Na,wa=Function.prototype,Pa=wa.call,ja=La&&wa.bind.bind(Pa,Pa),xa=La?ja:function(e){return function(){return Pa.apply(e,arguments)}},Ma=xa,Fa=Ma({}.toString),Va=Ma("".slice),Ua=function(e){return Va(Fa(e),8,-1)},Ba=va,Wa=Ua,Ha=Object,qa=xa("".split),Ga=Ba((function(){return!Ha("z").propertyIsEnumerable(0)}))?function(e){return"String"==Wa(e)?qa(e,""):Ha(e)}:Ha,$a=function(e){return null==e},Xa=$a,Ya=TypeError,Ka=function(e){if(Xa(e))throw Ya("Can't call method on "+e);return e},za=Ga,Za=Ka,Qa=function(e){return za(Za(e))},Ja="object"==typeof document&&document.all,er={all:Ja,IS_HTMLDDA:void 0===Ja&&void 0!==Ja},tr=er.all,ar=er.IS_HTMLDDA?function(e){return"function"==typeof e||e===tr}:function(e){return"function"==typeof e},rr=ar,nr=er.all,ir=er.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:rr(e)||e===nr}:function(e){return"object"==typeof e?null!==e:rr(e)},or=fa,sr=ar,lr=function(e){return sr(e)?e:void 0},dr=function(e,t){return arguments.length<2?lr(or[e]):or[e]&&or[e][t]},cr=xa({}.isPrototypeOf),ur=fa,mr=dr("navigator","userAgent")||"",pr=ur.process,gr=ur.Deno,yr=pr&&pr.versions||gr&&gr.version,br=yr&&yr.v8;br&&(Da=(Ra=br.split("."))[0]>0&&Ra[0]<4?1:+(Ra[0]+Ra[1])),!Da&&mr&&(!(Ra=mr.match(/Edge\/(\d+)/))||Ra[1]>=74)&&(Ra=mr.match(/Chrome\/(\d+)/))&&(Da=+Ra[1]);var fr=Da,hr=va,vr=!!Object.getOwnPropertySymbols&&!hr((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&fr&&fr<41})),_r=vr&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Nr=dr,Or=ar,Ir=cr,Er=Object,Tr=_r?function(e){return"symbol"==typeof e}:function(e){var t=Nr("Symbol");return Or(t)&&Ir(t.prototype,Er(e))},Ar=String,Sr=ar,Cr=function(e){try{return Ar(e)}catch(e){return"Object"}},Rr=TypeError,Dr=function(e){if(Sr(e))return e;throw Rr(Cr(e)+" is not a function")},kr=$a,Lr=Ea,wr=ar,Pr=ir,jr=TypeError,xr={},Mr={get exports(){return xr},set exports(e){xr=e}},Fr=fa,Vr=Object.defineProperty,Ur=function(e,t){try{Vr(Fr,e,{value:t,configurable:!0,writable:!0})}catch(a){Fr[e]=t}return t},Br=Ur,Wr="__core-js_shared__",Hr=fa[Wr]||Br(Wr,{}),qr=Hr;(Mr.exports=function(e,t){return qr[e]||(qr[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"\xa9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Gr=Ka,$r=Object,Xr=function(e){return $r(Gr(e))},Yr=xa({}.hasOwnProperty),Kr=Object.hasOwn||function(e,t){return Yr(Xr(e),t)},zr=xa,Zr=0,Qr=Math.random(),Jr=zr(1..toString),en=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Jr(++Zr+Qr,36)},tn=fa,an=Kr,rn=en,nn=vr,on=_r,sn=xr("wks"),ln=tn.Symbol,dn=ln&&ln.for,cn=on?ln:ln&&ln.withoutSetter||rn,un=function(e){if(!an(sn,e)||!nn&&"string"!=typeof sn[e]){var t="Symbol."+e;nn&&an(ln,e)?sn[e]=ln[e]:sn[e]=on&&dn?dn(t):cn(t)}return sn[e]},mn=Ea,pn=ir,gn=Tr,yn=function(e,t){var a=e[t];return kr(a)?void 0:Dr(a)},bn=function(e,t){var a,r;if("string"===t&&wr(a=e.toString)&&!Pr(r=Lr(a,e)))return r;if(wr(a=e.valueOf)&&!Pr(r=Lr(a,e)))return r;if("string"!==t&&wr(a=e.toString)&&!Pr(r=Lr(a,e)))return r;throw jr("Can't convert object to primitive value")},fn=TypeError,hn=un("toPrimitive"),vn=function(e,t){if(!pn(e)||gn(e))return e;var a,r=yn(e,hn);if(r){if(void 0===t&&(t="default"),a=mn(r,e,t),!pn(a)||gn(a))return a;throw fn("Can't convert object to primitive value")}return void 0===t&&(t="number"),bn(e,t)},_n=Tr,Nn=function(e){var t=vn(e,"string");return _n(t)?t:t+""},On=ir,In=fa.document,En=On(In)&&On(In.createElement),Tn=function(e){return En?In.createElement(e):{}},An=!_a&&!va((function(){return 7!=Object.defineProperty(Tn("div"),"a",{get:function(){return 7}}).a})),Sn=_a,Cn=Ea,Rn=Ta,Dn=ka,kn=Qa,Ln=Nn,wn=Kr,Pn=An,jn=Object.getOwnPropertyDescriptor;ha.f=Sn?jn:function(e,t){if(e=kn(e),t=Ln(t),Pn)try{return jn(e,t)}catch(e){}if(wn(e,t))return Dn(!Cn(Rn.f,e,t),e[t])};var xn={},Mn=_a&&va((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Fn=ir,Vn=String,Un=TypeError,Bn=function(e){if(Fn(e))return e;throw Un(Vn(e)+" is not an object")},Wn=_a,Hn=An,qn=Mn,Gn=Bn,$n=Nn,Xn=TypeError,Yn=Object.defineProperty,Kn=Object.getOwnPropertyDescriptor,zn="enumerable",Zn="configurable",Qn="writable";xn.f=Wn?qn?function(e,t,a){if(Gn(e),t=$n(t),Gn(a),"function"==typeof e&&"prototype"===t&&"value"in a&&Qn in a&&!a[Qn]){var r=Kn(e,t);r&&r[Qn]&&(e[t]=a.value,a={configurable:Zn in a?a[Zn]:r[Zn],enumerable:zn in a?a[zn]:r[zn],writable:!1})}return Yn(e,t,a)}:Yn:function(e,t,a){if(Gn(e),t=$n(t),Gn(a),Hn)try{return Yn(e,t,a)}catch(e){}if("get"in a||"set"in a)throw Xn("Accessors not supported");return"value"in a&&(e[t]=a.value),e};var Jn=xn,ei=ka,ti=_a?function(e,t,a){return Jn.f(e,t,ei(1,a))}:function(e,t,a){return e[t]=a,e},ai={},ri={get exports(){return ai},set exports(e){ai=e}},ni=_a,ii=Kr,oi=Function.prototype,si=ni&&Object.getOwnPropertyDescriptor,li=ii(oi,"name"),di={EXISTS:li,PROPER:li&&"something"===function(){}.name,CONFIGURABLE:li&&(!ni||ni&&si(oi,"name").configurable)},ci=ar,ui=Hr,mi=xa(Function.toString);ci(ui.inspectSource)||(ui.inspectSource=function(e){return mi(e)});var pi,gi,yi,bi=ui.inspectSource,fi=ar,hi=fa.WeakMap,vi=fi(hi)&&/native code/.test(String(hi)),_i=en,Ni=xr("keys"),Oi={},Ii=vi,Ei=fa,Ti=ir,Ai=ti,Si=Kr,Ci=Hr,Ri=function(e){return Ni[e]||(Ni[e]=_i(e))},Di=Oi,ki="Object already initialized",Li=Ei.TypeError,wi=Ei.WeakMap;if(Ii||Ci.state){var Pi=Ci.state||(Ci.state=new wi);Pi.get=Pi.get,Pi.has=Pi.has,Pi.set=Pi.set,pi=function(e,t){if(Pi.has(e))throw Li(ki);return t.facade=e,Pi.set(e,t),t},gi=function(e){return Pi.get(e)||{}},yi=function(e){return Pi.has(e)}}else{var ji=Ri("state");Di[ji]=!0,pi=function(e,t){if(Si(e,ji))throw Li(ki);return t.facade=e,Ai(e,ji,t),t},gi=function(e){return Si(e,ji)?e[ji]:{}},yi=function(e){return Si(e,ji)}}var xi={set:pi,get:gi,has:yi,enforce:function(e){return yi(e)?gi(e):pi(e,{})},getterFor:function(e){return function(t){var a;if(!Ti(t)||(a=gi(t)).type!==e)throw Li("Incompatible receiver, "+e+" required");return a}}},Mi=va,Fi=ar,Vi=Kr,Ui=_a,Bi=di.CONFIGURABLE,Wi=bi,Hi=xi.enforce,qi=xi.get,Gi=Object.defineProperty,$i=Ui&&!Mi((function(){return 8!==Gi((function(){}),"length",{value:8}).length})),Xi=String(String).split("String"),Yi=ri.exports=function(e,t,a){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(t="get "+t),a&&a.setter&&(t="set "+t),(!Vi(e,"name")||Bi&&e.name!==t)&&(Ui?Gi(e,"name",{value:t,configurable:!0}):e.name=t),$i&&a&&Vi(a,"arity")&&e.length!==a.arity&&Gi(e,"length",{value:a.arity});try{a&&Vi(a,"constructor")&&a.constructor?Ui&&Gi(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=Hi(e);return Vi(r,"source")||(r.source=Xi.join("string"==typeof t?t:"")),e};Function.prototype.toString=Yi((function(){return Fi(this)&&qi(this).source||Wi(this)}),"toString");var Ki=ar,zi=xn,Zi=ai,Qi=Ur,Ji={},eo=Math.ceil,to=Math.floor,ao=Math.trunc||function(e){var t=+e;return(t>0?to:eo)(t)},ro=ao,no=function(e){var t=+e;return t!=t||0===t?0:ro(t)},io=no,oo=Math.max,so=Math.min,lo=no,co=Math.min,uo=function(e){return e>0?co(lo(e),9007199254740991):0},mo=Qa,po=function(e,t){var a=io(e);return a<0?oo(a+t,0):so(a,t)},go=function(e){return uo(e.length)},yo=function(e){return function(t,a,r){var n,i=mo(t),o=go(i),s=po(r,o);if(e&&a!=a){for(;o>s;)if((n=i[s++])!=n)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===a)return e||s||0;return!e&&-1}},bo={includes:yo(!0),indexOf:yo(!1)},fo=Kr,ho=Qa,vo=bo.indexOf,_o=Oi,No=xa([].push),Oo=function(e,t){var a,r=ho(e),n=0,i=[];for(a in r)!fo(_o,a)&&fo(r,a)&&No(i,a);for(;t.length>n;)fo(r,a=t[n++])&&(~vo(i,a)||No(i,a));return i},Io=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");Ji.f=Object.getOwnPropertyNames||function(e){return Oo(e,Io)};var Eo={};Eo.f=Object.getOwnPropertySymbols;var To=dr,Ao=Ji,So=Eo,Co=Bn,Ro=xa([].concat),Do=To("Reflect","ownKeys")||function(e){var t=Ao.f(Co(e)),a=So.f;return a?Ro(t,a(e)):t},ko=Kr,Lo=Do,wo=ha,Po=xn,jo=va,xo=ar,Mo=/#|\.prototype\./,Fo=function(e,t){var a=Uo[Vo(e)];return a==Wo||a!=Bo&&(xo(t)?jo(t):!!t)},Vo=Fo.normalize=function(e){return String(e).replace(Mo,".").toLowerCase()},Uo=Fo.data={},Bo=Fo.NATIVE="N",Wo=Fo.POLYFILL="P",Ho=Fo,qo=fa,Go=ha.f,$o=ti,Xo=function(e,t,a,r){r||(r={});var n=r.enumerable,i=void 0!==r.name?r.name:t;if(Ki(a)&&Zi(a,i,r),r.global)n?e[t]=a:Qi(t,a);else{try{r.unsafe?e[t]&&(n=!0):delete e[t]}catch(e){}n?e[t]=a:zi.f(e,t,{value:a,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Yo=Ur,Ko=function(e,t,a){for(var r=Lo(t),n=Po.f,i=wo.f,o=0;o<r.length;o++){var s=r[o];ko(e,s)||a&&ko(a,s)||n(e,s,i(t,s))}},zo=Ho,Zo=function(e,t){var a,r,n,i,o,s=e.target,l=e.global,d=e.stat;if(a=l?qo:d?qo[s]||Yo(s,{}):(qo[s]||{}).prototype)for(r in t){if(i=t[r],n=e.dontCallGetSet?(o=Go(a,r))&&o.value:a[r],!zo(l?r:s+(d?".":"#")+r,e.forced)&&void 0!==n){if(typeof i==typeof n)continue;Ko(i,n)}(e.sham||n&&n.sham)&&$o(i,"sham",!0),Xo(a,r,i,e)}},Qo={};Qo[un("toStringTag")]="z";var Jo="[object z]"===String(Qo),es=ar,ts=Ua,as=un("toStringTag"),rs=Object,ns="Arguments"==ts(function(){return arguments}()),is=Jo?ts:function(e){var t,a,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(t=rs(e),as))?a:ns?ts(t):"Object"==(r=ts(t))&&es(t.callee)?"Arguments":r},os=String,ss="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff",ls=Ka,ds=function(e){if("Symbol"===is(e))throw TypeError("Cannot convert a Symbol value to a string");return os(e)},cs=ss,us=xa("".replace),ms="["+cs+"]",ps=RegExp("^"+ms+ms+"*"),gs=RegExp(ms+ms+"*$"),ys=function(e){return function(t){var a=ds(ls(t));return 1&e&&(a=us(a,ps,"")),2&e&&(a=us(a,gs,"")),a}},bs={start:ys(1),end:ys(2),trim:ys(3)},fs=di.PROPER,hs=va,vs=ss,_s=bs.start,Ns=function(e){return hs((function(){return!!vs[e]()||"\u200b\x85\u180e"!=="\u200b\x85\u180e"[e]()||fs&&vs[e].name!==e}))}("trimStart")?function(){return _s(this)}:"".trimStart;Zo({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==Ns},{trimLeft:Ns});Zo({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==Ns},{trimStart:Ns});var Os=fa,Is=xa,Es=function(e,t){return Is(Os[e].prototype[t])}("String","trimLeft");ya.exports=Es;const Ts=(e,t,a,r)=>{var n,i,o,s;if(r&&(null===(i=null===(n=e[a])||void 0===n?void 0:n[t])||void 0===i?void 0:i.formatter))return null;const l=null===(s=null===(o=e[a])||void 0===o?void 0:o[t])||void 0===s?void 0:s.maxlength;return l||30};function As(e,t,a){if(!a||!t[a])return e;const r={};return Object.entries(e).forEach((([e,n])=>{const i=t[a][e];if(i){const t=Array.isArray(n)?[...n]:[n],a=Array.isArray(i)?[...i]:[i];r[e]=[...a],t.forEach((t=>{const n=t.modes;let i=!1;a.every((e=>(i=B(e.modes,n),!i))),i||r[e].unshift(t)}))}else r[e]=n})),Object.entries(t[a]).forEach((([e,t])=>{r[e]||(r[e]=t)})),r}const Ss=e=>!(null!=e),Cs=e=>!!(Ss(e)||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&/^[\s]*$/.test(e)),Rs=e=>"string"==typeof e||e instanceof String,Ds=e=>Rs(e)&&!Cs(e),ks="?\\-\\+_=!@#$%^&*(){}~<>\\[\\]\\/\\\\",Ls=(e,t="g")=>new RegExp(`[${e}]`,t),ws={digitsHyphen:/^[\d-]+$/,noHtml:/^[^<>&]+$/,alphaNum:/^\d[a-zA-Z0-9]{6,11}$/,noSpecialChars:(Ps=ks,js=!0,new RegExp(`^[${js?"^":""}${Ps}]+$`))};var Ps,js;const xs=(e,t)=>!!Cs(e)||e.length===t,Ms=e=>e.trimStart().replace(/\s+/g," ");function Fs({heading:e,description:t,headingComponent:a,descriptionComponent:r,classNames:n}){const i=e?D("h2",Object.assign({className:"adyen-kyc-form-header__heading"},{children:e})):a,o=t?D("div",Object.assign({className:"adyen-kyc-form-header__description"},{children:t})):r;return i||o?D("div",Object.assign({className:`adyen-kyc-form-header ${n}`},{children:[i,o]})):null}const Vs=e=>({formatter:t=>t.replace(Ls("^\\d","g"),"").substr(0,e),format:new Array(e).fill("9").join(""),maxlength:e}),Us=Ls(ks),Bs=Ls(ks.replace("-","")),Ws={postalCode:{formatter:(e,t)=>{var a;const r=t.state.data.country,n=null===(a=Hs[r])||void 0===a?void 0:a.postalCode.formatter;return n?n(e):e}},street:{formatter:e=>Ms(e).replace(Bs,"")},houseNumberOrName:{formatter:e=>Ms(e).replace(Bs,"")},city:{formatter:e=>Ms(e).replace(Us,"")}},Hs={AT:{postalCode:Vs(4)},AU:{postalCode:Vs(4)},BE:{postalCode:Vs(4)},BG:{postalCode:Vs(4)},BR:{postalCode:Vs(8)},CA:{postalCode:{format:"A9A 9A9 or A9A9A9",maxlength:7}},CH:{postalCode:Vs(4)},CY:{postalCode:Vs(4)},CZ:{postalCode:{format:"999 99",maxlength:6}},DE:{postalCode:Vs(5)},DK:{postalCode:{format:"9999",maxlength:7}},EE:{postalCode:Vs(5)},ES:{postalCode:Vs(5)},FI:{postalCode:Vs(5)},FR:{postalCode:Vs(5)},GB:{postalCode:{formatter:e=>e.replace(Ls(ks),"").substr(0,8),format:"AA99 9AA or A99 9AA or A9 9AA",maxlength:8}},GR:{postalCode:{format:"999 99",maxlength:6}},HR:{postalCode:{format:"[1-5]9999",maxlength:5}},HU:{postalCode:Vs(4)},IE:{postalCode:{format:"A99 A999",maxlength:8}},IS:{postalCode:Vs(3)},IT:{postalCode:Vs(5)},LI:{postalCode:Vs(4)},LT:{postalCode:{format:"9999 or 99999 or LT-99999",maxlength:8}},LU:{postalCode:Vs(4)},LV:{postalCode:{format:"9999 or LV-9999",maxlength:7}},MC:{postalCode:{format:"980NN",maxlength:5}},MT:{postalCode:{format:"AA99 or AAA99 or AA9999 or AAA9999",maxlength:8}},MY:{postalCode:Vs(5)},NL:{postalCode:{format:"9999AA",maxlength:7}},NZ:{postalCode:Vs(4)},NO:{postalCode:Vs(4)},PL:{postalCode:{formatter:e=>{const t=e.replace(Ls("^\\d-","g"),""),a=t.indexOf("-")>-1?6:5;return t.substr(0,a)},format:"99-999",maxlength:6}},PT:{postalCode:{formatter:e=>e.replace(Ls("^\\d-","g"),"").substr(0,8),format:"9999-999",maxlength:8}},RO:{postalCode:Vs(6)},SI:{postalCode:{format:"9999 or SI-9999",maxlength:7}},SE:{postalCode:Vs(5)},SG:{postalCode:Vs(6)},SK:{postalCode:{format:"99999 or SK-99999",maxlength:8}},JP:{postalCode:{format:"999-9999",maxlength:8}},US:{postalCode:{formatter:e=>{const t=e.replace(Ls("^\\d-","g"),""),a=t.indexOf("-")>-1?10:5;return t.substr(0,a)},format:"99999 or 99999-9999"}}},qs=e=>({pattern:new RegExp(`\\d{${e}}`)}),Gs={AT:qs(4),AU:qs(4),BE:{pattern:/(?:(?:[1-9])(?:\d{3}))/},BG:qs(4),BR:qs(8),CA:{pattern:/(?:[ABCEGHJ-NPRSTVXY]\d[A-Z][ -]?\d[A-Z]\d)/},CH:{pattern:/[1-9]\d{3}/},CY:qs(4),CZ:{pattern:/\d{3}\s?\d{2}/},DE:qs(5),DK:{pattern:/^(DK-)?[0-9]{4}$/},EE:qs(5),ES:{pattern:/(?:0[1-9]|[1-4]\d|5[0-2])\d{3}/},FI:qs(5),FR:qs(5),GB:{pattern:/^([A-Za-z][A-Ha-hK-Yk-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$/},GE:qs(4),GR:{pattern:/^\d{3}\s{0,1}\d{2}$/},HR:{pattern:/^([1-5])[0-9]{4}$/},HU:qs(4),IE:{pattern:/(?:^[AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}/},IS:qs(3),IT:qs(5),LI:qs(4),LT:{pattern:/^(LT-)?[0-9]{4,5}$/},LU:qs(4),LV:{pattern:/^(LV-)?[0-9]{4}$/},MC:{pattern:/^980\d{2}$/},MT:{pattern:/^[A-Za-z]{2,3}[ ]?\d{2}(?:\d{2})?$/},MY:qs(5),NZ:qs(4),NL:{pattern:/(?:NL-)?(?:[1-9]\d{3} ?(?:[A-EGHJ-NPRTVWXZ][A-EGHJ-NPRSTVWXZ]|S[BCEGHJ-NPRTVWXZ]))/},NO:qs(4),PL:{pattern:/^\d{2}[-]\d{3}$/},PT:{pattern:/^([1-9]\d{3})([- ]?(\d{3})? *)$/},RO:qs(6),SI:{pattern:/^(SI-)?[0-9]{4}$/},SE:qs(5),SG:qs(6),SK:{pattern:/^(SK-)?[0-9]{5}$/},JP:{pattern:/^\d{3}[-]\d{4}$/},US:{pattern:/^(\d{5})([-]?(\d{4})? *)$/}},$s=["US","GB"],Xs={street:{modes:["blur"],validate:e=>Ds(e),errorMessage:"fieldIsRequired"},houseNumberOrName:{modes:["blur"],validate:(e,t)=>{const a=t.state.data.country;return!(!a||!$s.includes(a))||Ds(e)},errorMessage:"fieldIsRequired"},postalCode:{modes:["blur"],validate:(e,t)=>{var a,r;const n=t.state.data.country;if(n){Xs.postalCode.errorMessage={translationKey:"invalidFormatExpects",translationObject:{values:{format:(null===(a=Hs[n])||void 0===a?void 0:a.postalCode.format)||null}}};const t=null===(r=Gs[n])||void 0===r?void 0:r.pattern;return t?t.test(e):!!e}return!!e},errorMessage:"fieldIsRequired"},city:{modes:["blur"],validate:Ds,errorMessage:"fieldIsRequired"},stateOrProvince:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},country:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},Ys=t.createContext(null);function Ks({stateRef:e}){return e.current.setState?null:D(Ys.Consumer,{children:({dispatch:t,setActiveForms:a})=>(e.current.setState=dt(t,200),e.current.setActiveForms=a,null)})}var zs;!function(e){e[e.BASIC=0]="BASIC",e[e.INFO=1]="INFO",e[e.ERROR=2]="ERROR",e[e.WARNING=3]="WARNING",e[e.SUCCESS=4]="SUCCESS"}(zs||(zs={}));const Zs=({className:e,title:t,type:r=zs.BASIC,children:n,hasCloseButton:i=!0})=>{const[o,s]=le(!1);if(o)return null;const l=a("adl-alert",e,{"adl-alert--basic":r===zs.BASIC,"adl-alert--information":r===zs.INFO,"adl-alert--error":r===zs.ERROR,"adl-alert--warning":r===zs.WARNING,"adl-alert--success":r===zs.SUCCESS});return D("div",Object.assign({className:l},{children:[D("div",Object.assign({className:"adl-alert__header"},{children:[D("span",Object.assign({className:"adl-alert__icon"},{children:D(Qs,{type:r})})),t&&D("span",Object.assign({className:a("adl-alert__title",{"adl-alert__title--no-content":!n})},{children:t})),i&&D("button",Object.assign({className:"adl-alert__dismiss",onClick:()=>s(!0)},{children:D(Me,{name:"cross",className:"adl-alert__dismiss__icon"})}))]})),n]}))},Qs=({type:e})=>{switch(e){case zs.SUCCESS:return D(Me,{name:"check"});case zs.ERROR:return D(Me,{name:"warning"});case zs.WARNING:return D(Me,{name:"field-error"});case zs.INFO:case zs.BASIC:default:return D(Me,{name:"info-circle",className:"adl-alert__icon__info"})}},Js=t.createContext(null);const el=(e,t)=>t?"adl-link__icon adyen-kyc-icon-external-link":e?"adl-link__icon":null,tl=({className:e,children:t,href:r,external:n,icon:i,underline:o,inheritStyles:s,showAsButton:l,iconLeft:d=!1,onClick:c})=>{if(!(e=>"#"!==e||(console.error('Links must include a valid href. If your href is "#", consider using a Button instead'),!1))(r))return null;const u=n?"_blank":"_self",m=n?"external noopener noreferrer ":null,p=i||n,g=l?a("adl-button",e,{"adl-button--icon":p&&!d,"adl-button--icon-left":p&&d}):a("adl-link",e,{"adl-link--with-icon":p,"adl-link--underline":o,"adl-link--inherit":s,"adl-link--icon-left":d});return D("a",Object.assign({href:r,className:g,target:u,rel:m,onClick:c},{children:[D("span",Object.assign({className:"adl-link__text"},{children:t})),p&&D(Me,{name:i,className:el(i,n)})]}))},al=({fieldName:e,label:t})=>{const{goToFormByFieldName:a}=function(){const e=ye(Js);if(void 0===e)throw new Error("useFormRouterContext must be used within a FormRouterProvider");return e}();return D(tl,Object.assign({onClick:t=>{t.preventDefault(),a(e)},href:"to-field-link"},{children:t}))},rl=({validationErrors:e,formUtils:t})=>{const a=Object.keys(e);return D(Zs,Object.assign({title:t.getVal("informationCouldNotBeSubmitted"),type:zs.ERROR,hasCloseButton:!1},{children:D("div",Object.assign({className:"adl-alert__explanation adyen-kyc-error-panel__validation-errors"},{children:1===(null==a?void 0:a.length)?D("div",Object.assign({"data-testid":"validation-error--case-1"},{children:[t.getVal({translationKey:"fieldHasUnsupportedFormats",translationObject:{values:{fieldName:t.getLabel(a[0])}}}).toString()," ",D(al,{fieldName:a[0],label:t.getVal("updateTheInformation")})," ",t.getVal("andResubmit")]})):D("div",Object.assign({"data-testid":"validation-error--case-2"},{children:[t.getVal("someFieldsHaveUnsupportedFormatedUpdateInfoAndResubmit"),D("ul",{children:a.map((e=>D("li",Object.assign({className:"adyen-kyc-error-panel__validation-error"},{children:D(al,{fieldName:e,label:t.getLabel(e)})}),e)))})]}))}))}))};var nl;!function(e){e.DATA_MISSING="dataMissing",e.INVALID_INPUT="invalidInput",e.PENDING_STATUS="pendingStatus"}(nl||(nl={}));const il={"1_100":[],"1_101":[],"1_102":[{key:"documents"}],"1_300":[{key:"individual.birthData.dateOfBirth"},{key:"individual.identificationData.number"},{key:"individual.name.firstName"},{key:"individual.name.lastName"},{key:"individual.residentialAddress"}],"1_301":[{key:"documents",type:["passport","driversLicense","identityCard"]}],"1_302":[{key:"documents",type:["passport","driversLicense","identityCard"]}],"1_303":[{key:"documents",type:["passport","driversLicense","identityCard"]}],"1_304":[{key:"documents",type:["proofOfResidency"]}],"1_305":[{key:"documents",type:["proofOfResidency"]}],"1_306":[{key:"documents",type:["proofOfResidency"]}],"1_307":[{key:"documents",type:["proofOfNationalIdNumber"]}],"1_308":[{key:"documents",type:["proofOfNationalIdNumber"]}],"1_309":[{key:"documents",type:["proofOfNationalIdNumber"]}],"1_313":[{key:"documents",type:["proofOfIndividualTaxId"]}],"1_314":[{key:"documents",type:["proofOfIndividualTaxId"]}],"1_315":[{key:"documents",type:["proofOfIndividualTaxId"]}],"1_316":[{key:"individual.identificationData.number"}],"1_500":[{key:"organization.legalName"},{key:"organization.registrationNumber"},{key:"organization.taxId"},{key:"organization.registeredAddress"}],"1_501":[{key:"documents",type:["registrationDocument"]}],"1_502":[{key:"documents",type:["registrationDocument"]}],"1_503":[{key:"documents",type:["taxDocument"]}],"1_504":[{key:"documents",type:["taxDocument"]}],"1_505":[{key:"documents",type:["proofOfAddress"]}],"1_506":[{key:"documents",type:["proofOfAddress"]}],"1_507":[],"1_508":[],"1_512":[{key:"documents",type:["taxDocument"]}],"1_513":[{key:"documents",type:["taxDocument"]}],"1_600":[{key:"soleProprietorship.name"},{key:"soleProprietorship.registeredAddress"}],"1_601":[{key:"documents",type:["solePropConstitutionalDocument"]}],"1_602":[{key:"documents",type:["solePropConstitutionalDocument"]}],"1_700":[{key:"bankAccount"}],"1_701":[{key:"bankAccount"}],"1_702":[{key:"bankAccount"}],"1_703":[{key:"documents",type:["bankStatementDocument"]}],"1_704":[{key:"documents",type:["bankStatementDocument"]}],"1_705":[{key:"documents",type:["bankStatementDocument"]}]};var ol,sl;!function(e){e.INDIVIDUAL="individual",e.ORGANIZATION="organization",e.TRUST="trust",e.SOLE_PROPRIETORSHIP="soleProprietorship"}(ol||(ol={})),function(e){e.BANK_ACCOUNT="bankAccount",e.RECURRING_DETAIL="recurringDetail"}(sl||(sl={}));const ll={INDIVIDUAL:["personalDetails.firstName","personalDetails.lastName","personalDetails.residencyCountry"],DECISIONMAKER:["personalDetails.firstName","personalDetails.lastName","personalDetails.residencyCountry","personalDetails.role","personalDetails.jobTitle"],ORGANIZATION:["companyNameAndCountry.legalCompanyName","companyNameAndCountry.companyCountry"],SOLE_PROPRIETORSHIP:["solePropNameAndCountry.legalCompanyName","solePropNameAndCountry.companyCountry"]},dl={"personalDetails.firstName":"individual.name.firstName","personalDetails.lastName":"individual.name.lastName","personalDetails.birthDate":"individual.birthData.dateOfBirth","personalDetails.idNumber":"individual.identificationData.number","personalDetails.phoneNumber":"individual.phone.number","personalDetails.email":"individual.email","personalDetails.idNumberExempt":"individual.identificationData.nationalIdExempt","personalDetails.typeOfIdentity":"individual.identificationData.type","personalDetails.issuerState":"individual.identificationData.issuerState","personalDetails.licenseCardNumber":"individual.identificationData.cardNumber","address.city":"individual.residentialAddress.city","address.country":"individual.residentialAddress.country","address.postalCode":"individual.residentialAddress.postalCode","address.stateOrProvince":"individual.residentialAddress.stateOrProvince","address.street":"individual.residentialAddress.street","address.houseNumberOrName":"individual.residentialAddress.street2"},cl=Object.assign(Object.assign({},dl),{"personalDetails.residencyCountry":"individual.residentialAddress.country"}),ul=Object.assign({},q(dl)),ml={"payoutAccountDetails.transferInstrumentId":"id","payoutAccountDetails.accountType":"bankAccount.accountType","payoutAccountDetails.bankAccountNumber":"bankAccount.accountNumber","payoutAccountDetails.bankBicSwift":"bankAccount.bankBicSwift","payoutAccountDetails.bankCity":"bankAccount.bankCity","payoutAccountDetails.bankCode":"bankAccount.bankCode","payoutAccountDetails.bankName":"bankAccount.bankName","payoutAccountDetails.branchCode":"bankAccount.branchCode","payoutAccountDetails.checkCode":"bankAccount.checkCode","payoutAccountDetails.bankCountry":"bankAccount.countryCode","payoutAccountDetails.currency":"bankAccount.currencyCode","payoutAccountDetails.iban":"bankAccount.iban"},pl={"companyNameAndCountry.legalCompanyName":"organization.legalName","companyType.entityType":"organization.type","companyDetails.tradingName":"organization.doingBusinessAs","companyDetails.registrationNumber":"organization.registrationNumber","companyDetails.vatNumber":"organization.vatNumber","companyDetails.exemptedFromVat":"organization.vatAbsenceReason","companyDetails.vatAbsenceReason":"organization.vatAbsenceReason","companyDetails.taxInformation":"organization.taxInformation","companyDetails.stockExchangeMIC":"organization.stockData.marketIdentifier","companyDetails.stockISIN":"organization.stockData.stockNumber","companyRegistrationDetails.registrationAddress.city":"organization.registeredAddress.city","companyRegistrationDetails.registrationAddress.country":"organization.registeredAddress.country","companyRegistrationDetails.registrationAddress.postalCode":"organization.registeredAddress.postalCode","companyRegistrationDetails.registrationAddress.stateOrProvince":"organization.registeredAddress.stateOrProvince","companyRegistrationDetails.registrationAddress.street":"organization.registeredAddress.street","companyRegistrationDetails.registrationAddress.houseNumberOrName":"organization.registeredAddress.street2","companyRegistrationDetails.operationalAddress.city":"organization.principalPlaceOfBusiness.city","companyRegistrationDetails.operationalAddress.country":"organization.principalPlaceOfBusiness.country","companyRegistrationDetails.operationalAddress.postalCode":"organization.principalPlaceOfBusiness.postalCode","companyRegistrationDetails.operationalAddress.stateOrProvince":"organization.principalPlaceOfBusiness.stateOrProvince","companyRegistrationDetails.operationalAddress.street":"organization.principalPlaceOfBusiness.street","companyRegistrationDetails.operationalAddress.houseNumberOrName":"organization.principalPlaceOfBusiness.street2"},gl={"trustRegistrationDetails.trustType":"trust.type","trustRegistrationDetails.vatNumber":"trust.vatNumber","trustRegistrationDetails.legalName":"trust.name","trustRegistrationDetails.country":"trust.countryOfGoverningLaw","trustRegistrationAddress.registrationAddress.city":"trust.registeredAddress.city","trustRegistrationAddress.registrationAddress.country":"trust.registeredAddress.country","trustRegistrationAddress.registrationAddress.postalCode":"trust.registeredAddress.postalCode","trustRegistrationAddress.registrationAddress.stateOrProvince":"trust.registeredAddress.stateOrProvince","trustRegistrationAddress.registrationAddress.street":"trust.registeredAddress.street","trustRegistrationAddress.registrationAddress.houseNumberOrName":"trust.registeredAddress.street2","trustRegistrationAddress.operationalAddress.city":"trust.principalPlaceOfBusiness.city","trustRegistrationAddress.operationalAddress.country":"trust.principalPlaceOfBusiness.country","trustRegistrationAddress.operationalAddress.postalCode":"trust.principalPlaceOfBusiness.postalCode","trustRegistrationAddress.operationalAddress.stateOrProvince":"trust.principalPlaceOfBusiness.stateOrProvince","trustRegistrationAddress.operationalAddress.street":"trust.principalPlaceOfBusiness.street","trustRegistrationAddress.operationalAddress.houseNumberOrName":"trust.principalPlaceOfBusiness.street2"},yl={"solePropNameAndCountry.legalCompanyName":"soleProprietorship.name","solePropNameAndCountry.companyCountry":"soleProprietorship.countryOfGoverningLaw","solePropRegistrationDetails.tradingName":"soleProprietorship.doingBusinessAs","solePropRegistrationDetails.vatNumber":"soleProprietorship.vatNumber","solePropRegistrationDetails.registrationNumber":"soleProprietorship.registrationNumber","solePropRegistrationDetails.exemptedFromVat":"soleProprietorship.vatAbsenceReason","solePropRegistrationDetails.vatAbsenceReason":"soleProprietorship.vatAbsenceReason","solePropRegistrationDetails.taxInformation":"soleProprietorship.taxInformation","solePropRegistrationAddress.registrationAddress.city":"soleProprietorship.registeredAddress.city","solePropRegistrationAddress.registrationAddress.country":"soleProprietorship.registeredAddress.country","solePropRegistrationAddress.registrationAddress.postalCode":"soleProprietorship.registeredAddress.postalCode","solePropRegistrationAddress.registrationAddress.stateOrProvince":"soleProprietorship.registeredAddress.stateOrProvince","solePropRegistrationAddress.registrationAddress.street":"soleProprietorship.registeredAddress.street","solePropRegistrationAddress.registrationAddress.houseNumberOrName":"soleProprietorship.registeredAddress.street2","solePropRegistrationAddress.operationalAddress.city":"soleProprietorship.principalPlaceOfBusiness.city","solePropRegistrationAddress.operationalAddress.country":"soleProprietorship.principalPlaceOfBusiness.country","solePropRegistrationAddress.operationalAddress.postalCode":"soleProprietorship.principalPlaceOfBusiness.postalCode","solePropRegistrationAddress.operationalAddress.stateOrProvince":"soleProprietorship.principalPlaceOfBusiness.stateOrProvince","solePropRegistrationAddress.operationalAddress.street":"soleProprietorship.principalPlaceOfBusiness.street","solePropRegistrationAddress.operationalAddress.houseNumberOrName":"soleProprietorship.principalPlaceOfBusiness.street2"},bl=Object.assign({"companyNameAndCountry.companyCountry":"organization.registeredAddress.country"},pl),fl=Object.assign({},q(pl)),hl=Object.assign({},ml),vl=Object.assign({},q(ml)),_l=Object.assign(Object.assign({},fl),{"organization.registeredAddress":"companyRegistrationDetails.registrationAddress"}),Nl=Object.assign(Object.assign({},ul),{"individual.residentialAddress":"address.address"}),Ol=Object.assign({bankAccount:"payoutAccountDetails"},vl),Il=Object.assign({},gl),El=Object.assign({},q(gl)),Tl=Object.assign({},yl),Al=Object.assign({},q(yl)),Sl={passport:"idDocument.idDocument",driversLicense:"idDocument.idDocument",identityCard:"idDocument.idDocument",proofOfNationalIdNumber:"proofOfNationalId.proofOfNationalId",proofOfResidency:"proofOfResidence.proofOfResidence",proofOfIndividualTaxId:"",registrationDocument:"companyRegistrationDocument.registrationDocument",taxDocument:"companyTaxDocument.taxDocument",proofOfAddress:"",bankStatementDocument:"payoutAccountDocuments.bankStatementDocument",trustDocument:"trustDocument.trustDocument",solePropConstitutionalDocument:"solePropConstitutionalDocument.constitutionalDocument"};var Cl,Rl;function Dl(e,t){var a,r,n,i,o,s,l,d,c,u,m,p,g,y,b,f,h,v,_,N,O,I;if(t){const E={placeholders:{},labels:{},data:{},formVerificationErrors:{},requiredFields:[],optionalFields:[],maskedFields:[],validators:null};return E.placeholders=Object.assign({},null===(a=e.placeholders)||void 0===a?void 0:a[t]),E.labels=Object.assign({},null===(r=e.labels)||void 0===r?void 0:r[t]),E.data=Object.assign({},null===(n=e.data)||void 0===n?void 0:n[t]),(null===(i=e.readOnlyFields)||void 0===i?void 0:i[t])&&(E.readOnlyFields=null===(o=e.readOnlyFields)||void 0===o?void 0:o[t]),(null===(s=e.requiredFields)||void 0===s?void 0:s[t])&&(E.requiredFields=null===(l=e.requiredFields)||void 0===l?void 0:l[t]),(null===(d=e.optionalFields)||void 0===d?void 0:d[t])&&(E.optionalFields=null===(c=e.optionalFields)||void 0===c?void 0:c[t]),(null===(u=e.validators)||void 0===u?void 0:u[t])&&(E.validators=Object.assign({},null===(m=e.validators)||void 0===m?void 0:m[t])),(null===(p=e.verifyFields)||void 0===p?void 0:p[t])&&(E.verifyFields=null===(g=e.verifyFields)||void 0===g?void 0:g[t]),(null===(b=null===(y=e.problems)||void 0===y?void 0:y.verificationErrors)||void 0===b?void 0:b[t])&&(E.formVerificationErrors=null===(h=null===(f=e.problems)||void 0===f?void 0:f.verificationErrors)||void 0===h?void 0:h[t]),(null===(_=null===(v=e.problems)||void 0===v?void 0:v.validationErrors)||void 0===_?void 0:_[t])&&(E.fieldValidationErrors=null===(O=null===(N=e.problems)||void 0===N?void 0:N.validationErrors)||void 0===O?void 0:O[t]),(null===(I=e.maskedFields)||void 0===I?void 0:I[t])&&(E.maskedFields=e.maskedFields[t]),E}return null}function kl(e,t){if(t){const a={placeholders:{},labels:{},data:{},requiredFields:[],maskedFields:[],optionalFields:[],readOnlyFields:[],verifyFields:[],fieldValidationErrors:{}};return t.forEach((t=>{var r,n,i,o,s,l,d,c,u,m,p;a.placeholders[t]=null===(r=e.placeholders)||void 0===r?void 0:r[t],a.labels[t]=null===(n=e.labels)||void 0===n?void 0:n[t],a.data[t]=null===(i=e.data)||void 0===i?void 0:i[t],(null===(o=e.readOnlyFields)||void 0===o?void 0:o.includes(t))&&a.readOnlyFields.push(t),(null===(s=e.requiredFields)||void 0===s?void 0:s.includes(t))&&a.requiredFields.push(t),(null===(l=e.optionalFields)||void 0===l?void 0:l.includes(t))&&a.optionalFields.push(t),(null===(d=e.verifyFields)||void 0===d?void 0:d.includes(t))&&a.verifyFields.push(t),(null===(c=e.fieldValidationErrors)||void 0===c?void 0:c[t])&&(a.fieldValidationErrors[t]=e.fieldValidationErrors[t]),(null===(u=e.maskedFields)||void 0===u?void 0:u.includes(t))&&a.maskedFields.push(t),(null===(m=e.validators)||void 0===m?void 0:m[t])&&((null==a?void 0:a.validators)||(a.validators={}),a.validators[t]=null===(p=e.validators)||void 0===p?void 0:p[t])})),a}return null}!function(e){e[e.EMPTY=0]="EMPTY",e[e.FINISHED=1]="FINISHED",e[e.PROCESSING=2]="PROCESSING",e[e.DETAILS_REQUIRED=3]="DETAILS_REQUIRED",e[e.DOWNLOAD=4]="DOWNLOAD",e[e.ERROR=5]="ERROR"}(Cl||(Cl={})),function(e){e.TASKS_OVERVIEW="TASKS_OVERVIEW",e.INDIVIDUAL="INDIVIDUAL",e.COMPANY="COMPANY",e.PAYOUT="PAYOUT",e.PAYIN="PAYIN",e.SERVICE_AGREEMENT="SERVICE_AGREEMENT",e.PCI_DSS="PCI_DSS",e.DECISION_MAKER_OVERVIEW="DECISION_MAKER_OVERVIEW",e.TRUST="TRUST",e.TRUST_MEMBER_OVERVIEW="TRUST_MEMBER",e.DECISION_MAKER="DECISION_MAKER",e.TRUST_MEMBER_INDIVIDUAL="TRUST_MEMBER_INDIVIDUAL",e.TRUST_MEMBER_COMPANY="TRUST_MEMBER_COMPANY",e.TRUST_MEMBER_ROLE_AND_TYPE="TRUST_MEMBER_ROLE_AND_TYPE",e.TRUST_MEMBER_COMPANY_OWNER="TRUST_MEMBER_COMPANY_OWNER",e.SOLE_PROPRIETOR_COMPANY="SOLE_PROPRIETOR_COMPANY",e.LEGAL_ENTITY_TYPE_SWITCHER="LEGAL_ENTITY_TYPE_SWITCHER"}(Rl||(Rl={}));const Ll={entityType:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}};var wl;!function(e){e.PRIVATE_COMPANY="privateCompany",e.PUBLIC_COMPANY="listedPublicCompany",e.UNLISTED_PUBLIC_COMPANY="unlistedPublicCompany",e.INCORPORATED_PARTNERSHIP="partnershipIncorporated",e.INCORPORATED_ASSOCIATION="associationIncorporated",e.GOVERNMENTAL_ORGANIZATION="governmentalOrganization",e.NON_PROFIT_OR_CHARITABLE="nonProfit",e.SOLE_PROPRIETORSHIP="soleProprietorship"}(wl||(wl={}));const Pl={entityType:{rule:"REQUIRED"},legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"},tradingName:{rule:"REQUIRED"},sameNameAsLegalName:{rule:"REQUIRED"},registrationNumber:{rule:"registrationNumberIfCountryNotUs"},registrationAddress:{rule:"REQUIRED"},operationalAddress:{rule:"OPTIONAL"},stockExchangeMIC:{rule:"stockExchangeMICIfTypePublic"},stockISIN:{rule:"stockISINIfTypePublic"},isPartOfTrust:{rule:"partOfTrustFieldsOnlyAU"},accountHolder:{rule:"accountHolderIfCustomer"}},jl=[{id:wl.PRIVATE_COMPANY,name:"privateCompanyTitle",description:"privateCompanyDescription"},{id:wl.PUBLIC_COMPANY,name:"publicCompanyTitle",description:"publicCompanyDescription"},{id:wl.INCORPORATED_PARTNERSHIP,name:"incorporatedPartnershipTitle",description:"incorporatedPartnershipDescription"},{id:wl.NON_PROFIT_OR_CHARITABLE,name:"nonProfitOrCharitableOrgTitle",description:"nonProfitOrCharitableOrgDescription"},{id:wl.GOVERNMENTAL_ORGANIZATION,name:"governmentalOrganizationTitle",description:"governmentalOrganizationDescription"},{id:wl.INCORPORATED_ASSOCIATION,name:"associationIncorporatedTitle",description:"associationIncorporatedDescription"}],xl={L0:{legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"},stateOrProvince:{rule:"REQUIRED"}},L1:Object.assign({},Pl),L:Object.assign(Object.assign({},Pl),{vatNumber:{rule:"vatRules"},exemptedFromVat:{rule:"vatRules"},vatAbsenceReason:{rule:"vatRules"},taxId:{rule:"taxIdRules"},exemptedFromTax:{rule:"exemptedFromTaxRules"}}),L_REGDOC:{registrationDocument:{rule:"REQUIRED"}},L_TAXDOC:{taxDocument:{rule:"REQUIRED"}},L_PROOFOFADDRESS:{proofOfAddressDocument:{rule:"REQUIRED"}}},Ml={AT:{vatNumber:{label:"UST-ID"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"firmenbuchnummer"},exemptedFromRegistrationNumber:{label:"doNotHaveFirmenbuchnummer"}},AU:{legalName:{label:"companyName"},legalEntityType:{label:"companyType"},registrationNumber:{label:"australianBusinessNumberAcn"},taxId:{label:"australianBusinessNumberAbn"},exemptedFromTax:{label:"doNotHaveABN"}},BE:{vatNumber:{label:"euVatNumber"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"enterpriseNumber"}},BG:{registrationNumber:{label:"uniqueIdentificationCode"},vatNumber:{label:"identifikacionenNomerDDS"},exemptedFromVat:{label:"vatNumberExempted"}},BR:{registrationNumber:{label:"CNPJ"}},CA:{tradingName:{label:"doingBusinessAs"},taxId:{label:"businessNumber"},registrationNumber:{label:"incorporationNumber"}},CH:{registrationNumber:{label:"unternehmens-Identifikationsnummer"},vatNumber:{label:"Mehrwertsteuernummer"},exemptedFromVat:{label:"vatNumberExempted"}},CY:{registrationNumber:{label:"cyRegistrationNumber"},vatNumber:{label:"arithmosEngraphes"},exemptedFromVat:{label:"vatNumberExempted"}},CZ:{vatNumber:{label:"DIC"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"ICO"}},DE:{vatNumber:{label:"USt-IdNr"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"handelsregisternummer"}},DK:{registrationNumber:{label:"CVR-nummer"},vatNumber:{label:"momsregistreringsnummerOrStamregister"},exemptedFromVat:{label:"vatNumberExempted"}},EE:{registrationNumber:{label:"registrikood"},vatNumber:{label:"kaibemaksukohustuslaseNumber"},exemptedFromVat:{label:"vatNumberExempted"}},ES:{vatNumber:{label:"NIFdeIVA"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"NIF"}},FI:{registrationNumber:{label:"Y-TUNNUS"},vatNumber:{label:"arvonlisaveronumeroMervardesskattenummer"},exemptedFromVat:{label:"vatNumberExempted"}},FR:{vatNumber:{label:"NumeroDeTVA"},registrationNumber:{label:"SIRETOrSIREN"}},GB:{vatNumber:{label:"vatNumber"},registrationNumber:{label:"companyNumber"}},GR:{registrationNumber:{label:"GEMI-number"},vatNumber:{label:"grTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},HK:{legalName:{label:"companyName"},legalEntityType:{label:"typeOfCompany"},tradingName:{label:"businessName"},registrationNumber:{label:"companyNumber"},registrationDocument:{label:"companyRegistrationDocument"},taxId:{label:"businessRegistrationNumber"},exemptedFromTax:{label:"doNotHaveBusinessRegistrationNumber"}},HR:{registrationNumber:{label:"MBS"},vatNumber:{label:"PDVIdBrojOIB"},exemptedFromVat:{label:"vatNumberExempted"}},HU:{registrationNumber:{label:"huRegistrationNumber"},vatNumber:{label:"huTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},IE:{registrationNumber:{label:"companyNumber"},vatNumber:{label:"valueAddedTaxIdentificationNumber"},exemptedFromVat:{label:"vatNumberExempted"}},IT:{vatNumber:{label:"partitaIVA"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"codiceFiscaleOrCCIAA"}},JP:{vatNumber:{label:"taxNumberCorporateNumber"},registrationDocument:{label:"chamberOfCommerceExtract"}},LT:{registrationNumber:{label:"ltRegistrationNumber"},vatNumber:{label:"PVMmoketojoKodas"},exemptedFromVat:{label:"vatNumberExempted"}},LU:{registrationNumber:{label:"luRegistrationNumber"},vatNumber:{label:"numeroDIdentificationALATaxe"},exemptedFromVat:{label:"vatNumberExempted"}},LV:{registrationNumber:{label:"lvRegistrationNumber"},vatNumber:{label:"lvTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},MX:{registrationNumber:{label:"RFC"},registrationDocument:{label:"RfcDocument"}},MY:{registrationNumber:{label:"companyNumber"},registrationDocument:{label:"companyProfile"},vatNumber:{label:"SST"}},NL:{vatNumber:{label:"euVatNumber"},registrationNumber:{label:"chamberOfCommerceRegistrationNumber"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"}},NO:{vatNumber:{label:"skattenummer"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"organisasjonsnummer"}},NZ:{legalName:{label:"companyName"},legalEntityType:{label:"entityType"},registrationNumber:{label:"companyNumber"},vatNumber:{label:"irdNumber"},exemptedFromVat:{label:"vatNumberExempted"},taxDocument:{label:"irdDocument"},taxId:{label:"IRD/GST"},exemptedFromTax:{label:"doNotHaveIRD/GST"}},PL:{vatNumber:{label:"NIP"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"regonKrsNumber"}},PT:{vatNumber:{label:"numerodeIVA"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"NIPC"}},RO:{registrationNumber:{label:"numarOrdineRegistrulComertului"},vatNumber:{label:"codulDeIdentificareFiscala"},exemptedFromVat:{label:"vatNumberExempted"}},SE:{vatNumber:{label:"momsregistreringsnummer"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"organisationsnummer"},exemptedFromRegistrationNumber:{label:"doNotHaveOrganisationsnummer"}},SG:{vatNumber:{label:"taxReferenceNumber"},exemptedFromVat:{label:"vatNumberExempted"},legalName:{label:"companyName"},legalEntityType:{label:"companyType"},taxId:{label:"UEN/GST"},exemptedFromTax:{label:"doNotHaveUEN/GST"}},SI:{registrationNumber:{label:"siRegistrationNumber"},vatNumber:{label:"siTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},SK:{registrationNumber:{label:"skRegistrationNumber"},vatNumber:{label:"skTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},US:{tradingName:{label:"doingBusinessAs"},taxId:{label:"employerIdentificationNumber"},exemptedFromTax:{label:"doNotHaveEIN"}}};var Fl;!function(e){e.IS_PART_OF_TRUST="isPartOfTrustAnswerYes",e.IS_NOT_PART_OF_TRUST="isPartOfTrustAnswerNo"}(Fl||(Fl={}));const Vl=[{id:Fl.IS_NOT_PART_OF_TRUST,name:"no"},{id:Fl.IS_PART_OF_TRUST,name:"yes"}],Ul={isPartOfTrust:Fl.IS_NOT_PART_OF_TRUST},Bl=["isPartOfTrust"];function Wl(e){var t,a,r;const{i18n:n,commonProps:i}=He(),{dataStoreId:o,validators:s,isReadOnlyOnDefaultDataYes:l=!1}=e,d=me({setState:null}),{handleChangeFor:c,data:u,valid:m,errors:p,isValid:g,fieldProblems:y,triggerValidation:b}=ma(Object.assign(Object.assign({},e),{schema:Bl,rules:s,defaultData:(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.isPartOfTrust)?e.data:Ul,fieldProblems:null==e?void 0:e.fieldValidationErrors}));ce((()=>{d.current.setState({type:"addToState",value:{data:u,valid:m,errors:p,fieldProblems:y,caller:"partOfTrust",dataStoreId:o}})}),[u,m,p,g]);const f=na(e,n);this.triggerValidation=b;const h=n.get((null==e?void 0:e.legalEntityType)===ol.INDIVIDUAL?"areYouPartOfTrust":"isBusinessPartOfTrust"),v=l&&(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.isPartOfTrust)===Fl.IS_PART_OF_TRUST;return ce((()=>{b()}),[]),D("div",Object.assign({className:"adyen-kyc-part-of-trust"},{children:[D(Ks,{stateRef:d}),D(Be,Object.assign({name:"isPartOfTrust",useLabelElement:!1,label:h,classNameModifiers:["isPartOfTrust"],errorMessage:null===(r=p.isPartOfTrust)||void 0===r?void 0:r.errorMessage,showInlineErrors:i.showInlineErrors,disabled:v},{children:ea("radio",{name:"isPartOfTrust",items:Vl,value:u.isPartOfTrust,i18n:n,disabled:v,onInput:c("isPartOfTrust"),onChange:c("isPartOfTrust"),"aria-required":!0,"aria-label":f.getLabel("isPartOfTrust"),"aria-invalid":!m.isPartOfTrust})}))]}))}var Hl;!function(e){e.MY_NAME="myName",e.MY_SOLE_TRADER_NAME="mySoleTraderName",e.THE_COMPANY_I_WORK_FOR="theCompanyIWorkFor",e.A_TRUST="aTrust",e.A_PARTNERSHIP="aPartnership",e.AN_ASSOCIATION="anAssociation"}(Hl||(Hl={}));const ql={accountHolder:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}};var Gl;!function(e){e.CONTROLLING_PERSON="uboThroughControl",e.OWNER="uboThroughOwnership",e.SIGNATORY="signatory",e.DIRECTOR="director"}(Gl||(Gl={}));const $l=["GB","NL","DE","BE","ES","CZ","DK","FR","IT","AT","US","SK","SI","NO","HU"],Xl=["US","CA"],Yl=["US"],Kl=["AU"],zl=t.createContext(null);function Zl(){const e=ye(zl);if(void 0===e)throw new Error("useSettingsContext must be used within a SettingsProvider");return e}const Ql=["accountHolder"],Jl=[{id:Hl.MY_NAME,name:"myName",description:"myNameDescription",type:ol.INDIVIDUAL},{id:Hl.THE_COMPANY_I_WORK_FOR,name:"theCompanyIWorkFor",description:"theCompanyIWorkForDescription",type:ol.ORGANIZATION}],ed={id:Hl.MY_SOLE_TRADER_NAME,name:"mySoleTraderName",description:"mySoleTraderNameDescription",type:ol.SOLE_PROPRIETORSHIP};function td(e){const{i18n:t,commonProps:a}=He(),r=me({setState:null}),{dataStoreId:n}=e,{isSettingEnabled:i}=Zl(),o=i("changeLegalEntityType"),{handleChangeFor:s,data:l,valid:d,errors:c,fieldProblems:u,triggerValidation:m}=ma(Object.assign(Object.assign({},e),{schema:["accountHolder"],defaultData:e.data,rules:e.validators||ql,fieldProblems:null==e?void 0:e.fieldValidationErrors}));ce((()=>{r.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,caller:"AccountHolder",dataStoreId:n}})}),[l,c,d]);const p=na(e,t),g=t.get("nameOfBankAccountHolder");this.triggerValidation=m;const[y,b]=le([]),f=()=>{if(e.legalEntityType===ol.ORGANIZATION)return o?Jl:Jl.filter((e=>e.id===Hl.THE_COMPANY_I_WORK_FOR));{let t=[];return t=o?Jl:Jl.filter((e=>e.id===Hl.MY_NAME)),$l.includes(e.country)?[...t,ed]:t}};return ce((()=>{const e=f();b((()=>Object.values(e).map((({id:e,name:a,description:r})=>({id:e,name:t.get(a),description:t.get(r)})))))}),[t.languageCode,t.locale,e.country,e.legalEntityType]),D("div",{children:[D(Ks,{stateRef:r}),y.length>1?D(Be,Object.assign({name:"accountHolder",label:g,errorMessage:p.getErrorMessage("accountHolder",c,u),isValid:d.accountHolder,showInlineErrors:a.showInlineErrors,classNameModifiers:["account-holder"]},{children:ea("select",{onChange:s("accountHolder","input"),name:"accountHolder",placeholder:t.get("selectAccountHolder"),selected:l.accountHolder,items:y})})):null]})}const ad=["entityType",...Bl,...Ql];function rd(e){const{i18n:a}=He(),r=me({setState:null}),{id:n,requiredFields:i}=e,o=me(null),{isSettingEnabled:s}=Zl(),l=s("enableTrustFlow"),d=i||ad,{handleChangeFor:c,data:u,valid:m,errors:p,isValid:g,triggerValidation:y,fieldProblems:b}=ma(Object.assign(Object.assign({},e),{schema:d,defaultData:e.data,rules:e.validators||Ll,fieldProblems:null==e?void 0:e.fieldValidationErrors})),f=na(e,a);this.triggerValidation=()=>{y(d),l&&f.isRequiredField("isPartOfTrust",!1)&&v.current.triggerValidation(),f.isRequiredField("accountHolder",!1)&&o.current.triggerValidation()};const h=kl(e,Ql);ce((()=>{r.current.setState({type:"addToState",value:{data:u,valid:m,errors:p,fieldProblems:b,caller:n,dataStoreId:n,schema:d}})}),[u,m,p,g]);const v=me(null),_=kl(e,Bl);return D(t.Fragment,{children:[D(Ks,{owner:n,stateRef:r}),D("form",Object.assign({className:"adyen-kyc-company__company-type"},{children:[D(Fs,{heading:e.heading}),D(Gc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:f,id:"ariaErrorField"}),f.isRequiredField("entityType")&&D(Be,Object.assign({name:"entityType",useLabelElement:!1,errorMessage:f.getErrorMessage("entityType",p,b),label:f.getLabel("entityType","whatTypeOfCompanyDoYouHave"),classNameModifiers:["entityType"]},{children:ea("radioCard",{name:"entityType",items:jl,value:u.entityType,i18n:a,readonly:f.isReadOnly("entityType"),onInput:c("entityType"),onChange:c("entityType"),"aria-required":!0,"aria-label":f.getLabel("entityType","whatTypeOfCompanyDoYouHave"),"aria-invalid":!m.entityType})})),l&&f.isRequiredField("isPartOfTrust",!1)&&D(Wl,Object.assign({},_,{legalEntityType:ol.ORGANIZATION,ref:v,dataStoreId:n,isReadOnlyOnDefaultDataYes:!0})),f.isRequiredField("accountHolder")&&D(td,Object.assign({},h,{ref:o,dataStoreId:n,legalEntityType:ol.ORGANIZATION}))]}))]})}var nd;!function(e){e.OPERATIONAL_ADDRESS_IS_SAME="OperationAddressAnswerYes",e.OPERATIONAL_ADDRESS_IS_NOT_SAME="OperationAddressAnswerNo"}(nd||(nd={}));const id=[{id:nd.OPERATIONAL_ADDRESS_IS_SAME,name:"operationalAddressIsSameItemName"},{id:nd.OPERATIONAL_ADDRESS_IS_NOT_SAME,name:"operationalAddressIsNotSameItemName"}],od={operationalAddressIsSame:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},sd=t.createContext(null);function ld({children:e,className:t,expand:r=!1,type:n,onExpandSection:i}){const[o,s]=le([]),l=a("adl-accordion",t,{"adl-accordion--container":"container"===n,"adl-accordion--guide":"guide"===n});return D(sd.Provider,Object.assign({value:{expand:r,items:o,setItems:s,onExpandSection:i}},{children:D("div",Object.assign({className:l},{children:e}))}))}function dd({children:e,collapsed:t=!1,animationDuration:a}){const r=me(null),[n,i]=le(t?0:void 0);return ce((()=>{var e;i(t?0:null===(e=r.current)||void 0===e?void 0:e.scrollHeight)}),[t]),D("div",Object.assign({className:"adyen-collapsible-container","aria-hidden":t,ref:r,style:{height:n,transitionDuration:a}},{children:e}))}var cd;function ud({children:e,open:t=!1,title:a="",subTitle:r="",expandIconPlacement:n=cd.Left,iconPlacement:i=cd.Left,icon:o="",onOpen:s=$,onClose:l=$}){const{expand:d,items:c,setItems:u,onExpandSection:m}=ye(sd),[p,g]=le(t),[y]=le(Ue);return ce((()=>{u((e=>[...e,{id:y,isOpen:p}]))}),[]),ce((()=>{g(t)}),[t]),ce((()=>{var e;g(null===(e=c.find((e=>e.id===y)))||void 0===e?void 0:e.isOpen)}),[c]),ce((()=>{p&&(null==m||m(a))}),[p]),D("div",Object.assign({className:"adl-accordion__item"},{children:[D("div",Object.assign({role:"button",className:"adl-accordion__header",tabIndex:0,onClick:()=>{const e=!p,t=[...c];d?(t.find((e=>e.id===y)).isOpen=e,u(t)):u(t.map((t=>Object.assign(Object.assign({},t),{isOpen:t.id===y&&e})))),p?l():s()}},{children:[n===cd.Left?D(Me,{name:p?"chevron-up":"chevron-down",className:"adl-accordion__toggle"}):null,o&&i===cd.Left?D(Me,{name:o,className:"adl-accordion__toggle"}):null,D("div",Object.assign({className:"adl-accordion__title-wrapper"},{children:[D("div",Object.assign({className:"adl-accordion__title"},{children:a})),r&&D("div",Object.assign({className:"adl-accordion__subtitle"},{children:r}))]})),n===cd.Right?D(Me,{name:p?"chevron-up":"chevron-down",className:"adl-accordion__toggle"}):null,o&&i===cd.Right?D(Me,{name:o,className:"adl-accordion__toggle"}):null]})),D(dd,Object.assign({collapsed:!p,animationDuration:"0.1s"},{children:D("div",Object.assign({className:"adl-accordion__content"},{children:e}))}))]}))}function md({page:e,title:t,content:a,titleId:r,contentId:n,onOpen:i=$,onClose:o=$}){return D(ld,Object.assign({type:"guide"},{children:D(ud,Object.assign({icon:"light-bulb",expandIconPlacement:cd.Right,title:t,onOpen:()=>{P.addEvent("Open contextual guidance information",{segmentation:{guidancePage:e,guidanceTitleId:r,guidanceContentId:n}}),i()},onClose:()=>{P.addEvent("Close contextual guidance information",{segmentation:{guidancePage:e,guidanceTitleId:r,guidanceContentId:n}}),o()}},{children:a}))}))}!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(cd||(cd={}));const pd=["registrationAddress","operationalAddress","operationalAddressIsSame"],gd={formId:"registrationAddress",formName:"registeredAddress",fields:["address"]}.formId,yd={formId:"operationalAddress",formName:"operationalAddressHeader",fields:["address"]}.formId;function bd(e){var a,r,n,i,o;const{i18n:s}=He(),{data:l,valid:d,errors:c,fieldProblems:u,handleChangeFor:m,triggerValidation:p}=ma(Object.assign(Object.assign({},e),{schema:["operationalAddressIsSame"],defaultData:e.data,rules:e.validators||od,maskedFields:[]})),g={[gd]:me(null),[yd]:me(null)},y=na(e,s),b=me({setState:null});ce((()=>{b.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:u,caller:e.id,dataStoreId:e.id,schema:["registrationAddress","operationalAddressIsSame",...f()?["operationalAddress"]:[]]}})}),[l.operationalAddressIsSame]),this.triggerValidation=()=>{p(),g[gd].current.triggerValidation(),f()&&g[yd].current.triggerValidation()};const f=()=>l.operationalAddressIsSame==nd.OPERATIONAL_ADDRESS_IS_NOT_SAME,h=Dl(e,gd),v=Dl(e,yd);return D(t.Fragment,{children:[D(Ks,{owner:e.id,stateRef:b}),D(Fs,{heading:e.heading,description:e.description}),D(Gc,{verificationErrors:null===(r=null===(a=null==e?void 0:e.problems)||void 0===a?void 0:a.verificationErrors)||void 0===r?void 0:r[e.id],validationErrors:null===(i=null===(n=null==e?void 0:e.problems)||void 0===n?void 0:n.validationErrors)||void 0===i?void 0:i[e.id],formUtils:y,id:"ariaErrorField"}),D(md,{page:"Company registered address",titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingCompanyAddressDetails",title:s.get("whyDoINeedToFillInThisInformation"),content:s.get("reasonForFillingCompanyAddressDetails")}),D(Xc,Object.assign({},h,{ref:g[gd],data:Object.assign(Object.assign({},h.data),{country:e.country}),hideCountry:!0,id:e.id,addressType:"registrationAddress",handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress})),D(Fs,{classNames:"adl-u-margin-top-32",heading:s.get("operationalAddressHeader")}),D(Be,Object.assign({name:"operationalAddressIsSame",useLabelElement:!1,label:y.getLabel("operationalAddressIsSame"),classNameModifiers:["operationalAddressIsSame"],errorMessage:null===(o=c.operationalAddressIsSame)||void 0===o?void 0:o.errorMessage},{children:ea("radio",{name:"operationalAddressIsSame",items:id,value:l.operationalAddressIsSame,i18n:s,readonly:y.isReadOnly("operationalAddressIsSame"),onInput:m("operationalAddressIsSame"),onChange:m("operationalAddressIsSame"),"aria-required":!0,"aria-label":y.getLabel("operationalAddressIsSame"),"aria-invalid":!d.operationalAddressIsSame})})),f()&&t.createElement(Xc,Object.assign({},v,{key:"operationalAddress",ref:g[yd],data:Object.assign(Object.assign({},v.data),{country:e.country}),hideCountry:!0,id:e.id,addressType:"operationalAddress",handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress}))]})}const fd={regex:/^\d{8}$/,message:"validationPleaseEnter8Digits"},hd={regex:/^\d{9}$/,message:"validationPleaseEnter9Digits"},vd={regex:/^\d{10}$/,message:"validationPleaseEnter10Digits"},_d={regex:/^\d{11}$/,message:"validationPleaseEnter11Digits"},Nd={regex:/^\d{12}$/,message:"validationPleaseEnter12Digits"},Od={AT:{regex:/^U\d{8}$/},BE:{regex:/^(1|0?)\d{9}$/},BG:{regex:/^\d{9,10}$/,message:"validationEnter9Or10Digits"},HR:_d,CY:{regex:/^[A-Z0-9]{9}/i},CZ:{regex:/^\d{8,10}$/,message:"validationEnterBetween8And10Digits"},EE:hd,FI:fd,FR:_d,DE:hd,EL:hd,HU:fd,IE:{regex:/^[A-Z0-9]{8,9}$/},IT:_d,LV:_d,LT:{regex:/^\d{9,12}$/,message:"validationEnter9Or12Digits"},LU:fd,MT:fd,NL:{regex:/^\d{9}B\d{2}$/},PL:{regex:/^\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d$/},PT:hd,RO:{regex:/^\d{2,12}$/},SE:{regex:/^\d{10}01$/},SK:vd,SI:fd,ES:{regex:/^[A-Z0-9]\d{7}[A-Z0-9]$/},AL:{regex:/[JK][A-Z0-9]{8}[A-Z]$/},BY:hd,CA:{regex:/^[A-Z0-9]{15}$/},GB:{regex:/^\d{9,12}$/},PH:Nd,RU:{regex:/^(\d{10}|\d{12})$/},SM:{regex:/^\d{5}$/,message:"validationPleaseEnter6Digits"},RS:hd,CH:{regex:/^(\d{6}|E\d{9}(TVA|MWST|IVA))$/},TR:vd,UA:Nd,AR:_d,CL:{regex:/^\d{8}-\d{1}$/},CO:vd,CR:{regex:/^\d{9,12}$/},EC:{regex:/^\d{13}$/,message:"validationPleaseEnter13Digits"},GT:{regex:/^\d{7}-\d{1}$/},PE:_d,VE:{regex:/^[JGVE]-\d{8}-?\d$/}},Id={NO:{regex:/^\d{9}MVA$/},DK:[{regex:/^DK\d{8}$/},{regex:/^SE\d{8}$/}],GR:[{regex:/^EL\d{9}$/}]},Ed="validationPleaseEnterAValidVatNumber",Td=({countryCode:e,specs:t,input:a})=>{const r=Array.isArray(t)?[...t]:[t];let n="";for(;r.length>0;){const t=r.shift();if(!("regex"in t)||!t.regex.test)throw new Error(`Invalid vat validation specification ${e}, ${JSON.stringify(r)}`);if(t.regex.test(a))return{isValid:!0};n=(null==t?void 0:t.message)||Ed}return{isValid:!1,message:n}},Ad=(e,t=null)=>{if(!e||!Ds(e)||e.length<3)return{isValid:!1,message:Ed};const a=t||((e||"").toUpperCase().match(/^[A-Z]{2}/)||[])[0];return a?a in Id?Td({countryCode:a,specs:Id[a],input:e}):a in Od?e.substring(0,2)!==t?{isValid:!1,message:"validationPrefixThevatNumberWith_countryCode"}:Td({countryCode:a,specs:Od[a],input:e.substring(2)}):/^[a-zA-Z0-9_. -]+$/.test(e)?{isValid:!0}:{isValid:!1,message:Ed}:{isValid:!1,message:Ed}},Sd={vatNumber:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}],vatAbsenceReason:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}]},Cd=e=>({translationKey:"validationPleaseEnterAValidVatNumberWithFormat",translationObject:{values:{format:e}}}),Rd={US:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"US");return t},errorMessage:Cd("XXXXXXXXX")}]},NL:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"NL");return t},errorMessage:Cd("NLXXXXXXXXXBXX")}]},DE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"DE");return t},errorMessage:Cd("DEXXXXXXXXX")}]},PL:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"PL");return t},errorMessage:Cd("PLXXXXXXXXXX")}]},AT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"AT");return t},errorMessage:Cd("ATUXXXXXXXX")}]},BE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"BE");return t},errorMessage:Cd("BEXXXXXXXXXX")}]},SE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"SE");return t},errorMessage:Cd("SEXXXXXXXXXX01")}]},ES:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"ES");return t},errorMessage:Cd("ESXXXXXXXXX")}]},FR:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"FR");return t},errorMessage:Cd("FRXXXXXXXXXXX")}]},PT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"PT");return t},errorMessage:Cd("PTXXXXXXXXX")}]},IT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"IT");return t},errorMessage:Cd("ITXXXXXXXXXXX")}]},CZ:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"CZ");return t},errorMessage:Cd("CZXXXXXXXX")}]},NO:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"NO");return t},errorMessage:Cd("XXXXXXXXXMVA")}]},GB:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"GB");return t},errorMessage:Cd('"GB" + 9-12 digits')}]},BG:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"BG");return t},errorMessage:Cd("BG999999999 or BG9999999999")}]},CH:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"CH");return t},errorMessage:Cd("CHE999999999TVA or CHE999999999IVA or CHE999999999MWST")}]},CY:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"CY");return t},errorMessage:Cd("CYXXXXXXXXX")}]},DK:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"DK");return t},errorMessage:Cd("DK99999999 or SE99999999")}]},EE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"EE");return t},errorMessage:Cd("EE999999999")}]},FI:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"FI");return t},errorMessage:Cd("FI99999999")}]},GR:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"GR");return t},errorMessage:Cd("EL999999999")}]},HR:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"HR");return t},errorMessage:Cd("HR99999999999")}]},HU:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"HU");return t},errorMessage:Cd("HU99999999")}]},IE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"IE");return t},errorMessage:Cd("IEXXXXXXXX or IEXXXXXXXXX")}]},LT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"LT");return t},errorMessage:Cd('"LT" + 9-12 digits')}]},LU:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"LU");return t},errorMessage:Cd("LU99999999")}]},LV:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"LV");return t},errorMessage:Cd("LV99999999999")}]},RO:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"RO");return t},errorMessage:Cd("RO + 2-12 characters")}]},SK:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"SK");return t},errorMessage:Cd("SK9999999999")}]},SI:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Ad(e,"SI");return t},errorMessage:Cd("SI99999999")}]}},Dd=["industryExemption","belowTaxThreshold"],kd=["vatNumber","exemptedFromVat","vatAbsenceReason"];function Ld(e){const{i18n:t,commonProps:a}=He(),r=na(e,t),n=me({setState:null}),i=As(Sd,Rd,e.country),{handleChangeFor:o,data:s,valid:l,errors:d,isValid:c,triggerValidation:u,fieldProblems:m}=ma(Object.assign(Object.assign({},e),{schema:e=>e.exemptedFromVat?["vatAbsenceReason","exemptedFromVat"]:["vatNumber","exemptedFromVat"],rules:i,defaultData:Object.assign(Object.assign({},e.data),{exemptedFromVat:!!e.data.exemptedFromVat}),fieldProblems:null==e?void 0:e.fieldValidationErrors}));return ce((()=>{s.vatNumber&&o("vatNumber","blur")(s.vatNumber)}),[e.country]),ce((()=>{n.current.setState({type:"addToState",value:{data:s,valid:l,errors:d,caller:"vatNumber",dataStoreId:e.dataStoreId}})}),[s,l,d,c]),this.triggerValidation=u,r.isRequiredField("vatNumber")?D("div",Object.assign({className:"adyen-kyc-field--tax-id"},{children:[D(Ks,{stateRef:n}),D(Be,Object.assign({name:"vatNumber",label:r.getLabel("vatNumber"),classNameModifiers:["tax-id"],errorMessage:r.getErrorMessage("vatNumber",d,m),isValid:l.vatNumber,showInlineErrors:a.showInlineErrors},{children:ea("text",{name:"vatNumber",value:s.vatNumber,readonly:r.isReadOnly("vatNumber"),classNameModifiers:["vatNumber"],onInput:o("vatNumber","input"),onBlur:o("vatNumber","blur"),disabled:s.exemptedFromVat,"aria-required":!0,"aria-label":r.getLabel("vatNumber"),"aria-invalid":!l.vatNumber})})),r.isRequiredField("exemptedFromVat")&&ea("boolean",{name:"exemptedFromVat",label:r.getLabel("exemptedFromVat"),value:"exemptedFromVat",readonly:r.isReadOnly("exemptedFromVat"),classNameModifiers:["exempted-from-tax"],checked:s.exemptedFromVat,onInput:o("exemptedFromVat"),"aria-required":!1,"aria-label":r.getLabel("exemptedFromVat"),"aria-invalid":!1}),s.exemptedFromVat?D(Be,Object.assign({name:"vatAbsenceReason",classNameModifiers:["tax-id-absence-reason"],label:r.getLabel("vatAbsenceReason"),errorMessage:r.getErrorMessage("vatAbsenceReason",d,m),isValid:l.vatAbsenceReason},{children:ea("select",{name:"vatAbsenceReason",onChange:o("vatAbsenceReason","input"),selected:s.vatAbsenceReason,items:Dd.map((e=>({id:e,name:t.get(e)})))})})):null]})):null}const wd={ein:[/^\d{2}-?\d{7}$/],ssn:[/^\d{9}$/,/^\d{4}$/,/^\d{3}-\d{2}-\d{4}$/],passport:[/^\w{6,11}$/],invalidEinPrefixes:[/^(00|07|08|09|17|18|19|28|29|49|69|70|78|79|89|96|97)/]},Pd={AU:[{regex:/^\d{11}$/}],BE:[{regex:/^\d{10}$/}],BR:[/^\d{14}$/,/^\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}$/].map((e=>({regex:e}))),CA:[{regex:/^\d{9}$/}],DE:[{regex:/^\d{10,11}$/}],HK:[{regex:/^\d{8}$/}],IN:[{regex:/^[A-Z0-9]{15}$/}],JP:[{regex:/^\d{13}$/}],MX:[{regex:/^\D{3}\d{6}\w{3}$/}],NZ:[{regex:/^[A-Z0-9]{8,9}$/}],NL:[{regex:/^\d{9}$/}],PH:[{regex:/^\d{12}$/}],SG:[{regex:/^[A-Z0-9]{9,10}$/}],US:[...wd.ssn,...wd.ein].map((e=>({regex:e,exception:wd.invalidEinPrefixes})))},jd=/^[\w. -]+$/,xd=(e,t)=>!(!e||!Ds(e)||e.length<3)&&(t in Pd?((e,t,a)=>{var r;for(const t of a)if(!(null===(r=t.exception)||void 0===r?void 0:r.every((t=>t.test(e))))&&t.regex.test(e))return!0;return!1})(e,0,Pd[t]):jd.test(e)),Md={taxId:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}],taxIdAbsenceReason:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}]},Fd=e=>({translationKey:"validationPleaseEnterAValidTaxIdNumberWithFormat",translationObject:{values:{format:e}}}),Vd={US:{taxId:[{modes:["blur"],validate:e=>xd(e,"US"),errorMessage:Fd("XXXXXXXXX")}]},CA:{taxId:[{modes:["blur"],validate:e=>xd(e,"CA"),errorMessage:Fd("999999999")}]},AU:{taxId:[{modes:["blur"],validate:e=>xd(e,"AU"),errorMessage:"aValidAbnShouldBe11Digits"}]}},Ud=["taxId","exemptedFromTax"];function Bd(e){const{i18n:t,commonProps:a}=He(),r=na(e,t),n=me({setState:null}),i=As(Md,Vd,e.country),{handleChangeFor:o,data:s,valid:l,errors:d,isValid:c,triggerValidation:u,fieldProblems:m}=ma(Object.assign(Object.assign({},e),{schema:e=>e.exemptedFromTax?["exemptedFromTax"]:["taxId","exemptedFromTax"],rules:i,defaultData:Object.assign(Object.assign({},e.data),{exemptedFromTax:!!e.data.exemptedFromTax}),fieldProblems:null==e?void 0:e.fieldValidationErrors}));return ce((()=>{s.taxId&&o("taxId","blur")(s.taxId)}),[e.country]),ce((()=>{n.current.setState({type:"addToState",value:{data:s,valid:l,errors:d,caller:"taxId",dataStoreId:e.dataStoreId}})}),[s,l,d,c]),this.triggerValidation=u,r.isRequiredField("taxId")?D("div",Object.assign({className:"adyen-kyc-field--tax-id"},{children:[D(Ks,{stateRef:n}),D(Be,Object.assign({name:"taxId",label:r.getLabel("taxId"),classNameModifiers:["tax-id"],errorMessage:r.getErrorMessage("taxId",d,m),isValid:l.taxId,showInlineErrors:a.showInlineErrors},{children:ea("text",{name:"taxId",value:s.taxId,readonly:r.isReadOnly("taxId"),classNameModifiers:["taxId"],onInput:o("taxId","input"),onBlur:o("taxId","blur"),disabled:s.exemptedFromTax,"aria-required":!0,"aria-label":r.getLabel("taxId"),"aria-invalid":!l.taxId})})),r.isRequiredField("exemptedFromTax")&&ea("boolean",{name:"exemptedFromTax",label:r.getLabel("exemptedFromTax"),value:"exemptedFromTax",readonly:r.isReadOnly("exemptedFromTax"),classNameModifiers:["exempted-from-tax"],checked:s.exemptedFromTax,onInput:o("exemptedFromTax"),"aria-required":!1,"aria-label":r.getLabel("exemptedFromTax"),"aria-invalid":!1})]})):null}const Wd="default",Hd={AT:{[wl.NON_PROFIT_OR_CHARITABLE]:{regex:/^(FN|T)\d{3,6}[a-z]$|^(AT-ZVR-)\d{9}$/,format:"T999x, FN999999x, or AT-ZVR-999999999"},[wl.INCORPORATED_ASSOCIATION]:{regex:/^(FN|T)\d{3,6}[a-z]$|^(AT-ZVR-)\d{9}$/,format:"T999x, FN999999x, or AT-ZVR-999999999"},[Wd]:{regex:/^(FN|T)\d{3,6}[a-z]$/,format:"T999x or FN9999x, FN9999x, or FN999999x"}},AU:{[Wd]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},BE:{[Wd]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},BG:{[Wd]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},BR:{[Wd]:{regex:/^\d{2}(.)\d{3}(.)\d{3}\/\d{4}(-)\d{2}$/,format:"99.999.999/9999-99"}},CA:{[Wd]:{regex:/^[a-zA-Z0-9]{5,10}$/,format:"XtoYdigits",values:{x:5,y:10}}},CH:{[Wd]:{regex:/^(CHE)\d{9}$|^(CH)\d{11}$/,format:"CHE999999999 or CH99999999999"}},CY:{[Wd]:{regex:/^([COP])\d{1,8}$/,format:"cop1to8digits"}},CZ:{[Wd]:{regex:/^\d{8,10}$/,format:"XtoYdigits",values:{x:8,y:10}}},DE:{[Wd]:{regex:/^[a-zA-Z]{2,3}\d{1,6}[a-zA-Z]{0,5}(-[a-zA-Z]\d{4})?$/,format:'2-3 letters + 1-6 numbers + 0-5 letters + Optional ("-" + 1 letter + 4 numbers)'}},DK:{[Wd]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},EE:{[Wd]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},ES:{[Wd]:{regex:/[a-zA-Z]\d{8}$/,format:"1char8digits"}},FI:{[Wd]:{regex:/^\d{7}[-]?\d$/,format:"8digitsOptional-"}},FR:{[Wd]:{regex:/^(\d{9}[-]?(\d{5})?)$/,format:"9digitsOr14digits"},[wl.NON_PROFIT_OR_CHARITABLE]:{regex:/^(\d{9}[-]?(\d{5})?)$|^(W)\d{9}$/,format:"Wchar9or14digits"}},GB:{[wl.NON_PROFIT_OR_CHARITABLE]:{regex:/^\d{6,7}$/,format:"XorYdigits",values:{x:6,y:7}},[Wd]:{regex:/^[a-zA-Z0-9]{8}$/,format:"Xcharacters",values:{x:8}}},GR:{[Wd]:{regex:/^\d{12}$/,format:"Xdigits",values:{digits:12}}},HR:{[Wd]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},HU:{[Wd]:{regex:/^\d{2}-\d{2}-\d{6}$/,format:"99-99-999999"}},HK:{[Wd]:{regex:/^\d{7}$/,format:"Xdigits",values:{digits:7}}},IN:{[Wd]:{regex:/^\d{21}$/,format:"Xdigits",values:{digits:21}}},ID:{[Wd]:{regex:/^\d{12}$/,format:"Xdigits",values:{digits:12}}},IS:{[Wd]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},IT:{[Wd]:{regex:/^\d{11}$|^[a-zA-Z]{2}\d{6,7}$/,format:"2characteres6or7digits"}},IE:{[Wd]:{regex:/^\d{6}$/,format:"Xdigits",values:{digits:6}}},LT:{[Wd]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},LU:{[Wd]:{regex:/^[a-zA-Z]\d{5,7}$/,format:"1character5to7digits"}},LV:{[Wd]:{regex:/^\d{11}$/,format:"Xdigits",values:{digits:11}}},MT:{[Wd]:{regex:/^(C)\d{5}$/,format:"Cchar5digits"}},MY:{[Wd]:{regex:/^[A-Za-z0-9]{7,8}$|^[A-Za-z0-9]{12}$/,format:"7or8or12characteres"}},NZ:{[Wd]:{regex:/^\d{13}$/,format:"Xdigits",values:{digits:13}}},NL:{[Wd]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},NO:{[Wd]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},PL:{[Wd]:{regex:/^\d{9,10}$/,format:"XorYdigits",values:{x:9,y:10}}},PT:{[Wd]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},RO:{[Wd]:{regex:/^[J]\d{2}\/\d{1,9}\/\d{4}$/,format:'"J" + 2-digit number + "/" + trade register number (up to 9-digit number) + "/" + year of registration'}},SE:{[Wd]:{regex:/^\d{6}-\d{4}$/,format:"999999-9999"}},SG:{[Wd]:{regex:/^\d{9,10}$/,format:"XorYdigits",values:{x:9,y:10}}},SI:{[Wd]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},SK:{[Wd]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},JP:{[Wd]:{regex:/^\d{13}$/,format:"Xdigits",values:{digits:13}}},KR:{[Wd]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},US:{[Wd]:{regex:/^\d{2}-?\d{7}$/,format:"Xdigits",values:{digits:9}}}},qd=(e,t,a)=>({modes:["blur"],validate:function(r){const{isValid:n,translationMessage:i}=((e,t=null,a=Wd)=>{const r=Hd[t];if(!r)return{isValid:ws.noHtml.test(e),translationMessage:{translationKey:"validationPleaseEnterAValidRegistrationNumber",format:null,values:null}};let n=r[a];n||(n=r[Wd]);const{regex:i,format:o,values:s}=n,l={translationKey:"validationPleaseEnterAValidRegistrationNumberWithFormat",format:o,values:s};return{isValid:i.test(e),translationMessage:l}})(r,e,t);return this.errorMessage={translationKey:i.translationKey,translationObject:{values:{format:i.values?a.get(i.format,{values:i.values}):a.get(i.format)}}},n}}),Gd={modes:["blur"],validate:e=>!Cs(e),errorMessage:"fieldIsRequired"},$d=["registrationNumber","exemptedFromRegistrationNumber"];function Xd(e){const{i18n:t,commonProps:a}=He(),r=me({setState:null}),n=e.requiredFields||["registrationNumber"],{companyType:i,country:o}=e,s=pe((()=>((e,t,a)=>{const r=[Gd],n=qd(e,t,a);return n&&r.push(n),{registrationNumber:r}})(o,i,t)),[o,i]),{handleChangeFor:l,data:d,valid:c,errors:u,isValid:m,triggerValidation:p,fieldProblems:g}=ma(Object.assign(Object.assign({},e),{schema:e=>e.exemptedFromRegistrationNumber?["exemptedFromRegistrationNumber"]:["registrationNumber","exemptedFromRegistrationNumber"],rules:s,defaultData:Object.assign(Object.assign({},e.data),{exemptedFromRegistrationNumber:!!e.data.exemptedFromRegistrationNumber}),fieldProblems:null==e?void 0:e.fieldValidationErrors}));ce((()=>{r.current.setState({type:"addToState",value:{data:d,valid:c,errors:u,caller:"businessRegistration",dataStoreId:e.dataStoreId}})}),[d,c,u,m]),ce((()=>{d.registrationNumber&&l("registrationNumber","blur")(d.registrationNumber)}),[e.country]),this.triggerValidation=p;const y=na(Object.assign(Object.assign({},e),{requiredFields:n}),t);return D("div",Object.assign({className:"adyen-kyc-field__business-registration adl-u-margin-bottom-16"},{children:[D(Ks,{stateRef:r}),D(Be,Object.assign({name:"registrationNumber",label:y.getLabel("registrationNumber","companyRegistrationNumber"),classNameModifiers:["registrationNumber"],errorMessage:y.getErrorMessage("registrationNumber",u,g)||"",isValid:c.registrationNumber,showInlineErrors:a.showInlineErrors},{children:ea("text",{name:"registrationNumber",value:d.registrationNumber,readonly:y.isReadOnly("registrationNumber"),classNameModifiers:["registrationNumber"],onInput:l("registrationNumber","input"),onBlur:l("registrationNumber","blur"),disabled:d.exemptedFromRegistrationNumber,"aria-required":!0,"aria-label":y.getLabel("registrationNumber"),"aria-invalid":!c.registrationNumber})})),y.isRequiredField("exemptedFromRegistrationNumber")&&ea("boolean",{name:"exemptedFromRegistrationNumber",label:y.getLabel("exemptedFromRegistrationNumber"),value:"exemptedFromRegistrationNumber",readonly:y.isReadOnly("exemptedFromRegistrationNumber"),classNameModifiers:["exempted-from-registration"],checked:d.exemptedFromRegistrationNumber,onInput:l("exemptedFromRegistrationNumber"),"aria-required":!1,"aria-label":y.getLabel("exemptedFromRegistrationNumber"),"aria-invalid":!1})]}))}const Yd={tradingName:{modes:["blur"],validate:e=>!Cs(e),errorMessage:"fieldIsRequired"},stockExchangeMIC:{modes:["blur"],validate:e=>/^[A-Z0-9]{4}$/.test(e),errorMessage:"validationPleaseEnterAValidMarketIdentifier"},stockISIN:[{modes:["blur"],validate:e=>!Cs(e),errorMessage:"fieldIsRequired"},{modes:["blur"],validate:e=>xs(e,12),errorMessage:"validationPleaseEnterAValidStockISIN"}]};function Kd({onChange:e}){const[t,a]=le(null);return ce((()=>{t&&(null==e||e(t))}),[JSON.stringify(null==t?void 0:t.currentState)]),D(Ys.Consumer,{children:({state:e})=>(a(e),null)})}function zd(){const e=ye(Ys);if(void 0===e)throw new Error("useStateContext must be used within a StateProvider");return e}const Zd=["tradingName","sameNameAsLegalName",...$d,"stockExchangeMIC","stockISIN",...kd,...Ud];function Qd(e){var a,r;const{i18n:n,commonProps:i}=He(),o=me(null),s=me(null),l=me(null),d=me({setState:null}),c=e.id,u=(e.requiredFields||Zd).filter((e=>["tradingName","sameNameAsLegalName","stockExchangeMIC","stockISIN"].includes(e))),{getData:m}=zd(),p=null===(r=null===(a=m())||void 0===a?void 0:a.companyNameAndCountry)||void 0===r?void 0:r.legalCompanyName,g=!e.data.tradingName||e.data.tradingName===p,{handleChangeFor:y,data:b,valid:f,fieldProblems:h,errors:v,isValid:_,triggerValidation:N,setData:O}=ma(Object.assign(Object.assign({},e),{schema:u,defaultData:Object.assign(Object.assign({},e.data),{sameNameAsLegalName:g,tradingName:g?p:e.data.tradingName}),rules:Yd,fieldProblems:null==e?void 0:e.fieldValidationErrors}));ce((()=>{e.data.tradingName!==b.tradingName&&e.data.tradingName&&(O("tradingName",e.data.tradingName),N(["tradingName"]))}),[e.data.tradingName]);const I=na(e,n);ce((()=>{d.current.setState({type:"addToState",value:{data:b,valid:f,errors:v,caller:c,dataStoreId:c,schema:e.requiredFields||Zd}})}),[b,f,v,_]),ce((()=>{O("sameNameAsLegalName",g),g&&O("tradingName",p)}),[p]);this.triggerValidation=()=>{N(u),S(E)&&o.current.triggerValidation(),S(T)&&s.current.triggerValidation(),S(A)&&l.current.triggerValidation()};const E=kl(e,$d),T=kl(e,kd),A=kl(e,Ud),S=e=>!!e.requiredFields.length;return D(t.Fragment,{children:[D(Ks,{owner:c,stateRef:d}),D(Kd,{onChange:({currentState:t,changeInitiatedBy:a})=>{if(a===c){const a=t.data[c];let r=e.requiredFields||Zd,n=!1;I.isRequiredField("vatNumber")&&(r=a.exemptedFromVat?r.filter((e=>"vatNumber"!==e)):r.filter((e=>"vatAbsenceReason"!==e)),n=!0),I.isRequiredField("taxId")&&a.exemptedFromTax&&(r=r.filter((e=>"taxId"!==e)),n=!0),I.isRequiredField("registrationNumber")&&a.exemptedFromRegistrationNumber&&(r=r.filter((e=>"registrationNumber"!==e)),n=!0),n&&d.current.setState({type:"addToState",value:{data:b,valid:f,errors:v,fieldProblems:h,caller:e.id,dataStoreId:e.id,schema:r}})}}}),D("form",Object.assign({className:"adyen-kyc-company__company-details"},{children:[D(Fs,{heading:e.heading}),D(Gc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:I,id:"ariaErrorField"}),D(md,{page:"Company registration details",title:n.get("whyDoINeedToFillInThisInformation"),content:n.get("reasonForFillingCompanyRegistrationDetails"),titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingCompanyRegistrationDetails"}),I.isRequiredField("tradingName")&&D(t.Fragment,{children:[D(Be,Object.assign({name:"tradingName",label:I.getLabel("tradingName"),classNameModifiers:["tradingName"],errorMessage:I.getErrorMessage("tradingName",v,h),isValid:f.tradingName,showInlineErrors:i.showInlineErrors},{children:ea("text",{name:"tradingName",value:b.tradingName,readonly:I.isReadOnly("tradingName")||b.sameNameAsLegalName,classNameModifiers:["tradingName"],onInput:y("tradingName","input"),onBlur:y("tradingName","blur"),"aria-required":!0,"aria-label":I.getLabel("tradingName"),"aria-invalid":!f.tradingName})})),D("div",Object.assign({className:"adyen-kyc-field--same-name-as-legal-name"},{children:ea("boolean",{name:"sameNameAsLegalName",label:I.getLabel("sameNameAsLegalName"),value:b.sameNameAsLegalName,checked:b.sameNameAsLegalName,onInput:y("sameNameAsLegalName","input"),onChange:()=>O("tradingName",b.sameNameAsLegalName?p:""),"aria-required":!1,"aria-label":I.getLabel("sameNameAsLegalName"),"aria-invalid":!1})}))]}),I.isRequiredField("stockExchangeMIC")&&D(Be,Object.assign({name:"stockExchangeMIC",label:I.getLabel("stockExchangeMIC"),helper:n.get("stockExchangeMICHelper"),classNameModifiers:["stockExchangeMIC"],errorMessage:I.getErrorMessage("stockExchangeMIC",v,h),isValid:f.stockExchangeMIC,showInlineErrors:i.showInlineErrors},{children:ea("text",{name:"stockExchangeMIC",value:b.stockExchangeMIC,readonly:I.isReadOnly("stockExchangeMIC"),classNameModifiers:["stockExchangeMIC"],onInput:y("stockExchangeMIC","input"),onBlur:y("stockExchangeMIC","blur"),"aria-required":!0,"aria-label":I.getLabel("stockExchangeMIC"),"aria-invalid":!f.stockExchangeMIC})})),I.isRequiredField("stockISIN")&&D(Be,Object.assign({name:"stockISIN",label:I.getLabel("stockISIN"),helper:n.get("stockISINHelper"),classNameModifiers:["stockISIN"],errorMessage:I.getErrorMessage("stockISIN",v,h),isValid:f.stockISIN,showInlineErrors:i.showInlineErrors},{children:ea("text",{name:"stockISIN",value:b.stockISIN,readonly:I.isReadOnly("stockISIN"),classNameModifiers:["stockISIN"],onInput:y("stockISIN","input"),onBlur:y("stockISIN","blur"),"aria-required":!0,"aria-label":I.getLabel("stockISIN"),"aria-invalid":!f.stockISIN})})),I.isRequiredField("registrationNumber")&&D(Xd,Object.assign({},E,{companyType:e.companyType,ref:o,dataStoreId:c,country:e.country})),I.isRequiredField("vatNumber")&&D(Ld,Object.assign({},T,{ref:s,dataStoreId:c,country:e.country})),I.isRequiredField("taxId")&&D(Bd,Object.assign({},A,{ref:l,dataStoreId:c,country:e.country}))]}))]})}const Jd={legalCompanyName:{modes:["blur"],validate:e=>!Cs(e),errorMessage:"fieldIsRequired"}},ec=["legalCompanyName"];function tc(e){const{i18n:t,commonProps:a}=He(),{dataStoreId:r,requiredFields:n}=e,i=n||["legalCompanyName"],o=me({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,triggerValidation:m,fieldProblems:p}=ma(Object.assign(Object.assign({},e),{schema:i,rules:e.validators||Jd,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));ce((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:p,caller:"legalCompanyName",dataStoreId:r}})}),[l,d,c,u]),this.triggerValidation=m;const g=na(e,t);return g.isRequiredField("legalCompanyName")?D("div",Object.assign({className:"adyen-kyc-field__legal-company-name"},{children:[D(Ks,{stateRef:o}),D(Be,Object.assign({name:"legalCompanyName",label:g.getLabel("legalCompanyName"),helper:t.get("legalCompanyNameHelper"),classNameModifiers:["legalCompanyName"],errorMessage:g.getErrorMessage("legalCompanyName",c,p),isValid:d.legalCompanyName,showInlineErrors:a.showInlineErrors},{children:ea("text",{name:"legalCompanyName",value:l.legalCompanyName,readonly:g.isReadOnly("legalCompanyName"),classNameModifiers:["legalCompanyName"],onInput:s("legalCompanyName","input"),onBlur:s("legalCompanyName","blur"),"aria-required":!0,"aria-label":g.getLabel("legalCompanyName"),"aria-invalid":!d.legalCompanyName})}))]})):null}const ac={companyCountry:{modes:["blur"],validate:e=>!Cs(e),errorMessage:"fieldIsRequired"}},rc=({title:e,children:t})=>D("div",Object.assign({className:"adl-disclaimer-container"},{children:[D("div",Object.assign({className:"adl-disclaimer__title"},{children:e})),D("div",Object.assign({className:"adl-disclaimer__content"},{children:t}))]})),nc=()=>{const{i18n:e}=He();return D(rc,Object.assign({title:e.get("patriotActDisclosureTitle")},{children:[D("p",{children:e.get("patriotActDisclosureTextParagraph1")}),D("p",{children:e.get("patriotActDisclosureTextParagraph2")})]}))},ic=["companyCountry","legalCompanyName"];function oc(e){const{i18n:t}=He(),a=me(null),{isSettingEnabled:r}=Zl(),n=e.id,i=me({setState:null}),o=r("editPrefilledCountry"),s=ic,{handleChangeFor:l,data:d,valid:c,errors:u,isValid:m,triggerValidation:p,fieldProblems:g}=ma(Object.assign(Object.assign({},e),{schema:["companyCountry"],defaultData:e.data,rules:e.validators||ac,fieldProblems:null==e?void 0:e.fieldValidationErrors})),y=na(e,t);ce((()=>{i.current.setState({type:"addToState",value:{data:d,valid:c,errors:u,fieldProblems:g,caller:n,dataStoreId:n,schema:s}})}),[d,c,u,m]),this.triggerValidation=()=>{p(["companyCountry"]),y.isRequiredField("legalCompanyName")&&a.current.triggerValidation()};const b=kl(e,ec);return D("div",{children:[D(Ks,{owner:n,stateRef:i}),D(Fs,{heading:e.heading}),D(Gc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:y,id:"ariaErrorField"}),"US"===d.companyCountry?D(nc,{}):void 0,y.isRequiredField("companyCountry")&&D(ra,{label:y.getLabel("companyCountry"),allowedCountries:[],classNameModifiers:["country"],errorMessage:y.getErrorMessage("companyCountry",u,g),onDropdownChange:l("companyCountry"),value:d.companyCountry,readOnly:!o}),y.isRequiredField("legalCompanyName")&&D(tc,Object.assign({},b,{ref:a,dataStoreId:n}))]})}let sc=!1,lc=!1;function dc(e){const t=function(){const e=document.createElement("div");return e.setAttribute("aria-hidden","true"),e.setAttribute("id","adl-icon-container"),e.style.height="0",e}();return t.innerHTML=e,t}function cc(e){if(lc)return Promise.resolve();return _({loadingContext:e,path:"static/images/document-guidance.svg"},null,"text").then((e=>{document.body.insertBefore(dc(e),document.body.firstChild),lc=!0}))}var uc;!function(e){e.BANK_STATEMENT="bankStatement",e.DRIVERS_LICENSE="driversLicense",e.IDENTITY_CARD="identityCard",e.NATIONAL_ID_NUMBER="nationalIdNumber",e.PASSPORT="passport",e.PROOF_OF_ADDRESS="proofOfAddress",e.PROOF_OF_NATIONAL_ID_NUMBER="proofOfNationalIdNumber",e.PROOF_OF_RESIDENCY="proofOfResidency",e.REGISTRATION_DOCUMENT="registrationDocument",e.VAT_DOCUMENT="vatDocument",e.CONSTITUTIONAL_DOCUMENT="constitutionalDocument"}(uc||(uc={}));const mc=(e,t=!1,a=!0)=>{switch(e){case uc.PASSPORT:return"passport";case uc.DRIVERS_LICENSE:case uc.IDENTITY_CARD:return t?a?"id-front":"id-back":"id";case uc.BANK_STATEMENT:case uc.VAT_DOCUMENT:case uc.REGISTRATION_DOCUMENT:case uc.PROOF_OF_ADDRESS:case uc.PROOF_OF_RESIDENCY:default:return"generic-document"}};function pc({type:e,className:r}){const{loadingContext:n,i18n:i}=He(),[o,s]=le(null);return ce((()=>{cc(n)}),[]),ce((()=>{s(mc(e))}),[e]),D("div",Object.assign({className:a("adl-document-guidance",r)},{children:D("div",Object.assign({className:"adl-document-guidance__container"},{children:[D("div",Object.assign({className:"adl-document-guidance__item"},{children:[D("svg",Object.assign({width:"100%",role:"img"},{children:D("use",{href:`#adl-${o}-valid`})})),D("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("good")}))]})),D("div",Object.assign({className:"adl-document-guidance__item"},{children:[D("svg",Object.assign({width:"100%",role:"img"},{children:D("use",{href:`#adl-${o}-invalid-cut`})})),D("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("notCutOff")}))]})),D("div",Object.assign({className:"adl-document-guidance__item"},{children:[D("svg",Object.assign({width:"100%",role:"img"},{children:D("use",{href:`#adl-${o}-invalid-blur`})})),D("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("notBlurry")}))]})),D("div",Object.assign({className:"adl-document-guidance__item"},{children:D(t.Fragment,"generic-document"===o?{children:[D("svg",Object.assign({width:"100%",role:"img"},{children:D("use",{href:`#adl-${o}-invalid-expired`})})),D("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("notExpired")}))]}:{children:[D("svg",Object.assign({width:"100%",role:"img"},{children:D("use",{href:`#adl-${o}-invalid-glare`})})),D("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("noGlare")}))]})}))]}))}))}function gc(e){const{file:t,errorMessage:a,onDelete:r,iconPrefix:n}=e,{i18n:i}=He();return D("div",Object.assign({className:"adyen-kyc-dropzone-file"},{children:[D("div",Object.assign({className:"adyen-kyc-dropzone-file__icon"},{children:D("svg",Object.assign({height:"100%",width:"100%"},{children:D("use",a?{"data-testid":"document-invalid",href:`#adl-${n}-icon-invalid`}:{"data-testid":"document-valid",href:`#adl-${n}-icon-valid`})}))})),D("div",Object.assign({className:"adyen-kyc-dropzone-file__labels"},{children:[D("div",Object.assign({className:"adyen-kyc-dropzone-file__name"},{children:t.name})),D("div",a?Object.assign({className:"adyen-kyc-dropzone-file__error"},{children:i.get(a)}):Object.assign({className:"adyen-kyc-dropzone-file__size"},{children:[D("span",{children:[i.get("complete"),"\xa0"]}),(e=>{if(e){const t=["Bytes","KB","MB","GB","TB"];if(0===e)return"n/a";const a=parseInt(Math.floor(Math.log(e)/Math.log(1024)).toString());return 0===a?`${e} ${t[a]}`:`(${(e/Math.pow(1024,a)).toFixed(1)} ${t[a]})`}return null})(t.size)]}))]})),D("button",Object.assign({type:"button",className:"adyen-kyc-dropzone-file__button",onClick:()=>r(t)},{children:D(Me,{name:"remove"})}))]}))}const yc=e=>{const{name:t,allowedFiletypes:a,maxNumberOfFiles:r,maxSize:n,isOptional:i=!1}=e;let o=[{validate:e=>null==e?void 0:e.every(((e,t)=>t<r)),errorMessage:"tooManyFiles",modes:["blur","input"]},{validate:e=>!(null==e?void 0:e.map((e=>e.name)).some(((e,t,a)=>a.indexOf(e)!==t))),errorMessage:"duplicatedFiles",modes:["blur","input"]},{validate:e=>{const t=a.split(",").map((e=>e.trim()));return null==e?void 0:e.every((e=>t.some((t=>{var a;return null===(a=e.name)||void 0===a?void 0:a.toLocaleLowerCase().endsWith(t.toLocaleLowerCase())}))))},errorMessage:"unsupportedFiletype",modes:["blur","input"]},{validate:e=>null==e?void 0:e.every((e=>!e.size||e.size<n)),errorMessage:"maximumFileSizeExceeded",modes:["blur","input"]}];return i||(o=[{validate:e=>!!(null==e?void 0:e.length),errorMessage:"fieldIsRequired",modes:["blur","input"]},...o]),{[t]:o}};function bc(e){const t=["Bytes","KB","MB","GB","TB"];if(0===e)return"n/a";const a=parseInt(Math.floor(Math.log(e)/Math.log(1024)).toString(),10);return 0===a?`${e} ${t[a]}`:`${(e/Math.pow(1024,a)).toFixed()} ${t[a]}`}function fc(e){var t,r;const{name:n,iconPrefix:i,label:o,maxNumberOfFiles:s,allowedFiletypes:l,multiple:d,required:c,defaultData:u,maxSize:m,id:p,isOptional:g}=e,{i18n:y}=He(),b=me(null),[f,h]=le(!1),[v,_]=le(!0),N=me({setState:null}),{data:O,valid:I,errors:E,isValid:T,setData:A,fieldProblems:S,triggerValidation:C,setValid:R,handleChangeFor:k}=ma(Object.assign(Object.assign({},e),{schema:[n],defaultData:u,rules:yc(e)})),L="fieldIsRequired"===(null===(t=null==E?void 0:E[n])||void 0===t?void 0:t.errorMessage);ce((()=>{var e;const t=(null===(e=null==O?void 0:O[n])||void 0===e?void 0:e.length)>=s;_(!t),N.current.setState({type:"addToState",value:{data:O,valid:I,errors:E,fieldProblems:S,caller:n,dataStoreId:p}})}),[O,I,E,T]);const w=({files:e})=>{const t=(null==O?void 0:O[n])||[];k(n,"input")([...t,...e])};return this.triggerValidation=C,ce((()=>{var t,a,r;(null===(a=null===(t=e.defaultData)||void 0===t?void 0:t[n])||void 0===a?void 0:a[0])?(A(n,null===(r=e.defaultData)||void 0===r?void 0:r[n]),C()):A(n,null)}),[e.defaultData]),ce((()=>{const e=null==O?void 0:O[n],t=e&&e.length>0;g&&!t&&R(n,!0)}),[g,O]),D("div",{children:[D(Ks,{stateRef:N}),o&&D("div",Object.assign({className:a("adyen-kyc-label__text",{"adyen-kyc-label__text--error":L})},{children:o})),null===(r=null==O?void 0:O[n])||void 0===r?void 0:r.map((e=>{var t;return D(gc,{file:e,onDelete:e=>(e=>{var t;return k(n,"input")(null===(t=null==O?void 0:O[n])||void 0===t?void 0:t.filter((t=>t!==e)))})(e),errorMessage:null===(t=null==E?void 0:E[n])||void 0===t?void 0:t.errorMessage,iconPrefix:i},e)})),v&&D("div",Object.assign({role:"region",className:a("adyen-kyc-dropzone",{"adyen-kyc-dropzone--dragged":f,"adyen-kyc-dropzone--error":!f&&L}),onDrop:e=>(e=>{e.preventDefault(),e.stopPropagation(),w(e.dataTransfer),h(!1)})(e),onDragOver:e=>(e=>{e.preventDefault(),e.stopPropagation(),h(!0)})(e),onDragEnter:e=>(e=>{e.preventDefault(),e.stopPropagation()})(e),onDragLeave:e=>(e=>{e.preventDefault(),e.stopPropagation(),h(!1)})(e)},{children:[D("div",Object.assign({className:"adyen-kyc-dropzone__icon"},{children:D("svg",Object.assign({height:"100%",width:"100%"},{children:D("use",{href:`#adl-${i}-icon`})}))})),D("div",Object.assign({className:"adyen-kyc-dropzone__labels"},{children:[D("div",Object.assign({className:"adyen-kyc-dropzone__drag-text"},{children:[D("span",{children:[y.get("dragYourFilesHereOr"),"\xa0"]}),D("button",Object.assign({className:"adyen-kyc-dropzone__button",type:"button",onClick:()=>b.current.click()},{children:y.get("browse")}))]})),D("div",Object.assign({className:"adyen-kyc-dropzone__supports-text"},{children:y.get("supports",{values:{fileTypes:l,maxSize:bc(m),maxFiles:s}})}))]})),D("input",{className:"adyen-kyc-dropzone__input",ref:b,multiple:d,accept:l,onChange:e=>(e=>w(e.target))(e),type:"file","aria-required":c,"aria-label":o,"aria-invalid":!I})]})),L&&D("div",Object.assign({className:"adyen-kyc-error-text"},{children:y.get("fieldIsRequired")}))]})}fc.defaultProps={defaultData:[],label:"",required:!0,multiple:!1,maxNumberOfFiles:1,maxSize:4194304,allowedFiletypes:"JPG, JPEG, PNG, PDF",iconPrefix:"generic-document",onChange:()=>{}};const hc=bt((function(e){var a,{documentType:r,documentField:n,guidanceHeader:o,documentTypeSelect:s,guidanceContent:l}=e,d=i(e,["documentType","documentField","guidanceHeader","documentTypeSelect","guidanceContent"]);const{i18n:c}=He(),u=me(null),[m,p]=le(null),{data:g,errors:y,handleChangeFor:b,fieldProblems:f,triggerValidation:h,valid:v,setData:_}=ma(Object.assign(Object.assign({},d),{schema:["description"],defaultData:d.data,rules:d.validators,fieldProblems:null==d?void 0:d.fieldValidationErrors})),N=na(d,c),O=me({setState:null}),I=!((null==d?void 0:d.formVerificationErrors)&&0===(null===(a=Object.keys(null==d?void 0:d.formVerificationErrors))||void 0===a?void 0:a.length)),{selectedType:E,setSelectedType:T,options:A}=s||{};return ce((()=>{I&&this.triggerValidation()}),[d.data]),this.triggerValidation=()=>{N.isRequiredField(n)&&u.current.triggerValidation()},ce((()=>{O.current.setState({type:"addToState",value:{data:g,valid:v,errors:y,fieldProblems:f,caller:d.id,dataStoreId:d.id,schema:d.requiredFields}})}),[g,v,y,f]),ce((()=>{var e,t;p({[n]:null===(e=null==d?void 0:d.data)||void 0===e?void 0:e[n]}),_("description",null===(t=d.data)||void 0===t?void 0:t.description),h()}),[d.data]),D("div",Object.assign({className:`adl-company-document-upload adl-company-document-upload--${n}`},{children:[D(Ks,{owner:d.id,stateRef:O}),D(Fs,{heading:d.heading}),D(Gc,{verificationErrors:null==d?void 0:d.formVerificationErrors,validationErrors:null==d?void 0:d.fieldValidationErrors,formUtils:N,id:"ariaErrorField"}),N.isRequiredField(n)&&D(t.Fragment,{children:[o,s?D(Be,Object.assign({name:"documentType",label:c.get("selectDocumentType",{values:{name:d.name}})},{children:ea("select",{onChange:e=>T(e.target.value),name:"documentType",placeholder:c.get("selectDocument"),selected:E,items:A.map((({id:e,name:t})=>({id:e,name:c.get(t)})))})})):null,D("div",{children:l}),D(pc,{type:r,className:"adl-u-margin-bottom-24"}),D(fc,{name:n,ref:u,id:d.id,defaultData:m,isOptional:I||N.isOptionalField(n),iconPrefix:mc(r,!0)})]}),N.isRequiredField("description")&&D(Be,Object.assign({name:"description",label:N.getLabel("description"),helper:c.get("descriptionHelper"),errorMessage:N.getErrorMessage("description",y,f),isValid:v.description},{children:ea("textArea",{name:"description",value:g.description,classNameModifiers:["description"],maxLength:200,onInput:b("description"),"aria-label":N.getLabel("description"),"aria-invalid":!v.description})}))]}))}),((e,t)=>W(e.requiredFields,t.requiredFields)&&W(e.data,t.data)&&W(e.formVerificationErrors,t.formVerificationErrors)&&W(e.fieldValidationErrors,t.fieldValidationErrors)&&W(e.documentTypeSelect,t.documentTypeSelect)&&e.documentField===t.documentField));function vc({className:e,children:t,noMarkers:r}){const n=a(["adl-list__item",r&&"adl-list__item--no-markers",e]);return D("li",Object.assign({className:n},{children:t}))}function _c({className:e,nested:t,ordered:r,noMarkers:n,children:i}){const o=a(["adl-list",t&&"adl-list--nested",r&&"adl-list--ordered",n&&"adl-list--no-markers",e]);return D("ul",Object.assign({className:o},{children:i}))}const Nc={companyNameAndCountry:{formId:"companyNameAndCountry",formName:"nameAndCountry",fields:ic},companyType:{formId:"companyType",formName:"companyStructure",fields:ad},companyDetails:{formId:"companyDetails",formName:"registrationDetails",fields:Zd},companyRegistrationDetails:{formId:"companyRegistrationDetails",formName:"address",fields:["registrationAddress","operationalAddress","operationalAddressIsSame"]},companyRegistrationDocument:{formId:"companyRegistrationDocument",formName:"registrationDocument",fields:["registrationDocument"]},companyTaxDocument:{formId:"companyTaxDocument",formName:"taxDocument",fields:["taxDocument"]}},Oc=Nc.companyNameAndCountry.formId,Ic=Nc.companyType.formId,Ec=Nc.companyDetails.formId,Tc=Nc.companyRegistrationDetails.formId,Ac=Nc.companyRegistrationDocument.formId,Sc=Nc.companyTaxDocument.formId,Cc=[Ac,Sc];var Rc;!function(e){e.BUSINESS_NAME_FILING="doingBusinessAsNameFiling",e.TAX_FILING="taxFiling",e.TRUST_DEED="trustDeed",e.TRUST_INSTRUMENT="trustInstrument"}(Rc||(Rc={}));const Dc={[ol.SOLE_PROPRIETORSHIP]:[{id:Rc.BUSINESS_NAME_FILING,name:"doingBusinessAsNameFiling"},{id:Rc.TAX_FILING,name:"taxFiling"}],[ol.TRUST]:[{id:Rc.TRUST_DEED,name:"trustDeed"},{id:Rc.TRUST_INSTRUMENT,name:"trustInstrument"}]};const kc=bt((function(e){var a,{ref:r,id:n,legalEntityType:o}=e,s=i(e,["ref","id","legalEntityType"]);const{i18n:l}=He(),d=D(t.Fragment,{children:[D("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:l.get("uploadOneOfTheFollowing")})),D(_c,Object.assign({className:"adl-u-margin-left-8"},{children:null===(a=Dc[o])||void 0===a?void 0:a.map((({id:e,name:t})=>D(vc,{children:l.get(t)},e)))})),D("div",Object.assign({className:"adl-u-margin-y-16"},{children:[D("span",{children:[l.get("documentIssuedWithinLastYear")," "]}),D(tl,Object.assign({href:"https://docs.adyen.com/marketplaces-and-platforms/required-kyc-information/document-requirements#constitutional-doc",external:!0},{children:l.get("learnMore")}))]}))]});return D("div",{children:D(hc,Object.assign({},s,{ref:r,documentType:uc.CONSTITUTIONAL_DOCUMENT,documentField:"constitutionalDocument",heading:l.get("constitutionalDocument"),guidanceContent:d,id:n}))})}),((e,t)=>W(e.requiredFields,t.requiredFields)&&W(e.data,t.data)&&W(e.formVerificationErrors,t.formVerificationErrors)&&W(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name)),Lc={solePropNameAndCountry:{formId:"solePropNameAndCountry",formName:"nameAndCountry",fields:ic},solePropRegistrationDetails:{formId:"solePropRegistrationDetails",formName:"registrationDetails",fields:Zd},solePropRegistrationAddress:{formId:"solePropRegistrationAddress",formName:"registrationAddress",fields:pd},solePropConstitutionalDocument:{formId:"solePropConstitutionalDocument",formName:"constitutionalDocument",fields:["constitutionalDocument"]}},wc=Lc.solePropNameAndCountry.formId,Pc=Lc.solePropRegistrationAddress.formId,jc=Lc.solePropRegistrationDetails.formId,xc=Lc.solePropConstitutionalDocument.formId;const Mc={verificationErrors:{},remediationActions:{},missingData:[],status:Cl.FINISHED,validationErrors:{}},Fc=["2_8036","2_8064","2_8067","2_8189"];function Vc(e){const t=(null==e?void 0:e.capabilities)||{},a={};return Object.values(t).forEach((({problems:e})=>{e&&e.forEach((e=>{var t;if(null==e?void 0:e.entity){const{type:r,id:n}=Hc(e)?null===(t=null==e?void 0:e.entity)||void 0===t?void 0:t.owner:e.entity;a[r]=a[r]||{},a[r][n]=a[r][n]||H(Mc),function(e,t){var a;(null===(a=e.verificationErrors)||void 0===a?void 0:a.length)&&e.verificationErrors.forEach((e=>{!function(e,t){switch(e.type){case nl.INVALID_INPUT:!function(e,t){var a,r;const n=null===(a=null==e?void 0:e.subErrors)||void 0===a?void 0:a.reduce(((e,{code:a,remediatingActions:r})=>{const n=null==r?void 0:r.reduce(((e,a)=>{const r=il[a.code];if(r){const n=r.flatMap((e=>Bc(e))).filter(Boolean),i=null==n?void 0:n.reduce(((e,t)=>{const[a,r]=t.split(/\.(.+)/,2);return e.forms=[...e.forms,a],e.fields=[...e.fields,r],e}),{forms:[],fields:[]}),o=new Set(i.forms.filter(Boolean)),s=new Set(i.fields.filter(Boolean)),l=Object.assign(Object.assign({},a),{forms:[...o],fields:[...s]});e.remActions.push(l),e.forms=[...e.forms,...o],t.remediationActions[l.code]=l}return e}),{forms:[],remActions:[]});return e.childErrorsWithRemActions[a]=null==n?void 0:n.remActions,(null==n?void 0:n.forms)&&(e.allForms=[...e.allForms,...n.forms]),e}),{allForms:[],childErrorsWithRemActions:{}}),i=new Set(null===(r=null==n?void 0:n.allForms)||void 0===r?void 0:r.filter(Boolean));null==i||i.forEach((a=>{(null==t?void 0:t.verificationErrors[a])||(t.verificationErrors[a]={}),t.verificationErrors[a][e.code]||(t.verificationErrors[a][e.code]={}),t.verificationErrors[a][e.code]=n.childErrorsWithRemActions})),Wc(t,Cl.ERROR)}(e,t);break;case nl.DATA_MISSING:Uc(e)||function(e,t){t.missingData=t.missingData?[...t.missingData,e]:[e],Wc(t,Cl.DETAILS_REQUIRED)}(e,t);break;case nl.PENDING_STATUS:Wc(t,Cl.PROCESSING)}}(e,t)}))}(e,a[r][n])}}))})),a}const Uc=e=>Fc.includes(null==e?void 0:e.code);const Bc=e=>{if(!(null==e?void 0:e.key))return null;if("documents"===e.key&&(null==e?void 0:e.type))return e.type.map((e=>Sl[e]));{const[t]=e.key.split(/\.(.+)/,2);switch(t){case ol.INDIVIDUAL:return Nl[e.key];case ol.ORGANIZATION:return _l[e.key];case sl.BANK_ACCOUNT:return Ol[e.key];case ol.SOLE_PROPRIETORSHIP:return Al[e.key]}}};function Wc(e,t){e.status<t&&(e.status=t)}const Hc=e=>{var t,a;return"document"===(null===(a=null===(t=e.entity)||void 0===t?void 0:t.type)||void 0===a?void 0:a.toLowerCase())},qc=({verificationErrors:e,formUtils:a})=>{var r,n;const i=e=>a.getVal(`errorMessage_${e}`),o=(e,r)=>{var n,i;if(1===(null==e?void 0:e.length))return a.getVal(`remediationMessage_${e[0].code}`);{const e=r&&Object.keys(r);let o;if((null==e?void 0:e.length)>0)if((null==e?void 0:e.length)>1){const n=[];e.forEach((e=>{var t;n.push(D(vc,{children:D(al,{fieldName:e,label:a.getVal(`remediationMessage_${null===(t=r[e])||void 0===t?void 0:t.remediation.code}`)})}))})),o=D(t.Fragment,{children:[a.getLabel("uploadTheFollowingDocuments"),D(_c,{children:n})]})}else{const t=e[0],s=` ${null===(i=a.getVal(`remediationMessage_${null===(n=r[t])||void 0===n?void 0:n.remediation.code}`))||void 0===i?void 0:i.toLowerCase()}`;o=D(al,{fieldName:t,label:s})}return D(t.Fragment,{children:[`${a.getVal("reviewTheInformationBelowAndCorrectMistakesOr")} `,o,` ${a.getVal("thenResubmit")}`]})}};let s,l;const d=Object.keys(e);1===d.length&&(l=d[0]);const c=Object.values(e).reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{}),u=Object.keys(c),m=null===(n=null===(r=Object.values(c))||void 0===r?void 0:r.flat())||void 0===n?void 0:n.reduce(((e,t)=>{var a;const r=(e=>{var t;return null===(t=null==e?void 0:e.forms)||void 0===t?void 0:t.some((e=>e===Lp.idDocument.formId||e===Lp.proofOfResidence.formId||e===Lp.proofOfNationalId.formId||e===(null==Nc?void 0:Nc.companyRegistrationDocument.formId)||e===(null==Nc?void 0:Nc.companyTaxDocument.formId)||"payoutAccountDocuments"===e||e===Lc.solePropConstitutionalDocument.formId))})(t);return r&&(null===(a=null==t?void 0:t.fields)||void 0===a||a.forEach((a=>e[a]={formName:null==t?void 0:t.forms[0],remediation:t}))),e}),{}),p=Object.values(c).flat();s=1===u.length?D("div",Object.assign({"data-testid":"verification-error--case-"+(1===p.length?"1":"2-1")},{children:[D("span",{children:`${i(u[0])} `}),D("span",{children:o(p,m)})]})):2===u.length?D("div",Object.assign({"data-testid":"verification-error--case-2-2"},{children:[a.getVal("weFoundTheFollowingIssues"),D("ul",{children:u.map((e=>D("li",{children:D("span",{children:i(e)})},e)))}),D("span",{children:o(p,m)})]})):D("div",Object.assign({"data-testid":"verification-error--case-2-3"},{children:o(p,m)}));const g=l?i(l):a.getVal("correctErrorsResubmit");return D(Zs,Object.assign({title:g,type:zs.ERROR,hasCloseButton:!1},{children:D("div",Object.assign({className:"adl-alert__explanation adyen-kyc-error-panel__verification-errors"},{children:s}))}))};function Gc({id:e="ariaErrorField",verificationErrors:t,validationErrors:a,formUtils:r}){const n=t&&Object.keys(t).length>0,i=a&&Object.keys(a).length>0;return n||i?D("div",Object.assign({className:"adyen-kyc-error-panel",id:e,"aria-live":"polite"},{children:[n&&!i&&D(qc,{formUtils:r,verificationErrors:t}),i&&D(rl,{formUtils:r,validationErrors:a})]})):null}class $c extends t.Component{constructor(){super(...arguments),this.onClick=e=>{e.preventDefault(),this.props.disabled||this.props.onClick(e,{complete:this.complete},null)},this.complete=(e=1e3)=>{this.setState({completed:!0}),setTimeout((()=>{this.setState({completed:!1})}),e)}}render({showAsLink:e,secondary:r,tertiary:n,ghost:i,positive:o,negative:s,className:l,small:d,block:c,circle:u,label:m,icon:p,disabled:g,status:y,type:b,title:f,testId:h,labelHoverBox:v}){const _=e?"adl-link__text":a("adl-button__text",{"adl-button__text--hover-box":v}),N={loading:D(t.Fragment,{children:[m&&D("span",Object.assign({className:_},{children:m})),D("span",Object.assign({className:"adl-button__loader-container"},{children:D(xe,{size:"small",inline:!0})}))]}),default:D(t.Fragment,{children:[m&&D("span",Object.assign({className:_},{children:m})),p&&D(Me,{name:p,className:"adl-link__icon"})]})},O=N[y]||N.default,I=e?a("adl-link","adl-link--icon-right",l,{"adl-link--with-icon":!!p}):a("adl-button",l,{"adl-button--icon-left":!!p,"adl-button--secondary":r,"adl-button--tertiary":n&&!r,"adl-button--ghost":i&&!r&&!n,"adl-button--block":c,"adl-button--positive":o,"adl-button--negative":s&&!o,"adl-button--small":d&&m,"adl-button--circle":u,"adl-button--icon":p&&m&&!d,"adl-button--icon-only":p&&(!m||v),"adl-button--icon-small":d&&p&&(!m||v),"adl-button--hover-box":v});return D("button",Object.assign({"data-testid":h,className:I,type:b,title:f,disabled:g,onClick:this.onClick},{children:O}))}}function Xc(e){var a,r,n;const{i18n:i,commonProps:o}=He(),s=null!==(r=Le[null===(a=e.data)||void 0===a?void 0:a.country])&&void 0!==r?r:Le.default,[l,d]=le(!1),[c,u]=le(!0),[m,p]=le(!1),g=y(i.locale),b=(null===(n=e.requiredFields)||void 0===n?void 0:n.includes("stateOrProvince"))||e.data.country&&De.includes(e.data.country)?s:s.filter((e=>"stateOrProvince"!==e)),f=e.addressType,{data:h,errors:v,valid:_,isValid:N,setData:O,setValid:I,fieldProblems:E,handleChangeFor:T,triggerValidation:A,schema:S}=ma(Object.assign(Object.assign({},e),{schema:b,defaultData:e.data,formatters:Ws,rules:Xs,fieldProblems:null==e?void 0:e.fieldValidationErrors,maskedFields:[]})),C=na(Object.assign(Object.assign({},e),{requiredFields:b}),i),R=me({setState:null});ce((()=>{e.data.country!==h.country&&e.data.country&&(b.map((e=>{O(e,""),I(e,!1)})),O("country",e.data.country),I("country",!!e.data.country),d(!1),u(!0))}),[e.data.country]),ce((()=>{e.handleAddressSearch&&e.handleFindAddress&&p(!0),(h.city||h.street||h.postalCode)&&(d(!0),u(!1))}),[]),ce((()=>{h.postalCode&&T("postalCode","blur")(h.postalCode)}),[h.country]),ce((()=>{var t;const a=Ie.reduce(((t,a)=>{if(!C.isRequiredField(a))return delete t[a],t;const r=C.isRequiredField(a)||h[a]||!e.data[a]?"N/A":e.data[a];return Object.assign(Object.assign({},t),{[a]:C.isRequiredField(a)||h[a]?h[a]:r})}),{}),r=f?{data:{[f]:a},valid:{[f]:N},errors:{[f]:v},fieldProblems:{[f]:E}}:{data:a,valid:_,errors:v,fieldProblems:E},n=f?null:{schema:S};R.current.setState({type:"addToState",value:Object.assign(Object.assign(Object.assign({},r),{caller:"address",dataStoreId:e.id}),n)}),null===(t=e.onChange)||void 0===t||t.call(e,Object.assign(Object.assign({},r),{isValid:N}))}),[h,_,v,N]),this.triggerValidation=()=>{d(!0),u(!1),A()};const k=t=>{if(!C.isRequiredField(t))return null;const a="country"===t&&e.hideCountry;return D(ia,{allowedCountries:e.allowedCountries,classNameModifiers:[t],data:h,valid:_,errors:v,fieldProblems:E,fieldName:t,onInput:T(t,"input"),onBlur:T(t,"blur"),onDropdownChange:T(t,"blur"),maxlength:Ts(Hs,t,h.country,!0),hideField:a,"aria-label":C.getLabel(t,t),trimOnBlur:!0},t)},L=(w=h.country,Le[w]||Le.default);var w;const P=(e,t)=>{O(t,e[t]||""),I(t,!!e[t])};return D("form",Object.assign({className:"adyen-kyc__address adl-u-margin-bottom-48","aria-describedby":o.showInlineErrors?null:"ariaErrorField"},{children:[D(Fs,{heading:e.heading}),D(Gc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:C,id:"ariaErrorField"}),m?D(t.Fragment,{children:[D("div",Object.assign({className:"adyen-kyc-search-address adl-u-margin-bottom-24"},{children:[D(ut,{handleChangeFor:T,data:e.data,handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress,legalEntityId:e.legalEntityId,autocompleteAddressForm:e=>{ke.includes(e.country)?(b.filter((e=>"houseNumberOrName"!==e)).map((t=>{"street"===t?(e=>{const t=e.houseNumberOrName?`${e.houseNumberOrName} `:"";O("street",`${t}${e.street||""}`||""),I("street",!!e.street)})(e):P(e,t)})),"street2"in e&&(O("houseNumberOrName",e.street2||""),I("houseNumberOrName",!!e.street2))):b.map((t=>P(e,t))),d(!0),u(!1),A()}}),D("div",Object.assign({className:"adyen-kyc-search-address--location"},{children:[D("span",Object.assign({className:"adyen-kyc-search-address--location-country"},{children:[D(Me,{name:"location"})," ",g.getCountryName(e.data.country)]})),c&&D($c,{showAsLink:!0,testId:"addAddressManuallyBtn",onClick:()=>(d(!0),void u(!1)),label:i.get("addManually"),title:i.get("addManually")})]}))]})),l&&L.map((e=>k(e)))]}):L.map((e=>k(e))),D(Ks,{owner:e.id,stateRef:R})]}))}$c.defaultProps={status:"default",disabled:!1,label:"",onClick:()=>{},type:"button"},Xc.defaultProps={data:{},onChange:()=>{},visibility:"editable",requiredFields:Ie,countryCode:null};const Yc={firstName:[{validate:Ds,errorMessage:"fieldIsRequired",modes:["blur"]}],lastName:[{validate:Ds,errorMessage:"fieldIsRequired",modes:["blur"]}]},Kc=Ls(ks.replace("-","")),zc={firstName:{formatter:e=>Ms(e).replace(Kc,"")},lastName:{formatter:e=>Ms(e).replace(Kc,"")}},Zc=["firstName","lastName"];function Qc(e){const{i18n:t,commonProps:a}=He(),r=e.requiredFields||["firstName","lastName"],{handleChangeFor:n,data:i,valid:o,errors:s,fieldProblems:l,isValid:d,triggerValidation:c}=ma(Object.assign(Object.assign({},e),{schema:r,rules:Yc,formatters:zc,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors})),{dataStoreId:u}=e,m=me({setState:null});ce((()=>{m.current.setState({type:"addToState",value:{data:i,valid:o,errors:s,fieldProblems:l,caller:"name",dataStoreId:u}})}),[i,o,s,d]),this.triggerValidation=c;const p=na(e,t);return D("div",Object.assign({className:"adyen-kyc-field-wrapper"},{children:[D(Ks,{stateRef:m}),p.isRequiredField("firstName")&&D(Be,Object.assign({name:"firstName",label:p.getLabel("firstName"),classNameModifiers:["firstName","col-50"],errorMessage:p.getErrorMessage("firstName",s,l),isValid:o.firstName,showInlineErrors:a.showInlineErrors,helper:t.get("enterNameExactlyAsAppearInID")},{children:ea("text",{name:"firstName",value:i.firstName,classNameModifiers:["name"],readonly:p.isReadOnly("firstName"),onInput:n("firstName","input"),onBlur:n("firstName","blur"),trimOnBlur:!0,spellCheck:!1,"aria-required":!0,"aria-label":p.getLabel("firstName"),"aria-invalid":!o.firstName,showInlineErrors:a.showInlineErrors})})),p.isRequiredField("lastName")&&D(Be,Object.assign({name:"lastName",label:p.getLabel("lastName"),classNameModifiers:["lastName","col-50"],errorMessage:p.getErrorMessage("lastName",s,l),isValid:o.lastName,showInlineErrors:a.showInlineErrors,helper:t.get("enterLastNameExactlyAsAppearInID")},{children:ea("text",{name:"lastName",value:i.lastName,classNameModifiers:["lastName"],readonly:p.isReadOnly("lastName"),onInput:n("lastName","input"),onBlur:n("lastName","blur"),trimOnBlur:!0,spellCheck:!1,"aria-required":!0,"aria-label":p.getLabel("lastName"),"aria-invalid":!o.lastName,showInlineErrors:a.showInlineErrors})}))]}))}const Jc=bt(Qc,((e,t)=>W(e.requiredFields,t.requiredFields)&&W(e.formVerificationErrors,t.formVerificationErrors)&&W(e.fieldValidationErrors,t.fieldValidationErrors)));Qc.defaultProps={data:{},onChange:()=>{},visibility:"editable",validationRules:Yc};var eu={validCheckCharacter:function(e,t){if(!/^[A-Z]$/.test(e))return!1;const a={0:1,9:21,I:19,R:8,1:0,A:1,J:21,S:12,2:5,B:0,K:2,T:14,3:7,C:5,L:4,U:16,4:9,D:7,M:18,V:10,5:13,E:9,N:20,W:22,6:15,F:13,O:11,X:25,7:17,G:15,P:3,Y:24,8:19,H:17,Q:6,Z:23},r={0:0,9:9,I:8,R:17,1:1,A:0,J:9,S:18,2:2,B:1,K:10,T:19,3:3,C:2,L:11,U:20,4:4,D:3,M:12,V:21,5:5,E:4,N:13,W:22,6:6,F:5,O:14,X:23,7:7,G:6,P:15,Y:24,8:8,H:7,Q:16,Z:25};let n=0;for(let e=0;e<15;e+=1){const i=(e%2==1?r:a)[t.substring(e,e+1)];if(null==i)return!0;n=(n+i)%26}return n>=0&&n<=26&&"ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(n)===e}};const tu={US:{idNumber:{maxlength:4}},US9:{idNumber:{maxlength:9}},BR:{idNumber:{formatter:function(e=""){if("string"!=typeof e)return"";const t=function(e){return e.replace(/[^0-9]/g,"").trim()}(e);return t.length>11?function(e){return e.replace(/^(\d{2})(\d{3})(\d{3})?(\d{4})?(\d{1,2})?$/g,((e,t,a,r,n="",i="")=>`${t}.${a}.${r}/${n}${i.length?`-${i}`:""}`))}(t):function(e){return e.replace(/\W/gi,"").replace(/(\d{3})(?!$)/g,"$1.").replace(/(.{11}).(\d{1,2})$/g,"$1-$2")}(t)},maxlength:18}}},au={US:/^\d{4}$/,US9:/^\d{9}$/,CA:/^\d{9}$/,IT:/^[A-Z]{6}[0-9]{2}[ABCDEHLMPRST][0-9]{2}[A-Z][0-9]{3}[A-Z]$/,ES:/(^[KL]?\d{7,8}[A-Z]$)|(^[MXYZ]\d{7}[A-Z]$)/,BR:/(^\d{3}\.\d{3}\.\d{3}-\d{2}$)|(^\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}$)/,SE:/^\d{10,12}$/},ru={idNumber:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}]},nu={US:{idNumber:[{validate:e=>au.US.test(e),modes:["blur"],errorMessage:"useSSNFormatUS"}]},US9:{idNumber:[{validate:e=>au.US9.test(e),modes:["blur"],errorMessage:"use9DigitsSSNFormatUS"}]},CA:{idNumber:[{validate:e=>au.CA.test(e),modes:["blur"],errorMessage:"useSSNFormatCA"}]},IT:{idNumber:[{validate:e=>au.IT.test(e)&&eu.validCheckCharacter(e.substring(15,16),e.substring(0,15)),modes:["blur"],errorMessage:"invalidFormat"}]},ES:{idNumber:[{validate:e=>au.ES.test(e),modes:["blur"],errorMessage:"invalidFormat"}]},SE:{idNumber:[{validate:e=>au.SE.test(e),modes:["blur"],errorMessage:"invalidFormat"}]},BR:{idNumber:[{validate:e=>au.BR.test(e),modes:["blur"],errorMessage:"invalidFormat"}]}},iu=["idNumber","idNumberExempt"];function ou(e){const{i18n:a,commonProps:r}=He(),[n,i]=le(e.errors),[o,s]=le(Object.assign(Object.assign({},e.data),{idNumberExempt:!!e.data.idNumberExempt})),l=pe((()=>function(e,t,a){if(!a||!t[a])return e;const r={};return Object.entries(e).forEach((([e,n])=>{const i=t[a][e];r[e]=i?Object.assign(Object.assign({},n),i):n})),Object.entries(t[a]).forEach((([e,t])=>{r[e]||(r[e]=t)})),r}({},tu,e.country)),[e.country]),d=((e,t)=>{var a;return(null===(a=e[t])||void 0===a?void 0:a.maxlength)||30})(l,"idNumber"),c=pe((()=>As(ru,nu,e.country)),[e.country]),{handleChangeFor:u,data:m,valid:p,errors:g,fieldProblems:y,triggerValidation:b,setValid:f}=ma(Object.assign(Object.assign({},e),{schema:e.requiredFields||o.idNumberExempt?["idNumberExempt"]:["idNumber","idNumberExempt"].idNumber,formatters:l,rules:c,defaultData:Object.assign(Object.assign({},e.data),{idNumberExempt:!!e.data.idNumberExempt}),fieldProblems:null==e?void 0:e.fieldValidationErrors})),{dataStoreId:h}=e,v=na(e,a),_=me({setState:null});ce((()=>{if(e.errors&&e.errors.idNumber){const t=V("idNumber").from(e.errors);i(Object.assign(Object.assign({},n),t)),f("idNumber",!1)}}),[e.errors]),ce((()=>{o.idNumber&&u("idNumber","blur")(o.idNumber)}),[e.country]),ce((()=>{const t=!(!W(o,m)||!e.errors||!Object.keys(e.errors).length);i(Object.assign(Object.assign(Object.assign({},n),g),t&&n)),t&&f("idNumber",!1),s(Object.assign(Object.assign({},o),m))}),[g,m]),ce((()=>{const e=Object.assign({},p);e.idNumber=!!o.idNumberExempt||p.idNumber;const t=Object.assign({},o);t.idNumber=o.idNumberExempt?null:o.idNumber,_.current.setState({type:"addToState",value:{data:t,valid:e,errors:n,fieldProblems:y,caller:"idNum",dataStoreId:h}})}),[o,p,n,y]),this.triggerValidation=b;const N=[v.isRequiredField("idNumberExempt")?"idNumberWithExempt":"idNumber"];return e.classNames&&N.push(...e.classNames),D("div",Object.assign({className:"adyen-kyc-field__id-number"},{children:v.isRequiredField("idNumber")&&D(t.Fragment,{children:[D(Be,Object.assign({name:"idNumber",label:v.getLabel("idNumber"),classNameModifiers:N,errorMessage:v.getErrorMessage("idNumber",n,y),disabled:o.idNumberExempt,isValid:p.idNumber,showInlineErrors:r.showInlineErrors,dataPlaceholder:o.idNumber&&e.dataPlaceholder},{children:ea("text",Object.assign(Object.assign({name:"idNumber",value:o.idNumber,placeholder:v.getPlaceholder("idNumber"),readonly:v.isReadOnly("idNumber"),onInput:u("idNumber","input"),onBlur:u("idNumber","blur"),"aria-required":!0,"aria-label":v.getLabel("idNumber","idNumber"),"aria-invalid":!p.idNumber,inputmode:"numeric",maxLength:d},o.idNumberExempt&&{disabled:!0}),{showInlineErrors:r.showInlineErrors}))})),D(Be,Object.assign({classNameModifiers:["idNumber__checkbox"],name:"idNumberExempt"},{children:v.isRequiredField("idNumberExempt")&&D(rt,{label:v.getLabel("idNumberExempt"),checked:o.idNumberExempt,classNameModifiers:["idNumberExempt"],name:"idNumberExempt",onChange:u("idNumberExempt")})})),D(Ks,{owner:"IdNumberComp",stateRef:_})]})}))}const su=bt(ou,((e,t)=>e.country===t.country&&W(e.errors,t.errors)&&W(e.labels,t.labels)&&W(e.requiredFields,t.requiredFields)&&W(e.formVerificationErrors,t.formVerificationErrors)&&W(e.fieldValidationErrors,t.fieldValidationErrors)));ou.defaultProps={data:{},onChange:()=>{}};const lu={birthDate:[{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},{modes:["blur"],validate:e=>e&&new Date(e)<new Date,errorMessage:"invalidDateOfBirth"}],residencyCountry:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},jobTitle:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},du="idNumber",cu=(e,t,a)=>o(void 0,void 0,void 0,(function*(){const r={name:{firstName:e.data.firstName,lastName:e.data.lastName},countryCode:t,idNumber:e.data.idNumber};try{const e=yield(n=a.loadingContext,i=a.clientKey,s=r,O({loadingContext:n,errorLevel:"warn",errorMessage:"Id verification is not available",errorHandler:e=>o(void 0,void 0,void 0,(function*(){const t=yield e;return 422===t.status?{status:422,message:t.detail,errorCode:t.errorCode}:500===t.status?{status:500,message:"Service did not respond, do not block verification"}:console.warn(`Unexpected response status ${t.status}`)})),path:"v1/verification/idNumber",clientKey:i},s));if(422===(null==e?void 0:e.status)||"false"===(null==e?void 0:e.verified))return{status:"error",data:e,fieldName:du,translationKey:"unableToVerifyTheIdNumber"};if(500===(null==e?void 0:e.status))return{status:"verified",data:e,fieldName:du};if("true"===(null==e?void 0:e.verified))return{status:"verified",data:e,fieldName:du}}catch(e){console.warn("WARNING: idNumber verification failed - error:",e)}var n,i,s}));const uu={role:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},mu=[{roleTypes:[Gl.OWNER,Gl.CONTROLLING_PERSON],min:1,max:1/0},{roleTypes:[Gl.OWNER],min:0,max:4},{roleTypes:[Gl.CONTROLLING_PERSON],min:0,max:1/0},{roleTypes:[Gl.SIGNATORY],min:1,max:1/0}],pu={US:[{roleTypes:[Gl.CONTROLLING_PERSON],min:1,max:1/0},{roleTypes:[Gl.OWNER],min:0,max:4},{roleTypes:[Gl.SIGNATORY],min:1,max:1/0}],BR:[{roleTypes:[Gl.CONTROLLING_PERSON],min:1,max:1/0},{roleTypes:[Gl.OWNER],min:0,max:4},{roleTypes:[Gl.SIGNATORY],min:1,max:1/0}],AU:[...mu,{roleTypes:[Gl.DIRECTOR],min:3,max:1/0}],CA:[...mu,{roleTypes:[Gl.DIRECTOR],min:1,max:1/0}],HK:[...mu,{roleTypes:[Gl.DIRECTOR],min:1,max:1/0}],IN:[...mu,{roleTypes:[Gl.DIRECTOR],min:3,max:15}],NZ:[...mu,{roleTypes:[Gl.DIRECTOR],min:1,max:1/0}],SG:[...mu,{roleTypes:[Gl.DIRECTOR],min:1,max:1/0}]},gu=e=>pu[e]||mu;const yu={[Gl.OWNER]:"provideAllOwners",[Gl.CONTROLLING_PERSON]:"ifNoOwnersSpecifyControllingPersons",[Gl.DIRECTOR]:"provideAllDirectorsYouShouldHaveAtLeastOne",[Gl.SIGNATORY]:"provideAtLeastOneSignatory"},bu={US:{[Gl.CONTROLLING_PERSON]:"provideOneControllingPerson"},BR:{[Gl.CONTROLLING_PERSON]:"provideOneControllingPerson"},AU:{[Gl.DIRECTOR]:"provideAllDirectorsYouShouldHaveAtLeastThree"},IN:{[Gl.DIRECTOR]:"provideAllDirectorsYouShouldHaveAtLeast3AndAtMost15"}},fu=e=>Object.assign(Object.assign({},yu),bu[e]),hu=e=>{if(null==e?void 0:e.entityAssociations){const t=Object.values(Gl);return e.entityAssociations.filter((a=>t.includes(a.type)&&a.associatorId===e.id))}return[]},vu=e=>hu(e).filter((e=>e.type===Gl.SIGNATORY)),_u=e=>{var t;return null===(t=hu(e))||void 0===t?void 0:t.map((e=>e.legalEntityId))},Nu=e=>hu(e).reduce(((e,t)=>{var a;return e[t.type]=(null!==(a=e[t.type])&&void 0!==a?a:0)+1,e}),{}),Ou=(e,t)=>{var a,r;if(t===Rl.TRUST_MEMBER_COMPANY_OWNER)return[Gl.OWNER];const n=Nu(e),i=null===(r=null===(a=null==e?void 0:e.organization)||void 0===a?void 0:a.registeredAddress)||void 0===r?void 0:r.country,o=gu(i).reduce(((e,t)=>{var a;const{roleTypes:r,max:i}=t;if(1===r.length){const t=r[0];(null!==(a=null==n?void 0:n[t])&&void 0!==a?a:0)<i&&e.push(t)}return e}),[]);return[...new Set(o)]},Iu=e=>{var t,a;const r=Nu(e),n=null===(a=null===(t=null==e?void 0:e.organization)||void 0===t?void 0:t.registeredAddress)||void 0===a?void 0:a.country;return gu(n).every((e=>{const{roleTypes:t,min:a}=e;return t.some((e=>{var t;return!a||(null!==(t=null==r?void 0:r[e])&&void 0!==t?t:0>=a)}))}))},Eu={[Gl.CONTROLLING_PERSON]:{id:Gl.CONTROLLING_PERSON,name:"controllingPerson",description:"controllingPersonDescription",className:"adl-tag--teal"},[Gl.OWNER]:{id:Gl.OWNER,name:"owner",description:"ownerDescription",className:"adl-tag--purple"},[Gl.SIGNATORY]:{id:Gl.SIGNATORY,name:"signatory",description:"signatoryDescription",className:"adl-tag--light-blue"},[Gl.DIRECTOR]:{id:Gl.DIRECTOR,name:"director",description:"directorDescription",className:"adl-tag--orange"}},Tu=["role"];function Au(e){var a;const{i18n:r,commonProps:n}=He(),{data:i,valid:o,errors:s,isValid:l,fieldProblems:d,triggerValidation:c,handleChangeFor:u}=ma(Object.assign(Object.assign({},e),{schema:e.requiredFields||["role"],rules:e.validators||uu,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors})),{dataStoreId:m}=e,p=me({setState:null}),[g,y]=le([]);ce((()=>{p.current.setState({type:"addToState",value:{data:i,valid:o,errors:s,fieldProblems:d,caller:"Role",dataStoreId:m}})}),[i,o,s,l]),this.triggerValidation=c;const b=na(e,r);return ce((()=>{y(((e,t)=>Object.values(Eu).filter((e=>0===(null==t?void 0:t.length)||(null==t?void 0:t.includes(e.id)))).map((t=>Object.assign(Object.assign({},t),{name:e.get(t.name),description:e.get(t.description)}))))(r,null==e?void 0:e.allowedRoles))}),[null===(a=null==e?void 0:e.allowedRoles)||void 0===a?void 0:a.toString(),r.languageCode,r.locale]),D("div",Object.assign({className:"adyen-kyc-field__role"},{children:[D(Ks,{stateRef:p}),b.isRequiredField("role",!1)&&D(t.Fragment,{children:D(Be,Object.assign({name:"role",classNameModifiers:["role"],label:r.get("role"),errorMessage:b.getErrorMessage("role",s,d),isValid:o.role,showInlineErrors:n.showInlineErrors},{children:ea("select",{onChange:u("role","input"),name:"role",placeholder:r.get("rolePlaceholder"),selected:i.role,items:g,readonly:e.readOnly&&!!i.role,showInlineErrors:n.showInlineErrors,filterable:!1,isMulti:!0})}))})]}))}const Su={phoneNumber:{modes:["blur"],validate:e=>r.phone(e).isValid,errorMessage:"invalidPhoneNumber"}},Cu={phoneNumber:{formatter:e=>e.replace(Ls("^+|\\d","g"),"")}},Ru=["phoneNumber"];function Du(e){var t,a,r;const{i18n:n,commonProps:i}=He(),{dataStoreId:o,country:s}=e,l=me({setState:null}),d=na(e,n),c=null!==(r=null===(a=null===(t=e.phonePrefixes)||void 0===t?void 0:t.find((e=>e.id===s)))||void 0===a?void 0:a.name)&&void 0!==r?r:"+1",{handleChangeFor:u,data:m,valid:p,errors:g,fieldProblems:y,isValid:b,triggerValidation:f}=ma(Object.assign(Object.assign({},e),{schema:e.requiredFields,defaultData:e.data,formatters:Cu,rules:e.validators||Su,fieldProblems:null==e?void 0:e.fieldValidationErrors}));return ce((()=>{l.current.setState({type:"addToState",value:{data:m,valid:p,errors:g,fieldProblems:y,caller:"phoneInput",dataStoreId:o}})}),[m,p,g,b]),this.triggerValidation=f,D("div",Object.assign({className:"adyen-kyc-phone-input"},{children:[D(Ks,{stateRef:l}),d.isRequiredField("phoneNumber")&&D(Be,Object.assign({name:"phoneNumber",label:d.getLabel("phoneNumber"),classNameModifiers:["phone-input"],isValid:p.phoneNumber,errorMessage:d.getErrorMessage("phoneNumber",g,y),showInlineErrors:i.showInlineErrors},{children:ea("tel",{name:"phoneNumber",value:m.phoneNumber,placeholder:c,readonly:d.isReadOnly("phoneNumber"),onInput:u("phoneNumber","input"),onBlur:u("phoneNumber","blur"),"aria-required":!0,"aria-label":d.getLabel("phoneNumber"),"aria-invalid":!p.phoneNumber,showInlineErrors:i.showInlineErrors})}))]}))}Du.defaultProps={phoneLabel:"telephoneNumber"};const ku=bt(Du,((e,t)=>e.country===t.country&&e.phonePrefixes==t.phonePrefixes)),Lu={email:{modes:["blur"],validate:e=>/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),errorMessage:"invalidEmail"}},wu=[...Ru,"email"];function Pu(e){const{i18n:t,commonProps:a}=He(),r=me(null),{dataStoreId:n,country:i}=e,o=e.requiredFields||wu,{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,triggerValidation:m,fieldProblems:g}=ma(Object.assign(Object.assign({},e),{schema:o,defaultData:e.data,rules:e.validators||Lu,fieldProblems:null==e?void 0:e.fieldValidationErrors})),y=na(e,t),b=me({setState:null});ce((()=>{b.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:g,caller:"contactDetails",dataStoreId:n}})}),[l,d,c,u]);const{dataset:f}=ta(p),h=kl(e,Ru);return this.triggerValidation=()=>{m(),r.current.triggerValidation()},D("div",Object.assign({role:"form",className:"adyen-kyc-individual__contact-details"},{children:[D(Ks,{owner:"ContactDetails",stateRef:b}),D(Fs,{heading:e.heading}),y.isRequiredField("email")&&D("div",Object.assign({className:"adyen-kyc-email"},{children:D(Be,Object.assign({name:"email",label:y.getLabel("email"),classNameModifiers:["email"],errorMessage:y.getErrorMessage("email",c,g),isValid:d.email,showInlineErrors:a.showInlineErrors},{children:ea("email",{name:"email",value:l.email,readonly:y.isReadOnly("email"),classNameModifiers:["email"],onInput:s("email","input"),onBlur:s("email","blur"),"aria-required":!0,"aria-label":y.getLabel("email"),"aria-invalid":!d.email,showInlineErrors:a.showInlineErrors})}))})),y.isRequiredField("phoneNumber")&&D(ku,Object.assign({},h,{ref:r,showInlineErrors:a.showInlineErrors,dataStoreId:n,country:i,phonePrefixes:f}))]}))}const ju=bt(Pu,((e,t)=>e.country===t.country&&W(e.labels,t.labels)&&W(e.requiredFields,t.requiredFields)&&W(e.formVerificationErrors,t.formVerificationErrors)&&W(e.fieldValidationErrors,t.fieldValidationErrors)));Pu.defaultProps={data:{}};var xu={"adl-u-screen-reader-only":"LoaderWrapper-module_adl-u-screen-reader-only__DQoId","adl-u-screen-reader-only-focusable":"LoaderWrapper-module_adl-u-screen-reader-only-focusable__OWQql","adl-u-text-align-center":"LoaderWrapper-module_adl-u-text-align-center__Fv6Ch","adl-u-text-align-left":"LoaderWrapper-module_adl-u-text-align-left__Xjhn1","adl-u-text-align-right":"LoaderWrapper-module_adl-u-text-align-right__GeJtt","adl-u-text-align-justify":"LoaderWrapper-module_adl-u-text-align-justify__-XTV-","adl-u-vertical-align-baseline":"LoaderWrapper-module_adl-u-vertical-align-baseline__KTZlu","adl-u-vertical-align-top":"LoaderWrapper-module_adl-u-vertical-align-top__A3yt3","adl-u-vertical-align-middle":"LoaderWrapper-module_adl-u-vertical-align-middle__QRNN8","adl-u-vertical-align-bottom":"LoaderWrapper-module_adl-u-vertical-align-bottom__Qi7G6","adl-u-vertical-align-text-top":"LoaderWrapper-module_adl-u-vertical-align-text-top__ss2jj","adl-u-vertical-align-text-bottom":"LoaderWrapper-module_adl-u-vertical-align-text-bottom__S7o5N","adl-u-float-left":"LoaderWrapper-module_adl-u-float-left__38-jH","adl-u-float-right":"LoaderWrapper-module_adl-u-float-right__PMpVS","adl-u-border-none":"LoaderWrapper-module_adl-u-border-none__nPmt-","adl-u-border-bottom-none":"LoaderWrapper-module_adl-u-border-bottom-none__LYeO1","adl-u-border-left-none":"LoaderWrapper-module_adl-u-border-left-none__Tu-nP","adl-u-border-right-none":"LoaderWrapper-module_adl-u-border-right-none__JJ7aQ","adl-u-border-top-none":"LoaderWrapper-module_adl-u-border-top-none__Q2SD8","adl-u-border-x-none":"LoaderWrapper-module_adl-u-border-x-none__o5pHH","adl-u-border-y-none":"LoaderWrapper-module_adl-u-border-y-none__4DM3l","adl-u-border-radius-4":"LoaderWrapper-module_adl-u-border-radius-4__HzmsL","adl-u-border-radius-6":"LoaderWrapper-module_adl-u-border-radius-6__24Y5b","adl-u-border-radius-8":"LoaderWrapper-module_adl-u-border-radius-8__rVBWa","adl-u-border-radius-12":"LoaderWrapper-module_adl-u-border-radius-12__AdNdi","adl-u-color-white":"LoaderWrapper-module_adl-u-color-white__cNLJe","adl-u-color-black":"LoaderWrapper-module_adl-u-color-black__7TChY","adl-u-color-grey-10":"LoaderWrapper-module_adl-u-color-grey-10__15TdJ","adl-u-color-grey-20":"LoaderWrapper-module_adl-u-color-grey-20__z4cS2","adl-u-color-grey-30":"LoaderWrapper-module_adl-u-color-grey-30__-6nob","adl-u-color-grey-40":"LoaderWrapper-module_adl-u-color-grey-40__Xnj9-","adl-u-color-grey-50":"LoaderWrapper-module_adl-u-color-grey-50__PNpJV","adl-u-color-grey-60":"LoaderWrapper-module_adl-u-color-grey-60__UrNCf","adl-u-color-grey-70":"LoaderWrapper-module_adl-u-color-grey-70__uziyz","adl-u-color-info-10":"LoaderWrapper-module_adl-u-color-info-10__N43Gu","adl-u-color-info-20":"LoaderWrapper-module_adl-u-color-info-20__zpreA","adl-u-color-info-30":"LoaderWrapper-module_adl-u-color-info-30__NP7MT","adl-u-color-info-40":"LoaderWrapper-module_adl-u-color-info-40__6lvzm","adl-u-color-info-50":"LoaderWrapper-module_adl-u-color-info-50__BFzTv","adl-u-color-info-60":"LoaderWrapper-module_adl-u-color-info-60__tE1pM","adl-u-color-info-70":"LoaderWrapper-module_adl-u-color-info-70__dwsFG","adl-u-color-warning-10":"LoaderWrapper-module_adl-u-color-warning-10__JkQtP","adl-u-color-warning-20":"LoaderWrapper-module_adl-u-color-warning-20__4Ezb-","adl-u-color-warning-30":"LoaderWrapper-module_adl-u-color-warning-30__uViH0","adl-u-color-warning-40":"LoaderWrapper-module_adl-u-color-warning-40__GMfPZ","adl-u-color-warning-50":"LoaderWrapper-module_adl-u-color-warning-50__ozrs8","adl-u-color-warning-60":"LoaderWrapper-module_adl-u-color-warning-60__arejd","adl-u-color-warning-70":"LoaderWrapper-module_adl-u-color-warning-70__OC1kC","adl-u-color-success-10":"LoaderWrapper-module_adl-u-color-success-10__sDjeQ","adl-u-color-success-20":"LoaderWrapper-module_adl-u-color-success-20__pAhsC","adl-u-color-success-30":"LoaderWrapper-module_adl-u-color-success-30__8lceW","adl-u-color-success-40":"LoaderWrapper-module_adl-u-color-success-40__-OVhR","adl-u-color-success-50":"LoaderWrapper-module_adl-u-color-success-50__w9iGp","adl-u-color-success-60":"LoaderWrapper-module_adl-u-color-success-60__TycSy","adl-u-color-success-70":"LoaderWrapper-module_adl-u-color-success-70__D-MTJ","adl-u-color-error-10":"LoaderWrapper-module_adl-u-color-error-10__ZAdis","adl-u-color-error-20":"LoaderWrapper-module_adl-u-color-error-20__a-5Z-","adl-u-color-error-30":"LoaderWrapper-module_adl-u-color-error-30__Wl5Tz","adl-u-color-error-40":"LoaderWrapper-module_adl-u-color-error-40__Rs-dp","adl-u-color-error-50":"LoaderWrapper-module_adl-u-color-error-50__aqx4o","adl-u-color-error-60":"LoaderWrapper-module_adl-u-color-error-60__s-cif","adl-u-color-error-70":"LoaderWrapper-module_adl-u-color-error-70__mtXLl","adl-u-color-mint-10":"LoaderWrapper-module_adl-u-color-mint-10__PyCeD","adl-u-color-mint-20":"LoaderWrapper-module_adl-u-color-mint-20__BVsuB","adl-u-color-mint-30":"LoaderWrapper-module_adl-u-color-mint-30__rFs6a","adl-u-color-mint-40":"LoaderWrapper-module_adl-u-color-mint-40__NLecv","adl-u-color-mint-50":"LoaderWrapper-module_adl-u-color-mint-50__KcoB4","adl-u-color-mint-60":"LoaderWrapper-module_adl-u-color-mint-60__mr5uU","adl-u-color-mint-70":"LoaderWrapper-module_adl-u-color-mint-70__ag2je","adl-u-color-brand":"LoaderWrapper-module_adl-u-color-brand__rRrDv","adl-u-color-default":"LoaderWrapper-module_adl-u-color-default__YfVqx","adl-u-color-disabled":"LoaderWrapper-module_adl-u-color-disabled__7bzQH","adl-u-color-quiet":"LoaderWrapper-module_adl-u-color-quiet__XPiq1","adl-u-color-inherit":"LoaderWrapper-module_adl-u-color-inherit__wR51M","adl-u-background-color-white":"LoaderWrapper-module_adl-u-background-color-white__fSJZ5","adl-u-background-color-black":"LoaderWrapper-module_adl-u-background-color-black__ChDOa","adl-u-background-color-grey-10":"LoaderWrapper-module_adl-u-background-color-grey-10__oPGfO","adl-u-background-color-grey-20":"LoaderWrapper-module_adl-u-background-color-grey-20__Ejfz-","adl-u-background-color-grey-30":"LoaderWrapper-module_adl-u-background-color-grey-30__hHjTO","adl-u-background-color-grey-40":"LoaderWrapper-module_adl-u-background-color-grey-40__SqH04","adl-u-background-color-grey-50":"LoaderWrapper-module_adl-u-background-color-grey-50__tUUPG","adl-u-background-color-grey-60":"LoaderWrapper-module_adl-u-background-color-grey-60__6i9MM","adl-u-background-color-grey-70":"LoaderWrapper-module_adl-u-background-color-grey-70__yqto5","adl-u-background-color-info-10":"LoaderWrapper-module_adl-u-background-color-info-10__Fol0t","adl-u-background-color-info-20":"LoaderWrapper-module_adl-u-background-color-info-20__-EOoN","adl-u-background-color-info-30":"LoaderWrapper-module_adl-u-background-color-info-30__yE1pC","adl-u-background-color-info-40":"LoaderWrapper-module_adl-u-background-color-info-40__tdB5Q","adl-u-background-color-info-50":"LoaderWrapper-module_adl-u-background-color-info-50__B3rBR","adl-u-background-color-info-60":"LoaderWrapper-module_adl-u-background-color-info-60__tNiM1","adl-u-background-color-info-70":"LoaderWrapper-module_adl-u-background-color-info-70__D6w2L","adl-u-background-color-warning-10":"LoaderWrapper-module_adl-u-background-color-warning-10__r1C9L","adl-u-background-color-warning-20":"LoaderWrapper-module_adl-u-background-color-warning-20__nxgBf","adl-u-background-color-warning-30":"LoaderWrapper-module_adl-u-background-color-warning-30__e7cgV","adl-u-background-color-warning-40":"LoaderWrapper-module_adl-u-background-color-warning-40__gFU3n","adl-u-background-color-warning-50":"LoaderWrapper-module_adl-u-background-color-warning-50__kdnCI","adl-u-background-color-warning-60":"LoaderWrapper-module_adl-u-background-color-warning-60__N1FBx","adl-u-background-color-warning-70":"LoaderWrapper-module_adl-u-background-color-warning-70__tseV-","adl-u-background-color-success-10":"LoaderWrapper-module_adl-u-background-color-success-10__nUC4T","adl-u-background-color-success-20":"LoaderWrapper-module_adl-u-background-color-success-20__8KaLI","adl-u-background-color-success-30":"LoaderWrapper-module_adl-u-background-color-success-30__G3UnZ","adl-u-background-color-success-40":"LoaderWrapper-module_adl-u-background-color-success-40__yRUO-","adl-u-background-color-success-50":"LoaderWrapper-module_adl-u-background-color-success-50__rrdfi","adl-u-background-color-success-60":"LoaderWrapper-module_adl-u-background-color-success-60__wK7hE","adl-u-background-color-success-70":"LoaderWrapper-module_adl-u-background-color-success-70__hMaj-","adl-u-background-color-error-10":"LoaderWrapper-module_adl-u-background-color-error-10__Q6Rw6","adl-u-background-color-error-20":"LoaderWrapper-module_adl-u-background-color-error-20__H7Mk8","adl-u-background-color-error-30":"LoaderWrapper-module_adl-u-background-color-error-30__GseU6","adl-u-background-color-error-40":"LoaderWrapper-module_adl-u-background-color-error-40__F-0vo","adl-u-background-color-error-50":"LoaderWrapper-module_adl-u-background-color-error-50__2C5nG","adl-u-background-color-error-60":"LoaderWrapper-module_adl-u-background-color-error-60__cWt-3","adl-u-background-color-error-70":"LoaderWrapper-module_adl-u-background-color-error-70__UliQ9","adl-u-background-color-mint-10":"LoaderWrapper-module_adl-u-background-color-mint-10__B5yYA","adl-u-background-color-mint-20":"LoaderWrapper-module_adl-u-background-color-mint-20__udcWT","adl-u-background-color-mint-30":"LoaderWrapper-module_adl-u-background-color-mint-30__Pvdfd","adl-u-background-color-mint-40":"LoaderWrapper-module_adl-u-background-color-mint-40__YSfUE","adl-u-background-color-mint-50":"LoaderWrapper-module_adl-u-background-color-mint-50__II2ur","adl-u-background-color-mint-60":"LoaderWrapper-module_adl-u-background-color-mint-60__JdCfY","adl-u-background-color-mint-70":"LoaderWrapper-module_adl-u-background-color-mint-70__XOOr7","adl-u-background-color-brand":"LoaderWrapper-module_adl-u-background-color-brand__StC5S","adl-u-background-color-default":"LoaderWrapper-module_adl-u-background-color-default__QqksR","adl-u-background-color-disabled":"LoaderWrapper-module_adl-u-background-color-disabled__F51GC","adl-u-background-color-quiet":"LoaderWrapper-module_adl-u-background-color-quiet__T-6X6","adl-u-background-color-inherit":"LoaderWrapper-module_adl-u-background-color-inherit__8L6-A","adl-u-overflow-auto":"LoaderWrapper-module_adl-u-overflow-auto__RLoFT","adl-u-overflow-hidden":"LoaderWrapper-module_adl-u-overflow-hidden__OdlT5","adl-u-overflow-scroll":"LoaderWrapper-module_adl-u-overflow-scroll__fF-sR","adl-u-overflow-visible":"LoaderWrapper-module_adl-u-overflow-visible__AD6V1","adl-u-overflow-x-auto":"LoaderWrapper-module_adl-u-overflow-x-auto__kVp7e","adl-u-overflow-x-hidden":"LoaderWrapper-module_adl-u-overflow-x-hidden__6HBtz","adl-u-overflow-x-scroll":"LoaderWrapper-module_adl-u-overflow-x-scroll__1O2-5","adl-u-overflow-x-visible":"LoaderWrapper-module_adl-u-overflow-x-visible__cNwIF","adl-u-overflow-y-auto":"LoaderWrapper-module_adl-u-overflow-y-auto__EHpmv","adl-u-overflow-y-hidden":"LoaderWrapper-module_adl-u-overflow-y-hidden__N84EW","adl-u-overflow-y-scroll":"LoaderWrapper-module_adl-u-overflow-y-scroll__M-nRc","adl-u-overflow-y-visible":"LoaderWrapper-module_adl-u-overflow-y-visible__s7JYN","adl-u-position-static":"LoaderWrapper-module_adl-u-position-static__9uW2P","adl-u-position-relative":"LoaderWrapper-module_adl-u-position-relative__20QN5","adl-u-position-absolute":"LoaderWrapper-module_adl-u-position-absolute__5JTK4","adl-u-position-sticky":"LoaderWrapper-module_adl-u-position-sticky__-v5nH","adl-u-position-fixed":"LoaderWrapper-module_adl-u-position-fixed__pybl1","adl-u-bottom-0":"LoaderWrapper-module_adl-u-bottom-0__63q6H","adl-u-left-0":"LoaderWrapper-module_adl-u-left-0__REQp7","adl-u-right-0":"LoaderWrapper-module_adl-u-right-0__LZOKr","adl-u-top-0":"LoaderWrapper-module_adl-u-top-0__LWq7N","adl-u-padding-2":"LoaderWrapper-module_adl-u-padding-2__3aY1d","adl-u-padding-bottom-2":"LoaderWrapper-module_adl-u-padding-bottom-2__wnJkv","adl-u-padding-left-2":"LoaderWrapper-module_adl-u-padding-left-2__x77IQ","adl-u-padding-right-2":"LoaderWrapper-module_adl-u-padding-right-2__v2l5C","adl-u-padding-top-2":"LoaderWrapper-module_adl-u-padding-top-2__29G-e","adl-u-padding-x-2":"LoaderWrapper-module_adl-u-padding-x-2__IEaLB","adl-u-padding-y-2":"LoaderWrapper-module_adl-u-padding-y-2__r-5Ne","adl-u-padding-4":"LoaderWrapper-module_adl-u-padding-4__Qf7Qu","adl-u-padding-bottom-4":"LoaderWrapper-module_adl-u-padding-bottom-4__W8RCl","adl-u-padding-left-4":"LoaderWrapper-module_adl-u-padding-left-4__EvyNL","adl-u-padding-right-4":"LoaderWrapper-module_adl-u-padding-right-4__dtmEh","adl-u-padding-top-4":"LoaderWrapper-module_adl-u-padding-top-4__e-ilN","adl-u-padding-x-4":"LoaderWrapper-module_adl-u-padding-x-4__4-z31","adl-u-padding-y-4":"LoaderWrapper-module_adl-u-padding-y-4__GGdPs","adl-u-padding-8":"LoaderWrapper-module_adl-u-padding-8__2NE20","adl-u-padding-bottom-8":"LoaderWrapper-module_adl-u-padding-bottom-8__yOXFD","adl-u-padding-left-8":"LoaderWrapper-module_adl-u-padding-left-8__cQfHL","adl-u-padding-right-8":"LoaderWrapper-module_adl-u-padding-right-8__UFca4","adl-u-padding-top-8":"LoaderWrapper-module_adl-u-padding-top-8__rDdlL","adl-u-padding-x-8":"LoaderWrapper-module_adl-u-padding-x-8__-tsFE","adl-u-padding-y-8":"LoaderWrapper-module_adl-u-padding-y-8__p67T8","adl-u-padding-16":"LoaderWrapper-module_adl-u-padding-16__wyIs0","adl-u-padding-bottom-16":"LoaderWrapper-module_adl-u-padding-bottom-16__ZbBMG","adl-u-padding-left-16":"LoaderWrapper-module_adl-u-padding-left-16__IZcWh","adl-u-padding-right-16":"LoaderWrapper-module_adl-u-padding-right-16__XX-Gm","adl-u-padding-top-16":"LoaderWrapper-module_adl-u-padding-top-16__YLoya","adl-u-padding-x-16":"LoaderWrapper-module_adl-u-padding-x-16__Nk9XH","adl-u-padding-y-16":"LoaderWrapper-module_adl-u-padding-y-16__4bS6b","adl-u-padding-24":"LoaderWrapper-module_adl-u-padding-24__T15uX","adl-u-padding-bottom-24":"LoaderWrapper-module_adl-u-padding-bottom-24__yZeVF","adl-u-padding-left-24":"LoaderWrapper-module_adl-u-padding-left-24__H4Mpo","adl-u-padding-right-24":"LoaderWrapper-module_adl-u-padding-right-24__Np7cC","adl-u-padding-top-24":"LoaderWrapper-module_adl-u-padding-top-24__-u4-u","adl-u-padding-x-24":"LoaderWrapper-module_adl-u-padding-x-24__d1Zyw","adl-u-padding-y-24":"LoaderWrapper-module_adl-u-padding-y-24__elC6h","adl-u-padding-32":"LoaderWrapper-module_adl-u-padding-32__1-66b","adl-u-padding-bottom-32":"LoaderWrapper-module_adl-u-padding-bottom-32__MGMqu","adl-u-padding-left-32":"LoaderWrapper-module_adl-u-padding-left-32__OjLzD","adl-u-padding-right-32":"LoaderWrapper-module_adl-u-padding-right-32__9gVTd","adl-u-padding-top-32":"LoaderWrapper-module_adl-u-padding-top-32__T7AgW","adl-u-padding-x-32":"LoaderWrapper-module_adl-u-padding-x-32__zINSY","adl-u-padding-y-32":"LoaderWrapper-module_adl-u-padding-y-32__1cAah","adl-u-padding-40":"LoaderWrapper-module_adl-u-padding-40__LBJpX","adl-u-padding-bottom-40":"LoaderWrapper-module_adl-u-padding-bottom-40__hzO-i","adl-u-padding-left-40":"LoaderWrapper-module_adl-u-padding-left-40__PteLs","adl-u-padding-right-40":"LoaderWrapper-module_adl-u-padding-right-40__KnF5h","adl-u-padding-top-40":"LoaderWrapper-module_adl-u-padding-top-40__oKHiH","adl-u-padding-x-40":"LoaderWrapper-module_adl-u-padding-x-40__kI6vI","adl-u-padding-y-40":"LoaderWrapper-module_adl-u-padding-y-40__RuSag","adl-u-padding-48":"LoaderWrapper-module_adl-u-padding-48__nab9e","adl-u-padding-bottom-48":"LoaderWrapper-module_adl-u-padding-bottom-48__D5-Ld","adl-u-padding-left-48":"LoaderWrapper-module_adl-u-padding-left-48__wkbHt","adl-u-padding-right-48":"LoaderWrapper-module_adl-u-padding-right-48__VWbRj","adl-u-padding-top-48":"LoaderWrapper-module_adl-u-padding-top-48__jFGoL","adl-u-padding-x-48":"LoaderWrapper-module_adl-u-padding-x-48__iLxON","adl-u-padding-y-48":"LoaderWrapper-module_adl-u-padding-y-48__xjJU8","adl-u-padding-56":"LoaderWrapper-module_adl-u-padding-56__k-Yhw","adl-u-padding-bottom-56":"LoaderWrapper-module_adl-u-padding-bottom-56__-PulO","adl-u-padding-left-56":"LoaderWrapper-module_adl-u-padding-left-56__aS5Yj","adl-u-padding-right-56":"LoaderWrapper-module_adl-u-padding-right-56__8hOKA","adl-u-padding-top-56":"LoaderWrapper-module_adl-u-padding-top-56__Y0eqm","adl-u-padding-x-56":"LoaderWrapper-module_adl-u-padding-x-56__GUbnb","adl-u-padding-y-56":"LoaderWrapper-module_adl-u-padding-y-56__KOOlW","adl-u-padding-64":"LoaderWrapper-module_adl-u-padding-64__huzIF","adl-u-padding-bottom-64":"LoaderWrapper-module_adl-u-padding-bottom-64__NJ3rS","adl-u-padding-left-64":"LoaderWrapper-module_adl-u-padding-left-64__HpfaZ","adl-u-padding-right-64":"LoaderWrapper-module_adl-u-padding-right-64__PVDK8","adl-u-padding-top-64":"LoaderWrapper-module_adl-u-padding-top-64__nhkYM","adl-u-padding-x-64":"LoaderWrapper-module_adl-u-padding-x-64__XHvji","adl-u-padding-y-64":"LoaderWrapper-module_adl-u-padding-y-64__PMwnL","adl-u-padding-72":"LoaderWrapper-module_adl-u-padding-72__EL37y","adl-u-padding-bottom-72":"LoaderWrapper-module_adl-u-padding-bottom-72__y0RBf","adl-u-padding-left-72":"LoaderWrapper-module_adl-u-padding-left-72__aKMlI","adl-u-padding-right-72":"LoaderWrapper-module_adl-u-padding-right-72__IKPYC","adl-u-padding-top-72":"LoaderWrapper-module_adl-u-padding-top-72__0eQl-","adl-u-padding-x-72":"LoaderWrapper-module_adl-u-padding-x-72__fnzOF","adl-u-padding-y-72":"LoaderWrapper-module_adl-u-padding-y-72__ZK5GM","adl-u-padding-80":"LoaderWrapper-module_adl-u-padding-80__OjC1L","adl-u-padding-bottom-80":"LoaderWrapper-module_adl-u-padding-bottom-80__mTI5S","adl-u-padding-left-80":"LoaderWrapper-module_adl-u-padding-left-80__zUnH3","adl-u-padding-right-80":"LoaderWrapper-module_adl-u-padding-right-80__FGUjE","adl-u-padding-top-80":"LoaderWrapper-module_adl-u-padding-top-80__WaNty","adl-u-padding-x-80":"LoaderWrapper-module_adl-u-padding-x-80__W5EC1","adl-u-padding-y-80":"LoaderWrapper-module_adl-u-padding-y-80__Q0CtV","adl-u-padding-88":"LoaderWrapper-module_adl-u-padding-88__3hIxN","adl-u-padding-bottom-88":"LoaderWrapper-module_adl-u-padding-bottom-88__-ySZu","adl-u-padding-left-88":"LoaderWrapper-module_adl-u-padding-left-88__Do-TE","adl-u-padding-right-88":"LoaderWrapper-module_adl-u-padding-right-88__ZszmB","adl-u-padding-top-88":"LoaderWrapper-module_adl-u-padding-top-88__PdiWT","adl-u-padding-x-88":"LoaderWrapper-module_adl-u-padding-x-88__aqiOm","adl-u-padding-y-88":"LoaderWrapper-module_adl-u-padding-y-88__opkT-","adl-u-padding-96":"LoaderWrapper-module_adl-u-padding-96__nUVGm","adl-u-padding-bottom-96":"LoaderWrapper-module_adl-u-padding-bottom-96__Q-Xxd","adl-u-padding-left-96":"LoaderWrapper-module_adl-u-padding-left-96__wti4M","adl-u-padding-right-96":"LoaderWrapper-module_adl-u-padding-right-96__Yq6N2","adl-u-padding-top-96":"LoaderWrapper-module_adl-u-padding-top-96__7wq4Z","adl-u-padding-x-96":"LoaderWrapper-module_adl-u-padding-x-96__ILllz","adl-u-padding-y-96":"LoaderWrapper-module_adl-u-padding-y-96__ShVbW","adl-u-padding-0":"LoaderWrapper-module_adl-u-padding-0__vL2ZJ","adl-u-padding-bottom-0":"LoaderWrapper-module_adl-u-padding-bottom-0__Sa8LS","adl-u-padding-left-0":"LoaderWrapper-module_adl-u-padding-left-0__ge--J","adl-u-padding-right-0":"LoaderWrapper-module_adl-u-padding-right-0__o8Uj0","adl-u-padding-top-0":"LoaderWrapper-module_adl-u-padding-top-0__V2OJQ","adl-u-padding-x-0":"LoaderWrapper-module_adl-u-padding-x-0__0a7Lo","adl-u-padding-y-0":"LoaderWrapper-module_adl-u-padding-y-0__osF0a","adl-u-padding-auto":"LoaderWrapper-module_adl-u-padding-auto__14VRO","adl-u-padding-bottom-auto":"LoaderWrapper-module_adl-u-padding-bottom-auto__xS8SM","adl-u-padding-left-auto":"LoaderWrapper-module_adl-u-padding-left-auto__vd-WD","adl-u-padding-right-auto":"LoaderWrapper-module_adl-u-padding-right-auto__1I3uM","adl-u-padding-top-auto":"LoaderWrapper-module_adl-u-padding-top-auto__ne0Nq","adl-u-padding-x-auto":"LoaderWrapper-module_adl-u-padding-x-auto__qDa4k","adl-u-padding-y-auto":"LoaderWrapper-module_adl-u-padding-y-auto__H5mWT","adl-u-margin-2":"LoaderWrapper-module_adl-u-margin-2__Qo8iE","adl-u-margin-bottom-2":"LoaderWrapper-module_adl-u-margin-bottom-2__6ohtb","adl-u-margin-left-2":"LoaderWrapper-module_adl-u-margin-left-2__s1JT2","adl-u-margin-right-2":"LoaderWrapper-module_adl-u-margin-right-2__-Mddd","adl-u-margin-top-2":"LoaderWrapper-module_adl-u-margin-top-2__sjp3N","adl-u-margin-x-2":"LoaderWrapper-module_adl-u-margin-x-2__SKHn6","adl-u-margin-y-2":"LoaderWrapper-module_adl-u-margin-y-2__s7BlI","adl-u-margin-4":"LoaderWrapper-module_adl-u-margin-4__ho9oo","adl-u-margin-bottom-4":"LoaderWrapper-module_adl-u-margin-bottom-4__dM-wd","adl-u-margin-left-4":"LoaderWrapper-module_adl-u-margin-left-4__uoq6Q","adl-u-margin-right-4":"LoaderWrapper-module_adl-u-margin-right-4__O-W4Y","adl-u-margin-top-4":"LoaderWrapper-module_adl-u-margin-top-4__j5hGD","adl-u-margin-x-4":"LoaderWrapper-module_adl-u-margin-x-4__M2Q6h","adl-u-margin-y-4":"LoaderWrapper-module_adl-u-margin-y-4__n3QcP","adl-u-margin-8":"LoaderWrapper-module_adl-u-margin-8__DHdMk","adl-u-margin-bottom-8":"LoaderWrapper-module_adl-u-margin-bottom-8__UFh6P","adl-u-margin-left-8":"LoaderWrapper-module_adl-u-margin-left-8__qrUDK","adl-u-margin-right-8":"LoaderWrapper-module_adl-u-margin-right-8__wWTZH","adl-u-margin-top-8":"LoaderWrapper-module_adl-u-margin-top-8__c0W0j","adl-u-margin-x-8":"LoaderWrapper-module_adl-u-margin-x-8__St8Ig","adl-u-margin-y-8":"LoaderWrapper-module_adl-u-margin-y-8__-V1Mg","adl-u-margin-16":"LoaderWrapper-module_adl-u-margin-16__y0p53","adl-u-margin-bottom-16":"LoaderWrapper-module_adl-u-margin-bottom-16__jGvbm","adl-u-margin-left-16":"LoaderWrapper-module_adl-u-margin-left-16__Upttw","adl-u-margin-right-16":"LoaderWrapper-module_adl-u-margin-right-16__W5-y8","adl-u-margin-top-16":"LoaderWrapper-module_adl-u-margin-top-16__gbfPj","adl-u-margin-x-16":"LoaderWrapper-module_adl-u-margin-x-16__R2UbC","adl-u-margin-y-16":"LoaderWrapper-module_adl-u-margin-y-16__gdLMJ","adl-u-margin-24":"LoaderWrapper-module_adl-u-margin-24__Bgj7-","adl-u-margin-bottom-24":"LoaderWrapper-module_adl-u-margin-bottom-24__FlN7g","adl-u-margin-left-24":"LoaderWrapper-module_adl-u-margin-left-24__l7cEY","adl-u-margin-right-24":"LoaderWrapper-module_adl-u-margin-right-24__7iU7q","adl-u-margin-top-24":"LoaderWrapper-module_adl-u-margin-top-24__5ExVh","adl-u-margin-x-24":"LoaderWrapper-module_adl-u-margin-x-24__CN9Uy","adl-u-margin-y-24":"LoaderWrapper-module_adl-u-margin-y-24__ayYCk","adl-u-margin-32":"LoaderWrapper-module_adl-u-margin-32__gttLq","adl-u-margin-bottom-32":"LoaderWrapper-module_adl-u-margin-bottom-32__TUE6-","adl-u-margin-left-32":"LoaderWrapper-module_adl-u-margin-left-32__N8ZoX","adl-u-margin-right-32":"LoaderWrapper-module_adl-u-margin-right-32__NCSZc","adl-u-margin-top-32":"LoaderWrapper-module_adl-u-margin-top-32__kvsHF","adl-u-margin-x-32":"LoaderWrapper-module_adl-u-margin-x-32__aHnwi","adl-u-margin-y-32":"LoaderWrapper-module_adl-u-margin-y-32__qs3Ih","adl-u-margin-40":"LoaderWrapper-module_adl-u-margin-40__KwyR4","adl-u-margin-bottom-40":"LoaderWrapper-module_adl-u-margin-bottom-40__irTpE","adl-u-margin-left-40":"LoaderWrapper-module_adl-u-margin-left-40__1MP-L","adl-u-margin-right-40":"LoaderWrapper-module_adl-u-margin-right-40__JCYNS","adl-u-margin-top-40":"LoaderWrapper-module_adl-u-margin-top-40__duOrg","adl-u-margin-x-40":"LoaderWrapper-module_adl-u-margin-x-40__8fLVI","adl-u-margin-y-40":"LoaderWrapper-module_adl-u-margin-y-40__oG9xg","adl-u-margin-48":"LoaderWrapper-module_adl-u-margin-48__Ic2Ku","adl-u-margin-bottom-48":"LoaderWrapper-module_adl-u-margin-bottom-48__h0tQC","adl-u-margin-left-48":"LoaderWrapper-module_adl-u-margin-left-48__7kxb-","adl-u-margin-right-48":"LoaderWrapper-module_adl-u-margin-right-48__Qlse8","adl-u-margin-top-48":"LoaderWrapper-module_adl-u-margin-top-48__dTvr2","adl-u-margin-x-48":"LoaderWrapper-module_adl-u-margin-x-48__mGF5m","adl-u-margin-y-48":"LoaderWrapper-module_adl-u-margin-y-48__Bccx9","adl-u-margin-56":"LoaderWrapper-module_adl-u-margin-56__LbQyi","adl-u-margin-bottom-56":"LoaderWrapper-module_adl-u-margin-bottom-56__l8yXF","adl-u-margin-left-56":"LoaderWrapper-module_adl-u-margin-left-56__ouRt1","adl-u-margin-right-56":"LoaderWrapper-module_adl-u-margin-right-56__VvR8H","adl-u-margin-top-56":"LoaderWrapper-module_adl-u-margin-top-56__osJoZ","adl-u-margin-x-56":"LoaderWrapper-module_adl-u-margin-x-56__KS1N2","adl-u-margin-y-56":"LoaderWrapper-module_adl-u-margin-y-56__pOIvQ","adl-u-margin-64":"LoaderWrapper-module_adl-u-margin-64__qrQ-3","adl-u-margin-bottom-64":"LoaderWrapper-module_adl-u-margin-bottom-64__iShlf","adl-u-margin-left-64":"LoaderWrapper-module_adl-u-margin-left-64__Rb3bk","adl-u-margin-right-64":"LoaderWrapper-module_adl-u-margin-right-64__5e905","adl-u-margin-top-64":"LoaderWrapper-module_adl-u-margin-top-64__DMFhE","adl-u-margin-x-64":"LoaderWrapper-module_adl-u-margin-x-64__88Dp3","adl-u-margin-y-64":"LoaderWrapper-module_adl-u-margin-y-64__YrjWu","adl-u-margin-72":"LoaderWrapper-module_adl-u-margin-72__p2Nth","adl-u-margin-bottom-72":"LoaderWrapper-module_adl-u-margin-bottom-72__bQ1rJ","adl-u-margin-left-72":"LoaderWrapper-module_adl-u-margin-left-72__2ZsA9","adl-u-margin-right-72":"LoaderWrapper-module_adl-u-margin-right-72__Y9jVV","adl-u-margin-top-72":"LoaderWrapper-module_adl-u-margin-top-72__XBIqc","adl-u-margin-x-72":"LoaderWrapper-module_adl-u-margin-x-72__U4Geq","adl-u-margin-y-72":"LoaderWrapper-module_adl-u-margin-y-72__igMhc","adl-u-margin-80":"LoaderWrapper-module_adl-u-margin-80__ZaaVL","adl-u-margin-bottom-80":"LoaderWrapper-module_adl-u-margin-bottom-80__4mhvM","adl-u-margin-left-80":"LoaderWrapper-module_adl-u-margin-left-80__Ujmc8","adl-u-margin-right-80":"LoaderWrapper-module_adl-u-margin-right-80__5vsK6","adl-u-margin-top-80":"LoaderWrapper-module_adl-u-margin-top-80__tCCbV","adl-u-margin-x-80":"LoaderWrapper-module_adl-u-margin-x-80__h2Yhu","adl-u-margin-y-80":"LoaderWrapper-module_adl-u-margin-y-80__3CZaK","adl-u-margin-88":"LoaderWrapper-module_adl-u-margin-88__OITKU","adl-u-margin-bottom-88":"LoaderWrapper-module_adl-u-margin-bottom-88__dXAiI","adl-u-margin-left-88":"LoaderWrapper-module_adl-u-margin-left-88__gzaMr","adl-u-margin-right-88":"LoaderWrapper-module_adl-u-margin-right-88__yoUAB","adl-u-margin-top-88":"LoaderWrapper-module_adl-u-margin-top-88__axU9A","adl-u-margin-x-88":"LoaderWrapper-module_adl-u-margin-x-88__G6HTw","adl-u-margin-y-88":"LoaderWrapper-module_adl-u-margin-y-88__1h5uT","adl-u-margin-96":"LoaderWrapper-module_adl-u-margin-96__rM0li","adl-u-margin-bottom-96":"LoaderWrapper-module_adl-u-margin-bottom-96__xWxo0","adl-u-margin-left-96":"LoaderWrapper-module_adl-u-margin-left-96__KjUWb","adl-u-margin-right-96":"LoaderWrapper-module_adl-u-margin-right-96__n6Lvn","adl-u-margin-top-96":"LoaderWrapper-module_adl-u-margin-top-96__wXR-E","adl-u-margin-x-96":"LoaderWrapper-module_adl-u-margin-x-96__59z1P","adl-u-margin-y-96":"LoaderWrapper-module_adl-u-margin-y-96__bknST","adl-u-margin-0":"LoaderWrapper-module_adl-u-margin-0__or6Fk","adl-u-margin-bottom-0":"LoaderWrapper-module_adl-u-margin-bottom-0__cmq1i","adl-u-margin-left-0":"LoaderWrapper-module_adl-u-margin-left-0__sX7Nh","adl-u-margin-right-0":"LoaderWrapper-module_adl-u-margin-right-0__aXH-p","adl-u-margin-top-0":"LoaderWrapper-module_adl-u-margin-top-0__OKTAA","adl-u-margin-x-0":"LoaderWrapper-module_adl-u-margin-x-0__8WA3F","adl-u-margin-y-0":"LoaderWrapper-module_adl-u-margin-y-0__sTouw","adl-u-margin-auto":"LoaderWrapper-module_adl-u-margin-auto__me62z","adl-u-margin-bottom-auto":"LoaderWrapper-module_adl-u-margin-bottom-auto__0bABW","adl-u-margin-left-auto":"LoaderWrapper-module_adl-u-margin-left-auto__OadFh","adl-u-margin-right-auto":"LoaderWrapper-module_adl-u-margin-right-auto__Xb8T0","adl-u-margin-top-auto":"LoaderWrapper-module_adl-u-margin-top-auto__TwqvP","adl-u-margin-x-auto":"LoaderWrapper-module_adl-u-margin-x-auto__W49-q","adl-u-margin-y-auto":"LoaderWrapper-module_adl-u-margin-y-auto__FeR-W","adl-u-box-sizing-border-box":"LoaderWrapper-module_adl-u-box-sizing-border-box__ZRUhq","adl-u-pointer-events-none":"LoaderWrapper-module_adl-u-pointer-events-none__yOoe8","adl-u-pointer-events-auto":"LoaderWrapper-module_adl-u-pointer-events-auto__6ErlI","adl-u-font-size-small":"LoaderWrapper-module_adl-u-font-size-small__8I1Ev","adl-u-font-size-medium":"LoaderWrapper-module_adl-u-font-size-medium__kAt3Y","adl-u-font-size-large":"LoaderWrapper-module_adl-u-font-size-large__n2fD9","adl-u-font-size-xlarge":"LoaderWrapper-module_adl-u-font-size-xlarge__A4cW2","adl-u-font-size-xxlarge":"LoaderWrapper-module_adl-u-font-size-xxlarge__QyQ-A","adl-u-font-size-inherit":"LoaderWrapper-module_adl-u-font-size-inherit__lien5","adl-u-font-weight-thin":"LoaderWrapper-module_adl-u-font-weight-thin__w6-7j","adl-u-font-weight-regular":"LoaderWrapper-module_adl-u-font-weight-regular__81wC2","adl-u-font-weight-medium":"LoaderWrapper-module_adl-u-font-weight-medium__6Bkr1","adl-u-font-weight-semi-bold":"LoaderWrapper-module_adl-u-font-weight-semi-bold__-Km48","adl-u-white-space-normal":"LoaderWrapper-module_adl-u-white-space-normal__O-8hp","adl-u-white-space-nowrap":"LoaderWrapper-module_adl-u-white-space-nowrap__uNmHL","adl-u-white-space-pre-wrap":"LoaderWrapper-module_adl-u-white-space-pre-wrap__-jx-K","adl-u-truncate":"LoaderWrapper-module_adl-u-truncate__hSayP","adl-u-word-break-break-word":"LoaderWrapper-module_adl-u-word-break-break-word__HsHGC","adl-u-visibility-visible":"LoaderWrapper-module_adl-u-visibility-visible__SVpoI","adl-u-visibility-hidden":"LoaderWrapper-module_adl-u-visibility-hidden__zVbUT","adl-u-display-none":"LoaderWrapper-module_adl-u-display-none__DsSe9","adl-u-display-initial":"LoaderWrapper-module_adl-u-display-initial__Lhzvs","adl-u-display-inline":"LoaderWrapper-module_adl-u-display-inline__gIPuS","adl-u-display-inline-block":"LoaderWrapper-module_adl-u-display-inline-block__uubRw","adl-u-display-block":"LoaderWrapper-module_adl-u-display-block__YZiA1","adl-u-display-table":"LoaderWrapper-module_adl-u-display-table__LpAm0","adl-u-display-table-row":"LoaderWrapper-module_adl-u-display-table-row__tjyhl","adl-u-display-table-cell":"LoaderWrapper-module_adl-u-display-table-cell__2Adjd","adl-u-display-flex":"LoaderWrapper-module_adl-u-display-flex__St4mQ","adl-u-display-inline-flex":"LoaderWrapper-module_adl-u-display-inline-flex__X8P3U","adl-u-flex-direction-row":"LoaderWrapper-module_adl-u-flex-direction-row__qOVTd","adl-u-flex-direction-row-reverse":"LoaderWrapper-module_adl-u-flex-direction-row-reverse__eEbiO","adl-u-flex-direction-column":"LoaderWrapper-module_adl-u-flex-direction-column__134gh","adl-u-flex-direction-column-reverse":"LoaderWrapper-module_adl-u-flex-direction-column-reverse__VCrho","adl-u-flex-wrap-wrap":"LoaderWrapper-module_adl-u-flex-wrap-wrap__QVjdM","adl-u-flex-wrap-nowrap":"LoaderWrapper-module_adl-u-flex-wrap-nowrap__rAxpJ","adl-u-align-items-start":"LoaderWrapper-module_adl-u-align-items-start__Dvri5","adl-u-align-items-flex-start":"LoaderWrapper-module_adl-u-align-items-flex-start__IfSZJ","adl-u-align-items-flex-end":"LoaderWrapper-module_adl-u-align-items-flex-end__wLnjV","adl-u-align-items-center":"LoaderWrapper-module_adl-u-align-items-center__ncX4A","adl-u-align-items-stretch":"LoaderWrapper-module_adl-u-align-items-stretch__VVYwf","adl-u-align-items-baseline":"LoaderWrapper-module_adl-u-align-items-baseline__ptDF1","adl-u-align-items-end":"LoaderWrapper-module_adl-u-align-items-end__i2wqG","adl-u-justify-content-center":"LoaderWrapper-module_adl-u-justify-content-center__VzKQK","adl-u-justify-content-flex-start":"LoaderWrapper-module_adl-u-justify-content-flex-start__2GeaL","adl-u-justify-content-flex-end":"LoaderWrapper-module_adl-u-justify-content-flex-end__jX5a4","adl-u-justify-content-start":"LoaderWrapper-module_adl-u-justify-content-start__s19ps","adl-u-justify-content-end":"LoaderWrapper-module_adl-u-justify-content-end__WrpbG","adl-u-justify-content-left":"LoaderWrapper-module_adl-u-justify-content-left__UYl5j","adl-u-justify-content-right":"LoaderWrapper-module_adl-u-justify-content-right__Ulage","adl-u-justify-content-space-between":"LoaderWrapper-module_adl-u-justify-content-space-between__fHuEx","adl-u-justify-content-space-around":"LoaderWrapper-module_adl-u-justify-content-space-around__yuaBm","adl-u-justify-content-space-evenly":"LoaderWrapper-module_adl-u-justify-content-space-evenly__ZKme5","adl-u-justify-content-stretch":"LoaderWrapper-module_adl-u-justify-content-stretch__zRJxM","adl-u-flex-1":"LoaderWrapper-module_adl-u-flex-1__dnOHF","adl-u-width-full":"LoaderWrapper-module_adl-u-width-full__g4Hkw","adl-u-width-auto":"LoaderWrapper-module_adl-u-width-auto__3QMUT","adyen-kyc-loading-input__form":"LoaderWrapper-module_adyen-kyc-loading-input__form__chx-J","adyen-kyc-loading-input__form--loading-opacity0":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0__A2eC5","adyen-kyc-loading-input__form--loading-opacity0-1":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-1__CbgnO","adyen-kyc-loading-input__form--loading-opacity0-2":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-2__LdJOX","adyen-kyc-loading-input__form--loading-opacity0-3":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-3__S3Lav","adyen-kyc-loading-input__form--loading-opacity0-4":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-4__Nbbb9","adyen-kyc-loading-input__form--loading-opacity0-5":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-5__1alhE","adyen-kyc-loading-input__form--loading-opacity0-6":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-6__uicZA","adyen-kyc-loading-input__form--loading-opacity0-7":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-7__AgxAJ","adyen-kyc-loading-input__form--loading-opacity0-8":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-8__2gl9x","adyen-kyc-loading-input__form--loading-opacity0-9":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-9__acg2x","adyen-kyc-loading-input__form--loading-opacity1":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity1__kOcum","adyen-kyc-loading-input__loader":"LoaderWrapper-module_adyen-kyc-loading-input__loader__k4L0f","adyen-kyc-loading-input__loader--active":"LoaderWrapper-module_adyen-kyc-loading-input__loader--active__RLLLI"};const Mu="success",Fu="loading";var Vu;!function(e){e.SUCCESS="success",e.LOADING="loading"}(Vu||(Vu={}));const Uu=({children:e,status:t,formOpacityWhenLoading:r=0,loaderSize:n="large",showSpinner:i=!0,className:o})=>{const s=`${r}`.split("."),l=s[0],d=s[1],c=a("adyen-kyc-loading-input__form",xu["adyen-kyc-loading-input__form"],{[xu[`adyen-kyc-loading-input__form--loading-opacity${d?`${l}-${d}`:`${l}`}`]]:t===Fu}),u=a({[xu["adyen-kyc-loading-input__loader"]]:!0,[xu["adyen-kyc-loading-input__loader--active"]]:t===Fu&&i}),m=a("adyen-kyc-loading-input",o);return D("div",Object.assign({className:m,style:{position:"relative"}},{children:[D("div",Object.assign({className:u},{children:D(Qe,{size:n})})),D("div",Object.assign({className:c},{children:e}))]}))},Bu=["typeOfIdentity","licenseCardNumber","issuerState"],Wu=["nationalIdNumber","passport","driversLicense","proofOfIdentityCard"],Hu=({availableIdentityTypes:e,selectedIdentityType:t,setSelectedIdentityType:a,formUtils:{getLabel:r},errorMessage:n,isValid:i})=>{const{i18n:o,commonProps:{showInlineErrors:s}}=He();return D(Be,Object.assign({name:"typeOfIdentity",label:r("typeOfIdentity"),errorMessage:n,isValid:i},{children:[D("span",Object.assign({className:"adyen-kyc-helper-text"},{children:o.get("typeOfIdentitySubtitle")})),D(ct,{isInvalid:!1,items:e.map((e=>((e,t)=>({id:e,name:t}))(e,o.get(e)))),placeholder:o.get("id"),selected:t,onChange:e=>a(e.target.value),showInlineErrors:s})]}))},qu=({passportNumber:e,onInput:t,onBlur:a,formUtils:{getLabel:r},errorMessage:n,isValid:i})=>{const{commonProps:{showInlineErrors:o}}=He();return D(Be,Object.assign({name:"passportNumber",label:r("idNumber","passportNumber"),showInlineErrors:o,errorMessage:n,isValid:i},{children:D(Ut,{name:"passportNumber",value:e,onInput:t,onBlur:a,placeholder:"",showInlineErrors:o})}))},Gu=({cardNumber:e,onInput:t,onBlur:a,formUtils:{getLabel:r},errorMessage:n,isValid:i})=>{const{commonProps:{showInlineErrors:o}}=He();return D(Be,Object.assign({name:"cardNumber",label:r("idNumber","proofOfIdentityCardNumber"),showInlineErrors:o,errorMessage:n,isValid:i},{children:D(Ut,{name:"cardNumber",value:e,onInput:t,onBlur:a,placeholder:"",showInlineErrors:o})}))},$u=({driversLicense:e,onIssuerStateChange:a,onLicenseNumberInput:r,onLicenseNumberBlur:n,onCardNumberInput:i,onCardNumberBlur:o,formUtils:{getLabel:s},isValid:l,errorMessages:d})=>{const{i18n:c,commonProps:{showInlineErrors:u}}=He(),{dataset:p}=ta(m("AU"));return D(t.Fragment,{children:[D(Be,Object.assign({name:"issuerState",label:s("issuerState"),showInlineErrors:u,isValid:l.issuerState,errorMessage:d.issuerState},{children:D(ct,{onChange:a,isInvalid:!1,items:p,placeholder:c.get("selectState"),selected:e.issuerState})})),D("div",Object.assign({className:"adyen-kyc-field-wrapper"},{children:[D(Be,Object.assign({name:"licenseNumber",label:s("idNumber","licenseNumber"),showInlineErrors:u,isValid:l.idNumber,errorMessage:d.idNumber},{children:D(Ut,{name:"licenseNumber",value:e.idNumber,onInput:r,onBlur:n,placeholder:"",showInlineErrors:u})})),D(Be,Object.assign({name:"licenseCardNumber",label:s("licenseCardNumber"),showInlineErrors:u,isValid:l.licenseCardNumber,errorMessage:d.licenseCardNumber},{children:D(Ut,{name:"licenseCardNumber",value:e.licenseCardNumber,onInput:i,onBlur:o,placeholder:"",showInlineErrors:u})}))]})),D(md,{page:"Personal details",title:c.get("whereCanIFindTheseNumbersOnMyDriversLicense"),content:D(t.Fragment,{children:[c.get("whereToFindNumbersOnDriversLicense"),"\xa0",D("a",Object.assign({href:"https://www.usi.gov.au/about/forms-id/drivers-licence",target:"_blank",rel:"noreferrer"},{children:c.get("iStillCantFindIt")}))]}),titleId:"whereCanIFindTheseNumbersOnMyDriversLicense",contentId:"whereToFindNumbersOnDriversLicense"})]})};const Xu={validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"},Yu=/^[A-Z]{1,2}\d{7}$/,Ku=/^[A-Za-z\d]{6,10}$/,zu=/^[A-Za-z\d]{6,10}$/,Zu={typeOfIdentity:[Xu],idNumber:[{validate:(e,t)=>{switch(t.state.data.typeOfIdentity){case"passport":return Yu.test(e);case"driversLicense":return Ku.test(e);case"proofOfIdentityCard":return zu.test(e)}},errorMessage:(e,t)=>{switch(t.state.data.typeOfIdentity){case"passport":return"invalidFormatForAuPassportNumber";case"driversLicense":return"invalidFormatForAuDriversLicenseNumber";case"proofOfIdentityCard":return"invalidFormatForAuProofOfIdentityCardNumber"}},modes:["blur"]}],licenseCardNumber:[{validate:e=>Ku.test(e),errorMessage:"invalidFormatForAuDriversLicenseCardNumber",modes:["blur"]}],issuerState:[Xu]};function Qu(e){var a;"nationalIdNumber"===(null===(a=e.data)||void 0===a?void 0:a.typeOfIdentity)&&(e.data.typeOfIdentity=void 0);const{handleChangeFor:r,triggerValidation:n,data:i,errors:o,fieldProblems:s,valid:l}=ma(Object.assign(Object.assign({},e),{schema:e.requiredFields,defaultData:e.data,fieldProblems:e.fieldValidationErrors,rules:Zu}));ce((()=>{i.typeOfIdentity&&n(["idNumber"])}),[n,i.typeOfIdentity]),this.triggerValidation=n;const{sliceData:d,updateStateSlice:c}=function(e,t){const{dispatch:a,getData:r}=zd(),n=r()[e],i=ge((r=>a({type:"addToState",value:Object.assign(Object.assign({},r),{dataStoreId:e,caller:t})})),[e,t]);return{sliceData:n,updateStateSlice:ge(dt(i,200),[i])}}("personalDetails");ce((()=>c({data:Object.assign(Object.assign({},d),i),errors:o,valid:l,fieldProblems:s})),[i,o,l,s]);const{i18n:u}=He(),m=na(e,u);return D(t.Fragment,{children:[D(Hu,{availableIdentityTypes:Wu.filter((e=>"nationalIdNumber"!==e)),selectedIdentityType:i.typeOfIdentity,setSelectedIdentityType:r("typeOfIdentity"),formUtils:m,isValid:l.typeOfIdentity,errorMessage:m.getErrorMessage("typeOfIdentity",o,s)}),"passport"===i.typeOfIdentity?D(qu,{passportNumber:i.idNumber,onInput:r("idNumber","input"),onBlur:r("idNumber","blur"),formUtils:m,isValid:l.idNumber,errorMessage:m.getErrorMessage("idNumber",o,s)}):"proofOfIdentityCard"===i.typeOfIdentity?D(Gu,{cardNumber:i.idNumber,onInput:r("idNumber","input"),onBlur:r("idNumber","blur"),formUtils:m,isValid:l.idNumber,errorMessage:m.getErrorMessage("idNumber",o,s)}):"driversLicense"===i.typeOfIdentity?D($u,{driversLicense:i,onIssuerStateChange:r("issuerState"),onLicenseNumberInput:r("idNumber","input"),onLicenseNumberBlur:r("idNumber","blur"),onCardNumberInput:r("licenseCardNumber","input"),onCardNumberBlur:r("licenseCardNumber","blur"),formUtils:m,isValid:{idNumber:l.idNumber,licenseCardNumber:l.licenseCardNumber,issuerState:l.issuerState},errorMessages:{idNumber:m.getErrorMessage("idNumber",o,s),licenseCardNumber:m.getErrorMessage("licenseCardNumber",o,s),issuerState:m.getErrorMessage("issuerState",o,s)}}):void 0]})}const Ju=[...Bu,"idNumber"],em="1_316",tm="1_3062",am="1_30",rm="4DigitSSN",nm="entireSSN",im=vt(((e,t)=>{var a,r,n,i;const o=null===(a=e.formVerificationErrors)||void 0===a?void 0:a[am],s=(null===(r=null==o?void 0:o[tm])||void 0===r?void 0:r.some((e=>e.code===em)))||9===(null===(i=null===(n=e.data)||void 0===n?void 0:n.idNumber)||void 0===i?void 0:i.length)?nm:rm;let l=Object.assign({},e);if(s===nm){const t={labels:Object.assign(Object.assign({},e.labels),{idNumber:"socialSecurityNumber9Digits"}),country:"US9",placeholders:Object.assign(Object.assign({},e.placeholders),{idNumber:"SSNFormatUS9Digits"})};l=Object.assign(Object.assign({},e),t)}return s===rm&&(l.classNames=["us4DigitsNumberId"],l.dataPlaceholder="*** \u2014 ** \u2014 "),D(su,Object.assign({},l,{ref:t}))})),om=[...Zc,"birthDate",...iu,...Bu,"residencyCountry","jobTitle",...Tu,...wu,...Bl,...Ql];function sm(e){const{i18n:t,commonProps:a}=He(),{isSettingEnabled:r}=Zl(),n=me(null),i=me(null),s=me(null),l=me(null),d=me(null),c=me(null),u=e.id,[m,p]=le(null),[g,y]=le(Mu),b=me({setState:null}),[f,h]=le(null),v=e.taskType===Rl.DECISION_MAKER||e.taskType===Rl.TRUST_MEMBER_COMPANY_OWNER,_=(e.requiredFields||om).filter((e=>"role"!==e||"role"===e&&v)),N=r("editPrefilledCountry"),O=r("enableTrustFlow"),I=()=>_.filter((e=>["birthDate","residencyCountry","jobTitle"].includes(e))),{handleChangeFor:E,data:T,valid:A,errors:S,triggerValidation:C,fieldProblems:R}=ma(Object.assign(Object.assign({},e),{schema:I(),defaultData:e.data,rules:e.validators||lu,fieldProblems:null==e?void 0:e.fieldValidationErrors})),k=na(e,t),{hasFieldsToVerify:L,verifyFields:w}=function(e,t){const{loadingContext:a,clientKey:r}=He();return{hasFieldsToVerify:!!(null==e?void 0:e.length),verifyFields:ge((n=>o(this,void 0,void 0,(function*(){const i=[];return e.map((e=>{if("idNumber"===e&&n.data[e]){if("US"===t&&4===n.data[e].length)return;const o=cu(n,t,{loadingContext:a,clientKey:r});i.push(o)}})),Promise.all(i)}))),[e,t])}}(e.verifyFields,T.residencyCountry);this.triggerValidation=()=>{C(I()),v&&n.current.triggerValidation(),B(j)&&i.current.triggerValidation(),B(x)&&s.current.triggerValidation(),B(F)&&l.current.triggerValidation(),O&&B(V)&&d.current.triggerValidation(),B(U)&&c.current.triggerValidation()},this.verifyForm=()=>{if(!L)return Promise.resolve(!0);const e=performance.now();return y(Fu),new Promise((t=>{w({data:f}).then((a=>{const r=a.every((e=>"verified"===e.status)),n=performance.now(),i=Math.floor(n-e);if(i<400?setTimeout((()=>{y(Mu),t(r)}),400-i):(y(Mu),t(r)),!r){const e=Object.assign({},m);a.forEach((t=>{"error"===t.status&&(e[t.fieldName]={isValid:!1,errorMessage:t.translationKey})})),p(Object.assign(Object.assign({},m),e))}}))}))},ce((()=>{b.current.setState({type:"addToState",value:{data:T,valid:A,errors:S,fieldProblems:R,caller:u,dataStoreId:u,schema:_}})}),[T,A,S]);const P=kl(e,Tu),j=kl(e,Zc),x=kl(e,iu),M=kl(e,Ju),F=kl(e,wu),V=kl(e,Bl),U=kl(e,Ql),B=e=>!!e.requiredFields.length;return D(Uu,Object.assign({status:g,formOpacityWhenLoading:.3,loaderSize:"large"},{children:[D(Ks,{owner:u,stateRef:b}),D(Kd,{owner:u,onChange:({currentState:e,changeInitiatedBy:t})=>{var a,r;t===u&&(!(null===(r=null===(a=e.errors)||void 0===a?void 0:a[u])||void 0===r?void 0:r.idNumber)&&(null==m?void 0:m.idNumber)&&delete m.idNumber,this.isValid=e.validityByForm[u],h(e.data[u]))}}),D("form",Object.assign({className:"adyen-kyc-individual__personal-details","aria-describedby":a.showInlineErrors?null:"ariaErrorField"},{children:[D(Fs,{heading:e.heading}),D(Gc,{verificationErrors:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:k,id:"ariaErrorField"}),"US"!==T.residencyCountry||v?void 0:D(nc,{}),D(md,{page:"Personal details",title:t.get("whyDoINeedToFillInThisInformation"),content:t.get("reasonForFillingIndividualPersonalDetails"),titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingIndividualPersonalDetails"}),v&&D(Au,Object.assign({},P,{ref:n,taskType:e.taskType,dataStoreId:u,allowedRoles:null==e?void 0:e.allowedRoles})),B(j)&&D(Jc,Object.assign({},j,{ref:i,dataStoreId:u})),k.isRequiredField("birthDate")&&D(Be,Object.assign({name:"birthDate",label:k.getLabel("birthDate"),classNameModifiers:["birthDate"],errorMessage:k.getErrorMessage("birthDate",S,R),isValid:A.birthDate,showInlineErrors:a.showInlineErrors},{children:ea("date",{name:"birthDate",value:T.birthDate,placeholder:t.get("birthDatePlaceholder"),readonly:k.isReadOnly("birthDate"),onInput:E("birthDate","input"),onBlur:E("birthDate","blur"),"aria-required":!0,"aria-label":k.getLabel("birthDate"),"aria-invalid":!A.birthDate,showInlineErrors:a.showInlineErrors,max:(W=new Date,W.toJSON().slice(0,10))})})),k.isRequiredField("residencyCountry")&&D(ra,{label:k.getLabel("residencyCountry"),allowedCountries:[],classNameModifiers:["country"],errorMessage:k.getErrorMessage("residencyCountry",S,R),onDropdownChange:E("residencyCountry","input"),value:T.residencyCountry,readOnly:!N&&!v}),B(x)&&("AU"===T.residencyCountry?D(Qu,Object.assign({},M,{ref:s,dataStoreId:u})):"US"===T.residencyCountry?D(im,Object.assign({},x,{errors:m,dataStoreId:u,country:T.residencyCountry,formVerificationErrors:e.formVerificationErrors})):D(su,Object.assign({},x,{ref:s,errors:m,country:T.residencyCountry,dataStoreId:u}))),B(F)&&D(ju,Object.assign({},F,{ref:l,dataStoreId:u,country:T.residencyCountry})),k.isRequiredField("jobTitle",!1)&&D(Be,Object.assign({name:"jobTitle",label:k.getLabel("jobTitle"),classNameModifiers:["jobTitle"],errorMessage:k.getErrorMessage("jobTitle",S,R)},{children:ea("text",{name:"jobTitle",value:T.jobTitle,placeholder:k.getPlaceholder("jobTitle"),readonly:k.isReadOnly("jobTitle"),onInput:E("jobTitle","input"),onBlur:E("jobTitle","blur"),"aria-required":!0,"aria-label":k.getLabel("jobTitle"),"aria-invalid":!A.birthDate})})),O&&k.isRequiredField("isPartOfTrust",!1)&&D(Wl,Object.assign({},V,{legalEntityType:ol.INDIVIDUAL,ref:d,dataStoreId:u,isReadOnlyOnDefaultDataYes:!0})),k.isRequiredField("accountHolder")&&D(td,Object.assign({},U,{ref:c,country:T.residencyCountry,dataStoreId:u}))]}))]}));var W}var lm;!function(e){e.PASSPORT="passport",e.DRIVING_LICENCE="driving_licence",e.NATIONAL_IDENTITY_CARD="national_identity_card",e.RESIDENCE_PERMIT="residence_permit"}(lm||(lm={}));const dm=[{id:uc.DRIVERS_LICENSE,name:"driversLicense",hasBackPage:!0},{id:uc.PASSPORT,name:"passport",hasBackPage:!1},{id:uc.IDENTITY_CARD,name:"id",hasBackPage:!0}],cm=[{id:lm.DRIVING_LICENCE,name:"driversLicense",hasBackPage:!0},{id:lm.NATIONAL_IDENTITY_CARD,name:"id",hasBackPage:!0},{id:lm.PASSPORT,name:"passport",hasBackPage:!1}],um={},mm=dm.map((e=>e.id));let pm,gm,ym;const bm=(e,t,a)=>(pm&&gm&&ym||(pm=t,gm=a,ym=e),{fetchDocuments:fm,fetchDocument:hm,uploadDocuments:vm}),fm=(e,t)=>o(void 0,void 0,void 0,(function*(){const a=[];null==e||e.forEach((e=>{a.push(hm(e,t))}));return(yield Promise.all(a)).forEach((e=>{var t;const a=null===(t=null==e?void 0:e.owner)||void 0===t?void 0:t.id;a&&(um[a]=um[a]||[],um[a].push(e))})),um[t]})),hm=(e,t)=>o(void 0,void 0,void 0,(function*(){return pm(e,t)})),vm=(e,t)=>o(void 0,void 0,void 0,(function*(){const a=[];e.forEach((e=>{if(Em(e,t)){if(Tm(e,t)){const r=Nm(t,e.type).id;a.push(gm(e,r,t))}}else a.push(ym(e,t))}));const r=yield Promise.all(a);return _m(r,t),um[t]})),_m=(e,t)=>{um[t]||(um[t]=[]),e.forEach((e=>{if(e){const a=um[t].findIndex((t=>t.id===e.id));a>-1?um[t][a]=e:um[t].push(e)}}))},Nm=(e,t)=>{var a;return null===(a=um[e])||void 0===a?void 0:a.find((e=>e.type===t&&Am(e)))},Om=({entityId:e,entityType:t,documentType:a,page1:r,page2:n=null,description:i=null})=>o(void 0,void 0,void 0,(function*(){const o=[Sm(r),Sm(n)].filter(Boolean),[s,l]=yield Promise.all(o),d=r&&n;if(s)return{owner:{id:e,type:t},type:a,description:i||`Document type: ${a}`,attachments:[Im(s,null==r?void 0:r.name,d?"front":null),Im(l,null==n?void 0:n.name,d?"back":null)].filter(Boolean)}})),Im=(e,t,a="")=>e&&Object.assign({content:e,pageName:t},a&&{pageType:a}),Em=(e,t)=>{const a=um[t];return!!(null==a?void 0:a.length)&&a.some((t=>t.type===e.type))},Tm=(e,t)=>{const a=Nm(t,e.type);return!a||a.attachments.some(((t,a)=>{var r;return t.content!==(null===(r=null==e?void 0:e.attachments[a])||void 0===r?void 0:r.content)}))},Am=e=>!!e,Sm=e=>new Promise(((t,a)=>{if(!(e&&e instanceof Blob))return void t(null);const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{const e=r.result.toString().split(";base64,")[1];t(e)},r.onerror=e=>a(e)})),Cm=e=>e.split(".").pop();var Rm;!function(e){e.DEFINED_BENEFICIARY="definedBeneficiary",e.PROTECTOR="protector",e.SECONDARY_TRUSTEE="secondaryTrustee",e.SETTLOR="settlor",e.UBO_THROUGH_OWNERSHIP="uboThroughOwnership"}(Rm||(Rm={}));const Dm={[Rm.DEFINED_BENEFICIARY]:{min:1},[Rm.SETTLOR]:{min:1}},km=e=>{var t;return null===(t=null==e?void 0:e.entityAssociations)||void 0===t?void 0:t.some((t=>t.entityType===ol.TRUST&&t.associatorId===e.id))},Lm=e=>km(e)?Fl.IS_PART_OF_TRUST:Fl.IS_NOT_PART_OF_TRUST,wm=e=>{var t;return null===(t=Vl.find((t=>t.id===e)))||void 0===t?void 0:t.name},Pm=e=>{if(null==e?void 0:e.entityAssociations){const t=Object.values(Rm);return e.entityAssociations.filter((a=>t.includes(a.type)&&a.associatorId===e.id))}return[]},jm=e=>{var t;return null===(t=Pm(e))||void 0===t?void 0:t.map((e=>e.legalEntityId))},xm=e=>{var t,a;return null===(a=null===(t=null==e?void 0:e.entityAssociations)||void 0===t?void 0:t.find((t=>t.entityType===ol.TRUST&&t.associatorId===e.id)))||void 0===a?void 0:a.legalEntityId},Mm=e=>{const t=xm(e);return t?[t]:[]},Fm=(e,t)=>{var a;const r=xm(e);if(r)return null===(a=null==t?void 0:t.LegalEntity)||void 0===a?void 0:a[r]},Vm=e=>{const t=(e=>Pm(e).reduce(((e,t)=>{var a;return e[t.type]=(null!==(a=e[t.type])&&void 0!==a?a:0)+1,e}),{}))(e);return Object.entries(Dm).every((([e,a])=>{var r;return!a.min||(null!==(r=null==t?void 0:t[e])&&void 0!==r?r:0>=a.min)}))},Um=(e,t)=>Object.values(Bm).filter((e=>0===(null==t?void 0:t.length)||(null==t?void 0:t.includes(e.id)))).map((t=>Object.assign(Object.assign({},t),{name:e.get(t.name),description:e.get(t.description)}))),Bm={[Rm.DEFINED_BENEFICIARY]:{id:Rm.DEFINED_BENEFICIARY,name:"beneficiary",description:"beneficialOwnersOfTrustProperty",className:"adl-tag--light-blue"},[Rm.PROTECTOR]:{id:Rm.PROTECTOR,name:"protector",description:"personAppointmentUnderTrustInstrument",className:"adl-tag--green"},[Rm.SECONDARY_TRUSTEE]:{id:Rm.SECONDARY_TRUSTEE,name:"trustee",description:"legalOwnerOfProperty",className:"adl-tag--purple"},[Rm.SETTLOR]:{id:Rm.SETTLOR,name:"settlor",description:"entityEstablishingTrust",className:"adl-tag--teal"},[Rm.UBO_THROUGH_OWNERSHIP]:{id:Rm.UBO_THROUGH_OWNERSHIP,name:"ultimateBeneficialOwner",description:"entityOwning25OrMoreOfTrust",className:"adl-tag--basic"}},Wm={US:"EIN",AU:"ABN"},Hm=({taxId:e,country:t,exemptedFromTax:a=!1,entity:r})=>{var n,i;const o=H(r),s=null!==(i=null===(n=r.taxInformation)||void 0===n?void 0:n.reduce(((e,t)=>(e[t.country]=t,e)),{}))&&void 0!==i?i:{};return a?delete s[t]:s[t]={country:t,type:Wm[t],number:e},o.taxInformation=Object.values(s),"US"===t&&(o.vatNumber="",o.registrationNumber=""),o},qm=Object.assign(Object.assign({},Bm),Eu),Gm=e=>{var t;return null===(t=qm[e])||void 0===t?void 0:t.className},$m=e=>{var t;return null===(t=qm[e])||void 0===t?void 0:t.name},Xm=e=>(null==e?void 0:e.entityAssociations)?e.entityAssociations.filter((t=>t.associatorId===e.id)):[],Ym=e=>Xm(e).filter((e=>e.entityType===ol.SOLE_PROPRIETORSHIP)).map((e=>e.legalEntityId)),Km=e=>{var t;return null===(t=null==e?void 0:e.entityAssociations)||void 0===t?void 0:t.some((t=>t.entityType===ol.SOLE_PROPRIETORSHIP&&t.associatorId===e.id))},zm=(e,t)=>{var a;const r=Ym(e)[0];if(r)return null===(a=null==t?void 0:t.LegalEntity)||void 0===a?void 0:a[r]};var Zm;!function(e){e.VALID="valid",e.PENDING="pending",e.INVALID="invalid",e.REJECTED="rejected"}(Zm||(Zm={}));const Qm=(e,t,a,r)=>{if(!(null==r?void 0:r.length)||!tp(a))return Cl.EMPTY;const n=function(e,t,a){if(!(null==t?void 0:t[e]))return;const r=Object.entries(t[e]).filter((([e])=>a.includes(e))).map((([,e])=>e.status)).filter((e=>Jm.includes(e)));if(!r.length)return;return r.reduce(((e,t)=>t>e?t:e))}(e,t,r);return n||(!r.includes(a.id)||ep(a)?Cl.PROCESSING:Cl.FINISHED)},Jm=[Cl.DETAILS_REQUIRED,Cl.DOWNLOAD,Cl.ERROR];const ep=e=>{var t;return Object.values(null!==(t=e.capabilities)&&void 0!==t?t:{}).some((e=>"pending"===e.verificationStatus))};function tp(e){if(!(null==e?void 0:e.type))return!1;switch(e.type){case ol.ORGANIZATION:return ap(e);case ol.INDIVIDUAL:return rp(e);case ol.TRUST:return np(e);case ol.SOLE_PROPRIETORSHIP:return ip(e)}}const ap=e=>{var t,a,r;return Boolean((null===(t=e.organization)||void 0===t?void 0:t.legalName)&&(null===(a=e.organization)||void 0===a?void 0:a.type)&&op(null===(r=e.organization)||void 0===r?void 0:r.registeredAddress))},rp=e=>{var t,a;return Boolean((null===(t=e.individual)||void 0===t?void 0:t.name)&&op(null===(a=e.individual)||void 0===a?void 0:a.residentialAddress))},np=e=>{var t,a;return Boolean((null===(t=e.trust)||void 0===t?void 0:t.name)&&op(null===(a=e.trust)||void 0===a?void 0:a.registeredAddress))},ip=e=>{var t,a;return Boolean((null===(t=e.soleProprietorship)||void 0===t?void 0:t.name)&&op(null===(a=e.soleProprietorship)||void 0===a?void 0:a.registeredAddress))},op=e=>e&&Object.entries(e).some((([e,t])=>"country"!==e&&Boolean(t))),sp=[{id:Hl.MY_NAME,name:"myName",description:"myNameDescription",type:ol.INDIVIDUAL},{id:Hl.MY_SOLE_TRADER_NAME,name:"mySoleTraderName",description:"mySoleTraderNameDescription",type:ol.SOLE_PROPRIETORSHIP},{id:Hl.THE_COMPANY_I_WORK_FOR,name:"theCompanyIWorkFor",description:"theCompanyIWorkForDescription",type:ol.ORGANIZATION}];sp.filter((e=>e.id!==Hl.MY_SOLE_TRADER_NAME));const lp=(e,t=!1)=>{var a;return Km(e)?Hl.MY_SOLE_TRADER_NAME:t||tp(e)?null===(a=sp.find((({type:t})=>t===e.type)))||void 0===a?void 0:a.id:void 0},dp=e=>{var t;const a=Object.assign({},vp(e,ul));return a.type=ol.INDIVIDUAL,a.individual.identificationData=cp(e.personalDetails,a.individual.identificationData),(null===(t=a.individual.phone)||void 0===t?void 0:t.number)?a.individual.phone.type="mobile":delete a.individual.phone,a},cp=(e,t)=>{var a,r;if(void 0!==e.idNumber||void 0!==e.idNumberExempt)return Object.assign(Object.assign({},t),{nationalIdExempt:null!==(a=t.nationalIdExempt)&&void 0!==a?a:!e.idNumber,type:null!==(r=e.typeOfIdentity)&&void 0!==r?r:"nationalIdNumber"})},up=({data:e,legalEntity:t})=>{const a=vp(e,vl);return a.legalEntityId=t.id,a.type=sl.BANK_ACCOUNT,a},mp=(e,t)=>{let a=vp(e,cl);return a=Object.assign(Object.assign({},a),{personalDetails:Object.assign(Object.assign(Object.assign({},null==a?void 0:a.personalDetails),t&&{firstName:"",lastName:""}),{isPartOfTrust:Lm(e),accountHolder:lp(e,t)})}),a},pp=(e,t)=>{var a,r;let n;if(null==e?void 0:e.organization){n=vp(e,bl),(null===(a=e.organization)||void 0===a?void 0:a.principalPlaceOfBusiness)?n.companyRegistrationDetails.operationalAddressIsSame=nd.OPERATIONAL_ADDRESS_IS_NOT_SAME:(n.companyRegistrationDetails||(n.companyRegistrationDetails={}),n.companyRegistrationDetails.operationalAddressIsSame=nd.OPERATIONAL_ADDRESS_IS_SAME);const{taxInformation:t=[]}=e.organization;if(t.length){const{country:a}=e.organization.registeredAddress;n.companyDetails.taxId=null===(r=t.find((e=>e.country===a)))||void 0===r?void 0:r.number}}return n=Object.assign(Object.assign({},n),{companyType:Object.assign(Object.assign({},null==n?void 0:n.companyType),{isPartOfTrust:Lm(e),accountHolder:lp(e,t)})}),n},gp=e=>{const t=Object.assign({},vp(e,fl));return t.organization.vatAbsenceReason&&(t.organization.vatNumber=""),e.companyDetails.taxId&&(t.organization=Hm({taxId:e.companyDetails.taxId,country:e.companyNameAndCountry.companyCountry,entity:t.organization})),t.type=ol.ORGANIZATION,t},yp=(e,t)=>o(void 0,void 0,void 0,(function*(){var a,r,n,i;if(e){const{idDocument:o,proofOfNationalId:s,proofOfResidence:l}=e,d="legalEntity";return(yield Promise.all([Om({entityId:t,entityType:d,documentType:null==o?void 0:o.idDocumentType,page1:null===(a=null==o?void 0:o.idFrontPage)||void 0===a?void 0:a[0],page2:null===(r=null==o?void 0:o.idBackPage)||void 0===r?void 0:r[0]}),Om({entityId:t,entityType:d,documentType:uc.PROOF_OF_NATIONAL_ID_NUMBER,page1:null===(n=null==s?void 0:s.proofOfNationalId)||void 0===n?void 0:n[0]}),Om({entityId:t,entityType:d,documentType:uc.PROOF_OF_RESIDENCY,page1:null===(i=null==l?void 0:l.proofOfResidence)||void 0===i?void 0:i[0]})])).filter(Boolean)}})),bp=e=>{const t=(e=>{var t;return null===(t=um[e])||void 0===t?void 0:t.find((e=>mm.includes(e.type)&&Am(e)))})(e)||null,a=Nm(e,uc.PROOF_OF_RESIDENCY)||null,r=Nm(e,uc.PROOF_OF_NATIONAL_ID_NUMBER)||null;return{idDocument:Object.assign(Object.assign(Object.assign({},(null==t?void 0:t.attachments[0])?{idFrontPage:[{name:Ip(t,0)}]}:{}),(null==t?void 0:t.attachments[1])?{idBackPage:[{name:Ip(t,1)}]}:{}),{idDocumentType:null==t?void 0:t.type}),proofOfResidence:a?[{name:Ip(a)}]:null,proofOfNationalId:r?[{name:Ip(r)}]:null}},fp=(e,t)=>o(void 0,void 0,void 0,(function*(){const{companyRegistrationDocument:{registrationDocument:a},companyTaxDocument:{taxDocument:r}}=e,n="legalEntity";return(yield Promise.all([Om({entityId:t,entityType:n,documentType:uc.REGISTRATION_DOCUMENT,page1:null==a?void 0:a[0]}),Om({entityId:t,entityType:n,documentType:uc.VAT_DOCUMENT,page1:null==r?void 0:r[0]})])).filter(Boolean)})),hp=(e,t)=>o(void 0,void 0,void 0,(function*(){const{payoutAccountDocuments:a={}}=e,{bankStatementDocument:r,description:n}=a,i=sl.BANK_ACCOUNT;return(yield Promise.all([Om({entityId:t,entityType:i,documentType:uc.BANK_STATEMENT,page1:null==r?void 0:r[0],description:n})])).filter(Boolean)})),vp=(e,t)=>{if(e){const a={};return Object.entries(t).forEach((([t,r])=>{const n=Ep(e,r);void 0!==n&&_p(t,a,n)})),a}return null};function _p(e,t,a){const r=e.split("."),n=r.length;let i=t;r.forEach((function(e,t){t===n-1?i[e]=a:(i[e]||(i[e]={}),i=i[e])}))}const Np=e=>{const t=Object.assign({},vp(e,Al));return t.soleProprietorship.vatAbsenceReason&&(t.soleProprietorship.vatNumber=""),e.solePropRegistrationDetails.taxId&&(t.soleProprietorship=Hm({taxId:e.solePropRegistrationDetails.taxId,exemptedFromTax:e.solePropRegistrationDetails.exemptedFromTax,country:e.solePropNameAndCountry.companyCountry,entity:t.soleProprietorship})),e.solePropRegistrationDetails.exemptedFromRegistrationNumber&&(t.soleProprietorship.registrationNumber=""),t.type=ol.SOLE_PROPRIETORSHIP,t},Op=(e,t)=>o(void 0,void 0,void 0,(function*(){var a;const r=null===(a=null==e?void 0:e.solePropConstitutionalDocument)||void 0===a?void 0:a.constitutionalDocument;return(yield Promise.all([Om({entityId:t,entityType:"legalEntity",documentType:uc.CONSTITUTIONAL_DOCUMENT,page1:null==r?void 0:r[0]})])).filter(Boolean)})),Ip=(e,t=0)=>{var a;return(null===(a=null==e?void 0:e.attachments)||void 0===a?void 0:a[t].pageName)||null};function Ep(e,t){return t.split(".").reduce(((e,t)=>e&&void 0!==e[t]?e[t]:void 0),e)}function Tp(e){const{userDetails:t,handleGetIdVerificationToken:a,onIdVerificationClose:r,onIdVerificationError:n,onIdVerificationComplete:i}=e,s="adyen-kyc-id-verification";let l=null;const d=e=>o(this,void 0,void 0,(function*(){const{init:t}=yield import("onfido-sdk-ui");try{l=t({token:e,containerId:s,disableAnalytics:!0,useModal:!1,isModalOpen:!1,onUserExit:r,onComplete:i,steps:[{type:"document",options:{documentTypes:{[lm.PASSPORT]:!0,[lm.DRIVING_LICENCE]:!0,[lm.NATIONAL_IDENTITY_CARD]:!0,[lm.RESIDENCE_PERMIT]:!1}}}]})}catch(e){n(e)}}));return ce((()=>((()=>{o(this,void 0,void 0,(function*(){try{const{firstName:e,lastName:r,residencyCountry:n}=t,i={name:{firstName:e,lastName:r},country:n,origin:`${window.location.origin}/*`},{sdkToken:o}=yield a("",i);d(o)}catch(e){n(e)}}))})(),()=>{l&&l.tearDown()})),[]),D("div",{id:s,className:s})}function Ap(e){const{i18n:a}=He();return D(t.Fragment,{children:[D(Fs,{heading:a.get("documentVerification")}),D("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("weNeedToSeeAGovermentIssuedPhotoId")]})),D("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("acceptedIdDocuments")]})),D(_c,Object.assign({className:"adyen-kyc-document-upload__requirements"},{children:[D(vc,{children:a.get("passport")}),D(vc,{children:a.get("identityCard")}),D(vc,{children:a.get("driversLicense")})]})),D("button",Object.assign({className:"adl-link",title:a.get("navigateToManualUpload"),type:"button",onClick:()=>{e.setShowManualUpload(!0)}},{children:a.get("IDontHaveAnIdDocumentAvailable")})),D("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("weTakeYourSecurityVerySeriously")]}))]})}const Sp={idDocumentType:{validate:e=>!!e,errorMessage:"fieldIsRequired",modes:["blur","input"]},instantIdVerificationData:{validate:e=>!!e,errorMessage:"fieldIsRequired",modes:["blur","input"]}};const Cp=bt((function(e){var a;const{i18n:r}=He(),n=me(null),i=me(null),[o,s]=le({}),[l,d]=le({}),[c,u]=le(!1),m=me({setState:null}),p=!((null==e?void 0:e.formVerificationErrors)&&0===(null===(a=Object.keys(null==e?void 0:e.formVerificationErrors))||void 0===a?void 0:a.length)),g=["instantIdVerificationData"],{data:y,valid:b,errors:f,isValid:h,triggerValidation:v,fieldProblems:_,handleChangeFor:N,setData:O,setValid:I}=ma(Object.assign(Object.assign({},e),{schema:e.showIdVerification?g:["idDocumentType"],defaultData:e.data,rules:p?null==e?void 0:e.validators:Sp,fieldProblems:null==e?void 0:e.fieldValidationErrors}));ce((()=>{var t,a,r,n;(null===(t=e.data)||void 0===t?void 0:t.idDocumentType)&&!c?(O("idDocumentType",null===(a=e.data)||void 0===a?void 0:a.idDocumentType),s({idFrontPage:null===(r=e.data)||void 0===r?void 0:r.idFrontPage}),d({idBackPage:null===(n=e.data)||void 0===n?void 0:n.idBackPage}),v()):p&&this.triggerValidation()}),[e.data]);const E=e=>{var t;if(e)return null===(t=dm.find((({id:t})=>e===t)))||void 0===t?void 0:t.hasBackPage},T=na(e,r),A=!!y.idDocumentType,S=E(y.idDocumentType),C=["idDocumentType",...A?["idFrontPage"]:[],...S?["idBackPage"]:[]];this.triggerValidation=()=>{var e,t;v(),null===(e=null==n?void 0:n.current)||void 0===e||e.triggerValidation(),S&&(null===(t=null==i?void 0:i.current)||void 0===t||t.triggerValidation())},ce((()=>{m.current.setState({type:"addToState",value:{data:y,valid:b,errors:f,fieldProblems:_,caller:"idDocument",dataStoreId:e.id,schema:e.showIdVerification?g:e.showManualUpload?C:["idDocumentType"]}})}),[y,b,f,h]);const R=(a=!1)=>D(t.Fragment,{children:[D(Fs,{heading:r.get("idDocument")}),D(Gc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:T,id:"ariaErrorField"}),D("div",{className:"adyen-kyc-document-upload__subtitle",dangerouslySetInnerHTML:{__html:r.get("idUploadDocumentSubtitle",{values:{name:e.name}})}}),!a&&D("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[D("span",{children:[r.get("doYouHaveTheIdDocumentByHand"),"\xa0"]}),D("button",Object.assign({className:"adl-link adl-u-margin-bottom-16",title:r.get("navigateToInstantVerification"),type:"button",onClick:()=>{e.setShowManualUpload(!1),e.setShowIdVerification(!0)}},{children:r.get("goThroughInstantVerification")}))]})),D(Be,Object.assign({name:"idDocumentType",label:r.get("selectDocumentType"),errorMessage:f.idDocumentType?r.get(f.idDocumentType.errorMessage):null,isValid:b.idDocumentType},{children:ea("select",{onChange:N("idDocumentType","input"),name:"idDocumentType",placeholder:r.get("selectDocument"),selected:y.idDocumentType,items:dm.map((({id:e,name:t})=>({id:e,name:r.get(t)})))})})),D("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",r.get("requirements")]})),D(_c,Object.assign({className:"adyen-kyc-document-upload__requirements"},{children:[D(vc,{children:r.get("documentNotExpiredOrDamaged")}),E(y.idDocumentType)?D(vc,{children:r.get("includeFrontAndBack")}):D(vc,{children:r.get("providePageWithPhotoAndCode")}),D(vc,{children:r.get("fullDocumentVisible")}),D(vc,{children:r.get("imagesInColor")})]})),A&&D(pc,{type:y.idDocumentType,className:"adl-u-margin-y-16"}),A&&D(fc,{name:"idFrontPage",label:r.get("frontPage"),ref:n,defaultData:o,id:e.id,isOptional:p,iconPrefix:mc(y.idDocumentType,!0,!0)}),A&&S&&D("div",Object.assign({className:"adl-u-margin-top-16"},{children:D(fc,{name:"idBackPage",label:r.get("backPage"),ref:i,defaultData:l,id:e.id,isOptional:p,iconPrefix:mc(y.idDocumentType,!0,!1)})}))]}),k=e=>{O("instantIdVerificationData",e),I("instantIdVerificationData",!0)};return D("div",Object.assign({className:"adl-individual-document-upload adl-individual-document-upload--idDocument"},{children:[D(Kd,{onChange:({currentState:t,prevState:a,changeInitiatedBy:r})=>{var n,i,o,l,c,u,m,p;if("idDocument"===r&&(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.idDocument.idDocumentType)!==(null===(o=null===(i=null==a?void 0:a.data)||void 0===i?void 0:i.idDocument)||void 0===o?void 0:o.idDocumentType)){const a=null===(l=t.data)||void 0===l?void 0:l.idDocument,r=Nm(e.legalEntityId,null==a?void 0:a.idDocumentType),n=(null===(c=null==a?void 0:a.idFrontPage)||void 0===c?void 0:c[0])instanceof File,i=(null===(u=null==a?void 0:a.idBackPage)||void 0===u?void 0:u[0])instanceof File;r?(!n&&(null===(m=r.attachments)||void 0===m?void 0:m[0])&&s({idFrontPage:[{name:Ip(r,0)}]}),!i&&(null===(p=r.attachments)||void 0===p?void 0:p[1])&&d({idBackPage:[{name:Ip(r,1)}]})):(n||s({idFrontPage:null}),i||d({idBackPage:null}))}}}),D(Ks,{stateRef:m}),(()=>{var a;return e.handleGetIdVerificationToken?!(null===(a=e.data)||void 0===a?void 0:a.idDocumentType)&&!e.data.instantIdVerificationData||c?e.showManualUpload||e.showIdVerification?!e.showManualUpload&&e.showIdVerification?D(t.Fragment,{children:[D(Tp,{handleGetIdVerificationToken:e.handleGetIdVerificationToken,name:e.name,userDetails:e.userDetails,onIdVerificationComplete:e=>k(e),onIdVerificationError:e=>console.error(e)}),D("div",Object.assign({className:"adyen-kyc-document-upload__manual-upload"},{children:[r.get("canNotCompleteInstantVerification"),"\xa0",D("button",Object.assign({className:"adl-link",title:r.get("goBackAndProvideDocumentScans"),type:"button",onClick:()=>{e.setShowManualUpload(!1),e.setShowIdVerification(!1)}},{children:r.get("goBackAndProvideDocumentScans")}))]}))]}):R():D(Ap,{setShowManualUpload:e.setShowManualUpload}):D(t.Fragment,{children:[D(Fs,{heading:r.get("documentVerification")}),D(Gc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:T,id:"ariaErrorField"}),D("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:r.get("youHaveSuccessfullyProvidedTheIdDocument")})),D("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[D("span",{children:[r.get("madeAMistake"),"\xa0"]}),D("button",Object.assign({className:"adl-link",title:r.get("submitIdDocumentsAgain"),type:"button",onClick:()=>{u(!0),e.setShowManualUpload(!1),e.setShowIdVerification(!1),O("idDocumentType",void 0),I("idDocumentType",!1)}},{children:r.get("submitIdDocumentsAgain")}))]}))]}):(e.setShowManualUpload(!0),R(!0))})()]}))}),((e,t)=>W(e.data,t.data)&&W(e.formVerificationErrors,t.formVerificationErrors)&&W(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name&&e.showIdVerification===t.showIdVerification&&e.showManualUpload===t.showManualUpload));var Rp;!function(e){e.BANK_STATEMENT="bankStatement",e.UTILITY_BILL="utilityBill",e.GOVERNMENT_ISSUED_CORRESPONDENCE="governmentIssuedCorrespondence",e.TAXATION_DOCUMENT="taxationDocument",e.EXTRACT_FROM_MUNICIPAL_PERSONAL_RECORDS_DATABASE="extractFromMunicipalPersonalRecordsDatabase",e.SALARY_SLIP="salarySlip",e.MORTGAGE_STATEMENT="mortgageStatement",e.CERTIFICATE_OF_VOTER_REGISTRATION="certificateOfVoterRegistration"}(Rp||(Rp={}));const Dp=[{id:Rp.BANK_STATEMENT,name:"bankStatement"},{id:Rp.UTILITY_BILL,name:"utilityBill"},{id:Rp.GOVERNMENT_ISSUED_CORRESPONDENCE,name:"governmentIssuedCorrespondence"},{id:Rp.TAXATION_DOCUMENT,name:"taxationDocument"},{id:Rp.EXTRACT_FROM_MUNICIPAL_PERSONAL_RECORDS_DATABASE,name:"extractFromMunicipalPersonalRecordsDatabase"},{id:Rp.SALARY_SLIP,name:"salarySlip"},{id:Rp.MORTGAGE_STATEMENT,name:"mortgageStatement"},{id:Rp.CERTIFICATE_OF_VOTER_REGISTRATION,name:"certificateOfVoterRegistration"}];const kp=bt((function(e){var{ref:a,id:r}=e,n=i(e,["ref","id"]);const{i18n:o}=He(),[s,l]=le(Dp[0].id),d=s===Rp.MORTGAGE_STATEMENT||s===Rp.CERTIFICATE_OF_VOTER_REGISTRATION,c=D(t.Fragment,{children:[D("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",o.get("requirements")]})),D(_c,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[D(vc,{children:o.get("documentAddressedToName",{values:{name:n.name}})}),D(vc,{children:o.get("showAddressStateCountry")}),D(vc,{children:d?o.get("dateOnDocumentNoOlderThanXMonths",{values:{numberOfMonths:12}}):o.get("dateOnDocumentNoOlderThanXMonths",{values:{numberOfMonths:3}})}),D(vc,{children:o.get("fullDocumentVisibleWithReadableText")}),D(vc,{children:o.get("documentCannotBeDamaged")})]}))]});return D("div",{children:D(hc,Object.assign({},n,{name:n.name,documentField:"proofOfResidence",documentType:uc.PROOF_OF_RESIDENCY,ref:a,heading:o.get("proofOfResidence"),guidanceHeader:D("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:o.get("proofOfResidenceDocumentTypeLabel",{values:{name:n.name}})})),documentTypeSelect:{selectedType:s,setSelectedType:l,options:Dp},guidanceContent:c,id:r}))})}),((e,t)=>W(e.data,t.data)&&W(e.formVerificationErrors,t.formVerificationErrors)&&W(e.fieldValidationErrors,t.fieldValidationErrors)&&W(e.requiredFields,t.requiredFields)&&e.name===t.name)),Lp={personalDetails:{formId:"personalDetails",formName:"personalDetails",fields:om},address:{formId:"address",formName:"address",fields:["address"]},idDocument:{formId:"idDocument",formName:"idDocument",fields:["idDocumentType","idFrontPage","idBackPage","idDocument"]},proofOfResidence:{formId:"proofOfResidence",formName:"proofOfResidence",fields:["proofOfResidence"]},proofOfNationalId:{formId:"proofOfNationalId",formName:"proofOfNationalId",fields:["proofOfNationalId"]}},wp=Lp.personalDetails.formId,Pp=Lp.address.formId,jp=Lp.idDocument.formId,xp=Lp.proofOfResidence.formId,Mp=Lp.proofOfNationalId.formId,Fp=[jp,xp,Mp];function Vp({trackingConig:e={topLevelLegalEntity:{}},parentLegalEntity:t,legalEntity:a,task:r}){const{topLevelLegalEntity:n}=e,i={task:r,flow:null==n?void 0:n.type,topLevelLegalEntityId:n.id,topLevelLegalEntityType:n.type};return t&&(i.parentLegalEntityId=t.id,i.parentLegalEntityType=t.type),a&&(i.legalEntityId=a.id,i.legalEntityType=a.type),i}const Up={BANK_CODE:"bankCode",BRANCH_CODE:"branchCode",COUNTRY:"country",NUMBER:"bankAccountNumber",BANK_CITY:"bankCity",SWIFT_CODE:"swiftCode",IBAN:"iban",OWNER_NAME:"accountHolder",BANK_NAME:"bankName",BANK_COUNTRY:"bankCountry",OWNER_CITY:"accountHolderCity"},Bp=[Up.NUMBER,Up.IBAN],Wp={AU:{branchCode:{label:"bsbNumber"}},BR:{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},"CA--CAD":{branchCode:{label:"transitNumber"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},CA:{bankCode:{label:"institutionNumber"},branchCode:{label:"transitNumber"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},"GB--GBP":{branchCode:{label:"sortCode"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},GB:{branchCode:{label:"sortCode"},bankCity:{label:"bankCityTown"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},"GB--EUR":{bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},HK:{bankCode:{label:"clearingCode"},branchCode:{label:"branchCode"}},ID:{branchCode:{label:"clearingCode"}},NZ:{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},"SG--SGD":{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},SG:{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},US:{branchCode:{label:"achRoutingNumber"}}},Hp=e=>{if(!e)return;if("bic_either8or11"===e)return{modes:["blur","input"],validate:e=>/^([a-zA-Z0-9]{8}|[a-zA-Z0-9]{11})$/.test(e),errorMessage:"validation8Or11Characters"};const[t,a,r]=e.split(":");if("iban"===t)return{modes:["blur","input"],validate:e=>xs(e,+a),errorMessage:{translationKey:"validationCharacters",translationObject:{values:{length:a}}}};if("digits"===t){if(r){const e=new RegExp(`^\\d{${a},${r}}$`,"");return{modes:["blur","input"],validate:t=>e.test(t),errorMessage:{translationKey:"validationDigitsBetween",translationObject:{values:{start:a,end:r}}}}}const e=new RegExp(`^\\d{${a}}$`,"");return{modes:["blur","input"],validate:t=>e.test(t),errorMessage:{translationKey:"validationDigits",translationObject:{values:{length:a}}}}}},qp={role:{rule:"REQUIRED"},firstName:{rule:"REQUIRED"},lastName:{rule:"REQUIRED"},birthDate:{rule:"REQUIRED"},phoneNumber:{rule:"contactsIfRequiredForRole"},email:{rule:"contactsIfRequiredForRole"},jobTitle:{rule:"jobTitleIfRequiredForRole"},address:{rule:"REQUIRED"},residencyCountry:{rule:"REQUIRED"},proofOfResidence:{rule:"isProofOfResidenceRequired"},proofOfNationalId:{rule:"isProofOfNationalIdRequired"},isPartOfTrust:{rule:"partOfTrustFieldsOnlyAU"},accountHolder:{rule:"accountHolderIfCustomer"}},Gp={idNumber:{rule:"REQUIRED",verify:"isVerificationAllowedForCountry"},idNumberExempt:{rule:"idNumberExemptIfApplicableCountry"},idDocument:{rule:"idDocumentIfIdNumberExempted"}},$p={typeOfIdentity:{rule:"requiredIfCountryUsesMultipleTypesOfIdentity"},issuerState:{rule:"requiredIfIdentityTypeIsDriversLicense"},licenseCardNumber:{rule:"requiredIfIdentityTypeIsDriversLicense"}},Xp={L0:U(["address","birthDate"]).from(qp),L1:qp,L1_ID:Object.assign(Object.assign(Object.assign({},qp),Gp),$p),L1_IDO:Object.assign(Object.assign(Object.assign({},qp),Gp),$p),L1_NAT:Object.assign(Object.assign(Object.assign(Object.assign({},qp),Gp),$p),{nationality:{rule:"REQUIRED"}}),L1_IDDOC:{idDocument:{rule:"REQUIRED"}}},Yp={US:{idNumber:{label:"socialSecurityNumber",placeholder:"SSNFormatUS"},idNumberExempt:{label:"uploadDocumentForSsn"}},CA:{idNumber:{label:"socialInsuranceNumber",placeholder:"SINFormatCA"},idNumberExempt:{label:"uploadDocumentForSsn"}},IT:{idNumber:{label:"codiceFiscale"}},BR:{idNumber:{label:"cadastroDePessoasFisicas"}},SE:{idNumber:{label:"personnummer"}},ES:{idNumber:{label:"dniNumber"}}},Kp={trustType:{rule:"REQUIRED"},legalName:{rule:"REQUIRED"},country:{rule:"REQUIRED"},taxId:{rule:"REQUIRED"},registrationAddress:{rule:"REQUIRED"},operationalAddress:{rule:"OPTIONAL"}},zp={L0:Object.assign({},Kp),L1:Object.assign({},Kp),L:Object.assign({},Kp)},Zp={AU:{taxId:{label:"australianBusinessNumberAbn"}}},Qp={legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"},tradingName:{rule:"REQUIRED"},registrationNumber:{rule:"SolePropsRegistrationNumberRules"},exemptedFromRegistrationNumber:{rule:"SolePropsExemptedFromRegistrationNumberRules"},registrationAddress:{rule:"REQUIRED"},stockExchangeMIC:{rule:"stockExchangeMICIfTypePublic"},stockISIN:{rule:"stockISINIfTypePublic"}},Jp={L0:{legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"}},L1:Object.assign({},Qp),L2:Object.assign({},Qp),L:Object.assign(Object.assign({},Qp),{vatNumber:{rule:"vatRules"},exemptedFromVat:{rule:"vatRules"},vatAbsenceReason:{rule:"vatRules"},taxId:{rule:"taxIdRules"},exemptedFromTax:{rule:"SolePropsExemptedFromTaxRules"}}),L_ConstDoc:{constitutionalDocument:{rule:"REQUIRED"}}},eg=Ml;const tg=(e,t)=>(e&&Object.entries(e).forEach((([e,a])=>{t[e]=Object.assign(Object.assign({},t[e]),a)})),t);const ag=(e,t)=>null==t?void 0:t.some((t=>{var a,r;return(null===(a=null==t?void 0:t.fields)||void 0===a?void 0:a.includes(e))&&(null===(r=null==t?void 0:t.forms)||void 0===r?void 0:r.some((e=>e===Lp.idDocument.formId||e===Lp.proofOfResidence.formId||e===Lp.proofOfNationalId.formId||e===Nc.companyRegistrationDocument.formId||e===Nc.companyTaxDocument.formId||e===Lc.solePropConstitutionalDocument.formId)))})),rg=({onNext:e,onBack:t,onHome:a,homeButtonLabel:r,backButtonLabel:n,nextButtonLabel:i,hideOnHomeButton:o,hideBackButton:s})=>D("div",Object.assign({className:"adyen-action-bar"},{children:[(t||e)&&D("div",Object.assign({className:"adyen-action-bar__action"},{children:[t&&!s&&D($c,{label:n,className:"adyen-action-bar__button",secondary:!0,onClick:()=>t(),testId:"backBtn"}),e&&D($c,{label:i,className:"adyen-action-bar__button",onClick:e,testId:"nextBtn"})]})),a&&r&&!o&&D("div",Object.assign({className:"adyen-action-bar__action"},{children:D($c,{className:"adyen-action-bar__button",label:r,secondary:!0,onClick:()=>a(),testId:"homeBtn"})}))]})),ng=()=>{const{i18n:e,isReview:t}=He();return t?D("div",Object.assign({className:"adl-review-alert"},{children:D(Zs,{hasCloseButton:!1,type:zs.WARNING,title:e.get("verifyCompanyInfoIsUpToDate")})})):null},ig={formId:"summary",formName:"summary"};function og({data:e,forms:t,omittedKeys:a,gotoForm:r,labels:n,problems:i,trackNavigation:o=$,omittedForms:s=[]}){var l,d;const{i18n:c}=He(),u=(null==i?void 0:i.validationErrors)&&(null===(l=Object.values(null==i?void 0:i.validationErrors))||void 0===l?void 0:l.reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{})),m=(null==i?void 0:i.verificationErrors)&&(null===(d=Object.values(null==i?void 0:i.verificationErrors))||void 0===d?void 0:d.reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{})),p=na({labels:n},c),g=(e,a)=>D("ul",Object.assign({className:"adyen-kyc-summary__heading-section"},{children:[D("li",{children:D("span",Object.assign({className:"adyen-kyc-summary__form-heading"},{children:e}))}),D("li",{children:D($c,{className:"adyen-kyc-summary__edit-form-button",ghost:!0,circle:!0,tertiary:!0,icon:"edit",onClick:()=>{o({fromForm:{formName:"summary",formId:"summary"},toForm:{formId:a,formName:e},component:"Pencil icon"}),(e=>{const a=t.findIndex((t=>t.formId===e));a>=0&&r(a)})(a)},title:c.get("edit"),label:c.get("edit"),labelHoverBox:!0})})]})),y=(e,t,a,r)=>D("li",Object.assign({className:"adyen-kyc-summary__item"},{children:[g(a,r),D("ul",Object.assign({className:"adyen-kyc-summary__content-section"},{children:f(e,t)}))]})),b=(e={},t,a)=>{const r=[];return e&&Object.entries(e).forEach((([e,n])=>{const i=c.get(null==t?void 0:t[e])||c.get(e);"object"==typeof n&&null!==n&&r.push(y(n,t,i,a))})),r},f=(e={},t={})=>{const r=[];return e&&Object.entries(e).forEach((([e,n])=>{const i=c.get(t[e])||c.get(e);"object"!=typeof n||null===n||(null==a?void 0:a.includes(e))?"string"!=typeof n||(null==a?void 0:a.includes(e))||r.push(D("li",Object.assign({className:"adyen-kyc-summary__data-item"},{children:[D("span",Object.assign({className:"adyen-kyc-summary__field"},{children:i})),D("span",Object.assign({className:"adyen-kyc-summary__data"},{children:n}))]}))):r.push(D("li",Object.assign({className:"adyen-kyc-summary__item-nested"},{children:D("ul",Object.assign({className:"adyen-kyc-summary__content-section-nested"},{children:f(n,t)}))})))})),r};return D("div",Object.assign({role:"region",className:"adyen-kyc-summary"},{children:[D("h2",Object.assign({className:"adyen-kyc-summary__heading"},{children:c.get("summary")})),D(ng,{}),D(Gc,{validationErrors:u,verificationErrors:m,formUtils:p,id:"ariaErrorField"}),D("ul",Object.assign({className:"adyen-kyc-summary"},{children:(e=>{const a=[];return t.forEach((({formId:t,formName:r})=>{var i;const o=null==e?void 0:e[t];if(!o||Object.keys(o).every((e=>Cs(o[e])))||t===ig.formId||(null==s?void 0:s.includes(t)))return;const l=(null===(i=null==e?void 0:e[t])||void 0===i?void 0:i.hasInnerForms)?b(null==e?void 0:e[t],null==n?void 0:n[t],t):(null==e?void 0:e[t])?y(null==e?void 0:e[t],null==n?void 0:n[t],c.get(r),t):null;a.push(l)})),a})(e)}))]}))}const sg=e=>{const{content:t,footer:a}=e;return D("div",Object.assign({className:"adyen-kyc-dropin"},{children:[D("div",Object.assign({className:"adyen-kyc-dropin__content"},{children:D("div",Object.assign({className:"adyen-kyc-dropin__content-main"},{children:t}))})),a&&D("div",Object.assign({className:"adyen-kyc-dropin__footer-container"},{children:a}))]}))},lg=({trackNavigation:e,form:t,isActive:r,onClick:n,hasVerificationErrors:i})=>{const{i18n:o}=He();return D("li",Object.assign({className:a("adyen-kyc-form-navigation__item",{"adyen-kyc-form-navigation__item--active":r,"adyen-kyc-form-navigation__item--valid":t.isValid,"adyen-kyc-form-navigation__item--isnav":n}),onClick:()=>{e(),n()}},{children:[o.get(t.formName),t.hasServerValidationErrors&&D("span",Object.assign({className:"adyen-kyc-form-navigation__item-icon adyen-kyc-form-navigation__item-icon--error"},{children:D(Qs,{type:zs.WARNING})})),t.isValid&&!t.hasServerValidationErrors&&!i&&D("span",Object.assign({className:"adyen-kyc-form-navigation__item-icon adyen-kyc-form-navigation__item-icon--success"},{children:D(Me,{name:"checkmark-small"})}))]}),t.formId)};function dg({forms:e,activeForm:t,gotoForm:r,validateForm:n,className:i,taskName:o,hasVerificationErrors:s,trackNavigation:l=$}){const{i18n:d}=He(),c=t=>null==e?void 0:e.findIndex((e=>e.formId===t.formId)),u=c(t)+1,m=null==e?void 0:e.length,p=(t,a)=>{const i=c(t),o=[...e];o.length=i;return o.every((e=>e.isValid))?((e,t)=>()=>{if(e.formId!==t.formId){const t=c(e);r(t)}})(t,a):a.isValid?null:n};return D("div",Object.assign({className:a("adyen-kyc-form-navigation",i)},{children:[D("div",Object.assign({className:"adyen-kyc-form-navigation__header"},{children:d.get(o)})),D("ul",Object.assign({className:"adyen-kyc-form-navigation__items"},{children:[e&&D("li",Object.assign({className:"adyen-kyc-form-navigation__home-button-item"},{children:D("span",Object.assign({className:"adyen-kyc-form-navigation__step-count"},{children:d.get("stepsX/YofForm",{values:{activeFormIndex:u,totalForms:m,taskName:o}})}))})),null==e?void 0:e.map((e=>D(lg,{form:e,isActive:e.formId===t.formId,onClick:p(e,t),trackNavigation:()=>l({fromForm:e,toForm:t,component:"FormNavigation"}),hasVerificationErrors:s},e.formId)))]}))]}))}function cg({children:e,forms:t,setFormIndex:a}){return D(Js.Provider,Object.assign({value:{setFormIndex:a,goToFormByFieldName:e=>{const r=t.findIndex((t=>{var a;return null===(a=null==t?void 0:t.fields)||void 0===a?void 0:a.some((t=>t===e))}));r>-1?a(r):console.error("No form was found to have that field so form navigation failed.")}}},{children:e}))}function ug(e,a){const{getComponentForms:r,parseConfiguration:n,rules:i,labels:s,getTaskName:l}=a;return a=>{var d,c,u;const{i18n:m,loadingContext:p,clientKey:g,contextCountry:y,setContextCountry:b,isReview:f,setPayoutDefaultCurrency:h}=He(),{getData:v}=zd(),{getOmittedKeys:N=null,formatData:O=null,omittedForms:I}=a.summary||{},E=r(a),T=l(a),[A]=le(f?[ig,...Object.values(E),ig]:[...Object.values(E),ig]),[S,C]=le(A),[R,k]=le(!1),[L,w]=le(!1),[j,x]=le(!1),[M,F]=le(!1),[V,U]=le(!1),[B,W]=le(null),[H,q]=le(!1),[G,$]=le({}),[Y,K]=le((()=>{var e,t,r,n;if((null===(e=null==a?void 0:a.problems)||void 0===e?void 0:e.remediationActions)&&Object.keys(null===(t=null==a?void 0:a.problems)||void 0===t?void 0:t.remediationActions).length>0){const e=Object.values(null===(r=null==a?void 0:a.problems)||void 0===r?void 0:r.remediationActions).flat().filter((e=>{var t;return(null===(t=e.forms)||void 0===t?void 0:t.length)>0}));if(1===e.length&&1===(null===(n=e[0])||void 0===n?void 0:n.forms.length)){const t=S.find((t=>{var a;return(null==t?void 0:t.formId)===(null===(a=e[0])||void 0===a?void 0:a.forms[0])}));if(t)return t}return S[S.length-1]}return S[0]})()),[z,Z]=le({}),Q=me(null),[J,ee]=le(null),[te,ae]=le(Vu.SUCCESS),[re,ne]=le(a.data),[ie,oe]=le(a),[se,de]=le(a.country||y),[ue,pe]=le(null),[ge,ye]=le(null);ce((()=>{!function(e){sc?Promise.resolve():_({loadingContext:e,path:"static/images/country-flags.svg"},null,"text").then((e=>{document.body.insertBefore(dc(e),document.body.firstChild),sc=!0}))}(p),cc(p)}),[p]),ce((()=>{n&&se&&(ae(Vu.LOADING),X({loadingContext:p,clientKey:g,country:se,capabilities:a.capabilities,legalEntityType:a.legalEntityType}).then((e=>{var t;const{matchingScenario:a,requiredFields:r,bankVerificationProviders:i}=e,o=null===(t=null==r?void 0:r.payout)||void 0===t?void 0:t.currency;o&&h(o);const s=n({requiredFields:r,matchingScenario:a,country:se,bankVerificationAvailable:i&&!!i[se]&&!!ie.handleGetBankVerificationVendors});ee(s),ye(r),pe(i),be(s,se,v(),r),ae(Vu.SUCCESS)})).catch((e=>{console.warn("WARNING: Configuration failed - error:",e),ae(Vu.SUCCESS)})))}),[se]);const be=(e,t,r,n)=>{var o,l;const d=function(e,t={},a={},r,n){var i;const o={},s={},l={},d={},c={},u={},m={},p={};if(e)return null===(i=Object.entries(r))||void 0===i||i.forEach((([r,i])=>{var g;null===(g=null==i?void 0:i.fields)||void 0===g||g.forEach((i=>{var g;const y=e[i],b=y&&("REQUIRED"===(null==y?void 0:y.rule)||(null==t?void 0:t[y.rule])&&"REQUIRED"===t[y.rule]()),f=ag(i,n)||b;f&&(o[r]=o[r]?[...o[r],i]:[i],l[r]=l[r]?[...l[r],i]:[i]);const h=y&&("OPTIONAL"===y.rule||(null==t?void 0:t[y.rule])&&"OPTIONAL"===t[y.rule]());if(!f&&h&&(s[r]=s[r]?[...s[r],i]:[i],l[r]=l[r]?[...l[r],i]:[i]),y){const e=(null===(g=null==a?void 0:a[i])||void 0===g?void 0:g.call(a))||y.label;e&&(c[r]=c[r]?Object.assign(Object.assign({},c[r]),{[i]:e}):{[i]:e}),y.verify&&("string"!=typeof y.verify||t[y.verify]())&&(d[r]=d[r]?[...d[r],i]:[i]),y.placeholder&&(u[r]=Object.assign(Object.assign({},u[r]||{}),{[i]:y.placeholder})),y.validators&&(m[r]=Object.assign(Object.assign({},m[r]||{}),{[i]:y.validators})),y.masked&&(p[r]=p[r]?[...p[r],i]:[i])}}))})),{requiredFields:o,optionalFields:s,allFields:l,labels:c,verifyFields:d,placeholders:u,validators:m,maskedFields:p}}(e,i?i(r,t,a.taskType,n):{},s?s(r,t):{},E,(null===(o=null==a?void 0:a.problems)||void 0===o?void 0:o.remediationActions)&&Object.values(null===(l=null==a?void 0:a.problems)||void 0===l?void 0:l.remediationActions));oe(Object.assign(Object.assign(Object.assign({},a),d),{country:se}))},fe=({fromForm:e,toForm:t,component:r})=>{P.addEvent("Navigated form",{segmentation:Object.assign(Object.assign({},null==a?void 0:a.baseTrackingPayload),{component:r,from:e.formId,fromLabel:m.get(e.formName),to:t.formId,toLabel:m.get(t.formName)})})},he=e=>{Q.current.verifyForm?Q.current.verifyForm(Y.formId).then((t=>{t&&K(S[e])})):K(S[e])},ve=()=>{Q.current.triggerCurrentFormValidation()},_e=(e,t,r=!1)=>{var n,i;if(Q.current.customNavigationHandler)return void Q.current.customNavigationHandler();if(null===(n=G[Y.formId])||void 0===n?void 0:n.onNext)return void(null===(i=G[Y.formId])||void 0===i||i.onNext());const o=(null==ie?void 0:ie.allFields)||{};var s;if(Ee(Y))H?a.navigateBackToTaskList():a.onSubmit({data:v(),forms:S,allFields:o,setLoadingStatus:ae});else if(z[Y.formId]||r){if(Oe())return void a.onSubmit({data:v(),forms:S,allFields:o,setLoadingStatus:ae});const e=S.findIndex((e=>e.formId===Y.formId))+1;he(e);const t=S[e];fe({fromForm:Y,toForm:t,component:"ActionBar"}),s=Y,P.addEvent("Completed form section",{segmentation:Object.assign(Object.assign({},null==a?void 0:a.baseTrackingPayload),{sectionName:s.formId})})}else ve()},Ne=()=>{if(Ie())a.handleBackClick&&a.handleBackClick();else{const e=S.findIndex((e=>e.formId===Y.formId));if(e){const t=S[e],a=S[e-1];K(a),fe({fromForm:t,toForm:a,component:"ActionBar"})}}},Oe=()=>S.findIndex((e=>e.formId===Y.formId))===S.length-1,Ie=()=>0===S.findIndex((e=>e.formId===Y.formId)),Ee=e=>e.formId===ig.formId;ce((()=>(a.eventEmitter.on("next",_e),a.eventEmitter.on("back",Ne),a.eventEmitter.on("validate",ve),()=>{a.eventEmitter.off("next",_e),a.eventEmitter.off("back",_e),a.eventEmitter.off("validate",ve)})),[Y,S]),ce((()=>{const e=A.filter((e=>{return t=e.formId,!ie.requiredFields&&!ie.optionalFields||!!ie.requiredFields[t]||!!ie.optionalFields[t]||Ee(e);var t}));C(e)}),[ie.requiredFields]),ce((()=>{ne(a.data)}),[a.data]);const Te=e=>{Z(e.validityByForm||e.valid),e.validityByForm||a.onChange(e)},Ae=!R&&!j&&D(rg,{onNext:_e,onBack:Ne,backButtonLabel:m.get("back"),nextButtonLabel:f?Ee(Y)?m.get("confirm"):m.get("next"):Oe()?m.get(null!=B?B:"submit"):m.get("next"),onHome:()=>o(this,void 0,void 0,(function*(){var e,t;const r=v();if((yield null===(e=a.hasDataChanged)||void 0===e?void 0:e.call(a,r))&&(null===(t=a.canSubmit)||void 0===t?void 0:t.call(a,r))){b(se);const e=(null==ie?void 0:ie.allFields)||{};yield a.onSubmit({data:r,forms:S,allFields:e,setLoadingStatus:ae})}else a.handleHomeClick()})),homeButtonLabel:a.homeButtonLabel,hideOnHomeButton:M,hideBackButton:V}),Se=D("div",Object.assign({className:"adyen-kyc-form-container"},{children:D(Uu,Object.assign({status:te,formOpacityWhenLoading:.3,loaderSize:"large"},{children:D(cg,Object.assign({setFormIndex:he,forms:S},{children:[D(Kd,{owner:"FormComposer",onChange:({currentState:e})=>{Te(e)}}),D(e,Object.assign({ref:Q,forms:S,activeForm:Y},ie,{data:re,onChange:Te,evaluateConfiguration:e=>be(J,se,e,ge),onCountryChange:e=>{de(e)},legalEntityId:a.legalEntityId,problems:null==a?void 0:a.problems,onNext:_e,onBack:Ne,setHideDropinLayout:k,setHideNavigation:w,setHideFooter:x,setCustomFormNavigationHandlers:(e,t,a)=>{$(Object.assign(Object.assign({},G),{[e]:{onNext:t,onBack:a}}))},setHideOnHomeButton:F,setHideBackButton:U,setSubmitButtonLabel:W,setSkipSubmitAndGoTaskList:q,bankVerificationVendors:ue})),Y.formId===ig.formId&&D("div",Object.assign({className:"adyen-kyc-form-wrapper"},{children:D(og,{trackNavigation:fe,data:O?O(v(),S):v(),omittedKeys:N?N(v()):null,omittedForms:I,forms:S,gotoForm:he,labels:ie.labels,problems:null==a?void 0:a.problems})})),Ae]}))}))})),Ce=!R&&!L&&D(Uu,Object.assign({status:te,formOpacityWhenLoading:.3,showSpinner:!1,className:"adyen-kyc-dropin__sidebar-wrapper"},{children:D(dg,{forms:f?null:S.map((({formId:e,formName:t})=>{var r,n;return{formId:e,formName:t,isValid:z[e],hasServerValidationErrors:void 0!==(null===(n=null===(r=null==a?void 0:a.problems)||void 0===r?void 0:r.validationErrors)||void 0===n?void 0:n[e])}})),activeForm:Y,gotoForm:he,validateForm:ve,taskName:T,trackNavigation:fe,hasVerificationErrors:(null===(d=null==a?void 0:a.problems)||void 0===d?void 0:d.verificationErrors)&&(null===(u=Object.keys(null===(c=null==a?void 0:a.problems)||void 0===c?void 0:c.verificationErrors))||void 0===u?void 0:u.length)>0})})),Re=D(t.Fragment,{children:[Ce,Se]});return a.hideDropinLayout?D(t.Fragment,{children:Se}):D(sg,{content:Re})}}var mg;!function(e){e.LOADING="loading",e.SUCCESS="success",e.ERROR="error"}(mg||(mg={}));const pg=t.createContext(null);function gg(){const e=ye(pg);if(void 0===e)throw new Error("useToastContext must be used within a ToastProvider");return e}const yg=(e,t)=>{if((null==e?void 0:e.invalidFields)&&(null==e?void 0:e.invalidFields.length)>0)return null==e?void 0:e.invalidFields.reduce(((e,a)=>{if(null==a?void 0:a.name){const r=bg(null==a?void 0:a.name,t);r&&_p(r,e,!0)}return e}),{})},bg=(e,t)=>{switch(t){case Rl.INDIVIDUAL:return Nl[e];case Rl.COMPANY:return _l[e];case Rl.PAYOUT:case Rl.PAYIN:return Ol[e]}return null},fg=ug((function(e){const{i18n:a}=He(),[r,n]=le(e.data),[i,o]=le(!1),[s,l]=le(!1),d=me({setState:null});ce((()=>{const t=Object.values(e.forms).reduce(((e,t)=>[...e,..."summary"!==t.formId?[t.formId]:[]]),[]);d.current.setActiveForms(t)}),[e.forms.toString()]),ce((()=>()=>{d.current.setState({type:"resetState"})}),[]);const c={[wp]:me(null),[Pp]:me(null),[jp]:me(null),[xp]:me(null),[Mp]:me(null)},u=Dl(e,wp),m=Dl(e,Pp),p=Dl(e,jp),g=Dl(e,xp),y=Dl(e,Mp);this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==c?void 0:c[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()},this.verifyForm=e=>{var t,a;return(null===(a=null===(t=c[e])||void 0===t?void 0:t.current)||void 0===a?void 0:a.verifyForm)?c[e].current.verifyForm():Promise.resolve(!0)};const b=e=>{var t,a;return`${null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.firstName} ${null===(a=null==e?void 0:e.personalDetails)||void 0===a?void 0:a.lastName}`},f=e=>{var t,a,r;return{firstName:null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.firstName,lastName:null===(a=null==e?void 0:e.personalDetails)||void 0===a?void 0:a.lastName,residencyCountry:null===(r=null==e?void 0:e.personalDetails)||void 0===r?void 0:r.residencyCountry}},h=({currentState:t,prevState:a})=>{var r,i,o,l,d,c;(((e,t)=>{var a,r,n,i;const o=null===(r=null===(a=e.data)||void 0===a?void 0:a.personalDetails)||void 0===r?void 0:r.idNumberExempt,s=null===(i=null===(n=t.data)||void 0===n?void 0:n.personalDetails)||void 0===i?void 0:i.idNumberExempt;return null!=o&&null!=s&&s!==o})(a,t)||((e,t)=>{var a,r,n,i;return(null===(r=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.personalDetails)||void 0===r?void 0:r.typeOfIdentity)!==(null===(i=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.personalDetails)||void 0===i?void 0:i.typeOfIdentity)})(a,t)||v(a,t))&&e.evaluateConfiguration(t.allData);const u=null===(i=null===(r=a.data)||void 0===r?void 0:r.personalDetails)||void 0===i?void 0:i.residencyCountry,m=null===(l=null===(o=t.data)||void 0===o?void 0:o.personalDetails)||void 0===l?void 0:l.residencyCountry;null!=m&&m!==u&&e.onCountryChange(m);const p=null===(c=null===(d=t.data)||void 0===d?void 0:d.personalDetails)||void 0===c?void 0:c.accountHolder;this.customNavigationHandler=p===Hl.THE_COMPANY_I_WORK_FOR?()=>e.onTypeSwitch(ol.ORGANIZATION):null,s&&t.validityByForm[jp]&&e.onNext(null,null,!0),n(t.data)};ce((()=>{var t;e.activeForm.formId===jp?(i||s||(null===(t=r.idDocument)||void 0===t?void 0:t.idDocumentType)?e.setCustomFormNavigationHandlers(jp,null,null):e.setCustomFormNavigationHandlers(jp,(()=>{l(!0)}),null),e.setHideFooter(s)):e.setHideFooter(!1)}),[i,e.activeForm,s,r]);const v=(t,a)=>{var r,n,i,o;return e.taskType===Rl.DECISION_MAKER&&!B((null===(n=null===(r=t.data)||void 0===r?void 0:r.personalDetails)||void 0===n?void 0:n.role)||[],(null===(o=null===(i=a.data)||void 0===i?void 0:i.personalDetails)||void 0===o?void 0:o.role)||[])};return D("div",Object.assign({className:"adyen-kyc-individual"},{children:(_=e.activeForm,D(t.Fragment,{children:[D(Kd,{owner:"IndividualComponent",onChange:h}),D(Ks,{owner:"IndividualComponent",stateRef:d}),D("div",Object.assign({className:_.formId!==wp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(sm,Object.assign({},u,{data:Object.assign(Object.assign({},null==u?void 0:u.data),{residencyCountry:e.country}),ref:c[wp],heading:a.get("providePersonalDetails"),taskType:e.taskType,id:wp,allowedRoles:null==e?void 0:e.allowedRoles}))})),D("div",Object.assign({className:_.formId!==Pp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D("div",{children:[D(Fs,{heading:a.get("providePersonalAddress")}),D(md,{page:"Personal address",title:a.get("whyDoINeedToFillInThisInformation"),content:a.get("reasonForFillingIndividualAddressDetails"),titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingIndividualAddressDetails"}),D(Xc,Object.assign({},m,{ref:c[Pp],data:Object.assign(Object.assign({},m.data),{country:e.country}),hideCountry:!0,id:Pp,legalEntityId:e.legalEntityId,handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress}))]})})),D("div",Object.assign({className:_.formId!==jp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(Cp,Object.assign({},p,{ref:c[jp],name:b(r),userDetails:f(r),id:jp,legalEntityId:e.legalEntityId,handleGetIdVerificationToken:e.handleGetIdVerificationToken,showManualUpload:i,setShowManualUpload:o,showIdVerification:s,setShowIdVerification:l}))})),D("div",Object.assign({className:_.formId!==xp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(kp,Object.assign({},g,{ref:c[xp],id:xp,name:b(r)}))})),D("div",Object.assign({className:_.formId!==Mp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(hc,Object.assign({},y,{documentField:"proofOfNationalId",documentType:uc.REGISTRATION_DOCUMENT,ref:c[Mp],heading:a.get("proofOfNationalId"),id:Mp}))}))]}))}));var _}),{getComponentForms:()=>Lp,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),Xp[t])),{});return a=tg(Yp[t],a),a}(e[ol.INDIVIDUAL],t),rules:(e,t,a)=>({idNumberExemptIfApplicableCountry:()=>{if(Xl.includes(t))return"REQUIRED"},idDocumentIfIdNumberExempted:()=>{var t;if(null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.idNumberExempt)return"REQUIRED"},isProofOfResidenceRequired:()=>{var t;if(null===(t=null==e?void 0:e.proofOfResidence)||void 0===t?void 0:t.proofOfResidence)return"REQUIRED"},isProofOfNationalIdRequired:()=>{var t;if(null===(t=null==e?void 0:e.proofOfNationalId)||void 0===t?void 0:t.proofOfNationalId)return"REQUIRED"},contactsIfRequiredForRole:()=>{var t,a;return(null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.role)?(null===(a=null==e?void 0:e.personalDetails)||void 0===a?void 0:a.role)&&e.personalDetails.role.includes(Gl.SIGNATORY)?"REQUIRED":void 0:"REQUIRED"},jobTitleIfRequiredForRole:()=>{var t;if((null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.role)&&e.personalDetails.role.some((e=>e===Gl.SIGNATORY||e===Gl.CONTROLLING_PERSON)))return"REQUIRED"},partOfTrustFieldsOnlyAU:()=>{if("AU"===t)return"REQUIRED"},accountHolderIfCustomer:()=>{if(a===Rl.INDIVIDUAL)return"REQUIRED"},requiredIfCountryUsesMultipleTypesOfIdentity:()=>{if(Kl.includes(t))return"REQUIRED"},requiredIfIdentityTypeIsDriversLicense:()=>{var t;if("driversLicense"===(null===(t=e.personalDetails)||void 0===t?void 0:t.typeOfIdentity))return"REQUIRED"},isVerificationAllowedForCountry:()=>Yl.includes(t)}),getTaskName:()=>"individualDetails"});function hg(e){var t,a,r,n,i,s;const{i18n:l,setLocale:d,setIsLegalEntityPartOfTrust:c,setAccountHolder:u}=He(),{showToast:m}=gg(),{handleCreateDocument:p,handleGetDocument:g,handleUpdateDocument:b,handleAddressSearch:f,handleFindAddress:h,handleGetIdVerificationToken:v,handleGetIdVerificationStartCheck:_,taskType:N,trackingConig:O,parentLegalEntity:I,legalEntityResponse:E}=e;let T=mp(E,e.isTargetLegalEntityType);const A=bm(p,g,b),[S,C]=le(null);let R=[];const[k,L]=le(null==e?void 0:e.problems);if(N===Rl.DECISION_MAKER||N===Rl.TRUST_MEMBER_COMPANY_OWNER){if(null===(t=null==e?void 0:e.parentLegalEntity)||void 0===t?void 0:t.entityAssociations){const e=null===(a=null==I?void 0:I.entityAssociations)||void 0===a?void 0:a.filter((e=>e.legalEntityId===(null==E?void 0:E.id)));if(e&&e.length>0){const t=null===(r=e.find((e=>Boolean(e.jobTitle))))||void 0===r?void 0:r.jobTitle;T=Object.assign(Object.assign({},T),{personalDetails:Object.assign(Object.assign(Object.assign({},null==T?void 0:T.personalDetails),{role:null==e?void 0:e.map((e=>e.type))}),t&&{jobTitle:t})})}}R=Ou(I,N)}const[w,j]=le(T||e.data),x=Vp({trackingConig:O,parentLegalEntity:I,legalEntity:E,task:N});ce((()=>{P.addPageView("Individual dropin"),P.addEvent("Started individual task",{segmentation:Object.assign({},x)})}),[]),ce((()=>{var t;e.eventEmitter.on("updateLocale",(e=>d(e)));const a=(null===(t=null==E?void 0:E.documentDetails)||void 0===t?void 0:t.map((e=>e.id)))||[];a.length&&A.fetchDocuments(a,null==E?void 0:E.id).then((()=>{const e=bp(null==E?void 0:E.id);j(Object.assign(Object.assign({},w),e))})).catch((()=>{m({label:l.get("failedToFetchRelevantDocuments"),type:mg.ERROR})}))}),[]);const M=({dataSubmitted:t,legalEntity:a,idDocumentType:r})=>o(this,void 0,void 0,(function*(){let n;return(null==E?void 0:E.id)||(null==S?void 0:S.id)?n=yield e.handleUpdateLegalEntity(U("type").from(a),(null==E?void 0:E.id)||(null==S?void 0:S.id)):(n=yield e.handleCreateLegalEntity(a),C(a),P.addEvent("Added decision maker",{segmentation:Object.assign(Object.assign({},x),{legalEntityId:n.id,legalEntityType:n.type,countryOfRegistration:t.personalDetails.residencyCountry,roles:t.personalDetails.role})})),P.addEvent("Saved individual details",{segmentation:Object.assign(Object.assign({},x),{legalEntityId:n.id,legalEntityType:n.type,countryOfRegistration:t.personalDetails.residencyCountry,idDocumentType:r})}),n})),F=(e,t)=>o(this,void 0,void 0,(function*(){const a={legalEntityId:t,captureMetadata:e};yield _("",a)})),V=({forms:e,legalEntity:t,dataSubmitted:a})=>o(this,void 0,void 0,(function*(){if(G(e))if(B(a))yield F(a.idDocument.instantIdVerificationData,t.id);else{const e=yield yp(a,t.id);yield A.uploadDocuments(e,t.id),null==e||e.forEach((e=>{P.addEvent("Saved document",{segmentation:Object.assign(Object.assign({},x),{documentType:e.type,fileExtention:e.attachments.map((e=>Cm(e.pageName)))})})}))}})),B=e=>{var t;return!!(null===(t=e.idDocument)||void 0===t?void 0:t.instantIdVerificationData)},q=({legalEntity:t,dataSubmitted:a})=>o(this,void 0,void 0,(function*(){var r,n;const i=N===Rl.DECISION_MAKER||N===Rl.TRUST_MEMBER_COMPANY_OWNER?null===(r=null==a?void 0:a.personalDetails)||void 0===r?void 0:r.role:N===Rl.TRUST_MEMBER_INDIVIDUAL?null===(n=e.associationDetail)||void 0===n?void 0:n.types:null,o=Xm(I);if(i&&((e,t)=>{var a;return(null===(a=Xm(I).filter((a=>a.legalEntityId===e.id&&t.includes(a.type))))||void 0===a?void 0:a.length)!==t.length})(t,i)){const r={entityAssociations:[...i.map((e=>{var r;return{type:e,legalEntityId:t.id,jobTitle:null===(r=null==a?void 0:a.personalDetails)||void 0===r?void 0:r.jobTitle}}))||[],...o.filter((e=>e.legalEntityId!==t.id))||[]]};yield e.handleUpdateLegalEntity(r,I.id)}})),G=e=>e.some((e=>Fp.includes(e.formId))),$=y(l.locale),X=({idDocument:e,proofOfNationalId:t,proofOfResidence:a})=>{var r,n,i,o;return Object.assign(Object.assign(Object.assign({},((null==e?void 0:e.idDocumentType)||(null==e?void 0:e.instantIdVerificationData))&&{idDocument:Y(e)}),(null==t?void 0:t.proofOfNationalId)&&{proofOfNationalId:{fileName:null===(n=null===(r=t.proofOfNationalId)||void 0===r?void 0:r[0])||void 0===n?void 0:n.name}}),(null==a?void 0:a.proofOfResidence)&&{proofOfResidence:{fileName:null===(o=null===(i=a.proofOfResidence)||void 0===i?void 0:i[0])||void 0===o?void 0:o.name}})},Y=e=>{var t,a,r,n,i,o;if(e){const s=B({idDocument:e})?cm.find((t=>e.instantIdVerificationData.document_front.type===t.id)):dm.find((({id:t})=>(null==e?void 0:e.idDocumentType)===t));return Object.assign({documentType:l.get(null==s?void 0:s.name)},(null==s?void 0:s.hasBackPage)?{frontPage:null===(a=null===(t=null==e?void 0:e.idFrontPage)||void 0===t?void 0:t[0])||void 0===a?void 0:a.name,backPage:null===(n=null===(r=null==e?void 0:e.idBackPage)||void 0===r?void 0:r[0])||void 0===n?void 0:n.name}:{fileName:null===(o=null===(i=null==e?void 0:e.idFrontPage)||void 0===i?void 0:i[0])||void 0===o?void 0:o.name})}};return D(fg,{baseTrackingPayload:x,capabilities:e.capabilities,data:w,country:(null===(n=null==w?void 0:w.personalDetails)||void 0===n?void 0:n.residencyCountry)||(null===(s=null===(i=null==I?void 0:I.organization)||void 0===i?void 0:i.registeredAddress)||void 0===s?void 0:s.country),taskType:e.taskType,problems:k,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,handleBackClick:e.handleBackClick,handleGetIdVerificationToken:v,onSubmit:({data:t,forms:a,setLoadingStatus:r})=>o(this,void 0,void 0,(function*(){var n,i,o;r(Vu.LOADING);try{let s=dp(t);const l=null===(n=dm.find((({id:e})=>{var a;return(null===(a=t.idDocument)||void 0===a?void 0:a.idDocumentType)===e})))||void 0===n?void 0:n.id;P.addEvent("Provided individual details",{segmentation:Object.assign(Object.assign({},x),{countryOfRegistration:t.personalDetails.residencyCountry,idDocumentType:l})}),s=yield M({dataSubmitted:t,legalEntity:s,idDocumentType:l}),yield V({forms:a,legalEntity:s,dataSubmitted:t}),yield q({legalEntity:s,dataSubmitted:t}),c((null===(i=null==t?void 0:t.personalDetails)||void 0===i?void 0:i.isPartOfTrust)===Fl.IS_PART_OF_TRUST),u(null===(o=null==t?void 0:t.personalDetails)||void 0===o?void 0:o.accountHolder),r(Vu.SUCCESS),null==e||e.onSubmit(t)}catch(e){if((null==e?void 0:e.errorCode)===lt){const t=yg(e,Rl.INDIVIDUAL);L(Object.assign(Object.assign({},k),{validationErrors:t}))}else m({label:l.get("failedToUpdateDetails"),type:mg.ERROR});r(Vu.SUCCESS),P.addEvent("Encountered error individual details",{segmentation:Object.assign(Object.assign({},x),{errorCode:e.errorCode,errorMessage:e.title,errorType:"BE"})})}})),summary:{formatData:(e,t)=>{var a,r,n;let i=H(e);return(null===(a=i.personalDetails)||void 0===a?void 0:a.residencyCountry)&&(i.personalDetails.residencyCountry=$.getCountryName(i.personalDetails.residencyCountry)),i.address&&(i.address=je(i.address,$)),G(t)&&(Fp.forEach((e=>delete i[e])),i=Object.assign(Object.assign({},i),X(e))),(null===(r=null==i?void 0:i.personalDetails)||void 0===r?void 0:r.isPartOfTrust)&&(i.personalDetails.isPartOfTrust=l.get(wm(i.personalDetails.isPartOfTrust))),(null===(n=null==i?void 0:i.personalDetails)||void 0===n?void 0:n.accountHolder)&&(i.personalDetails.accountHolder=l.get(i.personalDetails.accountHolder)),i},getOmittedKeys:t=>{var a;return[e.taskType===Rl.DECISION_MAKER?"role":null,(null===(a=t.personalDetails)||void 0===a?void 0:a.idNumberExempt)?"idNumber":null].filter(Boolean)}},hasDataChanged:e=>o(this,void 0,void 0,(function*(){const t=dp(e),a=yield yp(e,"test");return!W(t,U(["documents","id"]).from(E||{}))||a.length>0})),canSubmit:t=>(e.taskType===Rl.DECISION_MAKER?ll.DECISIONMAKER:ll.INDIVIDUAL).every((e=>{const a=Ep(t,e);return!Cs(a)||Array.isArray(e)&&e.length>0})),legalEntityType:ol.INDIVIDUAL,legalEntityId:null==E?void 0:E.id,allowedRoles:R,handleAddressSearch:f,handleFindAddress:h,onTypeSwitch:e.onTypeSwitch})}function vg(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(null===e[t]||Cs(e[t]))&&delete e[t];return e}const _g={data:{},allData:{},errors:{},valid:{},fieldProblems:{},isValid:!1};function Ng({defaultData:e={},children:t}){const a={currentState:{data:e,allData:e,valid:{},errors:{},fieldProblems:{},validityByForm:{}},prevState:{},changeInitiatedBy:null},r=function(){const[e,t]=le({}),[a,r]=le([]);return{reducer:function({currentState:r},n){var i,o,s,l,d;switch(n.type){case"addToState":{const s=null!==(i=n.value.dataStoreId)&&void 0!==i?i:n.value.caller,l=n.value.schema||null,d=l&&(null===(o=null==e?void 0:e[s])||void 0===o?void 0:o.toString())!==l.toString(),c=Object.assign(Object.assign({},r),{data:Object.assign(Object.assign({},r.data),{[s]:Object.assign(Object.assign({},r.data[s]),n.value.data)}),allData:Object.assign(Object.assign({},r.allData),{[s]:Object.assign(Object.assign({},r.allData[s]),vg(n.value.data))}),errors:Object.assign(Object.assign({},r.errors),{[s]:Object.assign(Object.assign({},r.errors[s]),n.value.errors)}),valid:Object.assign(Object.assign({},r.valid),{[s]:Object.assign(Object.assign({},r.valid[s]),n.value.valid)}),fieldProblems:Object.assign(Object.assign({},r.fieldProblems),{[s]:Object.assign(Object.assign({},r.fieldProblems[s]),n.value.fieldProblems)})});if(d){t(Object.assign(Object.assign({},e),{[s]:l}));const a=l.reduce(((e,t)=>{var a;const r=c.data[s],n=c.allData[s],i=c.valid[s],o=c.errors[s],l=c.fieldProblems[s];return{data:Object.assign(Object.assign({},e.data),{[t]:null!==(a=r[t])&&void 0!==a?a:n[t]}),valid:Object.assign(Object.assign({},e.valid),{[t]:i[t]}),errors:Object.assign(Object.assign({},e.errors),{[t]:o[t]}),fieldProblems:Object.assign(Object.assign({},e.fieldProblems),{[t]:l[t]})}}),{data:{},valid:{},errors:{},fieldProblems:{}});c.data[s]=a.data,c.valid[s]=a.valid,c.errors[s]=a.errors,c.fieldProblems[s]=a.fieldProblems}return c.validityByForm=Object.assign(Object.assign({},c.validityByForm),{[s]:Object.values(c.valid[s]).every((e=>e))}),c.allValid=Object.values(c.validityByForm).every((e=>e)),c.isValid=a.length?a.every((e=>c.validityByForm[e])):c.allValid,{currentState:c,prevState:r,changeInitiatedBy:s}}case"resetState":{const e=null!==(l=null===(s=n.value)||void 0===s?void 0:s.dataStoreId)&&void 0!==l?l:null===(d=n.value)||void 0===d?void 0:d.caller;return{currentState:_g,prevState:r,changeInitiatedBy:e}}default:throw new Error(`Unhandled action type: ${n.type}`)}},setCurrentForms:e=>{r(e)}}}(),[n,i]=de(r.reducer,a),o={state:n,dispatch:i,setActiveForms:r.setCurrentForms,getData:()=>{var e,t;return null!==(t=null===(e=null==n?void 0:n.currentState)||void 0===e?void 0:e.data)&&void 0!==t?t:{}}};return D(Ys.Provider,Object.assign({value:o},{children:t}))}function Og(e){const t=me(null),{label:r,subLabel:n,actionLabel:i,type:o,duration:s,onToastHide:l}=e,d=o===mg.LOADING,c=o===mg.SUCCESS,u=Ue("toast"),m=()=>{t.current.classList.remove("adl-toast--visible"),l()};return ce((()=>{t.current.classList.add("adl-toast--visible"),setTimeout((()=>{m()}),s)}),[r]),D("div",Object.assign({ref:t,role:i?"alertdialog":"alert",className:"adl-toast","aria-labelledby":u},{children:[d&&D("div",Object.assign({className:"adl-toast__loader"},{children:D("div",{className:"adl-loading-indicator adl-loading-indicator--small adl-loading-indicator--dark"})})),!d&&o&&D("div",Object.assign({className:a("adl-toast__status",{"adl-toast__status--success":c,"adl-toast__status--error":!c})},{children:[c&&D(Me,{className:"adl-toast__status-icon",name:"checkmark"}),!c&&D(Me,{className:"adl-toast__status-icon",name:"cross"})]})),D("div",Object.assign({className:"adl-toast__message"},{children:[D("span",Object.assign({id:u,className:"adl-toast__title"},{children:r})),i&&D("button",Object.assign({className:"adl-link adl-toast__action",title:"performAction",type:"button",onClick:e.onToastAction},{children:i})),!d&&n&&D("span",Object.assign({className:"adl-toast__subtitle"},{children:n}))]})),!d&&D("button",Object.assign({className:"adl-toast__close",title:"close",type:"button",onClick:m},{children:D(Me,{name:"cross"})}))]}))}function Ig({children:e}){const[t,a]=le(null);return D(pg.Provider,Object.assign({value:{showToast:e=>{a(e)}}},{children:[!!t&&D("div",Object.assign({className:"adyen-kyc-dropin__toast-stack"},{children:D("div",Object.assign({className:"adyen-kyc-dropin__toast-context"},{children:D(Og,Object.assign({},t,{onToastHide:()=>{a(null)}}))}))})),e]}))}Og.defaultProps={duration:3500};const Eg={editPrefilledCountry:!0,changeLegalEntityType:!0,enableTrustFlow:!1};function Tg({children:e,settings:t={}}){return D(zl.Provider,Object.assign({value:{isSettingEnabled:e=>t&&e in t?t[e]:Eg[e]}},{children:e}))}const Ag={xsOnly:"adyen-layout-xs-only",md:"adyen-layout-md",lg:"adyen-layout-lg"},Sg={md:680,lg:1024};class Cg extends j{constructor(e){super(e),this.handleStateChange=({currentState:e})=>{this.setState(e)}}formatData(){return Object.assign({},this.state.data)}get isValid(){return!!this.state.isValid}assignLayout(e,t){let a=[];e.forEach((e=>{var r;const n=null===(r=e.contentBoxSize)||void 0===r?void 0:r[0].inlineSize;n?a=(e=>{const t=Object.entries(Sg).reduce(((t,[a,r])=>(r<=e&&t.push(Ag[a]),t)),[]);return t.length>0?t:["adyen-layout-xs-only"]})(n):a.push(Ag.lg),t.classList.remove(...Object.values(Ag)),t.classList.add(...a)}))}renderDropinComponent(){return D("div",{children:"Placeholder for dropin component"})}render(){return D(Y,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey,contextCountry:this.props.country,commonProps:{showInlineErrors:this.props.showInlineErrors},isReview:this.props.isReview},{children:D(Ng,Object.assign({defaultData:this.props.data},{children:D(Tg,Object.assign({settings:this.props.settings},{children:[D(Kd,{owner:"Dropin",onChange:this.handleStateChange}),D("div",Object.assign({className:"adyen-kyc-dropin-container adl-u-position-relative"},{children:D(Ig,{children:this.renderDropinComponent()})}))]}))}))}))}}const Rg=["GB","ES","US"],Dg=["AT","SE"],kg=["US","CA","AU","HK","NZ","SG"],Lg=["AU","HK","NZ","SG"],wg=(e,t,a)=>({stockExchangeMICIfTypePublic:()=>{var t;if((null===(t=null==e?void 0:e.companyType)||void 0===t?void 0:t.entityType)===wl.PUBLIC_COMPANY)return"REQUIRED"},stockISINIfTypePublic:()=>{var t;if((null===(t=null==e?void 0:e.companyType)||void 0===t?void 0:t.entityType)===wl.PUBLIC_COMPANY)return"REQUIRED"},vatRules:()=>{if(!kg.includes(t))return"REQUIRED"},taxIdRules:()=>{if(kg.includes(t))return"REQUIRED"},SolePropsExemptedFromTaxRules:()=>{if(kg.includes(t))return"REQUIRED"},SolePropsExemptedFromRegistrationNumberRules:()=>{if(Dg.includes(t))return"REQUIRED"},SolePropsRegistrationNumberRules:()=>{if(!Rg.includes(t))return"REQUIRED"},partOfTrustFieldsOnlyAU:()=>{if("AU"===t)return"REQUIRED"},registrationNumberIfCountryNotUs:()=>{if("US"!==t)return"REQUIRED"},registrationNumberIfCountryNotUSNorGBNorES:()=>{if(!Rg.includes(t))return"REQUIRED"},accountHolderIfCustomer:()=>{if(a===Rl.COMPANY)return"REQUIRED"},exemptedFromTaxRules:()=>{if(Lg.includes(t))return"REQUIRED"}}),Pg=ug((function(e){const{i18n:a}=He(),[r,n]=le(null),i={[Oc]:me(null),[Ic]:me(null),[Ec]:me(null),[Tc]:me(null),[Ac]:me(null),[Sc]:me(null)},o=Dl(e,Oc),s=Dl(e,Ic),l=Dl(e,Ec),d=Dl(e,Tc),c=Dl(e,Ac),u=Dl(e,Sc);this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==i?void 0:i[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()};const m=({currentState:t,prevState:a})=>{var r,i,o,s,l,d,c,u,m,p;const g=null===(i=null===(r=t.data)||void 0===r?void 0:r[Ic])||void 0===i?void 0:i.entityType;n(g);const y=null===(s=null===(o=a.data)||void 0===o?void 0:o[Oc])||void 0===s?void 0:s.companyCountry,b=null===(d=null===(l=t.data)||void 0===l?void 0:l[Oc])||void 0===d?void 0:d.companyCountry,f=null===(u=null===(c=t.data)||void 0===c?void 0:c[Ic])||void 0===u?void 0:u.accountHolder;null!=b&&b!==y&&e.onCountryChange(b),g!==(null===(p=null===(m=a.data)||void 0===m?void 0:m[Ic])||void 0===p?void 0:p.entityType)&&e.evaluateConfiguration(t.allData),this.customNavigationHandler=f===Hl.MY_NAME?()=>e.onTypeSwitch(ol.INDIVIDUAL):null};return D("div",Object.assign({className:"adyen-kyc-company"},{children:(p=e.activeForm,D("div",Object.assign({className:"adyen-kyc-company"},{children:[D(Kd,{owner:"CompanyComponent",onChange:m}),D("div",Object.assign({className:p.formId!==Oc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(oc,Object.assign({},o,{data:Object.assign(Object.assign({},null==o?void 0:o.data),{companyCountry:e.country}),ref:i[Oc],heading:a.get("nameAndCountry"),id:Oc}))})),D("div",Object.assign({className:p.formId!==Ic?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(rd,Object.assign({},s,{ref:i[Ic],heading:a.get("companyStructure"),id:Ic}))})),D("div",Object.assign({className:p.formId!==Ec?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(Qd,Object.assign({},l,{ref:i[Ec],heading:a.get("registrationDetails"),id:Ec,country:e.country,companyType:r}))})),D("div",Object.assign({className:p.formId!==Tc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(bd,Object.assign({},d,{ref:i[Tc],heading:a.get("registeredAddress"),description:a.get("registeredAddressHeaderDescription"),id:Tc,country:e.country,problems:null==e?void 0:e.problems,handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress}))})),D("div",Object.assign({className:p.formId!==Ac?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(hc,Object.assign({},c,{documentField:"registrationDocument",documentType:uc.REGISTRATION_DOCUMENT,ref:i[Ac],heading:a.get("registrationDocument"),guidanceContent:D(t.Fragment,{children:[D("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:a.get("registrationDocumentSubTitle")})),D("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("requirements")]})),D(_c,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[D(vc,{children:a.get("documentIssuedByGovernmentAuthority")}),D(vc,{children:a.get("dateOnDocumentNoOlderThanXMonths",{values:{noOfMonths:12}})})]})),D(md,{page:"Company registration document",titleId:"whatIfDocumentIsMoreThan12MonthsOld",contentId:"ifDocumentMoreThan12months",title:a.get("whatIfDocumentIsMoreThan12MonthsOld"),content:a.get("ifDocumentMoreThan12months")})]}),id:Ac}))})),D("div",Object.assign({className:p.formId!==Sc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(hc,Object.assign({},u,{documentField:"taxDocument",documentType:uc.VAT_DOCUMENT,ref:i[Sc],heading:a.get("taxDocument"),guidanceContent:D(t.Fragment,{children:[D("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:a.get("uploadTaxationDocument")})),D("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("requirements")]})),D(_c,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[D(vc,{children:a.get("containsNameOfCompany")}),D(vc,{children:a.get("documentShowsTaxIdOfCompany")}),D(vc,{children:a.get("issuedByTheTaxAuthority")})]}))]}),id:Sc}))}))]})))}));var p}),{getComponentForms:()=>Nc,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){if(e){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),xl[t])),{});return a=tg(Ml[t],a),a}}(null==e?void 0:e[ol.ORGANIZATION],t),rules:wg,labels:(e,t)=>({registrationNumber:()=>{var a,r,n,i;return"GB"===t&&(null===(a=null==e?void 0:e.companyType)||void 0===a?void 0:a.entityType)===wl.NON_PROFIT_OR_CHARITABLE?"charityNumber":"FR"===t&&(null===(r=null==e?void 0:e.companyType)||void 0===r?void 0:r.entityType)===wl.NON_PROFIT_OR_CHARITABLE?"RNA/SIREN/SIRETNumber":"AT"===t&&(null===(n=null==e?void 0:e.companyType)||void 0===n?void 0:n.entityType)===wl.NON_PROFIT_OR_CHARITABLE||"AT"===t&&(null===(i=null==e?void 0:e.companyType)||void 0===i?void 0:i.entityType)===wl.INCORPORATED_ASSOCIATION?"firmenbuchnummerOrZVR":void 0}}),getTaskName:()=>"companyDetails"});function jg(e){var t;const{showToast:a}=gg(),{i18n:r,setLocale:n,setIsLegalEntityPartOfTrust:i}=He(),{handleCreateDocument:s,handleGetDocument:l,handleUpdateDocument:d,handleAddressSearch:c,handleFindAddress:u,taskType:m,trackingConig:p,associationDetail:g,parentLegalEntity:b,legalEntityResponse:f,isTargetLegalEntityType:h}=e,v=pp(f,h),[_,N]=le(v||e.data),[O,I]=le(e.problems),E=Vp({trackingConig:p,parentLegalEntity:b,legalEntity:f,task:m});ce((()=>{P.addPageView("Company dropin"),P.addEvent("Started company task",{segmentation:E})}),[]);const T=({forms:e,legalEntity:t,dataSubmitted:a})=>o(this,void 0,void 0,(function*(){if(S(e)){const e=yield fp(a,t.id);e&&(yield C.uploadDocuments(e,t.id),e.forEach((e=>{P.addEvent("Saved document",{segmentation:Object.assign(Object.assign({},E),{documentType:e.type,fileExtention:e.attachments.map((e=>Cm(e.pageName)))})})})))}})),A=({legalEntity:t})=>o(this,void 0,void 0,(function*(){if(m===Rl.TRUST_MEMBER_COMPANY){const a=Xm(b),r=null==g?void 0:g.types;if(r&&R(b,r)){const n={entityAssociations:[...r.map((e=>({type:e,legalEntityId:t.id})))||[],...a.filter((e=>e.legalEntityId!==t.id))||[]]};yield e.handleUpdateLegalEntity(n,b.id)}}})),S=e=>e.some((e=>[Nc.companyRegistrationDocument.formId,Nc.companyTaxDocument.formId].includes(e.formId))),C=bm(s,l,d),R=(e,t)=>{var a;return(null===(a=Xm(b).filter((a=>a.legalEntityId===e.id&&t.includes(a.type))))||void 0===a?void 0:a.length)!==t.length};ce((()=>{var t;e.eventEmitter.on("updateLocale",(e=>n(e)));const i=(null===(t=null==f?void 0:f.documentDetails)||void 0===t?void 0:t.map((e=>e.id)))||[];try{i.length&&C.fetchDocuments(i,f.id).then((()=>{const e=(e=>{const t=Nm(e,uc.REGISTRATION_DOCUMENT)||null,a=Nm(e,uc.VAT_DOCUMENT)||null;return{companyRegistrationDocument:t?{registrationDocument:[{name:Ip(t)}]}:null,companyTaxDocument:a?{taxDocument:[{name:Ip(a)}]}:null}})(f.id);N(Object.assign(Object.assign({},_),e))})).catch((()=>{a({label:r.get("failedToFetchRelevantDocuments"),type:mg.ERROR})}))}catch(e){a({label:r.get("failedToFetchRelevantDocuments"),type:mg.ERROR})}}),[]);const k=y(r.locale),L=(e,t)=>{var a,r,n,i;return Object.assign(Object.assign({},(null==e?void 0:e.registrationDocument)&&{companyRegistrationDocument:{fileName:null===(r=null===(a=e.registrationDocument)||void 0===a?void 0:a[0])||void 0===r?void 0:r.name}}),(null==t?void 0:t.taxDocument)&&{companyTaxDocument:{fileName:null===(i=null===(n=t.taxDocument)||void 0===n?void 0:n[0])||void 0===i?void 0:i.name}})};return D(Ng,Object.assign({defaultData:v},{children:D(Pg,{baseTrackingPayload:E,capabilities:e.capabilities,data:_,country:null===(t=null==_?void 0:_.companyNameAndCountry)||void 0===t?void 0:t.companyCountry,taskType:e.taskType,problems:O,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,handleBackClick:e.handleBackClick,onSubmit:({data:t,forms:n,setLoadingStatus:s})=>o(this,void 0,void 0,(function*(){var o;const l=pp(f,!1),d=((e,t)=>(Object.keys(t).forEach((a=>{Object.keys(t[a]).forEach((r=>{void 0===e[a][r]&&(Array.isArray(t[a][r])?e[a][r]=[]:e[a][r]="")}))})),e))(t,l);let c=gp(d);s(Vu.LOADING);const u={companyStructure:t.companyType.entityType,countryOfRegistration:t.companyNameAndCountry.companyCountry,legalEntityName:t.companyNameAndCountry.legalCompanyName,usedAdditionalAddress:t.companyRegistrationDetails.operationalAddressIsSame===nd.OPERATIONAL_ADDRESS_IS_NOT_SAME};try{P.addEvent("Provided company details",{segmentation:Object.assign(Object.assign({},E),u)}),c=(null==f?void 0:f.id)?yield e.handleUpdateLegalEntity(U("type").from(c),f.id):yield e.handleCreateLegalEntity(c),P.addEvent("Saved company details",{segmentation:Object.assign(Object.assign(Object.assign({},E),{legalEntityId:c.id,legalEntityType:c.type}),u)}),yield T({forms:n,legalEntity:c,dataSubmitted:t}),yield A({legalEntity:c}),i((null===(o=null==t?void 0:t.companyType)||void 0===o?void 0:o.isPartOfTrust)===Fl.IS_PART_OF_TRUST),s(Vu.SUCCESS),null==e||e.onSubmit(t)}catch(e){if((null==e?void 0:e.errorCode)===lt){const t=yg(e,Rl.COMPANY);I(Object.assign(Object.assign({},O),{validationErrors:t}))}else a({label:r.get("failedToUpdateDetails"),type:mg.ERROR});s(Vu.SUCCESS),P.addEvent("Encountered error company details",{segmentation:Object.assign(Object.assign({},E),{errorCode:e.errorCode,errorMessage:e.title,errorType:"BE"})})}})),legalEntityType:ol.ORGANIZATION,summary:{formatData:(e,t)=>{var a,n,i,o,s,l,d,c,u;let m=H(e);if((null===(a=null==m?void 0:m.companyNameAndCountry)||void 0===a?void 0:a.companyCountry)&&(m.companyNameAndCountry.companyCountry=k.getCountryName(m.companyNameAndCountry.companyCountry)),null===(n=null==m?void 0:m.companyType)||void 0===n?void 0:n.entityType){const e=null===(i=jl.find((e=>{var t;return e.id===(null===(t=m.companyType)||void 0===t?void 0:t.entityType)})))||void 0===i?void 0:i.name;m.companyType.entityType=r.get(e)}if((null===(o=null==m?void 0:m.companyType)||void 0===o?void 0:o.accountHolder)&&(m.companyType.accountHolder=r.get(null===(s=null==m?void 0:m.companyType)||void 0===s?void 0:s.accountHolder)),(null===(l=null==m?void 0:m.companyRegistrationDetails)||void 0===l?void 0:l.registrationAddress)&&(m.companyRegistrationDetails.hasInnerForms=!0,m.companyRegistrationDetails.registrationAddress=je(null==m?void 0:m.companyRegistrationDetails.registrationAddress,k)),(null===(d=null==m?void 0:m.companyRegistrationDetails)||void 0===d?void 0:d.operationalAddress)&&(m.companyRegistrationDetails.operationalAddress=je(null==m?void 0:m.companyRegistrationDetails.operationalAddress,k)),null===(c=m.companyDetails)||void 0===c?void 0:c.vatAbsenceReason){const e=Dd.find((e=>e===m.companyDetails.vatAbsenceReason));e&&(m.companyDetails.vatAbsenceReason=r.get(e))}return S(t)&&(Cc.forEach((e=>delete m[e])),m=Object.assign(Object.assign({},m),L(e.companyRegistrationDocument,e.companyTaxDocument))),(null===(u=null==m?void 0:m.companyType)||void 0===u?void 0:u.isPartOfTrust)&&(m.companyType.isPartOfTrust=r.get(wm(m.companyType.isPartOfTrust))),m},getOmittedKeys:()=>["operationalAddressIsSame"]},hasDataChanged:e=>o(this,void 0,void 0,(function*(){var t;const a=(null===(t=gp(e))||void 0===t?void 0:t.organization)||{},r=(null==f?void 0:f.organization)||{},n=yield fp(e,"");return!W(a,r)||n.length>0})),canSubmit:e=>ll.ORGANIZATION.every((t=>{const a=Ep(e,t);return!Cs(a)})),handleAddressSearch:c,handleFindAddress:u,onTypeSwitch:e.onTypeSwitch})}))}function xg(){return D("div",{children:[D("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--small"}),D("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--large"}),D("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--small"}),D("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--large"})]})}function Mg({className:e,children:t}){return D("section",Object.assign({className:a("adl-card-group",e)},{children:t}))}const Fg={1:"h1",2:"h2",3:"h3",4:"h4",sub:"div"};function Vg({className:e,level:r,children:n}){const i=Fg[r]||Fg[1],o=a("adl-heading",`adl-heading--${r}`,e);return t.createElement(i,{className:o},n)}const Ug=({title:e,children:t})=>D("article",Object.assign({className:"adyen-task-list-group"},{children:[e&&D("header",Object.assign({className:"adyen-task-list-group__header"},{children:D(Vg,Object.assign({level:4},{children:e}))})),D("main",Object.assign({className:"adl-card__body"},{children:D(Mg,Object.assign({className:"adyen-task-list-group__items"},{children:t}))}))]})),Bg=({className:e,problems:t})=>{const{i18n:a}=He();if((null==t?void 0:t.verificationErrors)&&Object.keys(t.verificationErrors).length>0){const r=Object.values(t.verificationErrors).reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{}),n=Object.keys(r);if(1===n.length){const t=Object.values(r[n[0]]).flat();if(1===t.length){const r=a.get(`errorMessage_${n[0]}`),i=a.get(`remediationMessage_${t[0].code}`);return D(Zs,{className:e,hasCloseButton:!1,type:zs.ERROR,title:`${r}. ${i}`})}}}return D(Zs,{className:e,hasCloseButton:!1,type:zs.ERROR,title:a.get("verificationErrorMessage")})},Wg=({text:e,className:t,iconStatusClass:r,icon:n})=>{const i=a("adl-status",t),o=a("adl-status__icon",r);return D("div",Object.assign({className:i},{children:[D("span",Object.assign({className:o},{children:"loading"===n?D(Qe,{size:"xsmall",dot:!0}):D(Me,{name:n})})),D("span",Object.assign({className:"adl-status__text"},{children:e}))]}))},Hg=({status:e,downloadHandler:t})=>{const{i18n:a,isReview:r}=He(),n=e=>{e.stopPropagation(),t()};switch(e){case Cl.DOWNLOAD:return D("span",Object.assign({className:"adl-status--download",role:"button",tabIndex:0,icon:"download",onClick:n},{children:[a.get("download")," "]}));case Cl.FINISHED:return D(Wg,{className:"adl-status--finished",iconStatusClass:"adl-status__icon--finished",icon:"check",text:a.get("finished")});case Cl.ERROR:return D(Wg,{className:"adl-status--error",iconStatusClass:"adl-status__icon--error",icon:"info-circle",text:a.get("unsuccessful")});case Cl.PROCESSING:return D(Wg,{className:"",iconStatusClass:"",icon:"loading",text:a.get("processing")});case Cl.DETAILS_REQUIRED:case Cl.EMPTY:default:return D("span",Object.assign({className:"adl-task-status-details-required"},{children:r?a.get("verify"):a.get("go")}))}};function qg({className:e,children:t,stateful:r,active:n,disabled:i,title:o,subTitle:s,onClick:l,onKeyDown:d}){const c=a("adl-card",e,{"adl-card--stateful":r,"adl-card--active":r&&n,"adl-card--disabled":i}),u=r&&0,m=r&&"button";return D("article",Object.assign({className:c,tabIndex:u,role:m,onClick:e=>{i||l(e)},onKeyDown:d},{children:[o&&D("header",Object.assign({className:"adl-card__header"},{children:[D(Vg,Object.assign({level:4},{children:o})),s&&D(Vg,Object.assign({level:"sub"},{children:s}))]})),D("main",Object.assign({className:"adl-card__body"},{children:t}))]}))}const Gg=({title:e,tagline:t,icon:a,status:r,onNavigateToTask:n,disabled:i=!1,problems:o,downloadHandler:s})=>D(qg,Object.assign({stateful:!0,onClick:()=>n(),onKeyDown:e=>{e.key===st.enter&&n()},className:"adyen-task",disabled:i},{children:[D("div",Object.assign({className:"adyen-task-item"},{children:[D("div",Object.assign({className:"adyen-task-item__heading"},{children:[D("span",Object.assign({className:"adyen-task-item__icon-wrapper"},{children:D(Me,{name:a})})),D("div",Object.assign({className:"adyen-task-item__body"},{children:[D("span",Object.assign({className:"adyen-task-item__tagline"},{children:t})),D("span",Object.assign({className:"adyen-task-item__title"},{children:e}))]}))]})),D("aside",Object.assign({className:"adyen-task-item__status"},{children:[D(Hg,{status:r,downloadHandler:s}),D(Me,{className:"adl-u-color-grey-60",name:"chevron-right"})]}))]})),r===Cl.ERROR&&D(Bg,{className:"adyen-task-item-alert",problems:o})]}));var $g;!function(e){e.BANK_ACCOUNT="BankAccount",e.LEGAL_ENTITY="LegalEntity",e.DOCUMENTS="Documents"}($g||($g={}));const Xg=e=>{var t;return(null===(t=e.transferInstruments)||void 0===t?void 0:t.length)>0};function Yg({tasks:e,onNavigateToTask:a,legalEntityResponse:r,capabilityProblems:n,onPciDownload:i,pciStatus:o,serviceAgreementTypes:s}){var l,d,c,u,m,p,g,y,b,f;const{i18n:h,isLegalEntityPartOfTrust:v,accountHolder:_}=He(),N=e.some((e=>[Rl.INDIVIDUAL,Rl.COMPANY,Rl.DECISION_MAKER_OVERVIEW].includes(e))),O=v||km(r),I=e.some((e=>[Rl.SERVICE_AGREEMENT,Rl.PCI_DSS].includes(e))),E=e.some((e=>e===Rl.COMPANY)),T=_===Hl.MY_SOLE_TRADER_NAME||Km(r),A=(null==r?void 0:r.transferInstruments)||[],S=(null===(l=null==r?void 0:r.organization)||void 0===l?void 0:l.legalName)||(null===(d=null==r?void 0:r.individual)||void 0===d?void 0:d.name),C=e.includes(Rl.PAYIN)&&!e.includes(Rl.PAYOUT),R=(r.type===ol.ORGANIZATION&&!!(null===(c=null==r?void 0:r.entityAssociations)||void 0===c?void 0:c.length)||r.type===ol.INDIVIDUAL&&!!(null==r?void 0:r.individual))&&e.includes(Rl.PCI_DSS),k="true"===(null==o?void 0:o.signingRequired)||!0===(null==o?void 0:o.signingRequired),L=!k&&(null==o?void 0:o.hasDocuments),w=!R||!k&&!(null==o?void 0:o.hasDocuments)||L,P=L||k,j=e.includes(Rl.SERVICE_AGREEMENT)&&(null==s?void 0:s.length)>0,x=!(r.type===ol.ORGANIZATION&&vu(r).length||r.type===ol.INDIVIDUAL&&!!(null==r?void 0:r.individual)),M=I&&(P||j),F=e=>a(C?Rl.PAYIN:Rl.PAYOUT,e);return D("div",{children:[N&&D(Ug,Object.assign({title:E?h.get("businessAccountDetailsDescription"):h.get("accountDetailsDescription")},{children:[D(ng,{}),e.includes(Rl.INDIVIDUAL)&&D(Gg,{onNavigateToTask:()=>a(Rl.INDIVIDUAL),icon:"decision-maker",title:h.get("providePersonalDetails"),status:Qm($g.LEGAL_ENTITY,n,r,[r.id]),problems:null===(u=null==n?void 0:n.LegalEntity)||void 0===u?void 0:u[r.id]}),T&&D(Gg,{onNavigateToTask:()=>a(Rl.SOLE_PROPRIETOR_COMPANY),icon:"company",title:h.get("enterSoleProprietorDetails"),status:Qm($g.LEGAL_ENTITY,n,r,Ym(r)),problems:zm(r,n)}),e.includes(Rl.COMPANY)&&D(Gg,{onNavigateToTask:()=>a(Rl.COMPANY),icon:"company",title:h.get("provideCompanyDetails"),status:Qm($g.LEGAL_ENTITY,n,r,[r.id]),problems:null===(m=null==n?void 0:n.LegalEntity)||void 0===m?void 0:m[r.id]}),e.includes(Rl.DECISION_MAKER)&&D(Gg,{onNavigateToTask:()=>a(Rl.DECISION_MAKER_OVERVIEW),icon:"decision-maker",title:h.get("addDecisionMakers"),status:Iu(r)?Qm($g.LEGAL_ENTITY,n,r,_u(r)):Cl.DETAILS_REQUIRED})]})),O&&D(Ug,Object.assign({title:h.get("trustDetailsDescription")},{children:[D(Gg,{onNavigateToTask:()=>a(Rl.TRUST),icon:"trust",title:h.get("provideTrustDetails"),status:Qm($g.LEGAL_ENTITY,n,r,Mm(r)),problems:Fm(r,n)}),D(Gg,{onNavigateToTask:()=>a(Rl.TRUST_MEMBER_OVERVIEW),icon:"decision-maker",title:h.get("addTrustMembers"),status:Vm(r)?Qm($g.LEGAL_ENTITY,n,r,jm(r)):Cl.DETAILS_REQUIRED})]})),(e.includes(Rl.PAYOUT)||e.includes(Rl.PAYIN))&&D(Ug,Object.assign({title:h.get(C?"payinAccountsDescription":"payoutAccountsDescription")},{children:A.length>0?D(t.Fragment,{children:[A.map((e=>{var t;return D(Gg,{onNavigateToTask:()=>F(e.id),icon:"payout",title:e.accountIdentifier,tagline:h.get("payoutDetails"),status:Xg(r)?Qm($g.BANK_ACCOUNT,n,r,[e.id]):Cl.DETAILS_REQUIRED,problems:null===(t=null==n?void 0:n.BankAccount)||void 0===t?void 0:t[e.id]})})),D(qg,Object.assign({stateful:!0,onClick:()=>F(null),className:"adyen-task adl-add-payout",disabled:!S},{children:[D(Me,{name:"plus",className:"adl-u-padding-top-2 adl-u-margin-right-8"}),D("span",{children:h.get(C?"addExtraPayinAccount":"addExtraPayoutAccount")})]}))]}):D(Gg,{onNavigateToTask:F,icon:"payout",title:h.get(C?"providePayinDetails":"providePayoutDetails"),status:Xg(r)?Qm($g.BANK_ACCOUNT,n,r,[null===(g=null===(p=null==r?void 0:r.transferInstruments)||void 0===p?void 0:p[0])||void 0===g?void 0:g.id]):Cl.DETAILS_REQUIRED,disabled:!S,problems:null===(y=null==n?void 0:n.BankAccount)||void 0===y?void 0:y[null===(f=null===(b=null==r?void 0:r.transferInstruments)||void 0===b?void 0:b[0])||void 0===f?void 0:f.id]})})),M&&D(Ug,Object.assign({title:h.get("toCompleteProcessReviewAndSignOfficialDocumentation")},{children:[j&&s.map((e=>D(Gg,{onNavigateToTask:()=>(e=>a(Rl.SERVICE_AGREEMENT,e))(e),icon:"contract",title:h.get("signServiceAgreement"),disabled:x,status:Cl.DETAILS_REQUIRED},e))),P&&D(Gg,{onNavigateToTask:()=>!L&&a(Rl.PCI_DSS),icon:"pci",title:h.get("pciDssQuestionnaire"),status:L?Cl.DOWNLOAD:Cl.DETAILS_REQUIRED,downloadHandler:i,disabled:w})]}))]})}const Kg=({name:e,types:r,status:n,actions:i,reviewActions:o,problems:s,infoContent:l})=>{const{i18n:d,isReview:c}=He(),[u,m]=le(!1),p=a("adl-entity-association__more-actions-toggle",{"adl-entity-association__more-actions-toggle--open":u}),g=a("adl-entity-association__more-actions",{"adl-entity-association__more-actions--open":u});return D("div",Object.assign({className:"adl-entity-association"},{children:[D("div",Object.assign({className:"adl-entity-association__top"},{children:[D("h3",Object.assign({className:"adl-entity-association__title"},{children:e})),D("div",Object.assign({className:"adl-entity-association__info"},{children:c&&o?{reviewActions:o}:D(t.Fragment,{children:[D(Hg,{status:n}),i&&D("div",Object.assign({className:"adl-entity-association__actions"},{children:[D($c,{className:p,ghost:!0,icon:"more-horiz",onClick:()=>m(!u),title:d.get("toggleAssociationMenu",{values:{name:e}})}),D("div",Object.assign({className:g},{children:i}))]}))]})}))]})),D("div",{children:r.map((e=>D(Ze,Object.assign({className:`adl-entity-association__tag ${Gm(e)}`,isBasic:!0},{children:d.get($m(e))}),e)))}),n===Cl.ERROR&&D(Bg,{className:"adl-entity-association-alert",problems:s}),l]}))},zg=({decisionMakerType:e,country:t})=>{const{i18n:a}=He();return D("div",Object.assign({className:"adl-decision-makers__box"},{children:[D(Ze,Object.assign({className:`adl-u-margin-bottom-8 adl-decision-makers__tag ${Gm(e)}`,isBasic:!0},{children:a.get($m(e))}),e),D("span",{dangerouslySetInnerHTML:{__html:a.get(fu(t)[e])}})]}))},Zg=({trackingConig:e,parentLegalEntity:r,legalEntityResponse:n,capabilityProblems:i,onNavigateToIndividual:s,handleUpdateLegalEntity:l,navigateBackToTaskList:d,onDecisionMakerDelete:c})=>{var u,m;const{i18n:p}=He(),{showToast:g}=gg(),y=hu(n),b=null===(m=null===(u=null==n?void 0:n.organization)||void 0===u?void 0:u.registeredAddress)||void 0===m?void 0:m.country,f=function(e){const t=gu(e).filter((e=>1===e.roleTypes.length)).map((e=>e.roleTypes[0]));return[...new Set(t)]}(b),h=null==y?void 0:y.reduce(((e,t)=>{var a;const r=e[t.legalEntityId],o=t.type;return e[t.legalEntityId]={legalEntityId:t.legalEntityId,types:r?[...r.types,o]:[o],status:Qm($g.LEGAL_ENTITY,i,n,[t.legalEntityId]),name:t.name,legalEntityType:t.entityType,problems:null===(a=null==i?void 0:i.LegalEntity)||void 0===a?void 0:a[t.legalEntityId]},e}),{}),v=h?Object.values(h):[],_=0===Ou(n,Rl.DECISION_MAKER).length,N=Vp({trackingConig:e,parentLegalEntity:r,legalEntity:n,task:Rl.DECISION_MAKER_OVERVIEW}),O=e=>{s(e.legalEntityId),P.addEvent("Edited decision maker",{segmentation:Object.assign(Object.assign({},N),{legalEntityId:e.legalEntityId,legalEntityType:e.legalEntityType,roles:e.types})})},I=e=>D(t.Fragment,{children:[D($c,{className:"adl-entity-association__edit",ghost:!0,icon:"edit",onClick:()=>O(e),label:p.get("edit"),title:p.get("editDecisionMakerDetails",{values:{decisionMaker:e.name}})}),D($c,{className:"adl-entity-association__delete",ghost:!0,icon:"bin",onClick:()=>(e=>o(void 0,void 0,void 0,(function*(){try{const t={entityAssociations:n.entityAssociations.filter((t=>t.legalEntityId!==e.legalEntityId))};yield l(t,n.id),c();const a=y.filter((t=>t.legalEntityId!==e.legalEntityId));P.addEvent("Removed decision maker",{segmentation:Object.assign(Object.assign({},N),{legalEntityId:e.legalEntityId,legalEntityType:e.legalEntityType,roles:e.types,remainingDecisionMakers:a})}),g({type:mg.SUCCESS,label:p.get("successFullyRemovedDecisionMaker")})}catch(e){g({type:mg.ERROR,label:p.get("failedToRemoveDecisionMaker")})}})))(e),label:p.get("remove"),title:p.get("removeDecisionMaker",{values:{decisionMaker:e.name}})})]}),E=e=>D($c,{showAsLink:!0,icon:"chevron-right",onClick:()=>O(e.legalEntityId),label:p.get("verify"),title:p.get("verifyDecisionMakerDetails",{values:{decisionMaker:e.name}})});return D(sg,{content:D(t.Fragment,{children:D("div",Object.assign({className:"adl-decision-makers adl-u-width-full"},{children:[D(Fs,{heading:p.get("decisionMaker"),description:p.get("decisionMakerDescription")}),D("div",Object.assign({className:"adl-decision-makers__container"},{children:f.map((e=>D(zg,{decisionMakerType:e,country:b},e)))})),D(ng,{}),D(md,{page:"Decision makers",title:p.get("whatIsTheDifferenceBetweenTheseRoles"),content:D("ul",Object.assign({className:"adl-guidance-list"},{children:f.map((e=>D("li",{dangerouslySetInnerHTML:{__html:p.get(`${"uboThroughControl"===e?"controllingPerson":"uboThroughOwnership"===e?"owner":e}GuideDescription`)}},e)))})),titleId:"whatIsTheDifferenceBetweenTheseRoles",contentId:"differenceBetweenAnOwnerControllingPersonAndSignatory"}),(null==v?void 0:v.length)>0?D("div",Object.assign({className:"adl-decision-makers__wrapper"},{children:v.map((e=>D(Kg,{types:e.types,legalEntityId:e.legalEntityId,name:e.name,status:e.status,actions:I(e),reviewActions:E(e),problems:null==e?void 0:e.problems},e.legalEntityId)))})):null,D($c,{secondary:!0,className:a("adl-decision-makers__add",{"adl-decision-makers__add--more":(null==v?void 0:v.length)>0}),icon:"plus",onClick:e=>{e.stopPropagation(),s()},label:p.get("addDecisionMaker"),disabled:_}),D(rg,{onHome:()=>{P.addEvent("Saved decision makers list",{segmentation:Object.assign(Object.assign({},N),{noOfDecisionMakers:y.length})}),d()},homeButtonLabel:p.get("saveAndGoToOverview")})]}))})})};var Qg;!function(e){e.BANK_STATEMENT="bankStatement",e.DEPOSIT_TICKET="depositTicket",e.SCREENSHOT_OF_BANK="screenshotOfOnlineBankingEnviroment",e.OFFICIAL_EMAIL="officialEmailOrALetterFromYourBank",e.CHEQUES="cheques",e.RELEVE_DIDENTITE="releveDidentiteBancaire"}(Qg||(Qg={}));const Jg=[{id:Qg.BANK_STATEMENT,name:"bankStatement"},{id:Qg.DEPOSIT_TICKET,name:"depositTicket"},{id:Qg.SCREENSHOT_OF_BANK,name:"screenshotOfOnlineBankingEnviroment"},{id:Qg.OFFICIAL_EMAIL,name:"officialEmailOrALetterFromYourBank"},{id:Qg.CHEQUES,name:"cheques"},{id:Qg.RELEVE_DIDENTITE,name:"releveDidentiteBancaire"}],ey=["bankStatementDocument","description"];const ty=bt((function(e){var a,r;const{i18n:n,commonProps:i}=He(),o=me(null),[s,l]=le({}),[d,c]=le(null),{country:u,optionalFields:m}=e,{handleChangeFor:p,data:g,valid:y,setValid:b,fieldProblems:f,errors:h,triggerValidation:v,setData:_}=ma(Object.assign(Object.assign({},e),{schema:["description"],defaultData:e.data,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors}));ce((()=>{v()}),[]);const N=na(e,n),O=me({setState:null});return this.triggerValidation=()=>{N.isRequiredField("bankStatementDocument")&&o.current.triggerValidation()},ce((()=>{var t;e.data.bankStatementDocument&&(l({bankStatementDocument:e.data.bankStatementDocument}),_("description",null===(t=e.data)||void 0===t?void 0:t.description))}),[e.data]),ce((()=>{O.current.setState({type:"addToState",value:{data:g,valid:y,errors:h,fieldProblems:f,caller:e.id,dataStoreId:e.id,schema:ey}})}),[g,y,h,f]),ce((()=>{const e=m.includes("bankStatementDocument");e?b("bankStatementDocument",!0):e||(null==o?void 0:o.current)||b("bankStatementDocument",!1)}),[m]),D("form",Object.assign({className:"adyen-kyc-payout__bank-statement","aria-describedby":i.showInlineErrors?null:"ariaErrorField"},{children:[D(Ks,{owner:e.id,stateRef:O}),D(Fs,{heading:e.heading}),D(Gc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:N,id:"ariaErrorField"}),N.isVisibleField("bankStatementDocument")&&D(t.Fragment,{children:[D("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:n.get("bankStatementDocumentTypeLabel",{values:{name:e.name}})})),D(Be,Object.assign({name:"documentType",label:N.getLabel("bankStatementDocument","selectDocumentType"),className:"adyen-kyc-field--bankStatementDocumentType"},{children:ea("select",{onChange:e=>c(e.target.value),name:"documentType",placeholder:n.get("selectDocument"),selected:d,items:(()=>{let e=Jg;return"FR"!==u&&(e=e.filter((e=>e.id!==Qg.RELEVE_DIDENTITE))),e.map((({id:e,name:t})=>({id:e,name:n.get(t)})))})()})})),d?D("div",{children:[D("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",n.get("requirements")]})),D(_c,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[D(vc,{children:n.get("accountHolderNameMatchesWithBusinessOrTradingName")}),D(vc,{children:n.get("accountNumberOrIbanVisible")}),D(vc,{children:n.get("dateOnDocumentNoOlderThanXMonths",{values:{numberOfMonths:12}})}),D(vc,{children:n.get("showsCountryOfBankAccount")}),D(vc,{children:n.get("hasTobeOfficialDocumentFromBank")})]})),D(pc,{type:uc.BANK_STATEMENT,className:"adl-u-margin-y-24"})]}):null,d||!Cs(null===(a=e.data)||void 0===a?void 0:a.bankStatementDocument)?D(Be,Object.assign({className:"adyen-kyc-field--bankStatementDocument adyen-kyc-upload-field",name:"bankStatementDocument",isValid:y.bankStatementDocument},{children:D(fc,{name:"bankStatementDocument",ref:o,id:e.id,defaultData:s,isOptional:N.isOptionalField("bankStatementDocument"),iconPrefix:mc(uc.BANK_STATEMENT,!0)})})):null]}),d||!Cs(null===(r=e.data)||void 0===r?void 0:r.bankStatementDocument)?D(Be,Object.assign({name:"description",label:N.getLabel("description"),helper:n.get("descriptionHelper"),errorMessage:N.getErrorMessage("description",h,f),isValid:y.description},{children:ea("textArea",{name:"description",value:g.description,classNameModifiers:["description"],maxLength:200,onInput:p("description"),"aria-label":N.getLabel("description"),"aria-invalid":!y.description})})):null]}))}),((e,t)=>W(e.requiredFields,t.requiredFields)&&W(e.optionalFields,t.optionalFields)&&W(e.data,t.data)&&W(e.formVerificationErrors,t.formVerificationErrors)&&W(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name)),ay=["bankAccountNumber"];function ry(e){const{i18n:a,commonProps:r}=He(),{dataStoreId:n,validators:i}=e,o=me({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ma(Object.assign(Object.assign({},e),{schema:ay,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors,maskedFields:e.maskedFields}));ce((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:m,caller:"bankAccountNumber",dataStoreId:n}})}),[l,d,c,u]);const g=na(e,a);return this.triggerValidation=p,D(t.Fragment,{children:[D(Ks,{stateRef:o}),D(Be,Object.assign({name:"bankAccountNumber",label:g.getLabel("bankAccountNumber"),classNameModifiers:["bankAccountNumber"],errorMessage:g.getErrorMessage("bankAccountNumber",c,m)||"",isValid:d.bankAccountNumber,showInlineErrors:r.showInlineErrors},{children:ea("text",{name:"bankAccountNumber",value:l.bankAccountNumber,readonly:g.isReadOnly("bankAccountNumber"),classNameModifiers:["bankAccountNumber"],onInput:s("bankAccountNumber","input"),onBlur:s("bankAccountNumber","blur"),"aria-required":!0,"aria-label":g.getLabel("bankAccountNumber"),"aria-invalid":!d.bankAccountNumber})}))]})}var ny;!function(e){e.AUD="AUD",e.BGN="BGN",e.BRL="BRL",e.CAD="CAD",e.CHF="CHF",e.CZK="CZK",e.DKK="DKK",e.EUR="EUR",e.GBP="GBP",e.HUF="HUF",e.HRK="HRK",e.PLN="PLN",e.NOK="NOK",e.RON="RON",e.SGD="SGD",e.SEK="SEK",e.USD="USD"}(ny||(ny={}));const iy={AUD:[ny.AUD],AUS:[ny.EUR],BE:[ny.EUR],BR:[ny.BRL],BG:[ny.BGN,ny.EUR],CA:[ny.CAD,ny.USD],HR:[ny.HRK,ny.EUR],CY:[ny.EUR],CZ:[ny.CZK,ny.EUR],DK:[ny.DKK,ny.EUR],EE:[ny.EUR],FI:[ny.EUR],FR:[ny.EUR],DE:[ny.EUR],GR:[ny.EUR],HU:[ny.HUF,ny.EUR],IE:[ny.EUR],IT:[ny.EUR],LV:[ny.EUR],LI:[ny.CHF,ny.EUR],LT:[ny.EUR],LU:[ny.EUR],MT:[ny.EUR],NL:[ny.EUR],NO:[ny.NOK,ny.EUR],PL:[ny.PLN,ny.EUR],PT:[ny.EUR],RO:[ny.RON,ny.EUR],SGD:[ny.SGD],SK:[ny.EUR],ES:[ny.EUR],SE:[ny.SEK,ny.EUR],CH:[ny.CHF,ny.EUR],GB:[ny.GBP,ny.EUR],US:[ny.USD]},oy=["swiftCode"];function sy(e){const{i18n:a,commonProps:r}=He(),{dataStoreId:n,validators:i}=e,o=me({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ma(Object.assign(Object.assign({},e),{schema:oy,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));ce((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:m,caller:"swiftCode",dataStoreId:n}})}),[l,d,c,u]);const g=na(e,a);return this.triggerValidation=p,D(t.Fragment,{children:[D(Ks,{stateRef:o}),D(Be,Object.assign({name:"swiftCode",label:g.getLabel("swiftCode"),classNameModifiers:["swiftCode"],errorMessage:g.getErrorMessage("swiftCode",c,m),isValid:d.swiftCode,showInlineErrors:r.showInlineErrors},{children:ea("text",{name:"swiftCode",value:l.swiftCode,readonly:g.isReadOnly("swiftCode"),onInput:s("swiftCode","input"),onBlur:s("swiftCode","blur"),"aria-required":!0,"aria-label":g.getLabel("swiftCode"),"aria-invalid":!d.swiftCode})}))]})}const ly=["branchCode"];function dy(e){const{i18n:a,commonProps:r}=He(),{dataStoreId:n,validators:i}=e,o=me({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ma(Object.assign(Object.assign({},e),{schema:ly,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));ce((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:m,caller:"branchCode",dataStoreId:n}})}),[l,d,c,u]);const g=na(e,a);return this.triggerValidation=p,D(t.Fragment,{children:[D(Ks,{stateRef:o}),D(Be,Object.assign({name:"branchCode",label:g.getLabel("branchCode"),classNameModifiers:["branchCode"],errorMessage:g.getErrorMessage("branchCode",c,m)||"",isValid:d.branchCode,showInlineErrors:r.showInlineErrors},{children:ea("text",{name:"branchCode",value:l.branchCode,readonly:g.isReadOnly("branchCode"),onInput:s("branchCode","input"),onBlur:s("branchCode","blur"),"aria-required":!0,"aria-label":g.getLabel("branchCode"),"aria-invalid":!d.branchCode})}))]})}const cy=["iban"],uy=(e,t)=>{const{iban:a}=e;return{iban:[...a,{modes:["blur","input"],validate:e=>null===function(e,t){if(Cs(e))return null;const a=e.replace(/ /g,"").toUpperCase(),r="validationPleaseEnterAValidIban";if(!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(a))return r;const n=a.substring(0,2);if(t&&!t.includes(n))return r;const i={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{26}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"}[n];if(void 0!==i&&!new RegExp(`^[A-Z]{2}\\d{2}${i}$`,"").test(a))return r;const o=a.substring(4,a.length)+a.substring(0,4);let s=!0,l="";for(let e=0;e<o.length;e+=1){const t=o.charAt(e);"0"!==t&&(s=!1),s||(l+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(t))}let d=0;for(let e=0;e<l.length;e+=1)d=+`${d}${l.charAt(e)}`%97;return 1===d?null:r}(e,t),errorMessage:"validationPleaseEnterAValidIban"}]}};function my(e){const{i18n:a,commonProps:r}=He(),{dataStoreId:n,country:i,validators:o}=e,s=me({setState:null}),{handleChangeFor:l,data:d,valid:c,errors:u,isValid:m,fieldProblems:p,triggerValidation:g}=ma(Object.assign(Object.assign({},e),{schema:cy,rules:uy(o,i),defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors,maskedFields:e.maskedFields}));ce((()=>{s.current.setState({type:"addToState",value:{data:d,valid:c,errors:u,fieldProblems:p,caller:"iban",dataStoreId:n}})}),[d,c,u,m]);const y=na(e,a);return this.triggerValidation=g,D(t.Fragment,{children:[D(Ks,{stateRef:s}),D(Be,Object.assign({name:"iban",label:y.getLabel("iban"),errorMessage:y.getErrorMessage("iban",u,p)||"",isValid:c.iban,showInlineErrors:r.showInlineErrors},{children:D(Ut,{name:"iban",value:d.iban,readonly:y.isReadOnly("iban"),classNameModifiers:["iban"],onInput:l("iban","blur"),onBlur:l("iban","blur"),"aria-required":!0,"aria-label":y.getLabel("iban"),"aria-invalid":!c.iban,transformInput:e=>e.toUpperCase()})}))]})}const py=["bankName"];function gy(e){const{i18n:a,commonProps:r}=He(),{dataStoreId:n,validators:i}=e,o=me({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ma(Object.assign(Object.assign({},e),{schema:py,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));ce((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:m,caller:"bankName",dataStoreId:n}})}),[l,d,c,u]);const g=na(e,a);return this.triggerValidation=p,D(t.Fragment,{children:[D(Ks,{stateRef:o}),D(Be,Object.assign({name:"bankName",label:g.getLabel("bankName"),classNameModifiers:["bankName"],errorMessage:g.getErrorMessage("bankName",c,m)||"",isValid:d.bankName,showInlineErrors:r.showInlineErrors},{children:ea("text",{name:"bankName",value:l.bankName,readonly:g.isReadOnly("bankName"),onInput:s("bankName","input"),onBlur:s("bankName","blur"),"aria-required":!0,"aria-label":g.getLabel("bankName"),"aria-invalid":!d.bankName})}))]})}const yy=["bankCode"];function by(e){const{i18n:a,commonProps:r}=He(),{dataStoreId:n,validators:i}=e,o=me({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ma(Object.assign(Object.assign({},e),{schema:yy,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));ce((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:m,caller:"bankCode",dataStoreId:n}})}),[l,d,c,u]);const g=na(e,a);return this.triggerValidation=p,D(t.Fragment,{children:[D(Ks,{stateRef:o}),D(Be,Object.assign({name:"bankCode",label:g.getLabel("bankCode"),classNameModifiers:["bankCode"],errorMessage:g.getErrorMessage("bankCode",c,m)||"",isValid:d.bankCode,showInlineErrors:r.showInlineErrors},{children:ea("text",{name:"bankCode",value:l.bankCode,readonly:g.isReadOnly("bankCode"),onInput:s("bankCode","input"),onBlur:s("bankCode","blur"),"aria-required":!0,"aria-label":g.getLabel("bankCode"),"aria-invalid":!d.bankCode})}))]})}const fy=["bankCity"];function hy(e){const{i18n:a,commonProps:r}=He(),{dataStoreId:n,validators:i}=e,o=me({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ma(Object.assign(Object.assign({},e),{schema:fy,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));ce((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:m,caller:"bankCity",dataStoreId:n}})}),[l,d,c,u]);const g=na(e,a);return this.triggerValidation=p,D(t.Fragment,{children:[D(Ks,{stateRef:o}),D(Be,Object.assign({name:"bankCity",label:g.getLabel("bankCity"),classNameModifiers:["bankCity"],errorMessage:g.getErrorMessage("bankCity",c,m),isValid:d.bankCity,showInlineErrors:r.showInlineErrors},{children:ea("text",{name:"bankCity",value:l.bankCity,readonly:g.isReadOnly("bankCity"),onInput:s("bankCity","input"),onBlur:s("bankCity","blur"),"aria-required":!0,"aria-label":g.getLabel("bankCity"),"aria-invalid":!d.bankCity})}))]})}const vy=["accountHolder",...cy,...ly,...oy,"currency",...ay,...py,...yy];const _y=bt((function(e){const{i18n:t,commonProps:a,accountHolder:r}=He(),{legalEntityResponse:n}=e,i=e.requiredFields||vy,o=me(null),s=me(null),l=me(null),d=me(null),c=me(null),u=me(null),m=me(null),p=me({setState:null}),{data:g,valid:y,errors:b,isValid:f,handleChangeFor:h}=ma(Object.assign(Object.assign({},e),{defaultData:e.data,schema:i,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),v=na(Object.assign(Object.assign({},e),{requiredFields:i}),t);ce((()=>{p.current.setState({type:"addToState",value:{data:g,valid:y,errors:b,caller:e.id,dataStoreId:e.id}})}),[g,y,b,f]),this.triggerValidation=()=>{v.isRequiredField("bankAccountNumber")&&o.current.triggerValidation(),v.isRequiredField("branchCode")&&s.current.triggerValidation(),v.isRequiredField("swiftCode")&&d.current.triggerValidation(),v.isRequiredField("iban")&&c.current.triggerValidation(),v.isRequiredField("bankName")&&u.current.triggerValidation(),v.isRequiredField("bankCode")&&m.current.triggerValidation(),v.isRequiredField("bankCity")&&l.current.triggerValidation()};const _=kl(e,ay),N=kl(e,oy),O=kl(e,cy),I=kl(e,ly),E=kl(e,py),T=kl(e,yy),A=kl(e,fy),S=r===Hl.MY_SOLE_TRADER_NAME||Km(n);return D("form",Object.assign({className:"adyen-kyc-individual__payout-account","aria-describedby":a.showInlineErrors?null:"ariaErrorField"},{children:[D(Ks,{owner:e.id,stateRef:p}),D(Fs,{heading:e.heading}),D(Gc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:v,id:"ariaErrorField"}),D(md,{page:"Payout account details",titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingPayoutDetails",title:t.get("whyDoINeedToFillInThisInformation"),content:t.get("reasonForFillingPayoutDetails")}),v.isRequiredField("accountHolder")&&D(Be,Object.assign({name:"accountHolder",label:v.getLabel("accountHolder"),helper:t.get(S?"accountHolderDescriptionSoleProp":n.type===ol.ORGANIZATION?"accountHolderDescriptionCompany":"accountHolderDescriptionIndividual"),classNameModifiers:["accountHolder"],isValid:y.accountHolder,showInlineErrors:a.showInlineErrors},{children:ea("text",{name:"accountHolder",value:g.accountHolder,placeholder:v.getPlaceholder("accountHolder"),readonly:!0,onInput:h("accountHolder","input"),onBlur:h("accountHolder","blur"),"aria-required":!0,"aria-label":v.getLabel("accountHolder"),"aria-invalid":!y.accountHolder,showInlineErrors:a.showInlineErrors})})),v.isRequiredField("bankAccountNumber")&&D(ry,Object.assign({},_,{dataStoreId:e.id,ref:o})),v.isRequiredField("iban")&&D(my,Object.assign({},O,{dataStoreId:e.id,country:g.bankCountry,ref:c})),v.isRequiredField("swiftCode")&&D(sy,Object.assign({},N,{dataStoreId:e.id,ref:d})),v.isRequiredField("bankName")&&D(gy,Object.assign({},E,{dataStoreId:e.id,ref:u})),v.isRequiredField("bankCode")&&D(by,Object.assign({},T,{dataStoreId:e.id,ref:m})),v.isRequiredField("branchCode")&&D(dy,Object.assign({},I,{dataStoreId:e.id,ref:s})),v.isRequiredField("bankCity")&&D(hy,Object.assign({},A,{dataStoreId:e.id,ref:l}))]}))}),((e,t)=>W(e.requiredFields,t.requiredFields)&&W(e.optionalFields,t.optionalFields)&&W(e.data,t.data)&&W(e.formVerificationErrors,t.formVerificationErrors)&&W(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name));var Ny;!function(e){e.INSTANT_VERIFICATION="instantVerification",e.MANUAL_VERIFICATION="manualVerification"}(Ny||(Ny={}));const Oy=["payoutVerificationMethod"];function Iy(e){var a;const{i18n:r,loadingContext:n}=He(),i=e.id,o=Oy,s=me({setState:null});function l(){if(e.bankVerificationVendors)return"TRUSTLY"===e.bankVerificationVendors[e.country]?"trustly":"TINK"===e.bankVerificationVendors[e.country]?"tink":void 0}const d=`${n}static/images/payout-verification-method`,c=[{id:Ny.INSTANT_VERIFICATION,name:"verifyViaMobileBankAppOrBankWebsite",subtitle:"instant",description:"instantVerificationDescription",iconComponentDesktop:"instant-verification-desktop",iconComponentMobile:"instant-verification-mobile",provider:`provider-logo-${l()}`},{id:Ny.MANUAL_VERIFICATION,name:"provideAccountDetailsAndUploadBankStatement",subtitle:"mayTakeAFewHoursOrDays",description:"manualVerificationDescription",iconComponentDesktop:"manual-verification-desktop",iconComponentMobile:"manual-verification-mobile"}],u=y(r.locale),{handleChangeFor:m,data:p,valid:g,errors:b,isValid:f,triggerValidation:h,fieldProblems:v}=ma(Object.assign(Object.assign({},e),{schema:o,defaultData:Object.assign(Object.assign({},e.data),{payoutVerificationMethod:Ny.INSTANT_VERIFICATION}),rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),_=na(e,r);return ce((()=>{s.current.setState({type:"addToState",value:{data:p,valid:g,errors:b,fieldProblems:v,caller:i,dataStoreId:i,schema:o}})}),[p,g,b,f]),this.triggerValidation=()=>{h(["payoutVerificationMethod"])},D("div",{children:[D(Ks,{owner:i,stateRef:s}),D("form",Object.assign({className:"adyen-kyc-verification-method"},{children:[D(Fs,{heading:e.heading}),D("p",{children:[" ",r.get("textToVerifyAccount")," "]}),D("div",Object.assign({className:"adyen-kyc-account-holder-information"},{children:[D("div",Object.assign({className:"adyen-kyc-account-holder-information__labels"},{children:[D("p",{children:r.get("accountHolder")}),D("p",{children:r.get("bankCountry")})]})),D("div",Object.assign({className:"adyen-kyc-account-holder-information__values"},{children:[D("p",{children:e.accountHolder}),D("p",{children:null!==(a=u.getCountryName(e.country))&&void 0!==a?a:e.country})]}))]})),D(Be,Object.assign({name:"verificationMethods",useLabelElement:!1,errorMessage:_.getErrorMessage("payoutVerificationMethod",b,v)},{children:D("div",Object.assign({className:"adyen-kyc-field-verification-methods"},{children:c.map((e=>D(Zt,Object.assign({item:e,uniqueId:e.id,i18n:r,value:p.payoutVerificationMethod,onChange:m("payoutVerificationMethod"),name:"verificationMethod",labelClassName:"adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"},{children:[D(Zt.Icon,{children:D("div",Object.assign({className:"adyen-kyc-radio-group-card__illustration"},{children:D("picture",{children:[D("source",{type:"image/svg+xml",media:`(min-width: ${Sg.md}px)`,srcSet:`${d}/${e.iconComponentDesktop}.svg`}),D("source",{type:"image/svg+xml",media:`(max-width: ${Sg.md}px)`,srcSet:`${d}/${e.iconComponentMobile}.svg`}),D("img",{srcSet:`${d}/${e.iconComponentDesktop}.svg`,alt:`${e.iconComponentDesktop}`})]})}))}),e.provider&&D(Zt.Footer,{children:D("div",Object.assign({className:"adyen-kyc-field-verification-methods__footer"},{children:[r.get("poweredBy"),D("img",{className:"adyen-kyc-field-verification-methods__icon",src:`${d}/${e.provider}.svg`,alt:`${e.provider}-logo`})]}))})]}),e.id)))}))})),D(Gc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:_,id:"ariaErrorField"}),D(md,{page:"Instant verification with partner",titleId:"howDoesVerificationWithOurPartnerWorks",contentId:"bankVerificationWithPartnerSteps",title:r.get("howDoesVerificationWithOurPartnerWorks",{values:{provider:r.get(l())}}),content:D(t.Fragment,{children:[D("p",{children:[" ",r.get("isOurTrustedPartnerHelpingSpeedUpSetup",{values:{provider:r.get(l())}})," "]}),D("ul",Object.assign({className:"adl-guidance-list"},{children:[D("li",Object.assign({className:"adl-guidance-list__item"},{children:r.get("selectTheBankToReceivePayouts")})),D("li",Object.assign({className:"adl-guidance-list__item"},{children:r.get("loginIntoYourBankingEnvironment")})),D("li",Object.assign({className:"adl-guidance-list__item"},{children:r.get("yourBankWillConfirmYourAccountDetails")}))]})),D("p",{children:r.get("adyenWillOnlyGetTemporaryAccess")}),D(tl,Object.assign({href:"https://www.adyen.com/policies-and-disclaimer/privacy-policy",external:!0},{children:r.get("learnMore")}))]})})]}))]})}class Ey extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.sourceError=t;const a=[];t&&(t instanceof this.constructor&&a.push(`${this.name}: ${t.message}`),t.stack&&a.push(t.stack)),this.stack=a.join("\n")}}const Ty=["Tink","PayWithMyBank"],[Ay,Sy]=Ty,Cy=["account_verification_report_id","error"],Ry=["accounts","error","reference"];let Dy;class ky{constructor(e,t,a){this.mountInProgress=!1,this.waitForResponse=()=>o(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{this.listener=a=>o(this,void 0,void 0,(function*(){try{const t=yield this.handleMessage(a);if(!t)return;e(t)}catch(e){t(e)}})),window.addEventListener("message",this.listener)}))}));try{this.iframeUrl=new URL(t)}catch(e){throw new Ey("WIDGET_URL_MALFORMED",e)}this.iframeElement=e,this.iframeWindow=e.contentWindow,this.vendor=a}removeMessageEventListener(){this.listener&&(window.removeEventListener("message",this.listener),this.listener=void 0)}handleMessage({data:e,origin:t,source:a}){return o(this,void 0,void 0,(function*(){if(a!==this.iframeWindow||t!==this.iframeUrl.origin)return;if(this.vendor!==Ay&&(e=>Object.entries(e).some((([e])=>Ry.includes(e))))(e)){if(Object.getOwnPropertyNames(e).includes("error"))throw e;return e}if(!Rs(e))return;const r=(e=>{try{const t=JSON.parse(e);return Cy.includes(t.type)?t:"invalid"}catch(e){return"invalid"}})(e);if("invalid"===r)return;const n={errorHandler:Promise.reject.bind(Promise),loadingContext:""},i=new URL(this.iframeUrl.searchParams.get("redirect_uri")),o=i.searchParams;switch(i.pathname=i.pathname.replace(RegExp(`(${this.vendor})$`,"i"),"$1/json"),r.type){case"account_verification_report_id":o.set("account_verification_report_id",r.data);try{return N(Object.assign(Object.assign({},n),{path:i.href}))}catch(e){throw new Ey("WIDGET_ACCOUNT_COMMIT_FAILURE",e)}case"error":{let{status:e,message:t}=r.error;o.set("error",e),o.set("message",t);try{const a=yield N(Object.assign(Object.assign({},n),{path:i.href}));(e=>!("object"!=typeof e||Array.isArray(e)||null===e||!("error"in e)||!("errorMessage"in e)))(a)&&(e=a.error,t=a.errorMessage)}catch(e){}throw{error:e,message:t}}}}))}unmount(){if(this.mountInProgress)throw new Ey("Cannot unmount widget, mounting is still in progress");this.removeMessageEventListener(),(e=>{const t=e.parentNode;let a=t.firstChild;for(;a;)a!==e&&t.removeChild(a),a=a.nextSibling})(this.iframeElement),Dy=void 0}mount(){return o(this,void 0,void 0,(function*(){if(Dy)throw new Ey(`You can only have one ${this.constructor.name} mounted at a time`);if(Dy=this,this.mountInProgress)throw new Ey("Cannot mount widget, mounting is already in progress");this.mountInProgress=!0;try{yield new Promise(((e,t)=>{let a=setTimeout((()=>{this.mountInProgress=!1,t(new Ey("WIDGET_TIMEOUT"))}),1e4);const r=()=>{a&&clearTimeout(a),a=null};this.iframeElement.addEventListener("load",(()=>{r(),this.mountInProgress=!1,e()})),requestAnimationFrame((()=>{try{this.vendor===Ay&&this.iframeUrl.searchParams.set("iframe","true"),this.iframeElement.setAttribute("src",this.iframeUrl.href)}catch(e){r(),this.mountInProgress=!1,t(e)}}))}))}catch(e){throw new Ey("WIDGET_LAUNCH_FAILED",e)}}))}mountAndWaitForResponse(){return o(this,void 0,void 0,(function*(){yield this.mount();try{return yield this.waitForResponse()}finally{this.removeMessageEventListener()}}))}}const Ly="adyen-kyc-bank-verification-widget",wy=`${Ly}-container`;function Py({url:e,vendor:t,widgetCallback:a}){const r=me(null);return ce((()=>{const n=r.current;let i,s;var l,d;return d=function r(l){var d,c;"adyen-kyc:empty-bank-verification-widget-container"===l.animationName&&(c=r,(d=n).removeEventListener("animationstart",c,!1),d.removeEventListener("MSAnimationStart",c,!1),d.removeEventListener("webkitAnimationStart",c,!1),i=document.createElement("iframe"),i.setAttribute("allowFullscreen","true"),i.classList.add(Ly),l.target.appendChild(i),requestAnimationFrame((()=>o(this,void 0,void 0,(function*(){try{s=new ky(i,e,t);const r=yield s.mountAndWaitForResponse();a({action:"verification_success",result:r})}catch(e){if(e instanceof Ey)switch(e.message){case"WIDGET_ACCOUNT_COMMIT_FAILURE":case"WIDGET_LAUNCH_FAILED":case"WIDGET_URL_MALFORMED":case"WIDGET_TIMEOUT":return a({action:"retry_verification"});default:throw e}return a({action:"handle_verification_exception",err:e})}})))))},(l=n).addEventListener("animationstart",d,!1),l.addEventListener("MSAnimationStart",d,!1),l.addEventListener("webkitAnimationStart",d,!1),n.classList.add(wy),()=>{null==s||s.unmount(),null==i||i.remove()}}),[]),D("div",{ref:r})}const jy=["verifiedAccountHolder","verifiedBankCountry","verifiedBankName","verifiedCurrencyCode","verifiedAccountName","verifiedBankAccountNumber"];function xy({getBankVerificationVendors:e,retrieveBankAccountInfo:a,onBack:r,country:n}){const{i18n:i}=He(),[s,l]=le(!1),d=((e,t)=>{const[a,r]=le();return ce((()=>{o(void 0,void 0,void 0,(function*(){const a=(yield t(e))[0];r(Ty.includes(a.name)?a:null)})).catch((e=>console.error(e)))}),[e,t]),a})(n,e),c=ge((e=>{switch(l(!0),e.action){case"handle_verification_exception":case"retry_verification":r&&r();break;default:{const{accounts:t}=e.result;a(t[0])}}}),[a,r]);return D("form",Object.assign({className:"adyen-kyc-bank-verification"},{children:d&&!s?D(t.Fragment,{children:[D(Py,{widgetCallback:c,url:d.redirectUrl,vendor:d.name}),D(rg,{onBack:()=>null==r?void 0:r(),backButtonLabel:i.get("goBack")})]}):void 0}))}var My=bt((function(e){const{getBankVerificationVendors:a,onBack:r,hideDropinLayout:n}=e,{i18n:i,payoutDefaultCurrency:o}=He(),s=e.id,l=jy,d=me({setState:null}),c=jy,{handleChangeFor:u,data:m,valid:p,errors:g,isValid:y,triggerValidation:b,fieldProblems:f}=ma(Object.assign(Object.assign({},e),{schema:l,defaultData:e.data,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),[h,v]=le(!1);return ce((()=>{d.current.setState({type:"addToState",value:{data:m,valid:p,errors:g,fieldProblems:f,caller:s,dataStoreId:s,schema:c}})}),[m,p,g,y]),this.triggerValidation=()=>{b(["verifiedBankAccountNumber"])},ce((()=>(n(!0),()=>n(!1))),[]),D(t.Fragment,{children:[D(Ks,{owner:s,stateRef:d}),h&&D(t.Fragment,{children:[D(Fs,{heading:e.heading}),D("div",Object.assign({className:"adyen-kyc-bank-verification-success"},{children:[D("span",{children:D("i",{className:"adyen-kyc-icon adyen-kyc-icon-checkmark-small adyen-kyc-bank-verification-success__checkmark-icon",role:"img","aria-hidden":"true"})}),D("span",{children:[" ",i.get("youSuccessfullyVerifiedAccount")]})]}))]}),"function"==typeof a&&!h&&D("div",Object.assign({className:"adyen-kyc-bank-verification-container"},{children:D(xy,{getBankVerificationVendors:a,retrieveBankAccountInfo:t=>{var a;u("verifiedBankAccountNumber")(t.number),u("verifiedAccountName")(t.name),u("verifiedBankName")(t.bankName),u("verifiedBankCountry")(e.country),u("verifiedAccountHolder")(e.data.verifiedAccountHolder),u("verifiedCurrencyCode")(null!==(a=e.data.verifiedCurrencyCode)&&void 0!==a?a:o),v(!0),n(!1),b()},onBack:r,country:e.country})}))]})}));const Fy=({country:e,verificationVendorsCallback:t,bankVerificationVendors:a})=>!!t&&a&&!!a[e],Vy=(e,t)=>{const a={payoutAccountDetails:{formId:"payoutAccountDetails",formName:e===Rl.PAYIN?"payinAccount":"payoutAccount",fields:vy},payoutAccountDocuments:{formId:"payoutAccountDocuments",formName:"bankStatement",fields:ey},payoutAccountVerification:{formId:"payoutAccountVerification",formName:"instantVerification",fields:jy}};return t?Object.assign({payoutVerificationMethod:{formId:"payoutVerificationMethod",formName:"verificationMethod",fields:Oy}},a):a};const Uy=e=>{var t,a,r,n,i,o,s,l;return e.type===ol.INDIVIDUAL?`${null!==(r=null===(a=null===(t=e.individual)||void 0===t?void 0:t.name)||void 0===a?void 0:a.firstName)&&void 0!==r?r:""} ${null!==(o=null===(i=null===(n=e.individual)||void 0===n?void 0:n.name)||void 0===i?void 0:i.lastName)&&void 0!==o?o:""}`:e.type===ol.ORGANIZATION?null!==(l=null===(s=e.organization)||void 0===s?void 0:s.legalName)&&void 0!==l?l:"":void 0},By=e=>{var t,a;return e.type===ol.INDIVIDUAL?null===(t=e.individual)||void 0===t?void 0:t.residentialAddress.country:e.type===ol.ORGANIZATION?null===(a=e.organization)||void 0===a?void 0:a.registeredAddress.country:void 0},Wy=ug((function(e){var t,a;const{i18n:r,loadingContext:n,clientKey:i}=He(),{activeForm:o,currentTask:s,legalEntityResponse:l,handleGetBankVerificationVendors:d}=e,c=Fy({country:e.country,bankVerificationVendors:e.bankVerificationVendors,verificationVendorsCallback:e.handleGetBankVerificationVendors}),[m,p]=le(c),g=Vy(s,c),y=null===(t=g.payoutVerificationMethod)||void 0===t?void 0:t.formId,b=null===(a=g.payoutAccountVerification)||void 0===a?void 0:a.formId,f=g.payoutAccountDetails.formId,h=g.payoutAccountDocuments.formId,v={[y]:me(null),[f]:me(null),[h]:me(null),[b]:me(null)},_=Dl(e,y),N=Dl(e,b),O=Dl(e,f),E=Dl(e,h);this.triggerCurrentFormValidation=()=>{var t;null===(t=null==v?void 0:v[e.activeForm.formId])||void 0===t||t.current.triggerValidation()};const T=e=>e===Rl.PAYIN?r.get("payinAccount"):r.get("payoutAccount"),A=na(E,r).isOptionalField("bankStatementDocument"),S=me({setState:null});return ce((()=>()=>{S.current.setState({type:"resetState"})}),[]),ce((()=>{o.formId===ig.formId&&m&&(e.setSkipSubmitAndGoTaskList(!0),e.setHideOnHomeButton(!0),e.setHideBackButton(!0),e.setSubmitButtonLabel("continue"))}),[e.activeForm]),ce((()=>{I(u,n,r.locale,i)}),[]),D("div",Object.assign({className:"adyen-kyc-payout"},{children:[D(Ks,{owner:"PayoutComponent",stateRef:S}),D(Kd,{owner:"PayoutComponent",onChange:({currentState:t})=>{var a,r,n;p((null===(r=null===(a=t.allData)||void 0===a?void 0:a.payoutVerificationMethod)||void 0===r?void 0:r.payoutVerificationMethod)===Ny.INSTANT_VERIFICATION),(null===(n=t.allData)||void 0===n?void 0:n.payoutVerificationMethod)&&e.evaluateConfiguration(t.allData)}}),c&&D("div",Object.assign({className:o.formId!==y?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(Iy,Object.assign({},_,{ref:v[y],heading:T(s),id:y,country:e.country,accountHolder:e.accountHolder,bankVerificationVendors:e.bankVerificationVendors}))})),m?o.formId===b&&D("div",Object.assign({className:"adyen-kyc-form-wrapper"},{children:D(My,Object.assign({},N,{ref:v[b],heading:r.get("bankAccountVerification"),id:b,country:e.country,onBack:e.onBack,onNext:e.onNext,hideDropinLayout:t=>e.setHideDropinLayout(t),getBankVerificationVendors:d}))})):D("div",Object.assign({className:o.formId!==f?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(_y,Object.assign({},O,{ref:v[f],heading:T(s),id:f,country:e.country,legalEntityResponse:l}))})),!m&&D("div",Object.assign({className:o.formId!==h?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(ty,Object.assign({},E,{ref:v[h],heading:r.get(A?"bankStatementOptional":"bankStatement"),id:h,country:e.country}))}))]}))}),{getComponentForms:e=>Vy(e.currentTask,Fy({country:e.country,bankVerificationVendors:e.bankVerificationVendors,verificationVendorsCallback:e.handleGetBankVerificationVendors})),parseConfiguration:({requiredFields:e,country:t,bankVerificationAvailable:a})=>{const{fields:r,bankStatementRequirement:n}=(null==e?void 0:e.payout)||{};return function({requiredFields:e,country:t,bankStatementRequirement:a,bankVerificationAvailable:r}){if(e){const n={modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"};let i={};return e.forEach((e=>{const t=Up[e.Field.fieldName],a=e.Field.validationRule;t&&(i[t]=a?{rule:r?"manualVerification":"REQUIRED",validators:[Hp(a),n]}:{rule:r?"manualVerification":"REQUIRED",validators:[n]},i[t].masked=Bp.includes(t))})),r&&(i.payoutVerificationMethod={rule:"REQUIRED"},i.verifiedAccountHolder={rule:"instantVerification"},i.verifiedBankCountry={rule:"instantVerification"},i.verifiedBankName={rule:"instantVerification"},i.verifiedCurrencyCode={rule:"instantVerification"},i.verifiedAccountName={rule:"instantVerification"},i.verifiedBankAccountNumber={rule:"instantVerification"},i.bankStatementDocument={rule:"bankStatementRequirement"},i.description={rule:"bankStatementDescription"}),!r&&a&&(i.bankStatementDocument={rule:a},i.description={rule:"OPTIONAL"}),i=tg(Wp[t],i),i}}({requiredFields:r,country:t,bankStatementRequirement:n,bankVerificationAvailable:a})},rules:(e,t,a,r)=>({manualVerification:()=>{var t;if(e.payoutVerificationMethod)return(null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===Ny.MANUAL_VERIFICATION?"REQUIRED":void 0},instantVerification:()=>{var t;return e.payoutVerificationMethod?(null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===Ny.INSTANT_VERIFICATION?"REQUIRED":void 0:"REQUIRED"},verifiedBankAccountNumber:()=>{var t;if((null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===Ny.INSTANT_VERIFICATION)return"REQUIRED"},bankStatementRequirement:()=>{var t,a;if((null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===Ny.MANUAL_VERIFICATION)return null===(a=null==r?void 0:r.payout)||void 0===a?void 0:a.bankStatementRequirement},bankStatementDescription:()=>{var t,a;if((null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===Ny.MANUAL_VERIFICATION&&(null===(a=null==r?void 0:r.payout)||void 0===a?void 0:a.bankStatementRequirement))return"OPTIONAL"}}),getTaskName:e=>e.currentTask===Rl.PAYIN?"payinDetails":"payoutDetails",labels:()=>({verifiedAccountHolder:()=>"accountHolder",verifiedBankCountry:()=>"bankCountry",verifiedBankName:()=>"bankName",verifiedCurrencyCode:()=>"currencyCode",verifiedAccountName:()=>"accountName",verifiedBankAccountNumber:()=>"bankAccountNumber"})});function Hy(e){var t,a,r,n,i,s;const{transferInstrument:l,handleCreateDocument:d,handleGetDocument:c,handleUpdateDocument:u,handleUpdateTransferInstrument:m,handleCreateTransferInstrument:p,legalEntityResponse:g,trackingConig:b,accountHolder:f}=e,{loadingContext:h,clientKey:v}=He(),_=null!==(t=By(g))&&void 0!==t?t:e.country,[N,O]=le(),[I,E]=le(Vy(e.currentTask,Fy({country:_,bankVerificationVendors:null!==(a=e.bankVerificationVendors)&&void 0!==a?a:N,verificationVendorsCallback:e.handleGetBankVerificationVendors}))),[T,A]=le(!1),S=()=>o(this,void 0,void 0,(function*(){const t=yield X({loadingContext:h,clientKey:v,country:_,capabilities:e.capabilities,legalEntityType:e.legalEntityResponse.type});(null==t?void 0:t.bankVerificationProviders)&&(O(t.bankVerificationProviders),E(Vy(e.currentTask,Fy({country:_,bankVerificationVendors:t.bankVerificationProviders,verificationVendorsCallback:e.handleGetBankVerificationVendors}))))}));ue((()=>{e.handleGetBankVerificationVendors&&!e.bankVerificationVendors&&(A(!0),S().catch(console.error).finally((()=>{A(!1)})))}),[e.legalEntityResponse.type]);const{i18n:C,payoutDefaultCurrency:R}=He(),{showToast:k}=gg(),[L,w]=le(e.problems),j=bm(d,c,u),x=(e=>vp(e,hl))(l),M=(null==x?void 0:x.payoutAccountDetails)||{},F=(null===(r=iy[_])||void 0===r?void 0:r.length)?iy[_][0]:null,V=R||F,B=f||Uy(g),q={payoutAccountDetails:Object.assign({accountHolder:B,bankCountry:_,currency:V},M),payoutVerificationMethod:{payoutVerificationMethod:Ny.INSTANT_VERIFICATION},payoutAccountVerification:{verifiedAccountHolder:B,verifiedBankCountry:_}},[G,$]=le(q||e.data),Y=Vp({trackingConig:b,task:e.taskType});ce((()=>{P.addPageView("Payout dropin"),P.addEvent("Started payout task",{segmentation:Object.assign({},Y)})}),[]),ce((()=>{var e;const t=(null===(e=null==l?void 0:l.documentDetails)||void 0===e?void 0:e.map((e=>e.id)))||[];t.length&&j.fetchDocuments(t,null==l?void 0:l.id).then((()=>{const e=(e=>{const t=Nm(e,uc.BANK_STATEMENT)||null;return{bankStatementDocument:t?[{name:Ip(t)}]:null,description:t.description}})(null==l?void 0:l.id);$(Object.assign(Object.assign({},G),{payoutAccountDocuments:e}))})).catch((()=>{k({label:C.get("failedToFetchRelevantDocuments"),type:mg.ERROR})}))}),[]);const K=({forms:e,transferInstrument:t,dataSubmitted:a})=>o(this,void 0,void 0,(function*(){if(Z(e)){const e=yield hp(a,t.id);e&&(yield j.uploadDocuments(e,t.id),e.forEach((e=>{P.addEvent("Saved document",{segmentation:Object.assign(Object.assign({},Y),{documentType:e.type,fileExtention:e.attachments.map((e=>Cm(e.pageName)))})})})))}})),z=({data:t,forms:a,setLoadingStatus:r})=>o(this,void 0,void 0,(function*(){var n;const i={documentType:uc.BANK_STATEMENT,bankCountry:_,bankCurrency:V};P.addEvent("Provided payout details",{segmentation:Object.assign(Object.assign({},Y),i)}),r(Vu.LOADING),t.payoutAccountDetails.bankCountry=_,t.payoutAccountDetails.currency=V,((e,t,a)=>{e.forEach((e=>{t[e]===(null==a?void 0:a[e])&&delete t[e]}))})(Bp,t.payoutAccountDetails,null==x?void 0:x.payoutAccountDetails);let o=up({data:t,legalEntity:g});const s=null===(n=null==x?void 0:x.payoutAccountDetails)||void 0===n?void 0:n.transferInstrumentId;try{o=s?yield m(U("id").from(o),s):yield p(o),P.addEvent("Saved payout details",{segmentation:Object.assign(Object.assign({},Y),i)}),yield K({forms:a,transferInstrument:o,dataSubmitted:t}),r(Vu.SUCCESS),e.onSubmit(t)}catch(t){if((null==t?void 0:t.errorCode)===lt){const a=yg(t,e.currentTask);w(Object.assign(Object.assign({},L),{validationErrors:a}))}else k({label:C.get("failedToUpdateDetails"),type:mg.ERROR});r(Vu.SUCCESS),P.addEvent("Encountered error payout details",{segmentation:Object.assign(Object.assign({},Y),{errorCode:t.errorCode,errorMessage:t.title,errorType:"BE"})})}})),Z=e=>e.some((e=>e.formId===I.payoutAccountDocuments.formId)),Q=e=>o(this,void 0,void 0,(function*(){if(null==l?void 0:l.id){const t=up({data:e,legalEntity:g}),a=yield hp(e,l.id);return!W(t.bankAccount,null==l?void 0:l.bankAccount)||a.length>0}return!0})),J=e=>{const t=e.payoutAccountDetails;return Object.values(t).every(Boolean)},ee=y(C.locale),te=e=>{var t;const a=H(e);return(null===(t=a.payoutAccountDetails)||void 0===t?void 0:t.bankCountry)&&(a.payoutAccountDetails.bankCountry=ee.getCountryName(a.payoutAccountDetails.bankCountry)),(null==e?void 0:e.payoutAccountDocuments)&&(a.payoutAccountDocuments.bankStatementDocument=(e=>{var t,a;return Object.assign({},(null==e?void 0:e.bankStatementDocument)&&{bankStatementDocument:{fileName:null===(a=null===(t=e.bankStatementDocument)||void 0===t?void 0:t[0])||void 0===a?void 0:a.name}})})(null==e?void 0:e.payoutAccountDocuments)),a};return T?D(xg,{}):D(Wy,{baseTrackingPayload:Y,currentTask:e.currentTask,capabilities:e.capabilities,data:G,country:By(g)||e.country,problems:L,eventEmitter:e.eventEmitter,accountHolder:null!==(n=e.accountHolder)&&void 0!==n?n:Uy(e.legalEntityResponse),hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,legalEntityType:g.type,legalEntityResponse:g,summary:{formatData:te,getOmittedKeys:()=>["transferInstrumentId"],omittedForms:[null===(i=null==I?void 0:I.payoutVerificationMethod)||void 0===i?void 0:i.formId]},hasDataChanged:Q,canSubmit:J,onSubmit:z,handleBackClick:e.handleBackClick,handleCreateTransferInstrument:e.handleCreateTransferInstrument,handleUpdateTransferInstrument:e.handleUpdateTransferInstrument,handleGetBankVerificationVendors:e.handleGetBankVerificationVendors,bankVerificationVendors:null!==(s=e.bankVerificationVendors)&&void 0!==s?s:N,navigateBackToTaskList:e.navigateBackToTaskList})}var qy;!function(e){e.CASH_MANAGEMENT_TRUST="cashManagementTrust",e.CORPORATE_UNIT_TRUST="corporateUnitTrust",e.DECEASED_ESTATE="deceasedEstate",e.DISCRETIONARY_INVESTMENT_TRUST="discretionaryInvestmentTrust",e.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST="discretionaryServicesManagementTrust",e.DISCRETIONARY_TRADING_TRUST="discretionaryTradingTrust",e.FIRST_HOME_SAVER_ACCOUNTS_TRUST="firstHomeSaverAccountsTrust",e.FIXED_TRUST="fixedTrust",e.FIXED_UNIT_TRUST="fixedUnitTrust",e.HYBRID_TRUST="hybridTrust",e.LISTED_PUBLIC_UNIT_TRUST="listedPublicUnitTrust",e.OTHER_TRUST="otherTrust",e.POOLED_SUPERANNUATION_TRUST="pooledSuperannuationTrust",e.PUBLIC_TRADING_TRUST="publicTradingTrust",e.UNLISTED_PUBLIC_UNIT_TRUST="unlistedPublicUnitTrust"}(qy||(qy={}));const Gy=[{id:qy.CASH_MANAGEMENT_TRUST,name:"cashManagementTrust"},{id:qy.CORPORATE_UNIT_TRUST,name:"corporateUnitTrust"},{id:qy.DECEASED_ESTATE,name:"deceasedEstate"},{id:qy.DISCRETIONARY_INVESTMENT_TRUST,name:"discretionaryInvestmentTrust"},{id:qy.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST,name:"discretionaryServicesManagementTrust"},{id:qy.DISCRETIONARY_TRADING_TRUST,name:"discretionaryTradingTrust"},{id:qy.FIRST_HOME_SAVER_ACCOUNTS_TRUST,name:"firstHomeSaverAccountsTrust"},{id:qy.FIXED_TRUST,name:"fixedTrust"},{id:qy.FIXED_UNIT_TRUST,name:"fixedUnitTrust"},{id:qy.HYBRID_TRUST,name:"hybridTrust"},{id:qy.LISTED_PUBLIC_UNIT_TRUST,name:"listedPublicUnitTrust"},{id:qy.OTHER_TRUST,name:"otherTrust"},{id:qy.POOLED_SUPERANNUATION_TRUST,name:"pooledSuperannuationTrust"},{id:qy.PUBLIC_TRADING_TRUST,name:"publicTradingTrust"},{id:qy.UNLISTED_PUBLIC_UNIT_TRUST,name:"unlistedPublicUnitTrust"}],$y={trustType:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},country:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},legalName:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},Xy=["legalName","country","trustType","vatNumber"],Yy=["AU"];function Ky(e){var a;const{i18n:r,commonProps:n}=He(),i=e.id,o=me({setState:null}),s=me(null),l=e.requiredFields||Xy,d=l.filter((e=>["trustType","legalName","country"].includes(e))),{handleChangeFor:c,data:u,valid:m,errors:p,setData:g,triggerValidation:y,fieldProblems:b}=ma(Object.assign(Object.assign({},e),{schema:d,defaultData:e.data,rules:e.validators||$y,fieldProblems:null==e?void 0:e.fieldValidationErrors})),f=na(e,r);this.triggerValidation=()=>{y(d),f.isRequiredField("vatNumber")&&s.current.triggerValidation()},ce((()=>{o.current.setState({type:"addToState",value:{data:u,valid:m,errors:p,fieldProblems:b,caller:i,dataStoreId:i,schema:l}})}),[u,m,p]);const h=kl(e,kd);return ce((()=>{1!==Yy.length||u.country||(g("country",Yy[0]),y(["country"]))}),[null===(a=e.data)||void 0===a?void 0:a.country]),D(t.Fragment,{children:[D(Ks,{owner:i,stateRef:o}),D("form",Object.assign({className:"adyen-kyc-trust__registration-details","aria-describedby":n.showInlineErrors?null:"ariaErrorField"},{children:[D(Fs,{heading:e.heading}),D(Gc,{verificationErrors:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:f,id:"ariaErrorField"}),f.isRequiredField("country")&&D(ra,{label:f.getLabel("country","countryOfEstablishment"),allowedCountries:Yy,classNameModifiers:["country"],errorMessage:f.getErrorMessage("country",p,b),onDropdownChange:c("country"),value:u.country,readOnly:!0}),f.isRequiredField("legalName")&&D(Be,Object.assign({name:"legalName",label:f.getLabel("legalName","nameOfTrustAgreement"),classNameModifiers:["legalName"],errorMessage:f.getErrorMessage("legalName",p,b),isValid:m.legalName,showInlineErrors:n.showInlineErrors},{children:ea("text",{name:"legalName",value:u.legalName,readonly:f.isReadOnly("legalName"),classNameModifiers:["legalName"],onInput:c("legalName","input"),onBlur:c("legalName","blur"),"aria-required":!0,"aria-label":f.getLabel("legalName"),"aria-invalid":!m.legalName})})),f.isRequiredField("trustType")&&D(Be,Object.assign({name:"trustType",label:f.getLabel("trustType","typeOfTrustAgreement"),classNameModifiers:["trust-type"],errorMessage:f.getErrorMessage("trustType",p,b),isValid:m.trustType},{children:ea("select",{name:"trustType",onChange:c("trustType","blur"),selected:u.trustType,items:Gy.map((({id:e,name:t})=>({id:e,name:r.get(t)})))})})),f.isRequiredField("vatNumber")&&D(Ld,Object.assign({},h,{ref:s,dataStoreId:i,country:e.country}))]}))]})}const zy=["trustDocument"];const Zy=bt((function(e){const{i18n:t,commonProps:a}=He(),r=me(null),[n,i]=le({}),{data:o,valid:s,fieldProblems:l,errors:d}=ma(Object.assign(Object.assign({},e),{defaultData:e.data,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),c=na(e,t),u=me({setState:null});return this.triggerValidation=()=>{c.isRequiredField("trustDocument")&&r.current.triggerValidation()},ce((()=>{e.data.trustDocument&&i({trustDocument:e.data.trustDocument})}),[e.data]),ce((()=>{u.current.setState({type:"addToState",value:{data:o,valid:s,errors:d,fieldProblems:l,caller:e.id,dataStoreId:e.id,schema:zy}})}),[o,s,d,l]),D("form",Object.assign({className:"adyen-kyc-trust__trust-document","aria-describedby":a.showInlineErrors?null:"ariaErrorField"},{children:[D(Ks,{owner:e.id,stateRef:u}),D(Fs,{heading:null==e?void 0:e.heading,description:null==e?void 0:e.description}),D(Gc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:c,id:"ariaErrorField"}),c.isVisibleField("trustDocument")&&D(Be,Object.assign({className:"adyen-kyc-field--trustDocument adyen-kyc-upload-field",name:"trustDocument",isValid:s.trustDocument},{children:[D("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",t.get("trustDocumentDescription")]})),D(_c,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[D(vc,{children:t.get("nameOfTrust")}),D(vc,{children:t.get("fullLegalNamesOfAnyAppointers")}),D(vc,{children:t.get("dateDeedWasSigned")}),D(vc,{children:t.get("settlerDetailsIncl")}),D(vc,{children:t.get("trusteeDetailsIncl")}),D(vc,{children:t.get("beneficiariesDetailsIncl")})]})),D(fc,{name:"trustDocument",ref:r,id:e.id,defaultData:n,isOptional:c.isOptionalField("trustDocument")})]}))]}))}),((e,t)=>W(e.requiredFields,t.requiredFields)&&W(e.optionalFields,t.optionalFields)&&W(e.data,t.data)&&W(e.formVerificationErrors,t.formVerificationErrors)&&W(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name));var Qy=Zy;const Jy={trustRegistrationDetails:{formId:"trustRegistrationDetails",formName:"registrationDetails",fields:[...Xy]},trustRegistrationAddress:{formId:"trustRegistrationAddress",formName:"registeredAddress",fields:[...pd]},trustDocument:{formId:"trustDocument",formName:"trustDocument",fields:[...zy]}},eb=Jy.trustRegistrationAddress.formId,tb=Jy.trustRegistrationDetails.formId,ab=Jy.trustDocument.formId;const rb=ug((function(e){const{i18n:t}=He(),a={[tb]:me(null),[eb]:me(null),[ab]:me(null)};this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==a?void 0:a[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()};const r=Dl(e,tb),n=Dl(e,eb),i=Dl(e,ab),o=()=>{};return D("div",Object.assign({className:"adyen-kyc-trust"},{children:(s=e.activeForm,D("div",Object.assign({className:"adyen-kyc-trust"},{children:[D(Kd,{owner:"TrustComponent",onChange:o}),D("div",Object.assign({className:s.formId!==tb?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(Ky,Object.assign({},r,{ref:a[tb],heading:t.get("registrationDetails"),id:tb,country:e.country}))})),D("div",Object.assign({className:s.formId!==eb?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(bd,Object.assign({},n,{ref:a[eb],heading:t.get("registeredAddress"),description:t.get("registeredAddressTrustHeaderDescription"),id:eb,country:e.country,problems:null==e?void 0:e.problems,labels:{operationalAddressIsSame:"isTrustOperationAddressSame"}}))})),D("div",Object.assign({className:s.formId!==ab?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(Qy,Object.assign({},i,{ref:a[ab],heading:t.get("trustDocument"),id:ab}))}))]})))}));var s}),{getComponentForms:()=>Jy,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){if(e){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),zp[t])),{});return a=tg(Zp[t],a),a}}(null==e?void 0:e[ol.TRUST],t),getTaskName:()=>"trustDetails"});function nb(e){const{parentLegalEntity:t,legalEntityResponse:a}=e,{i18n:r}=He(),n=(e=>{var t;let a;return(null==e?void 0:e.trust)&&(a=vp(e,Il),(null===(t=e.trust)||void 0===t?void 0:t.principalPlaceOfBusiness)?a.trustRegistrationAddress.operationalAddressIsSame=nd.OPERATIONAL_ADDRESS_IS_NOT_SAME:(a.trustRegistrationAddress||(a.trustRegistrationAddress={}),a.trustRegistrationAddress.operationalAddressIsSame=nd.OPERATIONAL_ADDRESS_IS_SAME)),a})(a),[i]=le(n||e.data),[s,l]=le(e.problems),d=y(r.locale),[c,u]=le(null),{showToast:m}=gg();return D(rb,{capabilities:e.capabilities,data:i,country:"AU",problems:s,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,onSubmit:({data:n,setLoadingStatus:i})=>o(this,void 0,void 0,(function*(){i(Vu.LOADING);let o=(e=>{const t=Object.assign({},vp(e,El));return t.trust.vatAbsenceReason&&(t.trust.vatNumber=""),t.type=ol.TRUST,t})(n);try{if((null==a?void 0:a.id)||(null==c?void 0:c.id)?o=yield e.handleUpdateLegalEntity(U("type").from(o),(null==a?void 0:a.id)||(null==c?void 0:c.id)):(o=yield e.handleCreateLegalEntity(o),u(o)),!(null==a?void 0:a.id)){const a=Object.assign(Object.assign({},t),{entityAssociations:[{type:ol.TRUST,legalEntityId:o.id},...t.entityAssociations||[]]});yield e.handleUpdateLegalEntity(U(["id","type","documents","transferInstruments","capabilities"]).from(a),a.id)}i(Vu.SUCCESS),m({label:r.get("successfullyUpdatedDetails"),type:mg.SUCCESS}),null==e||e.onSubmit(n)}catch(e){if(m({label:r.get("failedToUpdateDetails"),type:mg.ERROR}),(null==e?void 0:e.errorCode)===lt){const t=yg(e,Rl.TRUST);l(Object.assign(Object.assign({},s),{validationErrors:t}))}i(Vu.SUCCESS)}})),legalEntityType:ol.TRUST,summary:{formatData:e=>{var t,a,n,i,o;const s=H(e);let l,c;if((null===(t=null==s?void 0:s.trustRegistrationDetails)||void 0===t?void 0:t.country)&&(l=d.getCountryName(s.trustRegistrationDetails.country)),null===(a=null==s?void 0:s.trustRegistrationDetails)||void 0===a?void 0:a.trustType){const e=null===(n=Gy.find((e=>{var t;return e.id===(null===(t=s.trustRegistrationDetails)||void 0===t?void 0:t.trustType)})))||void 0===n?void 0:n.name;c=r.get(e)}const u={nameOfTrustAgreement:e.trustRegistrationDetails.legalName,countryOfEstablishment:l,typeOfTrustAgreement:c,vatNumber:e.trustRegistrationDetails.vatNumber};return s.trustRegistrationDetails=u,(null===(i=null==s?void 0:s.trustRegistrationAddress)||void 0===i?void 0:i.registrationAddress)&&(s.trustRegistrationAddress.hasInnerForms=!0,s.trustRegistrationAddress.registrationAddress=je(null==s?void 0:s.trustRegistrationAddress.registrationAddress,d)),(null===(o=null==s?void 0:s.trustRegistrationAddress)||void 0===o?void 0:o.operationalAddress)&&(s.trustRegistrationAddress.operationalAddress=je(null==s?void 0:s.trustRegistrationAddress.operationalAddress,d)),s},getOmittedKeys:()=>["operationalAddressIsSame"]},hasDataChanged:e=>o(this,void 0,void 0,(function*(){return!1})),canSubmit:e=>!1})}const ib=({parentLegalEntity:e,trustResponse:r,capabilityProblems:n,navigateBackToTaskList:i,onAddTrustMember:s,onAddTrustMemberOwner:l,handleUpdateLegalEntity:d,onTrustMemberDelete:c})=>{const{i18n:u}=He(),{showToast:m}=gg(),p=Pm(r),g=Uy(e),y=null==p?void 0:p.reduce(((e,t)=>{const a=e[t.legalEntityId],i=t.type;return e[t.legalEntityId]={legalEntityId:t.legalEntityId,types:a?[...a.types,i]:[i],status:Qm($g.LEGAL_ENTITY,n,r,[t.legalEntityId]),name:t.name,legalEntityType:t.entityType},e}),{}),b=y?Object.values(y):[],f=(e,t)=>{l(e,t,Rl.TRUST_MEMBER_COMPANY_OWNER)},h=(e,t)=>{var a;const r=t.entityAssociations;if(r)return null===(a=r.find((t=>t.associatorId===e&&t.type===Rm.UBO_THROUGH_OWNERSHIP)))||void 0===a?void 0:a.legalEntityId},v=e=>{const a=h(e.legalEntityId,r),n=D(t.Fragment,{children:[u.get("helpUsVerifyCompany")," ",D(tl,Object.assign({onClick:t=>{t.preventDefault(),f("",e.legalEntityId)},href:"to-company-owner"},{children:u.get("providePersonalDetailsOfOwner")}))]});if(e.legalEntityType===ol.ORGANIZATION&&!a)return D(Zs,{type:zs.BASIC,hasCloseButton:!1,title:n,className:"adl-u-margin-top-16"})},_=e=>{const a=h(e.legalEntityId,r);return D(t.Fragment,{children:[D($c,{className:"adl-entity-association__edit",ghost:!0,icon:"edit",onClick:()=>(e=>s(e))(e),label:u.get("editEntityDetails"),title:u.get("editTrustMember",{values:{trustMember:e.name}})}),e.legalEntityType===ol.ORGANIZATION&&[D($c,a?{className:"adl-entity-association__edit",ghost:!0,icon:"edit",onClick:()=>f(a,e.legalEntityId),label:u.get("editEntityOwner"),title:u.get("editOwnerOfTrustMember",{values:{trustMember:e.name}})}:{className:"adl-entity-association__edit",ghost:!0,icon:"plus",onClick:()=>f("",e.legalEntityId),label:u.get("addEntityOwner"),title:u.get("addOwnerToTrustMember",{values:{trustMember:e.name}})})],D($c,{className:"adl-entity-association__delete",ghost:!0,icon:"bin",onClick:()=>{return t=e.legalEntityId,o(void 0,void 0,void 0,(function*(){try{const e={entityAssociations:Xm(r).filter((e=>e.legalEntityId!==t))};yield d(e,r.id),c(),m({type:mg.SUCCESS,label:u.get("successFullyRemovedTrustMember")})}catch(e){m({type:mg.ERROR,label:u.get("failedToRemoveTrustMember")})}}));var t},label:u.get("remove"),title:u.get("removeTrustMember",{values:{trustMember:e.name}})})]})},N=D(t.Fragment,{});return D(sg,{content:D(t.Fragment,{children:D("div",Object.assign({className:"adl-trust-members adl-u-width-full"},{children:[D(Fs,{heading:u.get("trustMembers"),description:u.get("trustMembersDescription")}),D(ng,{}),D("div",Object.assign({className:"adl-trust-members__wrapper"},{children:[D(Kg,{types:[Rm.SECONDARY_TRUSTEE],legalEntityId:e.id,status:Qm($g.LEGAL_ENTITY,n,e,[e.id]),name:g,legalEntityType:e.type},e.id),b.map((e=>D(Kg,{types:e.types,legalEntityId:e.legalEntityId,status:e.status,name:e.name,legalEntityType:e.legalEntityType,actions:_(e),reviewActions:N,infoContent:v(e)},e.legalEntityId)))]})),D($c,{secondary:!0,className:a("adl-trust-members__add",{"adl-trust-members__add--more":(null==b?void 0:b.length)>0}),icon:"plus",onClick:e=>{e.stopPropagation(),s()},label:u.get("addTrustMember")}),D(rg,{onHome:i,homeButtonLabel:u.get("saveAndGoToOverview")})]}))})})},ob=[{id:ol.INDIVIDUAL,name:"naturalPersonTitle",description:"naturalPersonDescription"},{id:ol.ORGANIZATION,name:"businessEntityTitle",description:"businessEntityDescription"}],sb={entityType:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},role:{modes:["blur"],validate:e=>!!(null==e?void 0:e.length),errorMessage:"fieldIsRequired"}};function lb(e){const{trustMember:t}=e,{i18n:a,commonProps:r}=He(),n={entityType:null==t?void 0:t.legalEntityType,role:null==t?void 0:t.types},i=e.requiredFields||["role","entityType"],{data:o,valid:s,errors:l,fieldProblems:d,handleChangeFor:c,isValid:u,triggerValidation:m}=ma(Object.assign(Object.assign({},e),{schema:i,rules:sb,defaultData:n,fieldProblems:null==e?void 0:e.fieldValidationErrors})),p=Object.values(Rm),g=p.filter((e=>e!==Rm.UBO_THROUGH_OWNERSHIP)),y=na(e,a),[b,f]=le([]);return ce((()=>{o.entityType===ol.INDIVIDUAL?f(Um(a,p)):o.entityType===ol.ORGANIZATION&&f(Um(a,g)),e.onChange({data:o,errors:l,valid:s})}),[o,u,a.languageCode,a.locale]),this.isValid=u,this.triggerValidation=m,D("form",Object.assign({className:"adyen-kyc-trust__role-and-entity-type adl-u-width-full"},{children:[D(Fs,{heading:a.get("roleAndEntityType")}),D(Gc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:y,id:"ariaErrorField"}),y.isRequiredField("entityType")&&D(Be,Object.assign({name:"entityType",useLabelElement:!1,errorMessage:y.getErrorMessage("entityType",l,d),label:y.getLabel("entityType","whatTypeOfYourMembersEntity"),classNameModifiers:["entityType"],disabled:!!(null==t?void 0:t.legalEntityId)},{children:ea("radioCard",{name:"entityType",items:ob,value:o.entityType,i18n:a,readonly:y.isReadOnly("entityType"),onInput:c("entityType"),onChange:c("entityType"),"aria-required":!0,"aria-label":y.getLabel("entityType","whatTypeOfYourMembersEntity"),"aria-invalid":!s.entityType})})),D(Be,Object.assign({name:"role",classNameModifiers:["role"],label:a.get("role"),errorMessage:y.getErrorMessage("role",l,d),isValid:s.role,disabled:!b.length},{children:ea("select",{onChange:c("role","input"),name:"role",placeholder:a.get("rolePlaceholder"),selected:o.role,items:b,readonly:e.readOnly&&!!o.role,showInlineErrors:r.showInlineErrors,filterable:!1,isMulti:!0})}))]}))}const db={roleAndEntityType:{formId:"roleAndEntityType",formName:"roleAndEntityType"},memberDetails:{formId:"memberDetails",formName:"memberDetails"},summary:{formId:"summary",formName:"summary"}},cb=db.roleAndEntityType.formId;function ub(e){const{i18n:a}=He(),[r,n]=le(e.trustMember),i=me(null),s={[cb]:i},l=(e=[],t=[])=>e.length!==t.length||!e.every((e=>t.includes(e))),d=D(dg,{forms:Object.values(db).map((e=>{var t,a,r;return{formId:e.formId,formName:e.formName,isValid:null!==(r=null===(a=null===(t=s[e.formId])||void 0===t?void 0:t.current)||void 0===a?void 0:a.isValid)&&void 0!==r&&r}})),activeForm:db.roleAndEntityType,taskName:"trustMembers"}),c=D(rg,{onNext:()=>{if(i.current.triggerValidation(),!i.current.isValid)return;const t=Object.assign(Object.assign({},e.trustMember),{legalEntityType:r.legalEntityType,types:r.types});e.navigateNext(t)},onHome:()=>o(this,void 0,void 0,(function*(){if(r.legalEntityId&&l(r.types,e.trustMember.types)){const t=Xm(e.trust),a={entityAssociations:[...r.types.map((e=>({type:e,legalEntityId:r.legalEntityId})))||[],...t.filter((e=>e.legalEntityId!==r.legalEntityId))||[]]};yield e.handleUpdateLegalEntity(a,e.trust.id)}e.navigateBack()})),nextButtonLabel:a.get("next"),homeButtonLabel:a.get("saveAndGoToOverview")}),u=D(t.Fragment,{children:[d,D("div",Object.assign({className:"adyen-kyc-form-container"},{children:[D(lb,{ref:i,trustMember:e.trustMember,onChange:({data:t})=>{n(Object.assign(Object.assign({},e.trustMember),{legalEntityType:t.entityType,types:t.role}))}}),c]}))]});return D(sg,{content:u})}var mb,pb;function gb({content:e,styles:t}){const r=a({"adl-u-font-weight-semi-bold":null==t?void 0:t.includes(pb.Bold),"adyen-kyc-italic":null==t?void 0:t.includes(pb.Italic)});return D("span",Object.assign({className:r},{children:e}))}function yb({title:e,contentElements:t}){return D("section",Object.assign({className:"adl-u-margin-bottom-48"},{children:[D(Vg,Object.assign({level:2,className:"adl-u-margin-top-24 adl-u-margin-bottom-16"},{children:D(gb,{content:e.content,styles:e.styles})})),D(Ob,{contentElements:t,isTopLevel:!0})]}))}function bb({title:e,label:t,isTopLevel:a,contentElements:r}){return a?D(ud,Object.assign({title:e.content},{children:D("section",Object.assign({className:"adyen-kyc-section-box",id:t},{children:D(Ob,{contentElements:r})}))})):D("section",Object.assign({id:t},{children:[D(Vg,Object.assign({level:2,className:"adl-u-margin-top-24 adl-u-margin-bottom-16"},{children:D(gb,{content:e.content,styles:e.styles})})),D(Ob,{contentElements:r})]}))}function fb({isTopLevel:e,contentElements:t}){const r=a("adyen-kyc-paragraph",{"adl-u-margin-bottom-16":e});return D("p",Object.assign({className:r},{children:D(Ob,{contentElements:t})}))}!function(e){e.Chapter="chapter",e.Section="section",e.Paragraph="paragraph",e.Text="text",e.Weblink="weblink",e.List="list",e.Table="table",e.InternalReference="internalReference"}(mb||(mb={})),function(e){e.Bold="BOLD",e.Italic="ITALIC"}(pb||(pb={}));const hb=({url:e,displayText:t})=>D(tl,Object.assign({href:e},{children:t?D(gb,Object.assign({},t)):e}));function vb({items:e,style:t}){return D(_c,Object.assign({ordered:t.ordered},{children:e.map(((e,t)=>D(vc,{children:[D(Ob,{contentElements:e.content}),e.subList&&D(vb,{style:e.subList.style,items:e.subList.items})]},t)))}))}function _b({rows:e,label:t,captions:a,titlePrefix:r,title:n}){return D("div",Object.assign({id:t},{children:[D("div",Object.assign({className:"adl-u-margin-y-8 adl-u-text-align-center"},{children:[r&&D(gb,Object.assign({},r)),n&&D(gb,Object.assign({},n))]})),D("table",Object.assign({className:"adl-table adl-table--condensed"},{children:[a&&D("caption",{children:D(Ob,{contentElements:a})}),D("tbody",Object.assign({className:"adl-table__body"},{children:e.map(((e,t)=>D("tr",Object.assign({className:"adl-table__row"},{children:e.map(((e,t)=>D("td",Object.assign({className:"adl-table__cell"},{children:D(Ob,{contentElements:e.elements})}),t)))}),t)))}))]}))]}))}function Nb({referencedLabel:e,displayText:t}){const a=t?t.content:e;return D($c,{onClick:()=>{const t=ot(document.getElementById(e)),a=-1!==t&&t.querySelector("#"+e);null==a||a.scrollIntoView({behavior:"smooth"})},showAsLink:!0,label:a})}function Ob({contentElements:e,isTopLevel:t=!1,onExpandSection:a}){const r={chapter:yb,section:bb,paragraph:fb,text:gb,weblink:hb,list:vb,table:_b,internalReference:Nb,breakline:"br"},n=e.map((e=>D(r[e.type],Object.assign({},(e=>{switch(e.type){case mb.Chapter:return{title:e.title,contentElements:e.contentElements};case mb.Section:return{isTopLevel:t,title:e.title,label:e.label,contentElements:e.contentElements};case mb.Paragraph:return{isTopLevel:t,contentElements:e.contentElements};case mb.Text:return{content:e.content,styles:e.styles};case mb.Weblink:return{url:e.url,displayText:e.displayText};case mb.List:return{items:e.items,style:e.style};case mb.Table:return{rows:e.rows,label:e.label,captions:e.captions,titlePrefix:e.titlePrefix,title:e.title};case mb.InternalReference:return{referencedLabel:e.referencedLabel,displayText:e.displayText};default:return null}})(e)),`key-${e.type}-${Ue()}`)));return t?D(ld,Object.assign({onExpandSection:a},{children:n})):D("span",{children:n})}function Ib({contract:e,className:t,onExpandSection:r}){const n=a("adyen-contract-viewer",t);return D("main",Object.assign({className:n},{children:[D(Vg,Object.assign({level:1,className:"adl-u-margin-top-24 adl-u-margin-bottom-16"},{children:D(gb,{content:e.title.content,styles:e.title.styles})})),D(Ob,{contentElements:e.contentElements,onExpandSection:r,isTopLevel:!0})]}))}const Eb=["signer","acceptPci"];function Tb({legalEntity:e,pciTemplateResponse:a,handleHomeClick:r,handleLanguageChange:n,handleSign:i,taskType:s,trackingConig:l}){var d,c,u,m,p;const{i18n:g}=He(),{showToast:y}=gg(),b=Vp({trackingConig:l,legalEntity:e,task:s}),[f,h]=le(null),{handleChangeFor:v,triggerValidation:_,data:N,valid:O,isValid:I,errors:E}=ma({schema:Eb,rules:{signer:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},acceptPci:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}}}),T=a.pciTemplateReferences,A=JSON.parse(decodeURIComponent(escape(window.atob(a.content)))),S=[...new Map(null===(d=null==e?void 0:e.entityAssociations)||void 0===d?void 0:d.map((e=>[e.legalEntityId,e]))).values()],C=e.type===ol.ORGANIZATION?S.map((({legalEntityId:e,name:t})=>({id:e,name:t}))):[{id:null==e?void 0:e.id,name:`${null===(c=null==e?void 0:e.individual)||void 0===c?void 0:c.name.firstName} ${null===(u=null==e?void 0:e.individual)||void 0===u?void 0:u.name.lastName}`}],R=()=>{P.addEvent("Returned to task overview from PCI",{segmentation:Object.assign({},b)}),r()};ce((()=>{n()}),[g.locale]),ce((()=>{P.addPageView("PCI dropin"),P.addEvent("Started PCI task",{segmentation:Object.assign({},b)})}),[]);const k=D(t.Fragment,{children:[D("span",{children:g.get("byClickingSignIAcknowledgeAndAgree")}),D("ul",{children:[D("li",{children:g.get("acknowledgePciRequirements")}),D("li",{children:g.get("basedOnTheAboveSignatory")})]})]}),L=D(Uu,Object.assign({status:f,formOpacityWhenLoading:.3,showSpinner:!1},{children:[D(Ib,{contract:A,onExpandSection:e=>{P.addEvent("Expanded PCI section",{segmentation:Object.assign(Object.assign({},b),{statementExtended:e})})}}),D(Be,Object.assign({name:"signer",label:g.get("signer"),classNameModifiers:["col-50"],className:"adl-u-margin-y-32",errorMessage:g.get(null===(m=E.signer)||void 0===m?void 0:m.errorMessage),isValid:O.signer},{children:ea("select",{onChange:v("signer","blur"),name:"signer",placeholder:g.get("selectSigner"),selected:N.signer,items:C})})),D(Be,Object.assign({name:"acceptPci",errorMessage:g.get(null===(p=E.acceptPci)||void 0===p?void 0:p.errorMessage),isValid:O.acceptPci},{children:D(rt,{label:k,checked:N.acceptPci,name:"acceptPci",onChange:v("acceptPci")})}))]})),w=D(rg,{onHome:R,homeButtonLabel:g.get("goToOverview"),onNext:()=>o(this,void 0,void 0,(function*(){if(P.addEvent("Clicked PCI signing",{segmentation:Object.assign({},b)}),_(),I)try{h(Vu.LOADING),yield i(e.id,{signedBy:N.signer,pciTemplateReferences:T}),h(Vu.SUCCESS),y({label:g.get("pciSignedSuccessfully"),type:mg.SUCCESS}),P.addEvent("Succeeded PCI signing",{segmentation:Object.assign({},b)}),R()}catch(e){h(Vu.SUCCESS),y({label:g.get("pciSignFailed"),type:mg.ERROR}),P.addEvent("Failed PCI signing",{segmentation:Object.assign({},b)})}else P.addEvent("Encountered PCI validation error",{segmentation:Object.assign(Object.assign({},b),{fields:Object.entries(O).filter((([,e])=>!e)).map((([e])=>e))})})})),nextButtonLabel:g.get("sign")});return D(sg,{content:L,footer:w})}const Ab=["signer","acceptServiceAgreement"];function Sb({legalEntity:e,serviceAgreement:t,handleHomeClick:a,handleLanguageChange:r,handleSign:n,taskType:i,trackingConig:s}){var l,d,c,u;const{i18n:m}=He(),{showToast:p}=gg(),g=Vp({trackingConig:s,legalEntity:e,task:i}),[y,b]=le(null),{handleChangeFor:f,triggerValidation:h,data:v,valid:_,isValid:N,errors:O}=ma({schema:Ab,rules:{signer:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},acceptServiceAgreement:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}}}),I=JSON.parse(decodeURIComponent(escape(window.atob(t.document)))),E=e.type===ol.ORGANIZATION?vu(e).map((({legalEntityId:e,name:t})=>({id:e,name:t}))):[{id:null==e?void 0:e.id,name:`${null===(l=null==e?void 0:e.individual)||void 0===l?void 0:l.name.firstName} ${null===(d=null==e?void 0:e.individual)||void 0===d?void 0:d.name.lastName}`}],T=()=>{P.addEvent("Returned to task overview from ToS",{segmentation:Object.assign({},g)}),a()};ce((()=>{r(t.type)}),[m.locale]),ce((()=>{P.addPageView("ToS dropin"),P.addEvent("Started ToS task",{segmentation:Object.assign({},g)})}),[]);const A=D(Uu,Object.assign({status:y,formOpacityWhenLoading:.3,showSpinner:!1},{children:[D(Ib,{contract:I,onExpandSection:e=>{P.addEvent("Expanded ToS section",{segmentation:Object.assign(Object.assign({},g),{statementExtended:e})})}}),D(Be,Object.assign({name:"signer",label:m.get("signer"),classNameModifiers:["col-50"],className:"adl-u-margin-y-32",errorMessage:m.get(null===(c=O.signer)||void 0===c?void 0:c.errorMessage),isValid:_.signer},{children:ea("select",{onChange:f("signer","blur"),name:"signer",placeholder:m.get("selectSigner"),selected:v.signer,items:E})})),D(Be,Object.assign({name:"acceptServiceAgreement",errorMessage:m.get(null===(u=O.acceptServiceAgreement)||void 0===u?void 0:u.errorMessage),isValid:_.acceptServiceAgreement},{children:D(rt,{label:m.get("iHaveReadAndIAcceptTheseTerms"),checked:v.acceptServiceAgreement,name:"acceptServiceAgreement",onChange:f("acceptServiceAgreement")})}))]})),S=D(rg,{onHome:T,homeButtonLabel:m.get("goToOverview"),onNext:()=>o(this,void 0,void 0,(function*(){if(P.addEvent("Clicked ToS signing",{segmentation:Object.assign({},g)}),h(),N)try{b(Vu.LOADING),yield n(e.id,t.termsOfServiceDocumentId,{acceptedBy:v.signer}),b(Vu.SUCCESS),p({label:m.get("serviceAgreementSignedSuccessfully"),type:mg.SUCCESS}),P.addEvent("Succeeded ToS signing",{segmentation:Object.assign({},g)}),T()}catch(e){b(Vu.SUCCESS),p({label:m.get("serviceAgreementSignFailed"),type:mg.ERROR}),P.addEvent("Failed ToS signing",{segmentation:Object.assign({},g)})}else P.addEvent("Encountered ToS validation error",{segmentation:Object.assign(Object.assign({},g),{fields:Object.entries(_).filter((([,e])=>!e)).map((([e])=>e))})})})),nextButtonLabel:m.get("sign")});return D(sg,{content:A,footer:S})}const Cb=(e,t)=>o(void 0,void 0,void 0,(function*(){Db(Rb(e),t)})),Rb=(e,t="application/octet-stream")=>{const a=window.atob(e),r=a.length,n=new Array(r);for(let e=0;e<r;e+=1)n[e]=a.charCodeAt(e);return new Blob([new Uint8Array(n)],{type:t})},Db=(e,t)=>{if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(e,t);else{const a=window.URL.createObjectURL(e),r=document.createElement("a");r.style.display="none",r.href=a,r.setAttribute("download",t),void 0===r.download&&r.setAttribute("target","_blank"),document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(a)}},kb=ug((function(e){const{i18n:a}=He(),r={[wc]:me(null),[Pc]:me(null),[jc]:me(null),[xc]:me(null)},[n,i]=le(null);this.isCurrentFormValid=()=>{var t;return null===(t=null==r?void 0:r[e.activeForm.formId])||void 0===t?void 0:t.current.isValid},this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==r?void 0:r[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()};const o=Dl(e,wc),s=Dl(e,jc),l=Dl(e,Pc),d=Dl(e,xc),c=({currentState:t,prevState:a})=>{var r,n,o,l,d,c,u;const m=null===(n=null===(r=a.data)||void 0===r?void 0:r[wc])||void 0===n?void 0:n.companyCountry,p=null===(l=null===(o=t.data)||void 0===o?void 0:o[wc])||void 0===l?void 0:l.companyCountry;null!=p&&p!==m&&e.onCountryChange(p);const g=null===(c=null===(d=t.data)||void 0===d?void 0:d[wc])||void 0===c?void 0:c.legalCompanyName;i((null===(u=null==s?void 0:s.data)||void 0===u?void 0:u.tradingName)||g)};return D("div",Object.assign({className:"adyen-kyc-sol-prop"},{children:(u=e.activeForm,D(t.Fragment,{children:[D(Kd,{owner:"SolePropComponent",onChange:c}),D("div",Object.assign({className:u.formId!==wc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(oc,Object.assign({},o,{data:Object.assign(Object.assign({},o.data),{companyCountry:e.country}),labels:{companyCountry:"countryOfEstablishment",legalCompanyName:"legalNameOfSoleProprietor"},ref:r[wc],heading:a.get("nameAndCountry"),id:wc}))})),D("div",Object.assign({className:u.formId!==jc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(Qd,Object.assign({},s,{data:Object.assign(Object.assign({},s.data),{tradingName:n}),ref:r[jc],heading:a.get("registrationDetails"),id:jc,country:e.country}))})),D("div",Object.assign({className:u.formId!==Pc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(bd,Object.assign({},l,{ref:r[Pc],heading:a.get("registeredAddress"),id:Pc,country:e.country,problems:null==e?void 0:e.problems}))})),D("div",Object.assign({className:u.formId!==xc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:D(kc,Object.assign({},d,{ref:r[xc],id:xc,legalEntityType:ol.SOLE_PROPRIETORSHIP}))}))]}))}));var u}),{getComponentForms:()=>Lc,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){if(e){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),Jp[t])),{});return a=tg(eg[t],a),a}}([e[ol.TRUST]],t),rules:wg,getTaskName:()=>"solePropDetails"});function Lb(e){var t;const{parentLegalEntity:a,legalEntityResponse:r,handleCreateDocument:n,handleGetDocument:i,handleUpdateDocument:s}=e,{i18n:l,setLocale:d}=He(),[c,u]=le(e.problems),m=y(l.locale),[p,g]=le(null),{showToast:b}=gg(),[f,h]=le(((e,t)=>{var a;let r=(e=>{var t;let a;return(null==e?void 0:e.soleProprietorship)&&(a=vp(e,Tl),(null===(t=e.soleProprietorship)||void 0===t?void 0:t.principalPlaceOfBusiness)?a.solePropRegistrationAddress.operationalAddressIsSame=nd.OPERATIONAL_ADDRESS_IS_NOT_SAME:(a.solePropRegistrationAddress||(a.solePropRegistrationAddress={}),a.solePropRegistrationAddress.operationalAddressIsSame=nd.OPERATIONAL_ADDRESS_IS_SAME)),a})(e);if(!(e=>{var t;const a=(null===(t=null==e?void 0:e.solePropRegistrationAddress)||void 0===t?void 0:t.registrationAddress)||{};return Object.entries(a).some((([e,t])=>"country"!==e&&Boolean(t)))})(r)){const e=null===(a=mp(t,!1))||void 0===a?void 0:a.address;r=Object.assign(Object.assign({},r),{solePropRegistrationAddress:Object.assign(Object.assign({},null==r?void 0:r.solePropRegistrationAddress),{registrationAddress:Object.assign({},e)})})}return r})(r,a)),v=e=>e.some((e=>[Lc.solePropConstitutionalDocument.formId].includes(e.formId))),_=bm(n,i,s),N=({forms:e,legalEntity:t,dataSubmitted:a})=>o(this,void 0,void 0,(function*(){if(v(e)){const e=yield Op(a,t.id);e&&(yield _.uploadDocuments(e,t.id))}})),O=({legalEntity:t})=>o(this,void 0,void 0,(function*(){if(!(null==r?void 0:r.id)){const r={entityAssociations:[{type:ol.SOLE_PROPRIETORSHIP,legalEntityId:t.id}]};yield e.handleUpdateLegalEntity(r,a.id)}}));ce((()=>{var t;e.eventEmitter.on("updateLocale",(e=>d(e)));const a=(null===(t=null==r?void 0:r.documentDetails)||void 0===t?void 0:t.map((e=>e.id)))||[];try{a.length&&_.fetchDocuments(a,r.id).then((()=>{const e=(e=>{const t=Nm(e,uc.CONSTITUTIONAL_DOCUMENT)||null;return{solePropConstitutionalDocument:t?{constitutionalDocument:[{name:Ip(t)}]}:null}})(r.id);h(Object.assign(Object.assign({},f),e))})).catch((()=>{b({label:l.get("failedToFetchRelevantDocuments"),type:mg.ERROR})}))}catch(e){b({label:l.get("failedToFetchRelevantDocuments"),type:mg.ERROR})}}),[]);const I=e=>{var t,a;return Object.assign({},(null==e?void 0:e.constitutionalDocument)&&{solePropConstitutionalDocument:{fileName:null===(a=null===(t=e.constitutionalDocument)||void 0===t?void 0:t[0])||void 0===a?void 0:a.name}})};return D(kb,{capabilities:e.capabilities,data:f,country:(null===(t=null==f?void 0:f.solePropNameAndCountry)||void 0===t?void 0:t.companyCountry)||e.country,problems:c,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,onSubmit:({data:t,forms:a,setLoadingStatus:n})=>o(this,void 0,void 0,(function*(){n(Vu.LOADING);let i=Np(t);try{(null==r?void 0:r.id)||(null==p?void 0:p.id)?i=yield e.handleUpdateLegalEntity(U("type").from(i),(null==r?void 0:r.id)||(null==p?void 0:p.id)):(i=yield e.handleCreateLegalEntity(i),g(i)),yield N({forms:a,legalEntity:i,dataSubmitted:t}),yield O({legalEntity:i}),n(Vu.SUCCESS),b({label:l.get("successfullyUpdatedDetails"),type:mg.SUCCESS}),null==e||e.onSubmit(t)}catch(e){if(b({label:l.get("failedToUpdateDetails"),type:mg.ERROR}),(null==e?void 0:e.errorCode)===lt){const t=yg(e,Rl.TRUST);u(Object.assign(Object.assign({},c),{validationErrors:t}))}n(Vu.SUCCESS)}})),legalEntityType:ol.TRUST,summary:{formatData:(e,t)=>{var a,r,n,i;let o,s=H(e);return(null===(a=null==s?void 0:s.solePropNameAndCountry)||void 0===a?void 0:a.companyCountry)&&(o=m.getCountryName(s.solePropNameAndCountry.companyCountry)),s.solePropNameAndCountry={legalNameOfSoleProprietor:null===(r=e.solePropNameAndCountry)||void 0===r?void 0:r.legalCompanyName,countryOfEstablishment:o},(null===(n=null==s?void 0:s.solePropRegistrationAddress)||void 0===n?void 0:n.registrationAddress)&&(s.solePropRegistrationAddress.hasInnerForms=!0,s.solePropRegistrationAddress.registrationAddress=je(null==s?void 0:s.solePropRegistrationAddress.registrationAddress,m)),(null===(i=null==s?void 0:s.solePropRegistrationAddress)||void 0===i?void 0:i.operationalAddress)&&(s.solePropRegistrationAddress.operationalAddress=je(null==s?void 0:s.solePropRegistrationAddress.operationalAddress,m)),v(t)&&(delete s[xc],s=Object.assign(Object.assign({},s),I(e.solePropConstitutionalDocument))),s},getOmittedKeys:()=>["operationalAddressIsSame"]},hasDataChanged:e=>o(this,void 0,void 0,(function*(){var t;const a=(null===(t=Np(e))||void 0===t?void 0:t.soleProprietorship)||{},n=(null==r?void 0:r.soleProprietorship)||{},i=yield Op(e,"");return!W(a,n)||i.length>0})),canSubmit:e=>ll.SOLE_PROPRIETORSHIP.every((t=>{const a=Ep(e,t);return!Cs(a)}))})}function wb({targetLegalEntityType:e,handleHomeClick:a,onLegalEntityTypeChange:r,handleUpdateLegalEntity:n,legalEntityResponse:i}){const{i18n:s}=He(),[l,d]=le(null),{showToast:c}=gg(),u=D(rg,{onHome:a,homeButtonLabel:s.get("noGoBack"),onNext:()=>o(this,void 0,void 0,(function*(){try{d(Vu.LOADING),yield n({type:e},i.id),c({label:s.get("successfullyUpdatedDetails"),type:mg.SUCCESS}),r()}catch(e){c({label:s.get("failedToUpdateDetails"),type:mg.ERROR})}finally{d(Vu.SUCCESS)}})),nextButtonLabel:e===ol.ORGANIZATION?s.get("continueCompany"):s.get("continueIndividual")});return D(sg,{content:D(Uu,Object.assign({status:l,formOpacityWhenLoading:.3,showSpinner:!1},{children:[(e=>{switch(e){case ol.ORGANIZATION:return D(t.Fragment,{children:[D("h2",Object.assign({className:"adyen-kyc-form-header__heading","data-testid":ol.ORGANIZATION},{children:s.get("continueAsCompany")})),D("span",{children:s.get("indicatedPayoutToCompany")}),D("p",{children:s.get("continueSigningUpAsCompany")})]});case ol.INDIVIDUAL:return D(t.Fragment,{children:[D("h2",Object.assign({className:"adyen-kyc-form-header__heading","data-testid":ol.INDIVIDUAL},{children:s.get("continueAsIndividual")})),D("span",{children:s.get("indicatedPayoutToPersonalAccount")}),D("p",{children:s.get("continueSigningUpAsIndividual")})]});default:D("p",{children:"Change not supported"})}})(e),u]}))})}const Pb=[Rl.DECISION_MAKER_OVERVIEW,Rl.TASKS_OVERVIEW];function jb(e){var{capabilities:t,legalEntityResponse:a,eventEmitter:r,onSubmit:n,onChange:s,onLoad:l=(()=>{}),onNavigate:d=(()=>{})}=e,c=i(e,["capabilities","legalEntityResponse","eventEmitter","onSubmit","onChange","onLoad","onNavigate"]);const{showToast:u}=gg(),{loadingContext:m,clientKey:p,contextCountry:g,setLocale:y,i18n:b}=He(),[f,h]=le(!1),[v,_]=le([]),[N,O]=le([Rl.TASKS_OVERVIEW]),[I,E]=le(a),[T,A]=le(null),[S,C]=le(null),[R,k]=le(null),[L,w]=le([]),[j,x]=le(null),[M,F]=le(null),[V,U]=le(null),[B,W]=le(null),[H,q]=le(null),[G,$]=le(Vc(a)),[Y,K]=le(null),[z,Z]=le(null),[Q,J]=le(null),[ee,te]=le();ce((()=>{P.addPageView("Task list"),r.on("updateLocale",(e=>y(e)))}),[]),ue((()=>{h(!0),(()=>o(this,void 0,void 0,(function*(){const e=yield X({loadingContext:m,clientKey:p,country:g,capabilities:t,legalEntityType:I.type});(null==e?void 0:e.bankVerificationProviders)&&te(e.bankVerificationProviders),(null==e?void 0:e.taskList)&&(_(e.taskList),e.taskList.includes(Rl.PCI_DSS)&&(yield de()),yield ge())})))().catch(console.error).finally((()=>{h(!1),l()}))}),[I.type,g]),ce((()=>{let e=I;if(Pb.includes(N[N.length-1])){if(!Y){const t=setInterval((()=>o(this,void 0,void 0,(function*(){(e=>{var t;return Object.values(null!==(t=null==e?void 0:e.capabilities)&&void 0!==t?t:{}).every((e=>e.verificationStatus===Zm.VALID||e.verificationStatus===Zm.REJECTED))})(e)?ae():e=yield be()}))),3e3);K(t)}}else ae()}),[N.length]);const ae=()=>{Y&&(clearInterval(Y),K(null))},re=e=>{O([...N,e]),d(e)},ne=(e,t)=>{switch(e){case Rl.PAYOUT:ve(Rl.PAYOUT,t);break;case Rl.PAYIN:ve(Rl.PAYIN,t);break;case Rl.TRUST:Ie(Rl.TRUST);break;case Rl.TRUST_MEMBER_OVERVIEW:Ie(Rl.TRUST_MEMBER_OVERVIEW);break;case Rl.PCI_DSS:Ee(Rl.PCI_DSS);break;case Rl.SOLE_PROPRIETOR_COMPANY:Oe(Rl.SOLE_PROPRIETOR_COMPANY);break;case Rl.SERVICE_AGREEMENT:Te(Rl.SERVICE_AGREEMENT,t);break;default:re(e)}},ie=(e=1)=>{if(N.length>1){N[N.length-(e+1)]===Rl.TASKS_OVERVIEW?(O([Rl.TASKS_OVERVIEW]),d(Rl.TASKS_OVERVIEW)):(O(N.slice(0,-1*e)),d(N[N.length-1]))}},oe=e=>{s(e,this)},se=(e,t)=>o(this,void 0,void 0,(function*(){n(e,this),yield be(),ie(t)})),de=()=>o(this,void 0,void 0,(function*(){var e,t;if(I.id&&(null==c?void 0:c.handleGetPciStatus))try{const a=yield c.handleGetPciStatus(I.id);return a.hasDocuments=(null===(t=null===(e=yield null==c?void 0:c.handleGetPciQuestionnaires(I.id))||void 0===e?void 0:e.data)||void 0===t?void 0:t.length)>0,k(a),a}catch(e){console.warn(b.get("failedToGetPciStatus"))}})),me=()=>o(this,void 0,void 0,(function*(){const e=Ym(I)[0];if(e)try{const t=yield null==c?void 0:c.handleGetLegalEntity(e);Z(t)}catch(e){u(b.get("failedToFetchSoleProp"),{type:mg.ERROR})}})),pe=()=>o(this,void 0,void 0,(function*(){const e=e=>o(this,void 0,void 0,(function*(){const t=yield c.handleGetPciTemplate(I.id,{language:e});A(t)}));try{yield e(b.locale.substring(0,2))}catch(t){const a="en";b.locale.substring(0,2)!==a&&(u({label:b.get("failedToGetPciTemplateInSelectedLanguageFallbackToEn"),type:mg.ERROR}),yield e(a))}})),ge=()=>o(this,void 0,void 0,(function*(){if(I.id&&(null==c?void 0:c.handleGetServiceAgreementStatus))try{const e=yield c.handleGetServiceAgreementStatus(I.id);w(e.termsOfServiceTypes)}catch(e){console.warn(b.get("failedToGetServiceAgreementStatus"))}})),ye=e=>o(this,void 0,void 0,(function*(){const t=t=>o(this,void 0,void 0,(function*(){const a=yield c.handleGetServiceAgreement(I.id,{type:e,language:t});C(a)}));try{yield t(b.locale.substring(0,2))}catch(e){const a="en";b.locale.substring(0,2)!==a&&(u({label:b.get("failedToGetServiceAgreementInSelectedLanguageFallbackToEn"),type:mg.ERROR}),yield t(a))}})),be=()=>o(this,void 0,void 0,(function*(){if(I.id&&(null==c?void 0:c.handleGetLegalEntity))try{const e=yield null==c?void 0:c.handleGetLegalEntity(I.id);return E(e),$(Vc(e)),e}catch(e){console.warn(b.get("failedToFetchLegalEntityDetails"))}})),fe=()=>o(this,void 0,void 0,(function*(){if(H.id&&(null==c?void 0:c.handleGetLegalEntity))try{const e=yield null==c?void 0:c.handleGetLegalEntity(H.id);return q(e),e}catch(e){console.warn(b.get("failedToFetchTrustDetails"))}})),he=(e,t,a=Rl.DECISION_MAKER)=>o(this,void 0,void 0,(function*(){if(t&&t!==I.id){const e=yield null==c?void 0:c.handleGetLegalEntity(t);U(e)}else U(I);if(e&&(null==c?void 0:c.handleGetLegalEntity))try{const t=yield null==c?void 0:c.handleGetLegalEntity(e);F(t),re(a)}catch(e){u({label:b.get("failedFetchingDecisionMaker"),type:mg.ERROR})}else F(null),re(a)})),ve=(e,t)=>o(this,void 0,void 0,(function*(){if(t)try{yield Se(t),Km(I)&&!z&&(yield me())}finally{re(e)}else x(null),re(e)})),_e=e=>{W(e||null),re(Rl.TRUST_MEMBER_ROLE_AND_TYPE)},Ne=e=>o(this,void 0,void 0,(function*(){try{if(null==e?void 0:e.legalEntityId){const t=yield null==c?void 0:c.handleGetLegalEntity(e.legalEntityId);F(t)}else F(null);W(e),re(e.legalEntityType===ol.ORGANIZATION?Rl.TRUST_MEMBER_COMPANY:Rl.TRUST_MEMBER_INDIVIDUAL)}catch(e){u(b.get("failedToFetchTrustMemberDetails"),{type:mg.ERROR})}})),Oe=e=>o(this,void 0,void 0,(function*(){try{yield me()}finally{re(e)}})),Ie=e=>o(this,void 0,void 0,(function*(){var t,a;const r=null===(a=null===(t=null==I?void 0:I.entityAssociations)||void 0===t?void 0:t.find((e=>e.type===ol.TRUST)))||void 0===a?void 0:a.legalEntityId;if(r)try{const t=yield null==c?void 0:c.handleGetLegalEntity(r);q(t),re(e)}catch(e){u({label:b.get("failedToFetchTrustDetails"),type:mg.ERROR})}else re(Rl.TRUST)})),Ee=e=>o(this,void 0,void 0,(function*(){try{yield pe(),re(e)}catch(e){u({label:b.get("failedToGetPciTemplate"),type:mg.ERROR})}})),Te=(e,t)=>o(this,void 0,void 0,(function*(){if(L.length)try{yield ye(t),re(e)}catch(e){u({label:b.get("failedToGetServiceAgreement"),type:mg.ERROR})}})),Ae=()=>o(this,void 0,void 0,(function*(){const e=Vp({trackingConig:{topLevelLegalEntity:a},legalEntity:I,task:Rl.PCI_DSS});try{const t=yield null==c?void 0:c.handleGetPciQuestionnaires(I.id);for(const e of t.data){const t=yield null==c?void 0:c.handleDownloadPci(I.id,e.id);yield Cb(t.content,t.id+".pdf")}}catch(e){u({label:b.get("failedToDownloadPci"),type:mg.ERROR})}finally{P.addEvent("Downloaded signed PCI form",{segmentation:Object.assign({},e)})}})),Se=e=>o(this,void 0,void 0,(function*(){if(e&&(null==c?void 0:c.handleGetTransferInstrument))try{const t=yield null==c?void 0:c.handleGetTransferInstrument(e);x(t)}catch(e){u({label:b.get("failedToFetchPayoutAccount"),type:mg.ERROR})}})),Ce=e=>{var t;if(null==e?void 0:e.id)return null===(t=null==G?void 0:G.LegalEntity)||void 0===t?void 0:t[e.id]},Re=()=>{var e;const t=null===(e=null==z?void 0:z.soleProprietorship)||void 0===e?void 0:e.name;return t||Uy(I)},De=e=>o(this,void 0,void 0,(function*(){yield fe(),yield se(e,2)})),ke=e=>{J(e),re(Rl.LEGAL_ENTITY_TYPE_SWITCHER)},Le=()=>{var e,i,s,l,d,u;const m=N[N.length-1];switch(m){case Rl.TASKS_OVERVIEW:return D(Yg,{onNavigateToTask:ne,tasks:v,legalEntityResponse:I,capabilityProblems:G,onPciDownload:Ae,pciStatus:R,serviceAgreementTypes:L});case Rl.DECISION_MAKER_OVERVIEW:return D(Zg,{trackingConig:{topLevelLegalEntity:a},parentLegalEntity:V,legalEntityResponse:I,onNavigateToIndividual:he,handleUpdateLegalEntity:null==c?void 0:c.handleUpdateLegalEntity,navigateBackToTaskList:ie,onDecisionMakerDelete:be,capabilityProblems:G});case Rl.INDIVIDUAL:return D(hg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rl.INDIVIDUAL,parentLegalEntity:null,legalEntityResponse:I,problems:Ce(I),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:e=>o(this,void 0,void 0,(function*(){n(e,this),yield be(),re(Rl.TASKS_OVERVIEW),J(null)})),handleHomeClick:()=>re(Rl.TASKS_OVERVIEW),homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken,onTypeSwitch:ke,isTargetLegalEntityType:Q===ol.INDIVIDUAL}));case Rl.DECISION_MAKER:return D(hg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rl.DECISION_MAKER,parentLegalEntity:V,legalEntityResponse:M,problems:Ce(M),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:se,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken}));case Rl.TRUST_MEMBER_COMPANY_OWNER:return D(hg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rl.TRUST_MEMBER_COMPANY_OWNER,parentLegalEntity:V,legalEntityResponse:M,problems:Ce(M),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:e=>o(this,void 0,void 0,(function*(){yield fe(),yield se(e)})),handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken}));case Rl.TRUST_MEMBER_INDIVIDUAL:return D(hg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rl.TRUST_MEMBER_INDIVIDUAL,parentLegalEntity:H,legalEntityResponse:M,problems:Ce(M),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:De,handleBackClick:ie,handleHomeClick:()=>re(Rl.TRUST_MEMBER_OVERVIEW),homeButtonLabel:b.get("saveAndGoToOverview"),associationDetail:B,handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken}));case Rl.COMPANY:return D(jg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rl.COMPANY,legalEntityResponse:I,capabilities:t,problems:Ce(I),onChange:oe,eventEmitter:r,onSubmit:e=>o(this,void 0,void 0,(function*(){n(e,this),yield be(),re(Rl.TASKS_OVERVIEW),J(null)})),handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,onTypeSwitch:ke,isTargetLegalEntityType:Q===ol.ORGANIZATION}));case Rl.TRUST_MEMBER_COMPANY:return D(jg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rl.TRUST_MEMBER_COMPANY,parentLegalEntity:H,legalEntityResponse:M,capabilities:t,problems:null===(e=null==G?void 0:G.LegalEntity)||void 0===e?void 0:e[I.id],onChange:oe,eventEmitter:r,onSubmit:De,handleBackClick:ie,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),associationDetail:B,handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress}));case Rl.PAYOUT:case Rl.PAYIN:return D(Hy,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rl.PAYOUT,problems:null===(i=null==G?void 0:G.BankAccount)||void 0===i?void 0:i[null==j?void 0:j.id],currentTask:m,transferInstrument:j,legalEntityResponse:I,accountHolder:Re(),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:se,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),bankVerificationVendors:ee,navigateBackToTaskList:ie}));case Rl.TRUST:return D(nb,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rl.TRUST,problems:null===(s=null==G?void 0:G.LegalEntity)||void 0===s?void 0:s[null==H?void 0:H.id],parentLegalEntity:I,legalEntityResponse:H,capabilities:t,onChange:oe,eventEmitter:r,onSubmit:se,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview")}));case Rl.TRUST_MEMBER_OVERVIEW:return D(ib,{parentLegalEntity:I,trustResponse:H,capabilityProblems:G,onAddTrustMember:_e,onAddTrustMemberOwner:he,navigateBackToTaskList:ie,handleUpdateLegalEntity:null==c?void 0:c.handleUpdateLegalEntity,onTrustMemberDelete:fe});case Rl.TRUST_MEMBER_ROLE_AND_TYPE:return D(ub,{navigateNext:Ne,navigateBack:()=>o(this,void 0,void 0,(function*(){yield fe(),ie()})),trust:H,trustMember:B,handleUpdateLegalEntity:null==c?void 0:c.handleUpdateLegalEntity});case Rl.PCI_DSS:return D(Tb,{legalEntity:I,pciTemplateResponse:T,trackingConig:{topLevelLegalEntity:a},taskType:Rl.PCI_DSS,handleHomeClick:ie,handleLanguageChange:pe,handleSign:(...e)=>o(this,void 0,void 0,(function*(){yield c.handleSignPci(...e),yield de()}))});case Rl.SOLE_PROPRIETOR_COMPANY:return D(Lb,Object.assign({},c,{taskType:Rl.SOLE_PROPRIETOR_COMPANY,parentLegalEntity:I,legalEntityResponse:z,capabilities:t,problems:null===(l=null==G?void 0:G.LegalEntity)||void 0===l?void 0:l[null==z?void 0:z.id],onChange:oe,eventEmitter:r,onSubmit:se,handleBackClick:ie,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),country:null===(u=null===(d=null==I?void 0:I.individual)||void 0===d?void 0:d.residentialAddress)||void 0===u?void 0:u.country}));case Rl.SERVICE_AGREEMENT:return D(Sb,{legalEntity:I,serviceAgreement:S,trackingConig:{topLevelLegalEntity:a},taskType:Rl.SERVICE_AGREEMENT,handleHomeClick:ie,handleLanguageChange:ye,handleSign:(...e)=>o(this,void 0,void 0,(function*(){yield c.handleSignServiceAgreement(...e),yield ge()}))});case Rl.LEGAL_ENTITY_TYPE_SWITCHER:return D(wb,Object.assign({},c,{targetLegalEntityType:Q,legalEntityResponse:a,handleHomeClick:ie,onLegalEntityTypeChange:()=>o(this,void 0,void 0,(function*(){yield be(),(()=>{switch(Q){case ol.INDIVIDUAL:re(Rl.INDIVIDUAL);break;case ol.ORGANIZATION:re(Rl.COMPANY)}})()}))}))}};return f?D(xg,{}):Le()}const xb={individualDropin:class extends Cg{renderDropinComponent(){return D(hg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},individual:class extends j{render(){return D(Y,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey,contextCountry:this.props.country},{children:D(hg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,hideDropinLayout:!0}))}))}},personalDetails:class extends j{render(){return D(Y,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey},{children:D(sm,Object.assign({},this.props))}))}},address:class extends j{get data(){return this.state.data}get isValid(){return!!this.state.isValid}render(){return D(Y,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey},{children:D(Xc,Object.assign({ref:e=>{this.componentRef=e}},this.props,{onChange:this.setState}))}))}},contactDetails:class extends j{render(){return D(Y,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,translations:this.props.translations},{children:D(ju,Object.assign({},this.props))}))}},company:class extends j{render(){return D(Y,Object.assign({i18n:this.props.i18n,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,translations:this.props.translations,locale:this.props.locale,contextCountry:this.props.country},{children:D(jg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,hideDropinLayout:!0}))}))}},companyDropin:class extends Cg{renderDropinComponent(){return D(jg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},taskList:class extends Cg{renderDropinComponent(){return D(jb,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},payoutAccount:class extends Cg{renderDropinComponent(){return D(Hy,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},trustDropin:class extends Cg{renderDropinComponent(){return D(nb,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}}},Mb={type:"object",propertiesSchema:{registeredAddress:{type:"object",propertiesSchema:{country:{type:"string",required:!0}}}}},Fb={type:"object",propertiesSchema:{residentialAddress:{type:"object",propertiesSchema:{country:{type:"string",required:!0}}}}},Vb={id:{type:"string",required:!0},legalEntityId:{type:"string",required:!0},type:{type:"string",exactValue:["bankAccount","recurringDetail"],required:!0},bankAccount:{type:"object",propertiesSchema:{accountNumber:{type:"string"},accountType:{type:"string"},bankBicSwift:{type:"string"},bankCode:{type:"string"},bankName:{type:"string"},branchCode:{type:"string"},checkCode:{type:"string"},countryCode:{type:"string"},currencyCode:{type:"string"},iban:{type:"string"}}}},Ub={personalDetails:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{firstName:{type:"string",required:!0},lastName:{type:"string",required:!0},birthDate:{type:"string",required:!0},idNumber:{type:"string",required:!0},residencyCountry:{type:"string",required:!0},phoneNumber:{type:"string",required:!0},email:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},address:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{country:{type:"string"},city:{type:"string",required:!0},postalCode:{type:"string",required:!0},stateOrProvince:{type:"string",required:!0},houseNumberOrName:{type:"string",required:!0},street:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},contactDetails:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{phoneNumber:{type:"string",required:!0},email:{type:"string",required:!0},birthDate:{type:"string",required:!0},residencyCountry:{type:"string",required:!0},jobTitle:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},company:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{companyType:{type:"object",required:!0,propertiesSchema:{entityType:{type:"string",required:!0}}}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},individual:{propertiesSchema:{taskType:{type:"string"},data:{type:"object",required:!0,propertiesSchema:{firstName:{type:"string",required:!0},lastName:{type:"string",required:!0},birthDate:{type:"string",required:!0},idNumber:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},payoutAccount:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},onUserEvent:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},transferInstrument:{type:"object",propertiesSchema:Vb},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:["organization","individual"],required:!0},documents:{type:"array"},capabilities:{type:"object",required:!0},individual:Fb,organization:Mb}}}},companyDropin:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:"organization",required:!0},capabilities:{type:"object",required:!0},organization:Mb}}}},individualDropin:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},onUserEvent:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:"individual",required:!0},documents:{type:"array"},capabilities:{type:"object",required:!0},individual:Fb}}}},trustDropin:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:"trust",required:!0},capabilities:{type:"object",required:!0},trust:Mb}}}},taskList:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},handleGetLegalEntity:{type:"function",required:!0},handleCreateLegalEntity:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},onUserEvent:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},transferInstrument:{type:"object",propertiesSchema:Vb},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:["organization","individual","trust"],required:!0},documents:{type:"array"},capabilities:{type:"object",required:!0},individual:Fb,organization:Mb}}}}},Bb=({expected:e,received:t,schemaParentsPaths:a})=>{for(const[r,n]of Object.entries(e)){const{type:e,exactValue:i,required:o,propertiesSchema:s}=n,l=t[r];if(o&&Ss(l))throw new Error(`\n\n"${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} is required, Please add it to the form creation options\n\n- For more information please check: https://github.com/Adyen/adyen-kyc-components#adyenkyccreatedropincomponentname-componentname-options-options.\n `);if(o||!o&&!Ss(l)){if("array"===e&&!Array.isArray(l))throw new Error(`\n\n "${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} must be an array.`);if("array"!==e&&typeof l!==e)throw new Error(`\n\n "${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} must be a ${e}.`);if(i&&!Array.isArray(i)&&i!==l)throw new Error(`\n\n "${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} value should be equal to "${i}".`);if(i&&Array.isArray(i)&&!i.includes(l))throw new Error(`\n\n "${r}" ${a.length>0?` inside "${a.join(" -> ")}"`:""} value should be equal to one of: "${G(i,{type:"disjunction"})}"`);Ss(s)||(a.push(r),Bb({expected:s,received:l,schemaParentsPaths:a}),a.pop())}}};class Wb{constructor(e){this.components=[],this.update=e=>(this.setOptions(e),this.components.forEach((e=>e.update(this.getPropsForComponent(this.options)))),this),this.updateLocale=e=>(this.setOptions(e),this.components.forEach((e=>e.updateLocale(this.getPropsForComponent(this.options)))),this),this.remove=e=>(this.components=this.components.filter((t=>t._id!==e._id)),e.unmount(),this),this.setOptions=e=>(this.options=Object.assign(Object.assign({},this.options),e),this.options.loadingContext=((e=n)=>e.endsWith("/")?e:`${e}/`)(this.options.environment),this.options.locale||(this.options.locale=s),this.modules={i18n:new C},(e=>{const t=["country","locale","clientKey"].filter((t=>!e[t]));if(t.length>0)throw new Error(`\n\nPlease specify a ${G(t)} for the SDK to initialize!\n\n- For more information please check: https://github.com/Adyen/adyen-kyc-components#configuration.\n `)})(this.options),this),this.create=this.create.bind(this),this.setOptions(e)}create(e,t){const a=this.getPropsForComponent(t);return this.validate(e,t),this.createForm(e,a)}createForm(e,t){const a=xb[e],r=this.getPropsForComponent(t),n=new a(Object.assign(Object.assign({},this.options),r));return this.components.push(n),n}getPropsForComponent(e){return Object.assign(Object.assign({},e),{i18n:this.modules.i18n})}validate(e,t){(e=>{if(!e)throw new Error("\n\n No form Component was passed!\n\n- For more information please check: https://github.com/Adyen/adyen-kyc-components#adyenkyccreatedropincomponentname-componentname-options-options\n ");const t=xb[e],a=Object.keys(Ub);if(!(t&&t.prototype instanceof j))throw new Error(`\n\n"${e}" is not a valid form Component. Please enter one of the following:\n- ${G(a)}.\n `)})(e),((e,t)=>{const a=Ub[e],{propertiesSchema:r}=a;Ss(r)||Bb({expected:r,received:t,schemaParentsPaths:[]})})(e,t)}}Wb.version={version:void 0,revision:void 0,branch:void 0,buildId:void 0},module.exports=Wb;
|
|
1
|
+
"use strict";var e=require("whatwg-fetch"),t=require("preact"),a=require("classnames"),r=require("phone");function n(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a}function i(e,t,a,r){return new(a||(a=Promise))((function(n,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}const o="en-US",s={individual:"Individual",payoutAccount:"Payout account",payinAccount:"Payin account",firstName:"First name",lastName:"Last name",country:"Country",street:"Street",houseNumber:"House number",houseNumberOptional:"House number (optional)",houseNumberOrName:"House number or name",postalCode:"Postal code",city:"City",cityTown:"City / Town",state:"State",provinceOrTerritory:"Province or territory",selectProvinceOrTerritory:"Select a province or territory",zipCode:"ZIP code",apartmentSuite:"Apartment / Suite",apartmentSuiteOptional:"Apartment / Suite (optional)",phoneNumber:"Phone number",email:"Email address",birthdate:"Date of birth",code:"Code",invalidEmail:"Please enter a valid email",invalidPhoneNumber:"Please enter a valid phone number",invalidCountryCode:"Please select a country code",birthDate:"Date of birth",idNumber:"Identity number",selectState:"Select a state",selectCountry:"Select a country",search:"Search",noOptionsFound:"No options found",SSNFormatUS:"*** \u2014 ** \u2014 XXXX",SSNFormatUS9Digits:"XXXXXXXXX",SINFormatCA:"XXXXXXXXX",useSSNFormatUS:"Please provide last 4 digits",use9DigitsSSNFormatUS:"Please use the SSN format: XXXXXXXXX",useSSNFormatCA:"Please use the SIN format: XXXXXXXXX",invalidFormat:"Invalid format",fieldIsRequired:"Field is required",tooManyFiles:"Too many files",duplicatedFiles:"Duplicated files",unsupportedFiletype:"Unsupported filetype",maximumFileSizeExceeded:"Maximum file size exceeded",personalDetails:"Personal details",invalidBirthDate:"Enter a valid birth date (TODO - explain why this is invalid)",address:"Address",contactDetails:"Contact Details",uploadDocument:"Upload Document",individualDetails:"Individual details",socialSecurityNumber:"Last 4 digits of Social Security Number (SSN)",socialSecurityNumber9Digits:"Social Security Number (SSN)",codiceFiscale:"Codice fiscale",personnummer:"Personnummer (PIN)",dniNumber:"DNI Number",cadastroDePessoasFisicas:"Cadastro de Pessoas F\xedsicas (CFP)",invalidFormatExpects:"Invalid format. Expected format: %{format}",invalidFormatForAuPassportNumber:"This isn't a valid Australian passport number. Expected format: 1-2 letters followed by 7 numbers.",invalidFormatForAuDriversLicenseNumber:"This isn't a valid Australian driver's license number. Expected format: 6-10 alphanumeric characters.",invalidFormatForAuDriversLicenseCardNumber:"This isn't a valid Australian driver's license card number. Expected format: 6-10 alphanumeric characters.",invalidFormatForAuProofOfIdentityCardNumber:"This isn't a valid Australian proof of identity card number. Expected format: 6-10 alphanumeric characters.",residencyCountry:"Country of residence",stateOrProvince:"State or province",selectStateOrProvince:"Select a state or province",dragYourFilesHereOr:"Drag your files here, or",browse:"Browse",supports:"Supports: %{fileTypes}. Size up to %{maxSize}. Maximum %{maxFiles} page.",complete:"Complete",summary:"Summary",selectDocument:"Select a document",passport:"Passport",passportNumber:"Passport number",id:"ID",driversLicense:"Driver's license",issuerState:"Issuing state",licenseNumber:"Driver license number",licenseCardNumber:"Card number",documents:"Documents",idDocument:"ID Document",documentType:"Document type",frontPage:"Front page",backPage:"Back page",fileName:"File name",proofOfNationality:"Proof of nationality",uploadDocumentForSsn:"Upload an ID document instead of SSN",operationalAddressHeader:"Additional address",operationalAddressHeaderDescription:"Is there a different address for your company\u2019s main business operations?",operationalAddressIsSame:"Is there a different address for your company\u2019s main business operations?",operationalAddressIsSameItemName:"No, the registered address is where we operate",operationalAddressIsNotSameItemName:"Yes, our headquarters are at a different location",verifyPrefilledInfoIsCorrect:"Verify if your prefilled information is correct",legalStructureHeader:"Tell us your legal structure",whatTypeOfCompanyDoYouHave:"What type of company do you have?",privateCompanyTitle:"Private company",privateCompanyDescription:"Owned privately. The shareholders don\u2019t necessarily trade on public exchanges (like the stock market).",publicCompanyTitle:"Public company",publicCompanyDescription:"Owned by public shareholders. They\u2019re also required to disclose financial information to the public regularly.",incorporatedPartnershipTitle:"Incorporated partnership",incorporatedPartnershipDescription:"An agreement between two or more people who run a business together.",nonProfitOrCharitableOrgTitle:"Non-profit or charitable organization",nonProfitOrCharitableOrgDescription:"An organization that has an official status as not for profit or tax exempt, sometimes called an NGO.",governmentalOrganizationTitle:"Governmental organization",governmentalOrganizationDescription:"Owned by the government or state.",associationIncorporatedTitle:"Incorporated association",associationIncorporatedDescription:"A registered entity without profit that's organized around a purpose such as recreation, culture, or charity.",jobTitle:"Job title",legalStructure:"Legal structure",entityType:"Entity type",registrationDetails:"Registration details",registeredAddress:"Registered address",registrationAddress:"Registration address",registeredAddressHeaderDescription:"The address registered to your company with the Chamber of Commerce.",registeredAddressTrustHeaderDescription:"The address registered to your trust",operationalAddress:"Operational address",provideRegistrationDetails:"Provide registration details",companyStructure:"Company structure",providePersonalDetails:"Provide personal details",providePersonalAddress:"Provide personal address",provideContactDetails:"Provide contact details",correctErrorsResubmit:"Correct the following errors and resubmit the form",registrationDocument:"Registration document",taxDocument:"Tax document",provideCompanyDetails:"Provide company details",companyDetails:"Company details",invalidRegistrationNumber:"Invalid registration number",tradingName:"Trading name",chamberOfCommerceRegistrationNumber:"Chamber of Commerce registration number",taxId:"Tax ID",exemptedFromTax:"Exempted from tax",doNotHaveEIN:"I do not have an Employer Identification Number",doNotHaveFirmenbuchnummer:"I do not have a Firmenbuchnummer",doNotHaveOrganisationsnummer:"I do not have an Organisationsnummer",taxIdAbsenceReason:"Tax ID absence reason",vatNumberExempted:"Exempted from VAT",vatNumberAbsenceReason:"VAT number absence reason",belowTaxThreshold:"Below tax threshold",industryExemption:"Industry exemption",validationPleaseEnterAValidRegistrationNumber:"Please enter a valid company registration number",validationPleaseEnterAValidRegistrationNumberWithFormat:"Please enter a valid company registration number. Expected format: %{format}",validationPleaseEnterAValidVatNumber:"Please enter a valid Tax id number",validationPleaseEnterAValidVatNumberWithFormat:"Please enter a valid Tax id number. Expected format: %{format}",validationPleaseEnterAValidTaxIdNumber:"Please enter a valid Tax id number",validationPleaseEnterAValidTaxIdNumberWithFormat:"Please enter a valid Tax id number. Expected format: %{format}",aValidAbnShouldBe11Digits:"A valid ABN should be 11 digits.",validationPleaseEnterAValidIban:"Please enter a valid IBAN",validation8Or11Characters:"Please enter either 8 or 11 characters.",validationCharacters:"Please enter %{length} characters.",validationDigitsBetween:"Please enter a number between %{start} and %{end} digits",validationDigits:"Please enter %{length} digits",enterValidRegistrationNumber:"Please enter a valid registration number",stockExchangeMIC:"Stock Exchange MIC",stockExchangeMICHelper:"Market Identifier Code, as defined in ISO 10383",stockISINHelper:"International Securities Identification Number, as defined in ISO 10383",stockISIN:"Stock ISIN",validationPleaseEnterAValidMarketIdentifier:"Please enter a valid Market identifier code",validationPleaseEnterAValidStockISIN:"Please enter a valid International Securities Identification Number",shareholderDocument:"Shareholder document",role:"Role",rolePlaceholder:"Select the applicable role(s)",back:"Back",next:"Next",submit:"Submit",nameAndCountry:"Name and country",companyCountry:"Where is your business located?",legalCompanyName:"Legal name of the company",legalCompanyNameHelper:"Enter the name exactly as it is on your Chamber of Commerce registration",accountDetailsDescription:"Provide few details about you to start accepting live payments.",provideDetails:"Provide details",payoutAccountsDescription:"To set up your account, let us know where to send your payouts.",payinAccountsDescription:"To complete your account, let us know where to send your payins.",providePayoutDetails:"Provide payout details",providePayinDetails:"Provide payin details",addExtraPayoutAccount:"Add extra payout account",addExtraPayinAccount:"Add extra payin account",payoutDetails:"Payout details",payinDetails:"Payin details",addPayoutAccount:"Add a payout account",addPayinAccount:"Add a payin account",failedToFetchPayoutAccount:"failed to fetch payout account",toCompleteProcessReviewAndSignOfficialDocumentation:"To complete this process, review and sign the official documentation.",sign:"Sign",signer:"Signer",selectSigner:"Select signer",pciSignedSuccessfully:"PCI signed successfully",pciSignFailed:"PCI signing failed",byClickingSignIAcknowledgeAndAgree:"By clicking the Sign button, I acknowledge and agree to the following: ",acknowledgePciRequirements:"We hereby acknowledge that we must remain compliant with the aforementioned PCI DSS requirements at all times as long as we want to receive payments. Consequently, we must continuously reassess our environment and implement any additional PCI DSS requirements if our environment changes.",basedOnTheAboveSignatory:"Based on the above, the signatory above asserts that the information within this attestation form fairly represents the results of the assessment.",failedToGetPciStatus:"Failed to get the PCI status",failedToGetPciTemplate:"Failed to get PCI template",failedToGetPciTemplateInSelectedLanguageFallbackToEn:"Failed to get the PCI template in the selected language. Falling back to English.",failedToDownloadPci:"Failed to download PCI document(s)",signServiceAgreement:"Sign services agreement",pciDssQuestionnaire:"PCI DSS questionnaire",serviceAgreementSignedSuccessfully:"Service agreement signed successfully",serviceAgreementSignFailed:"Service agreement signing failed",failedToGetServiceAgreementStatus:"Failed to get the service agreement status",failedToGetServiceAgreement:"Failed to get the service agreement",failedToGetServiceAgreementInSelectedLanguageFallbackToEn:"Failed to get the service agreement in the selected language. Falling back to English.",iHaveReadAndIAcceptTheseTerms:"I have read and I accept these terms and confirm that I am a legal representative authorized to accept these terms on behalf of the company. I have taken notice of the privacy statement (www.adyen.com/privacy) and I consent to my (personal) data being used for the purposes described therein.",finished:"Finished",invalidRole:"Please select a role",unableToVerifyTheIdNumber:"Unable to verify the Id number for the given country",download:"Download",accountHolder:"Account holder",accountHolderDescriptionCompany:"The bank account holder has to have the same name as your company.",accountHolderDescriptionIndividual:"This should be you, since the bank account has to be in your name",accountHolderDescriptionSoleProp:" The bank account holder has to have the same name as your sole proprietorship",bankCountry:"Bank country",bankAccountCountry:"Bank account country",currencyCode:"Currency code",currencyPlaceholder:"Select a currency code",bankAccountNumber:"Account number",iban:"IBAN",swiftCode:"Swift code",bsbNumber:"BSB Number",branchCode:"Branch code",transitNumber:"Transit number",listitemVoidedChequeBankLetterBankStatementOnline:"Voided cheque/Bank letter/Bank statement/Online banking environment",instructionNumber:"Instruction number",institutionNumber:"Institution number",sortCode:"Sort code",bankCityTown:"Bank city/town",clearingCode:"Clearing code",bankCode:"Bank code",bankName:"Bank name",achRoutingNumber:"ACH routing number",decisionMaker:"Decision-makers",decisionMakerDescription:"Provide the information of the owners, controlling persons, and signatories in your company. Keep in mind that one person may hold multiple roles. The requirements are as follows:",owner:"Owner",ownerDescription:"Someone who owns 25% or more of the company(directly or indirectly)",controllingPerson:"Controlling person",controllingPersonDescription:"Not an owner, but with authority to make major business decisions",signatory:"Signatory",signatoryDescription:"Authorized to sign the contracts on behalf of the company",director:"Director",directorDescription:"Someone appointed to manage a company's business and affairs",provideAllDirectorsYouShouldHaveAtLeastOne:"Provide <strong>all directors</strong>. You should have at least one.",provideAllDirectorsYouShouldHaveAtLeastThree:"Provide <strong>all directors</strong>. You should have at least three.",provideAllDirectorsYouShouldHaveAtLeast3AndAtMost15:"Provide <strong>all directors</strong>. You should have at least 3, and at most 15",addDecisionMaker:"Add decision maker",addDecisionMakers:"Add decision makers",goToOverview:"Go to overview",saveAndGoToOverview:"Save and go to overview",edit:"Edit",remove:"Remove",toggleAssociationMenu:"toggle menu of %{name} ",editDecisionMakerDetails:"edit details of %{decisionMaker}",removeDecisionMaker:"remove %{decisionMaker}",verifyDecisionMakerDetails:"verify details of %{decisionMaker}",goToMenu:"Go to Menu",confirm:"Confirm",goToDecisionMakers:"Go to list of decision makers",theSubmitWasSuccessful:"The submit was successful",thereWasAnErrorTryAgain:"There was an error, please try again",proofOfIdentityCard:"State-issued proof of identity card",proofOfIdentityCardNumber:"Identity card number",proofOfResidence:"Proof of residency",proofOfNationalId:"Proof of national ID",backToTaskList:"Back to task list",proofOfResidenceDocumentTypeLabel:"Upload a document as proof of address for %{name}. We need to see this document so we can more accurately verify their identity.",utilityBill:"Utility bill",governmentIssuedCorrespondence:"Government-issued correspondence",taxationDocument:"Taxation document",extractFromMunicipalPersonalRecordsDatabase:"Extract from Municipal Personal Records database",salarySlip:"Salary slip",mortgageStatement:"Mortgage statement",certificateOfVoterRegistration:"Certificate of voter registration",businessAccountDetailsDescription:"To prepare your account, we need information about your business.",documentAddressedToName:"The document has to be addressed to %{name}",showAddressStateCountry:"Shows address, state, and country of residence",dateOnDocumentNoOlderThanXMonths:"The date on the document is no older than %{numberOfMonths} months",fullDocumentVisibleWithReadableText:"The full document needs to be visible, with all text readable",documentCannotBeDamaged:"The document cannot be damaged",verify:"Verify",go:"Go",idUploadDocumentSubtitle:"Upload a government-issued photo ID document that belongs to <strong>%{name}</strong>. We need to see this document so we can verify their identity.",documentNotExpiredOrDamaged:"The document cannot be expired or damaged",includeFrontAndBack:"Include both the front and back side, each in separate file",fullDocumentVisible:"The full document needs to be visible, with all text readable",imagesInColor:"Images have to be in color",birthDatePlaceholder:"dd/mm/yyyy",onlyEnterNormalCharacters:"Please only enter normal characters",verifyCompanyInfoIsUpToDate:"You need to verify that your company information is up to date",failedToFetchRelevantDocuments:"Failed to fetch relevant documents",failedToFetchRelevantAccounts:"Failed to fetch relevant accounts",processing:"Processing",unsuccessful:"Unsuccessful",invalidDateOfBirth:"Please enter a valid date of birth",successfullyUpdatedDetails:"Successfully updated details",failedToUpdateDetails:"Failed to update details",successfullyVerifiedIdNumber:"Successfully verified %{idNumber}",failedFetchingDecisionMaker:"Failed to get decision maker details",fileUpload:"File upload",bankStatement:"Bank statement",bankStatementOptional:"Bank statement (optional)",bankAccountVerification:"Bank account verification",bankStatementDocumentTypeLabel:"Upload a document to confirm your bank account information. We need to see this document so we can set up your payouts.",requirements:"Requirements:",accountHolderNameMatchesWithBusinessOrTradingName:"The account holder name on the document has to match the legal business or trading name of your company",accountNumberOrIbanVisible:"The account number or IBAN needs to be visible",showsCountryOfBankAccount:"Shows the country where the bank account is located (for banks in the EU, the country is included in the IBAN)",hasTobeOfficialDocumentFromBank:"It has to be official document from a bank, demonstrated by a bank logo, the bank name, or a bank-specific font",ifDocumentMoreThan12months:"If your document is older than 12 months, then it should contain a statement with the company\u2019s assets and liabilities. You will need to have it signed and dated by someone with decision-making or signing power within the company. Make sure the date, title, and legal entity name are included.",whyDoINeedToFillInThisInformation:"Why do I need to fill in this information?",reasonForFillingCompanyRegistrationDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingCompanyAddressDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingIndividualPersonalDetails:"We have to make sure that everyone who uses our services is who they say they are. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingIndividualAddressDetails:"We have to make sure that everyone who uses our services is who they say they are. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingPayoutAccountDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingPayoutDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",whatIsTheDifferenceBetweenTheseRoles:"What is the difference between these roles?",ownerGuideDescription:"An <strong>owner</strong> is someone who owns 25% or more of the company, through voting rights, equity, or similar.",controllingPersonGuideDescription:"A <strong>controlling person</strong> is not an owner, but has the authority to make major business decisions.",signatoryGuideDescription:"A <strong>signatory</strong> has been given authority to sign official documents on behalf of the company. Usually a signatory is also an owner or a controlling person.",directorGuideDescription:"A <strong>director</strong> is someone appointed to manage a company's business and affairs. Who your directors are can be found on the companies register.",someoneAppointedToManageACompanysBusinessAndAffairs:"Someone appointed to manage a company's business and affairs.",whatIfDocumentIsMoreThan12MonthsOld:"What if my document is more than 12 months old?",description:"Description (optional)",descriptionHelper:"Attach description to this payout account",depositTicket:"Deposit ticket / deposit form",screenshotOfOnlineBankingEnviroment:"Screenshot of online banking environment",officialEmailOrALetterFromYourBank:"Official email or a letter from your bank",cheques:"Cheques",releveDidentiteBancaire:"Relev\xe9 d'Identit\xe9 Bancaire (RIB)",successFullyRemovedDecisionMaker:"Successfully removed a decision maker",failedToRemoveDecisionMaker:"Failed to remove a decision maker",chamberOfCommerceExtract:"Chamber of Commerce extract",taxNumberCorporateNumber:"Tax Number / Corporate Number",companyLegalName:"Company legal name",companyName:"Company name",companyType:"Company type",taxReferenceNumber:"Tax reference number",SST:"SST",companyProfile:"Company profile",companyNumber:"Company number",RfcDocument:"RFC Document",RFC:"RFC",companyRegistrationDocument:"Company registration document",businessName:"Business name",typeOfCompany:"Type of company",typeOfIdentity:"Type of identity",typeOfIdentitySubtitle:"We need to see a government-issued photo ID document that belongs to the person mentioned above.",CNPJ:"CNPJ",businessNumber:"Business number",doingBusinessAs:"Doing business as",taxIdentificationNumber:"Tax identification number",irdDocument:"IRD document",irdNumber:"IRD number",australianBusinessNumberAbn:"Australian business number (ABN)",australianBusinessNumberAcn:"Australian company number (ACN)",enterpriseNumber:"Enterprise Number",NIP:"NIP (Numer identyfikacji podatkowej)",NIPC:"NIPC (N\xfamero de Identifica\xe7\xe3o de Pessoa Colectiva)",numerodeIVA:"N\xfamero de IVA",NIF:"NIF (N\xfamero de Identificaci\xf3n Fiscal)",NIFdeIVA:"N\xfamero de Identificaci\xf3n a efectos de IVA",partitaIVA:"Partita IVA",organisationsnummer:"Organisationsnummer",momsregistreringsnummer:"Momsregistreringsnummer",codiceFiscaleOrCCIAA:"Codice fiscale or CCIAA","UST-ID":"UST-ID (Umsatzsteuer-Identifikationsnummer)",DIC:"DI\u010c (Da\u0148ov\xe9 identifika\u010dn\xed \u010d\xedslo)",ICO:"IC\u030cO (Identifikac\u030cni\u0301 c\u030ci\u0301slo)","USt-IdNr":"USt-IdNr. (Umsatzsteuer-Identifikationsnummer)",handelsregisternummer:"Handelsregisternummer",NumeroDeTVA:"Num\xe9ro de TVA",organisasjonsnummer:"Organisasjonsnummer",skattenummer:"Skattenummer",verificationErrorMessage:"Some information couldn\u2019t be verified. Click to see what needs to be adjusted.",remediationFormErrorMessage:"Some information couldn\u2019t be verified. Information in this form may need to be adjusted.",youHaveUnsavedChanges:"You have unsaved changes",areYouSureToLeave:"Are you sure you want to leave?",cancel:"Cancel","save&Leave":"Save & leave",leave:"Leave",employerIdentificationNumber:"Employer identification number",companyRegistrationNumber:"Company registration number",euVatNumber:"EU VAT number",vatNumber:"VAT number",regonKrsNumber:"REGON / KRS number",registrationNumber:"Registration number",charityNumber:"Charity number",SIRETOrSIREN:"SIRET or SIREN","RNA/SIREN/SIRETNumber":"RNA number/SIREN number/SIRET number",firmenbuchnummer:"Firmenbuchnummer",firmenbuchnummerOrZVR:"Firmenbuchnummer or ZVR number","stepsX/YofForm":"Step %{activeFormIndex}/ %{totalForms} of %{taskName}",areYouPartOfTrust:"Are you part of a trust?",isBusinessPartOfTrust:"Is your business part of a trust?",no:"No",yes:"Yes",isPartOfTrust:"Is part of a trust",informationCouldNotBeSubmitted:"Information couldn\u2019t be submitted",fieldHasUnsupportedFormats:"%{fieldName} has an unsupported format.",updateTheInformation:"Update the information",andResubmit:"and submit again.",someFieldsHaveUnsupportedFormatedUpdateInfoAndResubmit:"Some fields have unsupported formats. Update the information and submit again.",trustType:"Type of trust agreement",cashManagementTrust:"Cash management trust",corporateUnitTrust:"Corporate unit trust",deceasedEstate:"Deceased estate",discretionaryInvestmentTrust:"Discretionary investment trust",discretionaryServicesManagementTrust:"Discretionary services management trust",discretionaryTradingTrust:"Discretionary trading trust",firstHomeSaverAccountsTrust:"First home saver accounts trust",fixedTrust:"Fixed trust",fixedUnitTrust:"Fixed unit trust",hybridTrust:"Hybrid trust",listedPublicUnitTrust:"Listed public unit trust",otherTrust:"Other trust",pooledSuperannuationTrust:"Pooled superannuation trust",publicTradingTrust:"Public trading trust",unlistedPublicUnitTrust:"Unlisted public unit trust",countryOfEstablishment:"Country of establishment",nameOfTrustAgreement:"Name of trust agreement",typeOfTrustAgreement:"Type of trust agreement",weFoundTheFollowingIssues:"We found the following issues:",reviewTheInformationBelowAndCorrectMistakesOr:"Review the information below and correct any mistakes, or",uploadTheRequestedDocuments:"upload the requested documents",uploadTheFollowingDocuments:"upload the following documents:",uploadDocumentAndDocument:"%{uploadDocumentOne} and %{documentTwo}",thenResubmit:"Then resubmit.",isTrustOperationAddressSame:"Is there a different address for your trust's operations?",trustDetails:"Trust Details",trustDetailsDescription:"To prepare your account, we need information about your trust.",provideTrustDetails:"Enter trust details",addTrustMembers:"Add trust members",trustDocument:"Trust document",trustDocumentDescription:"We won\u2019t be able to verify your trust without all required information. Make sure the following information is visible on your document:",nameOfTrust:"Name of trust",fullLegalNamesOfAnyAppointers:"Full legal name of any appointers included in the deed",dateDeedWasSigned:"Date deed was signed",settlerDetailsIncl:"Settlor details including their full legal name and home address",trusteeDetailsIncl:"Trustee details including full legal name, CAN or ABN, and address",beneficiariesDetailsIncl:"Beneficiaries details including number of beneficiaries, full legal names, and any default beneficiaries",trustMembers:"Trust members",trustMembersDescription:"Provide information for the secondary trustee, settlor, protector and beneficiary associated with the trust contract.",trustee:"Trustee",beneficiary:"Beneficiary",protector:"Protector",settlor:"Settlor",ultimateBeneficialOwner:"Ultimate beneficial owner",addTrustMember:"Add trust member",beneficialOwnersOfTrustProperty:"The beneficial owners of the trust property.",personAppointmentUnderTrustInstrument:"The person appointed under the trust instrument to direct or restrain the trustees in relation to their administration of the trust.",legalOwnerOfProperty:"The legal owner of the property in trust.",entityEstablishingTrust:"The entity that establishes a trust.",entityOwning25OrMoreOfTrust:"The entity who owns 25% or more of the property in trust.",failedToFetchTrustDetails:"Failed to fetch the trust details",failedToFetchTrustMemberDetails:"Failed to fetch the trust member details",failedToFetchLegalEntityDetails:"Failed to fetch the legal entity's details",editTrustMember:"Edit details of %{trustMember} ",removeTrustMember:"Remove %{trustMember}",successFullyRemovedTrustMember:"Successfully removed trust member",failedToRemoveTrustMember:"Failed to remove trust member",editEntityDetails:"Edit entity details",editOwnerOfTrustMember:"Edit owner of %{trustMember}",editEntityOwner:"Edit owner details",addEntityOwner:"Add owner details",addOwnerToTrustMember:"Add owner of %{trustMember}",whatTypeOfYourMembersEntity:"What\u2019s the type of your member\u2019s entity?",naturalPersonTitle:"Natural person",naturalPersonDescription:"He/she doesn\u2019t have any business.",businessEntityTitle:"Business entity",businessEntityDescription:"This is usually a sole proprietor, private company, public corporation, partnership, or non profit.",roleAndEntityType:"Role and entity type",helpUsVerifyCompany:"Help us verify this company.",providePersonalDetailsOfOwner:"Please provide the personal details of the owner.",memberDetails:"Member details",good:"Good",notCutOff:"Not cut off",notBlurry:"Not blurry",notExpired:"Not Expired",noGlare:"No glare",selectDocumentType:"Select document type",registrationDocumentSubTitle:"Upload your company\u2019s business registration document. We need to see this document so we can verify your company.",documentIssuedByGovernmentAuthority:"The document has to be issued by a government authority. It\u2019s usually given when a business is created at the local commercial register",uploadTaxationDocument:"Upload a a tax return or taxation registration document. We need to see this document so we can verify that your tax ID number belongs to your company.",containsNameOfCompany:"Contains the name of your company or organization",documentShowsTaxIdOfCompany:"The document shows the tax ID number of the company",issuedByTheTaxAuthority:"Issued by the tax authority or government of the country where the company is registered",providePageWithPhotoAndCode:"Provide the page with the photo, including the code on the bottom",constitutionalDocument:"Constitutional document",solePropDetails:"Sole proprietor details",enterSoleProprietorDetails:"Enter sole proprietor details",selectAccountHolder:"Select account holder",nameOfBankAccountHolder:"We need to know about the bank account where you want to receive your payouts. What is the name of the account holder of that bank account?",myName:"My name",myNameDescription:"It\u2019s a personal bank account held in my own name",mySoleTraderName:"My sole trader name",mySoleTraderNameDescription:"The account is in my name, but I am registered as a sole trader, sole proprietor, or freelancer",theCompanyIWorkFor:"The company I work for",theCompanyIWorkForDescription:"It is a company bank account for a private, public, or non-profit organization",aTrust:"A trust",aTrustDescription:"The account belongs to a trust, a trustee controls the account for the benefit of a beneficiary",aPartnership:"A partnership",aPartnershipDescription:"The account belongs to a jointly owned business where two or more people operate and share profits",anAssociation:"An association",anAssociationDescription:"The account belongs to a group of people acting together for a specific non-commercial purpose",legalNameOfSoleProprietor:"Legal name of sole proprietor",failedToFetchSoleProp:"Failed to fetch the sole propietor",uniqueIdentificationCode:"\u0415\u0418\u041a, Unique Identification Code (UIC)",identifikacionenNomerDDS:"VAT number (\u0414\u0414\u0421)",MBS:"Mati\u010dni broj subjekta trgova\u010dkog suda (MBS)",PDVIdBrojOIB:"PDV Id. Broj OIB",cyRegistrationNumber:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u0395\u03b3\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2",arithmosEngraphes:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u0395\u03b3\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2 \u03a6.\u03a0.\u0391.","CVR-nummer":"CVR-nummer",momsregistreringsnummerOrStamregister:"Momsregistreringsnummer (CVR) or Stamregister erhverv (SE-nummer)",registrikood:"Registrikood",kaibemaksukohustuslaseNumber:"K\xe4ibemaksukohustuslase number","Y-TUNNUS":"Y-TUNNUS",arvonlisaveronumeroMervardesskattenummer:"Arvonlis\xe4veronumero Merv\xe4rdesskattenummer","GEMI-number":"GEMI number or \u0391\u03a1\u0399\u0398\u039c\u039f\u03a3 \u0393.\u0395.\u039c\u0397 (\u0393\u03b5\u03bd\u03b9\u03ba\u03bf\u03c5\u0301 \u0395\u03bc\u03c0\u03bf\u03c1\u03b9\u03ba\u03bf\u03c5\u0301 \u039c\u03b7\u03c4\u03c1\u03c9\u0301\u03bf\u03c5)",grTaxId:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03a6\u03bf\u03c1\u03bf\u03bb\u03bf\u03b3\u03b9\u03ba\u03bf\u03cd \u039c\u03b7\u03c4\u03c1\u03ce\u03bf\u03c5 Arithm\xf3s Forologikou M\u0113tr\u1e53ou (\u0391\u03a6\u039c)",huRegistrationNumber:"Ce\u0301gjegyze\u0301ksza\u0301m",huTaxId:"K\xf6z\xf6ss\xe9gi ad\xf3sz\xe1m",valueAddedTaxIdentificationNumber:"Value added tax identification number (VAT)",lvRegistrationNumber:"Komersanta re\u0123istr\u0101cijas numurs (NBR)",lvTaxId:"Pievienot\u0101s v\u0113rt\u012bbas nodok\u013ca re\u0123istr\u0101cijas numurs (PVN)",ltRegistrationNumber:"Juridini\u0173 asmen\u0173 registro kodas",PVMmoketojoKodas:"PVM mok\u0117tojo kodas",luRegistrationNumber:"Num\xe9ro registre de commerce et des soci\xe9t\xe9s (RCS)",numeroDIdentificationALATaxe:"Num\xe9ro d'identification \xe0 la taxe sur la valeur ajout\xe9e (No. TVA)",numarOrdineRegistrulComertului:"Numar de ordine in registrul comertului",codulDeIdentificareFiscala:"Codul de identificare fiscal\u0103 (CIF)",skRegistrationNumber:"Identifikac\u030cne\u0301 c\u030ci\u0301slo (I\u010cO)",skTaxId:"Identifika\u010dn\xe9 \u010d\xedslo pre da\u0148 z pridanej hodnoty (I\u010c DPH)",siRegistrationNumber:"Mati\u010dna \u0161tevilka",siTaxId:"Identifikacijska \u0161tevilka za DDV (ID za DDV)","unternehmens-Identifikationsnummer":"Unternehmens-Identifikationsnummer (UID), Num\xe9ro d\u2019identification des entreprises (IDE), Numero d\u2019identificazione delle imprese (IDI), or CH-number",Mehrwertsteuernummer:"Mehrwertsteuernummer (MwST), Num\xe9ro de TVA, Numero dell\u2019imposta sul valore aggiunto (IVA), VAT number",Xdigits:"%{digits} digits",XtoYdigits:"%{x} to %{y} digits",XorYdigits:"%{x} or %{y} digits",Xcharacters:"%{x} characters","9digitsOr14digits":"9 digits or 14 digits","1character5to7digits":"1 letter + 5-7 digits",Wchar9or14digits:"W123456789, 9 or 14 digits","1char8digits":"X99999999","2characteres6or7digits":"11 digits, XX123456 or XX1234567","7or8or12characteres":"7, 8 or 12 digits or characters",Cchar5digits:"C99999",cop1to8digits:"C, O, or P, followed by a number from 1 up to 8 digits",selectAccountHolderDescription:"We need to know about the bank account where you want to receive your payouts. What is the name of the account holder of that bank account?","8digitsOptional-":'8 digits; last digit can be preceded by an optional "-"',provideAllOwners:"Provide <strong>all owners</strong> holding 25% or more of your company.",ifNoOwnersSpecifyControllingPersons:"If you don\u2019t have any owners holding 25% or more, then specify <strong>all controlling persons</strong>. Otherwise you can skip this.",provideAtLeastOneSignatory:"Provide at least <strong>1 signatory</strong>.",provideOneControllingPerson:"Provide <strong>1 controlling person</strong>.",textToVerifyAccount:"For you to receive your payouts, we need a verified bank account.",mobileApplication:"Mobile Application",onOnlineBankingEnvironment:"Or web version of online banking environment",dontHaveAccessOnlineBanking:"Don\u2019t have access to online banking environment?",confirmPayoutManually:"Confirm the payout account manually",noteManualTakesLonger:"Note that manual review takes longer.",accountVerification:"Account Verification",verifyWith:"Verify with",documentVerification:"Document verification",weNeedToSeeAGovermentIssuedPhotoId:"We need to see your ID so we can verify your identity. You\u2019ll be asked to take a photo of the original document with your phone (no scans or copies!) for instant verification on our verification partner\u2019s secure upload page.",youHaveSuccessfullyProvidedTheIdDocument:"You\u2019ve successfully provided the ID document.",submitIdDocumentsAgain:"Submit ID documents again",doYouHaveTheIdDocumentByHand:"Do you have the ID document by hand?",goThroughInstantVerification:"Go through instant verification",madeAMistake:"Made a mistake?",canNotCompleteInstantVerification:"Can not complete instant verification?",goBackAndProvideDocumentScans:"Go back and provide document scans",acceptedIdDocuments:"Accepted ID documents:",identityCard:"Identity card",IDontHaveAnIdDocumentAvailable:"I don\u2019t have an ID document available on hand.",weTakeYourSecurityVerySeriously:"We take your security very seriously. This personal data is stored securely and only used for identity verification purposes.",uploadOneOfTheFollowing:"Upload one of the following so we can verify your information:",documentIssuedWithinLastYear:"Note! The document needs to be issued within the last year. If it is older, make sure it contains a signature and a state of affair not older than a year.",learnMore:"Learn more.",doingBusinessAsNameFiling:"Doing business as-name filling",taxFiling:"Tax-filling",continueAsCompany:"Continue as a company?",continueAsIndividual:"Continue as an individual?",indicatedPayoutToCompany:"You indicated that you want to be paid out to a bank account that is owned by a company, such as a private company, public company, partnership, or non-profit organization. This means that we need to collect some information about your company too.",continueSigningUpAsCompany:"Do you want to continue signing up with your company information?",indicatedPayoutToPersonalAccount:"You indicated that you want to be paid out to a bank account that is owned by you personally. This means you will continue as an individual, not a company. However, if you operate as a private company, public company, partnership, or non-profit organization, then you cannot continue as an individual.",continueSigningUpAsIndividual:"Do you want to continue signing up as an individual?",continue:"Continue",noGoBack:"No, go back",continueCompany:"Continue as company",continueIndividual:"Continue as individual",addManually:"Add manually",searchAddress:"Search address",startTypingTheAddress:"Start typing the address",addresses:"Addresses",loading:"Loading",incorporationNumber:"Incorporation number",socialInsuranceNumber:"Social insurance number",navigateToManualUpload:"Navigate to manual flow for uploading documents",navigateToInstantVerification:"Navigate to instant verification flow",verificationMethod:"Verification Method",verifyViaMobileBankAppOrBankWebsite:"Verify the account via mobile bank app or bank website",provideAccountDetailsAndUploadBankStatement:"Provide account details and upload a scan of a bank statement",instantVerificationDescription:"To quickly and safely verify the account you need access to the online banking environment associated with this account holder.",manualVerificationDescription:"Manually provide your account details and upload a bank statement.",poweredBy:"Powered by",youSuccessfullyVerifiedAccount:"You\u2019ve successfully verified your bank account.",verifyBankAccountAgain:"Verify bank account again",accountName:"Account name",mayTakeAFewHoursOrDays:"May take a few hours or days",instant:"Instant",tink:"Tink",trustly:"Trustly",isOurTrustedPartnerHelpingSpeedUpSetup:"%{provider} is our trusted partner helping speed up your account setup by instantly verifying your bank account.",howDoesVerificationWithOurPartnerWorks:"How does verification with our partner %{provider} work?",selectTheBankToReceivePayouts:"After this page, you can select the bank where you would like to receive the payouts.",loginIntoYourBankingEnvironment:"Log into your banking environment via mobile app or internet browser.",yourBankWillConfirmYourAccountDetails:"Your bank will confirm your account details to us.",adyenWillOnlyGetTemporaryAccess:"Adyen will only gain temporary access to your bank details, and your data is never shared with third parties.",instantVerification:"Instant verification",xCharactersLeft:"%{charactersLeft} characters left",goBack:"Go back",doNotHaveABN:"I do not have an ABN","doNotHaveUEN/GST":"I do not have an/a UEN/GST","doNotHaveIRD/GST":"I do not have an/a IRD/GST",businessRegistrationNumber:"Business Registration Number",doNotHaveBusinessRegistrationNumber:"I do not have a Business Registration Number","UEN/GST":"Unique Entity Number (UEN)/Goods and Services Tax (GST)","IRD/GST":"Inland Revenue Department Number (IRD No)/Goods and Services Tax (GST)",enterNameExactlyAsAppearInID:"Enter your first name(s) exactly as it appears on your identity document",enterLastNameExactlyAsAppearInID:"Enter your last name(s) exactly as it appears on your identity document",errorMessage_1_10:"Information couldn\u2019t be verified",errorMessage_1_11:"Document didn\u2019t meet requirements",errorMessage_1_12:"Legal entity declined",errorMessage_1_30:"Individual details couldn't be verified",errorMessage_1_31:"ID document is needed",errorMessage_1_32:"ID document couldn\u2019t be processed",errorMessage_1_33:"ID document didn\u2019t meet requirements",errorMessage_1_34:"Image of the ID document didn\u2019t meet requirements",errorMessage_1_35:"Individual details didn't match the ID document",errorMessage_1_36:"Proof of residency didn\u2019t meet requirements",errorMessage_1_37:"Image of the proof of residency didn't meet the requirements",errorMessage_1_38:"Individual details didn't match the proof of residency",errorMessage_1_39:"Proof of national ID number didn't meet requirements",errorMessage_1_40:"Image of the proof of national ID number didn't meet the requirements",errorMessage_1_41:"Individual details didn't match the proof of national ID number",errorMessage_1_50:"Organization details couldn\u2019t be verified",errorMessage_1_51:"Organization details didn't match the document",errorMessage_1_52:"Registration document didn\u2019t meet requirements",errorMessage_1_53:"Tax document didn't meet requirements",errorMessage_1_54:"Proof of address didn't meet requirements",errorMessage_1_55:"Proof of ownership is needed",errorMessage_1_56:"Organization ownership couldn't be verified",errorMessage_1_57:"Submitted affiliation document didn't meet the requirements",errorMessage_1_60:"Legal entity details couldn't be verified",errorMessage_1_61:"Constitutional document didn't meet requirements",errorMessage_1_62:"Legal entity details didn't match the constitutional document",errorMessage_1_70:"Bank account couldn't be verified",errorMessage_1_71:"Bank account details couldn't be verified",errorMessage_1_72:"Verification could not be completed",errorMessage_1_73:"Bank account access could not be authenticated",errorMessage_1_74:"Bank statement is needed",errorMessage_1_75:"Bank statement didn\u2019t meet requirements",errorMessage_1_76:"Bank details didn't match the bank statement",errorMessage_1_1000:"Verification failed. Legal entity declined",errorMessage_1_1001:"There were some technical issues in the verification process.",errorMessage_1_1002:"There are more questions about the submitted information.",errorMessage_1_1003:"The document contained sensitive data.",errorMessage_1_3000:"The user couldn't be verified.",errorMessage_1_3001:"The name and date of birth couldn't be verified.",errorMessage_1_3002:"The name and national ID number couldn't be verified.",errorMessage_1_3003:"The name and residence state couldn't be verified.",errorMessage_1_3004:"The name and residence country couldn't be verified.",errorMessage_1_3005:"The national ID number was entered incorrectly.",errorMessage_1_3006:"The name didn't match the national ID number.",errorMessage_1_3007:"An incorrect national ID number was entered.",errorMessage_1_3008:"The ID document image was incomplete.",errorMessage_1_3009:"The photo on the ID document couldn\u2019t be recognized.",errorMessage_1_3010:"The ID document image was incomplete or too blurry.",errorMessage_1_3011:"The ID document image was in black and white.",errorMessage_1_3012:"The image couldn\u2019t be recognized as a supported ID document.",errorMessage_1_3013:"The ID document wasn't a supported document type.",errorMessage_1_3014:"The ID document image didn\u2019t contain the MRZ code.",errorMessage_1_3015:"The ID document was expired.",errorMessage_1_3016:"The ID document image was of too low quality.",errorMessage_1_3017:"The ID document image was a scan.",errorMessage_1_3018:"The ID document image was too blurry.",errorMessage_1_3019:"The ID document was expired.",errorMessage_1_3020:"The ID document wasn't a supported document type.",errorMessage_1_3021:"The ID document MRZ code is unreadable.",errorMessage_1_3022:"The ID document image only showed one side of the ID document.",errorMessage_1_3023:"The ID document image only showed parts of the ID document.",errorMessage_1_3024:"The ID document wasn't valid.",errorMessage_1_3025:"The state didn\u2019t match the one on the ID document.",errorMessage_1_3026:"The ID document didn\u2019t show an issuing state.",errorMessage_1_3027:"The ID document wasn't valid.",errorMessage_1_3028:"The ID number didn\u2019t match the one on the document.",errorMessage_1_3029:"The ID document didn\u2019t show a document number.",errorMessage_1_3030:"The ID document wasn't valid.",errorMessage_1_3031:"The ID document wasn't valid.",errorMessage_1_3032:"The first name didn\u2019t match the one on the ID document.",errorMessage_1_3033:"The last name didn\u2019t match the one on the ID document.",errorMessage_1_3034:"The date of birth didn\u2019t match the one on the ID document.",errorMessage_1_3035:"The country didn\u2019t match the one on the ID document.",errorMessage_1_3036:"The ID document image was too low quality.",errorMessage_1_3037:"The last name didn't match the one on the proof of residential address.",errorMessage_1_3038:"The first name didn\u2019t match the one on the proof of residential address.",errorMessage_1_3039:"The date of birth didn\u2019t match the one on the proof of residential address.",errorMessage_1_3040:"The proof of residential address didn\u2019t show the date it was issued.",errorMessage_1_3041:"The proof of residential address didn\u2019t show a name.",errorMessage_1_3042:"The proof of residential address didn't show an issuing country.",errorMessage_1_3043:"The proof of residential address wasn't a supported document type.",errorMessage_1_3044:"The proof of residential address was too old.",errorMessage_1_3045:"The proof of residential address image was of too low quality.",errorMessage_1_3046:"The address on the proof of residential address was a PO box.",errorMessage_1_3047:"The proof of national ID number wasn't a supported document type.",errorMessage_1_3048:"The last name didn\u2019t match the one on the proof of national ID number.",errorMessage_1_3049:"The first name didn\u2019t match the one on the proof of national ID number.",errorMessage_1_3050:"The date of birth didn\u2019t match the one on the proof of national ID number.",errorMessage_1_3051:"The proof of national ID number image was of too low quality.",errorMessage_1_3062:"The name and 4 digit SSN couldn't be verified.",errorMessage_1_5000:"The legal business name couldn't be verified.",errorMessage_1_5001:"The tax ID number couldn't be verified.",errorMessage_1_5002:"The state couldn't be verified.",errorMessage_1_5003:"The legal name didn't match the one on the registry.",errorMessage_1_5004:"The legal name didn't match the one on the registry.",errorMessage_1_5005:"The legal name didn't match the one on the registry.",errorMessage_1_5006:"The country didn't match the one on the registry.",errorMessage_1_5007:"The registration number didn't match the one on the registry.",errorMessage_1_5008:"The tax ID didn't match the one on the registry.",errorMessage_1_5009:"The registration number was provided as tax ID.",errorMessage_1_5010:"The company details couldn't be verified. ",errorMessage_1_5011:"The trade name (doing business as) was entered.",errorMessage_1_5012:"The submitted company type didn\u2019t match the one on the registry.",errorMessage_1_5013:"The company was not found in the database.",errorMessage_1_5014:"The registration number couldn't be verified. ",errorMessage_1_5015:"The registration number didn't match the legal business name.",errorMessage_1_5016:"The tax ID number couldn't be verified.",errorMessage_1_5017:"The tax ID number didn't match the legal business name.",errorMessage_1_5018:"The business address couldn't be verified.",errorMessage_1_5019:"The trade name (doing business as) was entered instead of the legal name.",errorMessage_1_5020:"Registration document is missing.",errorMessage_1_5021:"The registration document was too low quality.",errorMessage_1_5022:"The registration document was too old.",errorMessage_1_5023:"The submitted company type didn't match the one on the registration document.",errorMessage_1_5024:"The registration document did not show the company type.",errorMessage_1_5025:"The address on the company registration document was a residential address.",errorMessage_1_5026:"The address on the company registration document was a PO box.",errorMessage_1_5027:"The business address didn't match the one on the company registration document.",errorMessage_1_5028:"The registration number didn't match the one on the company registration document.",errorMessage_1_5029:"The legal business name didn't match the one on the company registration document.",errorMessage_1_5030:"The country didn't match the one on the company registration document.",errorMessage_1_5031:"The company registration document didn't show a legal business name.",errorMessage_1_5032:"The company registration document didn't show a registration number.",errorMessage_1_5033:"The state didn't match the one on the company registration document.",errorMessage_1_5034:"The company registration document wasn't a supported document type.",errorMessage_1_5035:"The company registration document is not supported.",errorMessage_1_5036:"Tax document is missing.",errorMessage_1_5037:"The country didn't match the one on the tax document.",errorMessage_1_5038:"The tax document wasn't a supported document type.",errorMessage_1_5039:"The tax document was too low quality.",errorMessage_1_5040:"The tax document was too old.",errorMessage_1_5041:"The legal name didn't match the one on the tax document.",errorMessage_1_5042:"The tax ID number didn't match the legal business name.",errorMessage_1_5043:"The tax document didn't show a tax ID number.",errorMessage_1_5044:"The tax document didn't show a legal business name.",errorMessage_1_5045:"The state didn't match the one on the proof of address.",errorMessage_1_5046:"Ownership data seems incorrect.",errorMessage_1_5047:"Ownership data seems to be missing.",errorMessage_1_5048:"Provide official ownership documentation.",errorMessage_1_5049:"The affiliation document was not sufficient to prove the 100% affiliation.",errorMessage_1_5050:"The affiliation document was not official.",errorMessage_1_5051:"Signing person on the affiliation document could not be verified",errorMessage_1_5052:"The affiliation document verifies the payout entity is not 100% affiliated with the company. Setup can't be continued.",errorMessage_1_5053:"The affiliation document was not issued within the last 6 months",errorMessage_1_6000:"The legal name couldn't be verified.",errorMessage_1_6001:"The legal name didn't match the registration number.",errorMessage_1_6002:"The registration number couldn't be verified.",errorMessage_1_6003:"Legal entity type couldn't be verified.",errorMessage_1_6004:"The country of governing law couldn't be verified.",errorMessage_1_6005:"Constitutional document is missing.",errorMessage_1_6006:"The constitutional document was too old.",errorMessage_1_6007:"Legal name didn't match the constitutional document.",errorMessage_1_6008:"Country of governing law didn't match the constitutional document.",errorMessage_1_6009:"The constitutional document didn't show a legal name.",errorMessage_1_6010:"The constitutional document didn't show a registration number.",errorMessage_1_6011:"The legal entity type didn't match the one on the constitutional document.",errorMessage_1_7000:"The bank account couldn't be verified.",errorMessage_1_7001:"The routing number wasn't valid.",errorMessage_1_7002:"The bank account number wasn't valid.",errorMessage_1_7003:"The bank account couldn't be verified.",errorMessage_1_7004:"The bank account entered was invalid.",errorMessage_1_7005:"The verification code wasn't valid.",errorMessage_1_7006:"There were too many attempts to request the verification code.",errorMessage_1_7007:"The verification code wasn't entered.",errorMessage_1_7008:"There is no bank document to verify.",errorMessage_1_7009:"The bank document didn't show a bank account number.",errorMessage_1_7010:"The bank document didn't show the account owner name.",errorMessage_1_7011:"The bank account number didn't match the one on the bank document.",errorMessage_1_7012:"The bank account owner name appearing in the document does not match the verified legal name.",errorMessage_1_7013:"The bank document was too low quality.",errorMessage_1_7014:"The bank document wasn't a supported document type.",errorMessage_1_7015:"The bank account country didn't match the one on the bank document.",errorMessage_1_7016:"The branch code didn\u2019t match the one on the bank document.",errorMessage_1_7017:"The bank account currency didn't match the one on the bank document.",errorMessage_1_7018:"The bank document wasn't officially issued by the bank.",errorMessage_1_7019:"The bank document wasn't issued in the past 12 months.",errorMessage_1_7020:"The bank name didn't match the one on the bank document.",errorMessage_1_7021:"The bank document didn't show an official bank logo.",errorMessage_1_7022:"The bank document didn't show an official bank stamp.",remediationMessage_1_100:"No remediation possible",remediationMessage_1_101:"Contact Support",remediationMessage_1_102:"Upload a different document",remediationMessage_1_300:"Update individual details",remediationMessage_1_301:"Upload an ID document",remediationMessage_1_302:"Upload a different ID document",remediationMessage_1_303:"Upload a different image of the ID document",remediationMessage_1_304:"Upload proof of residency",remediationMessage_1_305:"Upload a different proof of residency",remediationMessage_1_306:"Upload a different image of the proof of residency",remediationMessage_1_307:"Upload a proof of national ID number",remediationMessage_1_308:"Upload a different proof of national ID number",remediationMessage_1_309:"Upload a different image of the proof of national ID number",remediationMessage_1_316:"Provide complete 9-digits Social Security Number number or upload an ID document if you don\u2019t have SSN.",remediationMessage_1_500:"Update organization details",remediationMessage_1_501:"Upload a registration document",remediationMessage_1_502:"Upload a different registration document",remediationMessage_1_503:"Upload a tax document",remediationMessage_1_504:"Upload a different tax document",remediationMessage_1_505:"Upload a proof of address",remediationMessage_1_506:"Upload a different proof of address",remediationMessage_1_507:"Update organization ownership details",remediationMessage_1_508:"Upload a proof of ownership",remediationMessage_1_509:"Upload a different affiliation document",remediationMessage_1_510:"Ensure signing person has the rights to represent the organization or is a listed professional member (lawyer, accountant) in your country of business and upload the right document",remediationMessage_1_511:"Upload a document that proves the payout entity is 100% affiliated with the legal entity",remediationMessage_1_600:"Update legal entity details",remediationMessage_1_601:"Upload a constitutional document",remediationMessage_1_602:"Upload a different constitutional document",remediationMessage_1_700:"Update bank account details",remediationMessage_1_701:"Use different bank account",remediationMessage_1_702:"Use other means of bank account verification",remediationMessage_1_703:"Upload a bank statement",remediationMessage_1_704:"Upload a different bank statement",remediationMessage_1_705:"Upload an official bank statement",sameNameAsLegalName:"Same as legal name of the company",whereCanIFindTheseNumbersOnMyDriversLicense:"Where can I find these numbers on my driver's license?",whereToFindNumbersOnDriversLicense:"Depending on the issuing state the position of these numbers might differ, but the license number is always on the front side of the card and the card number is in most cases located on the back of the license.",iStillCantFindIt:"I still can't find it.",patriotActDisclosureTitle:"Important Information You Need to Know About Opening An Account",patriotActDisclosureTextParagraph1:"To help the government fight the funding of terrorism and money laundering activities, Federal law requires financial institutions to obtain, verify, and record information that identifies each person (individual or entity) who opens an account and certain individuals who are associated with an account.",patriotActDisclosureTextParagraph2:"What this means: when you open an account, we will ask for your name, address, taxpayer identification number and other information that will allow us to identify you."},l={},d={},c="countries",u=e=>`states/${e}`,m="phone-prefixes",p="translations";function g(e){return{getCountryName:t=>{const a=b(c,e);return y(a,t)},getStateName:(t,a)=>{const r=b(u(a),e);return y(r,t)},getPhonePrefix:t=>{const a=b(m,e);return y(a,t)},setDataset:(t,a)=>{const r=b(t,e);d[r]=a},getDataset:t=>{const a=b(t,e);return d[a]},getDatasetKey:t=>b(t,e)}}const y=(e,t)=>{if(d[e]){const a=(e=>(l[e]||(l[e]={},d[e].forEach((({id:t,name:a})=>{l[e][t]=a}))),l[e]))(e);return a[t]}return null},b=(e,t)=>`${e}_${t}`.toLowerCase(),f="fetch"in window?window.fetch:e.fetch;function h(e,t){switch(t){case"silent":return null;case"info":case"warn":case"error":return console[t](e);default:throw new Error(e)}}function v(e,t,a="json"){const{errorLevel:r="warn",loadingContext:n,path:i,clientKey:o=""}=e,s=function(e,t){const{headers:a=[],method:r="GET"}=e;return Object.assign({method:r,mode:"cors",cache:"default",credentials:"same-origin",headers:Object.assign({Accept:"application/json, text/plain, */*","Content-Type":"POST"===r?"application/json":"text/plain"},a),redirect:"follow",referrerPolicy:"no-referrer-when-downgrade"},t&&{body:JSON.stringify(t)})}(e,t),l=function(e,t,a){let r=`${e}${t}`;return a&&(r+=`?clientKey=${a}`),r}(n,i,o);return f(l,s).then((t=>{if(t.ok)return t[a]();const n=e.errorMessage||`Service at ${l} is not available`;return e.errorHandler?e.errorHandler(t[a]()):h(n,r)})).catch((t=>h(e.errorMessage||`Call to ${l} failed. Error= ${t}`,r)))}function _(e,t){return v(Object.assign(Object.assign({},e),{method:"GET"}),t)}function N(e,t){return v(Object.assign(Object.assign({},e),{method:"POST"}),t)}function O(e,t,a,r){const n=g(a),i=n.getDataset(e);if(i)return new Promise((e=>e(i)));return _({loadingContext:t,errorLevel:"warn",errorMessage:`Dataset ${e} is not available`,path:a?`datasets/${e}/${a}`:`datasets/${e}`,clientKey:r}).then((t=>(n.setDataset(e,t),t)))}const I=e=>e.toLowerCase().substring(0,2);function E(e){const t=e.replace("_","-");if(new RegExp("([a-z]{2})([-])([A-Z]{2})").test(t))return t;const[a,r]=t.split("-");if(!a||!r)return null;const n=[a.toLowerCase(),r.toUpperCase()].join("-");return 5===n.length?n:null}function T(e,t=[]){if(!e||e.length<1||e.length>5)return o;const a=E(e);return t.indexOf(a)>-1?a:function(e,t){return e&&"string"==typeof e&&t.find((t=>I(t)===I(e)))||null}(a||e,t)}const A=(e,t)=>e.replace(/%{(\w+)}/g,((e,a)=>{var r,n;return null!==(n=null===(r=t[a])||void 0===r?void 0:r.toString())&&void 0!==n?n:""}));class S{constructor(){this.translations=s}get(e,t){const a=((e,t,a={values:{},count:0})=>{const r=`${t}__plural`,n=e=>`${t}__${e}`;return Object.prototype.hasOwnProperty.call(e,n(a.count))?A(e[n(a.count)],a.values):Object.prototype.hasOwnProperty.call(e,r)&&a.count>1?A(e[r],a.values):Object.prototype.hasOwnProperty.call(e,t)?A(e[t],a.values):null})(this.translations,e,t);return null!==a?a:e}date(e,t={}){return new Date(e).toLocaleDateString(this.locale,Object.assign({year:"numeric",month:"2-digit",day:"2-digit"},t))}initialize({customTranslations:e={},locale:t=o,allowedLocales:a=[],loadingContext:r,clientKey:n}){return i(this,void 0,void 0,(function*(){this.customTranslations=function(e={},t){return Object.keys(e).reduce(((a,r)=>{const n=E(r)||T(r,t);return n&&(a[n]=e[r]),a}),{})}(e,a);const i=Object.keys(this.customTranslations);this.supportedLocales=[...a,...i].filter(((e,t,a)=>a.indexOf(e)===t)),this.locale=E(t)||T(t,this.supportedLocales),yield this.loadTranslations({locale:this.locale,loadingContext:r,clientKey:n})}))}loadTranslations({locale:e=this.locale,loadingContext:t,clientKey:a}){return i(this,void 0,void 0,(function*(){let r;!this.supportedLocales.includes(e)&&(e=o),r=e===o?Object.assign(Object.assign({},s),!!this.customTranslations[e]&&this.customTranslations[e]):yield(({locale:e,loadingContext:t,clientKey:a,customTranslations:r={}})=>i(void 0,void 0,void 0,(function*(){let n={};try{n=yield O(p,t,e,a)}catch(e){console.error(e)}return Object.assign(Object.assign(Object.assign({},s),n),!!r[e]&&r[e])})))({locale:e,loadingContext:t,clientKey:a,customTranslations:this.customTranslations});const n=(e=>{if(!e)return"";const[t]=e.split("-");return t})(e);return this.locale=e,this.translations=r,this.languageCode=n,r}))}}var C=0;function R(e,a,r,n,i){var o,s,l={};for(s in a)"ref"==s?o=a[s]:l[s]=a[s];var d={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--C,__source:i,__self:n};if("function"==typeof e&&(o=e.defaultProps))for(s in o)void 0===l[s]&&(l[s]=o[s]);return t.options.vnode&&t.options.vnode(d),d}class D{constructor(){this.events={},this.on=(e,t)=>{this.events[e]=this.events[e]||[],this.events[e].push(t)},this.off=(e,t)=>{this.events[e]&&(this.events[e]=this.events[e].reduce(((e,a)=>(a!==t&&e.push(a),e)),[]))},this.emit=(e,t)=>{this.events[e]&&this.events[e].forEach((e=>{e(t)}))}}}function k(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}class L{constructor(e){this._id=`${this.constructor.type}-${k()}`,this.eventEmitter=new D,this._resizeObserver=null,this.props=this.formatProps(Object.assign(Object.assign({},this.constructor.defaultProps),e)),this._parentInstance=this.props._parentInstance,this._node=null,this.state={}}formatProps(e){return e}formatData(){return{}}setState(e){this.state=Object.assign(Object.assign({},this.state),e)}get data(){return Object.assign({},this.formatData())}render(){throw new Error("Kyc Forms cannot be rendered")}observeContainerSize(e){window.ResizeObserver&&(this._resizeObserver=new ResizeObserver((t=>{this.assignLayout(t,e)})),this._resizeObserver.observe(e))}assignLayout(e,t){return null}mount(e){const a="string"==typeof e?document.querySelector(e):e;if(!a)throw new Error("Component could not mount. Root node was not found.");if(this._node)throw new Error("Component is already mounted.");return this._node=a,this._component=this.render(),this.observeContainerSize(a),t.render(this._component,a),this}update(e){return this.props=this.formatProps(Object.assign(Object.assign({},this.props),e)),this.state={},this.unmount().remount()}updateLocale(e){this.eventEmitter.emit("updateLocale",e)}remount(e){if(!this._node)throw new Error("Component is not mounted.");const a=e||this.render();return t.render(a,this._node,null),this}unmount(){return this._node&&t.render(null,this._node),this._resizeObserver&&(this._resizeObserver=this._resizeObserver.disconnect()),this}remove(){this.unmount(),this._parentInstance&&this._parentInstance.remove(this)}}L.defaultProps={};var w=new class{constructor(){return this.queue=[],this.subscriptions=new Set,this}add(...e){this.queue.push(...e)}notifySubscribers(){for(;this.queue.length>0;){const e=this.queue.pop();this.subscriptions.forEach((t=>t(e)))}}addEvent(e,t){this.add(["add_event",Object.assign({key:e},t)]),this.notifySubscribers()}addPageView(e){this.add(["track_pageview",e]),this.notifySubscribers()}startEvent(e){this.add(["start_event",e]),this.notifySubscribers()}endEvent(e,t){this.add(["end_event",t?Object.assign({key:e},t):e]),this.notifySubscribers()}subscribe(e){this.subscriptions.add(e)}unsubscribe(e){this.subscriptions.has(e)&&this.subscriptions.delete(e)}};class P extends L{constructor(e){super(e),e.onUserEvent&&w.subscribe(e.onUserEvent),this.submit=this.submit.bind(this),this.setState=this.setState.bind(this),this.onValid=this.onValid.bind(this),this.onComplete=this.onComplete.bind(this),this.elementRef=e&&e.elementRef||this}setState(e){this.state=Object.assign(Object.assign({},this.state),e),this.onChange()}onChange(){const e=this.isValid,t={data:this.data,errors:this.state.errors,valid:this.state.valid,isValid:e};return this.props.onChange&&this.props.onChange(t,this.elementRef),e&&this.onValid(),t}onValid(){const e={data:this.data};return this.props.onValid&&this.props.onValid(e,this.elementRef),e}submit(){const{onSubmit:e=(()=>{})}=this.props,{data:t,isValid:a}=this;return a?e({data:t,isValid:a},this.elementRef):(this.showValidation(),!1)}onComplete(e){this.props.onComplete&&this.props.onComplete(e,this.elementRef)}showValidation(){return this.componentRef&&this.componentRef.showValidation&&this.componentRef.showValidation(),this}setStatus(e){return this.componentRef&&this.componentRef.setStatus&&this.componentRef.setStatus(e),this}get isValid(){return!1}get displayName(){return this.props.name||this.constructor.type}}const j=t.createContext({i18n:new S,translations:null,setLocale:null,loadingContext:"",clientKey:"",setContextCountry:null,contextCountry:"",setPayoutDefaultCurrency:null,payoutDefaultCurrency:"",commonProps:{},isReview:!1,isLegalEntityPartOfTrust:!1,setIsLegalEntityPartOfTrust:null,setAccountHolder:null,accountHolder:""}),x=e=>{const t=`${`${e}static/fonts`}/adyen-kyc-icons`;((e,t,a,r,n)=>{const i=document.createElement("style");i.setAttribute("type","text/css"),i.innerText=((e,t,a,r,n)=>{const i=[`font-family: '${e}'`,`font-style: ${t}`,`font-weight: ${a}`,`src: url(${r})`],o=[];return n.eot&&o.push(`url(${n.eot}) format('embedded-opentype')`),n.woff&&o.push(`url(${n.woff}) format('woff')`),n.woff2&&o.push(`url(${n.woff2}) format('woff2')`),n.ttf&&o.push(`url(${n.ttf}) format('truetype')`),n.otf&&o.push(`url(${n.otf}) format('opentype')`),o.length>0&&i.push("src: "+o.join(",")+";"),`@font-face {${i.join(";")}}`})(e,t,a,r,n),document.body.insertBefore(i,document.body.firstChild)})("adyen-kyc-icons","normal","normal",`${t}.eot`,{eot:`${t}.eot`,woff:`${t}.woff`,woff2:`${t}.woff2`,ttf:`${t}.ttf`,otf:`${t}.otf`})};function M(e){return"object"==typeof e&&null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function F(...e){const t=M(e[0])?e[0]:e;return{from:e=>t.map((t=>t in e?{[t]:e[t]}:{})).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})}}function V(...e){const t=M(e[0])?e[0]:e;return{from:e=>{const a=Object.keys(e).filter((e=>!t.includes(e)));return F(...a).from(e)}}}function U(e,t){return e.length===t.length&&e.every((function(e){return t.includes(e)}))}const B=(e,t)=>{const a=typeof e;return e&&t&&"object"===a&&a===typeof t?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every((a=>B(e[a],t[a]))):e===t};function W(e){return structuredClone(e)}function H(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e])))}function q(e,{type:t="conjunction",style:a="long",stringify:r=(e=>e.toString())}={}){const n=e.map((e=>r(e)));return new Intl.ListFormat("en",{style:a,type:t}).format(n)}const G=()=>{};function $({loadingContext:e,clientKey:t,country:a,capabilities:r,legalEntityType:n}){return N({loadingContext:e,errorLevel:"warn",errorMessage:"Configuration is not available",path:"v1/configuration",clientKey:t},{capabilities:r,country:a,legalEntityType:n})}class X extends t.Component{constructor(){super(...arguments),this.state={loaded:!1,contextCountry:this.props.contextCountry,payoutDefaultCurrency:"",i18n:this.props.i18n,isLegalEntityPartOfTrust:!1,accountHolder:""},this.setContextCountry=e=>{this.setState({contextCountry:e})},this.setPayoutDefaultCurrency=e=>{this.setState({payoutDefaultCurrency:e})},this.setLocale=({locale:e})=>{var t;this.setState({loaded:!1});const a=null===(t=this.state.i18n)||void 0===t?void 0:t.locale;this.props.i18n.loadTranslations({locale:e,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey}).then((()=>{w.addEvent("Changed page language",{segmentation:{originalLanguage:a,newLanguage:e}}),this.setState({loaded:!0})}))},this.setIsLegalEntityPartOfTrust=e=>this.setState({isLegalEntityPartOfTrust:e}),this.setAccountHolder=e=>{this.setState({accountHolder:e})}}componentDidMount(){return i(this,void 0,void 0,(function*(){const{contextCountry:e,locale:t,loadingContext:a,clientKey:r}=this.props;x(a);try{let n=t;const{locales:i=[]}=yield function({loadingContext:e,clientKey:t}){return _({loadingContext:e,errorLevel:"warn",errorMessage:"Locales configuration is not available",path:"v1/configuration/locales",clientKey:t})}({loadingContext:a,clientKey:r}),{countries:s=[]}=yield function({loadingContext:e,clientKey:t}){return _({loadingContext:e,errorLevel:"warn",errorMessage:"Countries configuration is not available",path:"v1/configuration/countries",clientKey:t})}({loadingContext:a,clientKey:r});if(s&&!s.includes(e))throw new Error(`\n\n"${e}" isn't a supported country. Please use one of the following:\n- ${q(s)}.\n `);i&&!i.includes(t)&&(console.error(`\n"${t}" isn't a supported locale. Please use one of the following:\n- ${q(i)}. falling back to "${o}"`),n=o),this.props.i18n?(yield this.props.i18n.initialize({locale:n,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,customTranslations:this.props.translations,allowedLocales:i}),this.setState({loaded:!0})):this.setState({loaded:!0})}catch(e){console.log(e)}}))}shouldComponentUpdate(e,t){return this.state.contextCountry!==t.contextCountry||this.state.payoutDefaultCurrency!==t.payoutDefaultCurrency||!1===this.state.loaded||this.state.isLegalEntityPartOfTrust!==t.isLegalEntityPartOfTrust||this.state.accountHolder!==t.accountHolder}render({children:e}){return this.state.loaded?R(j.Provider,Object.assign({value:{i18n:this.state.i18n,setLocale:this.setLocale,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,translations:this.props.translations,setContextCountry:this.setContextCountry,contextCountry:this.state.contextCountry,setPayoutDefaultCurrency:this.setPayoutDefaultCurrency,payoutDefaultCurrency:this.state.payoutDefaultCurrency,commonProps:this.props.commonProps||{},isReview:this.props.isReview,isLegalEntityPartOfTrust:this.state.isLegalEntityPartOfTrust,setIsLegalEntityPartOfTrust:this.setIsLegalEntityPartOfTrust,setAccountHolder:this.setAccountHolder,accountHolder:this.state.accountHolder}},{children:t.toChildArray(e)})):null}}var Y,K,z,Z,Q=0,J=[],ee=[],te=t.options.__b,ae=t.options.__r,re=t.options.diffed,ne=t.options.__c,ie=t.options.unmount;function oe(e,a){t.options.__h&&t.options.__h(K,e,Q||a),Q=0;var r=K.__H||(K.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:ee}),r.__[e]}function se(e){return Q=1,le(Ne,e)}function le(e,t,a){var r=oe(Y++,2);if(r.t=e,!r.__c&&(r.__=[a?a(t):Ne(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],a=r.t(t,e);t!==a&&(r.__N=[a,r.__[1]],r.__c.setState({}))}],r.__c=K,!K.u)){K.u=!0;var n=K.shouldComponentUpdate;K.shouldComponentUpdate=function(e,t,a){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!n||n.call(this,e,t,a);var o=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&r.__c.props===e)&&(!n||n.call(this,e,t,a))}}return r.__N||r.__}function de(e,a){var r=oe(Y++,3);!t.options.__s&&_e(r.__H,a)&&(r.__=e,r.i=a,K.__H.__h.push(r))}function ce(e,a){var r=oe(Y++,4);!t.options.__s&&_e(r.__H,a)&&(r.__=e,r.i=a,K.__h.push(r))}function ue(e){return Q=5,me((function(){return{current:e}}),[])}function me(e,t){var a=oe(Y++,7);return _e(a.__H,t)?(a.__V=e(),a.i=t,a.__h=e,a.__V):a.__}function pe(e,t){return Q=8,me((function(){return e}),t)}function ge(e){var t=K.context[e.__c],a=oe(Y++,9);return a.c=e,t?(null==a.__&&(a.__=!0,t.sub(K)),t.props.value):e.__}function ye(){for(var e;e=J.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(he),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(a){e.__H.__h=[],t.options.__e(a,e.__v)}}t.options.__b=function(e){K=null,te&&te(e)},t.options.__r=function(e){ae&&ae(e),Y=0;var t=(K=e.__c).__H;t&&(z===K?(t.__h=[],K.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ee,e.__N=e.i=void 0}))):(t.__h.forEach(he),t.__h.forEach(ve),t.__h=[])),z=K},t.options.diffed=function(e){re&&re(e);var a=e.__c;a&&a.__H&&(a.__H.__h.length&&(1!==J.push(a)&&Z===t.options.requestAnimationFrame||((Z=t.options.requestAnimationFrame)||fe)(ye)),a.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ee&&(e.__=e.__V),e.i=void 0,e.__V=ee}))),z=K=null},t.options.__c=function(e,a){a.some((function(e){try{e.__h.forEach(he),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(r){a.some((function(e){e.__h&&(e.__h=[])})),a=[],t.options.__e(r,e.__v)}})),ne&&ne(e,a)},t.options.unmount=function(e){ie&&ie(e);var a,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{he(e)}catch(e){a=e}})),r.__H=void 0,a&&t.options.__e(a,r.__v))};var be="function"==typeof requestAnimationFrame;function fe(e){var t,a=function(){clearTimeout(r),be&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(a,100);be&&(t=requestAnimationFrame(a))}function he(e){var t=K,a=e.__c;"function"==typeof a&&(e.__c=void 0,a()),K=t}function ve(e){var t=K;e.__c=e.__(),K=t}function _e(e,t){return!e||e.length!==t.length||t.some((function(t,a){return t!==e[a]}))}function Ne(e,t){return"function"==typeof t?t(e):t}const Oe=["street","houseNumberOrName","postalCode","city","stateOrProvince","country"],[Ie,Ee,Te,Ae,Se,Ce]=Oe,Re=["BR","CA","US","AU"],De=["US","GB"],ke={CA:[Ce,Ie,Ee,Ae,Te,Se],GB:[Ce,Ee,Ie,Ae,Te,Se],US:[Ce,Ie,Ee,Ae,Se,Te],AU:[Ce,Ie,Ae,Se,Te],default:[Ce,Ie,Ee,Te,Ae,Se]},Le={city:{GB:"cityTown",default:Ae},country:{default:Ce},houseNumberOrName:{CA:"apartmentSuite",US:"apartmentSuiteOptional",GB:"houseNumberOptional",default:"houseNumber"},postalCode:{US:"zipCode",default:Te},stateOrProvince:{BR:"state",CA:"provinceOrTerritory",US:"state",AU:"state",default:Se},stateOrProvincePlaceholder:{BR:"selectState",CA:"selectProvinceOrTerritory",US:"selectState",AU:"selectState",default:"selectStateOrProvince"},street:{CA:"address",US:"address",AU:"address",default:Ie}},we=(e,t)=>Le[e][t]||Le[e].default,Pe=(e,t)=>{const a=e.country;return a?Object.entries(e).reduce(((e,[r,n])=>{const i=we(r,a);return e[i]="country"===r?t.getCountryName(n):"stateOrProvince"===r?t.getStateName(n,a):n,e}),{}):e},je=({inline:e=!1,size:t="large"})=>R("div",Object.assign({className:"adyen-kyc-spinner__wrapper "+(e?"adyen-kyc-spinner__wrapper--inline":"")},{children:R("div",{className:`adyen-kyc-spinner adyen-kyc-spinner--${t}`})})),xe=({className:e="",name:t})=>R("i",{className:a("adyen-kyc-icon",`adyen-kyc-icon-${t}`,e),role:"img","aria-hidden":!0}),Me="-ariaError";let Fe=Date.now();const Ve=(e="id")=>(Fe+=1,`${e}-${Fe}`);class Ue extends t.Component{constructor(e){super(e),this.state={focused:!1},this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.uniqueId=Ve(`adyen-kyc-${this.props.name}`)}onFocus(e){this.setState({focused:!0},(()=>{this.props.onFocus&&this.props.onFocus(e)}))}onBlur(e){this.setState({focused:!1},(()=>{this.props.onBlur&&this.props.onBlur(e),this.props.onFieldBlur&&this.props.onFieldBlur(e)}))}static getDerivedStateFromProps(e,t){return void 0!==e.focused&&e.focused!==t.focused?{focused:e.focused}:void 0!==e.filled&&e.filled!==t.filled?{filled:e.filled}:null}renderContent({name:e,children:r,errorMessage:n,helper:i,inputWrapperModifiers:o,isLoading:s,isValid:l,label:d}){return R(t.Fragment,{children:["string"==typeof d&&R("span",Object.assign({className:a({"adyen-kyc-label__text":!0,"adyen-kyc-label__text--error":n})},{children:d})),"function"==typeof d&&d(),i&&R("span",Object.assign({className:"adyen-kyc-helper-text"},{children:i})),R("div",Object.assign({className:a(["adyen-kyc-input-wrapper",...o.map((e=>`adyen-kyc-input-wrapper--${e}`))])},{children:[t.toChildArray(r).map((a=>{const r=Object.assign({isValid:l,onFocusHandler:this.onFocus,onBlurHandler:this.onBlur,isInvalid:!!n},e&&{uniqueId:this.uniqueId});return t.cloneElement(a,r)})),s&&R("span",Object.assign({className:"adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--loading"},{children:R(je,{size:"small"})})),l&&R("span",Object.assign({className:"adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--valid"},{children:R(xe,{name:"check"})})),n&&R("span",Object.assign({className:"adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--invalid"},{children:R(xe,{name:"field-error"})}))]})),n&&n.length&&R("span",Object.assign({className:"adyen-kyc-error-text","aria-live":"polite",id:`${this.uniqueId}${Me}`},{children:n}))]})}render({name:e,className:t="",classNameModifiers:r=[],children:n,errorMessage:i,helper:o,inputWrapperModifiers:s=[],isLoading:l,isValid:d,label:c,useLabelElement:u=!0,dataPlaceholder:m}){return R("div",Object.assign({className:a("adyen-kyc-field",t,r.map((e=>`adyen-kyc-field--${e}`)),{"adyen-kyc-field--error":i,"adyen-kyc-field--valid":d}),"data-placeholder":m},{children:R(Be,Object.assign({onFocusField:this.props.onFocusField,name:e,disabled:this.props.disabled,filled:this.state.filled,focused:this.state.focused,useLabelElement:u,uniqueId:this.uniqueId},{children:this.renderContent({name:e,children:n,errorMessage:i,helper:o,inputWrapperModifiers:s,isLoading:l,isValid:d,label:c})}))}))}}const Be=({onFocusField:e,focused:t,filled:r,disabled:n,name:i,uniqueId:o,useLabelElement:s,children:l})=>{const d={onClick:e,className:a({"adyen-kyc-label":!0,"adyen-kyc-label--focused":t,"adyen-kyc-label--filled":r,"adyen-kyc-label--disabled":n})};return s?R("label",Object.assign({},d,{htmlFor:i&&o},{children:l})):R("div",Object.assign({},d,{role:"form"},{children:l}))},We=()=>ge(j);var He="Select-module_adyen-kyc-dropdown__e1hdP",qe="Select-module_adyen-kyc-dropdown-button__FdX-b",Ge="Select-module_adyen-kyc-dropdown-button--active__AGNoA",$e="Select-module_adyen-kyc-filter-input__4JVhc",Xe="Select-module_adyen-kyc-dropdown-list__9PypK",Ye="Select-module_adyen-kyc-dropdown-list--active__lE-9R",Ke="Select-module_adyen-kyc-dropdown-element__v4sS7";const ze=({className:e,isBasic:t=!1,children:r})=>{const n=a("adl-tag",e,{"adl-tag--basic":t});return R("span",Object.assign({className:n},{children:r}))},Ze=({inline:e=!1,size:t="large",dot:r=!1})=>R("div",Object.assign({className:"adl-loader__wrapper "+(e?"adl-loader__wrapper--inline":"")},{children:R("div",{className:a("adl-loading-indicator",`adl-loading-indicator--${t}`,{"adl-loading-indicator--dot":r})})}));function Qe(e){var{filterable:t,isMulti:a,toggleButtonRef:r,isSearch:i}=e,o=n(e,["filterable","isMulti","toggleButtonRef","isSearch"]);return R(t||a||i?"div":"button",Object.assign({},o,{ref:r}))}function Je({active:e,readonly:t,showList:r,isInvalid:n,isValid:i,toggleList:o,onButtonKeyDown:s,filterable:l,placeholder:d,toggleButtonRef:c,ariaDescribedBy:u,selectListId:m,filterInputRef:p,onInput:g,isMulti:y,id:b,isSearch:f,loading:h,textFilter:v}){return R(Qe,Object.assign({"aria-disabled":t,"aria-expanded":r,"aria-haspopup":"listbox",className:a({"adyen-kyc-dropdown-button":!0,[qe]:!0,"adyen-kyc-dropdown-button--readonly":t,"adyen-kyc-dropdown-button--active":r,[Ge]:r,"adyen-kyc-dropdown-button--invalid":n,"adyen-kyc-dropdown-field--valid":i,"adyen-kyc-dropdown-button-search":f}),filterable:l,onClick:t?null:o,onKeyDown:t?null:s,role:l||y?"button":null,tabIndex:"0",title:e.join(",")||d,toggleButtonRef:c,type:l||y?null:"button","aria-describedby":u,isMulti:y,id:b,isSearch:f},{children:y?R(tt,{active:e,placeholder:d}):R(et,{active:e,placeholder:d,selectListId:m,showList:r,filterInputRef:p,filterable:l,onInput:g,isSearch:f,loading:h,textFilter:v})}))}const et=({active:e,placeholder:r,selectListId:n,showList:i,filterInputRef:o,filterable:s,onInput:l,isSearch:d,loading:c,textFilter:u})=>{const m=e.pop();return R(t.Fragment,i&&s?{children:[d&&R(xe,{name:"search",className:"adyen-kyc-dropdown-button-search__icon"}),R("input",{"aria-autocomplete":"list","aria-controls":n,"aria-expanded":i,"aria-owns":n,autoComplete:"off",className:a("adyen-kyc-filter-input",[$e]),onInput:l,placeholder:r,ref:o,role:"combobox",type:"text",value:u}),d&&c&&R(Ze,{size:"xsmall",dot:!0})]}:{children:[(null==m?void 0:m.sprite)&&R("svg",Object.assign({className:"adyen-kyc-dropdown-button__icon",role:"img"},{children:R("use",{href:m.sprite})})),d&&R(xe,{name:"search",className:"adyen-kyc-dropdown-button-search__icon"}),R("span",Object.assign({className:a("adyen-kyc-dropdown-button__text",{"adyen-kyc-dropdown-button__text--placeholder":!m})},{children:(null==m?void 0:m.selectedOptionName)||(null==m?void 0:m.name)||u||r}))]})},tt=({active:e,placeholder:t})=>e&&e.length>0?R("div",Object.assign({className:"adyen-kyc-dropdown-selected-items"},{children:e.map(((e,a)=>R(ze,Object.assign({className:e.className,isBasic:!0},{children:(null==e?void 0:e.selectedOptionName)||(null==e?void 0:e.name)||t}),a)))})):R("span",Object.assign({className:"adyen-kyc-dropdown-button__text"},{children:t}));function at(e){var{classNameModifiers:t=[],label:r,isInvalid:i,onChange:o,helper:s}=e,l=n(e,["classNameModifiers","label","isInvalid","onChange","helper"]);return R("label",Object.assign({className:"adyen-kyc-checkbox"},{children:[R("input",Object.assign({},l,{className:a(["adyen-kyc-checkbox__input",[l.className],{"adyen-kyc-checkbox__input--invalid":i},t.map((e=>`adyen-kyc-input--${e}`))]),type:"checkbox",onChange:o})),R("span",Object.assign({className:"adyen-kyc-checkbox__label"},{children:r})),s&&R("span",Object.assign({className:"adyen-kyc-checkbox__helper-text"},{children:s}))]}))}at.defaultProps={onChange:()=>{}};const rt=e=>{var{item:r,selected:i,isMulti:o,isSearch:s,children:l}=e,d=n(e,["item","selected","isMulti","isSearch","children"]);return R("li",Object.assign({"aria-disabled":!!r.disabled,"aria-selected":i,className:a(["adyen-kyc-dropdown-element",Ke,{"adyen-kyc-dropdown-element--active":i,"adyen-kyc-dropdown-element--disabled":!!r.disabled,"adyen-kyc-dropdown-multi-element":o,"adyen-kyc-dropdown-element-description":!o&&!s&&r.description,"adyen-kyc-dropdown-search-element":s}]),"data-disabled":!!r.disabled,"data-value":r.id,onClick:d.onSelect,onKeyDown:d.onKeyDown,role:"option",tabIndex:-1},{children:o?R(at,{label:r.name,helper:null==r?void 0:r.description,checked:i,name:`adyen-kyc-dropdown-element__checkbox adyen-kyc-dropdown-element__checkbox--${r.id}`}):l?[l]:R(t.Fragment,{children:[r.sprite?R("svg",Object.assign({className:"adyen-kyc-dropdown-element__icon",role:"img"},{children:R("use",{href:r.sprite})})):r.icon&&R("img",{className:"adyen-kyc-dropdown-element__icon",alt:r.name,src:r.icon}),r.description?R(t.Fragment,{children:[R("span",Object.assign({className:"adyen-kyc-dropdown-element__label adl-u-font-weight-semi-bold"},{children:r.name})),R("span",Object.assign({className:"adyen-kyc-dropdown-element-description__text"},{children:r.description}))]}):R("span",Object.assign({className:"adyen-kyc-dropdown-element__label"},{children:r.name}))]})}))};function nt(e){var{active:t,items:r,showList:i,textFilter:o,isMulti:s,showAbove:l,isSearch:d,loading:c,getSearchItem:u}=e,m=n(e,["active","items","showList","textFilter","isMulti","showAbove","isSearch","loading","getSearchItem"]);const{i18n:p}=We(),g=r.filter((e=>{var t;return d?e:!o||(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes(o))})),[y,b]=se([]);return de((()=>{b(g.map((e=>R(rt,Object.assign({item:e,onKeyDown:m.onKeyDown,onSelect:m.onSelect,selected:!!t.find((t=>t.id===e.id)),isMulti:s,isSearch:d},{children:u&&u(e)}),e.id))))}),[g.length,null==t?void 0:t.length,r]),R("ul",Object.assign({className:a({test:!0,"adyen-kyc-dropdown-list--above":l,"adyen-kyc-dropdown-list":!0,[Xe]:!0,"adyen-kyc-dropdown-list--active":i,[Ye]:i}),id:m.selectListId,ref:m.selectListRef,role:"listbox"},{children:c?R("div",Object.assign({className:"adyen-kyc-dropdown-element adyen-kyc-dropdown-element--no-options"},{children:p.get("loading")})):d&&(!o||o.length<3)?null:y.length?y:R("div",Object.assign({className:"adyen-kyc-dropdown-element adyen-kyc-dropdown-element--no-options"},{children:p.get("noOptionsFound")}))}))}const it=e=>{const t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return e?"visible"!==t&&"hidden"!==t?e:it(e.parentNode)||document.body:-1},ot={arrowDown:"ArrowDown",arrowUp:"ArrowUp",enter:"Enter",escape:"Escape",space:" ",tab:"Tab"},st="30_102";function lt(e,t=20){let a;return(...r)=>{clearTimeout(a),a=setTimeout((()=>e(...r)),t)}}const dt=({items:e=[],className:t="",classNameModifiers:r=[],filterable:n=!0,readonly:i=!1,onChange:o,selected:s,name:l,isInvalid:d=!1,isValid:c,placeholder:u,showInlineErrors:m,isMulti:p,uniqueId:g,showSelectedItemsAsTags:y=!1,isSearch:b=!1,onSearch:f=(()=>{}),resetSearch:h=!1,loading:v=!1,getSearchItem:_,searchText:N,showSearchList:O})=>{const I=ue(null),E=ue(null),T=ue(null),A=ue(null),[S,C]=se(null),[D,L]=se(!1),w=me((()=>`select-${k()}`),[]),P=e.filter((e=>p?null==s?void 0:s.includes(e.id):e.id===s))||[],[j,x]=se(!1),[M,F]=se(null),V=()=>{C(null),L(!1),T.current&&T.current.focus()},U=e=>{e.preventDefault();const t=A.current.contains(e.currentTarget)?e.currentTarget:A.current.firstElementChild,a="true"===t.getAttribute("data-disabled");if(!i&&!a){const e=t.getAttribute("data-value");if(p){const t=P.find((t=>t.id===e))?[...P.filter((t=>t.id!==e)).map((e=>e.id))]:[...P.map((e=>e.id)),e];o({target:{value:t,name:l}})}else V(),o({target:{value:e,name:l}})}},B=()=>{let e=M;if(e||(e=it(T.current),F(e)),-1!==e){const{bottom:t}=e.getBoundingClientRect(),{bottom:a}=T.current.getBoundingClientRect();x(!(t-a>145))}L(!0)},W=e=>{E.current.contains(e.target)||L(!1)};return de((()=>{h&&C("")}),[h]),de((()=>{C(N)}),[N]),de((()=>{D&&n&&I.current&&I.current.focus()}),[D]),de((()=>{L(O)}),[O]),de((()=>(document.addEventListener("click",W,!0),()=>{document.removeEventListener("click",W,!0)})),[]),R("div",Object.assign({className:a(["adyen-kyc-dropdown",He,t,...r.map((e=>`adyen-kyc-dropdown--${e}`))]),ref:E},{children:[R(Je,{id:null!=g?g:null,active:P,filterInputRef:I,filterable:n,isInvalid:d,isValid:c,onButtonKeyDown:e=>{var t;if(e.key===ot.enter&&n&&D&&S){const t=e.target.value;(b&&t.length>2||!b)&&(U(e),B())}else e.key===ot.escape?V():![ot.arrowUp,ot.arrowDown,ot.enter].includes(e.key)&&(e.key!==ot.space||n&&D)?(e.shiftKey&&e.key===ot.tab||e.key===ot.tab)&&V():(e.preventDefault(),B(),(null===(t=A.current)||void 0===t?void 0:t.firstElementChild)&&A.current.firstElementChild.focus())},onInput:e=>{const t=e.target.value;b&&t.length>2&<(f(t),500),C(t.toLowerCase())},placeholder:u,readonly:i,selectListId:w,showList:D,toggleButtonRef:T,toggleList:e=>{e.preventDefault(),D?L(!1):B()},ariaDescribedBy:m&&g?`${g}${Me}`:null,isMulti:p,showSelectedItemsAsTags:y,isSearch:b,loading:v,textFilter:S}),R(nt,{active:P,items:e,onKeyDown:e=>{const t=e.target;switch(e.key){case ot.escape:e.preventDefault(),V();break;case ot.space:case ot.enter:U(e);break;case ot.arrowDown:e.preventDefault(),t.nextElementSibling&&t.nextElementSibling.focus();break;case ot.arrowUp:e.preventDefault(),t.previousElementSibling?t.previousElementSibling.focus():n&&I.current&&I.current.focus();break;case ot.tab:V()}},onSelect:U,selectListId:w,selectListRef:A,showList:D,textFilter:S,isMulti:p,showAbove:j,isSearch:b,getSearchItem:_,loading:v})]}))},ct=e=>{const{i18n:a}=We(),[r,n]=se([]),[o,s]=se(!1),{handleChangeFor:l,data:d,autocompleteAddressForm:c}=e,[u,m]=se(!1),[p,g]=se(null),[y,b]=se(!1);de((()=>{n([]),m(!0)}),[d.country]);const f=(e,t)=>{const a=[];let r=0;return""===e[0]?[t]:(e.forEach((e=>{const n=e.split("-"),i=parseInt(n[0]),o=parseInt(n[1]);if(r<i){const e=t.substring(r,i);a.push(`${e}`)}const s=t.substring(i,o);a.push(R("span",Object.assign({className:"adyen-kyc-dropdown-search-element__description--highlight"},{children:s}))),r=o})),r<t.length&&a.push(`${t.substring(r)}`),a)},h=e=>{const{text:t,highlight:a,description:r}=e;let n=[];if(""===a)r?n.push(`${t}, ${r}`):n.push(t);else{const e=a.split(";");n=f(e[0].split(","),t),e.length>1?(n.push(", "),n.push(f(e[1].split(","),r))):r&&n.push(`, ${r}`)}return n};return R(Ue,Object.assign({name:"searchAddress",className:"adl-u-margin-bottom-8",label:a.get("searchAddress")},{children:R(dt,{onChange:t=>{const a=t.target.value;l("searchAddress","blur")(a),m(!1),s(!0);const o=r.filter((e=>e.id===a))[0];"Address"===o.type?((t=>{i(void 0,void 0,void 0,(function*(){try{const a=yield e.handleFindAddress(t);c(a)}catch(e){console.error(e)}}))})(o.id),g(`${o.text} ${o.description}`),b(!1)):((t=>{i(void 0,void 0,void 0,(function*(){try{const a=yield e.handleAddressSearch({text:t.text,country:d.country,container:t.id},e.legalEntityId);n((null==a?void 0:a.results)||[])}catch(e){console.error(e)}}))})(o),g(`${o.text}`),b(!0)),s(!1)},name:"searchAddress",placeholder:a.get("startTypingTheAddress"),selected:d.searchAddress,items:r,isSearch:!0,resetSearch:u,onSearch:t=>i(void 0,void 0,void 0,(function*(){if(t){s(!0);try{const a=yield e.handleAddressSearch({text:t,country:d.country},e.legalEntityId);if(null==a?void 0:a.results){const e=a.results.map((e=>(e=>{if(e.description.includes("Addresses")){const t=e.description.split(" - ");return 1===t.length?Object.assign(Object.assign({},e),{description:void 0,addressAmount:t[0].replace("Addresses","")}):Object.assign(Object.assign({},e),{description:t[0],addressAmount:t[1].replace("Addresses","")})}return e})(e)));n(e)}else n([])}catch(e){console.error(e)}s(!1)}else n([])})),loading:o,getSearchItem:e=>R(t.Fragment,{children:[R("span",Object.assign({className:"adyen-kyc-dropdown-search-element__description"},{children:h(e)})),e.addressAmount&&R("div",Object.assign({className:"adyen-kyc-dropdown-search-element__addresses"},{children:[e.addressAmount," ",R("span",Object.assign({className:"adyen-kyc-dropdown-search-element__addresses--text"},{children:[" ",a.get("addresses")]})),R(xe,{name:"arrow-right",className:"adyen-kyc-dropdown-search-element__addresses--icon"})]}))]}),isInvalid:!1,searchText:p,showSearchList:y})}))},ut=e=>e.replace(/[\uff01-\uff5e]/g,(e=>String.fromCharCode(e.charCodeAt(0)-65248)));function mt(e,t){for(var a in t)e[a]=t[a];return e}function pt(e,t){for(var a in e)if("__source"!==a&&!(a in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function gt(e){this.props=e}function yt(e,a){function r(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),a?!a(this.props,e)||!r:pt(this.props,e)}function n(a){return this.shouldComponentUpdate=r,t.createElement(e,a)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(gt.prototype=new t.Component).isPureReactComponent=!0,gt.prototype.shouldComponentUpdate=function(e,t){return pt(this.props,e)||pt(this.state,t)};var bt=t.options.__b;t.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),bt&&bt(e)};var ft="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ht(e){function t(t){var a=mt({},t);return delete a.ref,e(a,t.ref||null)}return t.$$typeof=ft,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var vt=t.options.__e;t.options.__e=function(e,t,a,r){if(e.then)for(var n,i=t;i=i.__;)if((n=i.__c)&&n.__c)return null==t.__e&&(t.__e=a.__e,t.__k=a.__k),n.__c(e,t);vt(e,t,a,r)};var _t=t.options.unmount;function Nt(e,t,a){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=mt({},e)).__c&&(e.__c.__P===a&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Nt(e,t,a)}))),e}function Ot(e,t,a){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ot(e,t,a)})),e.__c&&e.__c.__P===t&&(e.__e&&a.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=a)),e}function It(){this.__u=0,this.t=null,this.__b=null}function Et(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Tt(){this.u=null,this.o=null}t.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),_t&&_t(e)},(It.prototype=new t.Component).__c=function(e,t){var a=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(a);var n=Et(r.__v),i=!1,o=function(){i||(i=!0,a.__R=null,n?n(s):s())};a.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Ot(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},It.prototype.componentWillUnmount=function(){this.t=[]},It.prototype.render=function(e,a){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Nt(this.__b,r,n.__O=n.__P)}this.__b=null}var i=a.__a&&t.createElement(t.Fragment,null,e.fallback);return i&&(i.__h=null),[t.createElement(t.Fragment,null,a.__a?null:e.children),i]};var At=function(e,t,a){if(++a[1]===a[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(a=e.u;a;){for(;a.length>3;)a.pop()();if(a[1]<a[0])break;e.u=a=a[2]}};(Tt.prototype=new t.Component).__a=function(e){var t=this,a=Et(t.__v),r=t.o.get(e);return r[0]++,function(n){var i=function(){t.props.revealOrder?(r.push(n),At(t,e,r)):n()};a?a(i):i()}},Tt.prototype.render=function(e){this.u=null,this.o=new Map;var a=t.toChildArray(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&a.reverse();for(var r=a.length;r--;)this.o.set(a[r],this.u=[1,0,this.u]);return e.children},Tt.prototype.componentDidUpdate=Tt.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,a){At(e,a,t)}))};var St="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ct=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Rt="undefined"!=typeof document,Dt=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};t.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(t.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var kt=t.options.event;function Lt(){}function wt(){return this.cancelBubble}function Pt(){return this.defaultPrevented}t.options.event=function(e){return kt&&(e=kt(e)),e.persist=Lt,e.isPropagationStopped=wt,e.isDefaultPrevented=Pt,e.nativeEvent=e};var jt={configurable:!0,get:function(){return this.class}},xt=t.options.vnode;t.options.vnode=function(e){var a=e.type,r=e.props,n=r;if("string"==typeof a){var i=-1===a.indexOf("-");for(var o in n={},r){var s=r[o];Rt&&"children"===o&&"noscript"===a||"value"===o&&"defaultValue"in r&&null==s||("defaultValue"===o&&"value"in r&&null==r.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+a)&&!Dt(r.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&Ct.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===s&&(s=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),n[o]&&(o="oninputCapture")),n[o]=s)}"select"==a&&n.multiple&&Array.isArray(n.value)&&(n.value=t.toChildArray(r.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==a&&null!=n.defaultValue&&(n.value=t.toChildArray(r.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),e.props=n,r.class!=r.className&&(jt.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",jt))}e.$$typeof=St,xt&&xt(e)};var Mt=t.options.__r;t.options.__r=function(e){Mt&&Mt(e),e.__c};const Ft=ht(((e,t)=>{const{autoCorrect:r,classNameModifiers:i=[],isInvalid:o,isValid:s,readonly:l=null,spellCheck:d,type:c="text",disabled:u,showInlineErrors:m,uniqueId:p}=e,g=a("adyen-kyc-input",[`adyen-kyc-input--${c}`],e.className,{"adyen-kyc-input--invalid":o,"adyen-kyc-field--valid":s,"adyen-kyc-input--disabled":u},i.map((e=>`adyen-kyc-input--${e}`))),y=n(e,["classNameModifiers","uniqueId","showInlineErrors"]);return R("input",Object.assign({ref:t,id:p},y,{type:c,className:g,readOnly:l,spellCheck:d,autoCorrect:r},u&&{"aria-disabled":!0},{"aria-describedby":m?`${p}${Me}`:null,onInput:t=>{var a;t.target.value=ut(t.target.value),null===(a=null==e?void 0:e.onInput)||void 0===a||a.call(e,t)},onBlur:t=>{var a,r;null===(a=null==e?void 0:e.onBlurHandler)||void 0===a||a.call(e,t),e.trimOnBlur&&(t.target.value=t.target.value.trim()),null===(r=null==e?void 0:e.onBlur)||void 0===r||r.call(e,t)},onFocus:t=>{var a;null===(a=null==e?void 0:e.onFocusHandler)||void 0===a||a.call(e,t)}}))}));Ft.displayName="InputBase";const Vt=ht(((e,t)=>{var{transformInput:a,onInput:r}=e,i=n(e,["transformInput","onInput"]);const[o,s]=se(),l=ue(null),d=null!=t?t:l,c=pe(a?e=>{const t=e.target,n=a(t.value);s(t.selectionStart);const i=Object.assign(Object.assign({},e),{target:Object.assign(Object.assign({},e.target),{value:n})});r(i)}:r,[a,r]);return ce((()=>{var e;null===(e=d.current)||void 0===e||e.setSelectionRange(o,o,"none")}),[o]),R(Ft,Object.assign({classNameModifiers:["large"]},i,{type:"text",onInput:r?c:void 0,ref:d}))}));Vt.displayName="InputText";const Ut=()=>{const e=document.createElement("input");return e.setAttribute("type","date"),"date"===e.type};function Bt(e){const t=me(Ut,[]);return R(Ft,t?Object.assign({},e,{type:"date"}):Object.assign({},e,{onInput:t=>{const{value:a}=t.target;t.target.value=(e=>{const t=e.replace(/\D|\s/g,"").replace(/^(00)(.*)?/,"01$2").replace(/^(3[2-9])(.*)?/,"0$1$2").replace(/^([4-9])(.*)?/,"0$1").replace(/^([0-9]{2})(00)(.*)?/,"$101").replace(/^(3[01])(02)(.*)?/,"29$2").replace(/^([0-9]{2})([2-9]|1[3-9])(.*)?/,"$10$2").replace(/^([0-9]{2})([0-9]{2})([0-9])/,"$1/$2/$3").replace(/^([0-9]{2})([0-9])/,"$1/$2"),[a="",r="",n=""]=t.split("/");return 4===n.length&&"29"===a&&"02"===r&&(Number(n)%4!=0||"00"===n.substr(2,2)&&Number(n)%400!=0)?t.replace(/^29/,"28"):t})(a),e.onInput(t)},maxLength:10}))}function Wt(e){return R(Ft,Object.assign({},e,{type:"tel"}))}function Ht(e){return R(Ft,Object.assign({},e,{type:"email",autoCapitalize:"off"}))}const qt=e=>R("input",Object.assign({},e,{className:a("adl-input-radio__input",e.className)}));function Gt(e){const{items:t,i18n:r,name:n,onChange:i,value:o,isInvalid:s,uniqueId:l,disabled:d=!1}=e,c=null==l?void 0:l.replace(/[0-9]/g,"").substring(0,l.lastIndexOf("-"));return R("div",Object.assign({className:"adyen-kyc-radio-group"},{children:t.map((t=>{const l=Ve(c);return R("label",Object.assign({htmlFor:l,className:"adl-input-radio"},{children:[R(qt,{id:l,type:"radio",checked:o===t.id,"aria-checked":o===t.id,className:"adyen-kyc-radio-group__input",name:n,onChange:i,onClick:i,value:t.id,disabled:d}),R("span",Object.assign({className:a(["adl-input-radio__label","adyen-kyc-label__text",e.className,{"adyen-kyc-radio-group__label--invalid":s}])},{children:r.get(t.name)}))]}),t.id)}))}))}function $t(e){return R(Ft,Object.assign({classNameModifiers:["large"]},e,{type:"file"}))}Gt.defaultProps={onChange:()=>{},items:[]};const Xt=()=>null,Yt=()=>null,Kt=()=>null,zt=({item:e,name:t,uniqueId:r,i18n:n,isInvalid:i,value:o,onChange:s=(()=>{}),labelClassName:l,className:d,children:c})=>{let u,m,p;if(c)if(Array.isArray(c))u=c.find((e=>(null==e?void 0:e.type)===Xt)),m=c.find((e=>(null==e?void 0:e.type)===Yt)),p=c.find((e=>(null==e?void 0:e.type)===Kt));else switch(c.type){case Xt:u=c;break;case Yt:m=c;break;case Kt:p=c}return R("label",Object.assign({htmlFor:r,className:a(["adl-radio-card",l])},{children:[u&&R("div",Object.assign({className:"adl-u-margin-bottom-16 adl-radio-card__icon","aria-hidden":"true"},{children:u.props.children})),R("div",Object.assign({className:"adl-radio-card__content"},{children:[R("div",Object.assign({className:"adl-radio-card__header adl-u-display-flex adl-u-align-items-center"},{children:[R("div",Object.assign({className:a(["adl-label","adyen-kyc-radio-group-card__label","adl-u-margin-bottom-16",d,{"adyen-kyc-radio-group-card__label--invalid":i}])},{children:[e.subtitle&&R("div",Object.assign({className:"adyen-kyc-radio-group-card__subtitle"},{children:n.get(e.subtitle)})),n.get(e.name)]})),R(qt,{id:r,type:"radio",checked:o===e.id,className:"adyen-kyc-radio-group-card__input",name:t,onChange:s,onClick:s,value:e.id,"aria-checked":o===e.id})]})),R("div",m?Object.assign({className:"adl-radio-card__body adl-u-margin-bottom-16"},{children:m.props.children}):Object.assign({className:"adl-radio-card__body adl-u-margin-bottom-16"},{children:n.get(e.description)})),p&&R("div",Object.assign({className:"adl-u-margin-bottom-16"},{children:p.props.children}))]}))]}),e.id)};function Zt(e){const{items:t,i18n:a,name:r,onChange:n,value:i,isInvalid:o,uniqueId:s}=e,l=null==s?void 0:s.replace(/[0-9]/g,"").substring(0,s.lastIndexOf("-"));return R("div",Object.assign({className:"adyen-kyc-radio-group-card"},{children:t.map((e=>{const t=Ve(l);return R(zt,{item:e,uniqueId:t,i18n:a,isInvalid:o,value:i,onChange:n,name:r},e.id)}))}))}function Qt(e){const{autoCorrect:t,classNameModifiers:r,isInvalid:i,isValid:o,readonly:s=null,spellCheck:l,disabled:d,showInlineErrors:c,uniqueId:u,maxLength:m}=e,{i18n:p}=We(),[g,y]=se("");Object.prototype.hasOwnProperty.call(e,"onChange")&&console.error("Error: Form fields that rely on InputBase may not have an onChange property");const b=a("adyen-kyc-input","adyen-kyc-input--textarea",e.className,{"adyen-kyc-input--invalid":i,"adyen-kyc-field--valid":o,"adyen-kyc-input--disabled":d},r.map((e=>`adyen-kyc-input--${e}`))),f=n(e,["classNameModifiers","uniqueId","showInlineErrors"]),h=m-g.length;return R("div",Object.assign({className:"adyen-kyc-input-wrapper"},{children:[R("textarea",Object.assign({id:u},f,{className:b,readOnly:s,spellCheck:l,autoCorrect:t},d&&{"aria-disabled":!0},{"aria-describedby":c?`${u}${Me}`:null,onInput:t=>{var a;t.target.value=ut(t.target.value),y(t.target.value),null===(a=null==e?void 0:e.onInput)||void 0===a||a.call(e,t)},onBlur:t=>{var a,r;null===(a=null==e?void 0:e.onBlurHandler)||void 0===a||a.call(e,t),e.trimOnBlur&&(t.target.value=t.target.value.trim()),null===(r=null==e?void 0:e.onBlur)||void 0===r||r.call(e,t)},onFocus:t=>{var a;null===(a=null==e?void 0:e.onFocusHandler)||void 0===a||a.call(e,t)}})),m&&h>=0?R("span",Object.assign({className:"adyen-kyc-input__counter"},{children:p.get("xCharactersLeft",{values:{charactersLeft:h}})})):null]}))}zt.Icon=Xt,zt.Body=Yt,zt.Footer=Kt,Zt.defaultProps={onChange:()=>{},items:[]};const Jt=(e,t)=>{const a={boolean:at,radio:Gt,select:dt,radioCard:Zt,date:Bt,emailAddress:Ht,email:Ht,tel:Wt,text:Vt,file:$t,textArea:Qt,default:Vt};return R(a[e]||a.default,Object.assign({},t))};function ea(e,t){const{i18n:a,loadingContext:r,clientKey:n}=We(),[i,o]=se([]),[s,l]=se(!1);return de((()=>{t||O(e,r,a.locale,n).then((e=>{const t=e&&e.length?e:[];o(t),l(!0)})).catch((()=>{o([]),l(!0)}))}),[e,r,a.locale,n,t]),{dataset:i,loaded:s}}function ta(e){const{classNameModifiers:t,selectedCountry:a,onDropdownChange:r,value:n,readOnly:i}=e,{i18n:o,commonProps:s}=We(),l=we("stateOrProvince",a),d=we("stateOrProvincePlaceholder",a),{dataset:c,loaded:m}=ea(u(a),!a||!Re.includes(a));return m&&c.length?R(Ue,Object.assign({name:"stateOrProvince",label:o.get(l),classNameModifiers:t,errorMessage:e.errorMessage,isValid:!!n,showInlineErrors:s.showInlineErrors},{children:Jt("select",{name:"stateOrProvince",onChange:r,selected:n,placeholder:o.get(d),items:c,readonly:i&&!!n,showInlineErrors:s.showInlineErrors})})):null}function aa(e){const{allowedCountries:t=[],classNameModifiers:a=[],errorMessage:r,onDropdownChange:n,value:i}=e,{i18n:o,commonProps:s}=We(),{dataset:l}=ea(c),d=l.filter((e=>!t.length||t.includes(e.id))).map((e=>Object.assign(Object.assign({},e),{sprite:`#adl-flag-${e.id.toLowerCase()}`}))),u=1===d.length||e.readOnly;return R(Ue,Object.assign({name:"country",label:e.label||o.get("country"),errorMessage:r,classNameModifiers:a,isValid:!!i,showInlineErrors:s.showInlineErrors},{children:Jt("select",{onChange:n,name:"country",placeholder:o.get("selectCountry"),selected:i,items:d,readonly:u&&!!i,showInlineErrors:s.showInlineErrors})}))}var ra=(e,t)=>({getPlaceholder:(a,r=null)=>{var n,i,o;const s=null!==(o=null!==(i=null===(n=e.placeholders)||void 0===n?void 0:n[a])&&void 0!==i?i:r)&&void 0!==o?o:a;return t.get(s)},getLabel:(a,r=null)=>{var n,i,o;const s=null!==(o=null!==(i=null===(n=e.labels)||void 0===n?void 0:n[a])&&void 0!==i?i:r)&&void 0!==o?o:a;return t.get(s)},isRequiredField:(t,a=!0)=>e.requiredFields?e.requiredFields.includes(t)&&("role"!==t||"role"===t&&"individual"!==e.taskType):a,isOptionalField:t=>{var a;return null===(a=e.optionalFields)||void 0===a?void 0:a.includes(t)},isVisibleField:function(e,t=!0){return this.isRequiredField(e,t)||this.isOptionalField(e)},isReadOnly:t=>e.readOnly||!!e.readOnlyFields&&e.readOnlyFields.includes(t),getVal:e=>{if("string"==typeof e)return t.get(e);let a="error";if(e&&"object"==typeof e){const{translationKey:r,translationObject:n}=e;a=t.get(r,n)}return a},getErrorMessage:(e,a,r)=>{var n;const i=null===(n=null==a?void 0:a[e])||void 0===n?void 0:n.errorMessage;if("object"==typeof i){const{translationKey:e,translationObject:a}=i;return t.get(e,a)}return i?t.get(i):Boolean(null==r?void 0:r[e])}});function na(e){const{i18n:t,commonProps:a}=We(),{classNameModifiers:r=[],data:n,valid:i,errors:o,fieldProblems:s,fieldName:l,onInput:d,onBlur:c,trimOnBlur:u}=e,m=ra(e,t).getErrorMessage(l,o,s),p=n[l],g=we(l,n.country),y=o=>{switch(o){case"country":return R(aa,{classNameModifiers:r,allowedCountries:e.allowedCountries,errorMessage:m,onDropdownChange:e.onDropdownChange,value:p,className:e.hideField?"adl-u-display-none":""});case"stateOrProvince":return R(ta,{classNameModifiers:r,selectedCountry:n.country,errorMessage:m,onDropdownChange:e.onDropdownChange,value:p});default:return R(Ue,Object.assign({name:o,label:t.get(g),classNameModifiers:r,errorMessage:m,isValid:i[o],showInlineErrors:a.showInlineErrors},{children:Jt("text",{classNameModifiers:r,name:o,value:p,onInput:d,onBlur:c,maxlength:e.maxlength,"aria-required":!0,"aria-label":e["aria-label"],"aria-invalid":!i[o],showInlineErrors:a.showInlineErrors,trimOnBlur:u})}))}};return e.hideField?R("div",Object.assign({className:"adl-u-display-none"},{children:y(l)})):y(l)}class ia{constructor(e){this.validationResults=e}get isValid(){return this.validationResults.reduce(((e,t)=>e&&t.isValid),!0)}hasError(){return Boolean(this.getError())}getError(){return this.validationResults.find((e=>e.hasError))}getAllErrors(){return this.validationResults.filter((e=>e.hasError))}}const oa={validate:()=>!0,modes:["blur","input"]};class sa{constructor(e){this.setRules(e)}setRules(e){this.rules=Object.assign(Object.assign({},this.rules),e)}getRulesFor(e){var t;const a=null!==(t=this.rules[e])&&void 0!==t?t:[oa];return Array.isArray(a)?a:[a]}validate({key:e,value:t,mode:a="blur"},r){const n=this.getRulesFor(e).map((e=>((e,t,a,r)=>{const n=e.validate(t,r),i=e.modes.includes(a);return{isValid:n,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t,r):e.errorMessage,hasError:i&&!n}})(e,t,a,r)));return new ia(n)}}const la=(e,t)=>Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,a)=>(t[a]=e[a],t)),{}),da=(e,t,a,r,n)=>t.reduce(((e,t)=>{var i,o,s;return Object.assign(Object.assign({},e),{[t]:null!==(s=null!==(o=null!==(i=e[t])&&void 0!==i?i:null==n?void 0:n[t])&&void 0!==o?o:null==r?void 0:r[t])&&void 0!==s?s:a})}),e);function ca({schema:e,defaultData:t,processField:a,fieldProblems:r,maskedFields:n}){const i=e=>{var i,o;if(void 0===t[e])return{valid:!1,errors:null,data:null,fieldProblems:null!==(i=null==r?void 0:r[e])&&void 0!==i?i:null};const[s,l]=a({key:e,value:t[e],mode:"blur",defaultData:t,maskedFields:n},{state:{data:t}});return{valid:l.isValid&&!(null==r?void 0:r[e])||!1,errors:l.hasError()?l.getError():null,data:s,fieldProblems:null!==(o=null==r?void 0:r[e])&&void 0!==o?o:null}},o=e.reduce(((e,t)=>{const{valid:a,errors:r,data:n,fieldProblems:o}=i(t);return{valid:Object.assign(Object.assign({},e.valid),{[t]:a}),errors:Object.assign(Object.assign({},e.errors),{[t]:r}),data:Object.assign(Object.assign({},e.data),{[t]:n}),fieldProblems:Object.assign(Object.assign({},e.fieldProblems),{[t]:o})}}),{data:{},valid:{},errors:{},fieldProblems:{}});return{schema:e,data:o.data,valid:o.valid,errors:o.errors,fieldProblems:o.fieldProblems,maskedFields:n}}function ua({rules:e,schema:t,formatters:a,defaultData:r={},fieldProblems:n,maskedFields:i}){var o;const s=me((()=>new sa(e)),[e]),l=pe("function"==typeof t?t:()=>t,[t]),d=({key:e,value:t,mode:r,defaultData:n,maskedFields:i},o)=>{var l;const d=(null===(l=null==a?void 0:a[e])||void 0===l?void 0:l.formatter)?a[e].formatter:null==a?void 0:a[e],c=d&&"function"==typeof d?d(null!=t?t:"",o):t;return[c,!((null==i?void 0:i.includes(e))&&n[e]===t&&n[e])?s.validate({key:e,value:c,mode:r},o):{isValid:!0,hasError:()=>null}]},[c,u]=le(function(e){return function(t,{type:a,key:r,value:n,mode:i,schema:o,defaultData:s,formValue:l,selectedSchema:d,maskedFields:c,fieldProblems:u}){var m,p,g,y,b;const f=d||t.schema;switch(a){case"setData":return Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),{[r]:n})});case"setValid":return Object.assign(Object.assign({},t),{valid:Object.assign(Object.assign({},t.valid),{[r]:n})});case"setErrors":return Object.assign(Object.assign({},t),{errors:Object.assign(Object.assign({},t.errors),{[r]:n})});case"setFieldProblems":return null!==(p=null===(m=null==t?void 0:t.schema)||void 0===m?void 0:m.reduce(((e,a)=>{var r,n;return Object.assign(Object.assign({},e),{fieldProblems:Object.assign(Object.assign({},t.fieldProblems),{[a]:null!==(r=null==u?void 0:u[a])&&void 0!==r?r:null}),valid:Object.assign(Object.assign({},t.valid),{[a]:(null===(n=t.valid)||void 0===n?void 0:n[a])&&!u[a]})})}),t))&&void 0!==p?p:t;case"updateField":{const[a,o]=e({key:r,value:n,mode:i,defaultData:s,maskedFields:c},{state:t}),l=t.data[r],d=Object.assign({},t.fieldProblems);return l!==a&&(d[r]=null),Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),{[r]:a}),errors:Object.assign(Object.assign({},t.errors),{[r]:o.hasError()?o.getError():null}),valid:Object.assign(Object.assign({},t.valid),{[r]:o.isValid&&!d[r]||!1}),fieldProblems:d})}case"mergeForm":{const e=Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),l.data),errors:Object.assign(Object.assign({},t.errors),l.errors),valid:Object.assign(Object.assign({},t.valid),l.valid),fieldProblems:Object.assign(Object.assign({},t.fieldProblems),l.fieldProblems)});return e.valid&&(e.isValid=Object.values(e.valid).every((e=>e))),e}case"setSchema":{const a=ca({schema:o,defaultData:s,processField:e,fieldProblems:u,maskedFields:c}),r=t.schema.filter((e=>!o.includes(e))),n=o.filter((e=>!t.schema.includes(e))),i={data:la(t.data,n),errors:la(t.errors,n),valid:la(t.valid,n)},l=da(la(t.data,r),n,null,a.data,null===(g=t.local)||void 0===g?void 0:g.data),d=da(la(t.valid,r),n,!1,a.valid,null===(y=t.local)||void 0===y?void 0:y.valid),m=da(la(t.errors,r),n,null,a.errors,null===(b=t.local)||void 0===b?void 0:b.errors);return Object.assign(Object.assign({},t),{schema:o,data:l,valid:d,errors:m,local:i})}case"validateForm":{const a=f.reduce(((a,r)=>{const[,n]=e({key:r,value:t.data[r],mode:"blur",defaultData:s,maskedFields:c},{state:t});return{valid:Object.assign(Object.assign({},a.valid),{[r]:n.isValid&&!t.fieldProblems[r]||!1}),errors:Object.assign(Object.assign({},a.errors),{[r]:n.hasError()?n.getError():null})}}),{valid:t.valid,errors:t.errors});return Object.assign(Object.assign({},t),{valid:a.valid,errors:a.errors})}default:throw new Error("Undefined useForm action")}}}(d),{defaultData:r,schema:null!==(o=l(r))&&void 0!==o?o:[],processField:d,fieldProblems:n,maskedFields:i},ca),m=me((()=>c.schema.reduce(((e,t)=>e&&c.valid[t]),!0)),[c.schema,c.valid]),p=pe(((e=null)=>{u({type:"validateForm",selectedSchema:e,defaultData:r,maskedFields:i})}),[]),g=pe(((e,t)=>u({type:"setErrors",key:e,value:t})),[]),y=pe(((e,t)=>u({type:"setValid",key:e,value:t})),[]),b=pe(((e,t)=>u({type:"setData",key:e,value:t})),[]),f=pe((e=>u({type:"setSchema",schema:e,defaultData:r})),[c.schema]),h=pe((e=>u({type:"mergeForm",formValue:e})),[]),v=pe((e=>u({type:"setFieldProblems",fieldProblems:e})),[c.schema]);return de((()=>{const e=l(c.data);U(c.schema,e)||f(e)}),[c.schema,c.data,f,l]),de((()=>{v(null!=n?n:{})}),[JSON.stringify(n)]),{handleChangeFor:(e,t="blur")=>a=>{const n=((e,t)=>t.target?"checkbox"===t.target.type?!c.data[e]:t.target.value:t)(e,a);u({type:"updateField",key:e,value:n,mode:t,defaultData:r,maskedFields:i})},triggerValidation:p,setData:b,setValid:y,setErrors:g,isValid:m,mergeForm:h,setFieldProblems:v,schema:c.schema,valid:c.valid,errors:c.errors,data:c.data,fieldProblems:c.fieldProblems}}var ma="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},pa={},ga={get exports(){return pa},set exports(e){pa=e}},ya=function(e){return e&&e.Math==Math&&e},ba=ya("object"==typeof globalThis&&globalThis)||ya("object"==typeof window&&window)||ya("object"==typeof self&&self)||ya("object"==typeof ma&&ma)||function(){return this}()||Function("return this")(),fa={},ha=function(e){try{return!!e()}catch(e){return!0}},va=!ha((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),_a=!ha((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Na=_a,Oa=Function.prototype.call,Ia=Na?Oa.bind(Oa):function(){return Oa.apply(Oa,arguments)},Ea={},Ta={}.propertyIsEnumerable,Aa=Object.getOwnPropertyDescriptor,Sa=Aa&&!Ta.call({1:2},1);Ea.f=Sa?function(e){var t=Aa(this,e);return!!t&&t.enumerable}:Ta;var Ca,Ra,Da=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ka=_a,La=Function.prototype,wa=La.call,Pa=ka&&La.bind.bind(wa,wa),ja=ka?Pa:function(e){return function(){return wa.apply(e,arguments)}},xa=ja,Ma=xa({}.toString),Fa=xa("".slice),Va=function(e){return Fa(Ma(e),8,-1)},Ua=ha,Ba=Va,Wa=Object,Ha=ja("".split),qa=Ua((function(){return!Wa("z").propertyIsEnumerable(0)}))?function(e){return"String"==Ba(e)?Ha(e,""):Wa(e)}:Wa,Ga=function(e){return null==e},$a=Ga,Xa=TypeError,Ya=function(e){if($a(e))throw Xa("Can't call method on "+e);return e},Ka=qa,za=Ya,Za=function(e){return Ka(za(e))},Qa="object"==typeof document&&document.all,Ja={all:Qa,IS_HTMLDDA:void 0===Qa&&void 0!==Qa},er=Ja.all,tr=Ja.IS_HTMLDDA?function(e){return"function"==typeof e||e===er}:function(e){return"function"==typeof e},ar=tr,rr=Ja.all,nr=Ja.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:ar(e)||e===rr}:function(e){return"object"==typeof e?null!==e:ar(e)},ir=ba,or=tr,sr=function(e){return or(e)?e:void 0},lr=function(e,t){return arguments.length<2?sr(ir[e]):ir[e]&&ir[e][t]},dr=ja({}.isPrototypeOf),cr=ba,ur=lr("navigator","userAgent")||"",mr=cr.process,pr=cr.Deno,gr=mr&&mr.versions||pr&&pr.version,yr=gr&&gr.v8;yr&&(Ra=(Ca=yr.split("."))[0]>0&&Ca[0]<4?1:+(Ca[0]+Ca[1])),!Ra&&ur&&(!(Ca=ur.match(/Edge\/(\d+)/))||Ca[1]>=74)&&(Ca=ur.match(/Chrome\/(\d+)/))&&(Ra=+Ca[1]);var br=Ra,fr=ha,hr=!!Object.getOwnPropertySymbols&&!fr((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&br&&br<41})),vr=hr&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,_r=lr,Nr=tr,Or=dr,Ir=Object,Er=vr?function(e){return"symbol"==typeof e}:function(e){var t=_r("Symbol");return Nr(t)&&Or(t.prototype,Ir(e))},Tr=String,Ar=tr,Sr=function(e){try{return Tr(e)}catch(e){return"Object"}},Cr=TypeError,Rr=function(e){if(Ar(e))return e;throw Cr(Sr(e)+" is not a function")},Dr=Ga,kr=Ia,Lr=tr,wr=nr,Pr=TypeError,jr={},xr={get exports(){return jr},set exports(e){jr=e}},Mr=ba,Fr=Object.defineProperty,Vr=function(e,t){try{Fr(Mr,e,{value:t,configurable:!0,writable:!0})}catch(a){Mr[e]=t}return t},Ur=Vr,Br="__core-js_shared__",Wr=ba[Br]||Ur(Br,{}),Hr=Wr;(xr.exports=function(e,t){return Hr[e]||(Hr[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"\xa9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var qr=Ya,Gr=Object,$r=function(e){return Gr(qr(e))},Xr=ja({}.hasOwnProperty),Yr=Object.hasOwn||function(e,t){return Xr($r(e),t)},Kr=ja,zr=0,Zr=Math.random(),Qr=Kr(1..toString),Jr=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Qr(++zr+Zr,36)},en=ba,tn=Yr,an=Jr,rn=hr,nn=vr,on=jr("wks"),sn=en.Symbol,ln=sn&&sn.for,dn=nn?sn:sn&&sn.withoutSetter||an,cn=function(e){if(!tn(on,e)||!rn&&"string"!=typeof on[e]){var t="Symbol."+e;rn&&tn(sn,e)?on[e]=sn[e]:on[e]=nn&&ln?ln(t):dn(t)}return on[e]},un=Ia,mn=nr,pn=Er,gn=function(e,t){var a=e[t];return Dr(a)?void 0:Rr(a)},yn=function(e,t){var a,r;if("string"===t&&Lr(a=e.toString)&&!wr(r=kr(a,e)))return r;if(Lr(a=e.valueOf)&&!wr(r=kr(a,e)))return r;if("string"!==t&&Lr(a=e.toString)&&!wr(r=kr(a,e)))return r;throw Pr("Can't convert object to primitive value")},bn=TypeError,fn=cn("toPrimitive"),hn=function(e,t){if(!mn(e)||pn(e))return e;var a,r=gn(e,fn);if(r){if(void 0===t&&(t="default"),a=un(r,e,t),!mn(a)||pn(a))return a;throw bn("Can't convert object to primitive value")}return void 0===t&&(t="number"),yn(e,t)},vn=Er,_n=function(e){var t=hn(e,"string");return vn(t)?t:t+""},Nn=nr,On=ba.document,In=Nn(On)&&Nn(On.createElement),En=function(e){return In?On.createElement(e):{}},Tn=!va&&!ha((function(){return 7!=Object.defineProperty(En("div"),"a",{get:function(){return 7}}).a})),An=va,Sn=Ia,Cn=Ea,Rn=Da,Dn=Za,kn=_n,Ln=Yr,wn=Tn,Pn=Object.getOwnPropertyDescriptor;fa.f=An?Pn:function(e,t){if(e=Dn(e),t=kn(t),wn)try{return Pn(e,t)}catch(e){}if(Ln(e,t))return Rn(!Sn(Cn.f,e,t),e[t])};var jn={},xn=va&&ha((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Mn=nr,Fn=String,Vn=TypeError,Un=function(e){if(Mn(e))return e;throw Vn(Fn(e)+" is not an object")},Bn=va,Wn=Tn,Hn=xn,qn=Un,Gn=_n,$n=TypeError,Xn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor,Kn="enumerable",zn="configurable",Zn="writable";jn.f=Bn?Hn?function(e,t,a){if(qn(e),t=Gn(t),qn(a),"function"==typeof e&&"prototype"===t&&"value"in a&&Zn in a&&!a[Zn]){var r=Yn(e,t);r&&r[Zn]&&(e[t]=a.value,a={configurable:zn in a?a[zn]:r[zn],enumerable:Kn in a?a[Kn]:r[Kn],writable:!1})}return Xn(e,t,a)}:Xn:function(e,t,a){if(qn(e),t=Gn(t),qn(a),Wn)try{return Xn(e,t,a)}catch(e){}if("get"in a||"set"in a)throw $n("Accessors not supported");return"value"in a&&(e[t]=a.value),e};var Qn=jn,Jn=Da,ei=va?function(e,t,a){return Qn.f(e,t,Jn(1,a))}:function(e,t,a){return e[t]=a,e},ti={},ai={get exports(){return ti},set exports(e){ti=e}},ri=va,ni=Yr,ii=Function.prototype,oi=ri&&Object.getOwnPropertyDescriptor,si=ni(ii,"name"),li={EXISTS:si,PROPER:si&&"something"===function(){}.name,CONFIGURABLE:si&&(!ri||ri&&oi(ii,"name").configurable)},di=tr,ci=Wr,ui=ja(Function.toString);di(ci.inspectSource)||(ci.inspectSource=function(e){return ui(e)});var mi,pi,gi,yi=ci.inspectSource,bi=tr,fi=ba.WeakMap,hi=bi(fi)&&/native code/.test(String(fi)),vi=Jr,_i=jr("keys"),Ni={},Oi=hi,Ii=ba,Ei=nr,Ti=ei,Ai=Yr,Si=Wr,Ci=function(e){return _i[e]||(_i[e]=vi(e))},Ri=Ni,Di="Object already initialized",ki=Ii.TypeError,Li=Ii.WeakMap;if(Oi||Si.state){var wi=Si.state||(Si.state=new Li);wi.get=wi.get,wi.has=wi.has,wi.set=wi.set,mi=function(e,t){if(wi.has(e))throw ki(Di);return t.facade=e,wi.set(e,t),t},pi=function(e){return wi.get(e)||{}},gi=function(e){return wi.has(e)}}else{var Pi=Ci("state");Ri[Pi]=!0,mi=function(e,t){if(Ai(e,Pi))throw ki(Di);return t.facade=e,Ti(e,Pi,t),t},pi=function(e){return Ai(e,Pi)?e[Pi]:{}},gi=function(e){return Ai(e,Pi)}}var ji={set:mi,get:pi,has:gi,enforce:function(e){return gi(e)?pi(e):mi(e,{})},getterFor:function(e){return function(t){var a;if(!Ei(t)||(a=pi(t)).type!==e)throw ki("Incompatible receiver, "+e+" required");return a}}},xi=ha,Mi=tr,Fi=Yr,Vi=va,Ui=li.CONFIGURABLE,Bi=yi,Wi=ji.enforce,Hi=ji.get,qi=Object.defineProperty,Gi=Vi&&!xi((function(){return 8!==qi((function(){}),"length",{value:8}).length})),$i=String(String).split("String"),Xi=ai.exports=function(e,t,a){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(t="get "+t),a&&a.setter&&(t="set "+t),(!Fi(e,"name")||Ui&&e.name!==t)&&(Vi?qi(e,"name",{value:t,configurable:!0}):e.name=t),Gi&&a&&Fi(a,"arity")&&e.length!==a.arity&&qi(e,"length",{value:a.arity});try{a&&Fi(a,"constructor")&&a.constructor?Vi&&qi(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=Wi(e);return Fi(r,"source")||(r.source=$i.join("string"==typeof t?t:"")),e};Function.prototype.toString=Xi((function(){return Mi(this)&&Hi(this).source||Bi(this)}),"toString");var Yi=tr,Ki=jn,zi=ti,Zi=Vr,Qi={},Ji=Math.ceil,eo=Math.floor,to=Math.trunc||function(e){var t=+e;return(t>0?eo:Ji)(t)},ao=to,ro=function(e){var t=+e;return t!=t||0===t?0:ao(t)},no=ro,io=Math.max,oo=Math.min,so=ro,lo=Math.min,co=function(e){return e>0?lo(so(e),9007199254740991):0},uo=Za,mo=function(e,t){var a=no(e);return a<0?io(a+t,0):oo(a,t)},po=function(e){return co(e.length)},go=function(e){return function(t,a,r){var n,i=uo(t),o=po(i),s=mo(r,o);if(e&&a!=a){for(;o>s;)if((n=i[s++])!=n)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===a)return e||s||0;return!e&&-1}},yo={includes:go(!0),indexOf:go(!1)},bo=Yr,fo=Za,ho=yo.indexOf,vo=Ni,_o=ja([].push),No=function(e,t){var a,r=fo(e),n=0,i=[];for(a in r)!bo(vo,a)&&bo(r,a)&&_o(i,a);for(;t.length>n;)bo(r,a=t[n++])&&(~ho(i,a)||_o(i,a));return i},Oo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");Qi.f=Object.getOwnPropertyNames||function(e){return No(e,Oo)};var Io={};Io.f=Object.getOwnPropertySymbols;var Eo=lr,To=Qi,Ao=Io,So=Un,Co=ja([].concat),Ro=Eo("Reflect","ownKeys")||function(e){var t=To.f(So(e)),a=Ao.f;return a?Co(t,a(e)):t},Do=Yr,ko=Ro,Lo=fa,wo=jn,Po=ha,jo=tr,xo=/#|\.prototype\./,Mo=function(e,t){var a=Vo[Fo(e)];return a==Bo||a!=Uo&&(jo(t)?Po(t):!!t)},Fo=Mo.normalize=function(e){return String(e).replace(xo,".").toLowerCase()},Vo=Mo.data={},Uo=Mo.NATIVE="N",Bo=Mo.POLYFILL="P",Wo=Mo,Ho=ba,qo=fa.f,Go=ei,$o=function(e,t,a,r){r||(r={});var n=r.enumerable,i=void 0!==r.name?r.name:t;if(Yi(a)&&zi(a,i,r),r.global)n?e[t]=a:Zi(t,a);else{try{r.unsafe?e[t]&&(n=!0):delete e[t]}catch(e){}n?e[t]=a:Ki.f(e,t,{value:a,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Xo=Vr,Yo=function(e,t,a){for(var r=ko(t),n=wo.f,i=Lo.f,o=0;o<r.length;o++){var s=r[o];Do(e,s)||a&&Do(a,s)||n(e,s,i(t,s))}},Ko=Wo,zo=function(e,t){var a,r,n,i,o,s=e.target,l=e.global,d=e.stat;if(a=l?Ho:d?Ho[s]||Xo(s,{}):(Ho[s]||{}).prototype)for(r in t){if(i=t[r],n=e.dontCallGetSet?(o=qo(a,r))&&o.value:a[r],!Ko(l?r:s+(d?".":"#")+r,e.forced)&&void 0!==n){if(typeof i==typeof n)continue;Yo(i,n)}(e.sham||n&&n.sham)&&Go(i,"sham",!0),$o(a,r,i,e)}},Zo={};Zo[cn("toStringTag")]="z";var Qo="[object z]"===String(Zo),Jo=tr,es=Va,ts=cn("toStringTag"),as=Object,rs="Arguments"==es(function(){return arguments}()),ns=Qo?es:function(e){var t,a,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(t=as(e),ts))?a:rs?es(t):"Object"==(r=es(t))&&Jo(t.callee)?"Arguments":r},is=String,os="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff",ss=Ya,ls=function(e){if("Symbol"===ns(e))throw TypeError("Cannot convert a Symbol value to a string");return is(e)},ds=os,cs=ja("".replace),us="["+ds+"]",ms=RegExp("^"+us+us+"*"),ps=RegExp(us+us+"*$"),gs=function(e){return function(t){var a=ls(ss(t));return 1&e&&(a=cs(a,ms,"")),2&e&&(a=cs(a,ps,"")),a}},ys={start:gs(1),end:gs(2),trim:gs(3)},bs=li.PROPER,fs=ha,hs=os,vs=ys.start,_s=function(e){return fs((function(){return!!hs[e]()||"\u200b\x85\u180e"!=="\u200b\x85\u180e"[e]()||bs&&hs[e].name!==e}))}("trimStart")?function(){return vs(this)}:"".trimStart;zo({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==_s},{trimLeft:_s});zo({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==_s},{trimStart:_s});var Ns=ba,Os=ja,Is=function(e,t){return Os(Ns[e].prototype[t])}("String","trimLeft");ga.exports=Is;const Es=(e,t,a,r)=>{var n,i,o,s;if(r&&(null===(i=null===(n=e[a])||void 0===n?void 0:n[t])||void 0===i?void 0:i.formatter))return null;const l=null===(s=null===(o=e[a])||void 0===o?void 0:o[t])||void 0===s?void 0:s.maxlength;return l||30};function Ts(e,t,a){if(!a||!t[a])return e;const r={};return Object.entries(e).forEach((([e,n])=>{const i=t[a][e];if(i){const t=Array.isArray(n)?[...n]:[n],a=Array.isArray(i)?[...i]:[i];r[e]=[...a],t.forEach((t=>{const n=t.modes;let i=!1;a.every((e=>(i=U(e.modes,n),!i))),i||r[e].unshift(t)}))}else r[e]=n})),Object.entries(t[a]).forEach((([e,t])=>{r[e]||(r[e]=t)})),r}const As=e=>!(null!=e),Ss=e=>!!(As(e)||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&/^[\s]*$/.test(e)),Cs=e=>"string"==typeof e||e instanceof String,Rs=e=>Cs(e)&&!Ss(e),Ds="?\\-\\+_=!@#$%^&*(){}~<>\\[\\]\\/\\\\",ks=(e,t="g")=>new RegExp(`[${e}]`,t),Ls={digitsHyphen:/^[\d-]+$/,noHtml:/^[^<>&]+$/,alphaNum:/^\d[a-zA-Z0-9]{6,11}$/,noSpecialChars:(ws=Ds,Ps=!0,new RegExp(`^[${Ps?"^":""}${ws}]+$`))};var ws,Ps;const js=(e,t)=>!!Ss(e)||e.length===t,xs=e=>e.trimStart().replace(/\s+/g," ");function Ms({heading:e,description:t,headingComponent:a,descriptionComponent:r,classNames:n}){const i=e?R("h2",Object.assign({className:"adyen-kyc-form-header__heading"},{children:e})):a,o=t?R("div",Object.assign({className:"adyen-kyc-form-header__description"},{children:t})):r;return i||o?R("div",Object.assign({className:`adyen-kyc-form-header ${n}`},{children:[i,o]})):null}const Fs=e=>({formatter:t=>t.replace(ks("^\\d","g"),"").substr(0,e),format:new Array(e).fill("9").join(""),maxlength:e}),Vs=ks(Ds),Us=ks(Ds.replace("-","")),Bs={postalCode:{formatter:(e,t)=>{var a;const r=t.state.data.country,n=null===(a=Ws[r])||void 0===a?void 0:a.postalCode.formatter;return n?n(e):e}},street:{formatter:e=>xs(e).replace(Us,"")},houseNumberOrName:{formatter:e=>xs(e).replace(Us,"")},city:{formatter:e=>xs(e).replace(Vs,"")}},Ws={AT:{postalCode:Fs(4)},AU:{postalCode:Fs(4)},BE:{postalCode:Fs(4)},BG:{postalCode:Fs(4)},BR:{postalCode:Fs(8)},CA:{postalCode:{format:"A9A 9A9 or A9A9A9",maxlength:7}},CH:{postalCode:Fs(4)},CY:{postalCode:Fs(4)},CZ:{postalCode:{format:"999 99",maxlength:6}},DE:{postalCode:Fs(5)},DK:{postalCode:{format:"9999",maxlength:7}},EE:{postalCode:Fs(5)},ES:{postalCode:Fs(5)},FI:{postalCode:Fs(5)},FR:{postalCode:Fs(5)},GB:{postalCode:{formatter:e=>e.replace(ks(Ds),"").substr(0,8),format:"AA99 9AA or A99 9AA or A9 9AA",maxlength:8}},GR:{postalCode:{format:"999 99",maxlength:6}},HR:{postalCode:{format:"[1-5]9999",maxlength:5}},HU:{postalCode:Fs(4)},IE:{postalCode:{format:"A99 A999",maxlength:8}},IS:{postalCode:Fs(3)},IT:{postalCode:Fs(5)},LI:{postalCode:Fs(4)},LT:{postalCode:{format:"9999 or 99999 or LT-99999",maxlength:8}},LU:{postalCode:Fs(4)},LV:{postalCode:{format:"9999 or LV-9999",maxlength:7}},MC:{postalCode:{format:"980NN",maxlength:5}},MT:{postalCode:{format:"AA99 or AAA99 or AA9999 or AAA9999",maxlength:8}},MY:{postalCode:Fs(5)},NL:{postalCode:{format:"9999AA",maxlength:7}},NZ:{postalCode:Fs(4)},NO:{postalCode:Fs(4)},PL:{postalCode:{formatter:e=>{const t=e.replace(ks("^\\d-","g"),""),a=t.indexOf("-")>-1?6:5;return t.substr(0,a)},format:"99-999",maxlength:6}},PT:{postalCode:{formatter:e=>e.replace(ks("^\\d-","g"),"").substr(0,8),format:"9999-999",maxlength:8}},RO:{postalCode:Fs(6)},SI:{postalCode:{format:"9999 or SI-9999",maxlength:7}},SE:{postalCode:Fs(5)},SG:{postalCode:Fs(6)},SK:{postalCode:{format:"99999 or SK-99999",maxlength:8}},JP:{postalCode:{format:"999-9999",maxlength:8}},US:{postalCode:{formatter:e=>{const t=e.replace(ks("^\\d-","g"),""),a=t.indexOf("-")>-1?10:5;return t.substr(0,a)},format:"99999 or 99999-9999"}}},Hs=e=>({pattern:new RegExp(`\\d{${e}}`)}),qs={AT:Hs(4),AU:Hs(4),BE:{pattern:/(?:(?:[1-9])(?:\d{3}))/},BG:Hs(4),BR:Hs(8),CA:{pattern:/(?:[ABCEGHJ-NPRSTVXY]\d[A-Z][ -]?\d[A-Z]\d)/},CH:{pattern:/[1-9]\d{3}/},CY:Hs(4),CZ:{pattern:/\d{3}\s?\d{2}/},DE:Hs(5),DK:{pattern:/^(DK-)?[0-9]{4}$/},EE:Hs(5),ES:{pattern:/(?:0[1-9]|[1-4]\d|5[0-2])\d{3}/},FI:Hs(5),FR:Hs(5),GB:{pattern:/^([A-Za-z][A-Ha-hK-Yk-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$/},GE:Hs(4),GR:{pattern:/^\d{3}\s{0,1}\d{2}$/},HR:{pattern:/^([1-5])[0-9]{4}$/},HU:Hs(4),IE:{pattern:/(?:^[AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}/},IS:Hs(3),IT:Hs(5),LI:Hs(4),LT:{pattern:/^(LT-)?[0-9]{4,5}$/},LU:Hs(4),LV:{pattern:/^(LV-)?[0-9]{4}$/},MC:{pattern:/^980\d{2}$/},MT:{pattern:/^[A-Za-z]{2,3}[ ]?\d{2}(?:\d{2})?$/},MY:Hs(5),NZ:Hs(4),NL:{pattern:/(?:NL-)?(?:[1-9]\d{3} ?(?:[A-EGHJ-NPRTVWXZ][A-EGHJ-NPRSTVWXZ]|S[BCEGHJ-NPRTVWXZ]))/},NO:Hs(4),PL:{pattern:/^\d{2}[-]\d{3}$/},PT:{pattern:/^([1-9]\d{3})([- ]?(\d{3})? *)$/},RO:Hs(6),SI:{pattern:/^(SI-)?[0-9]{4}$/},SE:Hs(5),SG:Hs(6),SK:{pattern:/^(SK-)?[0-9]{5}$/},JP:{pattern:/^\d{3}[-]\d{4}$/},US:{pattern:/^(\d{5})([-]?(\d{4})? *)$/}},Gs=["US","GB"],$s={street:{modes:["blur"],validate:e=>Rs(e),errorMessage:"fieldIsRequired"},houseNumberOrName:{modes:["blur"],validate:(e,t)=>{const a=t.state.data.country;return!(!a||!Gs.includes(a))||Rs(e)},errorMessage:"fieldIsRequired"},postalCode:{modes:["blur"],validate:(e,t)=>{var a,r;const n=t.state.data.country;if(n){$s.postalCode.errorMessage={translationKey:"invalidFormatExpects",translationObject:{values:{format:(null===(a=Ws[n])||void 0===a?void 0:a.postalCode.format)||null}}};const t=null===(r=qs[n])||void 0===r?void 0:r.pattern;return t?t.test(e):!!e}return!!e},errorMessage:"fieldIsRequired"},city:{modes:["blur"],validate:Rs,errorMessage:"fieldIsRequired"},stateOrProvince:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},country:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},Xs=t.createContext(null);function Ys({stateRef:e}){return e.current.setState?null:R(Xs.Consumer,{children:({dispatch:t,setActiveForms:a})=>(e.current.setState=lt(t,200),e.current.setActiveForms=a,null)})}var Ks;!function(e){e[e.BASIC=0]="BASIC",e[e.INFO=1]="INFO",e[e.ERROR=2]="ERROR",e[e.WARNING=3]="WARNING",e[e.SUCCESS=4]="SUCCESS"}(Ks||(Ks={}));const zs=({className:e,title:t,type:r=Ks.BASIC,children:n,hasCloseButton:i=!0})=>{const[o,s]=se(!1);if(o)return null;const l=a("adl-alert",e,{"adl-alert--basic":r===Ks.BASIC,"adl-alert--information":r===Ks.INFO,"adl-alert--error":r===Ks.ERROR,"adl-alert--warning":r===Ks.WARNING,"adl-alert--success":r===Ks.SUCCESS});return R("div",Object.assign({className:l},{children:[R("div",Object.assign({className:"adl-alert__header"},{children:[R("span",Object.assign({className:"adl-alert__icon"},{children:R(Zs,{type:r})})),t&&R("span",Object.assign({className:a("adl-alert__title",{"adl-alert__title--no-content":!n})},{children:t})),i&&R("button",Object.assign({className:"adl-alert__dismiss",onClick:()=>s(!0)},{children:R(xe,{name:"cross",className:"adl-alert__dismiss__icon"})}))]})),n]}))},Zs=({type:e})=>{switch(e){case Ks.SUCCESS:return R(xe,{name:"check"});case Ks.ERROR:return R(xe,{name:"warning"});case Ks.WARNING:return R(xe,{name:"field-error"});case Ks.INFO:case Ks.BASIC:default:return R(xe,{name:"info-circle",className:"adl-alert__icon__info"})}},Qs=t.createContext(null);const Js=(e,t)=>t?"adl-link__icon adyen-kyc-icon-external-link":e?"adl-link__icon":null,el=({className:e,children:t,href:r,external:n,icon:i,underline:o,inheritStyles:s,showAsButton:l,iconLeft:d=!1,onClick:c})=>{if(!(e=>"#"!==e||(console.error('Links must include a valid href. If your href is "#", consider using a Button instead'),!1))(r))return null;const u=n?"_blank":"_self",m=n?"external noopener noreferrer ":null,p=i||n,g=l?a("adl-button",e,{"adl-button--icon":p&&!d,"adl-button--icon-left":p&&d}):a("adl-link",e,{"adl-link--with-icon":p,"adl-link--underline":o,"adl-link--inherit":s,"adl-link--icon-left":d});return R("a",Object.assign({href:r,className:g,target:u,rel:m,onClick:c},{children:[R("span",Object.assign({className:"adl-link__text"},{children:t})),p&&R(xe,{name:i,className:Js(i,n)})]}))},tl=({fieldName:e,label:t})=>{const{goToFormByFieldName:a}=function(){const e=ge(Qs);if(void 0===e)throw new Error("useFormRouterContext must be used within a FormRouterProvider");return e}();return R(el,Object.assign({onClick:t=>{t.preventDefault(),a(e)},href:"to-field-link"},{children:t}))},al=({validationErrors:e,formUtils:t})=>{const a=Object.keys(e);return R(zs,Object.assign({title:t.getVal("informationCouldNotBeSubmitted"),type:Ks.ERROR,hasCloseButton:!1},{children:R("div",Object.assign({className:"adl-alert__explanation adyen-kyc-error-panel__validation-errors"},{children:1===(null==a?void 0:a.length)?R("div",Object.assign({"data-testid":"validation-error--case-1"},{children:[t.getVal({translationKey:"fieldHasUnsupportedFormats",translationObject:{values:{fieldName:t.getLabel(a[0])}}}).toString()," ",R(tl,{fieldName:a[0],label:t.getVal("updateTheInformation")})," ",t.getVal("andResubmit")]})):R("div",Object.assign({"data-testid":"validation-error--case-2"},{children:[t.getVal("someFieldsHaveUnsupportedFormatedUpdateInfoAndResubmit"),R("ul",{children:a.map((e=>R("li",Object.assign({className:"adyen-kyc-error-panel__validation-error"},{children:R(tl,{fieldName:e,label:t.getLabel(e)})}),e)))})]}))}))}))};var rl;!function(e){e.DATA_MISSING="dataMissing",e.INVALID_INPUT="invalidInput",e.PENDING_STATUS="pendingStatus"}(rl||(rl={}));const nl={"1_100":[],"1_101":[],"1_102":[{key:"documents"}],"1_300":[{key:"individual.birthData.dateOfBirth"},{key:"individual.identificationData.number"},{key:"individual.name.firstName"},{key:"individual.name.lastName"},{key:"individual.residentialAddress"}],"1_301":[{key:"documents",type:["passport","driversLicense","identityCard"]}],"1_302":[{key:"documents",type:["passport","driversLicense","identityCard"]}],"1_303":[{key:"documents",type:["passport","driversLicense","identityCard"]}],"1_304":[{key:"documents",type:["proofOfResidency"]}],"1_305":[{key:"documents",type:["proofOfResidency"]}],"1_306":[{key:"documents",type:["proofOfResidency"]}],"1_307":[{key:"documents",type:["proofOfNationalIdNumber"]}],"1_308":[{key:"documents",type:["proofOfNationalIdNumber"]}],"1_309":[{key:"documents",type:["proofOfNationalIdNumber"]}],"1_313":[{key:"documents",type:["proofOfIndividualTaxId"]}],"1_314":[{key:"documents",type:["proofOfIndividualTaxId"]}],"1_315":[{key:"documents",type:["proofOfIndividualTaxId"]}],"1_316":[{key:"individual.identificationData.number"}],"1_500":[{key:"organization.legalName"},{key:"organization.registrationNumber"},{key:"organization.taxId"},{key:"organization.registeredAddress"}],"1_501":[{key:"documents",type:["registrationDocument"]}],"1_502":[{key:"documents",type:["registrationDocument"]}],"1_503":[{key:"documents",type:["taxDocument"]}],"1_504":[{key:"documents",type:["taxDocument"]}],"1_505":[{key:"documents",type:["proofOfAddress"]}],"1_506":[{key:"documents",type:["proofOfAddress"]}],"1_507":[],"1_508":[],"1_512":[{key:"documents",type:["taxDocument"]}],"1_513":[{key:"documents",type:["taxDocument"]}],"1_600":[{key:"soleProprietorship.name"},{key:"soleProprietorship.registeredAddress"}],"1_601":[{key:"documents",type:["solePropConstitutionalDocument"]}],"1_602":[{key:"documents",type:["solePropConstitutionalDocument"]}],"1_700":[{key:"bankAccount"}],"1_701":[{key:"bankAccount"}],"1_702":[{key:"bankAccount"}],"1_703":[{key:"documents",type:["bankStatementDocument"]}],"1_704":[{key:"documents",type:["bankStatementDocument"]}],"1_705":[{key:"documents",type:["bankStatementDocument"]}]};var il,ol;!function(e){e.INDIVIDUAL="individual",e.ORGANIZATION="organization",e.TRUST="trust",e.SOLE_PROPRIETORSHIP="soleProprietorship"}(il||(il={})),function(e){e.BANK_ACCOUNT="bankAccount",e.RECURRING_DETAIL="recurringDetail"}(ol||(ol={}));const sl={INDIVIDUAL:["personalDetails.firstName","personalDetails.lastName","personalDetails.residencyCountry"],DECISIONMAKER:["personalDetails.firstName","personalDetails.lastName","personalDetails.residencyCountry","personalDetails.role","personalDetails.jobTitle"],ORGANIZATION:["companyNameAndCountry.legalCompanyName","companyNameAndCountry.companyCountry"],SOLE_PROPRIETORSHIP:["solePropNameAndCountry.legalCompanyName","solePropNameAndCountry.companyCountry"]},ll={"personalDetails.firstName":"individual.name.firstName","personalDetails.lastName":"individual.name.lastName","personalDetails.birthDate":"individual.birthData.dateOfBirth","personalDetails.idNumber":"individual.identificationData.number","personalDetails.phoneNumber":"individual.phone.number","personalDetails.email":"individual.email","personalDetails.idNumberExempt":"individual.identificationData.nationalIdExempt","personalDetails.typeOfIdentity":"individual.identificationData.type","personalDetails.issuerState":"individual.identificationData.issuerState","personalDetails.licenseCardNumber":"individual.identificationData.cardNumber","address.city":"individual.residentialAddress.city","address.country":"individual.residentialAddress.country","address.postalCode":"individual.residentialAddress.postalCode","address.stateOrProvince":"individual.residentialAddress.stateOrProvince","address.street":"individual.residentialAddress.street","address.houseNumberOrName":"individual.residentialAddress.street2"},dl=Object.assign(Object.assign({},ll),{"personalDetails.residencyCountry":"individual.residentialAddress.country"}),cl=Object.assign({},H(ll)),ul={"payoutAccountDetails.transferInstrumentId":"id","payoutAccountDetails.accountType":"bankAccount.accountType","payoutAccountDetails.bankAccountNumber":"bankAccount.accountNumber","payoutAccountDetails.bankBicSwift":"bankAccount.bankBicSwift","payoutAccountDetails.bankCity":"bankAccount.bankCity","payoutAccountDetails.bankCode":"bankAccount.bankCode","payoutAccountDetails.bankName":"bankAccount.bankName","payoutAccountDetails.branchCode":"bankAccount.branchCode","payoutAccountDetails.checkCode":"bankAccount.checkCode","payoutAccountDetails.bankCountry":"bankAccount.countryCode","payoutAccountDetails.currency":"bankAccount.currencyCode","payoutAccountDetails.iban":"bankAccount.iban"},ml={"companyNameAndCountry.legalCompanyName":"organization.legalName","companyType.entityType":"organization.type","companyDetails.tradingName":"organization.doingBusinessAs","companyDetails.registrationNumber":"organization.registrationNumber","companyDetails.vatNumber":"organization.vatNumber","companyDetails.exemptedFromVat":"organization.vatAbsenceReason","companyDetails.vatAbsenceReason":"organization.vatAbsenceReason","companyDetails.taxInformation":"organization.taxInformation","companyDetails.stockExchangeMIC":"organization.stockData.marketIdentifier","companyDetails.stockISIN":"organization.stockData.stockNumber","companyRegistrationDetails.registrationAddress.city":"organization.registeredAddress.city","companyRegistrationDetails.registrationAddress.country":"organization.registeredAddress.country","companyRegistrationDetails.registrationAddress.postalCode":"organization.registeredAddress.postalCode","companyRegistrationDetails.registrationAddress.stateOrProvince":"organization.registeredAddress.stateOrProvince","companyRegistrationDetails.registrationAddress.street":"organization.registeredAddress.street","companyRegistrationDetails.registrationAddress.houseNumberOrName":"organization.registeredAddress.street2","companyRegistrationDetails.operationalAddress.city":"organization.principalPlaceOfBusiness.city","companyRegistrationDetails.operationalAddress.country":"organization.principalPlaceOfBusiness.country","companyRegistrationDetails.operationalAddress.postalCode":"organization.principalPlaceOfBusiness.postalCode","companyRegistrationDetails.operationalAddress.stateOrProvince":"organization.principalPlaceOfBusiness.stateOrProvince","companyRegistrationDetails.operationalAddress.street":"organization.principalPlaceOfBusiness.street","companyRegistrationDetails.operationalAddress.houseNumberOrName":"organization.principalPlaceOfBusiness.street2"},pl={"trustRegistrationDetails.trustType":"trust.type","trustRegistrationDetails.vatNumber":"trust.vatNumber","trustRegistrationDetails.legalName":"trust.name","trustRegistrationDetails.country":"trust.countryOfGoverningLaw","trustRegistrationAddress.registrationAddress.city":"trust.registeredAddress.city","trustRegistrationAddress.registrationAddress.country":"trust.registeredAddress.country","trustRegistrationAddress.registrationAddress.postalCode":"trust.registeredAddress.postalCode","trustRegistrationAddress.registrationAddress.stateOrProvince":"trust.registeredAddress.stateOrProvince","trustRegistrationAddress.registrationAddress.street":"trust.registeredAddress.street","trustRegistrationAddress.registrationAddress.houseNumberOrName":"trust.registeredAddress.street2","trustRegistrationAddress.operationalAddress.city":"trust.principalPlaceOfBusiness.city","trustRegistrationAddress.operationalAddress.country":"trust.principalPlaceOfBusiness.country","trustRegistrationAddress.operationalAddress.postalCode":"trust.principalPlaceOfBusiness.postalCode","trustRegistrationAddress.operationalAddress.stateOrProvince":"trust.principalPlaceOfBusiness.stateOrProvince","trustRegistrationAddress.operationalAddress.street":"trust.principalPlaceOfBusiness.street","trustRegistrationAddress.operationalAddress.houseNumberOrName":"trust.principalPlaceOfBusiness.street2"},gl={"solePropNameAndCountry.legalCompanyName":"soleProprietorship.name","solePropNameAndCountry.companyCountry":"soleProprietorship.countryOfGoverningLaw","solePropRegistrationDetails.tradingName":"soleProprietorship.doingBusinessAs","solePropRegistrationDetails.vatNumber":"soleProprietorship.vatNumber","solePropRegistrationDetails.registrationNumber":"soleProprietorship.registrationNumber","solePropRegistrationDetails.exemptedFromVat":"soleProprietorship.vatAbsenceReason","solePropRegistrationDetails.vatAbsenceReason":"soleProprietorship.vatAbsenceReason","solePropRegistrationDetails.taxInformation":"soleProprietorship.taxInformation","solePropRegistrationAddress.registrationAddress.city":"soleProprietorship.registeredAddress.city","solePropRegistrationAddress.registrationAddress.country":"soleProprietorship.registeredAddress.country","solePropRegistrationAddress.registrationAddress.postalCode":"soleProprietorship.registeredAddress.postalCode","solePropRegistrationAddress.registrationAddress.stateOrProvince":"soleProprietorship.registeredAddress.stateOrProvince","solePropRegistrationAddress.registrationAddress.street":"soleProprietorship.registeredAddress.street","solePropRegistrationAddress.registrationAddress.houseNumberOrName":"soleProprietorship.registeredAddress.street2","solePropRegistrationAddress.operationalAddress.city":"soleProprietorship.principalPlaceOfBusiness.city","solePropRegistrationAddress.operationalAddress.country":"soleProprietorship.principalPlaceOfBusiness.country","solePropRegistrationAddress.operationalAddress.postalCode":"soleProprietorship.principalPlaceOfBusiness.postalCode","solePropRegistrationAddress.operationalAddress.stateOrProvince":"soleProprietorship.principalPlaceOfBusiness.stateOrProvince","solePropRegistrationAddress.operationalAddress.street":"soleProprietorship.principalPlaceOfBusiness.street","solePropRegistrationAddress.operationalAddress.houseNumberOrName":"soleProprietorship.principalPlaceOfBusiness.street2"},yl=Object.assign({"companyNameAndCountry.companyCountry":"organization.registeredAddress.country"},ml),bl=Object.assign({},H(ml)),fl=Object.assign({},ul),hl=Object.assign({},H(ul)),vl=Object.assign(Object.assign({},bl),{"organization.registeredAddress":"companyRegistrationDetails.registrationAddress"}),_l=Object.assign(Object.assign({},cl),{"individual.residentialAddress":"address.address"}),Nl=Object.assign({bankAccount:"payoutAccountDetails"},hl),Ol=Object.assign({},pl),Il=Object.assign({},H(pl)),El=Object.assign({},gl),Tl=Object.assign({},H(gl)),Al={passport:"idDocument.idDocument",driversLicense:"idDocument.idDocument",identityCard:"idDocument.idDocument",proofOfNationalIdNumber:"proofOfNationalId.proofOfNationalId",proofOfResidency:"proofOfResidence.proofOfResidence",proofOfIndividualTaxId:"",registrationDocument:"companyRegistrationDocument.registrationDocument",taxDocument:"companyTaxDocument.taxDocument",proofOfAddress:"",bankStatementDocument:"payoutAccountDocuments.bankStatementDocument",trustDocument:"trustDocument.trustDocument",solePropConstitutionalDocument:"solePropConstitutionalDocument.constitutionalDocument"};var Sl,Cl;function Rl(e,t){var a,r,n,i,o,s,l,d,c,u,m,p,g,y,b,f,h,v,_,N,O,I;if(t){const E={placeholders:{},labels:{},data:{},formVerificationErrors:{},requiredFields:[],optionalFields:[],maskedFields:[],validators:null};return E.placeholders=Object.assign({},null===(a=e.placeholders)||void 0===a?void 0:a[t]),E.labels=Object.assign({},null===(r=e.labels)||void 0===r?void 0:r[t]),E.data=Object.assign({},null===(n=e.data)||void 0===n?void 0:n[t]),(null===(i=e.readOnlyFields)||void 0===i?void 0:i[t])&&(E.readOnlyFields=null===(o=e.readOnlyFields)||void 0===o?void 0:o[t]),(null===(s=e.requiredFields)||void 0===s?void 0:s[t])&&(E.requiredFields=null===(l=e.requiredFields)||void 0===l?void 0:l[t]),(null===(d=e.optionalFields)||void 0===d?void 0:d[t])&&(E.optionalFields=null===(c=e.optionalFields)||void 0===c?void 0:c[t]),(null===(u=e.validators)||void 0===u?void 0:u[t])&&(E.validators=Object.assign({},null===(m=e.validators)||void 0===m?void 0:m[t])),(null===(p=e.verifyFields)||void 0===p?void 0:p[t])&&(E.verifyFields=null===(g=e.verifyFields)||void 0===g?void 0:g[t]),(null===(b=null===(y=e.problems)||void 0===y?void 0:y.verificationErrors)||void 0===b?void 0:b[t])&&(E.formVerificationErrors=null===(h=null===(f=e.problems)||void 0===f?void 0:f.verificationErrors)||void 0===h?void 0:h[t]),(null===(_=null===(v=e.problems)||void 0===v?void 0:v.validationErrors)||void 0===_?void 0:_[t])&&(E.fieldValidationErrors=null===(O=null===(N=e.problems)||void 0===N?void 0:N.validationErrors)||void 0===O?void 0:O[t]),(null===(I=e.maskedFields)||void 0===I?void 0:I[t])&&(E.maskedFields=e.maskedFields[t]),E}return null}function Dl(e,t){if(t){const a={placeholders:{},labels:{},data:{},requiredFields:[],maskedFields:[],optionalFields:[],readOnlyFields:[],verifyFields:[],fieldValidationErrors:{}};return t.forEach((t=>{var r,n,i,o,s,l,d,c,u,m,p;a.placeholders[t]=null===(r=e.placeholders)||void 0===r?void 0:r[t],a.labels[t]=null===(n=e.labels)||void 0===n?void 0:n[t],a.data[t]=null===(i=e.data)||void 0===i?void 0:i[t],(null===(o=e.readOnlyFields)||void 0===o?void 0:o.includes(t))&&a.readOnlyFields.push(t),(null===(s=e.requiredFields)||void 0===s?void 0:s.includes(t))&&a.requiredFields.push(t),(null===(l=e.optionalFields)||void 0===l?void 0:l.includes(t))&&a.optionalFields.push(t),(null===(d=e.verifyFields)||void 0===d?void 0:d.includes(t))&&a.verifyFields.push(t),(null===(c=e.fieldValidationErrors)||void 0===c?void 0:c[t])&&(a.fieldValidationErrors[t]=e.fieldValidationErrors[t]),(null===(u=e.maskedFields)||void 0===u?void 0:u.includes(t))&&a.maskedFields.push(t),(null===(m=e.validators)||void 0===m?void 0:m[t])&&((null==a?void 0:a.validators)||(a.validators={}),a.validators[t]=null===(p=e.validators)||void 0===p?void 0:p[t])})),a}return null}!function(e){e[e.EMPTY=0]="EMPTY",e[e.FINISHED=1]="FINISHED",e[e.PROCESSING=2]="PROCESSING",e[e.DETAILS_REQUIRED=3]="DETAILS_REQUIRED",e[e.DOWNLOAD=4]="DOWNLOAD",e[e.ERROR=5]="ERROR"}(Sl||(Sl={})),function(e){e.TASKS_OVERVIEW="TASKS_OVERVIEW",e.INDIVIDUAL="INDIVIDUAL",e.COMPANY="COMPANY",e.PAYOUT="PAYOUT",e.PAYIN="PAYIN",e.SERVICE_AGREEMENT="SERVICE_AGREEMENT",e.PCI_DSS="PCI_DSS",e.DECISION_MAKER_OVERVIEW="DECISION_MAKER_OVERVIEW",e.TRUST="TRUST",e.TRUST_MEMBER_OVERVIEW="TRUST_MEMBER",e.DECISION_MAKER="DECISION_MAKER",e.TRUST_MEMBER_INDIVIDUAL="TRUST_MEMBER_INDIVIDUAL",e.TRUST_MEMBER_COMPANY="TRUST_MEMBER_COMPANY",e.TRUST_MEMBER_ROLE_AND_TYPE="TRUST_MEMBER_ROLE_AND_TYPE",e.TRUST_MEMBER_COMPANY_OWNER="TRUST_MEMBER_COMPANY_OWNER",e.SOLE_PROPRIETOR_COMPANY="SOLE_PROPRIETOR_COMPANY",e.LEGAL_ENTITY_TYPE_SWITCHER="LEGAL_ENTITY_TYPE_SWITCHER"}(Cl||(Cl={}));const kl={entityType:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}};var Ll;!function(e){e.PRIVATE_COMPANY="privateCompany",e.PUBLIC_COMPANY="listedPublicCompany",e.UNLISTED_PUBLIC_COMPANY="unlistedPublicCompany",e.INCORPORATED_PARTNERSHIP="partnershipIncorporated",e.INCORPORATED_ASSOCIATION="associationIncorporated",e.GOVERNMENTAL_ORGANIZATION="governmentalOrganization",e.NON_PROFIT_OR_CHARITABLE="nonProfit",e.SOLE_PROPRIETORSHIP="soleProprietorship"}(Ll||(Ll={}));const wl={entityType:{rule:"REQUIRED"},legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"},tradingName:{rule:"REQUIRED"},sameNameAsLegalName:{rule:"REQUIRED"},registrationNumber:{rule:"registrationNumberIfCountryNotUs"},registrationAddress:{rule:"REQUIRED"},operationalAddress:{rule:"OPTIONAL"},stockExchangeMIC:{rule:"stockExchangeMICIfTypePublic"},stockISIN:{rule:"stockISINIfTypePublic"},isPartOfTrust:{rule:"partOfTrustFieldsOnlyAU"},accountHolder:{rule:"accountHolderIfCustomer"}},Pl=[{id:Ll.PRIVATE_COMPANY,name:"privateCompanyTitle",description:"privateCompanyDescription"},{id:Ll.PUBLIC_COMPANY,name:"publicCompanyTitle",description:"publicCompanyDescription"},{id:Ll.INCORPORATED_PARTNERSHIP,name:"incorporatedPartnershipTitle",description:"incorporatedPartnershipDescription"},{id:Ll.NON_PROFIT_OR_CHARITABLE,name:"nonProfitOrCharitableOrgTitle",description:"nonProfitOrCharitableOrgDescription"},{id:Ll.GOVERNMENTAL_ORGANIZATION,name:"governmentalOrganizationTitle",description:"governmentalOrganizationDescription"},{id:Ll.INCORPORATED_ASSOCIATION,name:"associationIncorporatedTitle",description:"associationIncorporatedDescription"}],jl={L0:{legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"},stateOrProvince:{rule:"REQUIRED"}},L1:Object.assign({},wl),L:Object.assign(Object.assign({},wl),{vatNumber:{rule:"vatRules"},exemptedFromVat:{rule:"vatRules"},vatAbsenceReason:{rule:"vatRules"},taxId:{rule:"taxIdRules"},exemptedFromTax:{rule:"exemptedFromTaxRules"}}),L_REGDOC:{registrationDocument:{rule:"REQUIRED"}},L_TAXDOC:{taxDocument:{rule:"REQUIRED"}},L_PROOFOFADDRESS:{proofOfAddressDocument:{rule:"REQUIRED"}}},xl={AT:{vatNumber:{label:"UST-ID"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"firmenbuchnummer"},exemptedFromRegistrationNumber:{label:"doNotHaveFirmenbuchnummer"}},AU:{legalName:{label:"companyName"},legalEntityType:{label:"companyType"},registrationNumber:{label:"australianBusinessNumberAcn"},taxId:{label:"australianBusinessNumberAbn"},exemptedFromTax:{label:"doNotHaveABN"}},BE:{vatNumber:{label:"euVatNumber"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"enterpriseNumber"}},BG:{registrationNumber:{label:"uniqueIdentificationCode"},vatNumber:{label:"identifikacionenNomerDDS"},exemptedFromVat:{label:"vatNumberExempted"}},BR:{registrationNumber:{label:"CNPJ"}},CA:{tradingName:{label:"doingBusinessAs"},taxId:{label:"businessNumber"},registrationNumber:{label:"incorporationNumber"}},CH:{registrationNumber:{label:"unternehmens-Identifikationsnummer"},vatNumber:{label:"Mehrwertsteuernummer"},exemptedFromVat:{label:"vatNumberExempted"}},CY:{registrationNumber:{label:"cyRegistrationNumber"},vatNumber:{label:"arithmosEngraphes"},exemptedFromVat:{label:"vatNumberExempted"}},CZ:{vatNumber:{label:"DIC"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"ICO"}},DE:{vatNumber:{label:"USt-IdNr"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"handelsregisternummer"}},DK:{registrationNumber:{label:"CVR-nummer"},vatNumber:{label:"momsregistreringsnummerOrStamregister"},exemptedFromVat:{label:"vatNumberExempted"}},EE:{registrationNumber:{label:"registrikood"},vatNumber:{label:"kaibemaksukohustuslaseNumber"},exemptedFromVat:{label:"vatNumberExempted"}},ES:{vatNumber:{label:"NIFdeIVA"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"NIF"}},FI:{registrationNumber:{label:"Y-TUNNUS"},vatNumber:{label:"arvonlisaveronumeroMervardesskattenummer"},exemptedFromVat:{label:"vatNumberExempted"}},FR:{vatNumber:{label:"NumeroDeTVA"},registrationNumber:{label:"SIRETOrSIREN"}},GB:{vatNumber:{label:"vatNumber"},registrationNumber:{label:"companyNumber"}},GR:{registrationNumber:{label:"GEMI-number"},vatNumber:{label:"grTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},HK:{legalName:{label:"companyName"},legalEntityType:{label:"typeOfCompany"},tradingName:{label:"businessName"},registrationNumber:{label:"companyNumber"},registrationDocument:{label:"companyRegistrationDocument"},taxId:{label:"businessRegistrationNumber"},exemptedFromTax:{label:"doNotHaveBusinessRegistrationNumber"}},HR:{registrationNumber:{label:"MBS"},vatNumber:{label:"PDVIdBrojOIB"},exemptedFromVat:{label:"vatNumberExempted"}},HU:{registrationNumber:{label:"huRegistrationNumber"},vatNumber:{label:"huTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},IE:{registrationNumber:{label:"companyNumber"},vatNumber:{label:"valueAddedTaxIdentificationNumber"},exemptedFromVat:{label:"vatNumberExempted"}},IT:{vatNumber:{label:"partitaIVA"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"codiceFiscaleOrCCIAA"}},JP:{vatNumber:{label:"taxNumberCorporateNumber"},registrationDocument:{label:"chamberOfCommerceExtract"}},LT:{registrationNumber:{label:"ltRegistrationNumber"},vatNumber:{label:"PVMmoketojoKodas"},exemptedFromVat:{label:"vatNumberExempted"}},LU:{registrationNumber:{label:"luRegistrationNumber"},vatNumber:{label:"numeroDIdentificationALATaxe"},exemptedFromVat:{label:"vatNumberExempted"}},LV:{registrationNumber:{label:"lvRegistrationNumber"},vatNumber:{label:"lvTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},MX:{registrationNumber:{label:"RFC"},registrationDocument:{label:"RfcDocument"}},MY:{registrationNumber:{label:"companyNumber"},registrationDocument:{label:"companyProfile"},vatNumber:{label:"SST"}},NL:{vatNumber:{label:"euVatNumber"},registrationNumber:{label:"chamberOfCommerceRegistrationNumber"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"}},NO:{vatNumber:{label:"skattenummer"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"organisasjonsnummer"}},NZ:{legalName:{label:"companyName"},legalEntityType:{label:"entityType"},registrationNumber:{label:"companyNumber"},vatNumber:{label:"irdNumber"},exemptedFromVat:{label:"vatNumberExempted"},taxDocument:{label:"irdDocument"},taxId:{label:"IRD/GST"},exemptedFromTax:{label:"doNotHaveIRD/GST"}},PL:{vatNumber:{label:"NIP"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"regonKrsNumber"}},PT:{vatNumber:{label:"numerodeIVA"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"NIPC"}},RO:{registrationNumber:{label:"numarOrdineRegistrulComertului"},vatNumber:{label:"codulDeIdentificareFiscala"},exemptedFromVat:{label:"vatNumberExempted"}},SE:{vatNumber:{label:"momsregistreringsnummer"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"organisationsnummer"},exemptedFromRegistrationNumber:{label:"doNotHaveOrganisationsnummer"}},SG:{vatNumber:{label:"taxReferenceNumber"},exemptedFromVat:{label:"vatNumberExempted"},legalName:{label:"companyName"},legalEntityType:{label:"companyType"},taxId:{label:"UEN/GST"},exemptedFromTax:{label:"doNotHaveUEN/GST"}},SI:{registrationNumber:{label:"siRegistrationNumber"},vatNumber:{label:"siTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},SK:{registrationNumber:{label:"skRegistrationNumber"},vatNumber:{label:"skTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},US:{tradingName:{label:"doingBusinessAs"},taxId:{label:"employerIdentificationNumber"},exemptedFromTax:{label:"doNotHaveEIN"}}};var Ml;!function(e){e.IS_PART_OF_TRUST="isPartOfTrustAnswerYes",e.IS_NOT_PART_OF_TRUST="isPartOfTrustAnswerNo"}(Ml||(Ml={}));const Fl=[{id:Ml.IS_NOT_PART_OF_TRUST,name:"no"},{id:Ml.IS_PART_OF_TRUST,name:"yes"}],Vl={isPartOfTrust:Ml.IS_NOT_PART_OF_TRUST},Ul=["isPartOfTrust"];function Bl(e){var t,a,r;const{i18n:n,commonProps:i}=We(),{dataStoreId:o,validators:s,isReadOnlyOnDefaultDataYes:l=!1}=e,d=ue({setState:null}),{handleChangeFor:c,data:u,valid:m,errors:p,isValid:g,fieldProblems:y,triggerValidation:b}=ua(Object.assign(Object.assign({},e),{schema:Ul,rules:s,defaultData:(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.isPartOfTrust)?e.data:Vl,fieldProblems:null==e?void 0:e.fieldValidationErrors}));de((()=>{d.current.setState({type:"addToState",value:{data:u,valid:m,errors:p,fieldProblems:y,caller:"partOfTrust",dataStoreId:o}})}),[u,m,p,g]);const f=ra(e,n);this.triggerValidation=b;const h=n.get((null==e?void 0:e.legalEntityType)===il.INDIVIDUAL?"areYouPartOfTrust":"isBusinessPartOfTrust"),v=l&&(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.isPartOfTrust)===Ml.IS_PART_OF_TRUST;return de((()=>{b()}),[]),R("div",Object.assign({className:"adyen-kyc-part-of-trust"},{children:[R(Ys,{stateRef:d}),R(Ue,Object.assign({name:"isPartOfTrust",useLabelElement:!1,label:h,classNameModifiers:["isPartOfTrust"],errorMessage:null===(r=p.isPartOfTrust)||void 0===r?void 0:r.errorMessage,showInlineErrors:i.showInlineErrors,disabled:v},{children:Jt("radio",{name:"isPartOfTrust",items:Fl,value:u.isPartOfTrust,i18n:n,disabled:v,onInput:c("isPartOfTrust"),onChange:c("isPartOfTrust"),"aria-required":!0,"aria-label":f.getLabel("isPartOfTrust"),"aria-invalid":!m.isPartOfTrust})}))]}))}var Wl;!function(e){e.MY_NAME="myName",e.MY_SOLE_TRADER_NAME="mySoleTraderName",e.THE_COMPANY_I_WORK_FOR="theCompanyIWorkFor",e.A_TRUST="aTrust",e.A_PARTNERSHIP="aPartnership",e.AN_ASSOCIATION="anAssociation"}(Wl||(Wl={}));const Hl={accountHolder:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}};var ql;!function(e){e.CONTROLLING_PERSON="uboThroughControl",e.OWNER="uboThroughOwnership",e.SIGNATORY="signatory",e.DIRECTOR="director"}(ql||(ql={}));const Gl=["GB","NL","DE","BE","ES","CZ","DK","FR","IT","AT","US","SK","SI","NO","HU"],$l=["US","CA"],Xl=["US"],Yl=["AU"],Kl=t.createContext(null);function zl(){const e=ge(Kl);if(void 0===e)throw new Error("useSettingsContext must be used within a SettingsProvider");return e}const Zl=["accountHolder"],Ql=[{id:Wl.MY_NAME,name:"myName",description:"myNameDescription",type:il.INDIVIDUAL},{id:Wl.THE_COMPANY_I_WORK_FOR,name:"theCompanyIWorkFor",description:"theCompanyIWorkForDescription",type:il.ORGANIZATION}],Jl={id:Wl.MY_SOLE_TRADER_NAME,name:"mySoleTraderName",description:"mySoleTraderNameDescription",type:il.SOLE_PROPRIETORSHIP};function ed(e){const{i18n:t,commonProps:a}=We(),r=ue({setState:null}),{dataStoreId:n}=e,{isSettingEnabled:i}=zl(),o=i("changeLegalEntityType"),{handleChangeFor:s,data:l,valid:d,errors:c,fieldProblems:u,triggerValidation:m}=ua(Object.assign(Object.assign({},e),{schema:["accountHolder"],defaultData:e.data,rules:e.validators||Hl,fieldProblems:null==e?void 0:e.fieldValidationErrors}));de((()=>{r.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,caller:"AccountHolder",dataStoreId:n}})}),[l,c,d]);const p=ra(e,t),g=t.get("nameOfBankAccountHolder");this.triggerValidation=m;const[y,b]=se([]),f=()=>{if(e.legalEntityType===il.ORGANIZATION)return o?Ql:Ql.filter((e=>e.id===Wl.THE_COMPANY_I_WORK_FOR));{let t=[];return t=o?Ql:Ql.filter((e=>e.id===Wl.MY_NAME)),Gl.includes(e.country)?[...t,Jl]:t}};return de((()=>{const e=f();b((()=>Object.values(e).map((({id:e,name:a,description:r})=>({id:e,name:t.get(a),description:t.get(r)})))))}),[t.languageCode,t.locale,e.country,e.legalEntityType]),R("div",{children:[R(Ys,{stateRef:r}),y.length>1?R(Ue,Object.assign({name:"accountHolder",label:g,errorMessage:p.getErrorMessage("accountHolder",c,u),isValid:d.accountHolder,showInlineErrors:a.showInlineErrors,classNameModifiers:["account-holder"]},{children:Jt("select",{onChange:s("accountHolder","input"),name:"accountHolder",placeholder:t.get("selectAccountHolder"),selected:l.accountHolder,items:y})})):null]})}const td=["entityType",...Ul,...Zl];function ad(e){const{i18n:a}=We(),r=ue({setState:null}),{id:n,requiredFields:i}=e,o=ue(null),{isSettingEnabled:s}=zl(),l=s("enableTrustFlow"),d=i||td,{handleChangeFor:c,data:u,valid:m,errors:p,isValid:g,triggerValidation:y,fieldProblems:b}=ua(Object.assign(Object.assign({},e),{schema:d,defaultData:e.data,rules:e.validators||kl,fieldProblems:null==e?void 0:e.fieldValidationErrors})),f=ra(e,a);this.triggerValidation=()=>{y(d),l&&f.isRequiredField("isPartOfTrust",!1)&&v.current.triggerValidation(),f.isRequiredField("accountHolder",!1)&&o.current.triggerValidation()};const h=Dl(e,Zl);de((()=>{r.current.setState({type:"addToState",value:{data:u,valid:m,errors:p,fieldProblems:b,caller:n,dataStoreId:n,schema:d}})}),[u,m,p,g]);const v=ue(null),_=Dl(e,Ul);return R(t.Fragment,{children:[R(Ys,{owner:n,stateRef:r}),R("form",Object.assign({className:"adyen-kyc-company__company-type"},{children:[R(Ms,{heading:e.heading}),R(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:f,id:"ariaErrorField"}),f.isRequiredField("entityType")&&R(Ue,Object.assign({name:"entityType",useLabelElement:!1,errorMessage:f.getErrorMessage("entityType",p,b),label:f.getLabel("entityType","whatTypeOfCompanyDoYouHave"),classNameModifiers:["entityType"]},{children:Jt("radioCard",{name:"entityType",items:Pl,value:u.entityType,i18n:a,readonly:f.isReadOnly("entityType"),onInput:c("entityType"),onChange:c("entityType"),"aria-required":!0,"aria-label":f.getLabel("entityType","whatTypeOfCompanyDoYouHave"),"aria-invalid":!m.entityType})})),l&&f.isRequiredField("isPartOfTrust",!1)&&R(Bl,Object.assign({},_,{legalEntityType:il.ORGANIZATION,ref:v,dataStoreId:n,isReadOnlyOnDefaultDataYes:!0})),f.isRequiredField("accountHolder")&&R(ed,Object.assign({},h,{ref:o,dataStoreId:n,legalEntityType:il.ORGANIZATION}))]}))]})}var rd;!function(e){e.OPERATIONAL_ADDRESS_IS_SAME="OperationAddressAnswerYes",e.OPERATIONAL_ADDRESS_IS_NOT_SAME="OperationAddressAnswerNo"}(rd||(rd={}));const nd=[{id:rd.OPERATIONAL_ADDRESS_IS_SAME,name:"operationalAddressIsSameItemName"},{id:rd.OPERATIONAL_ADDRESS_IS_NOT_SAME,name:"operationalAddressIsNotSameItemName"}],id={operationalAddressIsSame:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},od=t.createContext(null);function sd({children:e,className:t,expand:r=!1,type:n,onExpandSection:i}){const[o,s]=se([]),l=a("adl-accordion",t,{"adl-accordion--container":"container"===n,"adl-accordion--guide":"guide"===n});return R(od.Provider,Object.assign({value:{expand:r,items:o,setItems:s,onExpandSection:i}},{children:R("div",Object.assign({className:l},{children:e}))}))}function ld({children:e,collapsed:t=!1,animationDuration:a}){const r=ue(null),[n,i]=se(t?0:void 0);return de((()=>{var e;i(t?0:null===(e=r.current)||void 0===e?void 0:e.scrollHeight)}),[t]),R("div",Object.assign({className:"adyen-collapsible-container","aria-hidden":t,ref:r,style:{height:n,transitionDuration:a}},{children:e}))}var dd;function cd({children:e,open:t=!1,title:a="",subTitle:r="",expandIconPlacement:n=dd.Left,iconPlacement:i=dd.Left,icon:o="",onOpen:s=G,onClose:l=G}){const{expand:d,items:c,setItems:u,onExpandSection:m}=ge(od),[p,g]=se(t),[y]=se(Ve);return de((()=>{u((e=>[...e,{id:y,isOpen:p}]))}),[]),de((()=>{g(t)}),[t]),de((()=>{var e;g(null===(e=c.find((e=>e.id===y)))||void 0===e?void 0:e.isOpen)}),[c]),de((()=>{p&&(null==m||m(a))}),[p]),R("div",Object.assign({className:"adl-accordion__item"},{children:[R("div",Object.assign({role:"button",className:"adl-accordion__header",tabIndex:0,onClick:()=>{const e=!p,t=[...c];d?(t.find((e=>e.id===y)).isOpen=e,u(t)):u(t.map((t=>Object.assign(Object.assign({},t),{isOpen:t.id===y&&e})))),p?l():s()}},{children:[n===dd.Left?R(xe,{name:p?"chevron-up":"chevron-down",className:"adl-accordion__toggle"}):null,o&&i===dd.Left?R(xe,{name:o,className:"adl-accordion__toggle"}):null,R("div",Object.assign({className:"adl-accordion__title-wrapper"},{children:[R("div",Object.assign({className:"adl-accordion__title"},{children:a})),r&&R("div",Object.assign({className:"adl-accordion__subtitle"},{children:r}))]})),n===dd.Right?R(xe,{name:p?"chevron-up":"chevron-down",className:"adl-accordion__toggle"}):null,o&&i===dd.Right?R(xe,{name:o,className:"adl-accordion__toggle"}):null]})),R(ld,Object.assign({collapsed:!p,animationDuration:"0.1s"},{children:R("div",Object.assign({className:"adl-accordion__content"},{children:e}))}))]}))}function ud({page:e,title:t,content:a,titleId:r,contentId:n,onOpen:i=G,onClose:o=G}){return R(sd,Object.assign({type:"guide"},{children:R(cd,Object.assign({icon:"light-bulb",expandIconPlacement:dd.Right,title:t,onOpen:()=>{w.addEvent("Open contextual guidance information",{segmentation:{guidancePage:e,guidanceTitleId:r,guidanceContentId:n}}),i()},onClose:()=>{w.addEvent("Close contextual guidance information",{segmentation:{guidancePage:e,guidanceTitleId:r,guidanceContentId:n}}),o()}},{children:a}))}))}!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(dd||(dd={}));const md=["registrationAddress","operationalAddress","operationalAddressIsSame"],pd={formId:"registrationAddress",formName:"registeredAddress",fields:["address"]}.formId,gd={formId:"operationalAddress",formName:"operationalAddressHeader",fields:["address"]}.formId;function yd(e){var a,r,n,i,o;const{i18n:s}=We(),{data:l,valid:d,errors:c,fieldProblems:u,handleChangeFor:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:["operationalAddressIsSame"],defaultData:e.data,rules:e.validators||id,maskedFields:[]})),g={[pd]:ue(null),[gd]:ue(null)},y=ra(e,s),b=ue({setState:null});de((()=>{b.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:u,caller:e.id,dataStoreId:e.id,schema:["registrationAddress","operationalAddressIsSame",...f()?["operationalAddress"]:[]]}})}),[l.operationalAddressIsSame]),this.triggerValidation=()=>{p(),g[pd].current.triggerValidation(),f()&&g[gd].current.triggerValidation()};const f=()=>l.operationalAddressIsSame==rd.OPERATIONAL_ADDRESS_IS_NOT_SAME,h=Rl(e,pd),v=Rl(e,gd);return R(t.Fragment,{children:[R(Ys,{owner:e.id,stateRef:b}),R(Ms,{heading:e.heading,description:e.description}),R(qc,{verificationErrors:null===(r=null===(a=null==e?void 0:e.problems)||void 0===a?void 0:a.verificationErrors)||void 0===r?void 0:r[e.id],validationErrors:null===(i=null===(n=null==e?void 0:e.problems)||void 0===n?void 0:n.validationErrors)||void 0===i?void 0:i[e.id],formUtils:y,id:"ariaErrorField"}),R(ud,{page:"Company registered address",titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingCompanyAddressDetails",title:s.get("whyDoINeedToFillInThisInformation"),content:s.get("reasonForFillingCompanyAddressDetails")}),R($c,Object.assign({},h,{ref:g[pd],data:Object.assign(Object.assign({},h.data),{country:e.country}),hideCountry:!0,id:e.id,addressType:"registrationAddress",handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress})),R(Ms,{classNames:"adl-u-margin-top-32",heading:s.get("operationalAddressHeader")}),R(Ue,Object.assign({name:"operationalAddressIsSame",useLabelElement:!1,label:y.getLabel("operationalAddressIsSame"),classNameModifiers:["operationalAddressIsSame"],errorMessage:null===(o=c.operationalAddressIsSame)||void 0===o?void 0:o.errorMessage},{children:Jt("radio",{name:"operationalAddressIsSame",items:nd,value:l.operationalAddressIsSame,i18n:s,readonly:y.isReadOnly("operationalAddressIsSame"),onInput:m("operationalAddressIsSame"),onChange:m("operationalAddressIsSame"),"aria-required":!0,"aria-label":y.getLabel("operationalAddressIsSame"),"aria-invalid":!d.operationalAddressIsSame})})),f()&&t.createElement($c,Object.assign({},v,{key:"operationalAddress",ref:g[gd],data:Object.assign(Object.assign({},v.data),{country:e.country}),hideCountry:!0,id:e.id,addressType:"operationalAddress",handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress}))]})}const bd={regex:/^\d{8}$/,message:"validationPleaseEnter8Digits"},fd={regex:/^\d{9}$/,message:"validationPleaseEnter9Digits"},hd={regex:/^\d{10}$/,message:"validationPleaseEnter10Digits"},vd={regex:/^\d{11}$/,message:"validationPleaseEnter11Digits"},_d={regex:/^\d{12}$/,message:"validationPleaseEnter12Digits"},Nd={AT:{regex:/^U\d{8}$/},BE:{regex:/^(1|0?)\d{9}$/},BG:{regex:/^\d{9,10}$/,message:"validationEnter9Or10Digits"},HR:vd,CY:{regex:/^[A-Z0-9]{9}/i},CZ:{regex:/^\d{8,10}$/,message:"validationEnterBetween8And10Digits"},EE:fd,FI:bd,FR:vd,DE:fd,EL:fd,HU:bd,IE:{regex:/^[A-Z0-9]{8,9}$/},IT:vd,LV:vd,LT:{regex:/^\d{9,12}$/,message:"validationEnter9Or12Digits"},LU:bd,MT:bd,NL:{regex:/^\d{9}B\d{2}$/},PL:{regex:/^\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d$/},PT:fd,RO:{regex:/^\d{2,12}$/},SE:{regex:/^\d{10}01$/},SK:hd,SI:bd,ES:{regex:/^[A-Z0-9]\d{7}[A-Z0-9]$/},AL:{regex:/[JK][A-Z0-9]{8}[A-Z]$/},BY:fd,CA:{regex:/^[A-Z0-9]{15}$/},GB:{regex:/^\d{9,12}$/},PH:_d,RU:{regex:/^(\d{10}|\d{12})$/},SM:{regex:/^\d{5}$/,message:"validationPleaseEnter6Digits"},RS:fd,CH:{regex:/^(\d{6}|E\d{9}(TVA|MWST|IVA))$/},TR:hd,UA:_d,AR:vd,CL:{regex:/^\d{8}-\d{1}$/},CO:hd,CR:{regex:/^\d{9,12}$/},EC:{regex:/^\d{13}$/,message:"validationPleaseEnter13Digits"},GT:{regex:/^\d{7}-\d{1}$/},PE:vd,VE:{regex:/^[JGVE]-\d{8}-?\d$/}},Od={NO:{regex:/^\d{9}MVA$/},DK:[{regex:/^DK\d{8}$/},{regex:/^SE\d{8}$/}],GR:[{regex:/^EL\d{9}$/}]},Id="validationPleaseEnterAValidVatNumber",Ed=({countryCode:e,specs:t,input:a})=>{const r=Array.isArray(t)?[...t]:[t];let n="";for(;r.length>0;){const t=r.shift();if(!("regex"in t)||!t.regex.test)throw new Error(`Invalid vat validation specification ${e}, ${JSON.stringify(r)}`);if(t.regex.test(a))return{isValid:!0};n=(null==t?void 0:t.message)||Id}return{isValid:!1,message:n}},Td=(e,t=null)=>{if(!e||!Rs(e)||e.length<3)return{isValid:!1,message:Id};const a=t||((e||"").toUpperCase().match(/^[A-Z]{2}/)||[])[0];return a?a in Od?Ed({countryCode:a,specs:Od[a],input:e}):a in Nd?e.substring(0,2)!==t?{isValid:!1,message:"validationPrefixThevatNumberWith_countryCode"}:Ed({countryCode:a,specs:Nd[a],input:e.substring(2)}):/^[a-zA-Z0-9_. -]+$/.test(e)?{isValid:!0}:{isValid:!1,message:Id}:{isValid:!1,message:Id}},Ad={vatNumber:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}],vatAbsenceReason:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}]},Sd=e=>({translationKey:"validationPleaseEnterAValidVatNumberWithFormat",translationObject:{values:{format:e}}}),Cd={US:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"US");return t},errorMessage:Sd("XXXXXXXXX")}]},NL:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"NL");return t},errorMessage:Sd("NLXXXXXXXXXBXX")}]},DE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"DE");return t},errorMessage:Sd("DEXXXXXXXXX")}]},PL:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"PL");return t},errorMessage:Sd("PLXXXXXXXXXX")}]},AT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"AT");return t},errorMessage:Sd("ATUXXXXXXXX")}]},BE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"BE");return t},errorMessage:Sd("BEXXXXXXXXXX")}]},SE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"SE");return t},errorMessage:Sd("SEXXXXXXXXXX01")}]},ES:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"ES");return t},errorMessage:Sd("ESXXXXXXXXX")}]},FR:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"FR");return t},errorMessage:Sd("FRXXXXXXXXXXX")}]},PT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"PT");return t},errorMessage:Sd("PTXXXXXXXXX")}]},IT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"IT");return t},errorMessage:Sd("ITXXXXXXXXXXX")}]},CZ:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"CZ");return t},errorMessage:Sd("CZXXXXXXXX")}]},NO:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"NO");return t},errorMessage:Sd("XXXXXXXXXMVA")}]},GB:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"GB");return t},errorMessage:Sd('"GB" + 9-12 digits')}]},BG:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"BG");return t},errorMessage:Sd("BG999999999 or BG9999999999")}]},CH:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"CH");return t},errorMessage:Sd("CHE999999999TVA or CHE999999999IVA or CHE999999999MWST")}]},CY:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"CY");return t},errorMessage:Sd("CYXXXXXXXXX")}]},DK:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"DK");return t},errorMessage:Sd("DK99999999 or SE99999999")}]},EE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"EE");return t},errorMessage:Sd("EE999999999")}]},FI:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"FI");return t},errorMessage:Sd("FI99999999")}]},GR:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"GR");return t},errorMessage:Sd("EL999999999")}]},HR:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"HR");return t},errorMessage:Sd("HR99999999999")}]},HU:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"HU");return t},errorMessage:Sd("HU99999999")}]},IE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"IE");return t},errorMessage:Sd("IEXXXXXXXX or IEXXXXXXXXX")}]},LT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"LT");return t},errorMessage:Sd('"LT" + 9-12 digits')}]},LU:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"LU");return t},errorMessage:Sd("LU99999999")}]},LV:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"LV");return t},errorMessage:Sd("LV99999999999")}]},RO:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"RO");return t},errorMessage:Sd("RO + 2-12 characters")}]},SK:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"SK");return t},errorMessage:Sd("SK9999999999")}]},SI:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Td(e,"SI");return t},errorMessage:Sd("SI99999999")}]}},Rd=["industryExemption","belowTaxThreshold"],Dd=["vatNumber","exemptedFromVat","vatAbsenceReason"];function kd(e){const{i18n:t,commonProps:a}=We(),r=ra(e,t),n=ue({setState:null}),i=Ts(Ad,Cd,e.country),{handleChangeFor:o,data:s,valid:l,errors:d,isValid:c,triggerValidation:u,fieldProblems:m}=ua(Object.assign(Object.assign({},e),{schema:e=>e.exemptedFromVat?["vatAbsenceReason","exemptedFromVat"]:["vatNumber","exemptedFromVat"],rules:i,defaultData:Object.assign(Object.assign({},e.data),{exemptedFromVat:!!e.data.exemptedFromVat}),fieldProblems:null==e?void 0:e.fieldValidationErrors}));return de((()=>{s.vatNumber&&o("vatNumber","blur")(s.vatNumber)}),[e.country]),de((()=>{n.current.setState({type:"addToState",value:{data:s,valid:l,errors:d,caller:"vatNumber",dataStoreId:e.dataStoreId}})}),[s,l,d,c]),this.triggerValidation=u,r.isRequiredField("vatNumber")?R("div",Object.assign({className:"adyen-kyc-field--tax-id"},{children:[R(Ys,{stateRef:n}),R(Ue,Object.assign({name:"vatNumber",label:r.getLabel("vatNumber"),classNameModifiers:["tax-id"],errorMessage:r.getErrorMessage("vatNumber",d,m),isValid:l.vatNumber,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"vatNumber",value:s.vatNumber,readonly:r.isReadOnly("vatNumber"),classNameModifiers:["vatNumber"],onInput:o("vatNumber","input"),onBlur:o("vatNumber","blur"),disabled:s.exemptedFromVat,"aria-required":!0,"aria-label":r.getLabel("vatNumber"),"aria-invalid":!l.vatNumber})})),r.isRequiredField("exemptedFromVat")&&Jt("boolean",{name:"exemptedFromVat",label:r.getLabel("exemptedFromVat"),value:"exemptedFromVat",readonly:r.isReadOnly("exemptedFromVat"),classNameModifiers:["exempted-from-tax"],checked:s.exemptedFromVat,onInput:o("exemptedFromVat"),"aria-required":!1,"aria-label":r.getLabel("exemptedFromVat"),"aria-invalid":!1}),s.exemptedFromVat?R(Ue,Object.assign({name:"vatAbsenceReason",classNameModifiers:["tax-id-absence-reason"],label:r.getLabel("vatAbsenceReason"),errorMessage:r.getErrorMessage("vatAbsenceReason",d,m),isValid:l.vatAbsenceReason},{children:Jt("select",{name:"vatAbsenceReason",onChange:o("vatAbsenceReason","input"),selected:s.vatAbsenceReason,items:Rd.map((e=>({id:e,name:t.get(e)})))})})):null]})):null}const Ld={ein:[/^\d{2}-?\d{7}$/],ssn:[/^\d{9}$/,/^\d{4}$/,/^\d{3}-\d{2}-\d{4}$/],passport:[/^\w{6,11}$/],invalidEinPrefixes:[/^(00|07|08|09|17|18|19|28|29|49|69|70|78|79|89|96|97)/]},wd={AU:[{regex:/^\d{11}$/}],BE:[{regex:/^\d{10}$/}],BR:[/^\d{14}$/,/^\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}$/].map((e=>({regex:e}))),CA:[{regex:/^\d{9}$/}],DE:[{regex:/^\d{10,11}$/}],HK:[{regex:/^\d{8}$/}],IN:[{regex:/^[A-Z0-9]{15}$/}],JP:[{regex:/^\d{13}$/}],MX:[{regex:/^\D{3}\d{6}\w{3}$/}],NZ:[{regex:/^[A-Z0-9]{8,9}$/}],NL:[{regex:/^\d{9}$/}],PH:[{regex:/^\d{12}$/}],SG:[{regex:/^[A-Z0-9]{9,10}$/}],US:[...Ld.ssn,...Ld.ein].map((e=>({regex:e,exception:Ld.invalidEinPrefixes})))},Pd=/^[\w. -]+$/,jd=(e,t)=>!(!e||!Rs(e)||e.length<3)&&(t in wd?((e,t,a)=>{var r;for(const t of a)if(!(null===(r=t.exception)||void 0===r?void 0:r.every((t=>t.test(e))))&&t.regex.test(e))return!0;return!1})(e,0,wd[t]):Pd.test(e)),xd={taxId:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}],taxIdAbsenceReason:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}]},Md=e=>({translationKey:"validationPleaseEnterAValidTaxIdNumberWithFormat",translationObject:{values:{format:e}}}),Fd={US:{taxId:[{modes:["blur"],validate:e=>jd(e,"US"),errorMessage:Md("XXXXXXXXX")}]},CA:{taxId:[{modes:["blur"],validate:e=>jd(e,"CA"),errorMessage:Md("999999999")}]},AU:{taxId:[{modes:["blur"],validate:e=>jd(e,"AU"),errorMessage:"aValidAbnShouldBe11Digits"}]}},Vd=["taxId","exemptedFromTax"];function Ud(e){const{i18n:t,commonProps:a}=We(),r=ra(e,t),n=ue({setState:null}),i=Ts(xd,Fd,e.country),{handleChangeFor:o,data:s,valid:l,errors:d,isValid:c,triggerValidation:u,fieldProblems:m}=ua(Object.assign(Object.assign({},e),{schema:e=>e.exemptedFromTax?["exemptedFromTax"]:["taxId","exemptedFromTax"],rules:i,defaultData:Object.assign(Object.assign({},e.data),{exemptedFromTax:!!e.data.exemptedFromTax}),fieldProblems:null==e?void 0:e.fieldValidationErrors}));return de((()=>{s.taxId&&o("taxId","blur")(s.taxId)}),[e.country]),de((()=>{n.current.setState({type:"addToState",value:{data:s,valid:l,errors:d,caller:"taxId",dataStoreId:e.dataStoreId}})}),[s,l,d,c]),this.triggerValidation=u,r.isRequiredField("taxId")?R("div",Object.assign({className:"adyen-kyc-field--tax-id"},{children:[R(Ys,{stateRef:n}),R(Ue,Object.assign({name:"taxId",label:r.getLabel("taxId"),classNameModifiers:["tax-id"],errorMessage:r.getErrorMessage("taxId",d,m),isValid:l.taxId,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"taxId",value:s.taxId,readonly:r.isReadOnly("taxId"),classNameModifiers:["taxId"],onInput:o("taxId","input"),onBlur:o("taxId","blur"),disabled:s.exemptedFromTax,"aria-required":!0,"aria-label":r.getLabel("taxId"),"aria-invalid":!l.taxId})})),r.isRequiredField("exemptedFromTax")&&Jt("boolean",{name:"exemptedFromTax",label:r.getLabel("exemptedFromTax"),value:"exemptedFromTax",readonly:r.isReadOnly("exemptedFromTax"),classNameModifiers:["exempted-from-tax"],checked:s.exemptedFromTax,onInput:o("exemptedFromTax"),"aria-required":!1,"aria-label":r.getLabel("exemptedFromTax"),"aria-invalid":!1})]})):null}const Bd="default",Wd={AT:{[Ll.NON_PROFIT_OR_CHARITABLE]:{regex:/^(FN|T)\d{3,6}[a-z]$|^(AT-ZVR-)\d{9}$/,format:"T999x, FN999999x, or AT-ZVR-999999999"},[Ll.INCORPORATED_ASSOCIATION]:{regex:/^(FN|T)\d{3,6}[a-z]$|^(AT-ZVR-)\d{9}$/,format:"T999x, FN999999x, or AT-ZVR-999999999"},[Bd]:{regex:/^(FN|T)\d{3,6}[a-z]$/,format:"T999x or FN9999x, FN9999x, or FN999999x"}},AU:{[Bd]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},BE:{[Bd]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},BG:{[Bd]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},BR:{[Bd]:{regex:/^\d{2}(.)\d{3}(.)\d{3}\/\d{4}(-)\d{2}$/,format:"99.999.999/9999-99"}},CA:{[Bd]:{regex:/^[a-zA-Z0-9]{5,10}$/,format:"XtoYdigits",values:{x:5,y:10}}},CH:{[Bd]:{regex:/^(CHE)\d{9}$|^(CH)\d{11}$/,format:"CHE999999999 or CH99999999999"}},CY:{[Bd]:{regex:/^([COP])\d{1,8}$/,format:"cop1to8digits"}},CZ:{[Bd]:{regex:/^\d{8,10}$/,format:"XtoYdigits",values:{x:8,y:10}}},DE:{[Bd]:{regex:/^[a-zA-Z]{2,3}\d{1,6}[a-zA-Z]{0,5}(-[a-zA-Z]\d{4})?$/,format:'2-3 letters + 1-6 numbers + 0-5 letters + Optional ("-" + 1 letter + 4 numbers)'}},DK:{[Bd]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},EE:{[Bd]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},ES:{[Bd]:{regex:/[a-zA-Z]\d{8}$/,format:"1char8digits"}},FI:{[Bd]:{regex:/^\d{7}[-]?\d$/,format:"8digitsOptional-"}},FR:{[Bd]:{regex:/^(\d{9}[-]?(\d{5})?)$/,format:"9digitsOr14digits"},[Ll.NON_PROFIT_OR_CHARITABLE]:{regex:/^(\d{9}[-]?(\d{5})?)$|^(W)\d{9}$/,format:"Wchar9or14digits"}},GB:{[Ll.NON_PROFIT_OR_CHARITABLE]:{regex:/^\d{6,7}$/,format:"XorYdigits",values:{x:6,y:7}},[Bd]:{regex:/^[a-zA-Z0-9]{8}$/,format:"Xcharacters",values:{x:8}}},GR:{[Bd]:{regex:/^\d{12}$/,format:"Xdigits",values:{digits:12}}},HR:{[Bd]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},HU:{[Bd]:{regex:/^\d{2}-\d{2}-\d{6}$/,format:"99-99-999999"}},HK:{[Bd]:{regex:/^\d{7}$/,format:"Xdigits",values:{digits:7}}},IN:{[Bd]:{regex:/^\d{21}$/,format:"Xdigits",values:{digits:21}}},ID:{[Bd]:{regex:/^\d{12}$/,format:"Xdigits",values:{digits:12}}},IS:{[Bd]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},IT:{[Bd]:{regex:/^\d{11}$|^[a-zA-Z]{2}\d{6,7}$/,format:"2characteres6or7digits"}},IE:{[Bd]:{regex:/^\d{6}$/,format:"Xdigits",values:{digits:6}}},LT:{[Bd]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},LU:{[Bd]:{regex:/^[a-zA-Z]\d{5,7}$/,format:"1character5to7digits"}},LV:{[Bd]:{regex:/^\d{11}$/,format:"Xdigits",values:{digits:11}}},MT:{[Bd]:{regex:/^(C)\d{5}$/,format:"Cchar5digits"}},MY:{[Bd]:{regex:/^[A-Za-z0-9]{7,8}$|^[A-Za-z0-9]{12}$/,format:"7or8or12characteres"}},NZ:{[Bd]:{regex:/^\d{13}$/,format:"Xdigits",values:{digits:13}}},NL:{[Bd]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},NO:{[Bd]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},PL:{[Bd]:{regex:/^\d{9,10}$/,format:"XorYdigits",values:{x:9,y:10}}},PT:{[Bd]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},RO:{[Bd]:{regex:/^[J]\d{2}\/\d{1,9}\/\d{4}$/,format:'"J" + 2-digit number + "/" + trade register number (up to 9-digit number) + "/" + year of registration'}},SE:{[Bd]:{regex:/^\d{6}-\d{4}$/,format:"999999-9999"}},SG:{[Bd]:{regex:/^\d{9,10}$/,format:"XorYdigits",values:{x:9,y:10}}},SI:{[Bd]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},SK:{[Bd]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},JP:{[Bd]:{regex:/^\d{13}$/,format:"Xdigits",values:{digits:13}}},KR:{[Bd]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},US:{[Bd]:{regex:/^\d{2}-?\d{7}$/,format:"Xdigits",values:{digits:9}}}},Hd=(e,t,a)=>({modes:["blur"],validate:function(r){const{isValid:n,translationMessage:i}=((e,t=null,a=Bd)=>{const r=Wd[t];if(!r)return{isValid:Ls.noHtml.test(e),translationMessage:{translationKey:"validationPleaseEnterAValidRegistrationNumber",format:null,values:null}};let n=r[a];n||(n=r[Bd]);const{regex:i,format:o,values:s}=n,l={translationKey:"validationPleaseEnterAValidRegistrationNumberWithFormat",format:o,values:s};return{isValid:i.test(e),translationMessage:l}})(r,e,t);return this.errorMessage={translationKey:i.translationKey,translationObject:{values:{format:i.values?a.get(i.format,{values:i.values}):a.get(i.format)}}},n}}),qd={modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"},Gd=["registrationNumber","exemptedFromRegistrationNumber"];function $d(e){const{i18n:t,commonProps:a}=We(),r=ue({setState:null}),n=e.requiredFields||["registrationNumber"],{companyType:i,country:o}=e,s=me((()=>((e,t,a)=>{const r=[qd],n=Hd(e,t,a);return n&&r.push(n),{registrationNumber:r}})(o,i,t)),[o,i]),{handleChangeFor:l,data:d,valid:c,errors:u,isValid:m,triggerValidation:p,fieldProblems:g}=ua(Object.assign(Object.assign({},e),{schema:e=>e.exemptedFromRegistrationNumber?["exemptedFromRegistrationNumber"]:["registrationNumber","exemptedFromRegistrationNumber"],rules:s,defaultData:Object.assign(Object.assign({},e.data),{exemptedFromRegistrationNumber:!!e.data.exemptedFromRegistrationNumber}),fieldProblems:null==e?void 0:e.fieldValidationErrors}));de((()=>{r.current.setState({type:"addToState",value:{data:d,valid:c,errors:u,caller:"businessRegistration",dataStoreId:e.dataStoreId}})}),[d,c,u,m]),de((()=>{d.registrationNumber&&l("registrationNumber","blur")(d.registrationNumber)}),[e.country]),this.triggerValidation=p;const y=ra(Object.assign(Object.assign({},e),{requiredFields:n}),t);return R("div",Object.assign({className:"adyen-kyc-field__business-registration adl-u-margin-bottom-16"},{children:[R(Ys,{stateRef:r}),R(Ue,Object.assign({name:"registrationNumber",label:y.getLabel("registrationNumber","companyRegistrationNumber"),classNameModifiers:["registrationNumber"],errorMessage:y.getErrorMessage("registrationNumber",u,g)||"",isValid:c.registrationNumber,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"registrationNumber",value:d.registrationNumber,readonly:y.isReadOnly("registrationNumber"),classNameModifiers:["registrationNumber"],onInput:l("registrationNumber","input"),onBlur:l("registrationNumber","blur"),disabled:d.exemptedFromRegistrationNumber,"aria-required":!0,"aria-label":y.getLabel("registrationNumber"),"aria-invalid":!c.registrationNumber})})),y.isRequiredField("exemptedFromRegistrationNumber")&&Jt("boolean",{name:"exemptedFromRegistrationNumber",label:y.getLabel("exemptedFromRegistrationNumber"),value:"exemptedFromRegistrationNumber",readonly:y.isReadOnly("exemptedFromRegistrationNumber"),classNameModifiers:["exempted-from-registration"],checked:d.exemptedFromRegistrationNumber,onInput:l("exemptedFromRegistrationNumber"),"aria-required":!1,"aria-label":y.getLabel("exemptedFromRegistrationNumber"),"aria-invalid":!1})]}))}const Xd={tradingName:{modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"},stockExchangeMIC:{modes:["blur"],validate:e=>/^[A-Z0-9]{4}$/.test(e),errorMessage:"validationPleaseEnterAValidMarketIdentifier"},stockISIN:[{modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"},{modes:["blur"],validate:e=>js(e,12),errorMessage:"validationPleaseEnterAValidStockISIN"}]};function Yd({onChange:e}){const[t,a]=se(null);return de((()=>{t&&(null==e||e(t))}),[JSON.stringify(null==t?void 0:t.currentState)]),R(Xs.Consumer,{children:({state:e})=>(a(e),null)})}function Kd(){const e=ge(Xs);if(void 0===e)throw new Error("useStateContext must be used within a StateProvider");return e}const zd=["tradingName","sameNameAsLegalName",...Gd,"stockExchangeMIC","stockISIN",...Dd,...Vd];function Zd(e){var a,r;const{i18n:n,commonProps:i}=We(),o=ue(null),s=ue(null),l=ue(null),d=ue({setState:null}),c=e.id,u=(e.requiredFields||zd).filter((e=>["tradingName","sameNameAsLegalName","stockExchangeMIC","stockISIN"].includes(e))),{getData:m}=Kd(),p=null===(r=null===(a=m())||void 0===a?void 0:a.companyNameAndCountry)||void 0===r?void 0:r.legalCompanyName,g=!e.data.tradingName||e.data.tradingName===p,{handleChangeFor:y,data:b,valid:f,fieldProblems:h,errors:v,isValid:_,triggerValidation:N,setData:O}=ua(Object.assign(Object.assign({},e),{schema:u,defaultData:Object.assign(Object.assign({},e.data),{sameNameAsLegalName:g,tradingName:g?p:e.data.tradingName}),rules:Xd,fieldProblems:null==e?void 0:e.fieldValidationErrors}));de((()=>{e.data.tradingName!==b.tradingName&&e.data.tradingName&&(O("tradingName",e.data.tradingName),N(["tradingName"]))}),[e.data.tradingName]);const I=ra(e,n);de((()=>{d.current.setState({type:"addToState",value:{data:b,valid:f,errors:v,caller:c,dataStoreId:c,schema:e.requiredFields||zd}})}),[b,f,v,_]),de((()=>{O("sameNameAsLegalName",g),g&&O("tradingName",p)}),[p]);this.triggerValidation=()=>{N(u),S(E)&&o.current.triggerValidation(),S(T)&&s.current.triggerValidation(),S(A)&&l.current.triggerValidation()};const E=Dl(e,Gd),T=Dl(e,Dd),A=Dl(e,Vd),S=e=>!!e.requiredFields.length;return R(t.Fragment,{children:[R(Ys,{owner:c,stateRef:d}),R(Yd,{onChange:({currentState:t,changeInitiatedBy:a})=>{if(a===c){const a=t.data[c];let r=e.requiredFields||zd,n=!1;I.isRequiredField("vatNumber")&&(r=a.exemptedFromVat?r.filter((e=>"vatNumber"!==e)):r.filter((e=>"vatAbsenceReason"!==e)),n=!0),I.isRequiredField("taxId")&&a.exemptedFromTax&&(r=r.filter((e=>"taxId"!==e)),n=!0),I.isRequiredField("registrationNumber")&&a.exemptedFromRegistrationNumber&&(r=r.filter((e=>"registrationNumber"!==e)),n=!0),n&&d.current.setState({type:"addToState",value:{data:b,valid:f,errors:v,fieldProblems:h,caller:e.id,dataStoreId:e.id,schema:r}})}}}),R("form",Object.assign({className:"adyen-kyc-company__company-details"},{children:[R(Ms,{heading:e.heading}),R(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:I,id:"ariaErrorField"}),R(ud,{page:"Company registration details",title:n.get("whyDoINeedToFillInThisInformation"),content:n.get("reasonForFillingCompanyRegistrationDetails"),titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingCompanyRegistrationDetails"}),I.isRequiredField("tradingName")&&R(t.Fragment,{children:[R(Ue,Object.assign({name:"tradingName",label:I.getLabel("tradingName"),classNameModifiers:["tradingName"],errorMessage:I.getErrorMessage("tradingName",v,h),isValid:f.tradingName,showInlineErrors:i.showInlineErrors},{children:Jt("text",{name:"tradingName",value:b.tradingName,readonly:I.isReadOnly("tradingName")||b.sameNameAsLegalName,classNameModifiers:["tradingName"],onInput:y("tradingName","input"),onBlur:y("tradingName","blur"),"aria-required":!0,"aria-label":I.getLabel("tradingName"),"aria-invalid":!f.tradingName})})),R("div",Object.assign({className:"adyen-kyc-field--same-name-as-legal-name"},{children:Jt("boolean",{name:"sameNameAsLegalName",label:I.getLabel("sameNameAsLegalName"),value:b.sameNameAsLegalName,checked:b.sameNameAsLegalName,onInput:y("sameNameAsLegalName","input"),onChange:()=>O("tradingName",b.sameNameAsLegalName?p:""),"aria-required":!1,"aria-label":I.getLabel("sameNameAsLegalName"),"aria-invalid":!1})}))]}),I.isRequiredField("stockExchangeMIC")&&R(Ue,Object.assign({name:"stockExchangeMIC",label:I.getLabel("stockExchangeMIC"),helper:n.get("stockExchangeMICHelper"),classNameModifiers:["stockExchangeMIC"],errorMessage:I.getErrorMessage("stockExchangeMIC",v,h),isValid:f.stockExchangeMIC,showInlineErrors:i.showInlineErrors},{children:Jt("text",{name:"stockExchangeMIC",value:b.stockExchangeMIC,readonly:I.isReadOnly("stockExchangeMIC"),classNameModifiers:["stockExchangeMIC"],onInput:y("stockExchangeMIC","input"),onBlur:y("stockExchangeMIC","blur"),"aria-required":!0,"aria-label":I.getLabel("stockExchangeMIC"),"aria-invalid":!f.stockExchangeMIC})})),I.isRequiredField("stockISIN")&&R(Ue,Object.assign({name:"stockISIN",label:I.getLabel("stockISIN"),helper:n.get("stockISINHelper"),classNameModifiers:["stockISIN"],errorMessage:I.getErrorMessage("stockISIN",v,h),isValid:f.stockISIN,showInlineErrors:i.showInlineErrors},{children:Jt("text",{name:"stockISIN",value:b.stockISIN,readonly:I.isReadOnly("stockISIN"),classNameModifiers:["stockISIN"],onInput:y("stockISIN","input"),onBlur:y("stockISIN","blur"),"aria-required":!0,"aria-label":I.getLabel("stockISIN"),"aria-invalid":!f.stockISIN})})),I.isRequiredField("registrationNumber")&&R($d,Object.assign({},E,{companyType:e.companyType,ref:o,dataStoreId:c,country:e.country})),I.isRequiredField("vatNumber")&&R(kd,Object.assign({},T,{ref:s,dataStoreId:c,country:e.country})),I.isRequiredField("taxId")&&R(Ud,Object.assign({},A,{ref:l,dataStoreId:c,country:e.country}))]}))]})}const Qd={legalCompanyName:{modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"}},Jd=["legalCompanyName"];function ec(e){const{i18n:t,commonProps:a}=We(),{dataStoreId:r,requiredFields:n}=e,i=n||["legalCompanyName"],o=ue({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,triggerValidation:m,fieldProblems:p}=ua(Object.assign(Object.assign({},e),{schema:i,rules:e.validators||Qd,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));de((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:p,caller:"legalCompanyName",dataStoreId:r}})}),[l,d,c,u]),this.triggerValidation=m;const g=ra(e,t);return g.isRequiredField("legalCompanyName")?R("div",Object.assign({className:"adyen-kyc-field__legal-company-name"},{children:[R(Ys,{stateRef:o}),R(Ue,Object.assign({name:"legalCompanyName",label:g.getLabel("legalCompanyName"),helper:t.get("legalCompanyNameHelper"),classNameModifiers:["legalCompanyName"],errorMessage:g.getErrorMessage("legalCompanyName",c,p),isValid:d.legalCompanyName,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"legalCompanyName",value:l.legalCompanyName,readonly:g.isReadOnly("legalCompanyName"),classNameModifiers:["legalCompanyName"],onInput:s("legalCompanyName","input"),onBlur:s("legalCompanyName","blur"),"aria-required":!0,"aria-label":g.getLabel("legalCompanyName"),"aria-invalid":!d.legalCompanyName})}))]})):null}const tc={companyCountry:{modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"}},ac=({title:e,children:t})=>R("div",Object.assign({className:"adl-disclaimer-container"},{children:[R("div",Object.assign({className:"adl-disclaimer__title"},{children:e})),R("div",Object.assign({className:"adl-disclaimer__content"},{children:t}))]})),rc=()=>{const{i18n:e}=We();return R(ac,Object.assign({title:e.get("patriotActDisclosureTitle")},{children:[R("p",{children:e.get("patriotActDisclosureTextParagraph1")}),R("p",{children:e.get("patriotActDisclosureTextParagraph2")})]}))},nc=["companyCountry","legalCompanyName"];function ic(e){const{i18n:t}=We(),a=ue(null),{isSettingEnabled:r}=zl(),n=e.id,i=ue({setState:null}),o=r("editPrefilledCountry"),s=nc,{handleChangeFor:l,data:d,valid:c,errors:u,isValid:m,triggerValidation:p,fieldProblems:g}=ua(Object.assign(Object.assign({},e),{schema:["companyCountry"],defaultData:e.data,rules:e.validators||tc,fieldProblems:null==e?void 0:e.fieldValidationErrors})),y=ra(e,t);de((()=>{i.current.setState({type:"addToState",value:{data:d,valid:c,errors:u,fieldProblems:g,caller:n,dataStoreId:n,schema:s}})}),[d,c,u,m]),this.triggerValidation=()=>{p(["companyCountry"]),y.isRequiredField("legalCompanyName")&&a.current.triggerValidation()};const b=Dl(e,Jd);return R("div",{children:[R(Ys,{owner:n,stateRef:i}),R(Ms,{heading:e.heading}),R(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:y,id:"ariaErrorField"}),"US"===d.companyCountry?R(rc,{}):void 0,y.isRequiredField("companyCountry")&&R(aa,{label:y.getLabel("companyCountry"),allowedCountries:[],classNameModifiers:["country"],errorMessage:y.getErrorMessage("companyCountry",u,g),onDropdownChange:l("companyCountry"),value:d.companyCountry,readOnly:!o}),y.isRequiredField("legalCompanyName")&&R(ec,Object.assign({},b,{ref:a,dataStoreId:n}))]})}let oc=!1,sc=!1;function lc(e){const t=function(){const e=document.createElement("div");return e.setAttribute("aria-hidden","true"),e.setAttribute("id","adl-icon-container"),e.style.height="0",e}();return t.innerHTML=e,t}function dc(e){if(sc)return Promise.resolve();return v({loadingContext:e,path:"static/images/document-guidance.svg"},null,"text").then((e=>{document.body.insertBefore(lc(e),document.body.firstChild),sc=!0}))}var cc;!function(e){e.BANK_STATEMENT="bankStatement",e.DRIVERS_LICENSE="driversLicense",e.IDENTITY_CARD="identityCard",e.NATIONAL_ID_NUMBER="nationalIdNumber",e.PASSPORT="passport",e.PROOF_OF_ADDRESS="proofOfAddress",e.PROOF_OF_NATIONAL_ID_NUMBER="proofOfNationalIdNumber",e.PROOF_OF_RESIDENCY="proofOfResidency",e.REGISTRATION_DOCUMENT="registrationDocument",e.VAT_DOCUMENT="vatDocument",e.CONSTITUTIONAL_DOCUMENT="constitutionalDocument"}(cc||(cc={}));const uc=(e,t=!1,a=!0)=>{switch(e){case cc.PASSPORT:return"passport";case cc.DRIVERS_LICENSE:case cc.IDENTITY_CARD:return t?a?"id-front":"id-back":"id";case cc.BANK_STATEMENT:case cc.VAT_DOCUMENT:case cc.REGISTRATION_DOCUMENT:case cc.PROOF_OF_ADDRESS:case cc.PROOF_OF_RESIDENCY:default:return"generic-document"}};function mc({type:e,className:r}){const{loadingContext:n,i18n:i}=We(),[o,s]=se(null);return de((()=>{dc(n)}),[]),de((()=>{s(uc(e))}),[e]),R("div",Object.assign({className:a("adl-document-guidance",r)},{children:R("div",Object.assign({className:"adl-document-guidance__container"},{children:[R("div",Object.assign({className:"adl-document-guidance__item"},{children:[R("svg",Object.assign({width:"100%",role:"img"},{children:R("use",{href:`#adl-${o}-valid`})})),R("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("good")}))]})),R("div",Object.assign({className:"adl-document-guidance__item"},{children:[R("svg",Object.assign({width:"100%",role:"img"},{children:R("use",{href:`#adl-${o}-invalid-cut`})})),R("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("notCutOff")}))]})),R("div",Object.assign({className:"adl-document-guidance__item"},{children:[R("svg",Object.assign({width:"100%",role:"img"},{children:R("use",{href:`#adl-${o}-invalid-blur`})})),R("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("notBlurry")}))]})),R("div",Object.assign({className:"adl-document-guidance__item"},{children:R(t.Fragment,"generic-document"===o?{children:[R("svg",Object.assign({width:"100%",role:"img"},{children:R("use",{href:`#adl-${o}-invalid-expired`})})),R("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("notExpired")}))]}:{children:[R("svg",Object.assign({width:"100%",role:"img"},{children:R("use",{href:`#adl-${o}-invalid-glare`})})),R("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("noGlare")}))]})}))]}))}))}function pc(e){const{file:t,errorMessage:a,onDelete:r,iconPrefix:n}=e,{i18n:i}=We();return R("div",Object.assign({className:"adyen-kyc-dropzone-file"},{children:[R("div",Object.assign({className:"adyen-kyc-dropzone-file__icon"},{children:R("svg",Object.assign({height:"100%",width:"100%"},{children:R("use",a?{"data-testid":"document-invalid",href:`#adl-${n}-icon-invalid`}:{"data-testid":"document-valid",href:`#adl-${n}-icon-valid`})}))})),R("div",Object.assign({className:"adyen-kyc-dropzone-file__labels"},{children:[R("div",Object.assign({className:"adyen-kyc-dropzone-file__name"},{children:t.name})),R("div",a?Object.assign({className:"adyen-kyc-dropzone-file__error"},{children:i.get(a)}):Object.assign({className:"adyen-kyc-dropzone-file__size"},{children:[R("span",{children:[i.get("complete"),"\xa0"]}),(e=>{if(e){const t=["Bytes","KB","MB","GB","TB"];if(0===e)return"n/a";const a=parseInt(Math.floor(Math.log(e)/Math.log(1024)).toString());return 0===a?`${e} ${t[a]}`:`(${(e/Math.pow(1024,a)).toFixed(1)} ${t[a]})`}return null})(t.size)]}))]})),R("button",Object.assign({type:"button",className:"adyen-kyc-dropzone-file__button",onClick:()=>r(t)},{children:R(xe,{name:"remove"})}))]}))}const gc=e=>{const{name:t,allowedFiletypes:a,maxNumberOfFiles:r,maxSize:n,isOptional:i=!1}=e;let o=[{validate:e=>null==e?void 0:e.every(((e,t)=>t<r)),errorMessage:"tooManyFiles",modes:["blur","input"]},{validate:e=>!(null==e?void 0:e.map((e=>e.name)).some(((e,t,a)=>a.indexOf(e)!==t))),errorMessage:"duplicatedFiles",modes:["blur","input"]},{validate:e=>{const t=a.split(",").map((e=>e.trim()));return null==e?void 0:e.every((e=>t.some((t=>{var a;return null===(a=e.name)||void 0===a?void 0:a.toLocaleLowerCase().endsWith(t.toLocaleLowerCase())}))))},errorMessage:"unsupportedFiletype",modes:["blur","input"]},{validate:e=>null==e?void 0:e.every((e=>!e.size||e.size<n)),errorMessage:"maximumFileSizeExceeded",modes:["blur","input"]}];return i||(o=[{validate:e=>!!(null==e?void 0:e.length),errorMessage:"fieldIsRequired",modes:["blur","input"]},...o]),{[t]:o}};function yc(e){const t=["Bytes","KB","MB","GB","TB"];if(0===e)return"n/a";const a=parseInt(Math.floor(Math.log(e)/Math.log(1024)).toString(),10);return 0===a?`${e} ${t[a]}`:`${(e/Math.pow(1024,a)).toFixed()} ${t[a]}`}function bc(e){var t,r;const{name:n,iconPrefix:i,label:o,maxNumberOfFiles:s,allowedFiletypes:l,multiple:d,required:c,defaultData:u,maxSize:m,id:p,isOptional:g}=e,{i18n:y}=We(),b=ue(null),[f,h]=se(!1),[v,_]=se(!0),N=ue({setState:null}),{data:O,valid:I,errors:E,isValid:T,setData:A,fieldProblems:S,triggerValidation:C,setValid:D,handleChangeFor:k}=ua(Object.assign(Object.assign({},e),{schema:[n],defaultData:u,rules:gc(e)})),L="fieldIsRequired"===(null===(t=null==E?void 0:E[n])||void 0===t?void 0:t.errorMessage);de((()=>{var e;const t=(null===(e=null==O?void 0:O[n])||void 0===e?void 0:e.length)>=s;_(!t),N.current.setState({type:"addToState",value:{data:O,valid:I,errors:E,fieldProblems:S,caller:n,dataStoreId:p}})}),[O,I,E,T]);const w=({files:e})=>{const t=(null==O?void 0:O[n])||[];k(n,"input")([...t,...e])};return this.triggerValidation=C,de((()=>{var t,a,r;(null===(a=null===(t=e.defaultData)||void 0===t?void 0:t[n])||void 0===a?void 0:a[0])?(A(n,null===(r=e.defaultData)||void 0===r?void 0:r[n]),C()):A(n,null)}),[e.defaultData]),de((()=>{const e=null==O?void 0:O[n],t=e&&e.length>0;g&&!t&&D(n,!0)}),[g,O]),R("div",{children:[R(Ys,{stateRef:N}),o&&R("div",Object.assign({className:a("adyen-kyc-label__text",{"adyen-kyc-label__text--error":L})},{children:o})),null===(r=null==O?void 0:O[n])||void 0===r?void 0:r.map((e=>{var t;return R(pc,{file:e,onDelete:e=>(e=>{var t;return k(n,"input")(null===(t=null==O?void 0:O[n])||void 0===t?void 0:t.filter((t=>t!==e)))})(e),errorMessage:null===(t=null==E?void 0:E[n])||void 0===t?void 0:t.errorMessage,iconPrefix:i},e)})),v&&R("div",Object.assign({role:"region",className:a("adyen-kyc-dropzone",{"adyen-kyc-dropzone--dragged":f,"adyen-kyc-dropzone--error":!f&&L}),onDrop:e=>(e=>{e.preventDefault(),e.stopPropagation(),w(e.dataTransfer),h(!1)})(e),onDragOver:e=>(e=>{e.preventDefault(),e.stopPropagation(),h(!0)})(e),onDragEnter:e=>(e=>{e.preventDefault(),e.stopPropagation()})(e),onDragLeave:e=>(e=>{e.preventDefault(),e.stopPropagation(),h(!1)})(e)},{children:[R("div",Object.assign({className:"adyen-kyc-dropzone__icon"},{children:R("svg",Object.assign({height:"100%",width:"100%"},{children:R("use",{href:`#adl-${i}-icon`})}))})),R("div",Object.assign({className:"adyen-kyc-dropzone__labels"},{children:[R("div",Object.assign({className:"adyen-kyc-dropzone__drag-text"},{children:[R("span",{children:[y.get("dragYourFilesHereOr"),"\xa0"]}),R("button",Object.assign({className:"adyen-kyc-dropzone__button",type:"button",onClick:()=>b.current.click()},{children:y.get("browse")}))]})),R("div",Object.assign({className:"adyen-kyc-dropzone__supports-text"},{children:y.get("supports",{values:{fileTypes:l,maxSize:yc(m),maxFiles:s}})}))]})),R("input",{className:"adyen-kyc-dropzone__input",ref:b,multiple:d,accept:l,onChange:e=>(e=>w(e.target))(e),type:"file","aria-required":c,"aria-label":o,"aria-invalid":!I})]})),L&&R("div",Object.assign({className:"adyen-kyc-error-text"},{children:y.get("fieldIsRequired")}))]})}bc.defaultProps={defaultData:[],label:"",required:!0,multiple:!1,maxNumberOfFiles:1,maxSize:4194304,allowedFiletypes:"JPG, JPEG, PNG, PDF",iconPrefix:"generic-document",onChange:()=>{}};const fc=yt((function(e){var a,{documentType:r,documentField:i,guidanceHeader:o,documentTypeSelect:s,guidanceContent:l}=e,d=n(e,["documentType","documentField","guidanceHeader","documentTypeSelect","guidanceContent"]);const{i18n:c}=We(),u=ue(null),[m,p]=se(null),{data:g,errors:y,handleChangeFor:b,fieldProblems:f,triggerValidation:h,valid:v,setData:_}=ua(Object.assign(Object.assign({},d),{schema:["description"],defaultData:d.data,rules:d.validators,fieldProblems:null==d?void 0:d.fieldValidationErrors})),N=ra(d,c),O=ue({setState:null}),I=!((null==d?void 0:d.formVerificationErrors)&&0===(null===(a=Object.keys(null==d?void 0:d.formVerificationErrors))||void 0===a?void 0:a.length)),{selectedType:E,setSelectedType:T,options:A}=s||{};return de((()=>{I&&this.triggerValidation()}),[d.data]),this.triggerValidation=()=>{N.isRequiredField(i)&&u.current.triggerValidation()},de((()=>{O.current.setState({type:"addToState",value:{data:g,valid:v,errors:y,fieldProblems:f,caller:d.id,dataStoreId:d.id,schema:d.requiredFields}})}),[g,v,y,f]),de((()=>{var e,t;p({[i]:null===(e=null==d?void 0:d.data)||void 0===e?void 0:e[i]}),_("description",null===(t=d.data)||void 0===t?void 0:t.description),h()}),[d.data]),R("div",Object.assign({className:`adl-company-document-upload adl-company-document-upload--${i}`},{children:[R(Ys,{owner:d.id,stateRef:O}),R(Ms,{heading:d.heading}),R(qc,{verificationErrors:null==d?void 0:d.formVerificationErrors,validationErrors:null==d?void 0:d.fieldValidationErrors,formUtils:N,id:"ariaErrorField"}),N.isRequiredField(i)&&R(t.Fragment,{children:[o,s?R(Ue,Object.assign({name:"documentType",label:c.get("selectDocumentType",{values:{name:d.name}})},{children:Jt("select",{onChange:e=>T(e.target.value),name:"documentType",placeholder:c.get("selectDocument"),selected:E,items:A.map((({id:e,name:t})=>({id:e,name:c.get(t)})))})})):null,R("div",{children:l}),R(mc,{type:r,className:"adl-u-margin-bottom-24"}),R(bc,{name:i,ref:u,id:d.id,defaultData:m,isOptional:I||N.isOptionalField(i),iconPrefix:uc(r,!0)})]}),N.isRequiredField("description")&&R(Ue,Object.assign({name:"description",label:N.getLabel("description"),helper:c.get("descriptionHelper"),errorMessage:N.getErrorMessage("description",y,f),isValid:v.description},{children:Jt("textArea",{name:"description",value:g.description,classNameModifiers:["description"],maxLength:200,onInput:b("description"),"aria-label":N.getLabel("description"),"aria-invalid":!v.description})}))]}))}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&B(e.documentTypeSelect,t.documentTypeSelect)&&e.documentField===t.documentField));function hc({className:e,children:t,noMarkers:r}){const n=a(["adl-list__item",r&&"adl-list__item--no-markers",e]);return R("li",Object.assign({className:n},{children:t}))}function vc({className:e,nested:t,ordered:r,noMarkers:n,children:i}){const o=a(["adl-list",t&&"adl-list--nested",r&&"adl-list--ordered",n&&"adl-list--no-markers",e]);return R("ul",Object.assign({className:o},{children:i}))}const _c={companyNameAndCountry:{formId:"companyNameAndCountry",formName:"nameAndCountry",fields:nc},companyType:{formId:"companyType",formName:"companyStructure",fields:td},companyDetails:{formId:"companyDetails",formName:"registrationDetails",fields:zd},companyRegistrationDetails:{formId:"companyRegistrationDetails",formName:"address",fields:["registrationAddress","operationalAddress","operationalAddressIsSame"]},companyRegistrationDocument:{formId:"companyRegistrationDocument",formName:"registrationDocument",fields:["registrationDocument"]},companyTaxDocument:{formId:"companyTaxDocument",formName:"taxDocument",fields:["taxDocument"]}},Nc=_c.companyNameAndCountry.formId,Oc=_c.companyType.formId,Ic=_c.companyDetails.formId,Ec=_c.companyRegistrationDetails.formId,Tc=_c.companyRegistrationDocument.formId,Ac=_c.companyTaxDocument.formId,Sc=[Tc,Ac];var Cc;!function(e){e.BUSINESS_NAME_FILING="doingBusinessAsNameFiling",e.TAX_FILING="taxFiling",e.TRUST_DEED="trustDeed",e.TRUST_INSTRUMENT="trustInstrument"}(Cc||(Cc={}));const Rc={[il.SOLE_PROPRIETORSHIP]:[{id:Cc.BUSINESS_NAME_FILING,name:"doingBusinessAsNameFiling"},{id:Cc.TAX_FILING,name:"taxFiling"}],[il.TRUST]:[{id:Cc.TRUST_DEED,name:"trustDeed"},{id:Cc.TRUST_INSTRUMENT,name:"trustInstrument"}]};const Dc=yt((function(e){var a,{ref:r,id:i,legalEntityType:o}=e,s=n(e,["ref","id","legalEntityType"]);const{i18n:l}=We(),d=R(t.Fragment,{children:[R("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:l.get("uploadOneOfTheFollowing")})),R(vc,Object.assign({className:"adl-u-margin-left-8"},{children:null===(a=Rc[o])||void 0===a?void 0:a.map((({id:e,name:t})=>R(hc,{children:l.get(t)},e)))})),R("div",Object.assign({className:"adl-u-margin-y-16"},{children:[R("span",{children:[l.get("documentIssuedWithinLastYear")," "]}),R(el,Object.assign({href:"https://docs.adyen.com/marketplaces-and-platforms/required-kyc-information/document-requirements#constitutional-doc",external:!0},{children:l.get("learnMore")}))]}))]});return R("div",{children:R(fc,Object.assign({},s,{ref:r,documentType:cc.CONSTITUTIONAL_DOCUMENT,documentField:"constitutionalDocument",heading:l.get("constitutionalDocument"),guidanceContent:d,id:i}))})}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name)),kc={solePropNameAndCountry:{formId:"solePropNameAndCountry",formName:"nameAndCountry",fields:nc},solePropRegistrationDetails:{formId:"solePropRegistrationDetails",formName:"registrationDetails",fields:zd},solePropRegistrationAddress:{formId:"solePropRegistrationAddress",formName:"registrationAddress",fields:md},solePropConstitutionalDocument:{formId:"solePropConstitutionalDocument",formName:"constitutionalDocument",fields:["constitutionalDocument"]}},Lc=kc.solePropNameAndCountry.formId,wc=kc.solePropRegistrationAddress.formId,Pc=kc.solePropRegistrationDetails.formId,jc=kc.solePropConstitutionalDocument.formId;const xc={verificationErrors:{},remediationActions:{},missingData:[],status:Sl.FINISHED,validationErrors:{}},Mc=["2_8036","2_8064","2_8067","2_8189"];function Fc(e){const t=(null==e?void 0:e.capabilities)||{},a={};return Object.values(t).forEach((({problems:e})=>{e&&e.forEach((e=>{var t;if(null==e?void 0:e.entity){const{type:r,id:n}=Wc(e)?null===(t=null==e?void 0:e.entity)||void 0===t?void 0:t.owner:e.entity;a[r]=a[r]||{},a[r][n]=a[r][n]||W(xc),function(e,t){var a;(null===(a=e.verificationErrors)||void 0===a?void 0:a.length)&&e.verificationErrors.forEach((e=>{!function(e,t){switch(e.type){case rl.INVALID_INPUT:!function(e,t){var a,r;const n=null===(a=null==e?void 0:e.subErrors)||void 0===a?void 0:a.reduce(((e,{code:a,remediatingActions:r})=>{const n=null==r?void 0:r.reduce(((e,a)=>{const r=nl[a.code];if(r){const n=r.flatMap((e=>Uc(e))).filter(Boolean),i=null==n?void 0:n.reduce(((e,t)=>{const[a,r]=t.split(/\.(.+)/,2);return e.forms=[...e.forms,a],e.fields=[...e.fields,r],e}),{forms:[],fields:[]}),o=new Set(i.forms.filter(Boolean)),s=new Set(i.fields.filter(Boolean)),l=Object.assign(Object.assign({},a),{forms:[...o],fields:[...s]});e.remActions.push(l),e.forms=[...e.forms,...o],t.remediationActions[l.code]=l}return e}),{forms:[],remActions:[]});return e.childErrorsWithRemActions[a]=null==n?void 0:n.remActions,(null==n?void 0:n.forms)&&(e.allForms=[...e.allForms,...n.forms]),e}),{allForms:[],childErrorsWithRemActions:{}}),i=new Set(null===(r=null==n?void 0:n.allForms)||void 0===r?void 0:r.filter(Boolean));null==i||i.forEach((a=>{(null==t?void 0:t.verificationErrors[a])||(t.verificationErrors[a]={}),t.verificationErrors[a][e.code]||(t.verificationErrors[a][e.code]={}),t.verificationErrors[a][e.code]=n.childErrorsWithRemActions})),Bc(t,Sl.ERROR)}(e,t);break;case rl.DATA_MISSING:Vc(e)||function(e,t){t.missingData=t.missingData?[...t.missingData,e]:[e],Bc(t,Sl.DETAILS_REQUIRED)}(e,t);break;case rl.PENDING_STATUS:Bc(t,Sl.PROCESSING)}}(e,t)}))}(e,a[r][n])}}))})),a}const Vc=e=>Mc.includes(null==e?void 0:e.code);const Uc=e=>{if(!(null==e?void 0:e.key))return null;if("documents"===e.key&&(null==e?void 0:e.type))return e.type.map((e=>Al[e]));{const[t]=e.key.split(/\.(.+)/,2);switch(t){case il.INDIVIDUAL:return _l[e.key];case il.ORGANIZATION:return vl[e.key];case ol.BANK_ACCOUNT:return Nl[e.key];case il.SOLE_PROPRIETORSHIP:return Tl[e.key]}}};function Bc(e,t){e.status<t&&(e.status=t)}const Wc=e=>{var t,a;return"document"===(null===(a=null===(t=e.entity)||void 0===t?void 0:t.type)||void 0===a?void 0:a.toLowerCase())},Hc=({verificationErrors:e,formUtils:a})=>{var r,n;const i=e=>a.getVal(`errorMessage_${e}`),o=(e,r)=>{var n,i;if(1===(null==e?void 0:e.length))return a.getVal(`remediationMessage_${e[0].code}`);{const e=r&&Object.keys(r);let o;if((null==e?void 0:e.length)>0)if((null==e?void 0:e.length)>1){const n=[];e.forEach((e=>{var t;n.push(R(hc,{children:R(tl,{fieldName:e,label:a.getVal(`remediationMessage_${null===(t=r[e])||void 0===t?void 0:t.remediation.code}`)})}))})),o=R(t.Fragment,{children:[a.getLabel("uploadTheFollowingDocuments"),R(vc,{children:n})]})}else{const t=e[0],s=` ${null===(i=a.getVal(`remediationMessage_${null===(n=r[t])||void 0===n?void 0:n.remediation.code}`))||void 0===i?void 0:i.toLowerCase()}`;o=R(tl,{fieldName:t,label:s})}return R(t.Fragment,{children:[`${a.getVal("reviewTheInformationBelowAndCorrectMistakesOr")} `,o,` ${a.getVal("thenResubmit")}`]})}};let s,l;const d=Object.keys(e);1===d.length&&(l=d[0]);const c=Object.values(e).reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{}),u=Object.keys(c),m=null===(n=null===(r=Object.values(c))||void 0===r?void 0:r.flat())||void 0===n?void 0:n.reduce(((e,t)=>{var a;const r=(e=>{var t;return null===(t=null==e?void 0:e.forms)||void 0===t?void 0:t.some((e=>e===kp.idDocument.formId||e===kp.proofOfResidence.formId||e===kp.proofOfNationalId.formId||e===(null==_c?void 0:_c.companyRegistrationDocument.formId)||e===(null==_c?void 0:_c.companyTaxDocument.formId)||"payoutAccountDocuments"===e||e===kc.solePropConstitutionalDocument.formId))})(t);return r&&(null===(a=null==t?void 0:t.fields)||void 0===a||a.forEach((a=>e[a]={formName:null==t?void 0:t.forms[0],remediation:t}))),e}),{}),p=Object.values(c).flat();s=1===u.length?R("div",Object.assign({"data-testid":"verification-error--case-"+(1===p.length?"1":"2-1")},{children:[R("span",{children:`${i(u[0])} `}),R("span",{children:o(p,m)})]})):2===u.length?R("div",Object.assign({"data-testid":"verification-error--case-2-2"},{children:[a.getVal("weFoundTheFollowingIssues"),R("ul",{children:u.map((e=>R("li",{children:R("span",{children:i(e)})},e)))}),R("span",{children:o(p,m)})]})):R("div",Object.assign({"data-testid":"verification-error--case-2-3"},{children:o(p,m)}));const g=l?i(l):a.getVal("correctErrorsResubmit");return R(zs,Object.assign({title:g,type:Ks.ERROR,hasCloseButton:!1},{children:R("div",Object.assign({className:"adl-alert__explanation adyen-kyc-error-panel__verification-errors"},{children:s}))}))};function qc({id:e="ariaErrorField",verificationErrors:t,validationErrors:a,formUtils:r}){const n=t&&Object.keys(t).length>0,i=a&&Object.keys(a).length>0;return n||i?R("div",Object.assign({className:"adyen-kyc-error-panel",id:e,"aria-live":"polite"},{children:[n&&!i&&R(Hc,{formUtils:r,verificationErrors:t}),i&&R(al,{formUtils:r,validationErrors:a})]})):null}class Gc extends t.Component{constructor(){super(...arguments),this.onClick=e=>{e.preventDefault(),this.props.disabled||this.props.onClick(e,{complete:this.complete},null)},this.complete=(e=1e3)=>{this.setState({completed:!0}),setTimeout((()=>{this.setState({completed:!1})}),e)}}render({showAsLink:e,secondary:r,tertiary:n,ghost:i,positive:o,negative:s,className:l,small:d,block:c,circle:u,label:m,icon:p,disabled:g,status:y,type:b,title:f,testId:h,labelHoverBox:v}){const _=e?"adl-link__text":a("adl-button__text",{"adl-button__text--hover-box":v}),N={loading:R(t.Fragment,{children:[m&&R("span",Object.assign({className:_},{children:m})),R("span",Object.assign({className:"adl-button__loader-container"},{children:R(je,{size:"small",inline:!0})}))]}),default:R(t.Fragment,{children:[m&&R("span",Object.assign({className:_},{children:m})),p&&R(xe,{name:p,className:"adl-link__icon"})]})},O=N[y]||N.default,I=e?a("adl-link","adl-link--icon-right",l,{"adl-link--with-icon":!!p}):a("adl-button",l,{"adl-button--icon-left":!!p,"adl-button--secondary":r,"adl-button--tertiary":n&&!r,"adl-button--ghost":i&&!r&&!n,"adl-button--block":c,"adl-button--positive":o,"adl-button--negative":s&&!o,"adl-button--small":d&&m,"adl-button--circle":u,"adl-button--icon":p&&m&&!d,"adl-button--icon-only":p&&(!m||v),"adl-button--icon-small":d&&p&&(!m||v),"adl-button--hover-box":v});return R("button",Object.assign({"data-testid":h,className:I,type:b,title:f,disabled:g,onClick:this.onClick},{children:O}))}}function $c(e){var a,r,n;const{i18n:i,commonProps:o}=We(),s=null!==(r=ke[null===(a=e.data)||void 0===a?void 0:a.country])&&void 0!==r?r:ke.default,[l,d]=se(!1),[c,u]=se(!0),[m,p]=se(!1),y=g(i.locale),b=(null===(n=e.requiredFields)||void 0===n?void 0:n.includes("stateOrProvince"))||e.data.country&&Re.includes(e.data.country)?s:s.filter((e=>"stateOrProvince"!==e)),f=e.addressType,{data:h,errors:v,valid:_,isValid:N,setData:O,setValid:I,fieldProblems:E,handleChangeFor:T,triggerValidation:A,schema:S}=ua(Object.assign(Object.assign({},e),{schema:b,defaultData:e.data,formatters:Bs,rules:$s,fieldProblems:null==e?void 0:e.fieldValidationErrors,maskedFields:[]})),C=ra(Object.assign(Object.assign({},e),{requiredFields:b}),i),D=ue({setState:null});de((()=>{e.data.country!==h.country&&e.data.country&&(b.map((e=>{O(e,""),I(e,!1)})),O("country",e.data.country),I("country",!!e.data.country),d(!1),u(!0))}),[e.data.country]),de((()=>{e.handleAddressSearch&&e.handleFindAddress&&p(!0),(h.city||h.street||h.postalCode)&&(d(!0),u(!1))}),[]),de((()=>{h.postalCode&&T("postalCode","blur")(h.postalCode)}),[h.country]),de((()=>{var t;const a=Oe.reduce(((t,a)=>{if(!C.isRequiredField(a))return delete t[a],t;const r=C.isRequiredField(a)||h[a]||!e.data[a]?"N/A":e.data[a];return Object.assign(Object.assign({},t),{[a]:C.isRequiredField(a)||h[a]?h[a]:r})}),{}),r=f?{data:{[f]:a},valid:{[f]:N},errors:{[f]:v},fieldProblems:{[f]:E}}:{data:a,valid:_,errors:v,fieldProblems:E},n=f?null:{schema:S};D.current.setState({type:"addToState",value:Object.assign(Object.assign(Object.assign({},r),{caller:"address",dataStoreId:e.id}),n)}),null===(t=e.onChange)||void 0===t||t.call(e,Object.assign(Object.assign({},r),{isValid:N}))}),[h,_,v,N]),this.triggerValidation=()=>{d(!0),u(!1),A()};const k=t=>{if(!C.isRequiredField(t))return null;const a="country"===t&&e.hideCountry;return R(na,{allowedCountries:e.allowedCountries,classNameModifiers:[t],data:h,valid:_,errors:v,fieldProblems:E,fieldName:t,onInput:T(t,"input"),onBlur:T(t,"blur"),onDropdownChange:T(t,"blur"),maxlength:Es(Ws,t,h.country,!0),hideField:a,"aria-label":C.getLabel(t,t),trimOnBlur:!0},t)},L=(w=h.country,ke[w]||ke.default);var w;const P=(e,t)=>{O(t,e[t]||""),I(t,!!e[t])};return R("form",Object.assign({className:"adyen-kyc__address adl-u-margin-bottom-48","aria-describedby":o.showInlineErrors?null:"ariaErrorField"},{children:[R(Ms,{heading:e.heading}),R(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:C,id:"ariaErrorField"}),m?R(t.Fragment,{children:[R("div",Object.assign({className:"adyen-kyc-search-address adl-u-margin-bottom-24"},{children:[R(ct,{handleChangeFor:T,data:e.data,handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress,legalEntityId:e.legalEntityId,autocompleteAddressForm:e=>{De.includes(e.country)?(b.filter((e=>"houseNumberOrName"!==e)).map((t=>{"street"===t?(e=>{const t=e.houseNumberOrName?`${e.houseNumberOrName} `:"";O("street",`${t}${e.street||""}`||""),I("street",!!e.street)})(e):P(e,t)})),"street2"in e&&(O("houseNumberOrName",e.street2||""),I("houseNumberOrName",!!e.street2))):b.map((t=>P(e,t))),d(!0),u(!1),A()}}),R("div",Object.assign({className:"adyen-kyc-search-address--location"},{children:[R("span",Object.assign({className:"adyen-kyc-search-address--location-country"},{children:[R(xe,{name:"location"})," ",y.getCountryName(e.data.country)]})),c&&R(Gc,{showAsLink:!0,testId:"addAddressManuallyBtn",onClick:()=>(d(!0),void u(!1)),label:i.get("addManually"),title:i.get("addManually")})]}))]})),l&&L.map((e=>k(e)))]}):L.map((e=>k(e))),R(Ys,{owner:e.id,stateRef:D})]}))}Gc.defaultProps={status:"default",disabled:!1,label:"",onClick:()=>{},type:"button"},$c.defaultProps={data:{},onChange:()=>{},visibility:"editable",requiredFields:Oe,countryCode:null};const Xc={firstName:[{validate:Rs,errorMessage:"fieldIsRequired",modes:["blur"]}],lastName:[{validate:Rs,errorMessage:"fieldIsRequired",modes:["blur"]}]},Yc=ks(Ds.replace("-","")),Kc={firstName:{formatter:e=>xs(e).replace(Yc,"")},lastName:{formatter:e=>xs(e).replace(Yc,"")}},zc=["firstName","lastName"];function Zc(e){const{i18n:t,commonProps:a}=We(),r=e.requiredFields||["firstName","lastName"],{handleChangeFor:n,data:i,valid:o,errors:s,fieldProblems:l,isValid:d,triggerValidation:c}=ua(Object.assign(Object.assign({},e),{schema:r,rules:Xc,formatters:Kc,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors})),{dataStoreId:u}=e,m=ue({setState:null});de((()=>{m.current.setState({type:"addToState",value:{data:i,valid:o,errors:s,fieldProblems:l,caller:"name",dataStoreId:u}})}),[i,o,s,d]),this.triggerValidation=c;const p=ra(e,t);return R("div",Object.assign({className:"adyen-kyc-field-wrapper"},{children:[R(Ys,{stateRef:m}),p.isRequiredField("firstName")&&R(Ue,Object.assign({name:"firstName",label:p.getLabel("firstName"),classNameModifiers:["firstName","col-50"],errorMessage:p.getErrorMessage("firstName",s,l),isValid:o.firstName,showInlineErrors:a.showInlineErrors,helper:t.get("enterNameExactlyAsAppearInID")},{children:Jt("text",{name:"firstName",value:i.firstName,classNameModifiers:["name"],readonly:p.isReadOnly("firstName"),onInput:n("firstName","input"),onBlur:n("firstName","blur"),trimOnBlur:!0,spellCheck:!1,"aria-required":!0,"aria-label":p.getLabel("firstName"),"aria-invalid":!o.firstName,showInlineErrors:a.showInlineErrors})})),p.isRequiredField("lastName")&&R(Ue,Object.assign({name:"lastName",label:p.getLabel("lastName"),classNameModifiers:["lastName","col-50"],errorMessage:p.getErrorMessage("lastName",s,l),isValid:o.lastName,showInlineErrors:a.showInlineErrors,helper:t.get("enterLastNameExactlyAsAppearInID")},{children:Jt("text",{name:"lastName",value:i.lastName,classNameModifiers:["lastName"],readonly:p.isReadOnly("lastName"),onInput:n("lastName","input"),onBlur:n("lastName","blur"),trimOnBlur:!0,spellCheck:!1,"aria-required":!0,"aria-label":p.getLabel("lastName"),"aria-invalid":!o.lastName,showInlineErrors:a.showInlineErrors})}))]}))}const Qc=yt(Zc,((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)));Zc.defaultProps={data:{},onChange:()=>{},visibility:"editable",validationRules:Xc};var Jc={validCheckCharacter:function(e,t){if(!/^[A-Z]$/.test(e))return!1;const a={0:1,9:21,I:19,R:8,1:0,A:1,J:21,S:12,2:5,B:0,K:2,T:14,3:7,C:5,L:4,U:16,4:9,D:7,M:18,V:10,5:13,E:9,N:20,W:22,6:15,F:13,O:11,X:25,7:17,G:15,P:3,Y:24,8:19,H:17,Q:6,Z:23},r={0:0,9:9,I:8,R:17,1:1,A:0,J:9,S:18,2:2,B:1,K:10,T:19,3:3,C:2,L:11,U:20,4:4,D:3,M:12,V:21,5:5,E:4,N:13,W:22,6:6,F:5,O:14,X:23,7:7,G:6,P:15,Y:24,8:8,H:7,Q:16,Z:25};let n=0;for(let e=0;e<15;e+=1){const i=(e%2==1?r:a)[t.substring(e,e+1)];if(null==i)return!0;n=(n+i)%26}return n>=0&&n<=26&&"ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(n)===e}};const eu={US:{idNumber:{maxlength:4}},US9:{idNumber:{maxlength:9}},BR:{idNumber:{formatter:function(e=""){if("string"!=typeof e)return"";const t=function(e){return e.replace(/[^0-9]/g,"").trim()}(e);return t.length>11?function(e){return e.replace(/^(\d{2})(\d{3})(\d{3})?(\d{4})?(\d{1,2})?$/g,((e,t,a,r,n="",i="")=>`${t}.${a}.${r}/${n}${i.length?`-${i}`:""}`))}(t):function(e){return e.replace(/\W/gi,"").replace(/(\d{3})(?!$)/g,"$1.").replace(/(.{11}).(\d{1,2})$/g,"$1-$2")}(t)},maxlength:18}}},tu={US:/^\d{4}$/,US9:/^\d{9}$/,CA:/^\d{9}$/,IT:/^[A-Z]{6}[0-9]{2}[ABCDEHLMPRST][0-9]{2}[A-Z][0-9]{3}[A-Z]$/,ES:/(^[KL]?\d{7,8}[A-Z]$)|(^[MXYZ]\d{7}[A-Z]$)/,BR:/(^\d{3}\.\d{3}\.\d{3}-\d{2}$)|(^\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}$)/,SE:/^\d{10,12}$/},au={idNumber:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}]},ru={US:{idNumber:[{validate:e=>tu.US.test(e),modes:["blur"],errorMessage:"useSSNFormatUS"}]},US9:{idNumber:[{validate:e=>tu.US9.test(e),modes:["blur"],errorMessage:"use9DigitsSSNFormatUS"}]},CA:{idNumber:[{validate:e=>tu.CA.test(e),modes:["blur"],errorMessage:"useSSNFormatCA"}]},IT:{idNumber:[{validate:e=>tu.IT.test(e)&&Jc.validCheckCharacter(e.substring(15,16),e.substring(0,15)),modes:["blur"],errorMessage:"invalidFormat"}]},ES:{idNumber:[{validate:e=>tu.ES.test(e),modes:["blur"],errorMessage:"invalidFormat"}]},SE:{idNumber:[{validate:e=>tu.SE.test(e),modes:["blur"],errorMessage:"invalidFormat"}]},BR:{idNumber:[{validate:e=>tu.BR.test(e),modes:["blur"],errorMessage:"invalidFormat"}]}},nu=["idNumber","idNumberExempt"];function iu(e){const{i18n:a,commonProps:r}=We(),[n,i]=se(e.errors),[o,s]=se(Object.assign(Object.assign({},e.data),{idNumberExempt:!!e.data.idNumberExempt})),l=me((()=>function(e,t,a){if(!a||!t[a])return e;const r={};return Object.entries(e).forEach((([e,n])=>{const i=t[a][e];r[e]=i?Object.assign(Object.assign({},n),i):n})),Object.entries(t[a]).forEach((([e,t])=>{r[e]||(r[e]=t)})),r}({},eu,e.country)),[e.country]),d=((e,t)=>{var a;return(null===(a=e[t])||void 0===a?void 0:a.maxlength)||30})(l,"idNumber"),c=me((()=>Ts(au,ru,e.country)),[e.country]),{handleChangeFor:u,data:m,valid:p,errors:g,fieldProblems:y,triggerValidation:b,setValid:f}=ua(Object.assign(Object.assign({},e),{schema:e.requiredFields||o.idNumberExempt?["idNumberExempt"]:["idNumber","idNumberExempt"].idNumber,formatters:l,rules:c,defaultData:Object.assign(Object.assign({},e.data),{idNumberExempt:!!e.data.idNumberExempt}),fieldProblems:null==e?void 0:e.fieldValidationErrors})),{dataStoreId:h}=e,v=ra(e,a),_=ue({setState:null});de((()=>{if(e.errors&&e.errors.idNumber){const t=F("idNumber").from(e.errors);i(Object.assign(Object.assign({},n),t)),f("idNumber",!1)}}),[e.errors]),de((()=>{o.idNumber&&u("idNumber","blur")(o.idNumber)}),[e.country]),de((()=>{const t=!(!B(o,m)||!e.errors||!Object.keys(e.errors).length);i(Object.assign(Object.assign(Object.assign({},n),g),t&&n)),t&&f("idNumber",!1),s(Object.assign(Object.assign({},o),m))}),[g,m]),de((()=>{const e=Object.assign({},p);e.idNumber=!!o.idNumberExempt||p.idNumber;const t=Object.assign({},o);t.idNumber=o.idNumberExempt?null:o.idNumber,_.current.setState({type:"addToState",value:{data:t,valid:e,errors:n,fieldProblems:y,caller:"idNum",dataStoreId:h}})}),[o,p,n,y]),this.triggerValidation=b;const N=[v.isRequiredField("idNumberExempt")?"idNumberWithExempt":"idNumber"];return e.classNames&&N.push(...e.classNames),R("div",Object.assign({className:"adyen-kyc-field__id-number"},{children:v.isRequiredField("idNumber")&&R(t.Fragment,{children:[R(Ue,Object.assign({name:"idNumber",label:v.getLabel("idNumber"),classNameModifiers:N,errorMessage:v.getErrorMessage("idNumber",n,y),disabled:o.idNumberExempt,isValid:p.idNumber,showInlineErrors:r.showInlineErrors,dataPlaceholder:o.idNumber&&e.dataPlaceholder},{children:Jt("text",Object.assign(Object.assign({name:"idNumber",value:o.idNumber,placeholder:v.getPlaceholder("idNumber"),readonly:v.isReadOnly("idNumber"),onInput:u("idNumber","input"),onBlur:u("idNumber","blur"),"aria-required":!0,"aria-label":v.getLabel("idNumber","idNumber"),"aria-invalid":!p.idNumber,inputmode:"numeric",maxLength:d},o.idNumberExempt&&{disabled:!0}),{showInlineErrors:r.showInlineErrors}))})),R(Ue,Object.assign({classNameModifiers:["idNumber__checkbox"],name:"idNumberExempt"},{children:v.isRequiredField("idNumberExempt")&&R(at,{label:v.getLabel("idNumberExempt"),checked:o.idNumberExempt,classNameModifiers:["idNumberExempt"],name:"idNumberExempt",onChange:u("idNumberExempt")})})),R(Ys,{owner:"IdNumberComp",stateRef:_})]})}))}const ou=yt(iu,((e,t)=>e.country===t.country&&B(e.errors,t.errors)&&B(e.labels,t.labels)&&B(e.requiredFields,t.requiredFields)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)));iu.defaultProps={data:{},onChange:()=>{}};const su={birthDate:[{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},{modes:["blur"],validate:e=>e&&new Date(e)<new Date,errorMessage:"invalidDateOfBirth"}],residencyCountry:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},jobTitle:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},lu="idNumber",du=(e,t,a)=>i(void 0,void 0,void 0,(function*(){const r={name:{firstName:e.data.firstName,lastName:e.data.lastName},countryCode:t,idNumber:e.data.idNumber};try{const e=yield(n=a.loadingContext,o=a.clientKey,s=r,N({loadingContext:n,errorLevel:"warn",errorMessage:"Id verification is not available",errorHandler:e=>i(void 0,void 0,void 0,(function*(){const t=yield e;return 422===t.status?{status:422,message:t.detail,errorCode:t.errorCode}:500===t.status?{status:500,message:"Service did not respond, do not block verification"}:console.warn(`Unexpected response status ${t.status}`)})),path:"v1/verification/idNumber",clientKey:o},s));if(422===(null==e?void 0:e.status)||"false"===(null==e?void 0:e.verified))return{status:"error",data:e,fieldName:lu,translationKey:"unableToVerifyTheIdNumber"};if(500===(null==e?void 0:e.status))return{status:"verified",data:e,fieldName:lu};if("true"===(null==e?void 0:e.verified))return{status:"verified",data:e,fieldName:lu}}catch(e){console.warn("WARNING: idNumber verification failed - error:",e)}var n,o,s}));const cu={role:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},uu=[{roleTypes:[ql.OWNER,ql.CONTROLLING_PERSON],min:1,max:1/0},{roleTypes:[ql.OWNER],min:0,max:4},{roleTypes:[ql.CONTROLLING_PERSON],min:0,max:1/0},{roleTypes:[ql.SIGNATORY],min:1,max:1/0}],mu={US:[{roleTypes:[ql.CONTROLLING_PERSON],min:1,max:1/0},{roleTypes:[ql.OWNER],min:0,max:4},{roleTypes:[ql.SIGNATORY],min:1,max:1/0}],BR:[{roleTypes:[ql.CONTROLLING_PERSON],min:1,max:1/0},{roleTypes:[ql.OWNER],min:0,max:4},{roleTypes:[ql.SIGNATORY],min:1,max:1/0}],AU:[...uu,{roleTypes:[ql.DIRECTOR],min:3,max:1/0}],CA:[...uu,{roleTypes:[ql.DIRECTOR],min:1,max:1/0}],HK:[...uu,{roleTypes:[ql.DIRECTOR],min:1,max:1/0}],IN:[...uu,{roleTypes:[ql.DIRECTOR],min:3,max:15}],NZ:[...uu,{roleTypes:[ql.DIRECTOR],min:1,max:1/0}],SG:[...uu,{roleTypes:[ql.DIRECTOR],min:1,max:1/0}]},pu=e=>mu[e]||uu;const gu={[ql.OWNER]:"provideAllOwners",[ql.CONTROLLING_PERSON]:"ifNoOwnersSpecifyControllingPersons",[ql.DIRECTOR]:"provideAllDirectorsYouShouldHaveAtLeastOne",[ql.SIGNATORY]:"provideAtLeastOneSignatory"},yu={US:{[ql.CONTROLLING_PERSON]:"provideOneControllingPerson"},BR:{[ql.CONTROLLING_PERSON]:"provideOneControllingPerson"},AU:{[ql.DIRECTOR]:"provideAllDirectorsYouShouldHaveAtLeastThree"},IN:{[ql.DIRECTOR]:"provideAllDirectorsYouShouldHaveAtLeast3AndAtMost15"}},bu=e=>Object.assign(Object.assign({},gu),yu[e]),fu=e=>{if(null==e?void 0:e.entityAssociations){const t=Object.values(ql);return e.entityAssociations.filter((a=>t.includes(a.type)&&a.associatorId===e.id))}return[]},hu=e=>fu(e).filter((e=>e.type===ql.SIGNATORY)),vu=e=>{var t;return null===(t=fu(e))||void 0===t?void 0:t.map((e=>e.legalEntityId))},_u=e=>fu(e).reduce(((e,t)=>{var a;return e[t.type]=(null!==(a=e[t.type])&&void 0!==a?a:0)+1,e}),{}),Nu=(e,t)=>{var a,r;if(t===Cl.TRUST_MEMBER_COMPANY_OWNER)return[ql.OWNER];const n=_u(e),i=null===(r=null===(a=null==e?void 0:e.organization)||void 0===a?void 0:a.registeredAddress)||void 0===r?void 0:r.country,o=pu(i).reduce(((e,t)=>{var a;const{roleTypes:r,max:i}=t;if(1===r.length){const t=r[0];(null!==(a=null==n?void 0:n[t])&&void 0!==a?a:0)<i&&e.push(t)}return e}),[]);return[...new Set(o)]},Ou=e=>{var t,a;const r=_u(e),n=null===(a=null===(t=null==e?void 0:e.organization)||void 0===t?void 0:t.registeredAddress)||void 0===a?void 0:a.country;return pu(n).every((e=>{const{roleTypes:t,min:a}=e;return t.some((e=>{var t;return!a||(null!==(t=null==r?void 0:r[e])&&void 0!==t?t:0>=a)}))}))},Iu={[ql.CONTROLLING_PERSON]:{id:ql.CONTROLLING_PERSON,name:"controllingPerson",description:"controllingPersonDescription",className:"adl-tag--teal"},[ql.OWNER]:{id:ql.OWNER,name:"owner",description:"ownerDescription",className:"adl-tag--purple"},[ql.SIGNATORY]:{id:ql.SIGNATORY,name:"signatory",description:"signatoryDescription",className:"adl-tag--light-blue"},[ql.DIRECTOR]:{id:ql.DIRECTOR,name:"director",description:"directorDescription",className:"adl-tag--orange"}},Eu=["role"];function Tu(e){var a;const{i18n:r,commonProps:n}=We(),{data:i,valid:o,errors:s,isValid:l,fieldProblems:d,triggerValidation:c,handleChangeFor:u}=ua(Object.assign(Object.assign({},e),{schema:e.requiredFields||["role"],rules:e.validators||cu,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors})),{dataStoreId:m}=e,p=ue({setState:null}),[g,y]=se([]);de((()=>{p.current.setState({type:"addToState",value:{data:i,valid:o,errors:s,fieldProblems:d,caller:"Role",dataStoreId:m}})}),[i,o,s,l]),this.triggerValidation=c;const b=ra(e,r);return de((()=>{y(((e,t)=>Object.values(Iu).filter((e=>0===(null==t?void 0:t.length)||(null==t?void 0:t.includes(e.id)))).map((t=>Object.assign(Object.assign({},t),{name:e.get(t.name),description:e.get(t.description)}))))(r,null==e?void 0:e.allowedRoles))}),[null===(a=null==e?void 0:e.allowedRoles)||void 0===a?void 0:a.toString(),r.languageCode,r.locale]),R("div",Object.assign({className:"adyen-kyc-field__role"},{children:[R(Ys,{stateRef:p}),b.isRequiredField("role",!1)&&R(t.Fragment,{children:R(Ue,Object.assign({name:"role",classNameModifiers:["role"],label:r.get("role"),errorMessage:b.getErrorMessage("role",s,d),isValid:o.role,showInlineErrors:n.showInlineErrors},{children:Jt("select",{onChange:u("role","input"),name:"role",placeholder:r.get("rolePlaceholder"),selected:i.role,items:g,readonly:e.readOnly&&!!i.role,showInlineErrors:n.showInlineErrors,filterable:!1,isMulti:!0})}))})]}))}const Au={phoneNumber:{modes:["blur"],validate:e=>r.phone(e).isValid,errorMessage:"invalidPhoneNumber"}},Su={phoneNumber:{formatter:e=>e.replace(ks("^+|\\d","g"),"")}},Cu=["phoneNumber"];function Ru(e){var t,a,r;const{i18n:n,commonProps:i}=We(),{dataStoreId:o,country:s}=e,l=ue({setState:null}),d=ra(e,n),c=null!==(r=null===(a=null===(t=e.phonePrefixes)||void 0===t?void 0:t.find((e=>e.id===s)))||void 0===a?void 0:a.name)&&void 0!==r?r:"+1",{handleChangeFor:u,data:m,valid:p,errors:g,fieldProblems:y,isValid:b,triggerValidation:f}=ua(Object.assign(Object.assign({},e),{schema:e.requiredFields,defaultData:e.data,formatters:Su,rules:e.validators||Au,fieldProblems:null==e?void 0:e.fieldValidationErrors}));return de((()=>{l.current.setState({type:"addToState",value:{data:m,valid:p,errors:g,fieldProblems:y,caller:"phoneInput",dataStoreId:o}})}),[m,p,g,b]),this.triggerValidation=f,R("div",Object.assign({className:"adyen-kyc-phone-input"},{children:[R(Ys,{stateRef:l}),d.isRequiredField("phoneNumber")&&R(Ue,Object.assign({name:"phoneNumber",label:d.getLabel("phoneNumber"),classNameModifiers:["phone-input"],isValid:p.phoneNumber,errorMessage:d.getErrorMessage("phoneNumber",g,y),showInlineErrors:i.showInlineErrors},{children:Jt("tel",{name:"phoneNumber",value:m.phoneNumber,placeholder:c,readonly:d.isReadOnly("phoneNumber"),onInput:u("phoneNumber","input"),onBlur:u("phoneNumber","blur"),"aria-required":!0,"aria-label":d.getLabel("phoneNumber"),"aria-invalid":!p.phoneNumber,showInlineErrors:i.showInlineErrors})}))]}))}Ru.defaultProps={phoneLabel:"telephoneNumber"};const Du=yt(Ru,((e,t)=>e.country===t.country&&e.phonePrefixes==t.phonePrefixes)),ku={email:{modes:["blur"],validate:e=>/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),errorMessage:"invalidEmail"}},Lu=[...Cu,"email"];function wu(e){const{i18n:t,commonProps:a}=We(),r=ue(null),{dataStoreId:n,country:i}=e,o=e.requiredFields||Lu,{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,triggerValidation:p,fieldProblems:g}=ua(Object.assign(Object.assign({},e),{schema:o,defaultData:e.data,rules:e.validators||ku,fieldProblems:null==e?void 0:e.fieldValidationErrors})),y=ra(e,t),b=ue({setState:null});de((()=>{b.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:g,caller:"contactDetails",dataStoreId:n}})}),[l,d,c,u]);const{dataset:f}=ea(m),h=Dl(e,Cu);return this.triggerValidation=()=>{p(),r.current.triggerValidation()},R("div",Object.assign({role:"form",className:"adyen-kyc-individual__contact-details"},{children:[R(Ys,{owner:"ContactDetails",stateRef:b}),R(Ms,{heading:e.heading}),y.isRequiredField("email")&&R("div",Object.assign({className:"adyen-kyc-email"},{children:R(Ue,Object.assign({name:"email",label:y.getLabel("email"),classNameModifiers:["email"],errorMessage:y.getErrorMessage("email",c,g),isValid:d.email,showInlineErrors:a.showInlineErrors},{children:Jt("email",{name:"email",value:l.email,readonly:y.isReadOnly("email"),classNameModifiers:["email"],onInput:s("email","input"),onBlur:s("email","blur"),"aria-required":!0,"aria-label":y.getLabel("email"),"aria-invalid":!d.email,showInlineErrors:a.showInlineErrors})}))})),y.isRequiredField("phoneNumber")&&R(Du,Object.assign({},h,{ref:r,showInlineErrors:a.showInlineErrors,dataStoreId:n,country:i,phonePrefixes:f}))]}))}const Pu=yt(wu,((e,t)=>e.country===t.country&&B(e.labels,t.labels)&&B(e.requiredFields,t.requiredFields)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)));wu.defaultProps={data:{}};var ju={"adl-u-screen-reader-only":"LoaderWrapper-module_adl-u-screen-reader-only__DQoId","adl-u-screen-reader-only-focusable":"LoaderWrapper-module_adl-u-screen-reader-only-focusable__OWQql","adl-u-text-align-center":"LoaderWrapper-module_adl-u-text-align-center__Fv6Ch","adl-u-text-align-left":"LoaderWrapper-module_adl-u-text-align-left__Xjhn1","adl-u-text-align-right":"LoaderWrapper-module_adl-u-text-align-right__GeJtt","adl-u-text-align-justify":"LoaderWrapper-module_adl-u-text-align-justify__-XTV-","adl-u-vertical-align-baseline":"LoaderWrapper-module_adl-u-vertical-align-baseline__KTZlu","adl-u-vertical-align-top":"LoaderWrapper-module_adl-u-vertical-align-top__A3yt3","adl-u-vertical-align-middle":"LoaderWrapper-module_adl-u-vertical-align-middle__QRNN8","adl-u-vertical-align-bottom":"LoaderWrapper-module_adl-u-vertical-align-bottom__Qi7G6","adl-u-vertical-align-text-top":"LoaderWrapper-module_adl-u-vertical-align-text-top__ss2jj","adl-u-vertical-align-text-bottom":"LoaderWrapper-module_adl-u-vertical-align-text-bottom__S7o5N","adl-u-float-left":"LoaderWrapper-module_adl-u-float-left__38-jH","adl-u-float-right":"LoaderWrapper-module_adl-u-float-right__PMpVS","adl-u-border-none":"LoaderWrapper-module_adl-u-border-none__nPmt-","adl-u-border-bottom-none":"LoaderWrapper-module_adl-u-border-bottom-none__LYeO1","adl-u-border-left-none":"LoaderWrapper-module_adl-u-border-left-none__Tu-nP","adl-u-border-right-none":"LoaderWrapper-module_adl-u-border-right-none__JJ7aQ","adl-u-border-top-none":"LoaderWrapper-module_adl-u-border-top-none__Q2SD8","adl-u-border-x-none":"LoaderWrapper-module_adl-u-border-x-none__o5pHH","adl-u-border-y-none":"LoaderWrapper-module_adl-u-border-y-none__4DM3l","adl-u-border-radius-4":"LoaderWrapper-module_adl-u-border-radius-4__HzmsL","adl-u-border-radius-6":"LoaderWrapper-module_adl-u-border-radius-6__24Y5b","adl-u-border-radius-8":"LoaderWrapper-module_adl-u-border-radius-8__rVBWa","adl-u-border-radius-12":"LoaderWrapper-module_adl-u-border-radius-12__AdNdi","adl-u-color-white":"LoaderWrapper-module_adl-u-color-white__cNLJe","adl-u-color-black":"LoaderWrapper-module_adl-u-color-black__7TChY","adl-u-color-grey-10":"LoaderWrapper-module_adl-u-color-grey-10__15TdJ","adl-u-color-grey-20":"LoaderWrapper-module_adl-u-color-grey-20__z4cS2","adl-u-color-grey-30":"LoaderWrapper-module_adl-u-color-grey-30__-6nob","adl-u-color-grey-40":"LoaderWrapper-module_adl-u-color-grey-40__Xnj9-","adl-u-color-grey-50":"LoaderWrapper-module_adl-u-color-grey-50__PNpJV","adl-u-color-grey-60":"LoaderWrapper-module_adl-u-color-grey-60__UrNCf","adl-u-color-grey-70":"LoaderWrapper-module_adl-u-color-grey-70__uziyz","adl-u-color-info-10":"LoaderWrapper-module_adl-u-color-info-10__N43Gu","adl-u-color-info-20":"LoaderWrapper-module_adl-u-color-info-20__zpreA","adl-u-color-info-30":"LoaderWrapper-module_adl-u-color-info-30__NP7MT","adl-u-color-info-40":"LoaderWrapper-module_adl-u-color-info-40__6lvzm","adl-u-color-info-50":"LoaderWrapper-module_adl-u-color-info-50__BFzTv","adl-u-color-info-60":"LoaderWrapper-module_adl-u-color-info-60__tE1pM","adl-u-color-info-70":"LoaderWrapper-module_adl-u-color-info-70__dwsFG","adl-u-color-warning-10":"LoaderWrapper-module_adl-u-color-warning-10__JkQtP","adl-u-color-warning-20":"LoaderWrapper-module_adl-u-color-warning-20__4Ezb-","adl-u-color-warning-30":"LoaderWrapper-module_adl-u-color-warning-30__uViH0","adl-u-color-warning-40":"LoaderWrapper-module_adl-u-color-warning-40__GMfPZ","adl-u-color-warning-50":"LoaderWrapper-module_adl-u-color-warning-50__ozrs8","adl-u-color-warning-60":"LoaderWrapper-module_adl-u-color-warning-60__arejd","adl-u-color-warning-70":"LoaderWrapper-module_adl-u-color-warning-70__OC1kC","adl-u-color-success-10":"LoaderWrapper-module_adl-u-color-success-10__sDjeQ","adl-u-color-success-20":"LoaderWrapper-module_adl-u-color-success-20__pAhsC","adl-u-color-success-30":"LoaderWrapper-module_adl-u-color-success-30__8lceW","adl-u-color-success-40":"LoaderWrapper-module_adl-u-color-success-40__-OVhR","adl-u-color-success-50":"LoaderWrapper-module_adl-u-color-success-50__w9iGp","adl-u-color-success-60":"LoaderWrapper-module_adl-u-color-success-60__TycSy","adl-u-color-success-70":"LoaderWrapper-module_adl-u-color-success-70__D-MTJ","adl-u-color-error-10":"LoaderWrapper-module_adl-u-color-error-10__ZAdis","adl-u-color-error-20":"LoaderWrapper-module_adl-u-color-error-20__a-5Z-","adl-u-color-error-30":"LoaderWrapper-module_adl-u-color-error-30__Wl5Tz","adl-u-color-error-40":"LoaderWrapper-module_adl-u-color-error-40__Rs-dp","adl-u-color-error-50":"LoaderWrapper-module_adl-u-color-error-50__aqx4o","adl-u-color-error-60":"LoaderWrapper-module_adl-u-color-error-60__s-cif","adl-u-color-error-70":"LoaderWrapper-module_adl-u-color-error-70__mtXLl","adl-u-color-mint-10":"LoaderWrapper-module_adl-u-color-mint-10__PyCeD","adl-u-color-mint-20":"LoaderWrapper-module_adl-u-color-mint-20__BVsuB","adl-u-color-mint-30":"LoaderWrapper-module_adl-u-color-mint-30__rFs6a","adl-u-color-mint-40":"LoaderWrapper-module_adl-u-color-mint-40__NLecv","adl-u-color-mint-50":"LoaderWrapper-module_adl-u-color-mint-50__KcoB4","adl-u-color-mint-60":"LoaderWrapper-module_adl-u-color-mint-60__mr5uU","adl-u-color-mint-70":"LoaderWrapper-module_adl-u-color-mint-70__ag2je","adl-u-color-brand":"LoaderWrapper-module_adl-u-color-brand__rRrDv","adl-u-color-default":"LoaderWrapper-module_adl-u-color-default__YfVqx","adl-u-color-disabled":"LoaderWrapper-module_adl-u-color-disabled__7bzQH","adl-u-color-quiet":"LoaderWrapper-module_adl-u-color-quiet__XPiq1","adl-u-color-inherit":"LoaderWrapper-module_adl-u-color-inherit__wR51M","adl-u-background-color-white":"LoaderWrapper-module_adl-u-background-color-white__fSJZ5","adl-u-background-color-black":"LoaderWrapper-module_adl-u-background-color-black__ChDOa","adl-u-background-color-grey-10":"LoaderWrapper-module_adl-u-background-color-grey-10__oPGfO","adl-u-background-color-grey-20":"LoaderWrapper-module_adl-u-background-color-grey-20__Ejfz-","adl-u-background-color-grey-30":"LoaderWrapper-module_adl-u-background-color-grey-30__hHjTO","adl-u-background-color-grey-40":"LoaderWrapper-module_adl-u-background-color-grey-40__SqH04","adl-u-background-color-grey-50":"LoaderWrapper-module_adl-u-background-color-grey-50__tUUPG","adl-u-background-color-grey-60":"LoaderWrapper-module_adl-u-background-color-grey-60__6i9MM","adl-u-background-color-grey-70":"LoaderWrapper-module_adl-u-background-color-grey-70__yqto5","adl-u-background-color-info-10":"LoaderWrapper-module_adl-u-background-color-info-10__Fol0t","adl-u-background-color-info-20":"LoaderWrapper-module_adl-u-background-color-info-20__-EOoN","adl-u-background-color-info-30":"LoaderWrapper-module_adl-u-background-color-info-30__yE1pC","adl-u-background-color-info-40":"LoaderWrapper-module_adl-u-background-color-info-40__tdB5Q","adl-u-background-color-info-50":"LoaderWrapper-module_adl-u-background-color-info-50__B3rBR","adl-u-background-color-info-60":"LoaderWrapper-module_adl-u-background-color-info-60__tNiM1","adl-u-background-color-info-70":"LoaderWrapper-module_adl-u-background-color-info-70__D6w2L","adl-u-background-color-warning-10":"LoaderWrapper-module_adl-u-background-color-warning-10__r1C9L","adl-u-background-color-warning-20":"LoaderWrapper-module_adl-u-background-color-warning-20__nxgBf","adl-u-background-color-warning-30":"LoaderWrapper-module_adl-u-background-color-warning-30__e7cgV","adl-u-background-color-warning-40":"LoaderWrapper-module_adl-u-background-color-warning-40__gFU3n","adl-u-background-color-warning-50":"LoaderWrapper-module_adl-u-background-color-warning-50__kdnCI","adl-u-background-color-warning-60":"LoaderWrapper-module_adl-u-background-color-warning-60__N1FBx","adl-u-background-color-warning-70":"LoaderWrapper-module_adl-u-background-color-warning-70__tseV-","adl-u-background-color-success-10":"LoaderWrapper-module_adl-u-background-color-success-10__nUC4T","adl-u-background-color-success-20":"LoaderWrapper-module_adl-u-background-color-success-20__8KaLI","adl-u-background-color-success-30":"LoaderWrapper-module_adl-u-background-color-success-30__G3UnZ","adl-u-background-color-success-40":"LoaderWrapper-module_adl-u-background-color-success-40__yRUO-","adl-u-background-color-success-50":"LoaderWrapper-module_adl-u-background-color-success-50__rrdfi","adl-u-background-color-success-60":"LoaderWrapper-module_adl-u-background-color-success-60__wK7hE","adl-u-background-color-success-70":"LoaderWrapper-module_adl-u-background-color-success-70__hMaj-","adl-u-background-color-error-10":"LoaderWrapper-module_adl-u-background-color-error-10__Q6Rw6","adl-u-background-color-error-20":"LoaderWrapper-module_adl-u-background-color-error-20__H7Mk8","adl-u-background-color-error-30":"LoaderWrapper-module_adl-u-background-color-error-30__GseU6","adl-u-background-color-error-40":"LoaderWrapper-module_adl-u-background-color-error-40__F-0vo","adl-u-background-color-error-50":"LoaderWrapper-module_adl-u-background-color-error-50__2C5nG","adl-u-background-color-error-60":"LoaderWrapper-module_adl-u-background-color-error-60__cWt-3","adl-u-background-color-error-70":"LoaderWrapper-module_adl-u-background-color-error-70__UliQ9","adl-u-background-color-mint-10":"LoaderWrapper-module_adl-u-background-color-mint-10__B5yYA","adl-u-background-color-mint-20":"LoaderWrapper-module_adl-u-background-color-mint-20__udcWT","adl-u-background-color-mint-30":"LoaderWrapper-module_adl-u-background-color-mint-30__Pvdfd","adl-u-background-color-mint-40":"LoaderWrapper-module_adl-u-background-color-mint-40__YSfUE","adl-u-background-color-mint-50":"LoaderWrapper-module_adl-u-background-color-mint-50__II2ur","adl-u-background-color-mint-60":"LoaderWrapper-module_adl-u-background-color-mint-60__JdCfY","adl-u-background-color-mint-70":"LoaderWrapper-module_adl-u-background-color-mint-70__XOOr7","adl-u-background-color-brand":"LoaderWrapper-module_adl-u-background-color-brand__StC5S","adl-u-background-color-default":"LoaderWrapper-module_adl-u-background-color-default__QqksR","adl-u-background-color-disabled":"LoaderWrapper-module_adl-u-background-color-disabled__F51GC","adl-u-background-color-quiet":"LoaderWrapper-module_adl-u-background-color-quiet__T-6X6","adl-u-background-color-inherit":"LoaderWrapper-module_adl-u-background-color-inherit__8L6-A","adl-u-overflow-auto":"LoaderWrapper-module_adl-u-overflow-auto__RLoFT","adl-u-overflow-hidden":"LoaderWrapper-module_adl-u-overflow-hidden__OdlT5","adl-u-overflow-scroll":"LoaderWrapper-module_adl-u-overflow-scroll__fF-sR","adl-u-overflow-visible":"LoaderWrapper-module_adl-u-overflow-visible__AD6V1","adl-u-overflow-x-auto":"LoaderWrapper-module_adl-u-overflow-x-auto__kVp7e","adl-u-overflow-x-hidden":"LoaderWrapper-module_adl-u-overflow-x-hidden__6HBtz","adl-u-overflow-x-scroll":"LoaderWrapper-module_adl-u-overflow-x-scroll__1O2-5","adl-u-overflow-x-visible":"LoaderWrapper-module_adl-u-overflow-x-visible__cNwIF","adl-u-overflow-y-auto":"LoaderWrapper-module_adl-u-overflow-y-auto__EHpmv","adl-u-overflow-y-hidden":"LoaderWrapper-module_adl-u-overflow-y-hidden__N84EW","adl-u-overflow-y-scroll":"LoaderWrapper-module_adl-u-overflow-y-scroll__M-nRc","adl-u-overflow-y-visible":"LoaderWrapper-module_adl-u-overflow-y-visible__s7JYN","adl-u-position-static":"LoaderWrapper-module_adl-u-position-static__9uW2P","adl-u-position-relative":"LoaderWrapper-module_adl-u-position-relative__20QN5","adl-u-position-absolute":"LoaderWrapper-module_adl-u-position-absolute__5JTK4","adl-u-position-sticky":"LoaderWrapper-module_adl-u-position-sticky__-v5nH","adl-u-position-fixed":"LoaderWrapper-module_adl-u-position-fixed__pybl1","adl-u-bottom-0":"LoaderWrapper-module_adl-u-bottom-0__63q6H","adl-u-left-0":"LoaderWrapper-module_adl-u-left-0__REQp7","adl-u-right-0":"LoaderWrapper-module_adl-u-right-0__LZOKr","adl-u-top-0":"LoaderWrapper-module_adl-u-top-0__LWq7N","adl-u-padding-2":"LoaderWrapper-module_adl-u-padding-2__3aY1d","adl-u-padding-bottom-2":"LoaderWrapper-module_adl-u-padding-bottom-2__wnJkv","adl-u-padding-left-2":"LoaderWrapper-module_adl-u-padding-left-2__x77IQ","adl-u-padding-right-2":"LoaderWrapper-module_adl-u-padding-right-2__v2l5C","adl-u-padding-top-2":"LoaderWrapper-module_adl-u-padding-top-2__29G-e","adl-u-padding-x-2":"LoaderWrapper-module_adl-u-padding-x-2__IEaLB","adl-u-padding-y-2":"LoaderWrapper-module_adl-u-padding-y-2__r-5Ne","adl-u-padding-4":"LoaderWrapper-module_adl-u-padding-4__Qf7Qu","adl-u-padding-bottom-4":"LoaderWrapper-module_adl-u-padding-bottom-4__W8RCl","adl-u-padding-left-4":"LoaderWrapper-module_adl-u-padding-left-4__EvyNL","adl-u-padding-right-4":"LoaderWrapper-module_adl-u-padding-right-4__dtmEh","adl-u-padding-top-4":"LoaderWrapper-module_adl-u-padding-top-4__e-ilN","adl-u-padding-x-4":"LoaderWrapper-module_adl-u-padding-x-4__4-z31","adl-u-padding-y-4":"LoaderWrapper-module_adl-u-padding-y-4__GGdPs","adl-u-padding-8":"LoaderWrapper-module_adl-u-padding-8__2NE20","adl-u-padding-bottom-8":"LoaderWrapper-module_adl-u-padding-bottom-8__yOXFD","adl-u-padding-left-8":"LoaderWrapper-module_adl-u-padding-left-8__cQfHL","adl-u-padding-right-8":"LoaderWrapper-module_adl-u-padding-right-8__UFca4","adl-u-padding-top-8":"LoaderWrapper-module_adl-u-padding-top-8__rDdlL","adl-u-padding-x-8":"LoaderWrapper-module_adl-u-padding-x-8__-tsFE","adl-u-padding-y-8":"LoaderWrapper-module_adl-u-padding-y-8__p67T8","adl-u-padding-16":"LoaderWrapper-module_adl-u-padding-16__wyIs0","adl-u-padding-bottom-16":"LoaderWrapper-module_adl-u-padding-bottom-16__ZbBMG","adl-u-padding-left-16":"LoaderWrapper-module_adl-u-padding-left-16__IZcWh","adl-u-padding-right-16":"LoaderWrapper-module_adl-u-padding-right-16__XX-Gm","adl-u-padding-top-16":"LoaderWrapper-module_adl-u-padding-top-16__YLoya","adl-u-padding-x-16":"LoaderWrapper-module_adl-u-padding-x-16__Nk9XH","adl-u-padding-y-16":"LoaderWrapper-module_adl-u-padding-y-16__4bS6b","adl-u-padding-24":"LoaderWrapper-module_adl-u-padding-24__T15uX","adl-u-padding-bottom-24":"LoaderWrapper-module_adl-u-padding-bottom-24__yZeVF","adl-u-padding-left-24":"LoaderWrapper-module_adl-u-padding-left-24__H4Mpo","adl-u-padding-right-24":"LoaderWrapper-module_adl-u-padding-right-24__Np7cC","adl-u-padding-top-24":"LoaderWrapper-module_adl-u-padding-top-24__-u4-u","adl-u-padding-x-24":"LoaderWrapper-module_adl-u-padding-x-24__d1Zyw","adl-u-padding-y-24":"LoaderWrapper-module_adl-u-padding-y-24__elC6h","adl-u-padding-32":"LoaderWrapper-module_adl-u-padding-32__1-66b","adl-u-padding-bottom-32":"LoaderWrapper-module_adl-u-padding-bottom-32__MGMqu","adl-u-padding-left-32":"LoaderWrapper-module_adl-u-padding-left-32__OjLzD","adl-u-padding-right-32":"LoaderWrapper-module_adl-u-padding-right-32__9gVTd","adl-u-padding-top-32":"LoaderWrapper-module_adl-u-padding-top-32__T7AgW","adl-u-padding-x-32":"LoaderWrapper-module_adl-u-padding-x-32__zINSY","adl-u-padding-y-32":"LoaderWrapper-module_adl-u-padding-y-32__1cAah","adl-u-padding-40":"LoaderWrapper-module_adl-u-padding-40__LBJpX","adl-u-padding-bottom-40":"LoaderWrapper-module_adl-u-padding-bottom-40__hzO-i","adl-u-padding-left-40":"LoaderWrapper-module_adl-u-padding-left-40__PteLs","adl-u-padding-right-40":"LoaderWrapper-module_adl-u-padding-right-40__KnF5h","adl-u-padding-top-40":"LoaderWrapper-module_adl-u-padding-top-40__oKHiH","adl-u-padding-x-40":"LoaderWrapper-module_adl-u-padding-x-40__kI6vI","adl-u-padding-y-40":"LoaderWrapper-module_adl-u-padding-y-40__RuSag","adl-u-padding-48":"LoaderWrapper-module_adl-u-padding-48__nab9e","adl-u-padding-bottom-48":"LoaderWrapper-module_adl-u-padding-bottom-48__D5-Ld","adl-u-padding-left-48":"LoaderWrapper-module_adl-u-padding-left-48__wkbHt","adl-u-padding-right-48":"LoaderWrapper-module_adl-u-padding-right-48__VWbRj","adl-u-padding-top-48":"LoaderWrapper-module_adl-u-padding-top-48__jFGoL","adl-u-padding-x-48":"LoaderWrapper-module_adl-u-padding-x-48__iLxON","adl-u-padding-y-48":"LoaderWrapper-module_adl-u-padding-y-48__xjJU8","adl-u-padding-56":"LoaderWrapper-module_adl-u-padding-56__k-Yhw","adl-u-padding-bottom-56":"LoaderWrapper-module_adl-u-padding-bottom-56__-PulO","adl-u-padding-left-56":"LoaderWrapper-module_adl-u-padding-left-56__aS5Yj","adl-u-padding-right-56":"LoaderWrapper-module_adl-u-padding-right-56__8hOKA","adl-u-padding-top-56":"LoaderWrapper-module_adl-u-padding-top-56__Y0eqm","adl-u-padding-x-56":"LoaderWrapper-module_adl-u-padding-x-56__GUbnb","adl-u-padding-y-56":"LoaderWrapper-module_adl-u-padding-y-56__KOOlW","adl-u-padding-64":"LoaderWrapper-module_adl-u-padding-64__huzIF","adl-u-padding-bottom-64":"LoaderWrapper-module_adl-u-padding-bottom-64__NJ3rS","adl-u-padding-left-64":"LoaderWrapper-module_adl-u-padding-left-64__HpfaZ","adl-u-padding-right-64":"LoaderWrapper-module_adl-u-padding-right-64__PVDK8","adl-u-padding-top-64":"LoaderWrapper-module_adl-u-padding-top-64__nhkYM","adl-u-padding-x-64":"LoaderWrapper-module_adl-u-padding-x-64__XHvji","adl-u-padding-y-64":"LoaderWrapper-module_adl-u-padding-y-64__PMwnL","adl-u-padding-72":"LoaderWrapper-module_adl-u-padding-72__EL37y","adl-u-padding-bottom-72":"LoaderWrapper-module_adl-u-padding-bottom-72__y0RBf","adl-u-padding-left-72":"LoaderWrapper-module_adl-u-padding-left-72__aKMlI","adl-u-padding-right-72":"LoaderWrapper-module_adl-u-padding-right-72__IKPYC","adl-u-padding-top-72":"LoaderWrapper-module_adl-u-padding-top-72__0eQl-","adl-u-padding-x-72":"LoaderWrapper-module_adl-u-padding-x-72__fnzOF","adl-u-padding-y-72":"LoaderWrapper-module_adl-u-padding-y-72__ZK5GM","adl-u-padding-80":"LoaderWrapper-module_adl-u-padding-80__OjC1L","adl-u-padding-bottom-80":"LoaderWrapper-module_adl-u-padding-bottom-80__mTI5S","adl-u-padding-left-80":"LoaderWrapper-module_adl-u-padding-left-80__zUnH3","adl-u-padding-right-80":"LoaderWrapper-module_adl-u-padding-right-80__FGUjE","adl-u-padding-top-80":"LoaderWrapper-module_adl-u-padding-top-80__WaNty","adl-u-padding-x-80":"LoaderWrapper-module_adl-u-padding-x-80__W5EC1","adl-u-padding-y-80":"LoaderWrapper-module_adl-u-padding-y-80__Q0CtV","adl-u-padding-88":"LoaderWrapper-module_adl-u-padding-88__3hIxN","adl-u-padding-bottom-88":"LoaderWrapper-module_adl-u-padding-bottom-88__-ySZu","adl-u-padding-left-88":"LoaderWrapper-module_adl-u-padding-left-88__Do-TE","adl-u-padding-right-88":"LoaderWrapper-module_adl-u-padding-right-88__ZszmB","adl-u-padding-top-88":"LoaderWrapper-module_adl-u-padding-top-88__PdiWT","adl-u-padding-x-88":"LoaderWrapper-module_adl-u-padding-x-88__aqiOm","adl-u-padding-y-88":"LoaderWrapper-module_adl-u-padding-y-88__opkT-","adl-u-padding-96":"LoaderWrapper-module_adl-u-padding-96__nUVGm","adl-u-padding-bottom-96":"LoaderWrapper-module_adl-u-padding-bottom-96__Q-Xxd","adl-u-padding-left-96":"LoaderWrapper-module_adl-u-padding-left-96__wti4M","adl-u-padding-right-96":"LoaderWrapper-module_adl-u-padding-right-96__Yq6N2","adl-u-padding-top-96":"LoaderWrapper-module_adl-u-padding-top-96__7wq4Z","adl-u-padding-x-96":"LoaderWrapper-module_adl-u-padding-x-96__ILllz","adl-u-padding-y-96":"LoaderWrapper-module_adl-u-padding-y-96__ShVbW","adl-u-padding-0":"LoaderWrapper-module_adl-u-padding-0__vL2ZJ","adl-u-padding-bottom-0":"LoaderWrapper-module_adl-u-padding-bottom-0__Sa8LS","adl-u-padding-left-0":"LoaderWrapper-module_adl-u-padding-left-0__ge--J","adl-u-padding-right-0":"LoaderWrapper-module_adl-u-padding-right-0__o8Uj0","adl-u-padding-top-0":"LoaderWrapper-module_adl-u-padding-top-0__V2OJQ","adl-u-padding-x-0":"LoaderWrapper-module_adl-u-padding-x-0__0a7Lo","adl-u-padding-y-0":"LoaderWrapper-module_adl-u-padding-y-0__osF0a","adl-u-padding-auto":"LoaderWrapper-module_adl-u-padding-auto__14VRO","adl-u-padding-bottom-auto":"LoaderWrapper-module_adl-u-padding-bottom-auto__xS8SM","adl-u-padding-left-auto":"LoaderWrapper-module_adl-u-padding-left-auto__vd-WD","adl-u-padding-right-auto":"LoaderWrapper-module_adl-u-padding-right-auto__1I3uM","adl-u-padding-top-auto":"LoaderWrapper-module_adl-u-padding-top-auto__ne0Nq","adl-u-padding-x-auto":"LoaderWrapper-module_adl-u-padding-x-auto__qDa4k","adl-u-padding-y-auto":"LoaderWrapper-module_adl-u-padding-y-auto__H5mWT","adl-u-margin-2":"LoaderWrapper-module_adl-u-margin-2__Qo8iE","adl-u-margin-bottom-2":"LoaderWrapper-module_adl-u-margin-bottom-2__6ohtb","adl-u-margin-left-2":"LoaderWrapper-module_adl-u-margin-left-2__s1JT2","adl-u-margin-right-2":"LoaderWrapper-module_adl-u-margin-right-2__-Mddd","adl-u-margin-top-2":"LoaderWrapper-module_adl-u-margin-top-2__sjp3N","adl-u-margin-x-2":"LoaderWrapper-module_adl-u-margin-x-2__SKHn6","adl-u-margin-y-2":"LoaderWrapper-module_adl-u-margin-y-2__s7BlI","adl-u-margin-4":"LoaderWrapper-module_adl-u-margin-4__ho9oo","adl-u-margin-bottom-4":"LoaderWrapper-module_adl-u-margin-bottom-4__dM-wd","adl-u-margin-left-4":"LoaderWrapper-module_adl-u-margin-left-4__uoq6Q","adl-u-margin-right-4":"LoaderWrapper-module_adl-u-margin-right-4__O-W4Y","adl-u-margin-top-4":"LoaderWrapper-module_adl-u-margin-top-4__j5hGD","adl-u-margin-x-4":"LoaderWrapper-module_adl-u-margin-x-4__M2Q6h","adl-u-margin-y-4":"LoaderWrapper-module_adl-u-margin-y-4__n3QcP","adl-u-margin-8":"LoaderWrapper-module_adl-u-margin-8__DHdMk","adl-u-margin-bottom-8":"LoaderWrapper-module_adl-u-margin-bottom-8__UFh6P","adl-u-margin-left-8":"LoaderWrapper-module_adl-u-margin-left-8__qrUDK","adl-u-margin-right-8":"LoaderWrapper-module_adl-u-margin-right-8__wWTZH","adl-u-margin-top-8":"LoaderWrapper-module_adl-u-margin-top-8__c0W0j","adl-u-margin-x-8":"LoaderWrapper-module_adl-u-margin-x-8__St8Ig","adl-u-margin-y-8":"LoaderWrapper-module_adl-u-margin-y-8__-V1Mg","adl-u-margin-16":"LoaderWrapper-module_adl-u-margin-16__y0p53","adl-u-margin-bottom-16":"LoaderWrapper-module_adl-u-margin-bottom-16__jGvbm","adl-u-margin-left-16":"LoaderWrapper-module_adl-u-margin-left-16__Upttw","adl-u-margin-right-16":"LoaderWrapper-module_adl-u-margin-right-16__W5-y8","adl-u-margin-top-16":"LoaderWrapper-module_adl-u-margin-top-16__gbfPj","adl-u-margin-x-16":"LoaderWrapper-module_adl-u-margin-x-16__R2UbC","adl-u-margin-y-16":"LoaderWrapper-module_adl-u-margin-y-16__gdLMJ","adl-u-margin-24":"LoaderWrapper-module_adl-u-margin-24__Bgj7-","adl-u-margin-bottom-24":"LoaderWrapper-module_adl-u-margin-bottom-24__FlN7g","adl-u-margin-left-24":"LoaderWrapper-module_adl-u-margin-left-24__l7cEY","adl-u-margin-right-24":"LoaderWrapper-module_adl-u-margin-right-24__7iU7q","adl-u-margin-top-24":"LoaderWrapper-module_adl-u-margin-top-24__5ExVh","adl-u-margin-x-24":"LoaderWrapper-module_adl-u-margin-x-24__CN9Uy","adl-u-margin-y-24":"LoaderWrapper-module_adl-u-margin-y-24__ayYCk","adl-u-margin-32":"LoaderWrapper-module_adl-u-margin-32__gttLq","adl-u-margin-bottom-32":"LoaderWrapper-module_adl-u-margin-bottom-32__TUE6-","adl-u-margin-left-32":"LoaderWrapper-module_adl-u-margin-left-32__N8ZoX","adl-u-margin-right-32":"LoaderWrapper-module_adl-u-margin-right-32__NCSZc","adl-u-margin-top-32":"LoaderWrapper-module_adl-u-margin-top-32__kvsHF","adl-u-margin-x-32":"LoaderWrapper-module_adl-u-margin-x-32__aHnwi","adl-u-margin-y-32":"LoaderWrapper-module_adl-u-margin-y-32__qs3Ih","adl-u-margin-40":"LoaderWrapper-module_adl-u-margin-40__KwyR4","adl-u-margin-bottom-40":"LoaderWrapper-module_adl-u-margin-bottom-40__irTpE","adl-u-margin-left-40":"LoaderWrapper-module_adl-u-margin-left-40__1MP-L","adl-u-margin-right-40":"LoaderWrapper-module_adl-u-margin-right-40__JCYNS","adl-u-margin-top-40":"LoaderWrapper-module_adl-u-margin-top-40__duOrg","adl-u-margin-x-40":"LoaderWrapper-module_adl-u-margin-x-40__8fLVI","adl-u-margin-y-40":"LoaderWrapper-module_adl-u-margin-y-40__oG9xg","adl-u-margin-48":"LoaderWrapper-module_adl-u-margin-48__Ic2Ku","adl-u-margin-bottom-48":"LoaderWrapper-module_adl-u-margin-bottom-48__h0tQC","adl-u-margin-left-48":"LoaderWrapper-module_adl-u-margin-left-48__7kxb-","adl-u-margin-right-48":"LoaderWrapper-module_adl-u-margin-right-48__Qlse8","adl-u-margin-top-48":"LoaderWrapper-module_adl-u-margin-top-48__dTvr2","adl-u-margin-x-48":"LoaderWrapper-module_adl-u-margin-x-48__mGF5m","adl-u-margin-y-48":"LoaderWrapper-module_adl-u-margin-y-48__Bccx9","adl-u-margin-56":"LoaderWrapper-module_adl-u-margin-56__LbQyi","adl-u-margin-bottom-56":"LoaderWrapper-module_adl-u-margin-bottom-56__l8yXF","adl-u-margin-left-56":"LoaderWrapper-module_adl-u-margin-left-56__ouRt1","adl-u-margin-right-56":"LoaderWrapper-module_adl-u-margin-right-56__VvR8H","adl-u-margin-top-56":"LoaderWrapper-module_adl-u-margin-top-56__osJoZ","adl-u-margin-x-56":"LoaderWrapper-module_adl-u-margin-x-56__KS1N2","adl-u-margin-y-56":"LoaderWrapper-module_adl-u-margin-y-56__pOIvQ","adl-u-margin-64":"LoaderWrapper-module_adl-u-margin-64__qrQ-3","adl-u-margin-bottom-64":"LoaderWrapper-module_adl-u-margin-bottom-64__iShlf","adl-u-margin-left-64":"LoaderWrapper-module_adl-u-margin-left-64__Rb3bk","adl-u-margin-right-64":"LoaderWrapper-module_adl-u-margin-right-64__5e905","adl-u-margin-top-64":"LoaderWrapper-module_adl-u-margin-top-64__DMFhE","adl-u-margin-x-64":"LoaderWrapper-module_adl-u-margin-x-64__88Dp3","adl-u-margin-y-64":"LoaderWrapper-module_adl-u-margin-y-64__YrjWu","adl-u-margin-72":"LoaderWrapper-module_adl-u-margin-72__p2Nth","adl-u-margin-bottom-72":"LoaderWrapper-module_adl-u-margin-bottom-72__bQ1rJ","adl-u-margin-left-72":"LoaderWrapper-module_adl-u-margin-left-72__2ZsA9","adl-u-margin-right-72":"LoaderWrapper-module_adl-u-margin-right-72__Y9jVV","adl-u-margin-top-72":"LoaderWrapper-module_adl-u-margin-top-72__XBIqc","adl-u-margin-x-72":"LoaderWrapper-module_adl-u-margin-x-72__U4Geq","adl-u-margin-y-72":"LoaderWrapper-module_adl-u-margin-y-72__igMhc","adl-u-margin-80":"LoaderWrapper-module_adl-u-margin-80__ZaaVL","adl-u-margin-bottom-80":"LoaderWrapper-module_adl-u-margin-bottom-80__4mhvM","adl-u-margin-left-80":"LoaderWrapper-module_adl-u-margin-left-80__Ujmc8","adl-u-margin-right-80":"LoaderWrapper-module_adl-u-margin-right-80__5vsK6","adl-u-margin-top-80":"LoaderWrapper-module_adl-u-margin-top-80__tCCbV","adl-u-margin-x-80":"LoaderWrapper-module_adl-u-margin-x-80__h2Yhu","adl-u-margin-y-80":"LoaderWrapper-module_adl-u-margin-y-80__3CZaK","adl-u-margin-88":"LoaderWrapper-module_adl-u-margin-88__OITKU","adl-u-margin-bottom-88":"LoaderWrapper-module_adl-u-margin-bottom-88__dXAiI","adl-u-margin-left-88":"LoaderWrapper-module_adl-u-margin-left-88__gzaMr","adl-u-margin-right-88":"LoaderWrapper-module_adl-u-margin-right-88__yoUAB","adl-u-margin-top-88":"LoaderWrapper-module_adl-u-margin-top-88__axU9A","adl-u-margin-x-88":"LoaderWrapper-module_adl-u-margin-x-88__G6HTw","adl-u-margin-y-88":"LoaderWrapper-module_adl-u-margin-y-88__1h5uT","adl-u-margin-96":"LoaderWrapper-module_adl-u-margin-96__rM0li","adl-u-margin-bottom-96":"LoaderWrapper-module_adl-u-margin-bottom-96__xWxo0","adl-u-margin-left-96":"LoaderWrapper-module_adl-u-margin-left-96__KjUWb","adl-u-margin-right-96":"LoaderWrapper-module_adl-u-margin-right-96__n6Lvn","adl-u-margin-top-96":"LoaderWrapper-module_adl-u-margin-top-96__wXR-E","adl-u-margin-x-96":"LoaderWrapper-module_adl-u-margin-x-96__59z1P","adl-u-margin-y-96":"LoaderWrapper-module_adl-u-margin-y-96__bknST","adl-u-margin-0":"LoaderWrapper-module_adl-u-margin-0__or6Fk","adl-u-margin-bottom-0":"LoaderWrapper-module_adl-u-margin-bottom-0__cmq1i","adl-u-margin-left-0":"LoaderWrapper-module_adl-u-margin-left-0__sX7Nh","adl-u-margin-right-0":"LoaderWrapper-module_adl-u-margin-right-0__aXH-p","adl-u-margin-top-0":"LoaderWrapper-module_adl-u-margin-top-0__OKTAA","adl-u-margin-x-0":"LoaderWrapper-module_adl-u-margin-x-0__8WA3F","adl-u-margin-y-0":"LoaderWrapper-module_adl-u-margin-y-0__sTouw","adl-u-margin-auto":"LoaderWrapper-module_adl-u-margin-auto__me62z","adl-u-margin-bottom-auto":"LoaderWrapper-module_adl-u-margin-bottom-auto__0bABW","adl-u-margin-left-auto":"LoaderWrapper-module_adl-u-margin-left-auto__OadFh","adl-u-margin-right-auto":"LoaderWrapper-module_adl-u-margin-right-auto__Xb8T0","adl-u-margin-top-auto":"LoaderWrapper-module_adl-u-margin-top-auto__TwqvP","adl-u-margin-x-auto":"LoaderWrapper-module_adl-u-margin-x-auto__W49-q","adl-u-margin-y-auto":"LoaderWrapper-module_adl-u-margin-y-auto__FeR-W","adl-u-box-sizing-border-box":"LoaderWrapper-module_adl-u-box-sizing-border-box__ZRUhq","adl-u-pointer-events-none":"LoaderWrapper-module_adl-u-pointer-events-none__yOoe8","adl-u-pointer-events-auto":"LoaderWrapper-module_adl-u-pointer-events-auto__6ErlI","adl-u-font-size-small":"LoaderWrapper-module_adl-u-font-size-small__8I1Ev","adl-u-font-size-medium":"LoaderWrapper-module_adl-u-font-size-medium__kAt3Y","adl-u-font-size-large":"LoaderWrapper-module_adl-u-font-size-large__n2fD9","adl-u-font-size-xlarge":"LoaderWrapper-module_adl-u-font-size-xlarge__A4cW2","adl-u-font-size-xxlarge":"LoaderWrapper-module_adl-u-font-size-xxlarge__QyQ-A","adl-u-font-size-inherit":"LoaderWrapper-module_adl-u-font-size-inherit__lien5","adl-u-font-weight-thin":"LoaderWrapper-module_adl-u-font-weight-thin__w6-7j","adl-u-font-weight-regular":"LoaderWrapper-module_adl-u-font-weight-regular__81wC2","adl-u-font-weight-medium":"LoaderWrapper-module_adl-u-font-weight-medium__6Bkr1","adl-u-font-weight-semi-bold":"LoaderWrapper-module_adl-u-font-weight-semi-bold__-Km48","adl-u-white-space-normal":"LoaderWrapper-module_adl-u-white-space-normal__O-8hp","adl-u-white-space-nowrap":"LoaderWrapper-module_adl-u-white-space-nowrap__uNmHL","adl-u-white-space-pre-wrap":"LoaderWrapper-module_adl-u-white-space-pre-wrap__-jx-K","adl-u-truncate":"LoaderWrapper-module_adl-u-truncate__hSayP","adl-u-word-break-break-word":"LoaderWrapper-module_adl-u-word-break-break-word__HsHGC","adl-u-visibility-visible":"LoaderWrapper-module_adl-u-visibility-visible__SVpoI","adl-u-visibility-hidden":"LoaderWrapper-module_adl-u-visibility-hidden__zVbUT","adl-u-display-none":"LoaderWrapper-module_adl-u-display-none__DsSe9","adl-u-display-initial":"LoaderWrapper-module_adl-u-display-initial__Lhzvs","adl-u-display-inline":"LoaderWrapper-module_adl-u-display-inline__gIPuS","adl-u-display-inline-block":"LoaderWrapper-module_adl-u-display-inline-block__uubRw","adl-u-display-block":"LoaderWrapper-module_adl-u-display-block__YZiA1","adl-u-display-table":"LoaderWrapper-module_adl-u-display-table__LpAm0","adl-u-display-table-row":"LoaderWrapper-module_adl-u-display-table-row__tjyhl","adl-u-display-table-cell":"LoaderWrapper-module_adl-u-display-table-cell__2Adjd","adl-u-display-flex":"LoaderWrapper-module_adl-u-display-flex__St4mQ","adl-u-display-inline-flex":"LoaderWrapper-module_adl-u-display-inline-flex__X8P3U","adl-u-flex-direction-row":"LoaderWrapper-module_adl-u-flex-direction-row__qOVTd","adl-u-flex-direction-row-reverse":"LoaderWrapper-module_adl-u-flex-direction-row-reverse__eEbiO","adl-u-flex-direction-column":"LoaderWrapper-module_adl-u-flex-direction-column__134gh","adl-u-flex-direction-column-reverse":"LoaderWrapper-module_adl-u-flex-direction-column-reverse__VCrho","adl-u-flex-wrap-wrap":"LoaderWrapper-module_adl-u-flex-wrap-wrap__QVjdM","adl-u-flex-wrap-nowrap":"LoaderWrapper-module_adl-u-flex-wrap-nowrap__rAxpJ","adl-u-align-items-start":"LoaderWrapper-module_adl-u-align-items-start__Dvri5","adl-u-align-items-flex-start":"LoaderWrapper-module_adl-u-align-items-flex-start__IfSZJ","adl-u-align-items-flex-end":"LoaderWrapper-module_adl-u-align-items-flex-end__wLnjV","adl-u-align-items-center":"LoaderWrapper-module_adl-u-align-items-center__ncX4A","adl-u-align-items-stretch":"LoaderWrapper-module_adl-u-align-items-stretch__VVYwf","adl-u-align-items-baseline":"LoaderWrapper-module_adl-u-align-items-baseline__ptDF1","adl-u-align-items-end":"LoaderWrapper-module_adl-u-align-items-end__i2wqG","adl-u-justify-content-center":"LoaderWrapper-module_adl-u-justify-content-center__VzKQK","adl-u-justify-content-flex-start":"LoaderWrapper-module_adl-u-justify-content-flex-start__2GeaL","adl-u-justify-content-flex-end":"LoaderWrapper-module_adl-u-justify-content-flex-end__jX5a4","adl-u-justify-content-start":"LoaderWrapper-module_adl-u-justify-content-start__s19ps","adl-u-justify-content-end":"LoaderWrapper-module_adl-u-justify-content-end__WrpbG","adl-u-justify-content-left":"LoaderWrapper-module_adl-u-justify-content-left__UYl5j","adl-u-justify-content-right":"LoaderWrapper-module_adl-u-justify-content-right__Ulage","adl-u-justify-content-space-between":"LoaderWrapper-module_adl-u-justify-content-space-between__fHuEx","adl-u-justify-content-space-around":"LoaderWrapper-module_adl-u-justify-content-space-around__yuaBm","adl-u-justify-content-space-evenly":"LoaderWrapper-module_adl-u-justify-content-space-evenly__ZKme5","adl-u-justify-content-stretch":"LoaderWrapper-module_adl-u-justify-content-stretch__zRJxM","adl-u-flex-1":"LoaderWrapper-module_adl-u-flex-1__dnOHF","adl-u-width-full":"LoaderWrapper-module_adl-u-width-full__g4Hkw","adl-u-width-auto":"LoaderWrapper-module_adl-u-width-auto__3QMUT","adyen-kyc-loading-input__form":"LoaderWrapper-module_adyen-kyc-loading-input__form__chx-J","adyen-kyc-loading-input__form--loading-opacity0":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0__A2eC5","adyen-kyc-loading-input__form--loading-opacity0-1":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-1__CbgnO","adyen-kyc-loading-input__form--loading-opacity0-2":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-2__LdJOX","adyen-kyc-loading-input__form--loading-opacity0-3":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-3__S3Lav","adyen-kyc-loading-input__form--loading-opacity0-4":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-4__Nbbb9","adyen-kyc-loading-input__form--loading-opacity0-5":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-5__1alhE","adyen-kyc-loading-input__form--loading-opacity0-6":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-6__uicZA","adyen-kyc-loading-input__form--loading-opacity0-7":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-7__AgxAJ","adyen-kyc-loading-input__form--loading-opacity0-8":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-8__2gl9x","adyen-kyc-loading-input__form--loading-opacity0-9":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-9__acg2x","adyen-kyc-loading-input__form--loading-opacity1":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity1__kOcum","adyen-kyc-loading-input__loader":"LoaderWrapper-module_adyen-kyc-loading-input__loader__k4L0f","adyen-kyc-loading-input__loader--active":"LoaderWrapper-module_adyen-kyc-loading-input__loader--active__RLLLI"};const xu="success",Mu="loading";var Fu;!function(e){e.SUCCESS="success",e.LOADING="loading"}(Fu||(Fu={}));const Vu=({children:e,status:t,formOpacityWhenLoading:r=0,loaderSize:n="large",showSpinner:i=!0,className:o})=>{const s=`${r}`.split("."),l=s[0],d=s[1],c=a("adyen-kyc-loading-input__form",ju["adyen-kyc-loading-input__form"],{[ju[`adyen-kyc-loading-input__form--loading-opacity${d?`${l}-${d}`:`${l}`}`]]:t===Mu}),u=a({[ju["adyen-kyc-loading-input__loader"]]:!0,[ju["adyen-kyc-loading-input__loader--active"]]:t===Mu&&i}),m=a("adyen-kyc-loading-input",o);return R("div",Object.assign({className:m,style:{position:"relative"}},{children:[R("div",Object.assign({className:u},{children:R(Ze,{size:n})})),R("div",Object.assign({className:c},{children:e}))]}))},Uu=["typeOfIdentity","licenseCardNumber","issuerState"],Bu=["nationalIdNumber","passport","driversLicense","proofOfIdentityCard"],Wu=({availableIdentityTypes:e,selectedIdentityType:t,setSelectedIdentityType:a,formUtils:{getLabel:r},errorMessage:n,isValid:i})=>{const{i18n:o,commonProps:{showInlineErrors:s}}=We();return R(Ue,Object.assign({name:"typeOfIdentity",label:r("typeOfIdentity"),errorMessage:n,isValid:i},{children:[R("span",Object.assign({className:"adyen-kyc-helper-text"},{children:o.get("typeOfIdentitySubtitle")})),R(dt,{isInvalid:!1,items:e.map((e=>((e,t)=>({id:e,name:t}))(e,o.get(e)))),placeholder:o.get("id"),selected:t,onChange:e=>a(e.target.value),showInlineErrors:s})]}))},Hu=({passportNumber:e,onInput:t,onBlur:a,formUtils:{getLabel:r},errorMessage:n,isValid:i})=>{const{commonProps:{showInlineErrors:o}}=We();return R(Ue,Object.assign({name:"passportNumber",label:r("idNumber","passportNumber"),showInlineErrors:o,errorMessage:n,isValid:i},{children:R(Vt,{name:"passportNumber",value:e,onInput:t,onBlur:a,placeholder:"",showInlineErrors:o})}))},qu=({cardNumber:e,onInput:t,onBlur:a,formUtils:{getLabel:r},errorMessage:n,isValid:i})=>{const{commonProps:{showInlineErrors:o}}=We();return R(Ue,Object.assign({name:"cardNumber",label:r("idNumber","proofOfIdentityCardNumber"),showInlineErrors:o,errorMessage:n,isValid:i},{children:R(Vt,{name:"cardNumber",value:e,onInput:t,onBlur:a,placeholder:"",showInlineErrors:o})}))},Gu=({driversLicense:e,onIssuerStateChange:a,onLicenseNumberInput:r,onLicenseNumberBlur:n,onCardNumberInput:i,onCardNumberBlur:o,formUtils:{getLabel:s},isValid:l,errorMessages:d})=>{const{i18n:c,commonProps:{showInlineErrors:m}}=We(),{dataset:p}=ea(u("AU"));return R(t.Fragment,{children:[R(Ue,Object.assign({name:"issuerState",label:s("issuerState"),showInlineErrors:m,isValid:l.issuerState,errorMessage:d.issuerState},{children:R(dt,{onChange:a,isInvalid:!1,items:p,placeholder:c.get("selectState"),selected:e.issuerState})})),R("div",Object.assign({className:"adyen-kyc-field-wrapper"},{children:[R(Ue,Object.assign({name:"licenseNumber",label:s("idNumber","licenseNumber"),showInlineErrors:m,isValid:l.idNumber,errorMessage:d.idNumber},{children:R(Vt,{name:"licenseNumber",value:e.idNumber,onInput:r,onBlur:n,placeholder:"",showInlineErrors:m})})),R(Ue,Object.assign({name:"licenseCardNumber",label:s("licenseCardNumber"),showInlineErrors:m,isValid:l.licenseCardNumber,errorMessage:d.licenseCardNumber},{children:R(Vt,{name:"licenseCardNumber",value:e.licenseCardNumber,onInput:i,onBlur:o,placeholder:"",showInlineErrors:m})}))]})),R(ud,{page:"Personal details",title:c.get("whereCanIFindTheseNumbersOnMyDriversLicense"),content:R(t.Fragment,{children:[c.get("whereToFindNumbersOnDriversLicense"),"\xa0",R("a",Object.assign({href:"https://www.usi.gov.au/about/forms-id/drivers-licence",target:"_blank",rel:"noreferrer"},{children:c.get("iStillCantFindIt")}))]}),titleId:"whereCanIFindTheseNumbersOnMyDriversLicense",contentId:"whereToFindNumbersOnDriversLicense"})]})};const $u={validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"},Xu=/^[A-Z]{1,2}\d{7}$/,Yu=/^[A-Za-z\d]{6,10}$/,Ku=/^[A-Za-z\d]{6,10}$/,zu={typeOfIdentity:[$u],idNumber:[{validate:(e,t)=>{switch(t.state.data.typeOfIdentity){case"passport":return Xu.test(e);case"driversLicense":return Yu.test(e);case"proofOfIdentityCard":return Ku.test(e)}},errorMessage:(e,t)=>{switch(t.state.data.typeOfIdentity){case"passport":return"invalidFormatForAuPassportNumber";case"driversLicense":return"invalidFormatForAuDriversLicenseNumber";case"proofOfIdentityCard":return"invalidFormatForAuProofOfIdentityCardNumber"}},modes:["blur"]}],licenseCardNumber:[{validate:e=>Yu.test(e),errorMessage:"invalidFormatForAuDriversLicenseCardNumber",modes:["blur"]}],issuerState:[$u]};function Zu(e){var a;"nationalIdNumber"===(null===(a=e.data)||void 0===a?void 0:a.typeOfIdentity)&&(e.data.typeOfIdentity=void 0);const{handleChangeFor:r,triggerValidation:n,data:i,errors:o,fieldProblems:s,valid:l}=ua(Object.assign(Object.assign({},e),{schema:e.requiredFields,defaultData:e.data,fieldProblems:e.fieldValidationErrors,rules:zu}));de((()=>{i.typeOfIdentity&&n(["idNumber"])}),[n,i.typeOfIdentity]),this.triggerValidation=n;const{sliceData:d,updateStateSlice:c}=function(e,t){const{dispatch:a,getData:r}=Kd(),n=r()[e],i=pe((r=>a({type:"addToState",value:Object.assign(Object.assign({},r),{dataStoreId:e,caller:t})})),[e,t]);return{sliceData:n,updateStateSlice:pe(lt(i,200),[i])}}("personalDetails");de((()=>c({data:Object.assign(Object.assign({},d),i),errors:o,valid:l,fieldProblems:s})),[i,o,l,s]);const{i18n:u}=We(),m=ra(e,u);return R(t.Fragment,{children:[R(Wu,{availableIdentityTypes:Bu.filter((e=>"nationalIdNumber"!==e)),selectedIdentityType:i.typeOfIdentity,setSelectedIdentityType:r("typeOfIdentity"),formUtils:m,isValid:l.typeOfIdentity,errorMessage:m.getErrorMessage("typeOfIdentity",o,s)}),"passport"===i.typeOfIdentity?R(Hu,{passportNumber:i.idNumber,onInput:r("idNumber","input"),onBlur:r("idNumber","blur"),formUtils:m,isValid:l.idNumber,errorMessage:m.getErrorMessage("idNumber",o,s)}):"proofOfIdentityCard"===i.typeOfIdentity?R(qu,{cardNumber:i.idNumber,onInput:r("idNumber","input"),onBlur:r("idNumber","blur"),formUtils:m,isValid:l.idNumber,errorMessage:m.getErrorMessage("idNumber",o,s)}):"driversLicense"===i.typeOfIdentity?R(Gu,{driversLicense:i,onIssuerStateChange:r("issuerState"),onLicenseNumberInput:r("idNumber","input"),onLicenseNumberBlur:r("idNumber","blur"),onCardNumberInput:r("licenseCardNumber","input"),onCardNumberBlur:r("licenseCardNumber","blur"),formUtils:m,isValid:{idNumber:l.idNumber,licenseCardNumber:l.licenseCardNumber,issuerState:l.issuerState},errorMessages:{idNumber:m.getErrorMessage("idNumber",o,s),licenseCardNumber:m.getErrorMessage("licenseCardNumber",o,s),issuerState:m.getErrorMessage("issuerState",o,s)}}):void 0]})}const Qu=[...Uu,"idNumber"],Ju="1_316",em="1_3062",tm="1_30",am="4DigitSSN",rm="entireSSN",nm=ht(((e,t)=>{var a,r,n,i;const o=null===(a=e.formVerificationErrors)||void 0===a?void 0:a[tm],s=(null===(r=null==o?void 0:o[em])||void 0===r?void 0:r.some((e=>e.code===Ju)))||9===(null===(i=null===(n=e.data)||void 0===n?void 0:n.idNumber)||void 0===i?void 0:i.length)?rm:am;let l=Object.assign({},e);if(s===rm){const t={labels:Object.assign(Object.assign({},e.labels),{idNumber:"socialSecurityNumber9Digits"}),country:"US9",placeholders:Object.assign(Object.assign({},e.placeholders),{idNumber:"SSNFormatUS9Digits"})};l=Object.assign(Object.assign({},e),t)}return s===am&&(l.classNames=["us4DigitsNumberId"],l.dataPlaceholder="*** \u2014 ** \u2014 "),R(ou,Object.assign({},l,{ref:t}))})),im=[...zc,"birthDate",...nu,...Uu,"residencyCountry","jobTitle",...Eu,...Lu,...Ul,...Zl];function om(e){const{i18n:t,commonProps:a}=We(),{isSettingEnabled:r}=zl(),n=ue(null),o=ue(null),s=ue(null),l=ue(null),d=ue(null),c=ue(null),u=e.id,[m,p]=se(null),[g,y]=se(xu),b=ue({setState:null}),[f,h]=se(null),v=e.taskType===Cl.DECISION_MAKER||e.taskType===Cl.TRUST_MEMBER_COMPANY_OWNER,_=(e.requiredFields||im).filter((e=>"role"!==e||"role"===e&&v)),N=r("editPrefilledCountry"),O=r("enableTrustFlow"),I=()=>_.filter((e=>["birthDate","residencyCountry","jobTitle"].includes(e))),{handleChangeFor:E,data:T,valid:A,errors:S,triggerValidation:C,fieldProblems:D}=ua(Object.assign(Object.assign({},e),{schema:I(),defaultData:e.data,rules:e.validators||su,fieldProblems:null==e?void 0:e.fieldValidationErrors})),k=ra(e,t),{hasFieldsToVerify:L,verifyFields:w}=function(e,t){const{loadingContext:a,clientKey:r}=We();return{hasFieldsToVerify:!!(null==e?void 0:e.length),verifyFields:pe((n=>i(this,void 0,void 0,(function*(){const i=[];return e.map((e=>{if("idNumber"===e&&n.data[e]){if("US"===t&&4===n.data[e].length)return;const o=du(n,t,{loadingContext:a,clientKey:r});i.push(o)}})),Promise.all(i)}))),[e,t])}}(e.verifyFields,T.residencyCountry);this.triggerValidation=()=>{C(I()),v&&n.current.triggerValidation(),B(j)&&o.current.triggerValidation(),B(x)&&s.current.triggerValidation(),B(F)&&l.current.triggerValidation(),O&&B(V)&&d.current.triggerValidation(),B(U)&&c.current.triggerValidation()},this.verifyForm=()=>{if(!L)return Promise.resolve(!0);const e=performance.now();return y(Mu),new Promise((t=>{w({data:f}).then((a=>{const r=a.every((e=>"verified"===e.status)),n=performance.now(),i=Math.floor(n-e);if(i<400?setTimeout((()=>{y(xu),t(r)}),400-i):(y(xu),t(r)),!r){const e=Object.assign({},m);a.forEach((t=>{"error"===t.status&&(e[t.fieldName]={isValid:!1,errorMessage:t.translationKey})})),p(Object.assign(Object.assign({},m),e))}}))}))},de((()=>{b.current.setState({type:"addToState",value:{data:T,valid:A,errors:S,fieldProblems:D,caller:u,dataStoreId:u,schema:_}})}),[T,A,S]);const P=Dl(e,Eu),j=Dl(e,zc),x=Dl(e,nu),M=Dl(e,Qu),F=Dl(e,Lu),V=Dl(e,Ul),U=Dl(e,Zl),B=e=>!!e.requiredFields.length;return R(Vu,Object.assign({status:g,formOpacityWhenLoading:.3,loaderSize:"large"},{children:[R(Ys,{owner:u,stateRef:b}),R(Yd,{owner:u,onChange:({currentState:e,changeInitiatedBy:t})=>{var a,r;t===u&&(!(null===(r=null===(a=e.errors)||void 0===a?void 0:a[u])||void 0===r?void 0:r.idNumber)&&(null==m?void 0:m.idNumber)&&delete m.idNumber,this.isValid=e.validityByForm[u],h(e.data[u]))}}),R("form",Object.assign({className:"adyen-kyc-individual__personal-details","aria-describedby":a.showInlineErrors?null:"ariaErrorField"},{children:[R(Ms,{heading:e.heading}),R(qc,{verificationErrors:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:k,id:"ariaErrorField"}),"US"!==T.residencyCountry||v?void 0:R(rc,{}),R(ud,{page:"Personal details",title:t.get("whyDoINeedToFillInThisInformation"),content:t.get("reasonForFillingIndividualPersonalDetails"),titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingIndividualPersonalDetails"}),v&&R(Tu,Object.assign({},P,{ref:n,taskType:e.taskType,dataStoreId:u,allowedRoles:null==e?void 0:e.allowedRoles})),B(j)&&R(Qc,Object.assign({},j,{ref:o,dataStoreId:u})),k.isRequiredField("birthDate")&&R(Ue,Object.assign({name:"birthDate",label:k.getLabel("birthDate"),classNameModifiers:["birthDate"],errorMessage:k.getErrorMessage("birthDate",S,D),isValid:A.birthDate,showInlineErrors:a.showInlineErrors},{children:Jt("date",{name:"birthDate",value:T.birthDate,placeholder:t.get("birthDatePlaceholder"),readonly:k.isReadOnly("birthDate"),onInput:E("birthDate","input"),onBlur:E("birthDate","blur"),"aria-required":!0,"aria-label":k.getLabel("birthDate"),"aria-invalid":!A.birthDate,showInlineErrors:a.showInlineErrors,max:(W=new Date,W.toJSON().slice(0,10))})})),k.isRequiredField("residencyCountry")&&R(aa,{label:k.getLabel("residencyCountry"),allowedCountries:[],classNameModifiers:["country"],errorMessage:k.getErrorMessage("residencyCountry",S,D),onDropdownChange:E("residencyCountry","input"),value:T.residencyCountry,readOnly:!N&&!v}),B(x)&&("AU"===T.residencyCountry?R(Zu,Object.assign({},M,{ref:s,dataStoreId:u})):"US"===T.residencyCountry?R(nm,Object.assign({},x,{errors:m,dataStoreId:u,country:T.residencyCountry,formVerificationErrors:e.formVerificationErrors})):R(ou,Object.assign({},x,{ref:s,errors:m,country:T.residencyCountry,dataStoreId:u}))),B(F)&&R(Pu,Object.assign({},F,{ref:l,dataStoreId:u,country:T.residencyCountry})),k.isRequiredField("jobTitle",!1)&&R(Ue,Object.assign({name:"jobTitle",label:k.getLabel("jobTitle"),classNameModifiers:["jobTitle"],errorMessage:k.getErrorMessage("jobTitle",S,D)},{children:Jt("text",{name:"jobTitle",value:T.jobTitle,placeholder:k.getPlaceholder("jobTitle"),readonly:k.isReadOnly("jobTitle"),onInput:E("jobTitle","input"),onBlur:E("jobTitle","blur"),"aria-required":!0,"aria-label":k.getLabel("jobTitle"),"aria-invalid":!A.birthDate})})),O&&k.isRequiredField("isPartOfTrust",!1)&&R(Bl,Object.assign({},V,{legalEntityType:il.INDIVIDUAL,ref:d,dataStoreId:u,isReadOnlyOnDefaultDataYes:!0})),k.isRequiredField("accountHolder")&&R(ed,Object.assign({},U,{ref:c,country:T.residencyCountry,dataStoreId:u}))]}))]}));var W}var sm;!function(e){e.PASSPORT="passport",e.DRIVING_LICENCE="driving_licence",e.NATIONAL_IDENTITY_CARD="national_identity_card",e.RESIDENCE_PERMIT="residence_permit"}(sm||(sm={}));const lm=[{id:cc.DRIVERS_LICENSE,name:"driversLicense",hasBackPage:!0},{id:cc.PASSPORT,name:"passport",hasBackPage:!1},{id:cc.IDENTITY_CARD,name:"id",hasBackPage:!0}],dm=[{id:sm.DRIVING_LICENCE,name:"driversLicense",hasBackPage:!0},{id:sm.NATIONAL_IDENTITY_CARD,name:"id",hasBackPage:!0},{id:sm.PASSPORT,name:"passport",hasBackPage:!1}],cm={},um=lm.map((e=>e.id));let mm,pm,gm;const ym=(e,t,a)=>(mm&&pm&&gm||(mm=t,pm=a,gm=e),{fetchDocuments:bm,fetchDocument:fm,uploadDocuments:hm}),bm=(e,t)=>i(void 0,void 0,void 0,(function*(){const a=[];null==e||e.forEach((e=>{a.push(fm(e,t))}));return(yield Promise.all(a)).forEach((e=>{var t;const a=null===(t=null==e?void 0:e.owner)||void 0===t?void 0:t.id;a&&(cm[a]=cm[a]||[],cm[a].push(e))})),cm[t]})),fm=(e,t)=>i(void 0,void 0,void 0,(function*(){return mm(e,t)})),hm=(e,t)=>i(void 0,void 0,void 0,(function*(){const a=[];e.forEach((e=>{if(Im(e,t)){if(Em(e,t)){const r=_m(t,e.type).id;a.push(pm(e,r,t))}}else a.push(gm(e,t))}));const r=yield Promise.all(a);return vm(r,t),cm[t]})),vm=(e,t)=>{cm[t]||(cm[t]=[]),e.forEach((e=>{if(e){const a=cm[t].findIndex((t=>t.id===e.id));a>-1?cm[t][a]=e:cm[t].push(e)}}))},_m=(e,t)=>{var a;return null===(a=cm[e])||void 0===a?void 0:a.find((e=>e.type===t&&Tm(e)))},Nm=({entityId:e,entityType:t,documentType:a,page1:r,page2:n=null,description:o=null})=>i(void 0,void 0,void 0,(function*(){const i=[Am(r),Am(n)].filter(Boolean),[s,l]=yield Promise.all(i),d=r&&n;if(s)return{owner:{id:e,type:t},type:a,description:o||`Document type: ${a}`,attachments:[Om(s,null==r?void 0:r.name,d?"front":null),Om(l,null==n?void 0:n.name,d?"back":null)].filter(Boolean)}})),Om=(e,t,a="")=>e&&Object.assign({content:e,pageName:t},a&&{pageType:a}),Im=(e,t)=>{const a=cm[t];return!!(null==a?void 0:a.length)&&a.some((t=>t.type===e.type))},Em=(e,t)=>{const a=_m(t,e.type);return!a||a.attachments.some(((t,a)=>{var r;return t.content!==(null===(r=null==e?void 0:e.attachments[a])||void 0===r?void 0:r.content)}))},Tm=e=>!!e,Am=e=>new Promise(((t,a)=>{if(!(e&&e instanceof Blob))return void t(null);const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{const e=r.result.toString().split(";base64,")[1];t(e)},r.onerror=e=>a(e)})),Sm=e=>e.split(".").pop();var Cm;!function(e){e.DEFINED_BENEFICIARY="definedBeneficiary",e.PROTECTOR="protector",e.SECONDARY_TRUSTEE="secondaryTrustee",e.SETTLOR="settlor",e.UBO_THROUGH_OWNERSHIP="uboThroughOwnership"}(Cm||(Cm={}));const Rm={[Cm.DEFINED_BENEFICIARY]:{min:1},[Cm.SETTLOR]:{min:1}},Dm=e=>{var t;return null===(t=null==e?void 0:e.entityAssociations)||void 0===t?void 0:t.some((t=>t.entityType===il.TRUST&&t.associatorId===e.id))},km=e=>Dm(e)?Ml.IS_PART_OF_TRUST:Ml.IS_NOT_PART_OF_TRUST,Lm=e=>{var t;return null===(t=Fl.find((t=>t.id===e)))||void 0===t?void 0:t.name},wm=e=>{if(null==e?void 0:e.entityAssociations){const t=Object.values(Cm);return e.entityAssociations.filter((a=>t.includes(a.type)&&a.associatorId===e.id))}return[]},Pm=e=>{var t;return null===(t=wm(e))||void 0===t?void 0:t.map((e=>e.legalEntityId))},jm=e=>{var t,a;return null===(a=null===(t=null==e?void 0:e.entityAssociations)||void 0===t?void 0:t.find((t=>t.entityType===il.TRUST&&t.associatorId===e.id)))||void 0===a?void 0:a.legalEntityId},xm=e=>{const t=jm(e);return t?[t]:[]},Mm=(e,t)=>{var a;const r=jm(e);if(r)return null===(a=null==t?void 0:t.LegalEntity)||void 0===a?void 0:a[r]},Fm=e=>{const t=(e=>wm(e).reduce(((e,t)=>{var a;return e[t.type]=(null!==(a=e[t.type])&&void 0!==a?a:0)+1,e}),{}))(e);return Object.entries(Rm).every((([e,a])=>{var r;return!a.min||(null!==(r=null==t?void 0:t[e])&&void 0!==r?r:0>=a.min)}))},Vm=(e,t)=>Object.values(Um).filter((e=>0===(null==t?void 0:t.length)||(null==t?void 0:t.includes(e.id)))).map((t=>Object.assign(Object.assign({},t),{name:e.get(t.name),description:e.get(t.description)}))),Um={[Cm.DEFINED_BENEFICIARY]:{id:Cm.DEFINED_BENEFICIARY,name:"beneficiary",description:"beneficialOwnersOfTrustProperty",className:"adl-tag--light-blue"},[Cm.PROTECTOR]:{id:Cm.PROTECTOR,name:"protector",description:"personAppointmentUnderTrustInstrument",className:"adl-tag--green"},[Cm.SECONDARY_TRUSTEE]:{id:Cm.SECONDARY_TRUSTEE,name:"trustee",description:"legalOwnerOfProperty",className:"adl-tag--purple"},[Cm.SETTLOR]:{id:Cm.SETTLOR,name:"settlor",description:"entityEstablishingTrust",className:"adl-tag--teal"},[Cm.UBO_THROUGH_OWNERSHIP]:{id:Cm.UBO_THROUGH_OWNERSHIP,name:"ultimateBeneficialOwner",description:"entityOwning25OrMoreOfTrust",className:"adl-tag--basic"}},Bm={US:"EIN",AU:"ABN"},Wm=({taxId:e,country:t,exemptedFromTax:a=!1,entity:r})=>{var n,i;const o=W(r),s=null!==(i=null===(n=r.taxInformation)||void 0===n?void 0:n.reduce(((e,t)=>(e[t.country]=t,e)),{}))&&void 0!==i?i:{};return a?delete s[t]:s[t]={country:t,type:Bm[t],number:e},o.taxInformation=Object.values(s),"US"===t&&(o.vatNumber="",o.registrationNumber=""),o},Hm=Object.assign(Object.assign({},Um),Iu),qm=e=>{var t;return null===(t=Hm[e])||void 0===t?void 0:t.className},Gm=e=>{var t;return null===(t=Hm[e])||void 0===t?void 0:t.name},$m=e=>(null==e?void 0:e.entityAssociations)?e.entityAssociations.filter((t=>t.associatorId===e.id)):[],Xm=e=>$m(e).filter((e=>e.entityType===il.SOLE_PROPRIETORSHIP)).map((e=>e.legalEntityId)),Ym=e=>{var t;return null===(t=null==e?void 0:e.entityAssociations)||void 0===t?void 0:t.some((t=>t.entityType===il.SOLE_PROPRIETORSHIP&&t.associatorId===e.id))},Km=(e,t)=>{var a;const r=Xm(e)[0];if(r)return null===(a=null==t?void 0:t.LegalEntity)||void 0===a?void 0:a[r]};var zm;!function(e){e.VALID="valid",e.PENDING="pending",e.INVALID="invalid",e.REJECTED="rejected"}(zm||(zm={}));const Zm=(e,t,a,r)=>{if(!(null==r?void 0:r.length)||!ep(a))return Sl.EMPTY;const n=function(e,t,a){if(!(null==t?void 0:t[e]))return;const r=Object.entries(t[e]).filter((([e])=>a.includes(e))).map((([,e])=>e.status)).filter((e=>Qm.includes(e)));if(!r.length)return;return r.reduce(((e,t)=>t>e?t:e))}(e,t,r);return n||(!r.includes(a.id)||Jm(a)?Sl.PROCESSING:Sl.FINISHED)},Qm=[Sl.DETAILS_REQUIRED,Sl.DOWNLOAD,Sl.ERROR];const Jm=e=>{var t;return Object.values(null!==(t=e.capabilities)&&void 0!==t?t:{}).some((e=>"pending"===e.verificationStatus))};function ep(e){if(!(null==e?void 0:e.type))return!1;switch(e.type){case il.ORGANIZATION:return tp(e);case il.INDIVIDUAL:return ap(e);case il.TRUST:return rp(e);case il.SOLE_PROPRIETORSHIP:return np(e)}}const tp=e=>{var t,a,r;return Boolean((null===(t=e.organization)||void 0===t?void 0:t.legalName)&&(null===(a=e.organization)||void 0===a?void 0:a.type)&&ip(null===(r=e.organization)||void 0===r?void 0:r.registeredAddress))},ap=e=>{var t,a;return Boolean((null===(t=e.individual)||void 0===t?void 0:t.name)&&ip(null===(a=e.individual)||void 0===a?void 0:a.residentialAddress))},rp=e=>{var t,a;return Boolean((null===(t=e.trust)||void 0===t?void 0:t.name)&&ip(null===(a=e.trust)||void 0===a?void 0:a.registeredAddress))},np=e=>{var t,a;return Boolean((null===(t=e.soleProprietorship)||void 0===t?void 0:t.name)&&ip(null===(a=e.soleProprietorship)||void 0===a?void 0:a.registeredAddress))},ip=e=>e&&Object.entries(e).some((([e,t])=>"country"!==e&&Boolean(t))),op=[{id:Wl.MY_NAME,name:"myName",description:"myNameDescription",type:il.INDIVIDUAL},{id:Wl.MY_SOLE_TRADER_NAME,name:"mySoleTraderName",description:"mySoleTraderNameDescription",type:il.SOLE_PROPRIETORSHIP},{id:Wl.THE_COMPANY_I_WORK_FOR,name:"theCompanyIWorkFor",description:"theCompanyIWorkForDescription",type:il.ORGANIZATION}];op.filter((e=>e.id!==Wl.MY_SOLE_TRADER_NAME));const sp=(e,t=!1)=>{var a;return Ym(e)?Wl.MY_SOLE_TRADER_NAME:t||ep(e)?null===(a=op.find((({type:t})=>t===e.type)))||void 0===a?void 0:a.id:void 0},lp=e=>{var t;const a=Object.assign({},hp(e,cl));return a.type=il.INDIVIDUAL,a.individual.identificationData=dp(e.personalDetails,a.individual.identificationData),(null===(t=a.individual.phone)||void 0===t?void 0:t.number)?a.individual.phone.type="mobile":delete a.individual.phone,a},dp=(e,t)=>{var a,r;if(void 0!==e.idNumber||void 0!==e.idNumberExempt)return Object.assign(Object.assign({},t),{nationalIdExempt:null!==(a=t.nationalIdExempt)&&void 0!==a?a:!e.idNumber,type:null!==(r=e.typeOfIdentity)&&void 0!==r?r:"nationalIdNumber"})},cp=({data:e,legalEntity:t})=>{const a=hp(e,hl);return a.legalEntityId=t.id,a.type=ol.BANK_ACCOUNT,a},up=(e,t)=>{let a=hp(e,dl);return a=Object.assign(Object.assign({},a),{personalDetails:Object.assign(Object.assign(Object.assign({},null==a?void 0:a.personalDetails),t&&{firstName:"",lastName:""}),{isPartOfTrust:km(e),accountHolder:sp(e,t)})}),a},mp=(e,t)=>{var a,r;let n;if(null==e?void 0:e.organization){n=hp(e,yl),(null===(a=e.organization)||void 0===a?void 0:a.principalPlaceOfBusiness)?n.companyRegistrationDetails.operationalAddressIsSame=rd.OPERATIONAL_ADDRESS_IS_NOT_SAME:(n.companyRegistrationDetails||(n.companyRegistrationDetails={}),n.companyRegistrationDetails.operationalAddressIsSame=rd.OPERATIONAL_ADDRESS_IS_SAME);const{taxInformation:t=[]}=e.organization;if(t.length){const{country:a}=e.organization.registeredAddress;n.companyDetails.taxId=null===(r=t.find((e=>e.country===a)))||void 0===r?void 0:r.number}}return n=Object.assign(Object.assign({},n),{companyType:Object.assign(Object.assign({},null==n?void 0:n.companyType),{isPartOfTrust:km(e),accountHolder:sp(e,t)})}),n},pp=e=>{const t=Object.assign({},hp(e,bl));return t.organization.vatAbsenceReason&&(t.organization.vatNumber=""),e.companyDetails.taxId&&(t.organization=Wm({taxId:e.companyDetails.taxId,country:e.companyNameAndCountry.companyCountry,entity:t.organization})),t.type=il.ORGANIZATION,t},gp=(e,t)=>i(void 0,void 0,void 0,(function*(){var a,r,n,i;if(e){const{idDocument:o,proofOfNationalId:s,proofOfResidence:l}=e,d="legalEntity";return(yield Promise.all([Nm({entityId:t,entityType:d,documentType:null==o?void 0:o.idDocumentType,page1:null===(a=null==o?void 0:o.idFrontPage)||void 0===a?void 0:a[0],page2:null===(r=null==o?void 0:o.idBackPage)||void 0===r?void 0:r[0]}),Nm({entityId:t,entityType:d,documentType:cc.PROOF_OF_NATIONAL_ID_NUMBER,page1:null===(n=null==s?void 0:s.proofOfNationalId)||void 0===n?void 0:n[0]}),Nm({entityId:t,entityType:d,documentType:cc.PROOF_OF_RESIDENCY,page1:null===(i=null==l?void 0:l.proofOfResidence)||void 0===i?void 0:i[0]})])).filter(Boolean)}})),yp=e=>{const t=(e=>{var t;return null===(t=cm[e])||void 0===t?void 0:t.find((e=>um.includes(e.type)&&Tm(e)))})(e)||null,a=_m(e,cc.PROOF_OF_RESIDENCY)||null,r=_m(e,cc.PROOF_OF_NATIONAL_ID_NUMBER)||null;return{idDocument:Object.assign(Object.assign(Object.assign({},(null==t?void 0:t.attachments[0])?{idFrontPage:[{name:Op(t,0)}]}:{}),(null==t?void 0:t.attachments[1])?{idBackPage:[{name:Op(t,1)}]}:{}),{idDocumentType:null==t?void 0:t.type}),proofOfResidence:a?[{name:Op(a)}]:null,proofOfNationalId:r?[{name:Op(r)}]:null}},bp=(e,t)=>i(void 0,void 0,void 0,(function*(){const{companyRegistrationDocument:{registrationDocument:a},companyTaxDocument:{taxDocument:r}}=e,n="legalEntity";return(yield Promise.all([Nm({entityId:t,entityType:n,documentType:cc.REGISTRATION_DOCUMENT,page1:null==a?void 0:a[0]}),Nm({entityId:t,entityType:n,documentType:cc.VAT_DOCUMENT,page1:null==r?void 0:r[0]})])).filter(Boolean)})),fp=(e,t)=>i(void 0,void 0,void 0,(function*(){const{payoutAccountDocuments:a={}}=e,{bankStatementDocument:r,description:n}=a,i=ol.BANK_ACCOUNT;return(yield Promise.all([Nm({entityId:t,entityType:i,documentType:cc.BANK_STATEMENT,page1:null==r?void 0:r[0],description:n})])).filter(Boolean)})),hp=(e,t)=>{if(e){const a={};return Object.entries(t).forEach((([t,r])=>{const n=Ip(e,r);void 0!==n&&vp(t,a,n)})),a}return null};function vp(e,t,a){const r=e.split("."),n=r.length;let i=t;r.forEach((function(e,t){t===n-1?i[e]=a:(i[e]||(i[e]={}),i=i[e])}))}const _p=e=>{const t=Object.assign({},hp(e,Tl));return t.soleProprietorship.vatAbsenceReason&&(t.soleProprietorship.vatNumber=""),e.solePropRegistrationDetails.taxId&&(t.soleProprietorship=Wm({taxId:e.solePropRegistrationDetails.taxId,exemptedFromTax:e.solePropRegistrationDetails.exemptedFromTax,country:e.solePropNameAndCountry.companyCountry,entity:t.soleProprietorship})),e.solePropRegistrationDetails.exemptedFromRegistrationNumber&&(t.soleProprietorship.registrationNumber=""),t.type=il.SOLE_PROPRIETORSHIP,t},Np=(e,t)=>i(void 0,void 0,void 0,(function*(){var a;const r=null===(a=null==e?void 0:e.solePropConstitutionalDocument)||void 0===a?void 0:a.constitutionalDocument;return(yield Promise.all([Nm({entityId:t,entityType:"legalEntity",documentType:cc.CONSTITUTIONAL_DOCUMENT,page1:null==r?void 0:r[0]})])).filter(Boolean)})),Op=(e,t=0)=>{var a;return(null===(a=null==e?void 0:e.attachments)||void 0===a?void 0:a[t].pageName)||null};function Ip(e,t){return t.split(".").reduce(((e,t)=>e&&void 0!==e[t]?e[t]:void 0),e)}function Ep(e){const{userDetails:t,handleGetIdVerificationToken:a,onIdVerificationClose:r,onIdVerificationError:n,onIdVerificationComplete:o}=e,s="adyen-kyc-id-verification";let l=null;const d=e=>i(this,void 0,void 0,(function*(){const{init:t}=yield import("onfido-sdk-ui");try{l=t({token:e,containerId:s,disableAnalytics:!0,useModal:!1,isModalOpen:!1,onUserExit:r,onComplete:o,steps:[{type:"document",options:{documentTypes:{[sm.PASSPORT]:!0,[sm.DRIVING_LICENCE]:!0,[sm.NATIONAL_IDENTITY_CARD]:!0,[sm.RESIDENCE_PERMIT]:!1}}}]})}catch(e){n(e)}}));return de((()=>((()=>{i(this,void 0,void 0,(function*(){try{const{firstName:e,lastName:r,residencyCountry:n}=t,i={name:{firstName:e,lastName:r},country:n,origin:`${window.location.origin}/*`},{sdkToken:o}=yield a("",i);d(o)}catch(e){n(e)}}))})(),()=>{l&&l.tearDown()})),[]),R("div",{id:s,className:s})}function Tp(e){const{i18n:a}=We();return R(t.Fragment,{children:[R(Ms,{heading:a.get("documentVerification")}),R("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("weNeedToSeeAGovermentIssuedPhotoId")]})),R("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("acceptedIdDocuments")]})),R(vc,Object.assign({className:"adyen-kyc-document-upload__requirements"},{children:[R(hc,{children:a.get("passport")}),R(hc,{children:a.get("identityCard")}),R(hc,{children:a.get("driversLicense")})]})),R("button",Object.assign({className:"adl-link",title:a.get("navigateToManualUpload"),type:"button",onClick:()=>{e.setShowManualUpload(!0)}},{children:a.get("IDontHaveAnIdDocumentAvailable")})),R("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("weTakeYourSecurityVerySeriously")]}))]})}const Ap={idDocumentType:{validate:e=>!!e,errorMessage:"fieldIsRequired",modes:["blur","input"]},instantIdVerificationData:{validate:e=>!!e,errorMessage:"fieldIsRequired",modes:["blur","input"]}};const Sp=yt((function(e){var a;const{i18n:r}=We(),n=ue(null),i=ue(null),[o,s]=se({}),[l,d]=se({}),[c,u]=se(!1),m=ue({setState:null}),p=!((null==e?void 0:e.formVerificationErrors)&&0===(null===(a=Object.keys(null==e?void 0:e.formVerificationErrors))||void 0===a?void 0:a.length)),g=["instantIdVerificationData"],{data:y,valid:b,errors:f,isValid:h,triggerValidation:v,fieldProblems:_,handleChangeFor:N,setData:O,setValid:I}=ua(Object.assign(Object.assign({},e),{schema:e.showIdVerification?g:["idDocumentType"],defaultData:e.data,rules:p?null==e?void 0:e.validators:Ap,fieldProblems:null==e?void 0:e.fieldValidationErrors}));de((()=>{var t,a,r,n;(null===(t=e.data)||void 0===t?void 0:t.idDocumentType)&&!c?(O("idDocumentType",null===(a=e.data)||void 0===a?void 0:a.idDocumentType),s({idFrontPage:null===(r=e.data)||void 0===r?void 0:r.idFrontPage}),d({idBackPage:null===(n=e.data)||void 0===n?void 0:n.idBackPage}),v()):p&&this.triggerValidation()}),[e.data]);const E=e=>{var t;if(e)return null===(t=lm.find((({id:t})=>e===t)))||void 0===t?void 0:t.hasBackPage},T=ra(e,r),A=!!y.idDocumentType,S=E(y.idDocumentType),C=["idDocumentType",...A?["idFrontPage"]:[],...S?["idBackPage"]:[]];this.triggerValidation=()=>{var e,t;v(),null===(e=null==n?void 0:n.current)||void 0===e||e.triggerValidation(),S&&(null===(t=null==i?void 0:i.current)||void 0===t||t.triggerValidation())},de((()=>{m.current.setState({type:"addToState",value:{data:y,valid:b,errors:f,fieldProblems:_,caller:"idDocument",dataStoreId:e.id,schema:e.showIdVerification?g:e.showManualUpload?C:["idDocumentType"]}})}),[y,b,f,h]);const D=(a=!1)=>R(t.Fragment,{children:[R(Ms,{heading:r.get("idDocument")}),R(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:T,id:"ariaErrorField"}),R("div",{className:"adyen-kyc-document-upload__subtitle",dangerouslySetInnerHTML:{__html:r.get("idUploadDocumentSubtitle",{values:{name:e.name}})}}),!a&&R("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[R("span",{children:[r.get("doYouHaveTheIdDocumentByHand"),"\xa0"]}),R("button",Object.assign({className:"adl-link adl-u-margin-bottom-16",title:r.get("navigateToInstantVerification"),type:"button",onClick:()=>{e.setShowManualUpload(!1),e.setShowIdVerification(!0)}},{children:r.get("goThroughInstantVerification")}))]})),R(Ue,Object.assign({name:"idDocumentType",label:r.get("selectDocumentType"),errorMessage:f.idDocumentType?r.get(f.idDocumentType.errorMessage):null,isValid:b.idDocumentType},{children:Jt("select",{onChange:N("idDocumentType","input"),name:"idDocumentType",placeholder:r.get("selectDocument"),selected:y.idDocumentType,items:lm.map((({id:e,name:t})=>({id:e,name:r.get(t)})))})})),R("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",r.get("requirements")]})),R(vc,Object.assign({className:"adyen-kyc-document-upload__requirements"},{children:[R(hc,{children:r.get("documentNotExpiredOrDamaged")}),E(y.idDocumentType)?R(hc,{children:r.get("includeFrontAndBack")}):R(hc,{children:r.get("providePageWithPhotoAndCode")}),R(hc,{children:r.get("fullDocumentVisible")}),R(hc,{children:r.get("imagesInColor")})]})),A&&R(mc,{type:y.idDocumentType,className:"adl-u-margin-y-16"}),A&&R(bc,{name:"idFrontPage",label:r.get("frontPage"),ref:n,defaultData:o,id:e.id,isOptional:p,iconPrefix:uc(y.idDocumentType,!0,!0)}),A&&S&&R("div",Object.assign({className:"adl-u-margin-top-16"},{children:R(bc,{name:"idBackPage",label:r.get("backPage"),ref:i,defaultData:l,id:e.id,isOptional:p,iconPrefix:uc(y.idDocumentType,!0,!1)})}))]}),k=e=>{O("instantIdVerificationData",e),I("instantIdVerificationData",!0)};return R("div",Object.assign({className:"adl-individual-document-upload adl-individual-document-upload--idDocument"},{children:[R(Yd,{onChange:({currentState:t,prevState:a,changeInitiatedBy:r})=>{var n,i,o,l,c,u,m,p;if("idDocument"===r&&(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.idDocument.idDocumentType)!==(null===(o=null===(i=null==a?void 0:a.data)||void 0===i?void 0:i.idDocument)||void 0===o?void 0:o.idDocumentType)){const a=null===(l=t.data)||void 0===l?void 0:l.idDocument,r=_m(e.legalEntityId,null==a?void 0:a.idDocumentType),n=(null===(c=null==a?void 0:a.idFrontPage)||void 0===c?void 0:c[0])instanceof File,i=(null===(u=null==a?void 0:a.idBackPage)||void 0===u?void 0:u[0])instanceof File;r?(!n&&(null===(m=r.attachments)||void 0===m?void 0:m[0])&&s({idFrontPage:[{name:Op(r,0)}]}),!i&&(null===(p=r.attachments)||void 0===p?void 0:p[1])&&d({idBackPage:[{name:Op(r,1)}]})):(n||s({idFrontPage:null}),i||d({idBackPage:null}))}}}),R(Ys,{stateRef:m}),(()=>{var a;return e.handleGetIdVerificationToken?!(null===(a=e.data)||void 0===a?void 0:a.idDocumentType)&&!e.data.instantIdVerificationData||c?e.showManualUpload||e.showIdVerification?!e.showManualUpload&&e.showIdVerification?R(t.Fragment,{children:[R(Ep,{handleGetIdVerificationToken:e.handleGetIdVerificationToken,name:e.name,userDetails:e.userDetails,onIdVerificationComplete:e=>k(e),onIdVerificationError:e=>console.error(e)}),R("div",Object.assign({className:"adyen-kyc-document-upload__manual-upload"},{children:[r.get("canNotCompleteInstantVerification"),"\xa0",R("button",Object.assign({className:"adl-link",title:r.get("goBackAndProvideDocumentScans"),type:"button",onClick:()=>{e.setShowManualUpload(!1),e.setShowIdVerification(!1)}},{children:r.get("goBackAndProvideDocumentScans")}))]}))]}):D():R(Tp,{setShowManualUpload:e.setShowManualUpload}):R(t.Fragment,{children:[R(Ms,{heading:r.get("documentVerification")}),R(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:T,id:"ariaErrorField"}),R("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:r.get("youHaveSuccessfullyProvidedTheIdDocument")})),R("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[R("span",{children:[r.get("madeAMistake"),"\xa0"]}),R("button",Object.assign({className:"adl-link",title:r.get("submitIdDocumentsAgain"),type:"button",onClick:()=>{u(!0),e.setShowManualUpload(!1),e.setShowIdVerification(!1),O("idDocumentType",void 0),I("idDocumentType",!1)}},{children:r.get("submitIdDocumentsAgain")}))]}))]}):(e.setShowManualUpload(!0),D(!0))})()]}))}),((e,t)=>B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name&&e.showIdVerification===t.showIdVerification&&e.showManualUpload===t.showManualUpload));var Cp;!function(e){e.BANK_STATEMENT="bankStatement",e.UTILITY_BILL="utilityBill",e.GOVERNMENT_ISSUED_CORRESPONDENCE="governmentIssuedCorrespondence",e.TAXATION_DOCUMENT="taxationDocument",e.EXTRACT_FROM_MUNICIPAL_PERSONAL_RECORDS_DATABASE="extractFromMunicipalPersonalRecordsDatabase",e.SALARY_SLIP="salarySlip",e.MORTGAGE_STATEMENT="mortgageStatement",e.CERTIFICATE_OF_VOTER_REGISTRATION="certificateOfVoterRegistration"}(Cp||(Cp={}));const Rp=[{id:Cp.BANK_STATEMENT,name:"bankStatement"},{id:Cp.UTILITY_BILL,name:"utilityBill"},{id:Cp.GOVERNMENT_ISSUED_CORRESPONDENCE,name:"governmentIssuedCorrespondence"},{id:Cp.TAXATION_DOCUMENT,name:"taxationDocument"},{id:Cp.EXTRACT_FROM_MUNICIPAL_PERSONAL_RECORDS_DATABASE,name:"extractFromMunicipalPersonalRecordsDatabase"},{id:Cp.SALARY_SLIP,name:"salarySlip"},{id:Cp.MORTGAGE_STATEMENT,name:"mortgageStatement"},{id:Cp.CERTIFICATE_OF_VOTER_REGISTRATION,name:"certificateOfVoterRegistration"}];const Dp=yt((function(e){var{ref:a,id:r}=e,i=n(e,["ref","id"]);const{i18n:o}=We(),[s,l]=se(Rp[0].id),d=s===Cp.MORTGAGE_STATEMENT||s===Cp.CERTIFICATE_OF_VOTER_REGISTRATION,c=R(t.Fragment,{children:[R("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",o.get("requirements")]})),R(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[R(hc,{children:o.get("documentAddressedToName",{values:{name:i.name}})}),R(hc,{children:o.get("showAddressStateCountry")}),R(hc,{children:d?o.get("dateOnDocumentNoOlderThanXMonths",{values:{numberOfMonths:12}}):o.get("dateOnDocumentNoOlderThanXMonths",{values:{numberOfMonths:3}})}),R(hc,{children:o.get("fullDocumentVisibleWithReadableText")}),R(hc,{children:o.get("documentCannotBeDamaged")})]}))]});return R("div",{children:R(fc,Object.assign({},i,{name:i.name,documentField:"proofOfResidence",documentType:cc.PROOF_OF_RESIDENCY,ref:a,heading:o.get("proofOfResidence"),guidanceHeader:R("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:o.get("proofOfResidenceDocumentTypeLabel",{values:{name:i.name}})})),documentTypeSelect:{selectedType:s,setSelectedType:l,options:Rp},guidanceContent:c,id:r}))})}),((e,t)=>B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&B(e.requiredFields,t.requiredFields)&&e.name===t.name)),kp={personalDetails:{formId:"personalDetails",formName:"personalDetails",fields:im},address:{formId:"address",formName:"address",fields:["address"]},idDocument:{formId:"idDocument",formName:"idDocument",fields:["idDocumentType","idFrontPage","idBackPage","idDocument"]},proofOfResidence:{formId:"proofOfResidence",formName:"proofOfResidence",fields:["proofOfResidence"]},proofOfNationalId:{formId:"proofOfNationalId",formName:"proofOfNationalId",fields:["proofOfNationalId"]}},Lp=kp.personalDetails.formId,wp=kp.address.formId,Pp=kp.idDocument.formId,jp=kp.proofOfResidence.formId,xp=kp.proofOfNationalId.formId,Mp=[Pp,jp,xp];function Fp({trackingConig:e={topLevelLegalEntity:{}},parentLegalEntity:t,legalEntity:a,task:r}){const{topLevelLegalEntity:n}=e,i={task:r,flow:null==n?void 0:n.type,topLevelLegalEntityId:n.id,topLevelLegalEntityType:n.type};return t&&(i.parentLegalEntityId=t.id,i.parentLegalEntityType=t.type),a&&(i.legalEntityId=a.id,i.legalEntityType=a.type),i}const Vp={BANK_CODE:"bankCode",BRANCH_CODE:"branchCode",COUNTRY:"country",NUMBER:"bankAccountNumber",BANK_CITY:"bankCity",SWIFT_CODE:"swiftCode",IBAN:"iban",OWNER_NAME:"accountHolder",BANK_NAME:"bankName",BANK_COUNTRY:"bankCountry",OWNER_CITY:"accountHolderCity"},Up=[Vp.NUMBER,Vp.IBAN],Bp={AU:{branchCode:{label:"bsbNumber"}},BR:{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},"CA--CAD":{branchCode:{label:"transitNumber"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},CA:{bankCode:{label:"institutionNumber"},branchCode:{label:"transitNumber"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},"GB--GBP":{branchCode:{label:"sortCode"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},GB:{branchCode:{label:"sortCode"},bankCity:{label:"bankCityTown"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},"GB--EUR":{bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},HK:{bankCode:{label:"clearingCode"},branchCode:{label:"branchCode"}},ID:{branchCode:{label:"clearingCode"}},NZ:{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},"SG--SGD":{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},SG:{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},US:{branchCode:{label:"achRoutingNumber"}}},Wp=e=>{if(!e)return;if("bic_either8or11"===e)return{modes:["blur","input"],validate:e=>/^([a-zA-Z0-9]{8}|[a-zA-Z0-9]{11})$/.test(e),errorMessage:"validation8Or11Characters"};const[t,a,r]=e.split(":");if("iban"===t)return{modes:["blur","input"],validate:e=>js(e,+a),errorMessage:{translationKey:"validationCharacters",translationObject:{values:{length:a}}}};if("digits"===t){if(r){const e=new RegExp(`^\\d{${a},${r}}$`,"");return{modes:["blur","input"],validate:t=>e.test(t),errorMessage:{translationKey:"validationDigitsBetween",translationObject:{values:{start:a,end:r}}}}}const e=new RegExp(`^\\d{${a}}$`,"");return{modes:["blur","input"],validate:t=>e.test(t),errorMessage:{translationKey:"validationDigits",translationObject:{values:{length:a}}}}}},Hp={role:{rule:"REQUIRED"},firstName:{rule:"REQUIRED"},lastName:{rule:"REQUIRED"},birthDate:{rule:"REQUIRED"},phoneNumber:{rule:"contactsIfRequiredForRole"},email:{rule:"contactsIfRequiredForRole"},jobTitle:{rule:"jobTitleIfRequiredForRole"},address:{rule:"REQUIRED"},residencyCountry:{rule:"REQUIRED"},proofOfResidence:{rule:"isProofOfResidenceRequired"},proofOfNationalId:{rule:"isProofOfNationalIdRequired"},isPartOfTrust:{rule:"partOfTrustFieldsOnlyAU"},accountHolder:{rule:"accountHolderIfCustomer"}},qp={idNumber:{rule:"REQUIRED",verify:"isVerificationAllowedForCountry"},idNumberExempt:{rule:"idNumberExemptIfApplicableCountry"},idDocument:{rule:"idDocumentIfIdNumberExempted"}},Gp={typeOfIdentity:{rule:"requiredIfCountryUsesMultipleTypesOfIdentity"},issuerState:{rule:"requiredIfIdentityTypeIsDriversLicense"},licenseCardNumber:{rule:"requiredIfIdentityTypeIsDriversLicense"}},$p={L0:V(["address","birthDate"]).from(Hp),L1:Hp,L1_ID:Object.assign(Object.assign(Object.assign({},Hp),qp),Gp),L1_IDO:Object.assign(Object.assign(Object.assign({},Hp),qp),Gp),L1_NAT:Object.assign(Object.assign(Object.assign(Object.assign({},Hp),qp),Gp),{nationality:{rule:"REQUIRED"}}),L1_IDDOC:{idDocument:{rule:"REQUIRED"}}},Xp={US:{idNumber:{label:"socialSecurityNumber",placeholder:"SSNFormatUS"},idNumberExempt:{label:"uploadDocumentForSsn"}},CA:{idNumber:{label:"socialInsuranceNumber",placeholder:"SINFormatCA"},idNumberExempt:{label:"uploadDocumentForSsn"}},IT:{idNumber:{label:"codiceFiscale"}},BR:{idNumber:{label:"cadastroDePessoasFisicas"}},SE:{idNumber:{label:"personnummer"}},ES:{idNumber:{label:"dniNumber"}}},Yp={trustType:{rule:"REQUIRED"},legalName:{rule:"REQUIRED"},country:{rule:"REQUIRED"},taxId:{rule:"REQUIRED"},registrationAddress:{rule:"REQUIRED"},operationalAddress:{rule:"OPTIONAL"}},Kp={L0:Object.assign({},Yp),L1:Object.assign({},Yp),L:Object.assign({},Yp)},zp={AU:{taxId:{label:"australianBusinessNumberAbn"}}},Zp={legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"},tradingName:{rule:"REQUIRED"},registrationNumber:{rule:"SolePropsRegistrationNumberRules"},exemptedFromRegistrationNumber:{rule:"SolePropsExemptedFromRegistrationNumberRules"},registrationAddress:{rule:"REQUIRED"},stockExchangeMIC:{rule:"stockExchangeMICIfTypePublic"},stockISIN:{rule:"stockISINIfTypePublic"}},Qp={L0:{legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"}},L1:Object.assign({},Zp),L2:Object.assign({},Zp),L:Object.assign(Object.assign({},Zp),{vatNumber:{rule:"vatRules"},exemptedFromVat:{rule:"vatRules"},vatAbsenceReason:{rule:"vatRules"},taxId:{rule:"taxIdRules"},exemptedFromTax:{rule:"SolePropsExemptedFromTaxRules"}}),L_ConstDoc:{constitutionalDocument:{rule:"REQUIRED"}}},Jp=xl;const eg=(e,t)=>(e&&Object.entries(e).forEach((([e,a])=>{t[e]=Object.assign(Object.assign({},t[e]),a)})),t);const tg=(e,t)=>null==t?void 0:t.some((t=>{var a,r;return(null===(a=null==t?void 0:t.fields)||void 0===a?void 0:a.includes(e))&&(null===(r=null==t?void 0:t.forms)||void 0===r?void 0:r.some((e=>e===kp.idDocument.formId||e===kp.proofOfResidence.formId||e===kp.proofOfNationalId.formId||e===_c.companyRegistrationDocument.formId||e===_c.companyTaxDocument.formId||e===kc.solePropConstitutionalDocument.formId)))})),ag=({onNext:e,onBack:t,onHome:a,homeButtonLabel:r,backButtonLabel:n,nextButtonLabel:i,hideOnHomeButton:o,hideBackButton:s})=>R("div",Object.assign({className:"adyen-action-bar"},{children:[(t||e)&&R("div",Object.assign({className:"adyen-action-bar__action"},{children:[t&&!s&&R(Gc,{label:n,className:"adyen-action-bar__button",secondary:!0,onClick:()=>t(),testId:"backBtn"}),e&&R(Gc,{label:i,className:"adyen-action-bar__button",onClick:e,testId:"nextBtn"})]})),a&&r&&!o&&R("div",Object.assign({className:"adyen-action-bar__action"},{children:R(Gc,{className:"adyen-action-bar__button",label:r,secondary:!0,onClick:()=>a(),testId:"homeBtn"})}))]})),rg=()=>{const{i18n:e,isReview:t}=We();return t?R("div",Object.assign({className:"adl-review-alert"},{children:R(zs,{hasCloseButton:!1,type:Ks.WARNING,title:e.get("verifyCompanyInfoIsUpToDate")})})):null},ng={formId:"summary",formName:"summary"};function ig({data:e,forms:t,omittedKeys:a,gotoForm:r,labels:n,problems:i,trackNavigation:o=G,omittedForms:s=[]}){var l,d;const{i18n:c}=We(),u=(null==i?void 0:i.validationErrors)&&(null===(l=Object.values(null==i?void 0:i.validationErrors))||void 0===l?void 0:l.reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{})),m=(null==i?void 0:i.verificationErrors)&&(null===(d=Object.values(null==i?void 0:i.verificationErrors))||void 0===d?void 0:d.reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{})),p=ra({labels:n},c),g=(e,a)=>R("ul",Object.assign({className:"adyen-kyc-summary__heading-section"},{children:[R("li",{children:R("span",Object.assign({className:"adyen-kyc-summary__form-heading"},{children:e}))}),R("li",{children:R(Gc,{className:"adyen-kyc-summary__edit-form-button",ghost:!0,circle:!0,tertiary:!0,icon:"edit",onClick:()=>{o({fromForm:{formName:"summary",formId:"summary"},toForm:{formId:a,formName:e},component:"Pencil icon"}),(e=>{const a=t.findIndex((t=>t.formId===e));a>=0&&r(a)})(a)},title:c.get("edit"),label:c.get("edit"),labelHoverBox:!0})})]})),y=(e,t,a,r)=>R("li",Object.assign({className:"adyen-kyc-summary__item"},{children:[g(a,r),R("ul",Object.assign({className:"adyen-kyc-summary__content-section"},{children:f(e,t)}))]})),b=(e={},t,a)=>{const r=[];return e&&Object.entries(e).forEach((([e,n])=>{const i=c.get(null==t?void 0:t[e])||c.get(e);"object"==typeof n&&null!==n&&r.push(y(n,t,i,a))})),r},f=(e={},t={})=>{const r=[];return e&&Object.entries(e).forEach((([e,n])=>{const i=c.get(t[e])||c.get(e);"object"!=typeof n||null===n||(null==a?void 0:a.includes(e))?"string"!=typeof n||(null==a?void 0:a.includes(e))||r.push(R("li",Object.assign({className:"adyen-kyc-summary__data-item"},{children:[R("span",Object.assign({className:"adyen-kyc-summary__field"},{children:i})),R("span",Object.assign({className:"adyen-kyc-summary__data"},{children:n}))]}))):r.push(R("li",Object.assign({className:"adyen-kyc-summary__item-nested"},{children:R("ul",Object.assign({className:"adyen-kyc-summary__content-section-nested"},{children:f(n,t)}))})))})),r};return R("div",Object.assign({role:"region",className:"adyen-kyc-summary"},{children:[R("h2",Object.assign({className:"adyen-kyc-summary__heading"},{children:c.get("summary")})),R(rg,{}),R(qc,{validationErrors:u,verificationErrors:m,formUtils:p,id:"ariaErrorField"}),R("ul",Object.assign({className:"adyen-kyc-summary"},{children:(e=>{const a=[];return t.forEach((({formId:t,formName:r})=>{var i;const o=null==e?void 0:e[t];if(!o||Object.keys(o).every((e=>Ss(o[e])))||t===ng.formId||(null==s?void 0:s.includes(t)))return;const l=(null===(i=null==e?void 0:e[t])||void 0===i?void 0:i.hasInnerForms)?b(null==e?void 0:e[t],null==n?void 0:n[t],t):(null==e?void 0:e[t])?y(null==e?void 0:e[t],null==n?void 0:n[t],c.get(r),t):null;a.push(l)})),a})(e)}))]}))}const og=e=>{const{content:t,footer:a}=e;return R("div",Object.assign({className:"adyen-kyc-dropin"},{children:[R("div",Object.assign({className:"adyen-kyc-dropin__content"},{children:R("div",Object.assign({className:"adyen-kyc-dropin__content-main"},{children:t}))})),a&&R("div",Object.assign({className:"adyen-kyc-dropin__footer-container"},{children:a}))]}))},sg=({trackNavigation:e,form:t,isActive:r,onClick:n,hasVerificationErrors:i})=>{const{i18n:o}=We();return R("li",Object.assign({className:a("adyen-kyc-form-navigation__item",{"adyen-kyc-form-navigation__item--active":r,"adyen-kyc-form-navigation__item--valid":t.isValid,"adyen-kyc-form-navigation__item--isnav":n}),onClick:()=>{e(),n()}},{children:[o.get(t.formName),t.hasServerValidationErrors&&R("span",Object.assign({className:"adyen-kyc-form-navigation__item-icon adyen-kyc-form-navigation__item-icon--error"},{children:R(Zs,{type:Ks.WARNING})})),t.isValid&&!t.hasServerValidationErrors&&!i&&R("span",Object.assign({className:"adyen-kyc-form-navigation__item-icon adyen-kyc-form-navigation__item-icon--success"},{children:R(xe,{name:"checkmark-small"})}))]}),t.formId)};function lg({forms:e,activeForm:t,gotoForm:r,validateForm:n,className:i,taskName:o,hasVerificationErrors:s,trackNavigation:l=G}){const{i18n:d}=We(),c=t=>null==e?void 0:e.findIndex((e=>e.formId===t.formId)),u=c(t)+1,m=null==e?void 0:e.length,p=(t,a)=>{const i=c(t),o=[...e];o.length=i;return o.every((e=>e.isValid))?((e,t)=>()=>{if(e.formId!==t.formId){const t=c(e);r(t)}})(t,a):a.isValid?null:n};return R("div",Object.assign({className:a("adyen-kyc-form-navigation",i)},{children:[R("div",Object.assign({className:"adyen-kyc-form-navigation__header"},{children:d.get(o)})),R("ul",Object.assign({className:"adyen-kyc-form-navigation__items"},{children:[e&&R("li",Object.assign({className:"adyen-kyc-form-navigation__home-button-item"},{children:R("span",Object.assign({className:"adyen-kyc-form-navigation__step-count"},{children:d.get("stepsX/YofForm",{values:{activeFormIndex:u,totalForms:m,taskName:o}})}))})),null==e?void 0:e.map((e=>R(sg,{form:e,isActive:e.formId===t.formId,onClick:p(e,t),trackNavigation:()=>l({fromForm:e,toForm:t,component:"FormNavigation"}),hasVerificationErrors:s},e.formId)))]}))]}))}function dg({children:e,forms:t,setFormIndex:a}){return R(Qs.Provider,Object.assign({value:{setFormIndex:a,goToFormByFieldName:e=>{const r=t.findIndex((t=>{var a;return null===(a=null==t?void 0:t.fields)||void 0===a?void 0:a.some((t=>t===e))}));r>-1?a(r):console.error("No form was found to have that field so form navigation failed.")}}},{children:e}))}function cg(e,a){const{getComponentForms:r,parseConfiguration:n,rules:o,labels:s,getTaskName:l}=a;return a=>{var d,c,u;const{i18n:m,loadingContext:p,clientKey:g,contextCountry:y,setContextCountry:b,isReview:f,setPayoutDefaultCurrency:h}=We(),{getData:_}=Kd(),{getOmittedKeys:N=null,formatData:O=null,omittedForms:I}=a.summary||{},E=r(a),T=l(a),[A]=se(f?[ng,...Object.values(E),ng]:[...Object.values(E),ng]),[S,C]=se(A),[D,k]=se(!1),[L,P]=se(!1),[j,x]=se(!1),[M,F]=se(!1),[V,U]=se(!1),[B,W]=se(null),[H,q]=se(!1),[G,X]=se({}),[Y,K]=se((()=>{var e,t,r,n;if((null===(e=null==a?void 0:a.problems)||void 0===e?void 0:e.remediationActions)&&Object.keys(null===(t=null==a?void 0:a.problems)||void 0===t?void 0:t.remediationActions).length>0){const e=Object.values(null===(r=null==a?void 0:a.problems)||void 0===r?void 0:r.remediationActions).flat().filter((e=>{var t;return(null===(t=e.forms)||void 0===t?void 0:t.length)>0}));if(1===e.length&&1===(null===(n=e[0])||void 0===n?void 0:n.forms.length)){const t=S.find((t=>{var a;return(null==t?void 0:t.formId)===(null===(a=e[0])||void 0===a?void 0:a.forms[0])}));if(t)return t}return S[S.length-1]}return S[0]})()),[z,Z]=se({}),Q=ue(null),[J,ee]=se(null),[te,ae]=se(Fu.SUCCESS),[re,ne]=se(a.data),[ie,oe]=se(a),[le,ce]=se(a.country||y),[me,pe]=se(null),[ge,ye]=se(null);de((()=>{!function(e){oc?Promise.resolve():v({loadingContext:e,path:"static/images/country-flags.svg"},null,"text").then((e=>{document.body.insertBefore(lc(e),document.body.firstChild),oc=!0}))}(p),dc(p)}),[p]),de((()=>{n&&le&&(ae(Fu.LOADING),$({loadingContext:p,clientKey:g,country:le,capabilities:a.capabilities,legalEntityType:a.legalEntityType}).then((e=>{var t;const{matchingScenario:a,requiredFields:r,bankVerificationProviders:i}=e,o=null===(t=null==r?void 0:r.payout)||void 0===t?void 0:t.currency;o&&h(o);const s=n({requiredFields:r,matchingScenario:a,country:le,bankVerificationAvailable:i&&!!i[le]&&!!ie.handleGetBankVerificationVendors});ee(s),ye(r),pe(i),be(s,le,_(),r),ae(Fu.SUCCESS)})).catch((e=>{console.warn("WARNING: Configuration failed - error:",e),ae(Fu.SUCCESS)})))}),[le]);const be=(e,t,r,n)=>{var i,l;const d=function(e,t={},a={},r,n){var i;const o={},s={},l={},d={},c={},u={},m={},p={};if(e)return null===(i=Object.entries(r))||void 0===i||i.forEach((([r,i])=>{var g;null===(g=null==i?void 0:i.fields)||void 0===g||g.forEach((i=>{var g;const y=e[i],b=y&&("REQUIRED"===(null==y?void 0:y.rule)||(null==t?void 0:t[y.rule])&&"REQUIRED"===t[y.rule]()),f=tg(i,n)||b;f&&(o[r]=o[r]?[...o[r],i]:[i],l[r]=l[r]?[...l[r],i]:[i]);const h=y&&("OPTIONAL"===y.rule||(null==t?void 0:t[y.rule])&&"OPTIONAL"===t[y.rule]());if(!f&&h&&(s[r]=s[r]?[...s[r],i]:[i],l[r]=l[r]?[...l[r],i]:[i]),y){const e=(null===(g=null==a?void 0:a[i])||void 0===g?void 0:g.call(a))||y.label;e&&(c[r]=c[r]?Object.assign(Object.assign({},c[r]),{[i]:e}):{[i]:e}),y.verify&&("string"!=typeof y.verify||t[y.verify]())&&(d[r]=d[r]?[...d[r],i]:[i]),y.placeholder&&(u[r]=Object.assign(Object.assign({},u[r]||{}),{[i]:y.placeholder})),y.validators&&(m[r]=Object.assign(Object.assign({},m[r]||{}),{[i]:y.validators})),y.masked&&(p[r]=p[r]?[...p[r],i]:[i])}}))})),{requiredFields:o,optionalFields:s,allFields:l,labels:c,verifyFields:d,placeholders:u,validators:m,maskedFields:p}}(e,o?o(r,t,a.taskType,n):{},s?s(r,t):{},E,(null===(i=null==a?void 0:a.problems)||void 0===i?void 0:i.remediationActions)&&Object.values(null===(l=null==a?void 0:a.problems)||void 0===l?void 0:l.remediationActions));oe(Object.assign(Object.assign(Object.assign({},a),d),{country:le}))},fe=({fromForm:e,toForm:t,component:r})=>{w.addEvent("Navigated form",{segmentation:Object.assign(Object.assign({},null==a?void 0:a.baseTrackingPayload),{component:r,from:e.formId,fromLabel:m.get(e.formName),to:t.formId,toLabel:m.get(t.formName)})})},he=e=>{Q.current.verifyForm?Q.current.verifyForm(Y.formId).then((t=>{t&&K(S[e])})):K(S[e])},ve=()=>{Q.current.triggerCurrentFormValidation()},_e=(e,t,r=!1)=>{var n,i;if(Q.current.customNavigationHandler)return void Q.current.customNavigationHandler();if(null===(n=G[Y.formId])||void 0===n?void 0:n.onNext)return void(null===(i=G[Y.formId])||void 0===i||i.onNext());const o=(null==ie?void 0:ie.allFields)||{};var s;if(Ee(Y))H?a.navigateBackToTaskList():a.onSubmit({data:_(),forms:S,allFields:o,setLoadingStatus:ae});else if(z[Y.formId]||r){if(Oe())return void a.onSubmit({data:_(),forms:S,allFields:o,setLoadingStatus:ae});const e=S.findIndex((e=>e.formId===Y.formId))+1;he(e);const t=S[e];fe({fromForm:Y,toForm:t,component:"ActionBar"}),s=Y,w.addEvent("Completed form section",{segmentation:Object.assign(Object.assign({},null==a?void 0:a.baseTrackingPayload),{sectionName:s.formId})})}else ve()},Ne=()=>{if(Ie())a.handleBackClick&&a.handleBackClick();else{const e=S.findIndex((e=>e.formId===Y.formId));if(e){const t=S[e],a=S[e-1];K(a),fe({fromForm:t,toForm:a,component:"ActionBar"})}}},Oe=()=>S.findIndex((e=>e.formId===Y.formId))===S.length-1,Ie=()=>0===S.findIndex((e=>e.formId===Y.formId)),Ee=e=>e.formId===ng.formId;de((()=>(a.eventEmitter.on("next",_e),a.eventEmitter.on("back",Ne),a.eventEmitter.on("validate",ve),()=>{a.eventEmitter.off("next",_e),a.eventEmitter.off("back",_e),a.eventEmitter.off("validate",ve)})),[Y,S]),de((()=>{const e=A.filter((e=>{return t=e.formId,!ie.requiredFields&&!ie.optionalFields||!!ie.requiredFields[t]||!!ie.optionalFields[t]||Ee(e);var t}));C(e)}),[ie.requiredFields]),de((()=>{ne(a.data)}),[a.data]);const Te=e=>{Z(e.validityByForm||e.valid),e.validityByForm||a.onChange(e)},Ae=!D&&!j&&R(ag,{onNext:_e,onBack:Ne,backButtonLabel:m.get("back"),nextButtonLabel:f?Ee(Y)?m.get("confirm"):m.get("next"):Oe()?m.get(null!=B?B:"submit"):m.get("next"),onHome:()=>i(this,void 0,void 0,(function*(){var e,t;const r=_();if((yield null===(e=a.hasDataChanged)||void 0===e?void 0:e.call(a,r))&&(null===(t=a.canSubmit)||void 0===t?void 0:t.call(a,r))){b(le);const e=(null==ie?void 0:ie.allFields)||{};yield a.onSubmit({data:r,forms:S,allFields:e,setLoadingStatus:ae})}else a.handleHomeClick()})),homeButtonLabel:a.homeButtonLabel,hideOnHomeButton:M,hideBackButton:V}),Se=R("div",Object.assign({className:"adyen-kyc-form-container"},{children:R(Vu,Object.assign({status:te,formOpacityWhenLoading:.3,loaderSize:"large"},{children:R(dg,Object.assign({setFormIndex:he,forms:S},{children:[R(Yd,{owner:"FormComposer",onChange:({currentState:e})=>{Te(e)}}),R(e,Object.assign({ref:Q,forms:S,activeForm:Y},ie,{data:re,onChange:Te,evaluateConfiguration:e=>be(J,le,e,ge),onCountryChange:e=>{ce(e)},legalEntityId:a.legalEntityId,problems:null==a?void 0:a.problems,onNext:_e,onBack:Ne,setHideDropinLayout:k,setHideNavigation:P,setHideFooter:x,setCustomFormNavigationHandlers:(e,t,a)=>{X(Object.assign(Object.assign({},G),{[e]:{onNext:t,onBack:a}}))},setHideOnHomeButton:F,setHideBackButton:U,setSubmitButtonLabel:W,setSkipSubmitAndGoTaskList:q,bankVerificationVendors:me})),Y.formId===ng.formId&&R("div",Object.assign({className:"adyen-kyc-form-wrapper"},{children:R(ig,{trackNavigation:fe,data:O?O(_(),S):_(),omittedKeys:N?N(_()):null,omittedForms:I,forms:S,gotoForm:he,labels:ie.labels,problems:null==a?void 0:a.problems})})),Ae]}))}))})),Ce=!D&&!L&&R(Vu,Object.assign({status:te,formOpacityWhenLoading:.3,showSpinner:!1,className:"adyen-kyc-dropin__sidebar-wrapper"},{children:R(lg,{forms:f?null:S.map((({formId:e,formName:t})=>{var r,n;return{formId:e,formName:t,isValid:z[e],hasServerValidationErrors:void 0!==(null===(n=null===(r=null==a?void 0:a.problems)||void 0===r?void 0:r.validationErrors)||void 0===n?void 0:n[e])}})),activeForm:Y,gotoForm:he,validateForm:ve,taskName:T,trackNavigation:fe,hasVerificationErrors:(null===(d=null==a?void 0:a.problems)||void 0===d?void 0:d.verificationErrors)&&(null===(u=Object.keys(null===(c=null==a?void 0:a.problems)||void 0===c?void 0:c.verificationErrors))||void 0===u?void 0:u.length)>0})})),Re=R(t.Fragment,{children:[Ce,Se]});return a.hideDropinLayout?R(t.Fragment,{children:Se}):R(og,{content:Re})}}var ug;!function(e){e.LOADING="loading",e.SUCCESS="success",e.ERROR="error"}(ug||(ug={}));const mg=t.createContext(null);function pg(){const e=ge(mg);if(void 0===e)throw new Error("useToastContext must be used within a ToastProvider");return e}const gg=(e,t)=>{if((null==e?void 0:e.invalidFields)&&(null==e?void 0:e.invalidFields.length)>0)return null==e?void 0:e.invalidFields.reduce(((e,a)=>{if(null==a?void 0:a.name){const r=yg(null==a?void 0:a.name,t);r&&vp(r,e,!0)}return e}),{})},yg=(e,t)=>{switch(t){case Cl.INDIVIDUAL:return _l[e];case Cl.COMPANY:return vl[e];case Cl.PAYOUT:case Cl.PAYIN:return Nl[e]}return null},bg=cg((function(e){const{i18n:a}=We(),[r,n]=se(e.data),[i,o]=se(!1),[s,l]=se(!1),d=ue({setState:null});de((()=>{const t=Object.values(e.forms).reduce(((e,t)=>[...e,..."summary"!==t.formId?[t.formId]:[]]),[]);d.current.setActiveForms(t)}),[e.forms.toString()]),de((()=>()=>{d.current.setState({type:"resetState"})}),[]);const c={[Lp]:ue(null),[wp]:ue(null),[Pp]:ue(null),[jp]:ue(null),[xp]:ue(null)},u=Rl(e,Lp),m=Rl(e,wp),p=Rl(e,Pp),g=Rl(e,jp),y=Rl(e,xp);this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==c?void 0:c[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()},this.verifyForm=e=>{var t,a;return(null===(a=null===(t=c[e])||void 0===t?void 0:t.current)||void 0===a?void 0:a.verifyForm)?c[e].current.verifyForm():Promise.resolve(!0)};const b=e=>{var t,a;return`${null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.firstName} ${null===(a=null==e?void 0:e.personalDetails)||void 0===a?void 0:a.lastName}`},f=e=>{var t,a,r;return{firstName:null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.firstName,lastName:null===(a=null==e?void 0:e.personalDetails)||void 0===a?void 0:a.lastName,residencyCountry:null===(r=null==e?void 0:e.personalDetails)||void 0===r?void 0:r.residencyCountry}},h=({currentState:t,prevState:a})=>{var r,i,o,l,d,c;(((e,t)=>{var a,r,n,i;const o=null===(r=null===(a=e.data)||void 0===a?void 0:a.personalDetails)||void 0===r?void 0:r.idNumberExempt,s=null===(i=null===(n=t.data)||void 0===n?void 0:n.personalDetails)||void 0===i?void 0:i.idNumberExempt;return null!=o&&null!=s&&s!==o})(a,t)||((e,t)=>{var a,r,n,i;return(null===(r=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.personalDetails)||void 0===r?void 0:r.typeOfIdentity)!==(null===(i=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.personalDetails)||void 0===i?void 0:i.typeOfIdentity)})(a,t)||v(a,t))&&e.evaluateConfiguration(t.allData);const u=null===(i=null===(r=a.data)||void 0===r?void 0:r.personalDetails)||void 0===i?void 0:i.residencyCountry,m=null===(l=null===(o=t.data)||void 0===o?void 0:o.personalDetails)||void 0===l?void 0:l.residencyCountry;null!=m&&m!==u&&e.onCountryChange(m);const p=null===(c=null===(d=t.data)||void 0===d?void 0:d.personalDetails)||void 0===c?void 0:c.accountHolder;this.customNavigationHandler=p===Wl.THE_COMPANY_I_WORK_FOR?()=>e.onTypeSwitch(il.ORGANIZATION):null,s&&t.validityByForm[Pp]&&e.onNext(null,null,!0),n(t.data)};de((()=>{var t;e.activeForm.formId===Pp?(i||s||(null===(t=r.idDocument)||void 0===t?void 0:t.idDocumentType)?e.setCustomFormNavigationHandlers(Pp,null,null):e.setCustomFormNavigationHandlers(Pp,(()=>{l(!0)}),null),e.setHideFooter(s)):e.setHideFooter(!1)}),[i,e.activeForm,s,r]);const v=(t,a)=>{var r,n,i,o;return e.taskType===Cl.DECISION_MAKER&&!U((null===(n=null===(r=t.data)||void 0===r?void 0:r.personalDetails)||void 0===n?void 0:n.role)||[],(null===(o=null===(i=a.data)||void 0===i?void 0:i.personalDetails)||void 0===o?void 0:o.role)||[])};return R("div",Object.assign({className:"adyen-kyc-individual"},{children:(_=e.activeForm,R(t.Fragment,{children:[R(Yd,{owner:"IndividualComponent",onChange:h}),R(Ys,{owner:"IndividualComponent",stateRef:d}),R("div",Object.assign({className:_.formId!==Lp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(om,Object.assign({},u,{data:Object.assign(Object.assign({},null==u?void 0:u.data),{residencyCountry:e.country}),ref:c[Lp],heading:a.get("providePersonalDetails"),taskType:e.taskType,id:Lp,allowedRoles:null==e?void 0:e.allowedRoles}))})),R("div",Object.assign({className:_.formId!==wp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R("div",{children:[R(Ms,{heading:a.get("providePersonalAddress")}),R(ud,{page:"Personal address",title:a.get("whyDoINeedToFillInThisInformation"),content:a.get("reasonForFillingIndividualAddressDetails"),titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingIndividualAddressDetails"}),R($c,Object.assign({},m,{ref:c[wp],data:Object.assign(Object.assign({},m.data),{country:e.country}),hideCountry:!0,id:wp,legalEntityId:e.legalEntityId,handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress}))]})})),R("div",Object.assign({className:_.formId!==Pp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(Sp,Object.assign({},p,{ref:c[Pp],name:b(r),userDetails:f(r),id:Pp,legalEntityId:e.legalEntityId,handleGetIdVerificationToken:e.handleGetIdVerificationToken,showManualUpload:i,setShowManualUpload:o,showIdVerification:s,setShowIdVerification:l}))})),R("div",Object.assign({className:_.formId!==jp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(Dp,Object.assign({},g,{ref:c[jp],id:jp,name:b(r)}))})),R("div",Object.assign({className:_.formId!==xp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(fc,Object.assign({},y,{documentField:"proofOfNationalId",documentType:cc.REGISTRATION_DOCUMENT,ref:c[xp],heading:a.get("proofOfNationalId"),id:xp}))}))]}))}));var _}),{getComponentForms:()=>kp,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),$p[t])),{});return a=eg(Xp[t],a),a}(e[il.INDIVIDUAL],t),rules:(e,t,a)=>({idNumberExemptIfApplicableCountry:()=>{if($l.includes(t))return"REQUIRED"},idDocumentIfIdNumberExempted:()=>{var t;if(null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.idNumberExempt)return"REQUIRED"},isProofOfResidenceRequired:()=>{var t;if(null===(t=null==e?void 0:e.proofOfResidence)||void 0===t?void 0:t.proofOfResidence)return"REQUIRED"},isProofOfNationalIdRequired:()=>{var t;if(null===(t=null==e?void 0:e.proofOfNationalId)||void 0===t?void 0:t.proofOfNationalId)return"REQUIRED"},contactsIfRequiredForRole:()=>{var t,a;return(null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.role)?(null===(a=null==e?void 0:e.personalDetails)||void 0===a?void 0:a.role)&&e.personalDetails.role.includes(ql.SIGNATORY)?"REQUIRED":void 0:"REQUIRED"},jobTitleIfRequiredForRole:()=>{var t;if((null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.role)&&e.personalDetails.role.some((e=>e===ql.SIGNATORY||e===ql.CONTROLLING_PERSON)))return"REQUIRED"},partOfTrustFieldsOnlyAU:()=>{if("AU"===t)return"REQUIRED"},accountHolderIfCustomer:()=>{if(a===Cl.INDIVIDUAL)return"REQUIRED"},requiredIfCountryUsesMultipleTypesOfIdentity:()=>{if(Yl.includes(t))return"REQUIRED"},requiredIfIdentityTypeIsDriversLicense:()=>{var t;if("driversLicense"===(null===(t=e.personalDetails)||void 0===t?void 0:t.typeOfIdentity))return"REQUIRED"},isVerificationAllowedForCountry:()=>Xl.includes(t)}),getTaskName:()=>"individualDetails"});function fg(e){var t,a,r,n,o,s;const{i18n:l,setLocale:d,setIsLegalEntityPartOfTrust:c,setAccountHolder:u}=We(),{showToast:m}=pg(),{handleCreateDocument:p,handleGetDocument:y,handleUpdateDocument:b,handleAddressSearch:f,handleFindAddress:h,handleGetIdVerificationToken:v,handleGetIdVerificationStartCheck:_,taskType:N,trackingConig:O,parentLegalEntity:I,legalEntityResponse:E}=e;let T=up(E,e.isTargetLegalEntityType);const A=ym(p,y,b),[S,C]=se(null);let D=[];const[k,L]=se(null==e?void 0:e.problems);if(N===Cl.DECISION_MAKER||N===Cl.TRUST_MEMBER_COMPANY_OWNER){if(null===(t=null==e?void 0:e.parentLegalEntity)||void 0===t?void 0:t.entityAssociations){const e=null===(a=null==I?void 0:I.entityAssociations)||void 0===a?void 0:a.filter((e=>e.legalEntityId===(null==E?void 0:E.id)));if(e&&e.length>0){const t=null===(r=e.find((e=>Boolean(e.jobTitle))))||void 0===r?void 0:r.jobTitle;T=Object.assign(Object.assign({},T),{personalDetails:Object.assign(Object.assign(Object.assign({},null==T?void 0:T.personalDetails),{role:null==e?void 0:e.map((e=>e.type))}),t&&{jobTitle:t})})}}D=Nu(I,N)}const[P,j]=se(T||e.data),x=Fp({trackingConig:O,parentLegalEntity:I,legalEntity:E,task:N});de((()=>{w.addPageView("Individual dropin"),w.addEvent("Started individual task",{segmentation:Object.assign({},x)})}),[]),de((()=>{var t;e.eventEmitter.on("updateLocale",(e=>d(e)));const a=(null===(t=null==E?void 0:E.documentDetails)||void 0===t?void 0:t.map((e=>e.id)))||[];a.length&&A.fetchDocuments(a,null==E?void 0:E.id).then((()=>{const e=yp(null==E?void 0:E.id);j(Object.assign(Object.assign({},P),e))})).catch((()=>{m({label:l.get("failedToFetchRelevantDocuments"),type:ug.ERROR})}))}),[]);const M=({dataSubmitted:t,legalEntity:a,idDocumentType:r})=>i(this,void 0,void 0,(function*(){let n;return(null==E?void 0:E.id)||(null==S?void 0:S.id)?n=yield e.handleUpdateLegalEntity(V("type").from(a),(null==E?void 0:E.id)||(null==S?void 0:S.id)):(n=yield e.handleCreateLegalEntity(a),C(a),w.addEvent("Added decision maker",{segmentation:Object.assign(Object.assign({},x),{legalEntityId:n.id,legalEntityType:n.type,countryOfRegistration:t.personalDetails.residencyCountry,roles:t.personalDetails.role})})),w.addEvent("Saved individual details",{segmentation:Object.assign(Object.assign({},x),{legalEntityId:n.id,legalEntityType:n.type,countryOfRegistration:t.personalDetails.residencyCountry,idDocumentType:r})}),n})),F=(e,t)=>i(this,void 0,void 0,(function*(){const a={legalEntityId:t,captureMetadata:e};yield _("",a)})),U=({forms:e,legalEntity:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){if(G(e))if(H(a))yield F(a.idDocument.instantIdVerificationData,t.id);else{const e=yield gp(a,t.id);yield A.uploadDocuments(e,t.id),null==e||e.forEach((e=>{w.addEvent("Saved document",{segmentation:Object.assign(Object.assign({},x),{documentType:e.type,fileExtention:e.attachments.map((e=>Sm(e.pageName)))})})}))}})),H=e=>{var t;return!!(null===(t=e.idDocument)||void 0===t?void 0:t.instantIdVerificationData)},q=({legalEntity:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){var r,n;const i=N===Cl.DECISION_MAKER||N===Cl.TRUST_MEMBER_COMPANY_OWNER?null===(r=null==a?void 0:a.personalDetails)||void 0===r?void 0:r.role:N===Cl.TRUST_MEMBER_INDIVIDUAL?null===(n=e.associationDetail)||void 0===n?void 0:n.types:null,o=$m(I);if(i&&((e,t)=>{var a;return(null===(a=$m(I).filter((a=>a.legalEntityId===e.id&&t.includes(a.type))))||void 0===a?void 0:a.length)!==t.length})(t,i)){const r={entityAssociations:[...i.map((e=>{var r;return{type:e,legalEntityId:t.id,jobTitle:null===(r=null==a?void 0:a.personalDetails)||void 0===r?void 0:r.jobTitle}}))||[],...o.filter((e=>e.legalEntityId!==t.id))||[]]};yield e.handleUpdateLegalEntity(r,I.id)}})),G=e=>e.some((e=>Mp.includes(e.formId))),$=g(l.locale),X=({idDocument:e,proofOfNationalId:t,proofOfResidence:a})=>{var r,n,i,o;return Object.assign(Object.assign(Object.assign({},((null==e?void 0:e.idDocumentType)||(null==e?void 0:e.instantIdVerificationData))&&{idDocument:Y(e)}),(null==t?void 0:t.proofOfNationalId)&&{proofOfNationalId:{fileName:null===(n=null===(r=t.proofOfNationalId)||void 0===r?void 0:r[0])||void 0===n?void 0:n.name}}),(null==a?void 0:a.proofOfResidence)&&{proofOfResidence:{fileName:null===(o=null===(i=a.proofOfResidence)||void 0===i?void 0:i[0])||void 0===o?void 0:o.name}})},Y=e=>{var t,a,r,n,i,o;if(e){const s=H({idDocument:e})?dm.find((t=>e.instantIdVerificationData.document_front.type===t.id)):lm.find((({id:t})=>(null==e?void 0:e.idDocumentType)===t));return Object.assign({documentType:l.get(null==s?void 0:s.name)},(null==s?void 0:s.hasBackPage)?{frontPage:null===(a=null===(t=null==e?void 0:e.idFrontPage)||void 0===t?void 0:t[0])||void 0===a?void 0:a.name,backPage:null===(n=null===(r=null==e?void 0:e.idBackPage)||void 0===r?void 0:r[0])||void 0===n?void 0:n.name}:{fileName:null===(o=null===(i=null==e?void 0:e.idFrontPage)||void 0===i?void 0:i[0])||void 0===o?void 0:o.name})}};return R(bg,{baseTrackingPayload:x,capabilities:e.capabilities,data:P,country:(null===(n=null==P?void 0:P.personalDetails)||void 0===n?void 0:n.residencyCountry)||(null===(s=null===(o=null==I?void 0:I.organization)||void 0===o?void 0:o.registeredAddress)||void 0===s?void 0:s.country),taskType:e.taskType,problems:k,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,handleBackClick:e.handleBackClick,handleGetIdVerificationToken:v,onSubmit:({data:t,forms:a,setLoadingStatus:r})=>i(this,void 0,void 0,(function*(){var n,i,o;r(Fu.LOADING);try{let s=lp(t);const l=null===(n=lm.find((({id:e})=>{var a;return(null===(a=t.idDocument)||void 0===a?void 0:a.idDocumentType)===e})))||void 0===n?void 0:n.id;w.addEvent("Provided individual details",{segmentation:Object.assign(Object.assign({},x),{countryOfRegistration:t.personalDetails.residencyCountry,idDocumentType:l})}),s=yield M({dataSubmitted:t,legalEntity:s,idDocumentType:l}),yield U({forms:a,legalEntity:s,dataSubmitted:t}),yield q({legalEntity:s,dataSubmitted:t}),c((null===(i=null==t?void 0:t.personalDetails)||void 0===i?void 0:i.isPartOfTrust)===Ml.IS_PART_OF_TRUST),u(null===(o=null==t?void 0:t.personalDetails)||void 0===o?void 0:o.accountHolder),r(Fu.SUCCESS),null==e||e.onSubmit(t)}catch(e){if((null==e?void 0:e.errorCode)===st){const t=gg(e,Cl.INDIVIDUAL);L(Object.assign(Object.assign({},k),{validationErrors:t}))}else m({label:l.get("failedToUpdateDetails"),type:ug.ERROR});r(Fu.SUCCESS),w.addEvent("Encountered error individual details",{segmentation:Object.assign(Object.assign({},x),{errorCode:e.errorCode,errorMessage:e.title,errorType:"BE"})})}})),summary:{formatData:(e,t)=>{var a,r,n;let i=W(e);return(null===(a=i.personalDetails)||void 0===a?void 0:a.residencyCountry)&&(i.personalDetails.residencyCountry=$.getCountryName(i.personalDetails.residencyCountry)),i.address&&(i.address=Pe(i.address,$)),G(t)&&(Mp.forEach((e=>delete i[e])),i=Object.assign(Object.assign({},i),X(e))),(null===(r=null==i?void 0:i.personalDetails)||void 0===r?void 0:r.isPartOfTrust)&&(i.personalDetails.isPartOfTrust=l.get(Lm(i.personalDetails.isPartOfTrust))),(null===(n=null==i?void 0:i.personalDetails)||void 0===n?void 0:n.accountHolder)&&(i.personalDetails.accountHolder=l.get(i.personalDetails.accountHolder)),i},getOmittedKeys:t=>{var a;return[e.taskType===Cl.DECISION_MAKER?"role":null,(null===(a=t.personalDetails)||void 0===a?void 0:a.idNumberExempt)?"idNumber":null].filter(Boolean)}},hasDataChanged:e=>i(this,void 0,void 0,(function*(){const t=lp(e),a=yield gp(e,"test");return!B(t,V(["documents","id"]).from(E||{}))||a.length>0})),canSubmit:t=>(e.taskType===Cl.DECISION_MAKER?sl.DECISIONMAKER:sl.INDIVIDUAL).every((e=>{const a=Ip(t,e);return!Ss(a)||Array.isArray(e)&&e.length>0})),legalEntityType:il.INDIVIDUAL,legalEntityId:null==E?void 0:E.id,allowedRoles:D,handleAddressSearch:f,handleFindAddress:h,onTypeSwitch:e.onTypeSwitch})}function hg(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(null===e[t]||Ss(e[t]))&&delete e[t];return e}const vg={data:{},allData:{},errors:{},valid:{},fieldProblems:{},isValid:!1};function _g({defaultData:e={},children:t}){const a={currentState:{data:e,allData:e,valid:{},errors:{},fieldProblems:{},validityByForm:{}},prevState:{},changeInitiatedBy:null},r=function(){const[e,t]=se({}),[a,r]=se([]);return{reducer:function({currentState:r},n){var i,o,s,l,d;switch(n.type){case"addToState":{const s=null!==(i=n.value.dataStoreId)&&void 0!==i?i:n.value.caller,l=n.value.schema||null,d=l&&(null===(o=null==e?void 0:e[s])||void 0===o?void 0:o.toString())!==l.toString(),c=Object.assign(Object.assign({},r),{data:Object.assign(Object.assign({},r.data),{[s]:Object.assign(Object.assign({},r.data[s]),n.value.data)}),allData:Object.assign(Object.assign({},r.allData),{[s]:Object.assign(Object.assign({},r.allData[s]),hg(n.value.data))}),errors:Object.assign(Object.assign({},r.errors),{[s]:Object.assign(Object.assign({},r.errors[s]),n.value.errors)}),valid:Object.assign(Object.assign({},r.valid),{[s]:Object.assign(Object.assign({},r.valid[s]),n.value.valid)}),fieldProblems:Object.assign(Object.assign({},r.fieldProblems),{[s]:Object.assign(Object.assign({},r.fieldProblems[s]),n.value.fieldProblems)})});if(d){t(Object.assign(Object.assign({},e),{[s]:l}));const a=l.reduce(((e,t)=>{var a;const r=c.data[s],n=c.allData[s],i=c.valid[s],o=c.errors[s],l=c.fieldProblems[s];return{data:Object.assign(Object.assign({},e.data),{[t]:null!==(a=r[t])&&void 0!==a?a:n[t]}),valid:Object.assign(Object.assign({},e.valid),{[t]:i[t]}),errors:Object.assign(Object.assign({},e.errors),{[t]:o[t]}),fieldProblems:Object.assign(Object.assign({},e.fieldProblems),{[t]:l[t]})}}),{data:{},valid:{},errors:{},fieldProblems:{}});c.data[s]=a.data,c.valid[s]=a.valid,c.errors[s]=a.errors,c.fieldProblems[s]=a.fieldProblems}return c.validityByForm=Object.assign(Object.assign({},c.validityByForm),{[s]:Object.values(c.valid[s]).every((e=>e))}),c.allValid=Object.values(c.validityByForm).every((e=>e)),c.isValid=a.length?a.every((e=>c.validityByForm[e])):c.allValid,{currentState:c,prevState:r,changeInitiatedBy:s}}case"resetState":{const e=null!==(l=null===(s=n.value)||void 0===s?void 0:s.dataStoreId)&&void 0!==l?l:null===(d=n.value)||void 0===d?void 0:d.caller;return{currentState:vg,prevState:r,changeInitiatedBy:e}}default:throw new Error(`Unhandled action type: ${n.type}`)}},setCurrentForms:e=>{r(e)}}}(),[n,i]=le(r.reducer,a),o={state:n,dispatch:i,setActiveForms:r.setCurrentForms,getData:()=>{var e,t;return null!==(t=null===(e=null==n?void 0:n.currentState)||void 0===e?void 0:e.data)&&void 0!==t?t:{}}};return R(Xs.Provider,Object.assign({value:o},{children:t}))}function Ng(e){const t=ue(null),{label:r,subLabel:n,actionLabel:i,type:o,duration:s,onToastHide:l}=e,d=o===ug.LOADING,c=o===ug.SUCCESS,u=Ve("toast"),m=()=>{t.current.classList.remove("adl-toast--visible"),l()};return de((()=>{t.current.classList.add("adl-toast--visible"),setTimeout((()=>{m()}),s)}),[r]),R("div",Object.assign({ref:t,role:i?"alertdialog":"alert",className:"adl-toast","aria-labelledby":u},{children:[d&&R("div",Object.assign({className:"adl-toast__loader"},{children:R("div",{className:"adl-loading-indicator adl-loading-indicator--small adl-loading-indicator--dark"})})),!d&&o&&R("div",Object.assign({className:a("adl-toast__status",{"adl-toast__status--success":c,"adl-toast__status--error":!c})},{children:[c&&R(xe,{className:"adl-toast__status-icon",name:"checkmark"}),!c&&R(xe,{className:"adl-toast__status-icon",name:"cross"})]})),R("div",Object.assign({className:"adl-toast__message"},{children:[R("span",Object.assign({id:u,className:"adl-toast__title"},{children:r})),i&&R("button",Object.assign({className:"adl-link adl-toast__action",title:"performAction",type:"button",onClick:e.onToastAction},{children:i})),!d&&n&&R("span",Object.assign({className:"adl-toast__subtitle"},{children:n}))]})),!d&&R("button",Object.assign({className:"adl-toast__close",title:"close",type:"button",onClick:m},{children:R(xe,{name:"cross"})}))]}))}function Og({children:e}){const[t,a]=se(null);return R(mg.Provider,Object.assign({value:{showToast:e=>{a(e)}}},{children:[!!t&&R("div",Object.assign({className:"adyen-kyc-dropin__toast-stack"},{children:R("div",Object.assign({className:"adyen-kyc-dropin__toast-context"},{children:R(Ng,Object.assign({},t,{onToastHide:()=>{a(null)}}))}))})),e]}))}Ng.defaultProps={duration:3500};const Ig={editPrefilledCountry:!0,changeLegalEntityType:!0,enableTrustFlow:!1};function Eg({children:e,settings:t={}}){return R(Kl.Provider,Object.assign({value:{isSettingEnabled:e=>t&&e in t?t[e]:Ig[e]}},{children:e}))}const Tg={xsOnly:"adyen-layout-xs-only",md:"adyen-layout-md",lg:"adyen-layout-lg"},Ag={md:680,lg:1024};class Sg extends P{constructor(e){super(e),this.handleStateChange=({currentState:e})=>{this.setState(e)}}formatData(){return Object.assign({},this.state.data)}get isValid(){return!!this.state.isValid}assignLayout(e,t){let a=[];e.forEach((e=>{var r;const n=null===(r=e.contentBoxSize)||void 0===r?void 0:r[0].inlineSize;n?a=(e=>{const t=Object.entries(Ag).reduce(((t,[a,r])=>(r<=e&&t.push(Tg[a]),t)),[]);return t.length>0?t:["adyen-layout-xs-only"]})(n):a.push(Tg.lg),t.classList.remove(...Object.values(Tg)),t.classList.add(...a)}))}renderDropinComponent(){return R("div",{children:"Placeholder for dropin component"})}render(){return R(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey,contextCountry:this.props.country,commonProps:{showInlineErrors:this.props.showInlineErrors},isReview:this.props.isReview},{children:R(_g,Object.assign({defaultData:this.props.data},{children:R(Eg,Object.assign({settings:this.props.settings},{children:[R(Yd,{owner:"Dropin",onChange:this.handleStateChange}),R("div",Object.assign({className:"adyen-kyc-dropin-container adl-u-position-relative"},{children:R(Og,{children:this.renderDropinComponent()})}))]}))}))}))}}const Cg=["GB","ES","US"],Rg=["AT","SE"],Dg=["US","CA","AU","HK","NZ","SG"],kg=["AU","HK","NZ","SG"],Lg=(e,t,a)=>({stockExchangeMICIfTypePublic:()=>{var t;if((null===(t=null==e?void 0:e.companyType)||void 0===t?void 0:t.entityType)===Ll.PUBLIC_COMPANY)return"REQUIRED"},stockISINIfTypePublic:()=>{var t;if((null===(t=null==e?void 0:e.companyType)||void 0===t?void 0:t.entityType)===Ll.PUBLIC_COMPANY)return"REQUIRED"},vatRules:()=>{if(!Dg.includes(t))return"REQUIRED"},taxIdRules:()=>{if(Dg.includes(t))return"REQUIRED"},SolePropsExemptedFromTaxRules:()=>{if(Dg.includes(t))return"REQUIRED"},SolePropsExemptedFromRegistrationNumberRules:()=>{if(Rg.includes(t))return"REQUIRED"},SolePropsRegistrationNumberRules:()=>{if(!Cg.includes(t))return"REQUIRED"},partOfTrustFieldsOnlyAU:()=>{if("AU"===t)return"REQUIRED"},registrationNumberIfCountryNotUs:()=>{if("US"!==t)return"REQUIRED"},registrationNumberIfCountryNotUSNorGBNorES:()=>{if(!Cg.includes(t))return"REQUIRED"},accountHolderIfCustomer:()=>{if(a===Cl.COMPANY)return"REQUIRED"},exemptedFromTaxRules:()=>{if(kg.includes(t))return"REQUIRED"}}),wg=cg((function(e){const{i18n:a}=We(),[r,n]=se(null),i={[Nc]:ue(null),[Oc]:ue(null),[Ic]:ue(null),[Ec]:ue(null),[Tc]:ue(null),[Ac]:ue(null)},o=Rl(e,Nc),s=Rl(e,Oc),l=Rl(e,Ic),d=Rl(e,Ec),c=Rl(e,Tc),u=Rl(e,Ac);this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==i?void 0:i[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()};const m=({currentState:t,prevState:a})=>{var r,i,o,s,l,d,c,u,m,p;const g=null===(i=null===(r=t.data)||void 0===r?void 0:r[Oc])||void 0===i?void 0:i.entityType;n(g);const y=null===(s=null===(o=a.data)||void 0===o?void 0:o[Nc])||void 0===s?void 0:s.companyCountry,b=null===(d=null===(l=t.data)||void 0===l?void 0:l[Nc])||void 0===d?void 0:d.companyCountry,f=null===(u=null===(c=t.data)||void 0===c?void 0:c[Oc])||void 0===u?void 0:u.accountHolder;null!=b&&b!==y&&e.onCountryChange(b),g!==(null===(p=null===(m=a.data)||void 0===m?void 0:m[Oc])||void 0===p?void 0:p.entityType)&&e.evaluateConfiguration(t.allData),this.customNavigationHandler=f===Wl.MY_NAME?()=>e.onTypeSwitch(il.INDIVIDUAL):null};return R("div",Object.assign({className:"adyen-kyc-company"},{children:(p=e.activeForm,R("div",Object.assign({className:"adyen-kyc-company"},{children:[R(Yd,{owner:"CompanyComponent",onChange:m}),R("div",Object.assign({className:p.formId!==Nc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(ic,Object.assign({},o,{data:Object.assign(Object.assign({},null==o?void 0:o.data),{companyCountry:e.country}),ref:i[Nc],heading:a.get("nameAndCountry"),id:Nc}))})),R("div",Object.assign({className:p.formId!==Oc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(ad,Object.assign({},s,{ref:i[Oc],heading:a.get("companyStructure"),id:Oc}))})),R("div",Object.assign({className:p.formId!==Ic?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(Zd,Object.assign({},l,{ref:i[Ic],heading:a.get("registrationDetails"),id:Ic,country:e.country,companyType:r}))})),R("div",Object.assign({className:p.formId!==Ec?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(yd,Object.assign({},d,{ref:i[Ec],heading:a.get("registeredAddress"),description:a.get("registeredAddressHeaderDescription"),id:Ec,country:e.country,problems:null==e?void 0:e.problems,handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress}))})),R("div",Object.assign({className:p.formId!==Tc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(fc,Object.assign({},c,{documentField:"registrationDocument",documentType:cc.REGISTRATION_DOCUMENT,ref:i[Tc],heading:a.get("registrationDocument"),guidanceContent:R(t.Fragment,{children:[R("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:a.get("registrationDocumentSubTitle")})),R("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("requirements")]})),R(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[R(hc,{children:a.get("documentIssuedByGovernmentAuthority")}),R(hc,{children:a.get("dateOnDocumentNoOlderThanXMonths",{values:{noOfMonths:12}})})]})),R(ud,{page:"Company registration document",titleId:"whatIfDocumentIsMoreThan12MonthsOld",contentId:"ifDocumentMoreThan12months",title:a.get("whatIfDocumentIsMoreThan12MonthsOld"),content:a.get("ifDocumentMoreThan12months")})]}),id:Tc}))})),R("div",Object.assign({className:p.formId!==Ac?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(fc,Object.assign({},u,{documentField:"taxDocument",documentType:cc.VAT_DOCUMENT,ref:i[Ac],heading:a.get("taxDocument"),guidanceContent:R(t.Fragment,{children:[R("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:a.get("uploadTaxationDocument")})),R("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("requirements")]})),R(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[R(hc,{children:a.get("containsNameOfCompany")}),R(hc,{children:a.get("documentShowsTaxIdOfCompany")}),R(hc,{children:a.get("issuedByTheTaxAuthority")})]}))]}),id:Ac}))}))]})))}));var p}),{getComponentForms:()=>_c,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){if(e){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),jl[t])),{});return a=eg(xl[t],a),a}}(null==e?void 0:e[il.ORGANIZATION],t),rules:Lg,labels:(e,t)=>({registrationNumber:()=>{var a,r,n,i;return"GB"===t&&(null===(a=null==e?void 0:e.companyType)||void 0===a?void 0:a.entityType)===Ll.NON_PROFIT_OR_CHARITABLE?"charityNumber":"FR"===t&&(null===(r=null==e?void 0:e.companyType)||void 0===r?void 0:r.entityType)===Ll.NON_PROFIT_OR_CHARITABLE?"RNA/SIREN/SIRETNumber":"AT"===t&&(null===(n=null==e?void 0:e.companyType)||void 0===n?void 0:n.entityType)===Ll.NON_PROFIT_OR_CHARITABLE||"AT"===t&&(null===(i=null==e?void 0:e.companyType)||void 0===i?void 0:i.entityType)===Ll.INCORPORATED_ASSOCIATION?"firmenbuchnummerOrZVR":void 0}}),getTaskName:()=>"companyDetails"});function Pg(e){var t;const{showToast:a}=pg(),{i18n:r,setLocale:n,setIsLegalEntityPartOfTrust:o}=We(),{handleCreateDocument:s,handleGetDocument:l,handleUpdateDocument:d,handleAddressSearch:c,handleFindAddress:u,taskType:m,trackingConig:p,associationDetail:y,parentLegalEntity:b,legalEntityResponse:f,isTargetLegalEntityType:h}=e,v=mp(f,h),[_,N]=se(v||e.data),[O,I]=se(e.problems),E=Fp({trackingConig:p,parentLegalEntity:b,legalEntity:f,task:m});de((()=>{w.addPageView("Company dropin"),w.addEvent("Started company task",{segmentation:E})}),[]);const T=({forms:e,legalEntity:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){if(S(e)){const e=yield bp(a,t.id);e&&(yield C.uploadDocuments(e,t.id),e.forEach((e=>{w.addEvent("Saved document",{segmentation:Object.assign(Object.assign({},E),{documentType:e.type,fileExtention:e.attachments.map((e=>Sm(e.pageName)))})})})))}})),A=({legalEntity:t})=>i(this,void 0,void 0,(function*(){if(m===Cl.TRUST_MEMBER_COMPANY){const a=$m(b),r=null==y?void 0:y.types;if(r&&D(b,r)){const n={entityAssociations:[...r.map((e=>({type:e,legalEntityId:t.id})))||[],...a.filter((e=>e.legalEntityId!==t.id))||[]]};yield e.handleUpdateLegalEntity(n,b.id)}}})),S=e=>e.some((e=>[_c.companyRegistrationDocument.formId,_c.companyTaxDocument.formId].includes(e.formId))),C=ym(s,l,d),D=(e,t)=>{var a;return(null===(a=$m(b).filter((a=>a.legalEntityId===e.id&&t.includes(a.type))))||void 0===a?void 0:a.length)!==t.length};de((()=>{var t;e.eventEmitter.on("updateLocale",(e=>n(e)));const i=(null===(t=null==f?void 0:f.documentDetails)||void 0===t?void 0:t.map((e=>e.id)))||[];try{i.length&&C.fetchDocuments(i,f.id).then((()=>{const e=(e=>{const t=_m(e,cc.REGISTRATION_DOCUMENT)||null,a=_m(e,cc.VAT_DOCUMENT)||null;return{companyRegistrationDocument:t?{registrationDocument:[{name:Op(t)}]}:null,companyTaxDocument:a?{taxDocument:[{name:Op(a)}]}:null}})(f.id);N(Object.assign(Object.assign({},_),e))})).catch((()=>{a({label:r.get("failedToFetchRelevantDocuments"),type:ug.ERROR})}))}catch(e){a({label:r.get("failedToFetchRelevantDocuments"),type:ug.ERROR})}}),[]);const k=g(r.locale),L=(e,t)=>{var a,r,n,i;return Object.assign(Object.assign({},(null==e?void 0:e.registrationDocument)&&{companyRegistrationDocument:{fileName:null===(r=null===(a=e.registrationDocument)||void 0===a?void 0:a[0])||void 0===r?void 0:r.name}}),(null==t?void 0:t.taxDocument)&&{companyTaxDocument:{fileName:null===(i=null===(n=t.taxDocument)||void 0===n?void 0:n[0])||void 0===i?void 0:i.name}})};return R(_g,Object.assign({defaultData:v},{children:R(wg,{baseTrackingPayload:E,capabilities:e.capabilities,data:_,country:null===(t=null==_?void 0:_.companyNameAndCountry)||void 0===t?void 0:t.companyCountry,taskType:e.taskType,problems:O,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,handleBackClick:e.handleBackClick,onSubmit:({data:t,forms:n,setLoadingStatus:s})=>i(this,void 0,void 0,(function*(){var i;const l=mp(f,!1),d=((e,t)=>(Object.keys(t).forEach((a=>{Object.keys(t[a]).forEach((r=>{void 0===e[a][r]&&(Array.isArray(t[a][r])?e[a][r]=[]:e[a][r]="")}))})),e))(t,l);let c=pp(d);s(Fu.LOADING);const u={companyStructure:t.companyType.entityType,countryOfRegistration:t.companyNameAndCountry.companyCountry,legalEntityName:t.companyNameAndCountry.legalCompanyName,usedAdditionalAddress:t.companyRegistrationDetails.operationalAddressIsSame===rd.OPERATIONAL_ADDRESS_IS_NOT_SAME};try{w.addEvent("Provided company details",{segmentation:Object.assign(Object.assign({},E),u)}),c=(null==f?void 0:f.id)?yield e.handleUpdateLegalEntity(V("type").from(c),f.id):yield e.handleCreateLegalEntity(c),w.addEvent("Saved company details",{segmentation:Object.assign(Object.assign(Object.assign({},E),{legalEntityId:c.id,legalEntityType:c.type}),u)}),yield T({forms:n,legalEntity:c,dataSubmitted:t}),yield A({legalEntity:c}),o((null===(i=null==t?void 0:t.companyType)||void 0===i?void 0:i.isPartOfTrust)===Ml.IS_PART_OF_TRUST),s(Fu.SUCCESS),null==e||e.onSubmit(t)}catch(e){if((null==e?void 0:e.errorCode)===st){const t=gg(e,Cl.COMPANY);I(Object.assign(Object.assign({},O),{validationErrors:t}))}else a({label:r.get("failedToUpdateDetails"),type:ug.ERROR});s(Fu.SUCCESS),w.addEvent("Encountered error company details",{segmentation:Object.assign(Object.assign({},E),{errorCode:e.errorCode,errorMessage:e.title,errorType:"BE"})})}})),legalEntityType:il.ORGANIZATION,summary:{formatData:(e,t)=>{var a,n,i,o,s,l,d,c,u;let m=W(e);if((null===(a=null==m?void 0:m.companyNameAndCountry)||void 0===a?void 0:a.companyCountry)&&(m.companyNameAndCountry.companyCountry=k.getCountryName(m.companyNameAndCountry.companyCountry)),null===(n=null==m?void 0:m.companyType)||void 0===n?void 0:n.entityType){const e=null===(i=Pl.find((e=>{var t;return e.id===(null===(t=m.companyType)||void 0===t?void 0:t.entityType)})))||void 0===i?void 0:i.name;m.companyType.entityType=r.get(e)}if((null===(o=null==m?void 0:m.companyType)||void 0===o?void 0:o.accountHolder)&&(m.companyType.accountHolder=r.get(null===(s=null==m?void 0:m.companyType)||void 0===s?void 0:s.accountHolder)),(null===(l=null==m?void 0:m.companyRegistrationDetails)||void 0===l?void 0:l.registrationAddress)&&(m.companyRegistrationDetails.hasInnerForms=!0,m.companyRegistrationDetails.registrationAddress=Pe(null==m?void 0:m.companyRegistrationDetails.registrationAddress,k)),(null===(d=null==m?void 0:m.companyRegistrationDetails)||void 0===d?void 0:d.operationalAddress)&&(m.companyRegistrationDetails.operationalAddress=Pe(null==m?void 0:m.companyRegistrationDetails.operationalAddress,k)),null===(c=m.companyDetails)||void 0===c?void 0:c.vatAbsenceReason){const e=Rd.find((e=>e===m.companyDetails.vatAbsenceReason));e&&(m.companyDetails.vatAbsenceReason=r.get(e))}return S(t)&&(Sc.forEach((e=>delete m[e])),m=Object.assign(Object.assign({},m),L(e.companyRegistrationDocument,e.companyTaxDocument))),(null===(u=null==m?void 0:m.companyType)||void 0===u?void 0:u.isPartOfTrust)&&(m.companyType.isPartOfTrust=r.get(Lm(m.companyType.isPartOfTrust))),m},getOmittedKeys:()=>["operationalAddressIsSame"]},hasDataChanged:e=>i(this,void 0,void 0,(function*(){var t;const a=(null===(t=pp(e))||void 0===t?void 0:t.organization)||{},r=(null==f?void 0:f.organization)||{},n=yield bp(e,"");return!B(a,r)||n.length>0})),canSubmit:e=>sl.ORGANIZATION.every((t=>{const a=Ip(e,t);return!Ss(a)})),handleAddressSearch:c,handleFindAddress:u,onTypeSwitch:e.onTypeSwitch})}))}function jg(){return R("div",{children:[R("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--small"}),R("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--large"}),R("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--small"}),R("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--large"})]})}function xg({className:e,children:t}){return R("section",Object.assign({className:a("adl-card-group",e)},{children:t}))}const Mg={1:"h1",2:"h2",3:"h3",4:"h4",sub:"div"};function Fg({className:e,level:r,children:n}){const i=Mg[r]||Mg[1],o=a("adl-heading",`adl-heading--${r}`,e);return t.createElement(i,{className:o},n)}const Vg=({title:e,children:t})=>R("article",Object.assign({className:"adyen-task-list-group"},{children:[e&&R("header",Object.assign({className:"adyen-task-list-group__header"},{children:R(Fg,Object.assign({level:4},{children:e}))})),R("main",Object.assign({className:"adl-card__body"},{children:R(xg,Object.assign({className:"adyen-task-list-group__items"},{children:t}))}))]})),Ug=({className:e,problems:t})=>{const{i18n:a}=We();if((null==t?void 0:t.verificationErrors)&&Object.keys(t.verificationErrors).length>0){const r=Object.values(t.verificationErrors).reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{}),n=Object.keys(r);if(1===n.length){const t=Object.values(r[n[0]]).flat();if(1===t.length){const r=a.get(`errorMessage_${n[0]}`),i=a.get(`remediationMessage_${t[0].code}`);return R(zs,{className:e,hasCloseButton:!1,type:Ks.ERROR,title:`${r}. ${i}`})}}}return R(zs,{className:e,hasCloseButton:!1,type:Ks.ERROR,title:a.get("verificationErrorMessage")})},Bg=({text:e,className:t,iconStatusClass:r,icon:n})=>{const i=a("adl-status",t),o=a("adl-status__icon",r);return R("div",Object.assign({className:i},{children:[R("span",Object.assign({className:o},{children:"loading"===n?R(Ze,{size:"xsmall",dot:!0}):R(xe,{name:n})})),R("span",Object.assign({className:"adl-status__text"},{children:e}))]}))},Wg=({status:e,downloadHandler:t})=>{const{i18n:a,isReview:r}=We(),n=e=>{e.stopPropagation(),t()};switch(e){case Sl.DOWNLOAD:return R("span",Object.assign({className:"adl-status--download",role:"button",tabIndex:0,icon:"download",onClick:n},{children:[a.get("download")," "]}));case Sl.FINISHED:return R(Bg,{className:"adl-status--finished",iconStatusClass:"adl-status__icon--finished",icon:"check",text:a.get("finished")});case Sl.ERROR:return R(Bg,{className:"adl-status--error",iconStatusClass:"adl-status__icon--error",icon:"info-circle",text:a.get("unsuccessful")});case Sl.PROCESSING:return R(Bg,{className:"",iconStatusClass:"",icon:"loading",text:a.get("processing")});case Sl.DETAILS_REQUIRED:case Sl.EMPTY:default:return R("span",Object.assign({className:"adl-task-status-details-required"},{children:r?a.get("verify"):a.get("go")}))}};function Hg({className:e,children:t,stateful:r,active:n,disabled:i,title:o,subTitle:s,onClick:l,onKeyDown:d}){const c=a("adl-card",e,{"adl-card--stateful":r,"adl-card--active":r&&n,"adl-card--disabled":i}),u=r&&0,m=r&&"button";return R("article",Object.assign({className:c,tabIndex:u,role:m,onClick:e=>{i||l(e)},onKeyDown:d},{children:[o&&R("header",Object.assign({className:"adl-card__header"},{children:[R(Fg,Object.assign({level:4},{children:o})),s&&R(Fg,Object.assign({level:"sub"},{children:s}))]})),R("main",Object.assign({className:"adl-card__body"},{children:t}))]}))}const qg=({title:e,tagline:t,icon:a,status:r,onNavigateToTask:n,disabled:i=!1,problems:o,downloadHandler:s})=>R(Hg,Object.assign({stateful:!0,onClick:()=>n(),onKeyDown:e=>{e.key===ot.enter&&n()},className:"adyen-task",disabled:i},{children:[R("div",Object.assign({className:"adyen-task-item"},{children:[R("div",Object.assign({className:"adyen-task-item__heading"},{children:[R("span",Object.assign({className:"adyen-task-item__icon-wrapper"},{children:R(xe,{name:a})})),R("div",Object.assign({className:"adyen-task-item__body"},{children:[R("span",Object.assign({className:"adyen-task-item__tagline"},{children:t})),R("span",Object.assign({className:"adyen-task-item__title"},{children:e}))]}))]})),R("aside",Object.assign({className:"adyen-task-item__status"},{children:[R(Wg,{status:r,downloadHandler:s}),R(xe,{className:"adl-u-color-grey-60",name:"chevron-right"})]}))]})),r===Sl.ERROR&&R(Ug,{className:"adyen-task-item-alert",problems:o})]}));var Gg;!function(e){e.BANK_ACCOUNT="BankAccount",e.LEGAL_ENTITY="LegalEntity",e.DOCUMENTS="Documents"}(Gg||(Gg={}));const $g=e=>{var t;return(null===(t=e.transferInstruments)||void 0===t?void 0:t.length)>0};function Xg({tasks:e,onNavigateToTask:a,legalEntityResponse:r,capabilityProblems:n,onPciDownload:i,pciStatus:o,serviceAgreementTypes:s}){var l,d,c,u,m,p,g,y,b,f;const{i18n:h,isLegalEntityPartOfTrust:v,accountHolder:_}=We(),N=e.some((e=>[Cl.INDIVIDUAL,Cl.COMPANY,Cl.DECISION_MAKER_OVERVIEW].includes(e))),O=v||Dm(r),I=e.some((e=>[Cl.SERVICE_AGREEMENT,Cl.PCI_DSS].includes(e))),E=e.some((e=>e===Cl.COMPANY)),T=_===Wl.MY_SOLE_TRADER_NAME||Ym(r),A=(null==r?void 0:r.transferInstruments)||[],S=(null===(l=null==r?void 0:r.organization)||void 0===l?void 0:l.legalName)||(null===(d=null==r?void 0:r.individual)||void 0===d?void 0:d.name),C=e.includes(Cl.PAYIN)&&!e.includes(Cl.PAYOUT),D=(r.type===il.ORGANIZATION&&!!(null===(c=null==r?void 0:r.entityAssociations)||void 0===c?void 0:c.length)||r.type===il.INDIVIDUAL&&!!(null==r?void 0:r.individual))&&e.includes(Cl.PCI_DSS),k="true"===(null==o?void 0:o.signingRequired)||!0===(null==o?void 0:o.signingRequired),L=!k&&(null==o?void 0:o.hasDocuments),w=!D||!k&&!(null==o?void 0:o.hasDocuments)||L,P=L||k,j=e.includes(Cl.SERVICE_AGREEMENT)&&(null==s?void 0:s.length)>0,x=!(r.type===il.ORGANIZATION&&hu(r).length||r.type===il.INDIVIDUAL&&!!(null==r?void 0:r.individual)),M=I&&(P||j),F=e=>a(C?Cl.PAYIN:Cl.PAYOUT,e);return R("div",{children:[N&&R(Vg,Object.assign({title:E?h.get("businessAccountDetailsDescription"):h.get("accountDetailsDescription")},{children:[R(rg,{}),e.includes(Cl.INDIVIDUAL)&&R(qg,{onNavigateToTask:()=>a(Cl.INDIVIDUAL),icon:"decision-maker",title:h.get("providePersonalDetails"),status:Zm(Gg.LEGAL_ENTITY,n,r,[r.id]),problems:null===(u=null==n?void 0:n.LegalEntity)||void 0===u?void 0:u[r.id]}),T&&R(qg,{onNavigateToTask:()=>a(Cl.SOLE_PROPRIETOR_COMPANY),icon:"company",title:h.get("enterSoleProprietorDetails"),status:Zm(Gg.LEGAL_ENTITY,n,r,Xm(r)),problems:Km(r,n)}),e.includes(Cl.COMPANY)&&R(qg,{onNavigateToTask:()=>a(Cl.COMPANY),icon:"company",title:h.get("provideCompanyDetails"),status:Zm(Gg.LEGAL_ENTITY,n,r,[r.id]),problems:null===(m=null==n?void 0:n.LegalEntity)||void 0===m?void 0:m[r.id]}),e.includes(Cl.DECISION_MAKER)&&R(qg,{onNavigateToTask:()=>a(Cl.DECISION_MAKER_OVERVIEW),icon:"decision-maker",title:h.get("addDecisionMakers"),status:Ou(r)?Zm(Gg.LEGAL_ENTITY,n,r,vu(r)):Sl.DETAILS_REQUIRED})]})),O&&R(Vg,Object.assign({title:h.get("trustDetailsDescription")},{children:[R(qg,{onNavigateToTask:()=>a(Cl.TRUST),icon:"trust",title:h.get("provideTrustDetails"),status:Zm(Gg.LEGAL_ENTITY,n,r,xm(r)),problems:Mm(r,n)}),R(qg,{onNavigateToTask:()=>a(Cl.TRUST_MEMBER_OVERVIEW),icon:"decision-maker",title:h.get("addTrustMembers"),status:Fm(r)?Zm(Gg.LEGAL_ENTITY,n,r,Pm(r)):Sl.DETAILS_REQUIRED})]})),(e.includes(Cl.PAYOUT)||e.includes(Cl.PAYIN))&&R(Vg,Object.assign({title:h.get(C?"payinAccountsDescription":"payoutAccountsDescription")},{children:A.length>0?R(t.Fragment,{children:[A.map((e=>{var t;return R(qg,{onNavigateToTask:()=>F(e.id),icon:"payout",title:e.accountIdentifier,tagline:h.get("payoutDetails"),status:$g(r)?Zm(Gg.BANK_ACCOUNT,n,r,[e.id]):Sl.DETAILS_REQUIRED,problems:null===(t=null==n?void 0:n.BankAccount)||void 0===t?void 0:t[e.id]})})),R(Hg,Object.assign({stateful:!0,onClick:()=>F(null),className:"adyen-task adl-add-payout",disabled:!S},{children:[R(xe,{name:"plus",className:"adl-u-padding-top-2 adl-u-margin-right-8"}),R("span",{children:h.get(C?"addExtraPayinAccount":"addExtraPayoutAccount")})]}))]}):R(qg,{onNavigateToTask:F,icon:"payout",title:h.get(C?"providePayinDetails":"providePayoutDetails"),status:$g(r)?Zm(Gg.BANK_ACCOUNT,n,r,[null===(g=null===(p=null==r?void 0:r.transferInstruments)||void 0===p?void 0:p[0])||void 0===g?void 0:g.id]):Sl.DETAILS_REQUIRED,disabled:!S,problems:null===(y=null==n?void 0:n.BankAccount)||void 0===y?void 0:y[null===(f=null===(b=null==r?void 0:r.transferInstruments)||void 0===b?void 0:b[0])||void 0===f?void 0:f.id]})})),M&&R(Vg,Object.assign({title:h.get("toCompleteProcessReviewAndSignOfficialDocumentation")},{children:[j&&s.map((e=>R(qg,{onNavigateToTask:()=>(e=>a(Cl.SERVICE_AGREEMENT,e))(e),icon:"contract",title:h.get("signServiceAgreement"),disabled:x,status:Sl.DETAILS_REQUIRED},e))),P&&R(qg,{onNavigateToTask:()=>!L&&a(Cl.PCI_DSS),icon:"pci",title:h.get("pciDssQuestionnaire"),status:L?Sl.DOWNLOAD:Sl.DETAILS_REQUIRED,downloadHandler:i,disabled:w})]}))]})}const Yg=({name:e,types:r,status:n,actions:i,reviewActions:o,problems:s,infoContent:l})=>{const{i18n:d,isReview:c}=We(),[u,m]=se(!1),p=a("adl-entity-association__more-actions-toggle",{"adl-entity-association__more-actions-toggle--open":u}),g=a("adl-entity-association__more-actions",{"adl-entity-association__more-actions--open":u});return R("div",Object.assign({className:"adl-entity-association"},{children:[R("div",Object.assign({className:"adl-entity-association__top"},{children:[R("h3",Object.assign({className:"adl-entity-association__title"},{children:e})),R("div",Object.assign({className:"adl-entity-association__info"},{children:c&&o?{reviewActions:o}:R(t.Fragment,{children:[R(Wg,{status:n}),i&&R("div",Object.assign({className:"adl-entity-association__actions"},{children:[R(Gc,{className:p,ghost:!0,icon:"more-horiz",onClick:()=>m(!u),title:d.get("toggleAssociationMenu",{values:{name:e}})}),R("div",Object.assign({className:g},{children:i}))]}))]})}))]})),R("div",{children:r.map((e=>R(ze,Object.assign({className:`adl-entity-association__tag ${qm(e)}`,isBasic:!0},{children:d.get(Gm(e))}),e)))}),n===Sl.ERROR&&R(Ug,{className:"adl-entity-association-alert",problems:s}),l]}))},Kg=({decisionMakerType:e,country:t})=>{const{i18n:a}=We();return R("div",Object.assign({className:"adl-decision-makers__box"},{children:[R(ze,Object.assign({className:`adl-u-margin-bottom-8 adl-decision-makers__tag ${qm(e)}`,isBasic:!0},{children:a.get(Gm(e))}),e),R("span",{dangerouslySetInnerHTML:{__html:a.get(bu(t)[e])}})]}))},zg=({trackingConig:e,parentLegalEntity:r,legalEntityResponse:n,capabilityProblems:o,onNavigateToIndividual:s,handleUpdateLegalEntity:l,navigateBackToTaskList:d,onDecisionMakerDelete:c})=>{var u,m;const{i18n:p}=We(),{showToast:g}=pg(),y=fu(n),b=null===(m=null===(u=null==n?void 0:n.organization)||void 0===u?void 0:u.registeredAddress)||void 0===m?void 0:m.country,f=function(e){const t=pu(e).filter((e=>1===e.roleTypes.length)).map((e=>e.roleTypes[0]));return[...new Set(t)]}(b),h=null==y?void 0:y.reduce(((e,t)=>{var a;const r=e[t.legalEntityId],i=t.type;return e[t.legalEntityId]={legalEntityId:t.legalEntityId,types:r?[...r.types,i]:[i],status:Zm(Gg.LEGAL_ENTITY,o,n,[t.legalEntityId]),name:t.name,legalEntityType:t.entityType,problems:null===(a=null==o?void 0:o.LegalEntity)||void 0===a?void 0:a[t.legalEntityId]},e}),{}),v=h?Object.values(h):[],_=0===Nu(n,Cl.DECISION_MAKER).length,N=Fp({trackingConig:e,parentLegalEntity:r,legalEntity:n,task:Cl.DECISION_MAKER_OVERVIEW}),O=e=>{s(e.legalEntityId),w.addEvent("Edited decision maker",{segmentation:Object.assign(Object.assign({},N),{legalEntityId:e.legalEntityId,legalEntityType:e.legalEntityType,roles:e.types})})},I=e=>R(t.Fragment,{children:[R(Gc,{className:"adl-entity-association__edit",ghost:!0,icon:"edit",onClick:()=>O(e),label:p.get("edit"),title:p.get("editDecisionMakerDetails",{values:{decisionMaker:e.name}})}),R(Gc,{className:"adl-entity-association__delete",ghost:!0,icon:"bin",onClick:()=>(e=>i(void 0,void 0,void 0,(function*(){try{const t={entityAssociations:n.entityAssociations.filter((t=>t.legalEntityId!==e.legalEntityId))};yield l(t,n.id),c();const a=y.filter((t=>t.legalEntityId!==e.legalEntityId));w.addEvent("Removed decision maker",{segmentation:Object.assign(Object.assign({},N),{legalEntityId:e.legalEntityId,legalEntityType:e.legalEntityType,roles:e.types,remainingDecisionMakers:a})}),g({type:ug.SUCCESS,label:p.get("successFullyRemovedDecisionMaker")})}catch(e){g({type:ug.ERROR,label:p.get("failedToRemoveDecisionMaker")})}})))(e),label:p.get("remove"),title:p.get("removeDecisionMaker",{values:{decisionMaker:e.name}})})]}),E=e=>R(Gc,{showAsLink:!0,icon:"chevron-right",onClick:()=>O(e.legalEntityId),label:p.get("verify"),title:p.get("verifyDecisionMakerDetails",{values:{decisionMaker:e.name}})});return R(og,{content:R(t.Fragment,{children:R("div",Object.assign({className:"adl-decision-makers adl-u-width-full"},{children:[R(Ms,{heading:p.get("decisionMaker"),description:p.get("decisionMakerDescription")}),R("div",Object.assign({className:"adl-decision-makers__container"},{children:f.map((e=>R(Kg,{decisionMakerType:e,country:b},e)))})),R(rg,{}),R(ud,{page:"Decision makers",title:p.get("whatIsTheDifferenceBetweenTheseRoles"),content:R("ul",Object.assign({className:"adl-guidance-list"},{children:f.map((e=>R("li",{dangerouslySetInnerHTML:{__html:p.get(`${"uboThroughControl"===e?"controllingPerson":"uboThroughOwnership"===e?"owner":e}GuideDescription`)}},e)))})),titleId:"whatIsTheDifferenceBetweenTheseRoles",contentId:"differenceBetweenAnOwnerControllingPersonAndSignatory"}),(null==v?void 0:v.length)>0?R("div",Object.assign({className:"adl-decision-makers__wrapper"},{children:v.map((e=>R(Yg,{types:e.types,legalEntityId:e.legalEntityId,name:e.name,status:e.status,actions:I(e),reviewActions:E(e),problems:null==e?void 0:e.problems},e.legalEntityId)))})):null,R(Gc,{secondary:!0,className:a("adl-decision-makers__add",{"adl-decision-makers__add--more":(null==v?void 0:v.length)>0}),icon:"plus",onClick:e=>{e.stopPropagation(),s()},label:p.get("addDecisionMaker"),disabled:_}),R(ag,{onHome:()=>{w.addEvent("Saved decision makers list",{segmentation:Object.assign(Object.assign({},N),{noOfDecisionMakers:y.length})}),d()},homeButtonLabel:p.get("saveAndGoToOverview")})]}))})})};var Zg;!function(e){e.BANK_STATEMENT="bankStatement",e.DEPOSIT_TICKET="depositTicket",e.SCREENSHOT_OF_BANK="screenshotOfOnlineBankingEnviroment",e.OFFICIAL_EMAIL="officialEmailOrALetterFromYourBank",e.CHEQUES="cheques",e.RELEVE_DIDENTITE="releveDidentiteBancaire"}(Zg||(Zg={}));const Qg=[{id:Zg.BANK_STATEMENT,name:"bankStatement"},{id:Zg.DEPOSIT_TICKET,name:"depositTicket"},{id:Zg.SCREENSHOT_OF_BANK,name:"screenshotOfOnlineBankingEnviroment"},{id:Zg.OFFICIAL_EMAIL,name:"officialEmailOrALetterFromYourBank"},{id:Zg.CHEQUES,name:"cheques"},{id:Zg.RELEVE_DIDENTITE,name:"releveDidentiteBancaire"}],Jg=["bankStatementDocument","description"];const ey=yt((function(e){var a,r;const{i18n:n,commonProps:i}=We(),o=ue(null),[s,l]=se({}),[d,c]=se(null),{country:u,optionalFields:m}=e,{handleChangeFor:p,data:g,valid:y,setValid:b,fieldProblems:f,errors:h,triggerValidation:v,setData:_}=ua(Object.assign(Object.assign({},e),{schema:["description"],defaultData:e.data,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors}));de((()=>{v()}),[]);const N=ra(e,n),O=ue({setState:null});return this.triggerValidation=()=>{N.isRequiredField("bankStatementDocument")&&o.current.triggerValidation()},de((()=>{var t;e.data.bankStatementDocument&&(l({bankStatementDocument:e.data.bankStatementDocument}),_("description",null===(t=e.data)||void 0===t?void 0:t.description))}),[e.data]),de((()=>{O.current.setState({type:"addToState",value:{data:g,valid:y,errors:h,fieldProblems:f,caller:e.id,dataStoreId:e.id,schema:Jg}})}),[g,y,h,f]),de((()=>{const e=m.includes("bankStatementDocument");e?b("bankStatementDocument",!0):e||(null==o?void 0:o.current)||b("bankStatementDocument",!1)}),[m]),R("form",Object.assign({className:"adyen-kyc-payout__bank-statement","aria-describedby":i.showInlineErrors?null:"ariaErrorField"},{children:[R(Ys,{owner:e.id,stateRef:O}),R(Ms,{heading:e.heading}),R(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:N,id:"ariaErrorField"}),N.isVisibleField("bankStatementDocument")&&R(t.Fragment,{children:[R("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:n.get("bankStatementDocumentTypeLabel",{values:{name:e.name}})})),R(Ue,Object.assign({name:"documentType",label:N.getLabel("bankStatementDocument","selectDocumentType"),className:"adyen-kyc-field--bankStatementDocumentType"},{children:Jt("select",{onChange:e=>c(e.target.value),name:"documentType",placeholder:n.get("selectDocument"),selected:d,items:(()=>{let e=Qg;return"FR"!==u&&(e=e.filter((e=>e.id!==Zg.RELEVE_DIDENTITE))),e.map((({id:e,name:t})=>({id:e,name:n.get(t)})))})()})})),d?R("div",{children:[R("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",n.get("requirements")]})),R(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[R(hc,{children:n.get("accountHolderNameMatchesWithBusinessOrTradingName")}),R(hc,{children:n.get("accountNumberOrIbanVisible")}),R(hc,{children:n.get("dateOnDocumentNoOlderThanXMonths",{values:{numberOfMonths:12}})}),R(hc,{children:n.get("showsCountryOfBankAccount")}),R(hc,{children:n.get("hasTobeOfficialDocumentFromBank")})]})),R(mc,{type:cc.BANK_STATEMENT,className:"adl-u-margin-y-24"})]}):null,d||!Ss(null===(a=e.data)||void 0===a?void 0:a.bankStatementDocument)?R(Ue,Object.assign({className:"adyen-kyc-field--bankStatementDocument adyen-kyc-upload-field",name:"bankStatementDocument",isValid:y.bankStatementDocument},{children:R(bc,{name:"bankStatementDocument",ref:o,id:e.id,defaultData:s,isOptional:N.isOptionalField("bankStatementDocument"),iconPrefix:uc(cc.BANK_STATEMENT,!0)})})):null]}),d||!Ss(null===(r=e.data)||void 0===r?void 0:r.bankStatementDocument)?R(Ue,Object.assign({name:"description",label:N.getLabel("description"),helper:n.get("descriptionHelper"),errorMessage:N.getErrorMessage("description",h,f),isValid:y.description},{children:Jt("textArea",{name:"description",value:g.description,classNameModifiers:["description"],maxLength:200,onInput:p("description"),"aria-label":N.getLabel("description"),"aria-invalid":!y.description})})):null]}))}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.optionalFields,t.optionalFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name)),ty=["bankAccountNumber"];function ay(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:ty,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors,maskedFields:e.maskedFields}));de((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:m,caller:"bankAccountNumber",dataStoreId:n}})}),[l,d,c,u]);const g=ra(e,a);return this.triggerValidation=p,R(t.Fragment,{children:[R(Ys,{stateRef:o}),R(Ue,Object.assign({name:"bankAccountNumber",label:g.getLabel("bankAccountNumber"),classNameModifiers:["bankAccountNumber"],errorMessage:g.getErrorMessage("bankAccountNumber",c,m)||"",isValid:d.bankAccountNumber,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"bankAccountNumber",value:l.bankAccountNumber,readonly:g.isReadOnly("bankAccountNumber"),classNameModifiers:["bankAccountNumber"],onInput:s("bankAccountNumber","input"),onBlur:s("bankAccountNumber","blur"),"aria-required":!0,"aria-label":g.getLabel("bankAccountNumber"),"aria-invalid":!d.bankAccountNumber})}))]})}var ry;!function(e){e.AUD="AUD",e.BGN="BGN",e.BRL="BRL",e.CAD="CAD",e.CHF="CHF",e.CZK="CZK",e.DKK="DKK",e.EUR="EUR",e.GBP="GBP",e.HUF="HUF",e.HRK="HRK",e.PLN="PLN",e.NOK="NOK",e.RON="RON",e.SGD="SGD",e.SEK="SEK",e.USD="USD"}(ry||(ry={}));const ny={AUD:[ry.AUD],AUS:[ry.EUR],BE:[ry.EUR],BR:[ry.BRL],BG:[ry.BGN,ry.EUR],CA:[ry.CAD,ry.USD],HR:[ry.HRK,ry.EUR],CY:[ry.EUR],CZ:[ry.CZK,ry.EUR],DK:[ry.DKK,ry.EUR],EE:[ry.EUR],FI:[ry.EUR],FR:[ry.EUR],DE:[ry.EUR],GR:[ry.EUR],HU:[ry.HUF,ry.EUR],IE:[ry.EUR],IT:[ry.EUR],LV:[ry.EUR],LI:[ry.CHF,ry.EUR],LT:[ry.EUR],LU:[ry.EUR],MT:[ry.EUR],NL:[ry.EUR],NO:[ry.NOK,ry.EUR],PL:[ry.PLN,ry.EUR],PT:[ry.EUR],RO:[ry.RON,ry.EUR],SGD:[ry.SGD],SK:[ry.EUR],ES:[ry.EUR],SE:[ry.SEK,ry.EUR],CH:[ry.CHF,ry.EUR],GB:[ry.GBP,ry.EUR],US:[ry.USD]},iy=["swiftCode"];function oy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:iy,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));de((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:m,caller:"swiftCode",dataStoreId:n}})}),[l,d,c,u]);const g=ra(e,a);return this.triggerValidation=p,R(t.Fragment,{children:[R(Ys,{stateRef:o}),R(Ue,Object.assign({name:"swiftCode",label:g.getLabel("swiftCode"),classNameModifiers:["swiftCode"],errorMessage:g.getErrorMessage("swiftCode",c,m),isValid:d.swiftCode,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"swiftCode",value:l.swiftCode,readonly:g.isReadOnly("swiftCode"),onInput:s("swiftCode","input"),onBlur:s("swiftCode","blur"),"aria-required":!0,"aria-label":g.getLabel("swiftCode"),"aria-invalid":!d.swiftCode})}))]})}const sy=["branchCode"];function ly(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:sy,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));de((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:m,caller:"branchCode",dataStoreId:n}})}),[l,d,c,u]);const g=ra(e,a);return this.triggerValidation=p,R(t.Fragment,{children:[R(Ys,{stateRef:o}),R(Ue,Object.assign({name:"branchCode",label:g.getLabel("branchCode"),classNameModifiers:["branchCode"],errorMessage:g.getErrorMessage("branchCode",c,m)||"",isValid:d.branchCode,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"branchCode",value:l.branchCode,readonly:g.isReadOnly("branchCode"),onInput:s("branchCode","input"),onBlur:s("branchCode","blur"),"aria-required":!0,"aria-label":g.getLabel("branchCode"),"aria-invalid":!d.branchCode})}))]})}const dy=["iban"],cy=(e,t)=>{const{iban:a}=e;return{iban:[...a,{modes:["blur","input"],validate:e=>null===function(e,t){if(Ss(e))return null;const a=e.replace(/ /g,"").toUpperCase(),r="validationPleaseEnterAValidIban";if(!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(a))return r;const n=a.substring(0,2);if(t&&!t.includes(n))return r;const i={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{26}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"}[n];if(void 0!==i&&!new RegExp(`^[A-Z]{2}\\d{2}${i}$`,"").test(a))return r;const o=a.substring(4,a.length)+a.substring(0,4);let s=!0,l="";for(let e=0;e<o.length;e+=1){const t=o.charAt(e);"0"!==t&&(s=!1),s||(l+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(t))}let d=0;for(let e=0;e<l.length;e+=1)d=+`${d}${l.charAt(e)}`%97;return 1===d?null:r}(e,t),errorMessage:"validationPleaseEnterAValidIban"}]}};function uy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,country:i,validators:o}=e,s=ue({setState:null}),{handleChangeFor:l,data:d,valid:c,errors:u,isValid:m,fieldProblems:p,triggerValidation:g}=ua(Object.assign(Object.assign({},e),{schema:dy,rules:cy(o,i),defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors,maskedFields:e.maskedFields}));de((()=>{s.current.setState({type:"addToState",value:{data:d,valid:c,errors:u,fieldProblems:p,caller:"iban",dataStoreId:n}})}),[d,c,u,m]);const y=ra(e,a);return this.triggerValidation=g,R(t.Fragment,{children:[R(Ys,{stateRef:s}),R(Ue,Object.assign({name:"iban",label:y.getLabel("iban"),errorMessage:y.getErrorMessage("iban",u,p)||"",isValid:c.iban,showInlineErrors:r.showInlineErrors},{children:R(Vt,{name:"iban",value:d.iban,readonly:y.isReadOnly("iban"),classNameModifiers:["iban"],onInput:l("iban","blur"),onBlur:l("iban","blur"),"aria-required":!0,"aria-label":y.getLabel("iban"),"aria-invalid":!c.iban,transformInput:e=>e.toUpperCase()})}))]})}const my=["bankName"];function py(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:my,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));de((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:m,caller:"bankName",dataStoreId:n}})}),[l,d,c,u]);const g=ra(e,a);return this.triggerValidation=p,R(t.Fragment,{children:[R(Ys,{stateRef:o}),R(Ue,Object.assign({name:"bankName",label:g.getLabel("bankName"),classNameModifiers:["bankName"],errorMessage:g.getErrorMessage("bankName",c,m)||"",isValid:d.bankName,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"bankName",value:l.bankName,readonly:g.isReadOnly("bankName"),onInput:s("bankName","input"),onBlur:s("bankName","blur"),"aria-required":!0,"aria-label":g.getLabel("bankName"),"aria-invalid":!d.bankName})}))]})}const gy=["bankCode"];function yy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:gy,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));de((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:m,caller:"bankCode",dataStoreId:n}})}),[l,d,c,u]);const g=ra(e,a);return this.triggerValidation=p,R(t.Fragment,{children:[R(Ys,{stateRef:o}),R(Ue,Object.assign({name:"bankCode",label:g.getLabel("bankCode"),classNameModifiers:["bankCode"],errorMessage:g.getErrorMessage("bankCode",c,m)||"",isValid:d.bankCode,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"bankCode",value:l.bankCode,readonly:g.isReadOnly("bankCode"),onInput:s("bankCode","input"),onBlur:s("bankCode","blur"),"aria-required":!0,"aria-label":g.getLabel("bankCode"),"aria-invalid":!d.bankCode})}))]})}const by=["bankCity"];function fy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:l,valid:d,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:by,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));de((()=>{o.current.setState({type:"addToState",value:{data:l,valid:d,errors:c,fieldProblems:m,caller:"bankCity",dataStoreId:n}})}),[l,d,c,u]);const g=ra(e,a);return this.triggerValidation=p,R(t.Fragment,{children:[R(Ys,{stateRef:o}),R(Ue,Object.assign({name:"bankCity",label:g.getLabel("bankCity"),classNameModifiers:["bankCity"],errorMessage:g.getErrorMessage("bankCity",c,m),isValid:d.bankCity,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"bankCity",value:l.bankCity,readonly:g.isReadOnly("bankCity"),onInput:s("bankCity","input"),onBlur:s("bankCity","blur"),"aria-required":!0,"aria-label":g.getLabel("bankCity"),"aria-invalid":!d.bankCity})}))]})}const hy=["accountHolder",...dy,...sy,...iy,"currency",...ty,...my,...gy];const vy=yt((function(e){const{i18n:t,commonProps:a,accountHolder:r}=We(),{legalEntityResponse:n}=e,i=e.requiredFields||hy,o=ue(null),s=ue(null),l=ue(null),d=ue(null),c=ue(null),u=ue(null),m=ue(null),p=ue({setState:null}),{data:g,valid:y,errors:b,isValid:f,handleChangeFor:h}=ua(Object.assign(Object.assign({},e),{defaultData:e.data,schema:i,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),v=ra(Object.assign(Object.assign({},e),{requiredFields:i}),t);de((()=>{p.current.setState({type:"addToState",value:{data:g,valid:y,errors:b,caller:e.id,dataStoreId:e.id}})}),[g,y,b,f]),this.triggerValidation=()=>{v.isRequiredField("bankAccountNumber")&&o.current.triggerValidation(),v.isRequiredField("branchCode")&&s.current.triggerValidation(),v.isRequiredField("swiftCode")&&d.current.triggerValidation(),v.isRequiredField("iban")&&c.current.triggerValidation(),v.isRequiredField("bankName")&&u.current.triggerValidation(),v.isRequiredField("bankCode")&&m.current.triggerValidation(),v.isRequiredField("bankCity")&&l.current.triggerValidation()};const _=Dl(e,ty),N=Dl(e,iy),O=Dl(e,dy),I=Dl(e,sy),E=Dl(e,my),T=Dl(e,gy),A=Dl(e,by),S=r===Wl.MY_SOLE_TRADER_NAME||Ym(n);return R("form",Object.assign({className:"adyen-kyc-individual__payout-account","aria-describedby":a.showInlineErrors?null:"ariaErrorField"},{children:[R(Ys,{owner:e.id,stateRef:p}),R(Ms,{heading:e.heading}),R(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:v,id:"ariaErrorField"}),R(ud,{page:"Payout account details",titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingPayoutDetails",title:t.get("whyDoINeedToFillInThisInformation"),content:t.get("reasonForFillingPayoutDetails")}),v.isRequiredField("accountHolder")&&R(Ue,Object.assign({name:"accountHolder",label:v.getLabel("accountHolder"),helper:t.get(S?"accountHolderDescriptionSoleProp":n.type===il.ORGANIZATION?"accountHolderDescriptionCompany":"accountHolderDescriptionIndividual"),classNameModifiers:["accountHolder"],isValid:y.accountHolder,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"accountHolder",value:g.accountHolder,placeholder:v.getPlaceholder("accountHolder"),readonly:!0,onInput:h("accountHolder","input"),onBlur:h("accountHolder","blur"),"aria-required":!0,"aria-label":v.getLabel("accountHolder"),"aria-invalid":!y.accountHolder,showInlineErrors:a.showInlineErrors})})),v.isRequiredField("bankAccountNumber")&&R(ay,Object.assign({},_,{dataStoreId:e.id,ref:o})),v.isRequiredField("iban")&&R(uy,Object.assign({},O,{dataStoreId:e.id,country:g.bankCountry,ref:c})),v.isRequiredField("swiftCode")&&R(oy,Object.assign({},N,{dataStoreId:e.id,ref:d})),v.isRequiredField("bankName")&&R(py,Object.assign({},E,{dataStoreId:e.id,ref:u})),v.isRequiredField("bankCode")&&R(yy,Object.assign({},T,{dataStoreId:e.id,ref:m})),v.isRequiredField("branchCode")&&R(ly,Object.assign({},I,{dataStoreId:e.id,ref:s})),v.isRequiredField("bankCity")&&R(fy,Object.assign({},A,{dataStoreId:e.id,ref:l}))]}))}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.optionalFields,t.optionalFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name));var _y;!function(e){e.INSTANT_VERIFICATION="instantVerification",e.MANUAL_VERIFICATION="manualVerification"}(_y||(_y={}));const Ny=["payoutVerificationMethod"];function Oy(e){var a;const{i18n:r,loadingContext:n}=We(),i=e.id,o=Ny,s=ue({setState:null});function l(){if(e.bankVerificationVendors)return"TRUSTLY"===e.bankVerificationVendors[e.country]?"trustly":"TINK"===e.bankVerificationVendors[e.country]?"tink":void 0}const d=`${n}static/images/payout-verification-method`,c=[{id:_y.INSTANT_VERIFICATION,name:"verifyViaMobileBankAppOrBankWebsite",subtitle:"instant",description:"instantVerificationDescription",iconComponentDesktop:"instant-verification-desktop",iconComponentMobile:"instant-verification-mobile",provider:`provider-logo-${l()}`},{id:_y.MANUAL_VERIFICATION,name:"provideAccountDetailsAndUploadBankStatement",subtitle:"mayTakeAFewHoursOrDays",description:"manualVerificationDescription",iconComponentDesktop:"manual-verification-desktop",iconComponentMobile:"manual-verification-mobile"}],u=g(r.locale),{handleChangeFor:m,data:p,valid:y,errors:b,isValid:f,triggerValidation:h,fieldProblems:v}=ua(Object.assign(Object.assign({},e),{schema:o,defaultData:Object.assign(Object.assign({},e.data),{payoutVerificationMethod:_y.INSTANT_VERIFICATION}),rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),_=ra(e,r);return de((()=>{s.current.setState({type:"addToState",value:{data:p,valid:y,errors:b,fieldProblems:v,caller:i,dataStoreId:i,schema:o}})}),[p,y,b,f]),this.triggerValidation=()=>{h(["payoutVerificationMethod"])},R("div",{children:[R(Ys,{owner:i,stateRef:s}),R("form",Object.assign({className:"adyen-kyc-verification-method"},{children:[R(Ms,{heading:e.heading}),R("p",{children:[" ",r.get("textToVerifyAccount")," "]}),R("div",Object.assign({className:"adyen-kyc-account-holder-information"},{children:[R("div",Object.assign({className:"adyen-kyc-account-holder-information__labels"},{children:[R("p",{children:r.get("accountHolder")}),R("p",{children:r.get("bankCountry")})]})),R("div",Object.assign({className:"adyen-kyc-account-holder-information__values"},{children:[R("p",{children:e.accountHolder}),R("p",{children:null!==(a=u.getCountryName(e.country))&&void 0!==a?a:e.country})]}))]})),R(Ue,Object.assign({name:"verificationMethods",useLabelElement:!1,errorMessage:_.getErrorMessage("payoutVerificationMethod",b,v)},{children:R("div",Object.assign({className:"adyen-kyc-field-verification-methods"},{children:c.map((e=>R(zt,Object.assign({item:e,uniqueId:e.id,i18n:r,value:p.payoutVerificationMethod,onChange:m("payoutVerificationMethod"),name:"verificationMethod",labelClassName:"adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"},{children:[R(zt.Icon,{children:R("div",Object.assign({className:"adyen-kyc-radio-group-card__illustration"},{children:R("picture",{children:[R("source",{type:"image/svg+xml",media:`(min-width: ${Ag.md}px)`,srcSet:`${d}/${e.iconComponentDesktop}.svg`}),R("source",{type:"image/svg+xml",media:`(max-width: ${Ag.md}px)`,srcSet:`${d}/${e.iconComponentMobile}.svg`}),R("img",{srcSet:`${d}/${e.iconComponentDesktop}.svg`,alt:`${e.iconComponentDesktop}`})]})}))}),e.provider&&R(zt.Footer,{children:R("div",Object.assign({className:"adyen-kyc-field-verification-methods__footer"},{children:[r.get("poweredBy"),R("img",{className:"adyen-kyc-field-verification-methods__icon",src:`${d}/${e.provider}.svg`,alt:`${e.provider}-logo`})]}))})]}),e.id)))}))})),R(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:_,id:"ariaErrorField"}),R(ud,{page:"Instant verification with partner",titleId:"howDoesVerificationWithOurPartnerWorks",contentId:"bankVerificationWithPartnerSteps",title:r.get("howDoesVerificationWithOurPartnerWorks",{values:{provider:r.get(l())}}),content:R(t.Fragment,{children:[R("p",{children:[" ",r.get("isOurTrustedPartnerHelpingSpeedUpSetup",{values:{provider:r.get(l())}})," "]}),R("ul",Object.assign({className:"adl-guidance-list"},{children:[R("li",Object.assign({className:"adl-guidance-list__item"},{children:r.get("selectTheBankToReceivePayouts")})),R("li",Object.assign({className:"adl-guidance-list__item"},{children:r.get("loginIntoYourBankingEnvironment")})),R("li",Object.assign({className:"adl-guidance-list__item"},{children:r.get("yourBankWillConfirmYourAccountDetails")}))]})),R("p",{children:r.get("adyenWillOnlyGetTemporaryAccess")}),R(el,Object.assign({href:"https://www.adyen.com/policies-and-disclaimer/privacy-policy",external:!0},{children:r.get("learnMore")}))]})})]}))]})}class Iy extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.sourceError=t;const a=[];t&&(t instanceof this.constructor&&a.push(`${this.name}: ${t.message}`),t.stack&&a.push(t.stack)),this.stack=a.join("\n")}}const Ey=["Tink","PayWithMyBank"],[Ty,Ay]=Ey,Sy=["account_verification_report_id","error"],Cy=["accounts","error","reference"];let Ry;class Dy{constructor(e,t,a){this.mountInProgress=!1,this.waitForResponse=()=>i(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{this.listener=a=>i(this,void 0,void 0,(function*(){try{const t=yield this.handleMessage(a);if(!t)return;e(t)}catch(e){t(e)}})),window.addEventListener("message",this.listener)}))}));try{this.iframeUrl=new URL(t)}catch(e){throw new Iy("WIDGET_URL_MALFORMED",e)}this.iframeElement=e,this.iframeWindow=e.contentWindow,this.vendor=a}removeMessageEventListener(){this.listener&&(window.removeEventListener("message",this.listener),this.listener=void 0)}handleMessage({data:e,origin:t,source:a}){return i(this,void 0,void 0,(function*(){if(a!==this.iframeWindow||t!==this.iframeUrl.origin)return;if(this.vendor!==Ty&&(e=>Object.entries(e).some((([e])=>Cy.includes(e))))(e)){if(Object.getOwnPropertyNames(e).includes("error"))throw e;return e}if(!Cs(e))return;const r=(e=>{try{const t=JSON.parse(e);return Sy.includes(t.type)?t:"invalid"}catch(e){return"invalid"}})(e);if("invalid"===r)return;const n={errorHandler:Promise.reject.bind(Promise),loadingContext:""},i=new URL(this.iframeUrl.searchParams.get("redirect_uri")),o=i.searchParams;switch(i.pathname=i.pathname.replace(RegExp(`(${this.vendor})$`,"i"),"$1/json"),r.type){case"account_verification_report_id":o.set("account_verification_report_id",r.data);try{return _(Object.assign(Object.assign({},n),{path:i.href}))}catch(e){throw new Iy("WIDGET_ACCOUNT_COMMIT_FAILURE",e)}case"error":{let{status:e,message:t}=r.error;o.set("error",e),o.set("message",t);try{const a=yield _(Object.assign(Object.assign({},n),{path:i.href}));(e=>!("object"!=typeof e||Array.isArray(e)||null===e||!("error"in e)||!("errorMessage"in e)))(a)&&(e=a.error,t=a.errorMessage)}catch(e){}throw{error:e,message:t}}}}))}unmount(){if(this.mountInProgress)throw new Iy("Cannot unmount widget, mounting is still in progress");this.removeMessageEventListener(),(e=>{const t=e.parentNode;let a=t.firstChild;for(;a;)a!==e&&t.removeChild(a),a=a.nextSibling})(this.iframeElement),Ry=void 0}mount(){return i(this,void 0,void 0,(function*(){if(Ry)throw new Iy(`You can only have one ${this.constructor.name} mounted at a time`);if(Ry=this,this.mountInProgress)throw new Iy("Cannot mount widget, mounting is already in progress");this.mountInProgress=!0;try{yield new Promise(((e,t)=>{let a=setTimeout((()=>{this.mountInProgress=!1,t(new Iy("WIDGET_TIMEOUT"))}),1e4);const r=()=>{a&&clearTimeout(a),a=null};this.iframeElement.addEventListener("load",(()=>{r(),this.mountInProgress=!1,e()})),requestAnimationFrame((()=>{try{this.vendor===Ty&&this.iframeUrl.searchParams.set("iframe","true"),this.iframeElement.setAttribute("src",this.iframeUrl.href)}catch(e){r(),this.mountInProgress=!1,t(e)}}))}))}catch(e){throw new Iy("WIDGET_LAUNCH_FAILED",e)}}))}mountAndWaitForResponse(){return i(this,void 0,void 0,(function*(){yield this.mount();try{return yield this.waitForResponse()}finally{this.removeMessageEventListener()}}))}}const ky="adyen-kyc-bank-verification-widget",Ly=`${ky}-container`;function wy({url:e,vendor:t,widgetCallback:a}){const r=ue(null);return de((()=>{const n=r.current;let o,s;var l,d;return d=function r(l){var d,c;"adyen-kyc:empty-bank-verification-widget-container"===l.animationName&&(c=r,(d=n).removeEventListener("animationstart",c,!1),d.removeEventListener("MSAnimationStart",c,!1),d.removeEventListener("webkitAnimationStart",c,!1),o=document.createElement("iframe"),o.setAttribute("allowFullscreen","true"),o.classList.add(ky),l.target.appendChild(o),requestAnimationFrame((()=>i(this,void 0,void 0,(function*(){try{s=new Dy(o,e,t);const r=yield s.mountAndWaitForResponse();a({action:"verification_success",result:r})}catch(e){if(e instanceof Iy)switch(e.message){case"WIDGET_ACCOUNT_COMMIT_FAILURE":case"WIDGET_LAUNCH_FAILED":case"WIDGET_URL_MALFORMED":case"WIDGET_TIMEOUT":return a({action:"retry_verification"});default:throw e}return a({action:"handle_verification_exception",err:e})}})))))},(l=n).addEventListener("animationstart",d,!1),l.addEventListener("MSAnimationStart",d,!1),l.addEventListener("webkitAnimationStart",d,!1),n.classList.add(Ly),()=>{null==s||s.unmount(),null==o||o.remove()}}),[]),R("div",{ref:r})}const Py=["verifiedAccountHolder","verifiedBankCountry","verifiedBankName","verifiedCurrencyCode","verifiedAccountName","verifiedBankAccountNumber"];function jy({getBankVerificationVendors:e,retrieveBankAccountInfo:a,onBack:r,country:n}){const{i18n:o}=We(),[s,l]=se(!1),d=((e,t)=>{const[a,r]=se();return de((()=>{i(void 0,void 0,void 0,(function*(){const a=(yield t(e))[0];r(Ey.includes(a.name)?a:null)})).catch((e=>console.error(e)))}),[e,t]),a})(n,e),c=pe((e=>{switch(l(!0),e.action){case"handle_verification_exception":case"retry_verification":r&&r();break;default:{const{accounts:t}=e.result;a(t[0])}}}),[a,r]);return R("form",Object.assign({className:"adyen-kyc-bank-verification"},{children:d&&!s?R(t.Fragment,{children:[R(wy,{widgetCallback:c,url:d.redirectUrl,vendor:d.name}),R(ag,{onBack:()=>null==r?void 0:r(),backButtonLabel:o.get("goBack")})]}):void 0}))}var xy=yt((function(e){const{getBankVerificationVendors:a,onBack:r,hideDropinLayout:n}=e,{i18n:i,payoutDefaultCurrency:o}=We(),s=e.id,l=Py,d=ue({setState:null}),c=Py,{handleChangeFor:u,data:m,valid:p,errors:g,isValid:y,triggerValidation:b,fieldProblems:f}=ua(Object.assign(Object.assign({},e),{schema:l,defaultData:e.data,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),[h,v]=se(!1);return de((()=>{d.current.setState({type:"addToState",value:{data:m,valid:p,errors:g,fieldProblems:f,caller:s,dataStoreId:s,schema:c}})}),[m,p,g,y]),this.triggerValidation=()=>{b(["verifiedBankAccountNumber"])},de((()=>(n(!0),()=>n(!1))),[]),R(t.Fragment,{children:[R(Ys,{owner:s,stateRef:d}),h&&R(t.Fragment,{children:[R(Ms,{heading:e.heading}),R("div",Object.assign({className:"adyen-kyc-bank-verification-success"},{children:[R("span",{children:R("i",{className:"adyen-kyc-icon adyen-kyc-icon-checkmark-small adyen-kyc-bank-verification-success__checkmark-icon",role:"img","aria-hidden":"true"})}),R("span",{children:[" ",i.get("youSuccessfullyVerifiedAccount")]})]}))]}),"function"==typeof a&&!h&&R("div",Object.assign({className:"adyen-kyc-bank-verification-container"},{children:R(jy,{getBankVerificationVendors:a,retrieveBankAccountInfo:t=>{var a;u("verifiedBankAccountNumber")(t.number),u("verifiedAccountName")(t.name),u("verifiedBankName")(t.bankName),u("verifiedBankCountry")(e.country),u("verifiedAccountHolder")(e.data.verifiedAccountHolder),u("verifiedCurrencyCode")(null!==(a=e.data.verifiedCurrencyCode)&&void 0!==a?a:o),v(!0),n(!1),b()},onBack:r,country:e.country})}))]})}));const My=({country:e,verificationVendorsCallback:t,bankVerificationVendors:a})=>!!t&&a&&!!a[e],Fy=(e,t)=>{const a={payoutAccountDetails:{formId:"payoutAccountDetails",formName:e===Cl.PAYIN?"payinAccount":"payoutAccount",fields:hy},payoutAccountDocuments:{formId:"payoutAccountDocuments",formName:"bankStatement",fields:Jg},payoutAccountVerification:{formId:"payoutAccountVerification",formName:"instantVerification",fields:Py}};return t?Object.assign({payoutVerificationMethod:{formId:"payoutVerificationMethod",formName:"verificationMethod",fields:Ny}},a):a};const Vy=e=>{var t,a,r,n,i,o,s,l;return e.type===il.INDIVIDUAL?`${null!==(r=null===(a=null===(t=e.individual)||void 0===t?void 0:t.name)||void 0===a?void 0:a.firstName)&&void 0!==r?r:""} ${null!==(o=null===(i=null===(n=e.individual)||void 0===n?void 0:n.name)||void 0===i?void 0:i.lastName)&&void 0!==o?o:""}`:e.type===il.ORGANIZATION?null!==(l=null===(s=e.organization)||void 0===s?void 0:s.legalName)&&void 0!==l?l:"":void 0},Uy=e=>{var t,a;return e.type===il.INDIVIDUAL?null===(t=e.individual)||void 0===t?void 0:t.residentialAddress.country:e.type===il.ORGANIZATION?null===(a=e.organization)||void 0===a?void 0:a.registeredAddress.country:void 0},By=cg((function(e){var t,a;const{i18n:r,loadingContext:n,clientKey:i}=We(),{activeForm:o,currentTask:s,legalEntityResponse:l,handleGetBankVerificationVendors:d}=e,u=My({country:e.country,bankVerificationVendors:e.bankVerificationVendors,verificationVendorsCallback:e.handleGetBankVerificationVendors}),[m,p]=se(u),g=Fy(s,u),y=null===(t=g.payoutVerificationMethod)||void 0===t?void 0:t.formId,b=null===(a=g.payoutAccountVerification)||void 0===a?void 0:a.formId,f=g.payoutAccountDetails.formId,h=g.payoutAccountDocuments.formId,v={[y]:ue(null),[f]:ue(null),[h]:ue(null),[b]:ue(null)},_=Rl(e,y),N=Rl(e,b),I=Rl(e,f),E=Rl(e,h);this.triggerCurrentFormValidation=()=>{var t;null===(t=null==v?void 0:v[e.activeForm.formId])||void 0===t||t.current.triggerValidation()};const T=e=>e===Cl.PAYIN?r.get("payinAccount"):r.get("payoutAccount"),A=ra(E,r).isOptionalField("bankStatementDocument"),S=ue({setState:null});return de((()=>()=>{S.current.setState({type:"resetState"})}),[]),de((()=>{o.formId===ng.formId&&m&&(e.setSkipSubmitAndGoTaskList(!0),e.setHideOnHomeButton(!0),e.setHideBackButton(!0),e.setSubmitButtonLabel("continue"))}),[e.activeForm]),de((()=>{O(c,n,r.locale,i)}),[]),R("div",Object.assign({className:"adyen-kyc-payout"},{children:[R(Ys,{owner:"PayoutComponent",stateRef:S}),R(Yd,{owner:"PayoutComponent",onChange:({currentState:t})=>{var a,r,n;p((null===(r=null===(a=t.allData)||void 0===a?void 0:a.payoutVerificationMethod)||void 0===r?void 0:r.payoutVerificationMethod)===_y.INSTANT_VERIFICATION),(null===(n=t.allData)||void 0===n?void 0:n.payoutVerificationMethod)&&e.evaluateConfiguration(t.allData)}}),u&&R("div",Object.assign({className:o.formId!==y?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(Oy,Object.assign({},_,{ref:v[y],heading:T(s),id:y,country:e.country,accountHolder:e.accountHolder,bankVerificationVendors:e.bankVerificationVendors}))})),m?o.formId===b&&R("div",Object.assign({className:"adyen-kyc-form-wrapper"},{children:R(xy,Object.assign({},N,{ref:v[b],heading:r.get("bankAccountVerification"),id:b,country:e.country,onBack:e.onBack,onNext:e.onNext,hideDropinLayout:t=>e.setHideDropinLayout(t),getBankVerificationVendors:d}))})):R("div",Object.assign({className:o.formId!==f?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(vy,Object.assign({},I,{ref:v[f],heading:T(s),id:f,country:e.country,legalEntityResponse:l}))})),!m&&R("div",Object.assign({className:o.formId!==h?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(ey,Object.assign({},E,{ref:v[h],heading:r.get(A?"bankStatementOptional":"bankStatement"),id:h,country:e.country}))}))]}))}),{getComponentForms:e=>Fy(e.currentTask,My({country:e.country,bankVerificationVendors:e.bankVerificationVendors,verificationVendorsCallback:e.handleGetBankVerificationVendors})),parseConfiguration:({requiredFields:e,country:t,bankVerificationAvailable:a})=>{const{fields:r,bankStatementRequirement:n}=(null==e?void 0:e.payout)||{};return function({requiredFields:e,country:t,bankStatementRequirement:a,bankVerificationAvailable:r}){if(e){const n={modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"};let i={};return e.forEach((e=>{const t=Vp[e.Field.fieldName],a=e.Field.validationRule;t&&(i[t]=a?{rule:r?"manualVerification":"REQUIRED",validators:[Wp(a),n]}:{rule:r?"manualVerification":"REQUIRED",validators:[n]},i[t].masked=Up.includes(t))})),r&&(i.payoutVerificationMethod={rule:"REQUIRED"},i.verifiedAccountHolder={rule:"instantVerification"},i.verifiedBankCountry={rule:"instantVerification"},i.verifiedBankName={rule:"instantVerification"},i.verifiedCurrencyCode={rule:"instantVerification"},i.verifiedAccountName={rule:"instantVerification"},i.verifiedBankAccountNumber={rule:"instantVerification"},i.bankStatementDocument={rule:"bankStatementRequirement"},i.description={rule:"bankStatementDescription"}),!r&&a&&(i.bankStatementDocument={rule:a},i.description={rule:"OPTIONAL"}),i=eg(Bp[t],i),i}}({requiredFields:r,country:t,bankStatementRequirement:n,bankVerificationAvailable:a})},rules:(e,t,a,r)=>({manualVerification:()=>{var t;if(e.payoutVerificationMethod)return(null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===_y.MANUAL_VERIFICATION?"REQUIRED":void 0},instantVerification:()=>{var t;return e.payoutVerificationMethod?(null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===_y.INSTANT_VERIFICATION?"REQUIRED":void 0:"REQUIRED"},verifiedBankAccountNumber:()=>{var t;if((null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===_y.INSTANT_VERIFICATION)return"REQUIRED"},bankStatementRequirement:()=>{var t,a;if((null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===_y.MANUAL_VERIFICATION)return null===(a=null==r?void 0:r.payout)||void 0===a?void 0:a.bankStatementRequirement},bankStatementDescription:()=>{var t,a;if((null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===_y.MANUAL_VERIFICATION&&(null===(a=null==r?void 0:r.payout)||void 0===a?void 0:a.bankStatementRequirement))return"OPTIONAL"}}),getTaskName:e=>e.currentTask===Cl.PAYIN?"payinDetails":"payoutDetails",labels:()=>({verifiedAccountHolder:()=>"accountHolder",verifiedBankCountry:()=>"bankCountry",verifiedBankName:()=>"bankName",verifiedCurrencyCode:()=>"currencyCode",verifiedAccountName:()=>"accountName",verifiedBankAccountNumber:()=>"bankAccountNumber"})});function Wy(e){var t,a,r,n,o,s;const{transferInstrument:l,handleCreateDocument:d,handleGetDocument:c,handleUpdateDocument:u,handleUpdateTransferInstrument:m,handleCreateTransferInstrument:p,legalEntityResponse:y,trackingConig:b,accountHolder:f}=e,{loadingContext:h,clientKey:v}=We(),_=null!==(t=Uy(y))&&void 0!==t?t:e.country,[N,O]=se(),[I,E]=se(Fy(e.currentTask,My({country:_,bankVerificationVendors:null!==(a=e.bankVerificationVendors)&&void 0!==a?a:N,verificationVendorsCallback:e.handleGetBankVerificationVendors}))),[T,A]=se(!1),S=()=>i(this,void 0,void 0,(function*(){const t=yield $({loadingContext:h,clientKey:v,country:_,capabilities:e.capabilities,legalEntityType:e.legalEntityResponse.type});(null==t?void 0:t.bankVerificationProviders)&&(O(t.bankVerificationProviders),E(Fy(e.currentTask,My({country:_,bankVerificationVendors:t.bankVerificationProviders,verificationVendorsCallback:e.handleGetBankVerificationVendors}))))}));ce((()=>{e.handleGetBankVerificationVendors&&!e.bankVerificationVendors&&(A(!0),S().catch(console.error).finally((()=>{A(!1)})))}),[e.legalEntityResponse.type]);const{i18n:C,payoutDefaultCurrency:D}=We(),{showToast:k}=pg(),[L,P]=se(e.problems),j=ym(d,c,u),x=(e=>hp(e,fl))(l),M=(null==x?void 0:x.payoutAccountDetails)||{},F=(null===(r=ny[_])||void 0===r?void 0:r.length)?ny[_][0]:null,U=D||F,H=f||Vy(y),q={payoutAccountDetails:Object.assign({accountHolder:H,bankCountry:_,currency:U},M),payoutVerificationMethod:{payoutVerificationMethod:_y.INSTANT_VERIFICATION},payoutAccountVerification:{verifiedAccountHolder:H,verifiedBankCountry:_}},[G,X]=se(q||e.data),Y=Fp({trackingConig:b,task:e.taskType});de((()=>{w.addPageView("Payout dropin"),w.addEvent("Started payout task",{segmentation:Object.assign({},Y)})}),[]),de((()=>{var e;const t=(null===(e=null==l?void 0:l.documentDetails)||void 0===e?void 0:e.map((e=>e.id)))||[];t.length&&j.fetchDocuments(t,null==l?void 0:l.id).then((()=>{const e=(e=>{const t=_m(e,cc.BANK_STATEMENT)||null;return{bankStatementDocument:t?[{name:Op(t)}]:null,description:t.description}})(null==l?void 0:l.id);X(Object.assign(Object.assign({},G),{payoutAccountDocuments:e}))})).catch((()=>{k({label:C.get("failedToFetchRelevantDocuments"),type:ug.ERROR})}))}),[]);const K=({forms:e,transferInstrument:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){if(Z(e)){const e=yield fp(a,t.id);e&&(yield j.uploadDocuments(e,t.id),e.forEach((e=>{w.addEvent("Saved document",{segmentation:Object.assign(Object.assign({},Y),{documentType:e.type,fileExtention:e.attachments.map((e=>Sm(e.pageName)))})})})))}})),z=({data:t,forms:a,setLoadingStatus:r})=>i(this,void 0,void 0,(function*(){var n;const i={documentType:cc.BANK_STATEMENT,bankCountry:_,bankCurrency:U};w.addEvent("Provided payout details",{segmentation:Object.assign(Object.assign({},Y),i)}),r(Fu.LOADING),t.payoutAccountDetails.bankCountry=_,t.payoutAccountDetails.currency=U,((e,t,a)=>{e.forEach((e=>{t[e]===(null==a?void 0:a[e])&&delete t[e]}))})(Up,t.payoutAccountDetails,null==x?void 0:x.payoutAccountDetails);let o=cp({data:t,legalEntity:y});const s=null===(n=null==x?void 0:x.payoutAccountDetails)||void 0===n?void 0:n.transferInstrumentId;try{o=s?yield m(V("id").from(o),s):yield p(o),w.addEvent("Saved payout details",{segmentation:Object.assign(Object.assign({},Y),i)}),yield K({forms:a,transferInstrument:o,dataSubmitted:t}),r(Fu.SUCCESS),e.onSubmit(t)}catch(t){if((null==t?void 0:t.errorCode)===st){const a=gg(t,e.currentTask);P(Object.assign(Object.assign({},L),{validationErrors:a}))}else k({label:C.get("failedToUpdateDetails"),type:ug.ERROR});r(Fu.SUCCESS),w.addEvent("Encountered error payout details",{segmentation:Object.assign(Object.assign({},Y),{errorCode:t.errorCode,errorMessage:t.title,errorType:"BE"})})}})),Z=e=>e.some((e=>e.formId===I.payoutAccountDocuments.formId)),Q=e=>i(this,void 0,void 0,(function*(){if(null==l?void 0:l.id){const t=cp({data:e,legalEntity:y}),a=yield fp(e,l.id);return!B(t.bankAccount,null==l?void 0:l.bankAccount)||a.length>0}return!0})),J=e=>{const t=e.payoutAccountDetails;return Object.values(t).every(Boolean)},ee=g(C.locale),te=e=>{var t;const a=W(e);return(null===(t=a.payoutAccountDetails)||void 0===t?void 0:t.bankCountry)&&(a.payoutAccountDetails.bankCountry=ee.getCountryName(a.payoutAccountDetails.bankCountry)),(null==e?void 0:e.payoutAccountDocuments)&&(a.payoutAccountDocuments.bankStatementDocument=(e=>{var t,a;return Object.assign({},(null==e?void 0:e.bankStatementDocument)&&{bankStatementDocument:{fileName:null===(a=null===(t=e.bankStatementDocument)||void 0===t?void 0:t[0])||void 0===a?void 0:a.name}})})(null==e?void 0:e.payoutAccountDocuments)),a};return T?R(jg,{}):R(By,{baseTrackingPayload:Y,currentTask:e.currentTask,capabilities:e.capabilities,data:G,country:Uy(y)||e.country,problems:L,eventEmitter:e.eventEmitter,accountHolder:null!==(n=e.accountHolder)&&void 0!==n?n:Vy(e.legalEntityResponse),hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,legalEntityType:y.type,legalEntityResponse:y,summary:{formatData:te,getOmittedKeys:()=>["transferInstrumentId"],omittedForms:[null===(o=null==I?void 0:I.payoutVerificationMethod)||void 0===o?void 0:o.formId]},hasDataChanged:Q,canSubmit:J,onSubmit:z,handleBackClick:e.handleBackClick,handleCreateTransferInstrument:e.handleCreateTransferInstrument,handleUpdateTransferInstrument:e.handleUpdateTransferInstrument,handleGetBankVerificationVendors:e.handleGetBankVerificationVendors,bankVerificationVendors:null!==(s=e.bankVerificationVendors)&&void 0!==s?s:N,navigateBackToTaskList:e.navigateBackToTaskList})}var Hy;!function(e){e.CASH_MANAGEMENT_TRUST="cashManagementTrust",e.CORPORATE_UNIT_TRUST="corporateUnitTrust",e.DECEASED_ESTATE="deceasedEstate",e.DISCRETIONARY_INVESTMENT_TRUST="discretionaryInvestmentTrust",e.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST="discretionaryServicesManagementTrust",e.DISCRETIONARY_TRADING_TRUST="discretionaryTradingTrust",e.FIRST_HOME_SAVER_ACCOUNTS_TRUST="firstHomeSaverAccountsTrust",e.FIXED_TRUST="fixedTrust",e.FIXED_UNIT_TRUST="fixedUnitTrust",e.HYBRID_TRUST="hybridTrust",e.LISTED_PUBLIC_UNIT_TRUST="listedPublicUnitTrust",e.OTHER_TRUST="otherTrust",e.POOLED_SUPERANNUATION_TRUST="pooledSuperannuationTrust",e.PUBLIC_TRADING_TRUST="publicTradingTrust",e.UNLISTED_PUBLIC_UNIT_TRUST="unlistedPublicUnitTrust"}(Hy||(Hy={}));const qy=[{id:Hy.CASH_MANAGEMENT_TRUST,name:"cashManagementTrust"},{id:Hy.CORPORATE_UNIT_TRUST,name:"corporateUnitTrust"},{id:Hy.DECEASED_ESTATE,name:"deceasedEstate"},{id:Hy.DISCRETIONARY_INVESTMENT_TRUST,name:"discretionaryInvestmentTrust"},{id:Hy.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST,name:"discretionaryServicesManagementTrust"},{id:Hy.DISCRETIONARY_TRADING_TRUST,name:"discretionaryTradingTrust"},{id:Hy.FIRST_HOME_SAVER_ACCOUNTS_TRUST,name:"firstHomeSaverAccountsTrust"},{id:Hy.FIXED_TRUST,name:"fixedTrust"},{id:Hy.FIXED_UNIT_TRUST,name:"fixedUnitTrust"},{id:Hy.HYBRID_TRUST,name:"hybridTrust"},{id:Hy.LISTED_PUBLIC_UNIT_TRUST,name:"listedPublicUnitTrust"},{id:Hy.OTHER_TRUST,name:"otherTrust"},{id:Hy.POOLED_SUPERANNUATION_TRUST,name:"pooledSuperannuationTrust"},{id:Hy.PUBLIC_TRADING_TRUST,name:"publicTradingTrust"},{id:Hy.UNLISTED_PUBLIC_UNIT_TRUST,name:"unlistedPublicUnitTrust"}],Gy={trustType:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},country:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},legalName:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},$y=["legalName","country","trustType","vatNumber"],Xy=["AU"];function Yy(e){var a;const{i18n:r,commonProps:n}=We(),i=e.id,o=ue({setState:null}),s=ue(null),l=e.requiredFields||$y,d=l.filter((e=>["trustType","legalName","country"].includes(e))),{handleChangeFor:c,data:u,valid:m,errors:p,setData:g,triggerValidation:y,fieldProblems:b}=ua(Object.assign(Object.assign({},e),{schema:d,defaultData:e.data,rules:e.validators||Gy,fieldProblems:null==e?void 0:e.fieldValidationErrors})),f=ra(e,r);this.triggerValidation=()=>{y(d),f.isRequiredField("vatNumber")&&s.current.triggerValidation()},de((()=>{o.current.setState({type:"addToState",value:{data:u,valid:m,errors:p,fieldProblems:b,caller:i,dataStoreId:i,schema:l}})}),[u,m,p]);const h=Dl(e,Dd);return de((()=>{1!==Xy.length||u.country||(g("country",Xy[0]),y(["country"]))}),[null===(a=e.data)||void 0===a?void 0:a.country]),R(t.Fragment,{children:[R(Ys,{owner:i,stateRef:o}),R("form",Object.assign({className:"adyen-kyc-trust__registration-details","aria-describedby":n.showInlineErrors?null:"ariaErrorField"},{children:[R(Ms,{heading:e.heading}),R(qc,{verificationErrors:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:f,id:"ariaErrorField"}),f.isRequiredField("country")&&R(aa,{label:f.getLabel("country","countryOfEstablishment"),allowedCountries:Xy,classNameModifiers:["country"],errorMessage:f.getErrorMessage("country",p,b),onDropdownChange:c("country"),value:u.country,readOnly:!0}),f.isRequiredField("legalName")&&R(Ue,Object.assign({name:"legalName",label:f.getLabel("legalName","nameOfTrustAgreement"),classNameModifiers:["legalName"],errorMessage:f.getErrorMessage("legalName",p,b),isValid:m.legalName,showInlineErrors:n.showInlineErrors},{children:Jt("text",{name:"legalName",value:u.legalName,readonly:f.isReadOnly("legalName"),classNameModifiers:["legalName"],onInput:c("legalName","input"),onBlur:c("legalName","blur"),"aria-required":!0,"aria-label":f.getLabel("legalName"),"aria-invalid":!m.legalName})})),f.isRequiredField("trustType")&&R(Ue,Object.assign({name:"trustType",label:f.getLabel("trustType","typeOfTrustAgreement"),classNameModifiers:["trust-type"],errorMessage:f.getErrorMessage("trustType",p,b),isValid:m.trustType},{children:Jt("select",{name:"trustType",onChange:c("trustType","blur"),selected:u.trustType,items:qy.map((({id:e,name:t})=>({id:e,name:r.get(t)})))})})),f.isRequiredField("vatNumber")&&R(kd,Object.assign({},h,{ref:s,dataStoreId:i,country:e.country}))]}))]})}const Ky=["trustDocument"];const zy=yt((function(e){const{i18n:t,commonProps:a}=We(),r=ue(null),[n,i]=se({}),{data:o,valid:s,fieldProblems:l,errors:d}=ua(Object.assign(Object.assign({},e),{defaultData:e.data,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),c=ra(e,t),u=ue({setState:null});return this.triggerValidation=()=>{c.isRequiredField("trustDocument")&&r.current.triggerValidation()},de((()=>{e.data.trustDocument&&i({trustDocument:e.data.trustDocument})}),[e.data]),de((()=>{u.current.setState({type:"addToState",value:{data:o,valid:s,errors:d,fieldProblems:l,caller:e.id,dataStoreId:e.id,schema:Ky}})}),[o,s,d,l]),R("form",Object.assign({className:"adyen-kyc-trust__trust-document","aria-describedby":a.showInlineErrors?null:"ariaErrorField"},{children:[R(Ys,{owner:e.id,stateRef:u}),R(Ms,{heading:null==e?void 0:e.heading,description:null==e?void 0:e.description}),R(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:c,id:"ariaErrorField"}),c.isVisibleField("trustDocument")&&R(Ue,Object.assign({className:"adyen-kyc-field--trustDocument adyen-kyc-upload-field",name:"trustDocument",isValid:s.trustDocument},{children:[R("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",t.get("trustDocumentDescription")]})),R(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[R(hc,{children:t.get("nameOfTrust")}),R(hc,{children:t.get("fullLegalNamesOfAnyAppointers")}),R(hc,{children:t.get("dateDeedWasSigned")}),R(hc,{children:t.get("settlerDetailsIncl")}),R(hc,{children:t.get("trusteeDetailsIncl")}),R(hc,{children:t.get("beneficiariesDetailsIncl")})]})),R(bc,{name:"trustDocument",ref:r,id:e.id,defaultData:n,isOptional:c.isOptionalField("trustDocument")})]}))]}))}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.optionalFields,t.optionalFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name));var Zy=zy;const Qy={trustRegistrationDetails:{formId:"trustRegistrationDetails",formName:"registrationDetails",fields:[...$y]},trustRegistrationAddress:{formId:"trustRegistrationAddress",formName:"registeredAddress",fields:[...md]},trustDocument:{formId:"trustDocument",formName:"trustDocument",fields:[...Ky]}},Jy=Qy.trustRegistrationAddress.formId,eb=Qy.trustRegistrationDetails.formId,tb=Qy.trustDocument.formId;const ab=cg((function(e){const{i18n:t}=We(),a={[eb]:ue(null),[Jy]:ue(null),[tb]:ue(null)};this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==a?void 0:a[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()};const r=Rl(e,eb),n=Rl(e,Jy),i=Rl(e,tb),o=()=>{};return R("div",Object.assign({className:"adyen-kyc-trust"},{children:(s=e.activeForm,R("div",Object.assign({className:"adyen-kyc-trust"},{children:[R(Yd,{owner:"TrustComponent",onChange:o}),R("div",Object.assign({className:s.formId!==eb?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(Yy,Object.assign({},r,{ref:a[eb],heading:t.get("registrationDetails"),id:eb,country:e.country}))})),R("div",Object.assign({className:s.formId!==Jy?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(yd,Object.assign({},n,{ref:a[Jy],heading:t.get("registeredAddress"),description:t.get("registeredAddressTrustHeaderDescription"),id:Jy,country:e.country,problems:null==e?void 0:e.problems,labels:{operationalAddressIsSame:"isTrustOperationAddressSame"}}))})),R("div",Object.assign({className:s.formId!==tb?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(Zy,Object.assign({},i,{ref:a[tb],heading:t.get("trustDocument"),id:tb}))}))]})))}));var s}),{getComponentForms:()=>Qy,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){if(e){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),Kp[t])),{});return a=eg(zp[t],a),a}}(null==e?void 0:e[il.TRUST],t),getTaskName:()=>"trustDetails"});function rb(e){const{parentLegalEntity:t,legalEntityResponse:a}=e,{i18n:r}=We(),n=(e=>{var t;let a;return(null==e?void 0:e.trust)&&(a=hp(e,Ol),(null===(t=e.trust)||void 0===t?void 0:t.principalPlaceOfBusiness)?a.trustRegistrationAddress.operationalAddressIsSame=rd.OPERATIONAL_ADDRESS_IS_NOT_SAME:(a.trustRegistrationAddress||(a.trustRegistrationAddress={}),a.trustRegistrationAddress.operationalAddressIsSame=rd.OPERATIONAL_ADDRESS_IS_SAME)),a})(a),[o]=se(n||e.data),[s,l]=se(e.problems),d=g(r.locale),[c,u]=se(null),{showToast:m}=pg();return R(ab,{capabilities:e.capabilities,data:o,country:"AU",problems:s,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,onSubmit:({data:n,setLoadingStatus:o})=>i(this,void 0,void 0,(function*(){o(Fu.LOADING);let i=(e=>{const t=Object.assign({},hp(e,Il));return t.trust.vatAbsenceReason&&(t.trust.vatNumber=""),t.type=il.TRUST,t})(n);try{if((null==a?void 0:a.id)||(null==c?void 0:c.id)?i=yield e.handleUpdateLegalEntity(V("type").from(i),(null==a?void 0:a.id)||(null==c?void 0:c.id)):(i=yield e.handleCreateLegalEntity(i),u(i)),!(null==a?void 0:a.id)){const a=Object.assign(Object.assign({},t),{entityAssociations:[{type:il.TRUST,legalEntityId:i.id},...t.entityAssociations||[]]});yield e.handleUpdateLegalEntity(V(["id","type","documents","transferInstruments","capabilities"]).from(a),a.id)}o(Fu.SUCCESS),m({label:r.get("successfullyUpdatedDetails"),type:ug.SUCCESS}),null==e||e.onSubmit(n)}catch(e){if(m({label:r.get("failedToUpdateDetails"),type:ug.ERROR}),(null==e?void 0:e.errorCode)===st){const t=gg(e,Cl.TRUST);l(Object.assign(Object.assign({},s),{validationErrors:t}))}o(Fu.SUCCESS)}})),legalEntityType:il.TRUST,summary:{formatData:e=>{var t,a,n,i,o;const s=W(e);let l,c;if((null===(t=null==s?void 0:s.trustRegistrationDetails)||void 0===t?void 0:t.country)&&(l=d.getCountryName(s.trustRegistrationDetails.country)),null===(a=null==s?void 0:s.trustRegistrationDetails)||void 0===a?void 0:a.trustType){const e=null===(n=qy.find((e=>{var t;return e.id===(null===(t=s.trustRegistrationDetails)||void 0===t?void 0:t.trustType)})))||void 0===n?void 0:n.name;c=r.get(e)}const u={nameOfTrustAgreement:e.trustRegistrationDetails.legalName,countryOfEstablishment:l,typeOfTrustAgreement:c,vatNumber:e.trustRegistrationDetails.vatNumber};return s.trustRegistrationDetails=u,(null===(i=null==s?void 0:s.trustRegistrationAddress)||void 0===i?void 0:i.registrationAddress)&&(s.trustRegistrationAddress.hasInnerForms=!0,s.trustRegistrationAddress.registrationAddress=Pe(null==s?void 0:s.trustRegistrationAddress.registrationAddress,d)),(null===(o=null==s?void 0:s.trustRegistrationAddress)||void 0===o?void 0:o.operationalAddress)&&(s.trustRegistrationAddress.operationalAddress=Pe(null==s?void 0:s.trustRegistrationAddress.operationalAddress,d)),s},getOmittedKeys:()=>["operationalAddressIsSame"]},hasDataChanged:e=>i(this,void 0,void 0,(function*(){return!1})),canSubmit:e=>!1})}const nb=({parentLegalEntity:e,trustResponse:r,capabilityProblems:n,navigateBackToTaskList:o,onAddTrustMember:s,onAddTrustMemberOwner:l,handleUpdateLegalEntity:d,onTrustMemberDelete:c})=>{const{i18n:u}=We(),{showToast:m}=pg(),p=wm(r),g=Vy(e),y=null==p?void 0:p.reduce(((e,t)=>{const a=e[t.legalEntityId],i=t.type;return e[t.legalEntityId]={legalEntityId:t.legalEntityId,types:a?[...a.types,i]:[i],status:Zm(Gg.LEGAL_ENTITY,n,r,[t.legalEntityId]),name:t.name,legalEntityType:t.entityType},e}),{}),b=y?Object.values(y):[],f=(e,t)=>{l(e,t,Cl.TRUST_MEMBER_COMPANY_OWNER)},h=(e,t)=>{var a;const r=t.entityAssociations;if(r)return null===(a=r.find((t=>t.associatorId===e&&t.type===Cm.UBO_THROUGH_OWNERSHIP)))||void 0===a?void 0:a.legalEntityId},v=e=>{const a=h(e.legalEntityId,r),n=R(t.Fragment,{children:[u.get("helpUsVerifyCompany")," ",R(el,Object.assign({onClick:t=>{t.preventDefault(),f("",e.legalEntityId)},href:"to-company-owner"},{children:u.get("providePersonalDetailsOfOwner")}))]});if(e.legalEntityType===il.ORGANIZATION&&!a)return R(zs,{type:Ks.BASIC,hasCloseButton:!1,title:n,className:"adl-u-margin-top-16"})},_=e=>{const a=h(e.legalEntityId,r);return R(t.Fragment,{children:[R(Gc,{className:"adl-entity-association__edit",ghost:!0,icon:"edit",onClick:()=>(e=>s(e))(e),label:u.get("editEntityDetails"),title:u.get("editTrustMember",{values:{trustMember:e.name}})}),e.legalEntityType===il.ORGANIZATION&&[R(Gc,a?{className:"adl-entity-association__edit",ghost:!0,icon:"edit",onClick:()=>f(a,e.legalEntityId),label:u.get("editEntityOwner"),title:u.get("editOwnerOfTrustMember",{values:{trustMember:e.name}})}:{className:"adl-entity-association__edit",ghost:!0,icon:"plus",onClick:()=>f("",e.legalEntityId),label:u.get("addEntityOwner"),title:u.get("addOwnerToTrustMember",{values:{trustMember:e.name}})})],R(Gc,{className:"adl-entity-association__delete",ghost:!0,icon:"bin",onClick:()=>{return t=e.legalEntityId,i(void 0,void 0,void 0,(function*(){try{const e={entityAssociations:$m(r).filter((e=>e.legalEntityId!==t))};yield d(e,r.id),c(),m({type:ug.SUCCESS,label:u.get("successFullyRemovedTrustMember")})}catch(e){m({type:ug.ERROR,label:u.get("failedToRemoveTrustMember")})}}));var t},label:u.get("remove"),title:u.get("removeTrustMember",{values:{trustMember:e.name}})})]})},N=R(t.Fragment,{});return R(og,{content:R(t.Fragment,{children:R("div",Object.assign({className:"adl-trust-members adl-u-width-full"},{children:[R(Ms,{heading:u.get("trustMembers"),description:u.get("trustMembersDescription")}),R(rg,{}),R("div",Object.assign({className:"adl-trust-members__wrapper"},{children:[R(Yg,{types:[Cm.SECONDARY_TRUSTEE],legalEntityId:e.id,status:Zm(Gg.LEGAL_ENTITY,n,e,[e.id]),name:g,legalEntityType:e.type},e.id),b.map((e=>R(Yg,{types:e.types,legalEntityId:e.legalEntityId,status:e.status,name:e.name,legalEntityType:e.legalEntityType,actions:_(e),reviewActions:N,infoContent:v(e)},e.legalEntityId)))]})),R(Gc,{secondary:!0,className:a("adl-trust-members__add",{"adl-trust-members__add--more":(null==b?void 0:b.length)>0}),icon:"plus",onClick:e=>{e.stopPropagation(),s()},label:u.get("addTrustMember")}),R(ag,{onHome:o,homeButtonLabel:u.get("saveAndGoToOverview")})]}))})})},ib=[{id:il.INDIVIDUAL,name:"naturalPersonTitle",description:"naturalPersonDescription"},{id:il.ORGANIZATION,name:"businessEntityTitle",description:"businessEntityDescription"}],ob={entityType:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},role:{modes:["blur"],validate:e=>!!(null==e?void 0:e.length),errorMessage:"fieldIsRequired"}};function sb(e){const{trustMember:t}=e,{i18n:a,commonProps:r}=We(),n={entityType:null==t?void 0:t.legalEntityType,role:null==t?void 0:t.types},i=e.requiredFields||["role","entityType"],{data:o,valid:s,errors:l,fieldProblems:d,handleChangeFor:c,isValid:u,triggerValidation:m}=ua(Object.assign(Object.assign({},e),{schema:i,rules:ob,defaultData:n,fieldProblems:null==e?void 0:e.fieldValidationErrors})),p=Object.values(Cm),g=p.filter((e=>e!==Cm.UBO_THROUGH_OWNERSHIP)),y=ra(e,a),[b,f]=se([]);return de((()=>{o.entityType===il.INDIVIDUAL?f(Vm(a,p)):o.entityType===il.ORGANIZATION&&f(Vm(a,g)),e.onChange({data:o,errors:l,valid:s})}),[o,u,a.languageCode,a.locale]),this.isValid=u,this.triggerValidation=m,R("form",Object.assign({className:"adyen-kyc-trust__role-and-entity-type adl-u-width-full"},{children:[R(Ms,{heading:a.get("roleAndEntityType")}),R(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:y,id:"ariaErrorField"}),y.isRequiredField("entityType")&&R(Ue,Object.assign({name:"entityType",useLabelElement:!1,errorMessage:y.getErrorMessage("entityType",l,d),label:y.getLabel("entityType","whatTypeOfYourMembersEntity"),classNameModifiers:["entityType"],disabled:!!(null==t?void 0:t.legalEntityId)},{children:Jt("radioCard",{name:"entityType",items:ib,value:o.entityType,i18n:a,readonly:y.isReadOnly("entityType"),onInput:c("entityType"),onChange:c("entityType"),"aria-required":!0,"aria-label":y.getLabel("entityType","whatTypeOfYourMembersEntity"),"aria-invalid":!s.entityType})})),R(Ue,Object.assign({name:"role",classNameModifiers:["role"],label:a.get("role"),errorMessage:y.getErrorMessage("role",l,d),isValid:s.role,disabled:!b.length},{children:Jt("select",{onChange:c("role","input"),name:"role",placeholder:a.get("rolePlaceholder"),selected:o.role,items:b,readonly:e.readOnly&&!!o.role,showInlineErrors:r.showInlineErrors,filterable:!1,isMulti:!0})}))]}))}const lb={roleAndEntityType:{formId:"roleAndEntityType",formName:"roleAndEntityType"},memberDetails:{formId:"memberDetails",formName:"memberDetails"},summary:{formId:"summary",formName:"summary"}},db=lb.roleAndEntityType.formId;function cb(e){const{i18n:a}=We(),[r,n]=se(e.trustMember),o=ue(null),s={[db]:o},l=(e=[],t=[])=>e.length!==t.length||!e.every((e=>t.includes(e))),d=R(lg,{forms:Object.values(lb).map((e=>{var t,a,r;return{formId:e.formId,formName:e.formName,isValid:null!==(r=null===(a=null===(t=s[e.formId])||void 0===t?void 0:t.current)||void 0===a?void 0:a.isValid)&&void 0!==r&&r}})),activeForm:lb.roleAndEntityType,taskName:"trustMembers"}),c=R(ag,{onNext:()=>{if(o.current.triggerValidation(),!o.current.isValid)return;const t=Object.assign(Object.assign({},e.trustMember),{legalEntityType:r.legalEntityType,types:r.types});e.navigateNext(t)},onHome:()=>i(this,void 0,void 0,(function*(){if(r.legalEntityId&&l(r.types,e.trustMember.types)){const t=$m(e.trust),a={entityAssociations:[...r.types.map((e=>({type:e,legalEntityId:r.legalEntityId})))||[],...t.filter((e=>e.legalEntityId!==r.legalEntityId))||[]]};yield e.handleUpdateLegalEntity(a,e.trust.id)}e.navigateBack()})),nextButtonLabel:a.get("next"),homeButtonLabel:a.get("saveAndGoToOverview")}),u=R(t.Fragment,{children:[d,R("div",Object.assign({className:"adyen-kyc-form-container"},{children:[R(sb,{ref:o,trustMember:e.trustMember,onChange:({data:t})=>{n(Object.assign(Object.assign({},e.trustMember),{legalEntityType:t.entityType,types:t.role}))}}),c]}))]});return R(og,{content:u})}var ub,mb;function pb({content:e,styles:t}){const r=a({"adl-u-font-weight-semi-bold":null==t?void 0:t.includes(mb.Bold),"adyen-kyc-italic":null==t?void 0:t.includes(mb.Italic)});return R("span",Object.assign({className:r},{children:e}))}function gb({title:e,contentElements:t}){return R("section",Object.assign({className:"adl-u-margin-bottom-48"},{children:[R(Fg,Object.assign({level:2,className:"adl-u-margin-top-24 adl-u-margin-bottom-16"},{children:R(pb,{content:e.content,styles:e.styles})})),R(Nb,{contentElements:t,isTopLevel:!0})]}))}function yb({title:e,label:t,isTopLevel:a,contentElements:r}){return a?R(cd,Object.assign({title:e.content},{children:R("section",Object.assign({className:"adyen-kyc-section-box",id:t},{children:R(Nb,{contentElements:r})}))})):R("section",Object.assign({id:t},{children:[R(Fg,Object.assign({level:2,className:"adl-u-margin-top-24 adl-u-margin-bottom-16"},{children:R(pb,{content:e.content,styles:e.styles})})),R(Nb,{contentElements:r})]}))}function bb({isTopLevel:e,contentElements:t}){const r=a("adyen-kyc-paragraph",{"adl-u-margin-bottom-16":e});return R("p",Object.assign({className:r},{children:R(Nb,{contentElements:t})}))}!function(e){e.Chapter="chapter",e.Section="section",e.Paragraph="paragraph",e.Text="text",e.Weblink="weblink",e.List="list",e.Table="table",e.InternalReference="internalReference"}(ub||(ub={})),function(e){e.Bold="BOLD",e.Italic="ITALIC"}(mb||(mb={}));const fb=({url:e,displayText:t})=>R(el,Object.assign({href:e},{children:t?R(pb,Object.assign({},t)):e}));function hb({items:e,style:t}){return R(vc,Object.assign({ordered:t.ordered},{children:e.map(((e,t)=>R(hc,{children:[R(Nb,{contentElements:e.content}),e.subList&&R(hb,{style:e.subList.style,items:e.subList.items})]},t)))}))}function vb({rows:e,label:t,captions:a,titlePrefix:r,title:n}){return R("div",Object.assign({id:t},{children:[R("div",Object.assign({className:"adl-u-margin-y-8 adl-u-text-align-center"},{children:[r&&R(pb,Object.assign({},r)),n&&R(pb,Object.assign({},n))]})),R("table",Object.assign({className:"adl-table adl-table--condensed"},{children:[a&&R("caption",{children:R(Nb,{contentElements:a})}),R("tbody",Object.assign({className:"adl-table__body"},{children:e.map(((e,t)=>R("tr",Object.assign({className:"adl-table__row"},{children:e.map(((e,t)=>R("td",Object.assign({className:"adl-table__cell"},{children:R(Nb,{contentElements:e.elements})}),t)))}),t)))}))]}))]}))}function _b({referencedLabel:e,displayText:t}){const a=t?t.content:e;return R(Gc,{onClick:()=>{const t=it(document.getElementById(e)),a=-1!==t&&t.querySelector("#"+e);null==a||a.scrollIntoView({behavior:"smooth"})},showAsLink:!0,label:a})}function Nb({contentElements:e,isTopLevel:t=!1,onExpandSection:a}){const r={chapter:gb,section:yb,paragraph:bb,text:pb,weblink:fb,list:hb,table:vb,internalReference:_b,breakline:"br"},n=e.map((e=>R(r[e.type],Object.assign({},(e=>{switch(e.type){case ub.Chapter:return{title:e.title,contentElements:e.contentElements};case ub.Section:return{isTopLevel:t,title:e.title,label:e.label,contentElements:e.contentElements};case ub.Paragraph:return{isTopLevel:t,contentElements:e.contentElements};case ub.Text:return{content:e.content,styles:e.styles};case ub.Weblink:return{url:e.url,displayText:e.displayText};case ub.List:return{items:e.items,style:e.style};case ub.Table:return{rows:e.rows,label:e.label,captions:e.captions,titlePrefix:e.titlePrefix,title:e.title};case ub.InternalReference:return{referencedLabel:e.referencedLabel,displayText:e.displayText};default:return null}})(e)),`key-${e.type}-${Ve()}`)));return t?R(sd,Object.assign({onExpandSection:a},{children:n})):R("span",{children:n})}function Ob({contract:e,className:t,onExpandSection:r}){const n=a("adyen-contract-viewer",t);return R("main",Object.assign({className:n},{children:[R(Fg,Object.assign({level:1,className:"adl-u-margin-top-24 adl-u-margin-bottom-16"},{children:R(pb,{content:e.title.content,styles:e.title.styles})})),R(Nb,{contentElements:e.contentElements,onExpandSection:r,isTopLevel:!0})]}))}const Ib=["signer","acceptPci"];function Eb({legalEntity:e,pciTemplateResponse:a,handleHomeClick:r,handleLanguageChange:n,handleSign:o,taskType:s,trackingConig:l}){var d,c,u,m,p;const{i18n:g}=We(),{showToast:y}=pg(),b=Fp({trackingConig:l,legalEntity:e,task:s}),[f,h]=se(null),{handleChangeFor:v,triggerValidation:_,data:N,valid:O,isValid:I,errors:E}=ua({schema:Ib,rules:{signer:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},acceptPci:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}}}),T=a.pciTemplateReferences,A=JSON.parse(decodeURIComponent(escape(window.atob(a.content)))),S=[...new Map(null===(d=null==e?void 0:e.entityAssociations)||void 0===d?void 0:d.map((e=>[e.legalEntityId,e]))).values()],C=e.type===il.ORGANIZATION?S.map((({legalEntityId:e,name:t})=>({id:e,name:t}))):[{id:null==e?void 0:e.id,name:`${null===(c=null==e?void 0:e.individual)||void 0===c?void 0:c.name.firstName} ${null===(u=null==e?void 0:e.individual)||void 0===u?void 0:u.name.lastName}`}],D=()=>{w.addEvent("Returned to task overview from PCI",{segmentation:Object.assign({},b)}),r()};de((()=>{n()}),[g.locale]),de((()=>{w.addPageView("PCI dropin"),w.addEvent("Started PCI task",{segmentation:Object.assign({},b)})}),[]);const k=R(t.Fragment,{children:[R("span",{children:g.get("byClickingSignIAcknowledgeAndAgree")}),R("ul",{children:[R("li",{children:g.get("acknowledgePciRequirements")}),R("li",{children:g.get("basedOnTheAboveSignatory")})]})]}),L=R(Vu,Object.assign({status:f,formOpacityWhenLoading:.3,showSpinner:!1},{children:[R(Ob,{contract:A,onExpandSection:e=>{w.addEvent("Expanded PCI section",{segmentation:Object.assign(Object.assign({},b),{statementExtended:e})})}}),R(Ue,Object.assign({name:"signer",label:g.get("signer"),classNameModifiers:["col-50"],className:"adl-u-margin-y-32",errorMessage:g.get(null===(m=E.signer)||void 0===m?void 0:m.errorMessage),isValid:O.signer},{children:Jt("select",{onChange:v("signer","blur"),name:"signer",placeholder:g.get("selectSigner"),selected:N.signer,items:C})})),R(Ue,Object.assign({name:"acceptPci",errorMessage:g.get(null===(p=E.acceptPci)||void 0===p?void 0:p.errorMessage),isValid:O.acceptPci},{children:R(at,{label:k,checked:N.acceptPci,name:"acceptPci",onChange:v("acceptPci")})}))]})),P=R(ag,{onHome:D,homeButtonLabel:g.get("goToOverview"),onNext:()=>i(this,void 0,void 0,(function*(){if(w.addEvent("Clicked PCI signing",{segmentation:Object.assign({},b)}),_(),I)try{h(Fu.LOADING),yield o(e.id,{signedBy:N.signer,pciTemplateReferences:T}),h(Fu.SUCCESS),y({label:g.get("pciSignedSuccessfully"),type:ug.SUCCESS}),w.addEvent("Succeeded PCI signing",{segmentation:Object.assign({},b)}),D()}catch(e){h(Fu.SUCCESS),y({label:g.get("pciSignFailed"),type:ug.ERROR}),w.addEvent("Failed PCI signing",{segmentation:Object.assign({},b)})}else w.addEvent("Encountered PCI validation error",{segmentation:Object.assign(Object.assign({},b),{fields:Object.entries(O).filter((([,e])=>!e)).map((([e])=>e))})})})),nextButtonLabel:g.get("sign")});return R(og,{content:L,footer:P})}const Tb=["signer","acceptServiceAgreement"];function Ab({legalEntity:e,serviceAgreement:t,handleHomeClick:a,handleLanguageChange:r,handleSign:n,taskType:o,trackingConig:s}){var l,d,c,u;const{i18n:m}=We(),{showToast:p}=pg(),g=Fp({trackingConig:s,legalEntity:e,task:o}),[y,b]=se(null),{handleChangeFor:f,triggerValidation:h,data:v,valid:_,isValid:N,errors:O}=ua({schema:Tb,rules:{signer:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},acceptServiceAgreement:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}}}),I=JSON.parse(decodeURIComponent(escape(window.atob(t.document)))),E=e.type===il.ORGANIZATION?hu(e).map((({legalEntityId:e,name:t})=>({id:e,name:t}))):[{id:null==e?void 0:e.id,name:`${null===(l=null==e?void 0:e.individual)||void 0===l?void 0:l.name.firstName} ${null===(d=null==e?void 0:e.individual)||void 0===d?void 0:d.name.lastName}`}],T=()=>{w.addEvent("Returned to task overview from ToS",{segmentation:Object.assign({},g)}),a()};de((()=>{r(t.type)}),[m.locale]),de((()=>{w.addPageView("ToS dropin"),w.addEvent("Started ToS task",{segmentation:Object.assign({},g)})}),[]);const A=R(Vu,Object.assign({status:y,formOpacityWhenLoading:.3,showSpinner:!1},{children:[R(Ob,{contract:I,onExpandSection:e=>{w.addEvent("Expanded ToS section",{segmentation:Object.assign(Object.assign({},g),{statementExtended:e})})}}),R(Ue,Object.assign({name:"signer",label:m.get("signer"),classNameModifiers:["col-50"],className:"adl-u-margin-y-32",errorMessage:m.get(null===(c=O.signer)||void 0===c?void 0:c.errorMessage),isValid:_.signer},{children:Jt("select",{onChange:f("signer","blur"),name:"signer",placeholder:m.get("selectSigner"),selected:v.signer,items:E})})),R(Ue,Object.assign({name:"acceptServiceAgreement",errorMessage:m.get(null===(u=O.acceptServiceAgreement)||void 0===u?void 0:u.errorMessage),isValid:_.acceptServiceAgreement},{children:R(at,{label:m.get("iHaveReadAndIAcceptTheseTerms"),checked:v.acceptServiceAgreement,name:"acceptServiceAgreement",onChange:f("acceptServiceAgreement")})}))]})),S=R(ag,{onHome:T,homeButtonLabel:m.get("goToOverview"),onNext:()=>i(this,void 0,void 0,(function*(){if(w.addEvent("Clicked ToS signing",{segmentation:Object.assign({},g)}),h(),N)try{b(Fu.LOADING),yield n(e.id,t.termsOfServiceDocumentId,{acceptedBy:v.signer}),b(Fu.SUCCESS),p({label:m.get("serviceAgreementSignedSuccessfully"),type:ug.SUCCESS}),w.addEvent("Succeeded ToS signing",{segmentation:Object.assign({},g)}),T()}catch(e){b(Fu.SUCCESS),p({label:m.get("serviceAgreementSignFailed"),type:ug.ERROR}),w.addEvent("Failed ToS signing",{segmentation:Object.assign({},g)})}else w.addEvent("Encountered ToS validation error",{segmentation:Object.assign(Object.assign({},g),{fields:Object.entries(_).filter((([,e])=>!e)).map((([e])=>e))})})})),nextButtonLabel:m.get("sign")});return R(og,{content:A,footer:S})}const Sb=(e,t)=>i(void 0,void 0,void 0,(function*(){Rb(Cb(e),t)})),Cb=(e,t="application/octet-stream")=>{const a=window.atob(e),r=a.length,n=new Array(r);for(let e=0;e<r;e+=1)n[e]=a.charCodeAt(e);return new Blob([new Uint8Array(n)],{type:t})},Rb=(e,t)=>{if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(e,t);else{const a=window.URL.createObjectURL(e),r=document.createElement("a");r.style.display="none",r.href=a,r.setAttribute("download",t),void 0===r.download&&r.setAttribute("target","_blank"),document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(a)}},Db=cg((function(e){const{i18n:a}=We(),r={[Lc]:ue(null),[wc]:ue(null),[Pc]:ue(null),[jc]:ue(null)},[n,i]=se(null);this.isCurrentFormValid=()=>{var t;return null===(t=null==r?void 0:r[e.activeForm.formId])||void 0===t?void 0:t.current.isValid},this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==r?void 0:r[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()};const o=Rl(e,Lc),s=Rl(e,Pc),l=Rl(e,wc),d=Rl(e,jc),c=({currentState:t,prevState:a})=>{var r,n,o,l,d,c,u;const m=null===(n=null===(r=a.data)||void 0===r?void 0:r[Lc])||void 0===n?void 0:n.companyCountry,p=null===(l=null===(o=t.data)||void 0===o?void 0:o[Lc])||void 0===l?void 0:l.companyCountry;null!=p&&p!==m&&e.onCountryChange(p);const g=null===(c=null===(d=t.data)||void 0===d?void 0:d[Lc])||void 0===c?void 0:c.legalCompanyName;i((null===(u=null==s?void 0:s.data)||void 0===u?void 0:u.tradingName)||g)};return R("div",Object.assign({className:"adyen-kyc-sol-prop"},{children:(u=e.activeForm,R(t.Fragment,{children:[R(Yd,{owner:"SolePropComponent",onChange:c}),R("div",Object.assign({className:u.formId!==Lc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(ic,Object.assign({},o,{data:Object.assign(Object.assign({},o.data),{companyCountry:e.country}),labels:{companyCountry:"countryOfEstablishment",legalCompanyName:"legalNameOfSoleProprietor"},ref:r[Lc],heading:a.get("nameAndCountry"),id:Lc}))})),R("div",Object.assign({className:u.formId!==Pc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(Zd,Object.assign({},s,{data:Object.assign(Object.assign({},s.data),{tradingName:n}),ref:r[Pc],heading:a.get("registrationDetails"),id:Pc,country:e.country}))})),R("div",Object.assign({className:u.formId!==wc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(yd,Object.assign({},l,{ref:r[wc],heading:a.get("registeredAddress"),id:wc,country:e.country,problems:null==e?void 0:e.problems}))})),R("div",Object.assign({className:u.formId!==jc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:R(Dc,Object.assign({},d,{ref:r[jc],id:jc,legalEntityType:il.SOLE_PROPRIETORSHIP}))}))]}))}));var u}),{getComponentForms:()=>kc,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){if(e){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),Qp[t])),{});return a=eg(Jp[t],a),a}}([e[il.TRUST]],t),rules:Lg,getTaskName:()=>"solePropDetails"});function kb(e){var t;const{parentLegalEntity:a,legalEntityResponse:r,handleCreateDocument:n,handleGetDocument:o,handleUpdateDocument:s}=e,{i18n:l,setLocale:d}=We(),[c,u]=se(e.problems),m=g(l.locale),[p,y]=se(null),{showToast:b}=pg(),[f,h]=se(((e,t)=>{var a;let r=(e=>{var t;let a;return(null==e?void 0:e.soleProprietorship)&&(a=hp(e,El),(null===(t=e.soleProprietorship)||void 0===t?void 0:t.principalPlaceOfBusiness)?a.solePropRegistrationAddress.operationalAddressIsSame=rd.OPERATIONAL_ADDRESS_IS_NOT_SAME:(a.solePropRegistrationAddress||(a.solePropRegistrationAddress={}),a.solePropRegistrationAddress.operationalAddressIsSame=rd.OPERATIONAL_ADDRESS_IS_SAME)),a})(e);if(!(e=>{var t;const a=(null===(t=null==e?void 0:e.solePropRegistrationAddress)||void 0===t?void 0:t.registrationAddress)||{};return Object.entries(a).some((([e,t])=>"country"!==e&&Boolean(t)))})(r)){const e=null===(a=up(t,!1))||void 0===a?void 0:a.address;r=Object.assign(Object.assign({},r),{solePropRegistrationAddress:Object.assign(Object.assign({},null==r?void 0:r.solePropRegistrationAddress),{registrationAddress:Object.assign({},e)})})}return r})(r,a)),v=e=>e.some((e=>[kc.solePropConstitutionalDocument.formId].includes(e.formId))),_=ym(n,o,s),N=({forms:e,legalEntity:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){if(v(e)){const e=yield Np(a,t.id);e&&(yield _.uploadDocuments(e,t.id))}})),O=({legalEntity:t})=>i(this,void 0,void 0,(function*(){if(!(null==r?void 0:r.id)){const r={entityAssociations:[{type:il.SOLE_PROPRIETORSHIP,legalEntityId:t.id}]};yield e.handleUpdateLegalEntity(r,a.id)}}));de((()=>{var t;e.eventEmitter.on("updateLocale",(e=>d(e)));const a=(null===(t=null==r?void 0:r.documentDetails)||void 0===t?void 0:t.map((e=>e.id)))||[];try{a.length&&_.fetchDocuments(a,r.id).then((()=>{const e=(e=>{const t=_m(e,cc.CONSTITUTIONAL_DOCUMENT)||null;return{solePropConstitutionalDocument:t?{constitutionalDocument:[{name:Op(t)}]}:null}})(r.id);h(Object.assign(Object.assign({},f),e))})).catch((()=>{b({label:l.get("failedToFetchRelevantDocuments"),type:ug.ERROR})}))}catch(e){b({label:l.get("failedToFetchRelevantDocuments"),type:ug.ERROR})}}),[]);const I=e=>{var t,a;return Object.assign({},(null==e?void 0:e.constitutionalDocument)&&{solePropConstitutionalDocument:{fileName:null===(a=null===(t=e.constitutionalDocument)||void 0===t?void 0:t[0])||void 0===a?void 0:a.name}})};return R(Db,{capabilities:e.capabilities,data:f,country:(null===(t=null==f?void 0:f.solePropNameAndCountry)||void 0===t?void 0:t.companyCountry)||e.country,problems:c,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,onSubmit:({data:t,forms:a,setLoadingStatus:n})=>i(this,void 0,void 0,(function*(){n(Fu.LOADING);let i=_p(t);try{(null==r?void 0:r.id)||(null==p?void 0:p.id)?i=yield e.handleUpdateLegalEntity(V("type").from(i),(null==r?void 0:r.id)||(null==p?void 0:p.id)):(i=yield e.handleCreateLegalEntity(i),y(i)),yield N({forms:a,legalEntity:i,dataSubmitted:t}),yield O({legalEntity:i}),n(Fu.SUCCESS),b({label:l.get("successfullyUpdatedDetails"),type:ug.SUCCESS}),null==e||e.onSubmit(t)}catch(e){if(b({label:l.get("failedToUpdateDetails"),type:ug.ERROR}),(null==e?void 0:e.errorCode)===st){const t=gg(e,Cl.TRUST);u(Object.assign(Object.assign({},c),{validationErrors:t}))}n(Fu.SUCCESS)}})),legalEntityType:il.TRUST,summary:{formatData:(e,t)=>{var a,r,n,i;let o,s=W(e);return(null===(a=null==s?void 0:s.solePropNameAndCountry)||void 0===a?void 0:a.companyCountry)&&(o=m.getCountryName(s.solePropNameAndCountry.companyCountry)),s.solePropNameAndCountry={legalNameOfSoleProprietor:null===(r=e.solePropNameAndCountry)||void 0===r?void 0:r.legalCompanyName,countryOfEstablishment:o},(null===(n=null==s?void 0:s.solePropRegistrationAddress)||void 0===n?void 0:n.registrationAddress)&&(s.solePropRegistrationAddress.hasInnerForms=!0,s.solePropRegistrationAddress.registrationAddress=Pe(null==s?void 0:s.solePropRegistrationAddress.registrationAddress,m)),(null===(i=null==s?void 0:s.solePropRegistrationAddress)||void 0===i?void 0:i.operationalAddress)&&(s.solePropRegistrationAddress.operationalAddress=Pe(null==s?void 0:s.solePropRegistrationAddress.operationalAddress,m)),v(t)&&(delete s[jc],s=Object.assign(Object.assign({},s),I(e.solePropConstitutionalDocument))),s},getOmittedKeys:()=>["operationalAddressIsSame"]},hasDataChanged:e=>i(this,void 0,void 0,(function*(){var t;const a=(null===(t=_p(e))||void 0===t?void 0:t.soleProprietorship)||{},n=(null==r?void 0:r.soleProprietorship)||{},i=yield Np(e,"");return!B(a,n)||i.length>0})),canSubmit:e=>sl.SOLE_PROPRIETORSHIP.every((t=>{const a=Ip(e,t);return!Ss(a)}))})}function Lb({targetLegalEntityType:e,handleHomeClick:a,onLegalEntityTypeChange:r,handleUpdateLegalEntity:n,legalEntityResponse:o}){const{i18n:s}=We(),[l,d]=se(null),{showToast:c}=pg(),u=R(ag,{onHome:a,homeButtonLabel:s.get("noGoBack"),onNext:()=>i(this,void 0,void 0,(function*(){try{d(Fu.LOADING),yield n({type:e},o.id),c({label:s.get("successfullyUpdatedDetails"),type:ug.SUCCESS}),r()}catch(e){c({label:s.get("failedToUpdateDetails"),type:ug.ERROR})}finally{d(Fu.SUCCESS)}})),nextButtonLabel:e===il.ORGANIZATION?s.get("continueCompany"):s.get("continueIndividual")});return R(og,{content:R(Vu,Object.assign({status:l,formOpacityWhenLoading:.3,showSpinner:!1},{children:[(e=>{switch(e){case il.ORGANIZATION:return R(t.Fragment,{children:[R("h2",Object.assign({className:"adyen-kyc-form-header__heading","data-testid":il.ORGANIZATION},{children:s.get("continueAsCompany")})),R("span",{children:s.get("indicatedPayoutToCompany")}),R("p",{children:s.get("continueSigningUpAsCompany")})]});case il.INDIVIDUAL:return R(t.Fragment,{children:[R("h2",Object.assign({className:"adyen-kyc-form-header__heading","data-testid":il.INDIVIDUAL},{children:s.get("continueAsIndividual")})),R("span",{children:s.get("indicatedPayoutToPersonalAccount")}),R("p",{children:s.get("continueSigningUpAsIndividual")})]});default:R("p",{children:"Change not supported"})}})(e),u]}))})}const wb=[Cl.DECISION_MAKER_OVERVIEW,Cl.TASKS_OVERVIEW];function Pb(e){var{capabilities:t,legalEntityResponse:a,eventEmitter:r,onSubmit:o,onChange:s,onLoad:l=(()=>{}),onNavigate:d=(()=>{})}=e,c=n(e,["capabilities","legalEntityResponse","eventEmitter","onSubmit","onChange","onLoad","onNavigate"]);const{showToast:u}=pg(),{loadingContext:m,clientKey:p,contextCountry:g,setLocale:y,i18n:b}=We(),[f,h]=se(!1),[v,_]=se([]),[N,O]=se([Cl.TASKS_OVERVIEW]),[I,E]=se(a),[T,A]=se(null),[S,C]=se(null),[D,k]=se(null),[L,P]=se([]),[j,x]=se(null),[M,F]=se(null),[V,U]=se(null),[B,W]=se(null),[H,q]=se(null),[G,X]=se(Fc(a)),[Y,K]=se(null),[z,Z]=se(null),[Q,J]=se(null),[ee,te]=se();de((()=>{w.addPageView("Task list"),r.on("updateLocale",(e=>y(e)))}),[]),ce((()=>{h(!0),(()=>i(this,void 0,void 0,(function*(){const e=yield $({loadingContext:m,clientKey:p,country:g,capabilities:t,legalEntityType:I.type});(null==e?void 0:e.bankVerificationProviders)&&te(e.bankVerificationProviders),(null==e?void 0:e.taskList)&&(_(e.taskList),e.taskList.includes(Cl.PCI_DSS)&&(yield ue()),yield ge())})))().catch(console.error).finally((()=>{h(!1),l()}))}),[I.type,g]),de((()=>{let e=I;if(wb.includes(N[N.length-1])){if(!Y){const t=setInterval((()=>i(this,void 0,void 0,(function*(){(e=>{var t;return Object.values(null!==(t=null==e?void 0:e.capabilities)&&void 0!==t?t:{}).every((e=>e.verificationStatus===zm.VALID||e.verificationStatus===zm.REJECTED))})(e)?ae():e=yield be()}))),3e3);K(t)}}else ae()}),[N.length]);const ae=()=>{Y&&(clearInterval(Y),K(null))},re=e=>{O([...N,e]),d(e)},ne=(e,t)=>{switch(e){case Cl.PAYOUT:ve(Cl.PAYOUT,t);break;case Cl.PAYIN:ve(Cl.PAYIN,t);break;case Cl.TRUST:Ie(Cl.TRUST);break;case Cl.TRUST_MEMBER_OVERVIEW:Ie(Cl.TRUST_MEMBER_OVERVIEW);break;case Cl.PCI_DSS:Ee(Cl.PCI_DSS);break;case Cl.SOLE_PROPRIETOR_COMPANY:Oe(Cl.SOLE_PROPRIETOR_COMPANY);break;case Cl.SERVICE_AGREEMENT:Te(Cl.SERVICE_AGREEMENT,t);break;default:re(e)}},ie=(e=1)=>{if(N.length>1){N[N.length-(e+1)]===Cl.TASKS_OVERVIEW?(O([Cl.TASKS_OVERVIEW]),d(Cl.TASKS_OVERVIEW)):(O(N.slice(0,-1*e)),d(N[N.length-1]))}},oe=e=>{s(e,this)},le=(e,t)=>i(this,void 0,void 0,(function*(){o(e,this),yield be(),ie(t)})),ue=()=>i(this,void 0,void 0,(function*(){var e,t;if(I.id&&(null==c?void 0:c.handleGetPciStatus))try{const a=yield c.handleGetPciStatus(I.id);return a.hasDocuments=(null===(t=null===(e=yield null==c?void 0:c.handleGetPciQuestionnaires(I.id))||void 0===e?void 0:e.data)||void 0===t?void 0:t.length)>0,k(a),a}catch(e){console.warn(b.get("failedToGetPciStatus"))}})),me=()=>i(this,void 0,void 0,(function*(){const e=Xm(I)[0];if(e)try{const t=yield null==c?void 0:c.handleGetLegalEntity(e);Z(t)}catch(e){u(b.get("failedToFetchSoleProp"),{type:ug.ERROR})}})),pe=()=>i(this,void 0,void 0,(function*(){const e=e=>i(this,void 0,void 0,(function*(){const t=yield c.handleGetPciTemplate(I.id,{language:e});A(t)}));try{yield e(b.locale.substring(0,2))}catch(t){const a="en";b.locale.substring(0,2)!==a&&(u({label:b.get("failedToGetPciTemplateInSelectedLanguageFallbackToEn"),type:ug.ERROR}),yield e(a))}})),ge=()=>i(this,void 0,void 0,(function*(){if(I.id&&(null==c?void 0:c.handleGetServiceAgreementStatus))try{const e=yield c.handleGetServiceAgreementStatus(I.id);P(e.termsOfServiceTypes)}catch(e){console.warn(b.get("failedToGetServiceAgreementStatus"))}})),ye=e=>i(this,void 0,void 0,(function*(){const t=t=>i(this,void 0,void 0,(function*(){const a=yield c.handleGetServiceAgreement(I.id,{type:e,language:t});C(a)}));try{yield t(b.locale.substring(0,2))}catch(e){const a="en";b.locale.substring(0,2)!==a&&(u({label:b.get("failedToGetServiceAgreementInSelectedLanguageFallbackToEn"),type:ug.ERROR}),yield t(a))}})),be=()=>i(this,void 0,void 0,(function*(){if(I.id&&(null==c?void 0:c.handleGetLegalEntity))try{const e=yield null==c?void 0:c.handleGetLegalEntity(I.id);return E(e),X(Fc(e)),e}catch(e){console.warn(b.get("failedToFetchLegalEntityDetails"))}})),fe=()=>i(this,void 0,void 0,(function*(){if(H.id&&(null==c?void 0:c.handleGetLegalEntity))try{const e=yield null==c?void 0:c.handleGetLegalEntity(H.id);return q(e),e}catch(e){console.warn(b.get("failedToFetchTrustDetails"))}})),he=(e,t,a=Cl.DECISION_MAKER)=>i(this,void 0,void 0,(function*(){if(t&&t!==I.id){const e=yield null==c?void 0:c.handleGetLegalEntity(t);U(e)}else U(I);if(e&&(null==c?void 0:c.handleGetLegalEntity))try{const t=yield null==c?void 0:c.handleGetLegalEntity(e);F(t),re(a)}catch(e){u({label:b.get("failedFetchingDecisionMaker"),type:ug.ERROR})}else F(null),re(a)})),ve=(e,t)=>i(this,void 0,void 0,(function*(){if(t)try{yield Se(t),Ym(I)&&!z&&(yield me())}finally{re(e)}else x(null),re(e)})),_e=e=>{W(e||null),re(Cl.TRUST_MEMBER_ROLE_AND_TYPE)},Ne=e=>i(this,void 0,void 0,(function*(){try{if(null==e?void 0:e.legalEntityId){const t=yield null==c?void 0:c.handleGetLegalEntity(e.legalEntityId);F(t)}else F(null);W(e),re(e.legalEntityType===il.ORGANIZATION?Cl.TRUST_MEMBER_COMPANY:Cl.TRUST_MEMBER_INDIVIDUAL)}catch(e){u(b.get("failedToFetchTrustMemberDetails"),{type:ug.ERROR})}})),Oe=e=>i(this,void 0,void 0,(function*(){try{yield me()}finally{re(e)}})),Ie=e=>i(this,void 0,void 0,(function*(){var t,a;const r=null===(a=null===(t=null==I?void 0:I.entityAssociations)||void 0===t?void 0:t.find((e=>e.type===il.TRUST)))||void 0===a?void 0:a.legalEntityId;if(r)try{const t=yield null==c?void 0:c.handleGetLegalEntity(r);q(t),re(e)}catch(e){u({label:b.get("failedToFetchTrustDetails"),type:ug.ERROR})}else re(Cl.TRUST)})),Ee=e=>i(this,void 0,void 0,(function*(){try{yield pe(),re(e)}catch(e){u({label:b.get("failedToGetPciTemplate"),type:ug.ERROR})}})),Te=(e,t)=>i(this,void 0,void 0,(function*(){if(L.length)try{yield ye(t),re(e)}catch(e){u({label:b.get("failedToGetServiceAgreement"),type:ug.ERROR})}})),Ae=()=>i(this,void 0,void 0,(function*(){const e=Fp({trackingConig:{topLevelLegalEntity:a},legalEntity:I,task:Cl.PCI_DSS});try{const t=yield null==c?void 0:c.handleGetPciQuestionnaires(I.id);for(const e of t.data){const t=yield null==c?void 0:c.handleDownloadPci(I.id,e.id);yield Sb(t.content,t.id+".pdf")}}catch(e){u({label:b.get("failedToDownloadPci"),type:ug.ERROR})}finally{w.addEvent("Downloaded signed PCI form",{segmentation:Object.assign({},e)})}})),Se=e=>i(this,void 0,void 0,(function*(){if(e&&(null==c?void 0:c.handleGetTransferInstrument))try{const t=yield null==c?void 0:c.handleGetTransferInstrument(e);x(t)}catch(e){u({label:b.get("failedToFetchPayoutAccount"),type:ug.ERROR})}})),Ce=e=>{var t;if(null==e?void 0:e.id)return null===(t=null==G?void 0:G.LegalEntity)||void 0===t?void 0:t[e.id]},Re=()=>{var e;const t=null===(e=null==z?void 0:z.soleProprietorship)||void 0===e?void 0:e.name;return t||Vy(I)},De=e=>i(this,void 0,void 0,(function*(){yield fe(),yield le(e,2)})),ke=e=>{J(e),re(Cl.LEGAL_ENTITY_TYPE_SWITCHER)},Le=()=>{var e,n,s,l,d,u;const m=N[N.length-1];switch(m){case Cl.TASKS_OVERVIEW:return R(Xg,{onNavigateToTask:ne,tasks:v,legalEntityResponse:I,capabilityProblems:G,onPciDownload:Ae,pciStatus:D,serviceAgreementTypes:L});case Cl.DECISION_MAKER_OVERVIEW:return R(zg,{trackingConig:{topLevelLegalEntity:a},parentLegalEntity:V,legalEntityResponse:I,onNavigateToIndividual:he,handleUpdateLegalEntity:null==c?void 0:c.handleUpdateLegalEntity,navigateBackToTaskList:ie,onDecisionMakerDelete:be,capabilityProblems:G});case Cl.INDIVIDUAL:return R(fg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Cl.INDIVIDUAL,parentLegalEntity:null,legalEntityResponse:I,problems:Ce(I),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:e=>i(this,void 0,void 0,(function*(){o(e,this),yield be(),re(Cl.TASKS_OVERVIEW),J(null)})),handleHomeClick:()=>re(Cl.TASKS_OVERVIEW),homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken,onTypeSwitch:ke,isTargetLegalEntityType:Q===il.INDIVIDUAL}));case Cl.DECISION_MAKER:return R(fg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Cl.DECISION_MAKER,parentLegalEntity:V,legalEntityResponse:M,problems:Ce(M),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:le,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken}));case Cl.TRUST_MEMBER_COMPANY_OWNER:return R(fg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Cl.TRUST_MEMBER_COMPANY_OWNER,parentLegalEntity:V,legalEntityResponse:M,problems:Ce(M),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:e=>i(this,void 0,void 0,(function*(){yield fe(),yield le(e)})),handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken}));case Cl.TRUST_MEMBER_INDIVIDUAL:return R(fg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Cl.TRUST_MEMBER_INDIVIDUAL,parentLegalEntity:H,legalEntityResponse:M,problems:Ce(M),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:De,handleBackClick:ie,handleHomeClick:()=>re(Cl.TRUST_MEMBER_OVERVIEW),homeButtonLabel:b.get("saveAndGoToOverview"),associationDetail:B,handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken}));case Cl.COMPANY:return R(Pg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Cl.COMPANY,legalEntityResponse:I,capabilities:t,problems:Ce(I),onChange:oe,eventEmitter:r,onSubmit:e=>i(this,void 0,void 0,(function*(){o(e,this),yield be(),re(Cl.TASKS_OVERVIEW),J(null)})),handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,onTypeSwitch:ke,isTargetLegalEntityType:Q===il.ORGANIZATION}));case Cl.TRUST_MEMBER_COMPANY:return R(Pg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Cl.TRUST_MEMBER_COMPANY,parentLegalEntity:H,legalEntityResponse:M,capabilities:t,problems:null===(e=null==G?void 0:G.LegalEntity)||void 0===e?void 0:e[I.id],onChange:oe,eventEmitter:r,onSubmit:De,handleBackClick:ie,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),associationDetail:B,handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress}));case Cl.PAYOUT:case Cl.PAYIN:return R(Wy,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Cl.PAYOUT,problems:null===(n=null==G?void 0:G.BankAccount)||void 0===n?void 0:n[null==j?void 0:j.id],currentTask:m,transferInstrument:j,legalEntityResponse:I,accountHolder:Re(),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:le,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),bankVerificationVendors:ee,navigateBackToTaskList:ie}));case Cl.TRUST:return R(rb,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Cl.TRUST,problems:null===(s=null==G?void 0:G.LegalEntity)||void 0===s?void 0:s[null==H?void 0:H.id],parentLegalEntity:I,legalEntityResponse:H,capabilities:t,onChange:oe,eventEmitter:r,onSubmit:le,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview")}));case Cl.TRUST_MEMBER_OVERVIEW:return R(nb,{parentLegalEntity:I,trustResponse:H,capabilityProblems:G,onAddTrustMember:_e,onAddTrustMemberOwner:he,navigateBackToTaskList:ie,handleUpdateLegalEntity:null==c?void 0:c.handleUpdateLegalEntity,onTrustMemberDelete:fe});case Cl.TRUST_MEMBER_ROLE_AND_TYPE:return R(cb,{navigateNext:Ne,navigateBack:()=>i(this,void 0,void 0,(function*(){yield fe(),ie()})),trust:H,trustMember:B,handleUpdateLegalEntity:null==c?void 0:c.handleUpdateLegalEntity});case Cl.PCI_DSS:return R(Eb,{legalEntity:I,pciTemplateResponse:T,trackingConig:{topLevelLegalEntity:a},taskType:Cl.PCI_DSS,handleHomeClick:ie,handleLanguageChange:pe,handleSign:(...e)=>i(this,void 0,void 0,(function*(){yield c.handleSignPci(...e),yield ue()}))});case Cl.SOLE_PROPRIETOR_COMPANY:return R(kb,Object.assign({},c,{taskType:Cl.SOLE_PROPRIETOR_COMPANY,parentLegalEntity:I,legalEntityResponse:z,capabilities:t,problems:null===(l=null==G?void 0:G.LegalEntity)||void 0===l?void 0:l[null==z?void 0:z.id],onChange:oe,eventEmitter:r,onSubmit:le,handleBackClick:ie,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),country:null===(u=null===(d=null==I?void 0:I.individual)||void 0===d?void 0:d.residentialAddress)||void 0===u?void 0:u.country}));case Cl.SERVICE_AGREEMENT:return R(Ab,{legalEntity:I,serviceAgreement:S,trackingConig:{topLevelLegalEntity:a},taskType:Cl.SERVICE_AGREEMENT,handleHomeClick:ie,handleLanguageChange:ye,handleSign:(...e)=>i(this,void 0,void 0,(function*(){yield c.handleSignServiceAgreement(...e),yield ge()}))});case Cl.LEGAL_ENTITY_TYPE_SWITCHER:return R(Lb,Object.assign({},c,{targetLegalEntityType:Q,legalEntityResponse:a,handleHomeClick:ie,onLegalEntityTypeChange:()=>i(this,void 0,void 0,(function*(){yield be(),(()=>{switch(Q){case il.INDIVIDUAL:re(Cl.INDIVIDUAL);break;case il.ORGANIZATION:re(Cl.COMPANY)}})()}))}))}};return f?R(jg,{}):Le()}const jb={individualDropin:class extends Sg{renderDropinComponent(){return R(fg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},individual:class extends P{render(){return R(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey,contextCountry:this.props.country},{children:R(fg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,hideDropinLayout:!0}))}))}},personalDetails:class extends P{render(){return R(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey},{children:R(om,Object.assign({},this.props))}))}},address:class extends P{get data(){return this.state.data}get isValid(){return!!this.state.isValid}render(){return R(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey},{children:R($c,Object.assign({ref:e=>{this.componentRef=e}},this.props,{onChange:this.setState}))}))}},contactDetails:class extends P{render(){return R(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,translations:this.props.translations},{children:R(Pu,Object.assign({},this.props))}))}},company:class extends P{render(){return R(X,Object.assign({i18n:this.props.i18n,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,translations:this.props.translations,locale:this.props.locale,contextCountry:this.props.country},{children:R(Pg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,hideDropinLayout:!0}))}))}},companyDropin:class extends Sg{renderDropinComponent(){return R(Pg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},taskList:class extends Sg{renderDropinComponent(){return R(Pb,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},payoutAccount:class extends Sg{renderDropinComponent(){return R(Wy,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},trustDropin:class extends Sg{renderDropinComponent(){return R(rb,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}}},xb={type:"object",propertiesSchema:{registeredAddress:{type:"object",propertiesSchema:{country:{type:"string",required:!0}}}}},Mb={type:"object",propertiesSchema:{residentialAddress:{type:"object",propertiesSchema:{country:{type:"string",required:!0}}}}},Fb={id:{type:"string",required:!0},legalEntityId:{type:"string",required:!0},type:{type:"string",exactValue:["bankAccount","recurringDetail"],required:!0},bankAccount:{type:"object",propertiesSchema:{accountNumber:{type:"string"},accountType:{type:"string"},bankBicSwift:{type:"string"},bankCode:{type:"string"},bankName:{type:"string"},branchCode:{type:"string"},checkCode:{type:"string"},countryCode:{type:"string"},currencyCode:{type:"string"},iban:{type:"string"}}}},Vb={personalDetails:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{firstName:{type:"string",required:!0},lastName:{type:"string",required:!0},birthDate:{type:"string",required:!0},idNumber:{type:"string",required:!0},residencyCountry:{type:"string",required:!0},phoneNumber:{type:"string",required:!0},email:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},address:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{country:{type:"string"},city:{type:"string",required:!0},postalCode:{type:"string",required:!0},stateOrProvince:{type:"string",required:!0},houseNumberOrName:{type:"string",required:!0},street:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},contactDetails:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{phoneNumber:{type:"string",required:!0},email:{type:"string",required:!0},birthDate:{type:"string",required:!0},residencyCountry:{type:"string",required:!0},jobTitle:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},company:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{companyType:{type:"object",required:!0,propertiesSchema:{entityType:{type:"string",required:!0}}}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},individual:{propertiesSchema:{taskType:{type:"string"},data:{type:"object",required:!0,propertiesSchema:{firstName:{type:"string",required:!0},lastName:{type:"string",required:!0},birthDate:{type:"string",required:!0},idNumber:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},payoutAccount:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},onUserEvent:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},transferInstrument:{type:"object",propertiesSchema:Fb},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:["organization","individual"],required:!0},documents:{type:"array"},capabilities:{type:"object",required:!0},individual:Mb,organization:xb}}}},companyDropin:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:"organization",required:!0},capabilities:{type:"object",required:!0},organization:xb}}}},individualDropin:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},onUserEvent:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:"individual",required:!0},documents:{type:"array"},capabilities:{type:"object",required:!0},individual:Mb}}}},trustDropin:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:"trust",required:!0},capabilities:{type:"object",required:!0},trust:xb}}}},taskList:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},handleGetLegalEntity:{type:"function",required:!0},handleCreateLegalEntity:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},onUserEvent:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},transferInstrument:{type:"object",propertiesSchema:Fb},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:["organization","individual","trust"],required:!0},documents:{type:"array"},capabilities:{type:"object",required:!0},individual:Mb,organization:xb}}}}},Ub=({expected:e,received:t,schemaParentsPaths:a})=>{for(const[r,n]of Object.entries(e)){const{type:e,exactValue:i,required:o,propertiesSchema:s}=n,l=t[r];if(o&&As(l))throw new Error(`\n\n"${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} is required, Please add it to the form creation options\n\n- For more information please check: https://github.com/Adyen/adyen-kyc-components#adyenkyccreatedropincomponentname-componentname-options-options.\n `);if(o||!o&&!As(l)){if("array"===e&&!Array.isArray(l))throw new Error(`\n\n "${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} must be an array.`);if("array"!==e&&typeof l!==e)throw new Error(`\n\n "${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} must be a ${e}.`);if(i&&!Array.isArray(i)&&i!==l)throw new Error(`\n\n "${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} value should be equal to "${i}".`);if(i&&Array.isArray(i)&&!i.includes(l))throw new Error(`\n\n "${r}" ${a.length>0?` inside "${a.join(" -> ")}"`:""} value should be equal to one of: "${q(i,{type:"disjunction"})}"`);As(s)||(a.push(r),Ub({expected:s,received:l,schemaParentsPaths:a}),a.pop())}}};class Bb{constructor(e){this.components=[],this.update=e=>(this.setOptions(e),this.components.forEach((e=>e.update(this.getPropsForComponent(this.options)))),this),this.updateLocale=e=>(this.setOptions(e),this.components.forEach((e=>e.updateLocale(this.getPropsForComponent(this.options)))),this),this.remove=e=>(this.components=this.components.filter((t=>t._id!==e._id)),e.unmount(),this),this.setOptions=e=>{var t;return this.options=Object.assign(Object.assign({},this.options),e),this.options.loadingContext=(t=this.options.environment).endsWith("/")?t:`${t}/`,this.options.locale||(this.options.locale=o),this.modules={i18n:new S},(e=>{const t=["country","locale","clientKey"].filter((t=>!e[t]));if(t.length>0)throw new Error(`\n\nPlease specify a ${q(t)} for the SDK to initialize!\n\n- For more information please check: https://github.com/Adyen/adyen-kyc-components#configuration.\n `)})(this.options),this},this.create=this.create.bind(this),this.setOptions(e)}create(e,t){const a=this.getPropsForComponent(t);return this.validate(e,t),this.createForm(e,a)}createForm(e,t){const a=jb[e],r=this.getPropsForComponent(t),n=new a(Object.assign(Object.assign({},this.options),r));return this.components.push(n),n}getPropsForComponent(e){return Object.assign(Object.assign({},e),{i18n:this.modules.i18n})}validate(e,t){(e=>{if(!e)throw new Error("\n\n No form Component was passed!\n\n- For more information please check: https://github.com/Adyen/adyen-kyc-components#adyenkyccreatedropincomponentname-componentname-options-options\n ");const t=jb[e],a=Object.keys(Vb);if(!(t&&t.prototype instanceof P))throw new Error(`\n\n"${e}" is not a valid form Component. Please enter one of the following:\n- ${q(a)}.\n `)})(e),((e,t)=>{const a=Vb[e],{propertiesSchema:r}=a;As(r)||Ub({expected:r,received:t,schemaParentsPaths:[]})})(e,t)}}Bb.version={version:void 0,revision:void 0,branch:void 0,buildId:void 0},module.exports=Bb;
|