@adyen/kyc-components 2.37.2 → 2.38.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.
@@ -6,6 +6,7 @@ import { lazy, Suspense, useId, forwardRef, memo, useMemo as useMemo$1, useEffec
6
6
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
7
7
  import { debounce, noop as noop$1, isEmpty as isEmpty$1, range } from "lodash";
8
8
  import OpenBankingSDK from "@adyen/openbankingsdk";
9
+ import { jsxs as jsxs$1, jsx as jsx$1 } from "preact/compat/jsx-runtime";
9
10
  import "@adyen/adyen-document-viewer/dist/adyen-document-viewer.min.css";
10
11
  import AdyenDocumentViewer from "@adyen/adyen-document-viewer";
11
12
  const ConfigurationApiContext = createContext(void 0);
@@ -187,6 +188,7 @@ const registrationAddress = "Registration address";
187
188
  const registeredAddressHeaderDescription = "The address as it appears on your company's official registration documents.";
188
189
  const registeredAddressHeaderDescription__NL = "The address registered to your company with the Chamber of Commerce.";
189
190
  const registeredAddressHeaderDescription__US = "Your address as it appears on your Secretary of State Registration.";
191
+ const registeredAddressHeaderDescription__PR = "Your address as it appears on your Department of State Registration.";
190
192
  const registeredAddressTrustHeaderDescription = "The address registered to your trust";
191
193
  const operationalAddress = "Operational address";
192
194
  const provideRegistrationDetails = "Provide registration details";
@@ -302,7 +304,6 @@ const pciDssQuestionnaire = "PCI DSS questionnaire";
302
304
  const serviceAgreementSignedSuccessfully = "Service agreement signed successfully";
303
305
  const serviceAgreementSignFailed = "Service agreement signing failed";
304
306
  const failedToGetServiceAgreementStatus = "Failed to get the service agreement status";
305
- const failedToFetchAcceptedByName = "Failed to get the legal entity that accepted service agreement";
306
307
  const failedToGetServiceAgreement = "Failed to get the service agreement";
307
308
  const failedToGetServiceAgreementInSelectedLanguageFallbackToEn = "Failed to get the service agreement in the selected language. Falling back to English.";
308
309
  const 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/policies-and-disclaimer/privacy-policy) and I consent to my (personal) data being used for the purposes described therein.";
@@ -653,6 +654,7 @@ const soleProprietorshipDetails = "Sole proprietorship details";
653
654
  const selectAccountHolder = "Select account holder";
654
655
  const 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?";
655
656
  const whatBestDescribesYourBusinessSetup = "What best describes your business setup?";
657
+ const howWouldYouLikeToSetUpYourAccount = "How would you like to set up your account";
656
658
  const whichLegalArrangementDoesYourBusinessHave = "Which legal arrangement does your business have?";
657
659
  const sorryWeCantSetUpAnAccountForYou = "Sorry, we can’t set up an account for you";
658
660
  const changeYourBusinessSetup = "Change your business setup?";
@@ -798,11 +800,13 @@ const irsScheduleK1 = "IRS Schedule K-1 (Form 1065)";
798
800
  const certificateOfIncorporation = "Certificate of incorporation";
799
801
  const certificateOfFormation = "Certificate of formation";
800
802
  const secretaryOfStateFiling = "Secretary of State filing";
803
+ const secretaryOfStateFiling__PR = "Department of State filing";
801
804
  const partnerShipAgreement = "Partnership agreement";
802
805
  const charter = "Charter";
803
806
  const articlesOfIncorporation = "Articles of incorporation";
804
807
  const meetingRecords = "Board of directors' meeting records of decisions";
805
808
  const secretaryOfStateRegDoc = "Registration document from Secretary of State";
809
+ const secretaryOfStateRegDoc__PR = "Registration document from Department of State";
806
810
  const certificateOfIncumbency = "Certificate of incumbency";
807
811
  const documentIssuedWithinLastYear = "The document must be issued in the last 12 months. If it is older, make sure it contains a signature and a statement of affairs from the last 12 months.";
808
812
  const learnMore = "Learn more";
@@ -829,6 +833,10 @@ const addresses = "Addresses";
829
833
  const loading = "Loading";
830
834
  const businessIncorporationNumber = "Business incorporation number";
831
835
  const doNotHaveBusinessIncorporationNumber = "I do not have a Business incorporation number";
836
+ const retrieveMyInfoBusiness = "Retrieve Myinfo business";
837
+ const getYourBusinessVerifiedDetails = "Get your business's verified details instantly and skip uploading documents.";
838
+ const enterTheDetailsYourself = "Enter the details yourself";
839
+ const youAlsoHaveToUploadSomeSupportingDocuments = "You'll also have to upload some supporting documents.";
832
840
  const verificationMethod = "Verification method";
833
841
  const verifyViaMobileBankAppOrBankWebsite = "Verify the account via mobile bank app or bank website";
834
842
  const provideAccountDetailsAndUploadBankStatement = "Provide account details and upload a scan of a bank statement";
@@ -899,6 +907,7 @@ const legalCompanyName__helperText = "Enter the name exactly as it is on your co
899
907
  const legalCompanyName__helperText__AU = "Enter the name exactly as it is on your Australian Securities and Investment Commission's (ASIC).";
900
908
  const legalCompanyName__helperText__NL = "Enter the name exactly as it is on your Chamber of Commerce registration.";
901
909
  const legalCompanyName__helperText__US = "Enter the name exactly as it appears on your Secretary of State Registration.";
910
+ const legalCompanyName__helperText__PR = "Enter the name exactly as it appears on your Department of State Registration.";
902
911
  const legalCompanyName__helperText__SG = "Enter the name exactly as it is on your Accounting and Corporate Regulatory Authority (ACRA) BizFile.";
903
912
  const legalCompanyName__helperText__HK = "Enter the name exactly as it is on your Hong Kong Companies Registry's Certificate of Incorporation.";
904
913
  const taxInformationNumber = "Tax Identification Number";
@@ -1281,6 +1290,7 @@ const onboardingRedirectVerifiedDescriptionP1 = "Your details are verified.";
1281
1290
  const onboardingRedirectLinkError = "Onboarding link not available at the moment, please try again later.";
1282
1291
  const onboardingRedirectOpenError = "Pop-up blocker prevented redirecting, please allow pop-ups for this site.";
1283
1292
  const eg_ = "E.g. %{examples}";
1293
+ const failToLaunchSingpass = "failed to launch Singpass";
1284
1294
  const defaultTrans = {
1285
1295
  smartling,
1286
1296
  close,
@@ -1435,6 +1445,7 @@ const defaultTrans = {
1435
1445
  registeredAddressHeaderDescription,
1436
1446
  registeredAddressHeaderDescription__NL,
1437
1447
  registeredAddressHeaderDescription__US,
1448
+ registeredAddressHeaderDescription__PR,
1438
1449
  registeredAddressTrustHeaderDescription,
1439
1450
  operationalAddress,
1440
1451
  provideRegistrationDetails,
@@ -1550,7 +1561,6 @@ const defaultTrans = {
1550
1561
  serviceAgreementSignedSuccessfully,
1551
1562
  serviceAgreementSignFailed,
1552
1563
  failedToGetServiceAgreementStatus,
1553
- failedToFetchAcceptedByName,
1554
1564
  failedToGetServiceAgreement,
1555
1565
  failedToGetServiceAgreementInSelectedLanguageFallbackToEn,
1556
1566
  iHaveReadAndIAcceptTheseTerms,
@@ -1906,6 +1916,7 @@ const defaultTrans = {
1906
1916
  selectAccountHolder,
1907
1917
  nameOfBankAccountHolder,
1908
1918
  whatBestDescribesYourBusinessSetup,
1919
+ howWouldYouLikeToSetUpYourAccount,
1909
1920
  whichLegalArrangementDoesYourBusinessHave,
1910
1921
  sorryWeCantSetUpAnAccountForYou,
1911
1922
  changeYourBusinessSetup,
@@ -2053,11 +2064,13 @@ const defaultTrans = {
2053
2064
  certificateOfIncorporation,
2054
2065
  certificateOfFormation,
2055
2066
  secretaryOfStateFiling,
2067
+ secretaryOfStateFiling__PR,
2056
2068
  partnerShipAgreement,
2057
2069
  charter,
2058
2070
  articlesOfIncorporation,
2059
2071
  meetingRecords,
2060
2072
  secretaryOfStateRegDoc,
2073
+ secretaryOfStateRegDoc__PR,
2061
2074
  certificateOfIncumbency,
2062
2075
  documentIssuedWithinLastYear,
2063
2076
  learnMore,
@@ -2085,6 +2098,10 @@ const defaultTrans = {
2085
2098
  loading,
2086
2099
  businessIncorporationNumber,
2087
2100
  doNotHaveBusinessIncorporationNumber,
2101
+ retrieveMyInfoBusiness,
2102
+ getYourBusinessVerifiedDetails,
2103
+ enterTheDetailsYourself,
2104
+ youAlsoHaveToUploadSomeSupportingDocuments,
2088
2105
  verificationMethod,
2089
2106
  verifyViaMobileBankAppOrBankWebsite,
2090
2107
  provideAccountDetailsAndUploadBankStatement,
@@ -2155,6 +2172,7 @@ const defaultTrans = {
2155
2172
  legalCompanyName__helperText__AU,
2156
2173
  legalCompanyName__helperText__NL,
2157
2174
  legalCompanyName__helperText__US,
2175
+ legalCompanyName__helperText__PR,
2158
2176
  legalCompanyName__helperText__SG,
2159
2177
  legalCompanyName__helperText__HK,
2160
2178
  taxInformationNumber,
@@ -2536,7 +2554,8 @@ const defaultTrans = {
2536
2554
  onboardingRedirectVerifiedDescriptionP1,
2537
2555
  onboardingRedirectLinkError,
2538
2556
  onboardingRedirectOpenError,
2539
- eg_
2557
+ eg_,
2558
+ failToLaunchSingpass
2540
2559
  };
2541
2560
  const FALLBACK_LOCALE = "en-US";
2542
2561
  const defaultTranslation = Object.entries(defaultTrans).reduce((acc, [translationKey, translationValue]) => translationKey !== "smartling" ? {
@@ -2741,13 +2760,6 @@ function useToastContext() {
2741
2760
  }
2742
2761
  return context;
2743
2762
  }
2744
- const CoreContext = createContext(void 0);
2745
- const useCoreContext = () => {
2746
- const context = useContext(CoreContext);
2747
- if (!context)
2748
- throw Error("You need a <CoreProvider> to use core context");
2749
- return context;
2750
- };
2751
2763
  var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
2752
2764
  SettingNames2["AcceptedCountries"] = "acceptedCountries";
2753
2765
  SettingNames2["AllowBankAccountFormatSelection"] = "allowBankAccountFormatSelection";
@@ -6661,7 +6673,6 @@ const InputRadio = ({
6661
6673
  });
6662
6674
  function RadioGroup({
6663
6675
  items = [],
6664
- i18n,
6665
6676
  name,
6666
6677
  onChange = noop,
6667
6678
  value,
@@ -6670,6 +6681,9 @@ function RadioGroup({
6670
6681
  className,
6671
6682
  disabled = false
6672
6683
  }) {
6684
+ const {
6685
+ i18n
6686
+ } = useI18nContext();
6673
6687
  const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
6674
6688
  return jsx("div", {
6675
6689
  className: "adyen-kyc-radio-group",
@@ -6858,7 +6872,6 @@ function CompanyRegistrationNumberTypeSelector({
6858
6872
  name: "companyRegistrationNumberType",
6859
6873
  items: options,
6860
6874
  value: selected,
6861
- i18n,
6862
6875
  onChange: (e) => handleSelect(e.target.value)
6863
6876
  })
6864
6877
  });
@@ -7190,11 +7203,6 @@ const businessRegistrationNumberMasks = {
7190
7203
  nonProfit: {
7191
7204
  mask: makeMask(...numericInputs(6), ...numericInputs(1, true))
7192
7205
  }
7193
- },
7194
- [CountryCodes.UnitedStates]: {
7195
- default: {
7196
- mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
7197
- }
7198
7206
  }
7199
7207
  };
7200
7208
  const emailPattern = /^[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])?)*$/;
@@ -7327,9 +7335,6 @@ const businessRegistrationNumberPatterns = {
7327
7335
  [CountryCodes.Portugal]: {
7328
7336
  default: /^\d{9}$/
7329
7337
  },
7330
- [CountryCodes.PuertoRico]: {
7331
- default: /^\d{9}$/
7332
- },
7333
7338
  [CountryCodes.Romania]: {
7334
7339
  default: /^[A-Z]\d{2}\/\d{1,9}\/\d{4}$/
7335
7340
  },
@@ -7354,9 +7359,6 @@ const businessRegistrationNumberPatterns = {
7354
7359
  [CountryCodes.UnitedKingdom]: {
7355
7360
  default: /^[a-zA-Z0-9]{8}$/,
7356
7361
  nonProfit: /^\d{6,7}$/
7357
- },
7358
- [CountryCodes.UnitedStates]: {
7359
- default: /^\d{9}$/
7360
7362
  }
7361
7363
  };
7362
7364
  const CountryIdNumberPatterns = {
@@ -7374,6 +7376,7 @@ const CountryIdNumberPatterns = {
7374
7376
  },
7375
7377
  [CountryCodes.Sweden]: /^\d{10}$|^\d{12}$/,
7376
7378
  [CountryCodes.UnitedStates]: {
7379
+ // used by CountryCodes.PuertoRico
7377
7380
  ssn: /^\d{9}$/,
7378
7381
  ssnLastFour: /^\d{4}$/
7379
7382
  }
@@ -7941,16 +7944,7 @@ const defaultFieldConfig$8 = {
7941
7944
  }
7942
7945
  },
7943
7946
  [CountryCodes.PuertoRico]: {
7944
- label: "employerIdentificationNumber",
7945
- mask: businessRegistrationNumberMasks[CountryCodes.UnitedStates].default,
7946
- validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.UnitedStates].default),
7947
- guidanceText: {
7948
- key: "enterNDigitsForExample",
7949
- values: {
7950
- numDigits: "9",
7951
- example: "12-3456789"
7952
- }
7953
- }
7947
+ // should exactly match CountryCodes.UnitedStates
7954
7948
  },
7955
7949
  [CountryCodes.Romania]: {
7956
7950
  label: "numarOrdineRegistrulComertului",
@@ -8702,6 +8696,20 @@ const defaultFieldConfig$7 = {
8702
8696
  }
8703
8697
  }
8704
8698
  },
8699
+ [CountryCodes.PuertoRico]: {
8700
+ // should exactly match CountryCodes.UnitedStates
8701
+ label: "employerIdentificationNumber",
8702
+ validators: validatePatternOnBlur(/^\d{9}$/),
8703
+ mask: {
8704
+ mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
8705
+ },
8706
+ guidanceText: {
8707
+ key: "validationPleaseEnterAValidEINWithFormat",
8708
+ values: {
8709
+ format: "XX-XXXXXXX"
8710
+ }
8711
+ }
8712
+ },
8705
8713
  /**
8706
8714
  * NOT YET SUPPORTED
8707
8715
  * These are brought over from the old pattern files. We have no idea if they are accurate or not.
@@ -9413,7 +9421,6 @@ function TaxIdNumberTypeSelector({
9413
9421
  name: "taxIdNumberType",
9414
9422
  items: options,
9415
9423
  value: selected,
9416
- i18n,
9417
9424
  onChange: (e) => handleSelect(e.target.value)
9418
9425
  })
9419
9426
  });
@@ -10326,7 +10333,21 @@ const countryConfig$3 = {
10326
10333
  label: "vatAbsenceReason"
10327
10334
  }
10328
10335
  },
10329
- [CountryCodes.PuertoRico]: {},
10336
+ [CountryCodes.PuertoRico]: {
10337
+ // exactly matches CountryCodes.UnitedStates, except `stateOrProvince`
10338
+ country: {
10339
+ label: "companyCountry"
10340
+ },
10341
+ legalCompanyName: {
10342
+ helperText: "legalCompanyName__helperText__US"
10343
+ },
10344
+ tradingName: {
10345
+ label: "doingBusinessAs"
10346
+ },
10347
+ exemptedFromTax: {
10348
+ label: "doNotHaveEIN"
10349
+ }
10350
+ },
10330
10351
  [CountryCodes.Romania]: {},
10331
10352
  [CountryCodes.Slovakia]: {},
10332
10353
  [CountryCodes.Slovenia]: {},
@@ -10582,6 +10603,13 @@ const EntityTypeSelectionRadioCardBody = ({
10582
10603
  })]
10583
10604
  });
10584
10605
  };
10606
+ const CoreContext = createContext(void 0);
10607
+ const useCoreContext = () => {
10608
+ const context = useContext(CoreContext);
10609
+ if (!context)
10610
+ throw Error("You need a <CoreProvider> to use core context");
10611
+ return context;
10612
+ };
10585
10613
  var TrustMemberTypes = /* @__PURE__ */ ((TrustMemberTypes2) => {
10586
10614
  TrustMemberTypes2["DEFINED_BENEFICIARY"] = "definedBeneficiary";
10587
10615
  TrustMemberTypes2["UNDEFINED_BENEFICIARY"] = "undefinedBeneficiary";
@@ -10716,6 +10744,7 @@ var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
10716
10744
  TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
10717
10745
  TaskTypes2["LEGAL_ENTITY_TYPE_SWITCHER"] = "LEGAL_ENTITY_TYPE_SWITCHER";
10718
10746
  TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
10747
+ TaskTypes2["SINGPASS_SELECTION"] = "SINGPASS_SELECTION";
10719
10748
  return TaskTypes2;
10720
10749
  })(TaskTypes || {});
10721
10750
  var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
@@ -10865,8 +10894,8 @@ var DecisionMakerType = /* @__PURE__ */ ((DecisionMakerType2) => {
10865
10894
  })(DecisionMakerType || {});
10866
10895
  const REQUIRED = "REQUIRED";
10867
10896
  const SOLE_PROP_COUNTRIES = [CountryCodes.Austria, CountryCodes.Australia, CountryCodes.Belgium, CountryCodes.Bulgaria, CountryCodes.Canada, CountryCodes.Croatia, CountryCodes.Cyprus, CountryCodes.CzechRepublic, CountryCodes.Denmark, CountryCodes.Estonia, CountryCodes.Finland, CountryCodes.France, CountryCodes.Germany, CountryCodes.Gibraltar, CountryCodes.Greece, CountryCodes.Guernsey, CountryCodes.HongKong, CountryCodes.Hungary, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Italy, CountryCodes.Jersey, CountryCodes.Latvia, CountryCodes.Liechtenstein, CountryCodes.Lithuania, CountryCodes.Luxembourg, CountryCodes.Malta, CountryCodes.Monaco, CountryCodes.Netherlands, CountryCodes.NewZealand, CountryCodes.Norway, CountryCodes.Poland, CountryCodes.Portugal, CountryCodes.PuertoRico, CountryCodes.Romania, CountryCodes.Singapore, CountryCodes.Slovakia, CountryCodes.Slovenia, CountryCodes.Spain, CountryCodes.Sweden, CountryCodes.Switzerland, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
10868
- const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.UnitedStates];
10869
- const ID_NUMBER_VERIFICATION_COUNTRIES = [CountryCodes.UnitedStates];
10897
+ const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.PuertoRico, CountryCodes.UnitedStates];
10898
+ const ID_NUMBER_VERIFICATION_COUNTRIES = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
10870
10899
  const COUNTRIES_WHICH_USE_MULTIPLE_IDENTITY_TYPES = [CountryCodes.HongKong, CountryCodes.Australia, CountryCodes.NewZealand];
10871
10900
  const ID_NUMBER_REQUIRED_FOR_DIRECTOR_COUNTRIES = [CountryCodes.Singapore];
10872
10901
  const NATIONALITY_REQUIRED_FOR_COUNTRIES = [CountryCodes.Singapore];
@@ -11821,12 +11850,20 @@ function ListItem({
11821
11850
  const ADDRESS_SCHEMA = ["address", "otherAddressInformation", "postalCode", "city", "stateOrProvince", "country"];
11822
11851
  const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY] = ADDRESS_SCHEMA;
11823
11852
  const COUNTRIES_WITH_STATES_DATASET = [CountryCodes.Australia, CountryCodes.Brazil, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates];
11824
- const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
11853
+ const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
11825
11854
  const ADDRESS_SCHEMAS = {
11826
11855
  [CountryCodes.Australia]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
11827
11856
  [CountryCodes.Canada]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
11828
11857
  [CountryCodes.UnitedKingdom]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
11829
11858
  [CountryCodes.UnitedStates]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
11859
+ [CountryCodes.PuertoRico]: [
11860
+ // should exactly match CountryCodes.UnitedStates
11861
+ COUNTRY,
11862
+ ADDRESS,
11863
+ OTHER_ADDRESS_INFORMATION,
11864
+ CITY,
11865
+ POSTAL_CODE
11866
+ ],
11830
11867
  [CountryCodes.HongKong]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE],
11831
11868
  [CountryCodes.NewZealand]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE],
11832
11869
  default: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE]
@@ -11842,10 +11879,14 @@ const LABELS = {
11842
11879
  otherAddressInformation: {
11843
11880
  default: OTHER_ADDRESS_INFORMATION,
11844
11881
  [CountryCodes.Canada]: "apartmentSuiteOptional",
11882
+ [CountryCodes.PuertoRico]: "apartmentSuiteOptional",
11883
+ // should exactly match CountryCodes.UnitedStates
11845
11884
  [CountryCodes.UnitedStates]: "apartmentSuiteOptional"
11846
11885
  },
11847
11886
  postalCode: {
11848
11887
  default: POSTAL_CODE,
11888
+ [CountryCodes.PuertoRico]: "zipCode",
11889
+ // should exactly match CountryCodes.UnitedStates
11849
11890
  [CountryCodes.UnitedStates]: "zipCode"
11850
11891
  },
11851
11892
  stateOrProvince: {
@@ -12271,7 +12312,8 @@ const postalCodePatterns = {
12271
12312
  [CountryCodes.Norway]: createRegExpByDigits(4),
12272
12313
  [CountryCodes.Poland]: /^\d{2}-\d{3}$/,
12273
12314
  [CountryCodes.Portugal]: /^[1-9]\d{3}([- ]?\d{3})?$/,
12274
- [CountryCodes.PuertoRico]: createRegExpByDigits(5),
12315
+ [CountryCodes.PuertoRico]: /^\d{5}(?:[ -]?\d{4})?$/,
12316
+ // should exactly match CountryCodes.UnitedStates
12275
12317
  [CountryCodes.Romania]: createRegExpByDigits(6),
12276
12318
  [CountryCodes.Slovakia]: /^(SK-)?\d{5}$/,
12277
12319
  [CountryCodes.Slovenia]: /^(SI-)?\d{4}$/,
@@ -12915,7 +12957,6 @@ function RegistrationAddressComponent(props) {
12915
12957
  name: "operationalAddressIsSame",
12916
12958
  items: operationalAddressIsSameItems,
12917
12959
  value: formData.operationalAddressIsSame,
12918
- i18n,
12919
12960
  disabled: formUtils.isReadOnly("operationalAddressIsSame"),
12920
12961
  onChange: handleChangeFor("operationalAddressIsSame"),
12921
12962
  "aria-required": true,
@@ -12938,6 +12979,33 @@ function RegistrationAddressComponent(props) {
12938
12979
  });
12939
12980
  }
12940
12981
  const ACCEPTED_DOCUMENTS_MAP$1 = {
12982
+ [CountryCodes.PuertoRico]: {
12983
+ // should exactly match CountryCodes.UnitedStates
12984
+ [CompanyTypesValue.PRIVATE_COMPANY]: {
12985
+ header: "acceptedDocumentsForPrivateCompanies",
12986
+ documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling__PR"]
12987
+ },
12988
+ [CompanyTypesValue.PUBLIC_COMPANY]: {
12989
+ header: "acceptedDocumentsForPublicCompanies",
12990
+ documents: ["certificateOfIncorporation", "certificateOfFormation"]
12991
+ },
12992
+ [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
12993
+ header: "acceptedDocumentsForPublicCompanies",
12994
+ documents: ["certificateOfIncorporation", "certificateOfFormation"]
12995
+ },
12996
+ [CompanyTypesValue.GOVERNMENTAL_ORGANIZATION]: {
12997
+ header: "acceptedDocumentsForGovernment",
12998
+ documents: ["charter"]
12999
+ },
13000
+ [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
13001
+ header: "acceptedDocumentsForNonProfit",
13002
+ documents: ["articlesOfIncorporation", "meetingRecords", "secretaryOfStateRegDoc__PR", "certificateOfIncumbency"]
13003
+ },
13004
+ [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
13005
+ header: "acceptedDocumentsForPartnerships",
13006
+ documents: ["partnerShipAgreement", "secretaryOfStateFiling__PR"]
13007
+ }
13008
+ },
12941
13009
  [CountryCodes.UnitedStates]: {
12942
13010
  [CompanyTypesValue.PRIVATE_COMPANY]: {
12943
13011
  header: "acceptedDocumentsForPrivateCompanies",
@@ -12966,11 +13034,13 @@ const ACCEPTED_DOCUMENTS_MAP$1 = {
12966
13034
  }
12967
13035
  };
12968
13036
  const GuidanceContent$1 = ({
12969
- i18n,
12970
13037
  country: country2,
12971
13038
  companyType: companyType2
12972
13039
  }) => {
12973
13040
  var _a;
13041
+ const {
13042
+ i18n
13043
+ } = useI18nContext();
12974
13044
  const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP$1[country2]) == null ? void 0 : _a[companyType2];
12975
13045
  return jsx("div", {
12976
13046
  className: "adyen-kyc-upload-field__guidance",
@@ -13041,8 +13111,7 @@ function RegistrationDocumentComponent({
13041
13111
  description: i18n.get(description2),
13042
13112
  documentField: "registrationDocument",
13043
13113
  documentType: DocumentType.REGISTRATION_DOCUMENT,
13044
- guidanceContent: GuidanceContent$1({
13045
- i18n,
13114
+ guidanceContent: jsx(GuidanceContent$1, {
13046
13115
  country: country2,
13047
13116
  companyType: companyType2
13048
13117
  }),
@@ -13051,6 +13120,29 @@ function RegistrationDocumentComponent({
13051
13120
  });
13052
13121
  }
13053
13122
  const ACCEPTED_DOCUMENTS_MAP = {
13123
+ [CountryCodes.PuertoRico]: {
13124
+ // should exactly match CountryCodes.UnitedStates
13125
+ [CompanyTypesValue.PRIVATE_COMPANY]: {
13126
+ header: "acceptedDocumentsForPrivateCompanies",
13127
+ documents: ["irsCP575"]
13128
+ },
13129
+ [CompanyTypesValue.PUBLIC_COMPANY]: {
13130
+ header: "acceptedDocumentsForPublicCompanies",
13131
+ documents: ["annualReport", "secForm10k"]
13132
+ },
13133
+ [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
13134
+ header: "acceptedDocumentsForPublicCompanies",
13135
+ documents: ["annualReport", "secForm10k"]
13136
+ },
13137
+ [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
13138
+ header: "acceptedDocumentsForNonProfit",
13139
+ documents: ["annualReport"]
13140
+ },
13141
+ [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
13142
+ header: "acceptedDocumentsForPartnerships",
13143
+ documents: ["irsScheduleK1"]
13144
+ }
13145
+ },
13054
13146
  [CountryCodes.UnitedStates]: {
13055
13147
  [CompanyTypesValue.PRIVATE_COMPANY]: {
13056
13148
  header: "acceptedDocumentsForPrivateCompanies",
@@ -13075,11 +13167,13 @@ const ACCEPTED_DOCUMENTS_MAP = {
13075
13167
  }
13076
13168
  };
13077
13169
  const GuidanceContent = ({
13078
- i18n,
13079
13170
  country: country2,
13080
13171
  companyType: companyType2
13081
13172
  }) => {
13082
13173
  var _a;
13174
+ const {
13175
+ i18n
13176
+ } = useI18nContext();
13083
13177
  const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP[country2]) == null ? void 0 : _a[companyType2];
13084
13178
  return jsx("div", {
13085
13179
  className: "adyen-kyc-upload-field__guidance",
@@ -13143,8 +13237,7 @@ function TaxDocumentComponent({
13143
13237
  description: i18n.get(description2),
13144
13238
  documentField: "taxDocument",
13145
13239
  documentType: DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO,
13146
- guidanceContent: GuidanceContent({
13147
- i18n,
13240
+ guidanceContent: jsx(GuidanceContent, {
13148
13241
  country: country2,
13149
13242
  companyType: companyType2
13150
13243
  }),
@@ -13480,7 +13573,7 @@ const fileToBase64 = (file) => new Promise((resolve, reject) => {
13480
13573
  });
13481
13574
  const getFileExtention = (fileName2) => fileName2.split(".").pop();
13482
13575
  const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [CountryCodes.Australia, CountryCodes.Gibraltar, CountryCodes.Guernsey, CountryCodes.HongKong, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Jersey, CountryCodes.Malta, CountryCodes.PuertoRico, CountryCodes.Spain, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
13483
- const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.UnitedStates];
13576
+ const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
13484
13577
  const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [CountryCodes.Austria, CountryCodes.Canada, CountryCodes.Finland, CountryCodes.Germany, CountryCodes.Lithuania, CountryCodes.Luxembourg, CountryCodes.Poland, CountryCodes.Sweden, CountryCodes.Switzerland];
13485
13578
  const COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.Gibraltar, CountryCodes.HongKong, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.Singapore, CountryCodes.UnitedStates];
13486
13579
  const COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [CountryCodes.NewZealand, CountryCodes.Singapore];
@@ -13491,6 +13584,7 @@ const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [
13491
13584
  const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
13492
13585
  // strictly a subset of countries which use tax ID
13493
13586
  CountryCodes.Canada,
13587
+ CountryCodes.PuertoRico,
13494
13588
  CountryCodes.UnitedStates
13495
13589
  ];
13496
13590
  const COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [CountryCodes.HongKong, CountryCodes.Singapore];
@@ -13539,10 +13633,10 @@ const rules$2 = ({
13539
13633
  companyRegistrationNumberExemptionAllowed: () => {
13540
13634
  var _a, _b;
13541
13635
  const companyType2 = ("companyType" in data || "companyStructure" in data) && (((_a = data.companyType) == null ? void 0 : _a.entityType) || ((_b = data.companyStructure) == null ? void 0 : _b.entityType));
13542
- if (country2 === "DE" && (companyType2 === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
13636
+ if (country2 === CountryCodes.Germany && (companyType2 === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
13543
13637
  return "REQUIRED";
13544
13638
  }
13545
- if (country2 === "DK" && companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
13639
+ if (country2 === CountryCodes.Denmark && companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
13546
13640
  return "REQUIRED";
13547
13641
  }
13548
13642
  },
@@ -15475,13 +15569,22 @@ const IdVerificationMethodOptionFooter = ({
15475
15569
  };
15476
15570
  const idVerificationMethodFields = ["idVerificationMethod"];
15477
15571
  function IdVerificationMethodComponent(props) {
15572
+ const {
15573
+ id: id2,
15574
+ data: propsData,
15575
+ fieldValidationErrors,
15576
+ validators,
15577
+ formVerificationErrors,
15578
+ name,
15579
+ countryOfResidence
15580
+ } = props;
15478
15581
  const {
15479
15582
  i18n
15480
15583
  } = useI18nContext();
15481
15584
  const {
15482
15585
  getImageUrl
15483
15586
  } = useConfigurationApi();
15484
- const verificationMethodFormId = props.id;
15587
+ const verificationMethodFormId = id2;
15485
15588
  const schema = idVerificationMethodFields;
15486
15589
  const stateRef = useRef({
15487
15590
  setState: null
@@ -15499,11 +15602,11 @@ function IdVerificationMethodComponent(props) {
15499
15602
  ...props,
15500
15603
  schema,
15501
15604
  defaultData: {
15502
- ...props.data,
15605
+ ...propsData,
15503
15606
  idVerificationMethod: "instantVerification"
15504
15607
  },
15505
- rules: props.validators,
15506
- fieldProblems: props == null ? void 0 : props.fieldValidationErrors
15608
+ rules: validators,
15609
+ fieldProblems: fieldValidationErrors
15507
15610
  });
15508
15611
  const formUtils = formUtilities(props, i18n);
15509
15612
  useEffect(() => {
@@ -15530,15 +15633,15 @@ function IdVerificationMethodComponent(props) {
15530
15633
  children: [jsx(FormHeader, {
15531
15634
  heading: i18n.get("verificationMethod")
15532
15635
  }), jsx(ErrorPanel, {
15533
- verificationErrors: props == null ? void 0 : props.formVerificationErrors,
15534
- validationErrors: props == null ? void 0 : props.fieldValidationErrors,
15636
+ verificationErrors: formVerificationErrors,
15637
+ validationErrors: fieldValidationErrors,
15535
15638
  formUtils,
15536
15639
  id: "ariaErrorField"
15537
15640
  }), jsx("div", {
15538
15641
  dangerouslySetInnerHTML: {
15539
15642
  __html: i18n.get("idUploadDocumentSubtitle", {
15540
15643
  values: {
15541
- name: props.name
15644
+ name
15542
15645
  }
15543
15646
  })
15544
15647
  }
@@ -15605,7 +15708,7 @@ function IdVerificationMethodComponent(props) {
15605
15708
  }),
15606
15709
  titleId: "howVerificationWithOnfidoWork",
15607
15710
  contentId: "howVerificationWithOnfidoWorkContent"
15608
- }), props.countryOfResidence === CountryCodes.UnitedStates && data.idVerificationMethod === "instantVerification" && jsx("div", {
15711
+ }), (countryOfResidence === CountryCodes.PuertoRico || countryOfResidence === CountryCodes.UnitedStates) && data.idVerificationMethod === "instantVerification" && jsx("div", {
15609
15712
  dangerouslySetInnerHTML: {
15610
15713
  __html: i18n.get("byProceedingToTheNextStepYouConfirmThatYouHaveReadUnderstandAndAcceptTheTerms")
15611
15714
  }
@@ -16716,7 +16819,6 @@ function IndividualIdNumberTypeSelector({
16716
16819
  name: "individualIdNumberType",
16717
16820
  items: options,
16718
16821
  value: selected,
16719
- i18n,
16720
16822
  onChange: (e) => {
16721
16823
  var _a;
16722
16824
  return setSelected == null ? void 0 : setSelected((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.value);
@@ -18718,6 +18820,7 @@ const currencyByCountry = {
18718
18820
  [CountryCodes.Poland]: [Currencies.PLN, Currencies.EUR],
18719
18821
  [CountryCodes.Portugal]: [Currencies.EUR],
18720
18822
  [CountryCodes.PuertoRico]: [Currencies.USD],
18823
+ // should exactly match CountryCodes.UnitedStates
18721
18824
  [CountryCodes.Romania]: [Currencies.RON, Currencies.EUR],
18722
18825
  [CountryCodes.Singapore]: [Currencies.SGD],
18723
18826
  [CountryCodes.Slovakia]: [Currencies.EUR],
@@ -24045,7 +24148,6 @@ function CompanyDropinComponent({
24045
24148
  const {
24046
24149
  isExperimentEnabled
24047
24150
  } = useExperimentsContext();
24048
- useCoreContext();
24049
24151
  const {
24050
24152
  i18n,
24051
24153
  setLocale
@@ -24596,13 +24698,15 @@ const mapCompanyDataResponseToFormSchema = (company2) => ({
24596
24698
  const CompanyLookupResultsHeader = ({
24597
24699
  results,
24598
24700
  status,
24599
- i18n,
24600
24701
  hasInternalError,
24601
24702
  selectedCompanyId,
24602
24703
  verifiedCompany,
24603
24704
  retrySearch,
24604
24705
  reset
24605
24706
  }) => {
24707
+ const {
24708
+ i18n
24709
+ } = useI18nContext();
24606
24710
  const numberOfResults = results == null ? void 0 : results.length;
24607
24711
  const headerText = useMemo(() => {
24608
24712
  if (hasInternalError && !selectedCompanyId) {
@@ -24637,7 +24741,7 @@ const CompanyLookupResultsHeader = ({
24637
24741
  onClick: reset,
24638
24742
  children: "Reset selection"
24639
24743
  })]
24640
- }), descriptionText && jsxs("div", {
24744
+ }), descriptionText && status !== "loading" && jsxs("div", {
24641
24745
  className: "adyen-company-lookup-results-header__description",
24642
24746
  children: [hasInternalError && !selectedCompanyId && jsx("button", {
24643
24747
  type: "button",
@@ -24661,9 +24765,11 @@ const LookupResultBody = ({
24661
24765
  })]
24662
24766
  });
24663
24767
  const LookupResultAlert = ({
24664
- i18n,
24665
24768
  type
24666
24769
  }) => {
24770
+ const {
24771
+ i18n
24772
+ } = useI18nContext();
24667
24773
  const iconType = {
24668
24774
  verified: AlertTypes.SUCCESS,
24669
24775
  warning: AlertTypes.WARNING,
@@ -24689,7 +24795,6 @@ const LookupResultAlert = ({
24689
24795
  };
24690
24796
  const LookupResult = ({
24691
24797
  classes,
24692
- i18n,
24693
24798
  option,
24694
24799
  status,
24695
24800
  isSelected,
@@ -24743,7 +24848,6 @@ const LookupResult = ({
24743
24848
  label: classes
24744
24849
  }
24745
24850
  }), showAlert && jsx(LookupResultAlert, {
24746
- i18n,
24747
24851
  type: alertType
24748
24852
  })]
24749
24853
  });
@@ -24769,7 +24873,6 @@ const LookupResult = ({
24769
24873
  label: classes
24770
24874
  }
24771
24875
  }), showAlert && jsx(LookupResultAlert, {
24772
- i18n,
24773
24876
  type: alertType
24774
24877
  })]
24775
24878
  })
@@ -24779,7 +24882,6 @@ const CompanyLookupResultsList = ({
24779
24882
  results,
24780
24883
  selectedCompanyId,
24781
24884
  status,
24782
- i18n,
24783
24885
  hasInternalError,
24784
24886
  tin = "",
24785
24887
  verifiedCompany,
@@ -24810,7 +24912,6 @@ const CompanyLookupResultsList = ({
24810
24912
  classes: optionClasses(option),
24811
24913
  option,
24812
24914
  status,
24813
- i18n,
24814
24915
  tin,
24815
24916
  isSelected: isOptionSelected(option),
24816
24917
  isInvalid: isOptionInvalid(option),
@@ -24857,9 +24958,7 @@ function CompanyLookup({
24857
24958
  handleVerifyTin
24858
24959
  }) {
24859
24960
  var _a;
24860
- const {
24861
- i18n
24862
- } = useI18nContext();
24961
+ useI18nContext();
24863
24962
  const {
24864
24963
  status,
24865
24964
  results,
@@ -24944,7 +25043,6 @@ function CompanyLookup({
24944
25043
  children: [jsx(CompanyLookupResultsHeader, {
24945
25044
  results,
24946
25045
  status,
24947
- i18n,
24948
25046
  hasInternalError,
24949
25047
  selectedCompanyId,
24950
25048
  verifiedCompany,
@@ -24956,7 +25054,6 @@ function CompanyLookup({
24956
25054
  results,
24957
25055
  selectedCompanyId,
24958
25056
  status,
24959
- i18n,
24960
25057
  hasInternalError,
24961
25058
  tin: taxInformationNumber2,
24962
25059
  verifiedCompany,
@@ -26346,9 +26443,6 @@ function useCompanySearchTaskSubmit({
26346
26443
  onExternalSubmit,
26347
26444
  handleUpdateLegalEntity
26348
26445
  }) {
26349
- const {
26350
- setAccountHolder
26351
- } = useCoreContext();
26352
26446
  const {
26353
26447
  showToast,
26354
26448
  clearToasts
@@ -26432,7 +26526,6 @@ function useCompanySearchTaskSubmit({
26432
26526
  }
26433
26527
  });
26434
26528
  logger$c.log(submittedLegalEntity);
26435
- setAccountHolder(entityTypeToCorrespondingAccountHolderOption[legalEntityResponse.type]);
26436
26529
  clearToasts();
26437
26530
  onExternalSubmit == null ? void 0 : onExternalSubmit(data);
26438
26531
  } catch (e) {
@@ -26468,7 +26561,7 @@ function useCompanySearchTaskSubmit({
26468
26561
  } finally {
26469
26562
  setLoadingStatus("success");
26470
26563
  }
26471
- }, [baseTrackingPayload, clearToasts, forms2, i18n, legalEntityResponse, onExternalSubmit, problems, setAccountHolder, setLoadingStatus, setProblems, showToast, submitDocuments, task]);
26564
+ }, [baseTrackingPayload, clearToasts, forms2, i18n, legalEntityResponse, onExternalSubmit, problems, setLoadingStatus, setProblems, showToast, submitDocuments, task]);
26472
26565
  return {
26473
26566
  submit: submit2
26474
26567
  };
@@ -26876,6 +26969,16 @@ const useShouldShowIntroduction = ({
26876
26969
  });
26877
26970
  return canSeeIntroduction && !hasSeenIntroduction;
26878
26971
  };
26972
+ const getHasSeenSingpassSelectionStorageKey = (legalEntityId) => `COMPLETED_SINGPASS_SELECTION-${legalEntityId}`;
26973
+ const useHasSeenSingpassSelection = ({
26974
+ legalEntityId
26975
+ }) => {
26976
+ const [hasSeenSingpassSelection, setHasSeenSingpassSelection] = useLocalStorage(getHasSeenSingpassSelectionStorageKey(legalEntityId), false);
26977
+ return {
26978
+ hasSeenSingpassSelection,
26979
+ setHasSeenSingpassSelection
26980
+ };
26981
+ };
26879
26982
  const logger$b = createLogger("useAssociatedLegalArrangement");
26880
26983
  function useAssociatedLegalArrangement({
26881
26984
  rootLegalEntity,
@@ -28812,6 +28915,152 @@ function ReviewComponent({
28812
28915
  footer
28813
28916
  });
28814
28917
  }
28918
+ const SvgSetupManual = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 102 100", ...props, children: [
28919
+ /* @__PURE__ */ jsx$1("path", { fill: "#EEF0F3", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M66.82 10.09H2.9c-1.19 0-2.15.96-2.15 2.15v84.05c0 1.19.96 2.15 2.15 2.15h63.9c1.2 0 2.15-.96 2.15-2.15V12.24c0-1.19-.96-2.15-2.14-2.15" }),
28920
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 35.7H9.02v3.94h16.42z" }),
28921
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 55.91H9.02v1.97h15.42z" }),
28922
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M55.77 35.7H29.16v3.94h26.61z" }),
28923
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 29.58H20.4m-11.38-3.4h20.14" }),
28924
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 51.75h18.9" }),
28925
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 69.35H9.02v1.97h15.42z" }),
28926
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 65.19h18.9" }),
28927
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 55.91H32.57v1.97h15.41z" }),
28928
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 51.75h18.9" }),
28929
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 69.35H32.57v1.97h15.41z" }),
28930
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 65.19h18.9" }),
28931
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 82.5h9.46M9.02 86h25.8" }),
28932
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M83.1.79H19.17c-1.18 0-2.14.96-2.14 2.15v84.05c0 1.19.96 2.15 2.14 2.15H83.1c1.19 0 2.15-.96 2.15-2.15V2.94c0-1.19-.96-2.15-2.15-2.15" }),
28933
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M64.64 16.78h-39.1v6.01h39.1zm0 11.71h-39.1v6.01h39.1zm0 11.71h-39.1v6.01h39.1z" }),
28934
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 10.14h22.54" }),
28935
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 51.9h22.54m-22.54 5.7h32.82M25.44 68.99h26.54m-26.54 5.69H37.4" }),
28936
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M54.4 10.14h17.28M27.93 41.7v2.84m-.4-2.94h.8m-.8 3.2h.8m-.8-25.02h7.83m3.49 0h9.75M27.7 31.5h14.32m9.96-11.72h2.85" }),
28937
+ /* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "m79.81 76.03 1.96 21.5a1.12 1.12 0 0 0 1.93.68l6.59-6.82q.2-.2.46-.28l9.01-2.96c.9-.3 1.05-1.52.23-2.02L81.51 74.96a1.12 1.12 0 0 0-1.69 1.06z" })
28938
+ ] });
28939
+ const SvgSetupSingpass = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 146 95", ...props, children: [
28940
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M55.82 76.52a6.1 6.1 0 0 0 6.11 6.11h76.67a6.1 6.1 0 0 0 6.11-6.11V21.46H55.83z" }),
28941
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M138.6 13.88H61.93a6.1 6.1 0 0 0-6.11 6.11v1.47h88.88V20a6.1 6.1 0 0 0-6.11-6.11z" }),
28942
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", d: "m30.16 94.33 3.47-2.6a41 41 0 0 0 8.1-8.1l2.6-3.48 6.07-2.02 13.53-1.69a3.04 3.04 0 0 0-.71-6.03l-8.6.96.7-3.47 12.66-1.58a3.04 3.04 0 0 0-.71-6.03L56.6 61.48l.8-3.96 10.58-1.32a3.04 3.04 0 0 0-.71-6.03l-8.6.95.8-3.98 8.5-1.06a3.04 3.04 0 0 0-.7-6.03L52.42 41.7l-22.26 2.47V41a4.86 4.86 0 0 0-4.86-4.86c-.68 0-1.22.55-1.22 1.22v2.7c0 1.42-.36 2.8-1.07 4.02L17.2 54.25c-.8 1.4-1.4 2.93-1.75 4.51L11.93 74.6" }),
28943
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "m30.16 94.33 3.47-2.6a41 41 0 0 0 8.1-8.1l2.6-3.48 6.07-2.02 13.53-1.69a3.04 3.04 0 0 0-.71-6.03l-8.6.96.7-3.47 12.66-1.58a3.04 3.04 0 0 0-.71-6.03L56.6 61.48l.8-3.96 10.58-1.32a3.04 3.04 0 0 0-.71-6.03l-8.6.95.8-3.98 8.5-1.06a3.04 3.04 0 0 0-.7-6.03L52.42 41.7l-22.26 2.47V41a4.86 4.86 0 0 0-4.86-4.86c-.68 0-1.22.55-1.22 1.22v2.7c0 1.42-.36 2.8-1.07 4.02L17.2 54.25c-.8 1.4-1.4 2.93-1.75 4.51L11.93 74.6" }),
28944
+ /* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M30.15 44.19h-6.07V62.4h6.07z" }),
28945
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M42.8 76.1a11 11 0 0 0 1.4 3.63l.14.24" }),
28946
+ /* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.16 1.11H33.74a6.1 6.1 0 0 0-6.1 6.11v61.05a6.1 6.1 0 0 0 6.1 6.1h24.42a6.1 6.1 0 0 0 6.1-6.1V7.22a6.1 6.1 0 0 0-6.1-6.1" }),
28947
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M62.74 7.22a4.6 4.6 0 0 0-4.58-4.58H33.74a4.6 4.6 0 0 0-4.58 4.58v53.42h33.58z" }),
28948
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M45.94 69.8a3.05 3.05 0 1 0 0-6.1 3.05 3.05 0 0 0 0 6.1" }),
28949
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M29.16 60.64v7.63a4.6 4.6 0 0 0 4.58 4.58h24.42a4.6 4.6 0 0 0 4.58-4.58v-7.63" }),
28950
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", d: "M30.16 76.63v-7.24c0-3.2-.95-6.32-2.72-8.98a5 5 0 0 1-.58-4.26l2.67-8q.62-1.87.62-3.84v-3.3a4.86 4.86 0 0 0-4.86-4.85c-.67 0-1.22.54-1.22 1.21v2.71c0 1.41-.36 2.79-1.07 4.01l-5.8 10.18q-1.22 2.13-1.76 4.52L11.92 74.6 1.32 85.33" }),
28951
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M30.16 76.63v-7.24c0-3.2-.95-6.32-2.72-8.98a5 5 0 0 1-.58-4.26l2.67-8q.62-1.87.62-3.84v-3.3a4.86 4.86 0 0 0-4.86-4.85c-.67 0-1.22.54-1.22 1.21v2.71c0 1.41-.36 2.79-1.07 4.01l-5.8 10.18q-1.22 2.13-1.76 4.52L11.92 74.6 1.32 85.33" }),
28952
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.16 2.64H33.74a4.6 4.6 0 0 0-4.56 4.16h33.54a4.6 4.6 0 0 0-4.56-4.16" }),
28953
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.3 28.37H33.95v3.74H58.3z" }),
28954
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M46.12 42.77H33.95v3.74h12.17z" }),
28955
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M36.72 30.24h18.8" }),
28956
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.3 35.46H33.95v3.74H58.3z" }),
28957
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M37.86 36.19v2.3m.82-1.96-1.62 1.61m1.62 0-1.62-1.61m1.94.81h-2.28m12.15-1.15v2.3m.82-1.96-1.62 1.61m1.62 0-1.62-1.61m1.95.81h-2.29m6.65-1.15v2.3m.82-1.96-1.63 1.61m1.63 0-1.63-1.61m1.95.81h-2.28m-9.87-1.15v2.3m.81-1.96-1.62 1.61m1.62 0-1.62-1.61m1.96.81h-2.3" }),
28958
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M33.9 21.3h18.82M33.9 24.97h8.4" }),
28959
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M119.82 43.55h-39.1v6.02h39.1z" }),
28960
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M100.27 61.31H80.7v6.02h19.56z" }),
28961
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M85.17 46.56h30.2" }),
28962
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M119.82 52.25h-39.1v6.02h39.1z" }),
28963
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M86.73 53.7v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.67 1.1h-3.13m19.61-1.56v3.13m1.1-2.68-2.21 2.21m2.21 0-2.21-2.2m2.67 1.1h-3.13m10.59-1.56v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.66 1.1h-3.12M95.75 53.7v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.66 1.1H94.2" }),
28964
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M80.65 34.88h30.2m-30.2 3.21h13.47" })
28965
+ ] });
28966
+ const SvgSingpassLogo = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 93 16", ...props, children: [
28967
+ /* @__PURE__ */ jsx$1("path", { fill: "#F4333D", d: "M5.88 11.8c-2.54 0-4.34-.85-5.13-1.57l1.69-2.48a5.5 5.5 0 0 0 3.44 1.36c.92 0 1.33-.27 1.33-.77 0-.38-.32-.68-1.3-.9l-2-.47c-1.96-.46-2.89-1.65-2.89-3.3C1.02 1.42 2.82.1 5.5.1c2.07 0 3.73.63 4.54 1.35L8.35 3.92A4.5 4.5 0 0 0 5.5 2.75c-.86 0-1.24.3-1.24.74 0 .45.4.7 1.17.88l2 .45c2.05.45 3.04 1.56 3.04 3.18 0 2.32-1.73 3.81-4.59 3.81m12-.22h3.38V5.52c0-1.48.72-2.4 2.12-2.4 1.32 0 2.02.76 2.02 2.4v6.06h3.37V4.67c0-3.02-1.5-4.58-4.09-4.58q-2.2 0-3.42 1.74V1.1c0-.5-.29-.8-.78-.8h-2.59v11.27M42.46.32v9.75c0 4.24-2.75 5.93-6.12 5.93-2.25 0-4.12-.59-5.24-1.6l1.75-2.61a5 5 0 0 0 3.49 1.37c1.73 0 2.74-1.1 2.74-2.64V9.8c-.8 1.02-1.98 1.47-3.41 1.47-2.73 0-5.09-2.39-5.09-5.59S32.93.09 35.66.09a3.9 3.9 0 0 1 3.41 1.7V1.1c0-.5.3-.8.8-.8zM39.2 5.68c0-1.46-1.1-2.61-2.63-2.61A2.57 2.57 0 0 0 34 5.68a2.6 2.6 0 0 0 2.57 2.61 2.56 2.56 0 0 0 2.63-2.61m18 .27c0 3.47-2.35 5.86-5.28 5.86-1.53 0-2.74-.45-3.62-1.46v5.38h-3.37V.32h2.59c.5 0 .78.29.78.79v.67A4.2 4.2 0 0 1 51.91.1c2.93 0 5.29 2.39 5.29 5.86m-3.4 0c0-1.69-1.2-2.88-2.78-2.88a2.77 2.77 0 0 0-2.83 2.88 2.8 2.8 0 0 0 2.83 2.89c1.58 0 2.77-1.2 2.77-2.89M70.91.32v11.26h-3.38v-1.46a4.2 4.2 0 0 1-3.62 1.69c-2.92 0-5.28-2.39-5.28-5.86S61 .09 63.92.09c1.53 0 2.8.54 3.62 1.7V1.1c0-.5.3-.8.79-.8zm-3.26 5.63a2.8 2.8 0 0 0-2.84-2.88c-1.57 0-2.76 1.19-2.76 2.88 0 1.7 1.19 2.89 2.76 2.89 1.6 0 2.84-1.2 2.84-2.89m10.1 5.86c2.85 0 4.58-1.49 4.58-3.8 0-1.63-.99-2.73-3.03-3.19l-2-.45c-.77-.18-1.18-.43-1.18-.88s.39-.74 1.24-.74c1.04 0 2.11.5 2.86 1.17l1.68-2.48C81.11.72 79.44.1 77.37.1 74.7.1 72.9 1.42 72.9 3.68c0 1.64.92 2.83 2.88 3.29l2 .47c.99.22 1.3.52 1.3.9 0 .5-.4.77-1.33.77a5.5 5.5 0 0 1-3.44-1.36l-1.68 2.48c.78.72 2.58 1.58 5.12 1.58m10.65 0C91.27 11.8 93 10.32 93 8c0-1.63-.99-2.73-3.04-3.19l-2-.45c-.76-.18-1.17-.43-1.17-.88s.38-.74 1.24-.74c1.03 0 2.11.5 2.86 1.17l1.68-2.48C91.77.72 90.1.1 88.03.1c-2.68 0-4.47 1.33-4.47 3.59 0 1.64.92 2.83 2.87 3.29l2 .47c1 .22 1.3.52 1.3.9 0 .5-.4.77-1.32.77a5.5 5.5 0 0 1-3.44-1.36l-1.69 2.48c.8.72 2.6 1.58 5.13 1.58" }),
28968
+ /* @__PURE__ */ jsx$1("path", { fill: "#000", d: "M13.8 3.92c1.1 0 1.95-.86 1.95-1.96S14.9 0 13.8 0s-1.96.86-1.96 1.96.85 1.96 1.96 1.96m-2.12 7.66h4.23l-.9-7a5 5 0 0 1-2.43 0z" })
28969
+ ] });
28970
+ const setupAccountMethods = ["singpass", "manual"];
28971
+ const setupAccountMethodFields = ["setupAccountMethod"];
28972
+ const getSetupAccountMethodMetadata = () => ({
28973
+ singpass: {
28974
+ name: "retrieveMyInfoBusiness",
28975
+ description: "getYourBusinessVerifiedDetails",
28976
+ icon: jsx("span", {
28977
+ className: "adyen-kyc-setup-singpass-container",
28978
+ children: jsx(SvgSetupSingpass, {})
28979
+ }),
28980
+ provider: {
28981
+ name: "singpass",
28982
+ icon: jsx("span", {
28983
+ className: "adyen-kyc-singpass-logo-container",
28984
+ children: jsx(SvgSingpassLogo, {})
28985
+ })
28986
+ }
28987
+ },
28988
+ manual: {
28989
+ name: "enterTheDetailsYourself",
28990
+ description: "youAlsoHaveToUploadSomeSupportingDocuments",
28991
+ icon: jsx("span", {
28992
+ className: "adyen-kyc-setup-manual-container",
28993
+ children: jsx(SvgSetupManual, {})
28994
+ })
28995
+ }
28996
+ });
28997
+ const SingpassSelection = (props) => {
28998
+ const {
28999
+ handleNextClick
29000
+ } = props;
29001
+ const {
29002
+ i18n
29003
+ } = useI18nContext();
29004
+ const [selectedMethod, setSelectedMethod] = useState();
29005
+ const selectSetupAccountMethod = (method) => {
29006
+ setSelectedMethod(method);
29007
+ handleChangeFor("setupAccountMethod")(method);
29008
+ };
29009
+ const {
29010
+ handleChangeFor,
29011
+ data
29012
+ } = useForm({
29013
+ ...props,
29014
+ schema: setupAccountMethodFields,
29015
+ defaultData: {}
29016
+ });
29017
+ const methodsMetadata = getSetupAccountMethodMetadata();
29018
+ return jsx("div", {
29019
+ className: "adl-u-display-flex adl-u-justify-content-center",
29020
+ children: jsxs("div", {
29021
+ className: "adyen-kyc-singpass-selection",
29022
+ children: [jsx("header", {
29023
+ className: "adl-u-margin-bottom-32",
29024
+ children: jsx(Heading, {
29025
+ level: 2,
29026
+ children: i18n.get("howWouldYouLikeToSetUpYourAccount")
29027
+ })
29028
+ }), jsx("form", {
29029
+ children: jsx(Field, {
29030
+ name: "setupAccountMethod",
29031
+ children: (childProps) => jsx(RadioCardSelect, {
29032
+ ...childProps,
29033
+ name: "setupAccountMethod",
29034
+ options: setupAccountMethods,
29035
+ onSelect: selectSetupAccountMethod,
29036
+ selected: data.setupAccountMethod,
29037
+ optionId: (method) => method,
29038
+ optionName: (method) => methodsMetadata[method].name,
29039
+ optionDescription: (method) => methodsMetadata[method].description,
29040
+ className: "adyen-kyc-field-verification-methods",
29041
+ optionClassNames: () => ({
29042
+ icon: "adyen-kyc-radio-group-card__illustration",
29043
+ label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio",
29044
+ footer: "adyen-kyc-field-verification-methods__footer"
29045
+ }),
29046
+ renderOptionIcon: (method) => methodsMetadata[method].icon,
29047
+ renderOptionFooter: (method) => {
29048
+ var _a;
29049
+ return (_a = methodsMetadata[method].provider) == null ? void 0 : _a.icon;
29050
+ }
29051
+ })
29052
+ })
29053
+ }), jsx(Button, {
29054
+ label: i18n.get("next"),
29055
+ block: true,
29056
+ disabled: !selectedMethod,
29057
+ onClick: () => handleNextClick(selectedMethod),
29058
+ type: "button",
29059
+ role: "button"
29060
+ })]
29061
+ })
29062
+ });
29063
+ };
28815
29064
  const businessTypeMapping = {
28816
29065
  myName: {
28817
29066
  [LegalEntityType.INDIVIDUAL]: "individual"
@@ -32444,6 +32693,13 @@ function DropinComposerComponent({
32444
32693
  } = useToastContext();
32445
32694
  const [isLoadingConfiguration, setIsLoadingConfiguration] = useState(false);
32446
32695
  const isNewEntryFlowEnabled = isExperimentEnabled("EnableNewEntryFlow");
32696
+ const isSingpassExperimentEnabled = isExperimentEnabled("ShowSingPassButtonForCompanies");
32697
+ const {
32698
+ hasSeenSingpassSelection,
32699
+ setHasSeenSingpassSelection
32700
+ } = useHasSeenSingpassSelection({
32701
+ legalEntityId: legalEntityResponse.id
32702
+ });
32447
32703
  const [leId, setLeId] = useLeId();
32448
32704
  const showIntroduction = useShouldShowIntroduction({
32449
32705
  legalEntity: legalEntityResponse
@@ -32454,16 +32710,22 @@ function DropinComposerComponent({
32454
32710
  legalEntityId: legalEntityResponse.id
32455
32711
  });
32456
32712
  const [tasks, setTasks] = useState([]);
32713
+ const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
32714
+ const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
32715
+ const isSoleProp = accountHolder2 === "mySoleProprietorName" || hasSolePropInLegalEntity(legalEntityResponse);
32716
+ const isSingpassEnabled = rootLegalEntityCountry === CountryCodes.Singapore && isSingpassExperimentEnabled && !hasSeenSingpassSelection;
32717
+ const shouldShowSingpass = isSingpassEnabled && (isSoleProp || legalEntityResponse.type === LegalEntityType.ORGANIZATION);
32457
32718
  const initialTask = useMemo(() => {
32458
32719
  if (isNewEntryFlowEnabled && (!accountHolder2 || legalEntityResponse.id !== leId)) {
32459
32720
  return TaskTypes.BUSINESS_TYPE_SELECTION;
32460
32721
  }
32461
32722
  if (showIntroduction)
32462
32723
  return TaskTypes.INTRODUCTION;
32724
+ if (isSingpassEnabled)
32725
+ return TaskTypes.SINGPASS_SELECTION;
32463
32726
  return TaskTypes.TASKS_OVERVIEW;
32464
32727
  }, [showIntroduction, isNewEntryFlowEnabled, accountHolder2, legalEntityResponse, leId]);
32465
32728
  const [taskHistory, setTaskHistory] = useState([initialTask]);
32466
- const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
32467
32729
  const [associatedLegalEntity, setAssociatedLegalEntity] = useState(null);
32468
32730
  const {
32469
32731
  associatedLegalArrangement,
@@ -32485,7 +32747,6 @@ function DropinComposerComponent({
32485
32747
  const [serviceAgreementTypes, setServiceAgreementTypes] = useState([]);
32486
32748
  const [serviceAgreementAcceptanceInfosWithNames, setServiceAgreementAcceptanceInfosWithNames] = useState([]);
32487
32749
  const [transferInstrument, setTransferInstrument] = useState(null);
32488
- const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
32489
32750
  const [capabilityProblems, setCapabilityProblems] = useState(getCapabilityProblems(legalEntityResponse, rootLegalEntityCountry, isExperimentEnabled));
32490
32751
  const [bankVerificationVendors, setBankVerificationVendors] = useState();
32491
32752
  const hasTrust = accountHolder2 === "aTrust" || isPartOfTrustFromLegalEntity(legalEntityResponse);
@@ -32544,19 +32805,11 @@ function DropinComposerComponent({
32544
32805
  getPciTemplate().catch(logger$8.error);
32545
32806
  }, [getPciTemplate, tasks]);
32546
32807
  const addFetchedAcceptedByName = async (acceptanceInfo) => {
32547
- try {
32548
- const acceptedByEntity = await (args == null ? void 0 : args.handleGetLegalEntity(acceptanceInfo.acceptedBy));
32549
- return {
32550
- ...acceptanceInfo,
32551
- acceptedByName: getLegalEntityNameBasedOnType(acceptedByEntity)
32552
- };
32553
- } catch (e) {
32554
- logger$8.warn(i18n.get("failedToFetchAcceptedByName"));
32555
- return {
32556
- ...acceptanceInfo,
32557
- acceptedByName: null
32558
- };
32559
- }
32808
+ const acceptedByEntity = await (args == null ? void 0 : args.handleGetLegalEntity(acceptanceInfo.acceptedBy));
32809
+ return {
32810
+ ...acceptanceInfo,
32811
+ acceptedByName: getLegalEntityNameBasedOnType(acceptedByEntity)
32812
+ };
32560
32813
  };
32561
32814
  const getServiceAgreementAcceptanceInfos = async () => {
32562
32815
  if (rootLegalEntity.id && (args == null ? void 0 : args.handleGetServiceAgreementAcceptanceInfos)) {
@@ -32749,6 +33002,33 @@ function DropinComposerComponent({
32749
33002
  });
32750
33003
  }
32751
33004
  };
33005
+ const handleSingpassSelectionNextClick = async (method) => {
33006
+ const {
33007
+ handleOpenSingpassAuthorizationLink
33008
+ } = args;
33009
+ if (method === "singpass" && handleOpenSingpassAuthorizationLink) {
33010
+ try {
33011
+ const {
33012
+ item: {
33013
+ authUrl
33014
+ }
33015
+ } = await handleOpenSingpassAuthorizationLink();
33016
+ setHasSeenSingpassSelection(true);
33017
+ window.open(authUrl, "_blank").focus();
33018
+ onNavigateTo(TaskTypes.TASKS_OVERVIEW);
33019
+ } catch (e) {
33020
+ logger$8.error(e);
33021
+ showToast({
33022
+ label: i18n.get("failToLaunchSingpass"),
33023
+ type: ToastType.ERROR
33024
+ });
33025
+ }
33026
+ }
33027
+ if (method === "manual") {
33028
+ setHasSeenSingpassSelection(true);
33029
+ onNavigateTo(TaskTypes.TASKS_OVERVIEW);
33030
+ }
33031
+ };
32752
33032
  const onNavigateTo = (task) => {
32753
33033
  setTaskHistory([...taskHistory, task]);
32754
33034
  onNavigate(task);
@@ -33008,7 +33288,15 @@ function DropinComposerComponent({
33008
33288
  setLeId(legalEntityResponse.id);
33009
33289
  setAccountHolder(newAccountHolder);
33010
33290
  await refreshLegalEntity();
33011
- onNavigateTo(showIntroduction ? TaskTypes.INTRODUCTION : TaskTypes.TASKS_OVERVIEW);
33291
+ if (showIntroduction) {
33292
+ onNavigateTo(TaskTypes.INTRODUCTION);
33293
+ return;
33294
+ }
33295
+ if (isSingpassEnabled && newAccountHolder === "theCompanyIWorkFor" || newAccountHolder === "mySoleProprietorName") {
33296
+ onNavigateTo(TaskTypes.SINGPASS_SELECTION);
33297
+ return;
33298
+ }
33299
+ onNavigateTo(TaskTypes.TASKS_OVERVIEW);
33012
33300
  },
33013
33301
  taskHistory,
33014
33302
  setTaskHistory,
@@ -33019,11 +33307,19 @@ function DropinComposerComponent({
33019
33307
  eventEmitter
33020
33308
  })
33021
33309
  });
33310
+ case TaskTypes.SINGPASS_SELECTION:
33311
+ return jsx(SingpassSelection, {
33312
+ handleNextClick: handleSingpassSelectionNextClick
33313
+ });
33022
33314
  case TaskTypes.INTRODUCTION:
33023
33315
  return jsx(Introduction, {
33024
33316
  legalEntity: rootLegalEntity,
33025
33317
  onExitIntroduction: () => {
33026
33318
  setHasSeenIntroduction(true);
33319
+ if (shouldShowSingpass) {
33320
+ onNavigateTo(TaskTypes.SINGPASS_SELECTION);
33321
+ return;
33322
+ }
33027
33323
  onNavigateTo(TaskTypes.TASKS_OVERVIEW);
33028
33324
  },
33029
33325
  tasks
@@ -34564,7 +34860,7 @@ const ConfigurationApiProvider = ({
34564
34860
  isEmbeddedDropin,
34565
34861
  loadingContext
34566
34862
  } = authContext;
34567
- const sdkVersion = "2.37.2";
34863
+ const sdkVersion = "2.38.0";
34568
34864
  useAnalytics({
34569
34865
  onUserEvent,
34570
34866
  legalEntityId: rootLegalEntityId,