@adyen/adyen-web 6.25.1 → 6.26.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.
- package/dist/cjs/adyen.css +14 -11
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +2257 -2222
- package/dist/es/adyen.css +14 -11
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/components/ANCV/ANCV.js +1 -1
- package/dist/es/components/ANCV/ANCV.js.map +1 -1
- package/dist/es/components/Ach/Ach.js +1 -1
- package/dist/es/components/Ach/Ach.js.map +1 -1
- package/dist/es/components/Address/Address.js +1 -1
- package/dist/es/components/Address/Address.js.map +1 -1
- package/dist/es/components/AmazonPay/AmazonPay.js +1 -1
- package/dist/es/components/AmazonPay/AmazonPay.js.map +1 -1
- package/dist/es/components/ApplePay/ApplePay.js +1 -1
- package/dist/es/components/ApplePay/ApplePay.js.map +1 -1
- package/dist/es/components/ApplePay/services/ApplePaySdkLoader.js.map +1 -1
- package/dist/es/components/ApplePay/utils/resolve-supported-version.js +1 -1
- package/dist/es/components/ApplePay/utils/resolve-supported-version.js.map +1 -1
- package/dist/es/components/BacsDD/BacsDD.js +1 -1
- package/dist/es/components/BacsDD/BacsDD.js.map +1 -1
- package/dist/es/components/BankTransfer/BankTransfer.js +1 -1
- package/dist/es/components/BankTransfer/BankTransfer.js.map +1 -1
- package/dist/es/components/Blik/Blik.js +1 -1
- package/dist/es/components/Blik/Blik.js.map +1 -1
- package/dist/es/components/Boleto/Boleto.js +1 -1
- package/dist/es/components/Boleto/Boleto.js.map +1 -1
- package/dist/es/components/Card/Card.js +1 -1
- package/dist/es/components/Card/Card.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/CardInput.js +1 -1
- package/dist/es/components/Card/components/CardInput/CardInput.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/BrandIcon.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/BrandIcon.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/CVC.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/CVC.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/CVCHint.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/CVCHint.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/CardNumber.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/CardNumber.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/ExpirationDate.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/ExpirationDate.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/types.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/utils.js +1 -1
- package/dist/es/components/Card/components/CardInput/utils.js.map +1 -1
- package/dist/es/components/Card/components/Fastlane/FastlaneSignup.js +1 -1
- package/dist/es/components/Card/components/Fastlane/FastlaneSignup.js.map +1 -1
- package/dist/es/components/Card/components/Fastlane/InfoButton.js +1 -1
- package/dist/es/components/Card/components/Fastlane/InfoButton.js.map +1 -1
- package/dist/es/components/Card/components/Fastlane/InfoModal.js +1 -1
- package/dist/es/components/Card/components/Fastlane/InfoModal.js.map +1 -1
- package/dist/es/components/CashAppPay/CashAppPay.js +1 -1
- package/dist/es/components/CashAppPay/CashAppPay.js.map +1 -1
- package/dist/es/components/CashAppPay/services/CashAppSdkLoader.js.map +1 -1
- package/dist/es/components/ClickToPay/ClickToPay.js +1 -1
- package/dist/es/components/ClickToPay/ClickToPay.js.map +1 -1
- package/dist/es/components/CustomCard/CustomCard.js +1 -1
- package/dist/es/components/CustomCard/CustomCard.js.map +1 -1
- package/dist/es/components/Doku/Doku.js +1 -1
- package/dist/es/components/Doku/Doku.js.map +1 -1
- package/dist/es/components/Donation/Donation.js +1 -1
- package/dist/es/components/Donation/Donation.js.map +1 -1
- package/dist/es/components/Dragonpay/Dragonpay.js +1 -1
- package/dist/es/components/Dragonpay/Dragonpay.js.map +1 -1
- package/dist/es/components/Dropin/Dropin.js +1 -1
- package/dist/es/components/Dropin/Dropin.js.map +1 -1
- package/dist/es/components/Dropin/components/DropinComponent.js +1 -1
- package/dist/es/components/Dropin/components/DropinComponent.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodBrands/PaymentMethodBrands.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodBrands/PaymentMethodBrands.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodDetails.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodDetails.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodIcon.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodIcon.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodList.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodList.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js.map +1 -1
- package/dist/es/components/Dropin/elements/createElements.js +1 -1
- package/dist/es/components/Dropin/elements/createElements.js.map +1 -1
- package/dist/es/components/Dropin/elements/createInstantPaymentElements.js +1 -1
- package/dist/es/components/Dropin/elements/createInstantPaymentElements.js.map +1 -1
- package/dist/es/components/Dropin/elements/createStoredElements.js.map +1 -1
- package/dist/es/components/Dropin/elements/filters.js.map +1 -1
- package/dist/es/components/Dropin/elements/splitPaymentMethods.js.map +1 -1
- package/dist/es/components/Econtext/Econtext.js +1 -1
- package/dist/es/components/Econtext/Econtext.js.map +1 -1
- package/dist/es/components/Giftcard/Giftcard.js +1 -1
- package/dist/es/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es/components/Giropay/Giropay.js +1 -1
- package/dist/es/components/Giropay/Giropay.js.map +1 -1
- package/dist/es/components/GooglePay/GooglePay.js +1 -1
- package/dist/es/components/GooglePay/GooglePay.js.map +1 -1
- package/dist/es/components/GooglePay/GooglePayService.js.map +1 -1
- package/dist/es/components/Klarna/KlarnaPayments.js +1 -1
- package/dist/es/components/Klarna/KlarnaPayments.js.map +1 -1
- package/dist/es/components/MBWay/MBWay.js +1 -1
- package/dist/es/components/MBWay/MBWay.js.map +1 -1
- package/dist/es/components/Multibanco/Multibanco.js +1 -1
- package/dist/es/components/Multibanco/Multibanco.js.map +1 -1
- package/dist/es/components/Oxxo/Oxxo.js +1 -1
- package/dist/es/components/Oxxo/Oxxo.js.map +1 -1
- package/dist/es/components/PayByBankPix/PayByBankPix.js +1 -1
- package/dist/es/components/PayByBankPix/PayByBankPix.js.map +1 -1
- package/dist/es/components/PayByBankPix/components/Enrollment/Enrollment.js +1 -1
- package/dist/es/components/PayByBankPix/components/Enrollment/Enrollment.js.map +1 -1
- package/dist/es/components/PayByBankPix/components/Enrollment/components/PayByBankPixAwait.js +1 -1
- package/dist/es/components/PayByBankPix/components/Enrollment/components/PayByBankPixAwait.js.map +1 -1
- package/dist/es/components/PayByBankPix/services/PasskeySdkLoader.js.map +1 -1
- package/dist/es/components/PayByBankPix/services/PasskeyService.js.map +1 -1
- package/dist/es/components/PayByBankUS/PayByBankUS.js +1 -1
- package/dist/es/components/PayByBankUS/PayByBankUS.js.map +1 -1
- package/dist/es/components/PayPal/Paypal.js +1 -1
- package/dist/es/components/PayPal/Paypal.js.map +1 -1
- package/dist/es/components/PayPalFastlane/Fastlane.js +1 -1
- package/dist/es/components/PayPalFastlane/Fastlane.js.map +1 -1
- package/dist/es/components/PayPalFastlane/FastlaneSDK.js +1 -1
- package/dist/es/components/PayPalFastlane/FastlaneSDK.js.map +1 -1
- package/dist/es/components/PayTo/PayTo.js +1 -1
- package/dist/es/components/PayTo/PayTo.js.map +1 -1
- package/dist/es/components/PersonalDetails/PersonalDetails.js +1 -1
- package/dist/es/components/PersonalDetails/PersonalDetails.js.map +1 -1
- package/dist/es/components/Pix/Pix.js +1 -1
- package/dist/es/components/Pix/Pix.js.map +1 -1
- package/dist/es/components/Pix/components/PixQRDetails.js +1 -1
- package/dist/es/components/Pix/components/PixQRDetails.js.map +1 -1
- package/dist/es/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.js +1 -1
- package/dist/es/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.js.map +1 -1
- package/dist/es/components/Redirect/Redirect.js +1 -1
- package/dist/es/components/Redirect/Redirect.js.map +1 -1
- package/dist/es/components/Sepa/Sepa.js +1 -1
- package/dist/es/components/Sepa/Sepa.js.map +1 -1
- package/dist/es/components/ThreeDS2/ThreeDS2Challenge.js +1 -1
- package/dist/es/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
- package/dist/es/components/ThreeDS2/ThreeDS2DeviceFingerprint.js +1 -1
- package/dist/es/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
- package/dist/es/components/ThreeDS2/callSubmit3DS2Fingerprint.js +1 -1
- package/dist/es/components/ThreeDS2/callSubmit3DS2Fingerprint.js.map +1 -1
- package/dist/es/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js +1 -1
- package/dist/es/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js.map +1 -1
- package/dist/es/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js +1 -1
- package/dist/es/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js.map +1 -1
- package/dist/es/components/Trustly/Trustly.js +1 -1
- package/dist/es/components/Trustly/Trustly.js.map +1 -1
- package/dist/es/components/UPI/UPI.js +1 -1
- package/dist/es/components/UPI/UPI.js.map +1 -1
- package/dist/es/components/UPI/components/VpaInput/VpaInput.js +1 -1
- package/dist/es/components/UPI/components/VpaInput/VpaInput.js.map +1 -1
- package/dist/es/components/UPI/components/VpaInput/validate.js +1 -1
- package/dist/es/components/UPI/components/VpaInput/validate.js.map +1 -1
- package/dist/es/components/WeChat/WeChat.js +1 -1
- package/dist/es/components/WeChat/WeChat.js.map +1 -1
- package/dist/es/components/helpers/IssuerListContainer/IssuerListContainer.js +1 -1
- package/dist/es/components/helpers/IssuerListContainer/IssuerListContainer.js.map +1 -1
- package/dist/es/components/helpers/OpenInvoiceContainer/OpenInvoiceContainer.js +1 -1
- package/dist/es/components/helpers/OpenInvoiceContainer/OpenInvoiceContainer.js.map +1 -1
- package/dist/es/components/helpers/QRLoaderContainer/QRLoaderContainer.js +1 -1
- package/dist/es/components/helpers/QRLoaderContainer/QRLoaderContainer.js.map +1 -1
- package/dist/es/components/internal/Await/Await.js +1 -1
- package/dist/es/components/internal/Await/Await.js.map +1 -1
- package/dist/es/components/internal/Await/components/AwaitFinalState.js +2 -0
- package/dist/es/components/internal/Await/components/AwaitFinalState.js.map +1 -0
- package/dist/es/components/internal/BaseElement/BaseElement.js +1 -1
- package/dist/es/components/internal/BaseElement/BaseElement.js.map +1 -1
- package/dist/es/components/internal/Brand/Brand.js +2 -0
- package/dist/es/components/internal/Brand/Brand.js.map +1 -0
- package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPCards.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPCards.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPInfo/CtPInfo.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPInfo/CtPInfo.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/validate.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/validate.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/services/ClickToPayService.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/services/create-clicktopay-service.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/services/sdks/AbstractSrcInitiator.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/services/sdks/MastercardSdk.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/services/sdks/SrcSdkLoader.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/services/sdks/VisaSdk.js.map +1 -1
- package/dist/es/components/internal/FormFields/Field/Field.js +1 -1
- package/dist/es/components/internal/FormFields/Field/Field.js.map +1 -1
- package/dist/es/components/internal/FormFields/InputBase.js.map +1 -1
- package/dist/es/components/internal/FormFields/RadioGroupExtended/RadioGroupExtended.js +1 -1
- package/dist/es/components/internal/FormFields/RadioGroupExtended/RadioGroupExtended.js.map +1 -1
- package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js +1 -1
- package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js.map +1 -1
- package/dist/es/components/internal/Icon/Icon.js +1 -1
- package/dist/es/components/internal/Icon/Icon.js.map +1 -1
- package/dist/es/components/internal/Img/Img.js +1 -1
- package/dist/es/components/internal/Img/Img.js.map +1 -1
- package/dist/es/components/internal/IssuerList/IssuerList.js +1 -1
- package/dist/es/components/internal/IssuerList/IssuerList.js.map +1 -1
- package/dist/es/components/internal/PersonalDetails/PersonalDetails.js +1 -1
- package/dist/es/components/internal/PersonalDetails/PersonalDetails.js.map +1 -1
- package/dist/es/components/internal/PersonalDetails/utils.js +1 -1
- package/dist/es/components/internal/PersonalDetails/utils.js.map +1 -1
- package/dist/es/components/internal/PersonalDetails/validate.js +1 -1
- package/dist/es/components/internal/PersonalDetails/validate.js.map +1 -1
- package/dist/es/components/internal/QRLoader/QRLoader.js +1 -1
- package/dist/es/components/internal/QRLoader/QRLoader.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRCodeCopyButton.js +1 -1
- package/dist/es/components/internal/QRLoader/components/QRCodeCopyButton.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRCountdown.js +1 -1
- package/dist/es/components/internal/QRLoader/components/QRCountdown.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRDetails.js +1 -1
- package/dist/es/components/internal/QRLoader/components/QRDetails.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRImage.js +1 -1
- package/dist/es/components/internal/QRLoader/components/QRImage.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRIntructions.js +1 -1
- package/dist/es/components/internal/QRLoader/components/QRIntructions.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRProgressbar.js +1 -1
- package/dist/es/components/internal/QRLoader/components/QRProgressbar.js.map +1 -1
- package/dist/es/components/internal/UIElement/UIElement.js +1 -1
- package/dist/es/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es/components/internal/UIElement/utils.js.map +1 -1
- package/dist/es/core/Analytics/Analytics.js +1 -1
- package/dist/es/core/Analytics/Analytics.js.map +1 -1
- package/dist/es/core/Analytics/AnalyticsEventQueue.js +2 -0
- package/dist/es/core/Analytics/AnalyticsEventQueue.js.map +1 -0
- package/dist/es/core/Analytics/AnalyticsService.js +2 -0
- package/dist/es/core/Analytics/AnalyticsService.js.map +1 -0
- package/dist/es/core/Analytics/constants.js +1 -1
- package/dist/es/core/Analytics/constants.js.map +1 -1
- package/dist/es/core/Analytics/events/AbstractAnalyticsEvent.js +2 -0
- package/dist/es/core/Analytics/events/AbstractAnalyticsEvent.js.map +1 -0
- package/dist/es/core/Analytics/events/AnalyticsErrorEvent.js +2 -0
- package/dist/es/core/Analytics/events/AnalyticsErrorEvent.js.map +1 -0
- package/dist/es/core/Analytics/events/AnalyticsInfoEvent.js +2 -0
- package/dist/es/core/Analytics/events/AnalyticsInfoEvent.js.map +1 -0
- package/dist/es/core/Analytics/events/AnalyticsLogEvent.js +2 -0
- package/dist/es/core/Analytics/events/AnalyticsLogEvent.js.map +1 -0
- package/dist/es/core/Analytics/utils.js +1 -1
- package/dist/es/core/Analytics/utils.js.map +1 -1
- package/dist/es/core/Context/CoreProvider.js +1 -1
- package/dist/es/core/Context/CoreProvider.js.map +1 -1
- package/dist/es/core/ProcessResponse/PaymentAction/actionTypes.js.map +1 -1
- package/dist/es/core/ProcessResponse/PaymentMethods/PaymentMethods.js +1 -1
- package/dist/es/core/ProcessResponse/PaymentMethods/PaymentMethods.js.map +1 -1
- package/dist/es/core/ProcessResponse/PaymentMethods/utils.js +1 -1
- package/dist/es/core/ProcessResponse/PaymentMethods/utils.js.map +1 -1
- package/dist/es/core/ProcessResponse/{process-response.js → PaymentStatus/PaymentStatus.js} +2 -2
- package/dist/es/core/ProcessResponse/PaymentStatus/PaymentStatus.js.map +1 -0
- package/dist/es/core/Services/http.js +1 -1
- package/dist/es/core/Services/http.js.map +1 -1
- package/dist/es/core/Services/payment-status.js.map +1 -1
- package/dist/es/core/config.js +1 -1
- package/dist/es/core/core.js +1 -1
- package/dist/es/core/core.js.map +1 -1
- package/dist/es/external/preact/compat/dist/compat.js +1 -1
- package/dist/es/external/preact/compat/dist/compat.js.map +1 -1
- package/dist/es/hooks/usePaymentStatusTimer/constants.js +2 -0
- package/dist/es/hooks/usePaymentStatusTimer/constants.js.map +1 -0
- package/dist/es/hooks/usePaymentStatusTimer/usePaymentStatusTimer.js +2 -0
- package/dist/es/hooks/usePaymentStatusTimer/usePaymentStatusTimer.js.map +1 -0
- package/dist/es/index.d.ts +2257 -2222
- package/dist/es/utils/Script.js +1 -1
- package/dist/es/utils/Script.js.map +1 -1
- package/dist/es/utils/amount-util.js.map +1 -1
- package/dist/es/utils/commonUtils.js +1 -1
- package/dist/es/utils/commonUtils.js.map +1 -1
- package/dist/es/utils/getErrorMessage.js +1 -1
- package/dist/es/utils/getErrorMessage.js.map +1 -1
- package/dist/es/utils/urls.js +2 -0
- package/dist/es/utils/urls.js.map +1 -0
- package/dist/es-legacy/adyen.css +14 -11
- package/dist/es-legacy/adyen.css.map +1 -1
- package/dist/es-legacy/components/ANCV/ANCV.js +1 -1
- package/dist/es-legacy/components/ANCV/ANCV.js.map +1 -1
- package/dist/es-legacy/components/Ach/Ach.js +1 -1
- package/dist/es-legacy/components/Ach/Ach.js.map +1 -1
- package/dist/es-legacy/components/Address/Address.js +1 -1
- package/dist/es-legacy/components/Address/Address.js.map +1 -1
- package/dist/es-legacy/components/AmazonPay/AmazonPay.js +1 -1
- package/dist/es-legacy/components/AmazonPay/AmazonPay.js.map +1 -1
- package/dist/es-legacy/components/ApplePay/ApplePay.js +1 -1
- package/dist/es-legacy/components/ApplePay/ApplePay.js.map +1 -1
- package/dist/es-legacy/components/ApplePay/services/ApplePaySdkLoader.js.map +1 -1
- package/dist/es-legacy/components/ApplePay/utils/resolve-supported-version.js +1 -1
- package/dist/es-legacy/components/ApplePay/utils/resolve-supported-version.js.map +1 -1
- package/dist/es-legacy/components/BacsDD/BacsDD.js +1 -1
- package/dist/es-legacy/components/BacsDD/BacsDD.js.map +1 -1
- package/dist/es-legacy/components/BankTransfer/BankTransfer.js +1 -1
- package/dist/es-legacy/components/BankTransfer/BankTransfer.js.map +1 -1
- package/dist/es-legacy/components/Blik/Blik.js +1 -1
- package/dist/es-legacy/components/Blik/Blik.js.map +1 -1
- package/dist/es-legacy/components/Boleto/Boleto.js +1 -1
- package/dist/es-legacy/components/Boleto/Boleto.js.map +1 -1
- package/dist/es-legacy/components/Card/Card.js +1 -1
- package/dist/es-legacy/components/Card/Card.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/CardInput.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/CardInput.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/BrandIcon.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/BrandIcon.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CVC.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CVC.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CVCHint.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CVCHint.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CardNumber.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CardNumber.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/ExpirationDate.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/ExpirationDate.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/types.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/utils.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/utils.js.map +1 -1
- package/dist/es-legacy/components/Card/components/Fastlane/FastlaneSignup.js +1 -1
- package/dist/es-legacy/components/Card/components/Fastlane/FastlaneSignup.js.map +1 -1
- package/dist/es-legacy/components/Card/components/Fastlane/InfoButton.js +1 -1
- package/dist/es-legacy/components/Card/components/Fastlane/InfoButton.js.map +1 -1
- package/dist/es-legacy/components/Card/components/Fastlane/InfoModal.js +1 -1
- package/dist/es-legacy/components/Card/components/Fastlane/InfoModal.js.map +1 -1
- package/dist/es-legacy/components/CashAppPay/CashAppPay.js +1 -1
- package/dist/es-legacy/components/CashAppPay/CashAppPay.js.map +1 -1
- package/dist/es-legacy/components/CashAppPay/services/CashAppSdkLoader.js.map +1 -1
- package/dist/es-legacy/components/ClickToPay/ClickToPay.js +1 -1
- package/dist/es-legacy/components/ClickToPay/ClickToPay.js.map +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCard.js +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCard.js.map +1 -1
- package/dist/es-legacy/components/Doku/Doku.js +1 -1
- package/dist/es-legacy/components/Doku/Doku.js.map +1 -1
- package/dist/es-legacy/components/Donation/Donation.js +1 -1
- package/dist/es-legacy/components/Donation/Donation.js.map +1 -1
- package/dist/es-legacy/components/Dragonpay/Dragonpay.js +1 -1
- package/dist/es-legacy/components/Dragonpay/Dragonpay.js.map +1 -1
- package/dist/es-legacy/components/Dropin/Dropin.js +1 -1
- package/dist/es-legacy/components/Dropin/Dropin.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/DropinComponent.js +1 -1
- package/dist/es-legacy/components/Dropin/components/DropinComponent.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodBrands/PaymentMethodBrands.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodBrands/PaymentMethodBrands.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodDetails.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodDetails.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodIcon.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodIcon.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodList.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodList.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.js.map +1 -1
- package/dist/es-legacy/components/Dropin/elements/createElements.js +1 -1
- package/dist/es-legacy/components/Dropin/elements/createElements.js.map +1 -1
- package/dist/es-legacy/components/Dropin/elements/createInstantPaymentElements.js +1 -1
- package/dist/es-legacy/components/Dropin/elements/createInstantPaymentElements.js.map +1 -1
- package/dist/es-legacy/components/Dropin/elements/createStoredElements.js.map +1 -1
- package/dist/es-legacy/components/Dropin/elements/filters.js.map +1 -1
- package/dist/es-legacy/components/Dropin/elements/splitPaymentMethods.js.map +1 -1
- package/dist/es-legacy/components/Econtext/Econtext.js +1 -1
- package/dist/es-legacy/components/Econtext/Econtext.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/Giftcard.js +1 -1
- package/dist/es-legacy/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es-legacy/components/Giropay/Giropay.js +1 -1
- package/dist/es-legacy/components/Giropay/Giropay.js.map +1 -1
- package/dist/es-legacy/components/GooglePay/GooglePay.js +1 -1
- package/dist/es-legacy/components/GooglePay/GooglePay.js.map +1 -1
- package/dist/es-legacy/components/GooglePay/GooglePayService.js.map +1 -1
- package/dist/es-legacy/components/Klarna/KlarnaPayments.js +1 -1
- package/dist/es-legacy/components/Klarna/KlarnaPayments.js.map +1 -1
- package/dist/es-legacy/components/MBWay/MBWay.js +1 -1
- package/dist/es-legacy/components/MBWay/MBWay.js.map +1 -1
- package/dist/es-legacy/components/Multibanco/Multibanco.js +1 -1
- package/dist/es-legacy/components/Multibanco/Multibanco.js.map +1 -1
- package/dist/es-legacy/components/Oxxo/Oxxo.js +1 -1
- package/dist/es-legacy/components/Oxxo/Oxxo.js.map +1 -1
- package/dist/es-legacy/components/PayByBankPix/PayByBankPix.js +1 -1
- package/dist/es-legacy/components/PayByBankPix/PayByBankPix.js.map +1 -1
- package/dist/es-legacy/components/PayByBankPix/components/Enrollment/Enrollment.js +1 -1
- package/dist/es-legacy/components/PayByBankPix/components/Enrollment/Enrollment.js.map +1 -1
- package/dist/es-legacy/components/PayByBankPix/components/Enrollment/components/PayByBankPixAwait.js +1 -1
- package/dist/es-legacy/components/PayByBankPix/components/Enrollment/components/PayByBankPixAwait.js.map +1 -1
- package/dist/es-legacy/components/PayByBankPix/services/PasskeySdkLoader.js.map +1 -1
- package/dist/es-legacy/components/PayByBankPix/services/PasskeyService.js.map +1 -1
- package/dist/es-legacy/components/PayByBankUS/PayByBankUS.js +1 -1
- package/dist/es-legacy/components/PayByBankUS/PayByBankUS.js.map +1 -1
- package/dist/es-legacy/components/PayPal/Paypal.js +1 -1
- package/dist/es-legacy/components/PayPal/Paypal.js.map +1 -1
- package/dist/es-legacy/components/PayPalFastlane/Fastlane.js +1 -1
- package/dist/es-legacy/components/PayPalFastlane/Fastlane.js.map +1 -1
- package/dist/es-legacy/components/PayPalFastlane/FastlaneSDK.js +1 -1
- package/dist/es-legacy/components/PayPalFastlane/FastlaneSDK.js.map +1 -1
- package/dist/es-legacy/components/PayTo/PayTo.js +1 -1
- package/dist/es-legacy/components/PayTo/PayTo.js.map +1 -1
- package/dist/es-legacy/components/PersonalDetails/PersonalDetails.js +1 -1
- package/dist/es-legacy/components/PersonalDetails/PersonalDetails.js.map +1 -1
- package/dist/es-legacy/components/Pix/Pix.js +1 -1
- package/dist/es-legacy/components/Pix/Pix.js.map +1 -1
- package/dist/es-legacy/components/Pix/components/PixQRDetails.js +1 -1
- package/dist/es-legacy/components/Pix/components/PixQRDetails.js.map +1 -1
- package/dist/es-legacy/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.js +1 -1
- package/dist/es-legacy/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.js.map +1 -1
- package/dist/es-legacy/components/Redirect/Redirect.js +1 -1
- package/dist/es-legacy/components/Redirect/Redirect.js.map +1 -1
- package/dist/es-legacy/components/Sepa/Sepa.js +1 -1
- package/dist/es-legacy/components/Sepa/Sepa.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/ThreeDS2Challenge.js +1 -1
- package/dist/es-legacy/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js +1 -1
- package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/callSubmit3DS2Fingerprint.js +1 -1
- package/dist/es-legacy/components/ThreeDS2/callSubmit3DS2Fingerprint.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js.map +1 -1
- package/dist/es-legacy/components/Trustly/Trustly.js +1 -1
- package/dist/es-legacy/components/Trustly/Trustly.js.map +1 -1
- package/dist/es-legacy/components/UPI/UPI.js +1 -1
- package/dist/es-legacy/components/UPI/UPI.js.map +1 -1
- package/dist/es-legacy/components/UPI/components/VpaInput/VpaInput.js +1 -1
- package/dist/es-legacy/components/UPI/components/VpaInput/VpaInput.js.map +1 -1
- package/dist/es-legacy/components/UPI/components/VpaInput/validate.js +1 -1
- package/dist/es-legacy/components/UPI/components/VpaInput/validate.js.map +1 -1
- package/dist/es-legacy/components/WeChat/WeChat.js +1 -1
- package/dist/es-legacy/components/WeChat/WeChat.js.map +1 -1
- package/dist/es-legacy/components/helpers/IssuerListContainer/IssuerListContainer.js +1 -1
- package/dist/es-legacy/components/helpers/IssuerListContainer/IssuerListContainer.js.map +1 -1
- package/dist/es-legacy/components/helpers/OpenInvoiceContainer/OpenInvoiceContainer.js +1 -1
- package/dist/es-legacy/components/helpers/OpenInvoiceContainer/OpenInvoiceContainer.js.map +1 -1
- package/dist/es-legacy/components/helpers/QRLoaderContainer/QRLoaderContainer.js +1 -1
- package/dist/es-legacy/components/helpers/QRLoaderContainer/QRLoaderContainer.js.map +1 -1
- package/dist/es-legacy/components/internal/Await/Await.js +1 -1
- package/dist/es-legacy/components/internal/Await/Await.js.map +1 -1
- package/dist/es-legacy/components/internal/Await/components/AwaitFinalState.js +2 -0
- package/dist/es-legacy/components/internal/Await/components/AwaitFinalState.js.map +1 -0
- package/dist/es-legacy/components/internal/BaseElement/BaseElement.js +1 -1
- package/dist/es-legacy/components/internal/BaseElement/BaseElement.js.map +1 -1
- package/dist/es-legacy/components/internal/Brand/Brand.js +2 -0
- package/dist/es-legacy/components/internal/Brand/Brand.js.map +1 -0
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPCards.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPCards.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPInfo/CtPInfo.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPInfo/CtPInfo.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/validate.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/validate.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/services/ClickToPayService.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/services/create-clicktopay-service.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/services/sdks/AbstractSrcInitiator.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/services/sdks/MastercardSdk.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/services/sdks/SrcSdkLoader.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/services/sdks/VisaSdk.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/Field/Field.js +1 -1
- package/dist/es-legacy/components/internal/FormFields/Field/Field.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/InputBase.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/RadioGroupExtended/RadioGroupExtended.js +1 -1
- package/dist/es-legacy/components/internal/FormFields/RadioGroupExtended/RadioGroupExtended.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/Select/components/SelectListItem.js +1 -1
- package/dist/es-legacy/components/internal/FormFields/Select/components/SelectListItem.js.map +1 -1
- package/dist/es-legacy/components/internal/Icon/Icon.js +1 -1
- package/dist/es-legacy/components/internal/Icon/Icon.js.map +1 -1
- package/dist/es-legacy/components/internal/Img/Img.js +1 -1
- package/dist/es-legacy/components/internal/Img/Img.js.map +1 -1
- package/dist/es-legacy/components/internal/IssuerList/IssuerList.js +1 -1
- package/dist/es-legacy/components/internal/IssuerList/IssuerList.js.map +1 -1
- package/dist/es-legacy/components/internal/PersonalDetails/PersonalDetails.js +1 -1
- package/dist/es-legacy/components/internal/PersonalDetails/PersonalDetails.js.map +1 -1
- package/dist/es-legacy/components/internal/PersonalDetails/utils.js +1 -1
- package/dist/es-legacy/components/internal/PersonalDetails/utils.js.map +1 -1
- package/dist/es-legacy/components/internal/PersonalDetails/validate.js +1 -1
- package/dist/es-legacy/components/internal/PersonalDetails/validate.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/QRLoader.js +1 -1
- package/dist/es-legacy/components/internal/QRLoader/QRLoader.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRCodeCopyButton.js +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRCodeCopyButton.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRCountdown.js +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRCountdown.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRDetails.js +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRDetails.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRImage.js +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRImage.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRIntructions.js +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRIntructions.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRProgressbar.js +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRProgressbar.js.map +1 -1
- package/dist/es-legacy/components/internal/UIElement/UIElement.js +1 -1
- package/dist/es-legacy/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es-legacy/components/internal/UIElement/utils.js.map +1 -1
- package/dist/es-legacy/core/Analytics/Analytics.js +1 -1
- package/dist/es-legacy/core/Analytics/Analytics.js.map +1 -1
- package/dist/es-legacy/core/Analytics/AnalyticsEventQueue.js +2 -0
- package/dist/es-legacy/core/Analytics/AnalyticsEventQueue.js.map +1 -0
- package/dist/es-legacy/core/Analytics/AnalyticsService.js +2 -0
- package/dist/es-legacy/core/Analytics/AnalyticsService.js.map +1 -0
- package/dist/es-legacy/core/Analytics/constants.js +1 -1
- package/dist/es-legacy/core/Analytics/constants.js.map +1 -1
- package/dist/es-legacy/core/Analytics/events/AbstractAnalyticsEvent.js +2 -0
- package/dist/es-legacy/core/Analytics/events/AbstractAnalyticsEvent.js.map +1 -0
- package/dist/es-legacy/core/Analytics/events/AnalyticsErrorEvent.js +2 -0
- package/dist/es-legacy/core/Analytics/events/AnalyticsErrorEvent.js.map +1 -0
- package/dist/es-legacy/core/Analytics/events/AnalyticsInfoEvent.js +2 -0
- package/dist/es-legacy/core/Analytics/events/AnalyticsInfoEvent.js.map +1 -0
- package/dist/es-legacy/core/Analytics/events/AnalyticsLogEvent.js +2 -0
- package/dist/es-legacy/core/Analytics/events/AnalyticsLogEvent.js.map +1 -0
- package/dist/es-legacy/core/Analytics/utils.js +1 -1
- package/dist/es-legacy/core/Analytics/utils.js.map +1 -1
- package/dist/es-legacy/core/Context/CoreProvider.js +1 -1
- package/dist/es-legacy/core/Context/CoreProvider.js.map +1 -1
- package/dist/es-legacy/core/ProcessResponse/PaymentAction/actionTypes.js.map +1 -1
- package/dist/es-legacy/core/ProcessResponse/PaymentMethods/PaymentMethods.js +1 -1
- package/dist/es-legacy/core/ProcessResponse/PaymentMethods/PaymentMethods.js.map +1 -1
- package/dist/es-legacy/core/ProcessResponse/PaymentMethods/utils.js +1 -1
- package/dist/es-legacy/core/ProcessResponse/PaymentMethods/utils.js.map +1 -1
- package/dist/es-legacy/core/ProcessResponse/{process-response.js → PaymentStatus/PaymentStatus.js} +2 -2
- package/dist/es-legacy/core/ProcessResponse/PaymentStatus/PaymentStatus.js.map +1 -0
- package/dist/es-legacy/core/Services/http.js +1 -1
- package/dist/es-legacy/core/Services/http.js.map +1 -1
- package/dist/es-legacy/core/Services/payment-status.js.map +1 -1
- package/dist/es-legacy/core/config.js +1 -1
- package/dist/es-legacy/core/core.js +1 -1
- package/dist/es-legacy/core/core.js.map +1 -1
- package/dist/es-legacy/external/preact/compat/dist/compat.js +1 -1
- package/dist/es-legacy/external/preact/compat/dist/compat.js.map +1 -1
- package/dist/es-legacy/hooks/usePaymentStatusTimer/constants.js +2 -0
- package/dist/es-legacy/hooks/usePaymentStatusTimer/constants.js.map +1 -0
- package/dist/es-legacy/hooks/usePaymentStatusTimer/usePaymentStatusTimer.js +2 -0
- package/dist/es-legacy/hooks/usePaymentStatusTimer/usePaymentStatusTimer.js.map +1 -0
- package/dist/es-legacy/utils/Script.js +1 -1
- package/dist/es-legacy/utils/Script.js.map +1 -1
- package/dist/es-legacy/utils/amount-util.js.map +1 -1
- package/dist/es-legacy/utils/commonUtils.js +1 -1
- package/dist/es-legacy/utils/commonUtils.js.map +1 -1
- package/dist/es-legacy/utils/getErrorMessage.js +1 -1
- package/dist/es-legacy/utils/getErrorMessage.js.map +1 -1
- package/dist/es-legacy/utils/urls.js +2 -0
- package/dist/es-legacy/utils/urls.js.map +1 -0
- package/package.json +22 -24
- package/styles/adyen.css +14 -11
- package/dist/es/components/Card/components/CardInput/components/DualBrandingIcon/DualBrandingIcon.js +0 -2
- package/dist/es/components/Card/components/CardInput/components/DualBrandingIcon/DualBrandingIcon.js.map +0 -1
- package/dist/es/components/Dropin/components/utils.js +0 -2
- package/dist/es/components/Dropin/components/utils.js.map +0 -1
- package/dist/es/core/Analytics/AnalyticsErrorEvent.js +0 -2
- package/dist/es/core/Analytics/AnalyticsErrorEvent.js.map +0 -1
- package/dist/es/core/Analytics/AnalyticsEvent.js +0 -2
- package/dist/es/core/Analytics/AnalyticsEvent.js.map +0 -1
- package/dist/es/core/Analytics/AnalyticsInfoEvent.js +0 -2
- package/dist/es/core/Analytics/AnalyticsInfoEvent.js.map +0 -1
- package/dist/es/core/Analytics/AnalyticsLogEvent.js +0 -2
- package/dist/es/core/Analytics/AnalyticsLogEvent.js.map +0 -1
- package/dist/es/core/Analytics/EventsQueue.js +0 -2
- package/dist/es/core/Analytics/EventsQueue.js.map +0 -1
- package/dist/es/core/ProcessResponse/process-response.js.map +0 -1
- package/dist/es/core/Services/analytics/collect-id.js +0 -2
- package/dist/es/core/Services/analytics/collect-id.js.map +0 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/DualBrandingIcon/DualBrandingIcon.js +0 -2
- package/dist/es-legacy/components/Card/components/CardInput/components/DualBrandingIcon/DualBrandingIcon.js.map +0 -1
- package/dist/es-legacy/components/Dropin/components/utils.js +0 -2
- package/dist/es-legacy/components/Dropin/components/utils.js.map +0 -1
- package/dist/es-legacy/core/Analytics/AnalyticsErrorEvent.js +0 -2
- package/dist/es-legacy/core/Analytics/AnalyticsErrorEvent.js.map +0 -1
- package/dist/es-legacy/core/Analytics/AnalyticsEvent.js +0 -2
- package/dist/es-legacy/core/Analytics/AnalyticsEvent.js.map +0 -1
- package/dist/es-legacy/core/Analytics/AnalyticsInfoEvent.js +0 -2
- package/dist/es-legacy/core/Analytics/AnalyticsInfoEvent.js.map +0 -1
- package/dist/es-legacy/core/Analytics/AnalyticsLogEvent.js +0 -2
- package/dist/es-legacy/core/Analytics/AnalyticsLogEvent.js.map +0 -1
- package/dist/es-legacy/core/Analytics/EventsQueue.js +0 -2
- package/dist/es-legacy/core/Analytics/EventsQueue.js.map +0 -1
- package/dist/es-legacy/core/ProcessResponse/process-response.js.map +0 -1
- package/dist/es-legacy/core/Services/analytics/collect-id.js +0 -2
- package/dist/es-legacy/core/Services/analytics/collect-id.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{filterAllowedPaymentMethods as e,filterRemovedPaymentMethods as t,filterSupportedStoredPaymentMethods as r,filterEcomStoredPaymentMethods as o}from"./filters.js";function
|
|
1
|
+
import{filterAllowedPaymentMethods as e,filterRemovedPaymentMethods as t,filterSupportedStoredPaymentMethods as r,filterEcomStoredPaymentMethods as o}from"./filters.js";import n from"../../../utils/uuid.js";function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){s(e,t,r[t])})}return e}function a(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}const p=e=>a(i({},e),{storedPaymentMethodId:e.id,isStoredPaymentMethod:!0});function c(e){return a(i({},e),{_id:n()})}const l=(r,{allowPaymentMethods:o=[],removePaymentMethods:n=[]})=>r?r.filter(e,o).filter(t,n).map(c):[],d=(n,{allowPaymentMethods:s=[],removePaymentMethods:i=[]})=>n?n.filter(r).filter(e,s).filter(t,i).filter(o).map(p):[],u=e=>{var t,r;if("string"==typeof e)throw new Error('paymentMethodsResponse was provided but of an incorrect type (should be an object but a string was provided).Try JSON.parse("{...}") your paymentMethodsResponse.');if(e instanceof Array)throw new Error("paymentMethodsResponse was provided but of an incorrect type (should be an object but an array was provided).Please check you are passing the whole response.");!e||(null==e||null===(t=e.paymentMethods)||void 0===t?void 0:t.length)||(null==e||null===(r=e.storedPaymentMethods)||void 0===r?void 0:r.length)||console.warn("paymentMethodsResponse was provided but no payment methods were found.")};export{u as checkPaymentMethodsResponse,l as processPaymentMethods,d as processStoredPaymentMethods};
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../../src/core/ProcessResponse/PaymentMethods/utils.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../src/core/ProcessResponse/PaymentMethods/utils.ts"],"sourcesContent":["import { RawPaymentMethod, PaymentMethodsResponse, RawStoredPaymentMethod } from '../../../types/global-types';\nimport {\n filterAllowedPaymentMethods,\n filterEcomStoredPaymentMethods,\n filterRemovedPaymentMethods,\n filterSupportedStoredPaymentMethods\n} from './filters';\nimport uuidv4 from '../../../utils/uuid';\nimport type { PaymentMethod } from './PaymentMethods';\n\nconst processStoredPaymentMethod = (pm): RawStoredPaymentMethod => ({\n ...pm,\n storedPaymentMethodId: pm.id,\n isStoredPaymentMethod: true\n});\n\n/**\n * Generate unique ID per payment method. Useful to fetch the correct payment method properties from the response\n * @param paymentMethod\n */\nfunction generatePaymentMethodId(paymentMethod: RawPaymentMethod): PaymentMethod {\n return {\n ...paymentMethod,\n _id: uuidv4()\n };\n}\n\nexport const processPaymentMethods = (\n paymentMethods: RawPaymentMethod[],\n { allowPaymentMethods = [], removePaymentMethods = [] }\n): PaymentMethod[] => {\n if (!paymentMethods) return [];\n\n return paymentMethods\n .filter(filterAllowedPaymentMethods, allowPaymentMethods)\n .filter(filterRemovedPaymentMethods, removePaymentMethods)\n .map(generatePaymentMethodId);\n};\n\nexport const processStoredPaymentMethods = (\n storedPaymentMethods: RawStoredPaymentMethod[],\n { allowPaymentMethods = [], removePaymentMethods = [] }\n): RawStoredPaymentMethod[] => {\n if (!storedPaymentMethods) return [];\n\n return storedPaymentMethods\n .filter(filterSupportedStoredPaymentMethods) // only display supported stored payment methods\n .filter(filterAllowedPaymentMethods, allowPaymentMethods)\n .filter(filterRemovedPaymentMethods, removePaymentMethods)\n .filter(filterEcomStoredPaymentMethods) // Only accept Ecommerce shopper interactions\n .map(processStoredPaymentMethod);\n};\n\nexport const checkPaymentMethodsResponse = (paymentMethodsResponse: PaymentMethodsResponse) => {\n if (typeof paymentMethodsResponse === 'string') {\n throw new Error(\n 'paymentMethodsResponse was provided but of an incorrect type (should be an object but a string was provided).' +\n 'Try JSON.parse(\"{...}\") your paymentMethodsResponse.'\n );\n }\n\n if (paymentMethodsResponse instanceof Array) {\n throw new Error(\n 'paymentMethodsResponse was provided but of an incorrect type (should be an object but an array was provided).' +\n 'Please check you are passing the whole response.'\n );\n }\n\n if (paymentMethodsResponse && !paymentMethodsResponse?.paymentMethods?.length && !paymentMethodsResponse?.storedPaymentMethods?.length) {\n console.warn('paymentMethodsResponse was provided but no payment methods were found.');\n }\n};\n"],"names":["processStoredPaymentMethod","pm","_object_spread_props","_object_spread","storedPaymentMethodId","id","isStoredPaymentMethod","generatePaymentMethodId","paymentMethod","_id","uuidv4","processPaymentMethods","paymentMethods","allowPaymentMethods","removePaymentMethods","filter","filterAllowedPaymentMethods","filterRemovedPaymentMethods","map","processStoredPaymentMethods","storedPaymentMethods","filterSupportedStoredPaymentMethods","filterEcomStoredPaymentMethods","checkPaymentMethodsResponse","paymentMethodsResponse","Error","Array","length","console","warn"],"mappings":"w/BAUA,MAAMA,EAA8BC,GAAgCC,EAAAC,EAAA,CAAA,EAC7DF,GAAAA,CACHG,sBAAuBH,EAAGI,GAC1BC,uBAAuB,IAO3B,SAASC,EAAwBC,GAC7B,OAAON,EAAAC,EAAA,CAAA,EACAK,GAAAA,CACHC,IAAKC,KAEb,CAEO,MAAMC,EAAwB,CACjCC,GACEC,sBAAsB,GAAIC,uBAAuB,MAE9CF,EAEEA,EACFG,OAAOC,EAA6BH,GACpCE,OAAOE,EAA6BH,GACpCI,IAAIX,GALmB,GAQnBY,EAA8B,CACvCC,GACEP,sBAAsB,GAAIC,uBAAuB,MAE9CM,EAEEA,EACFL,OAAOM,GACPN,OAAOC,EAA6BH,GACpCE,OAAOE,EAA6BH,GACpCC,OAAOO,GACPJ,IAAIlB,GAPyB,GAUzBuB,EAA+BC,QAeTA,EAAmDA,EAdlF,GAAsC,iBAA3BA,EACP,MAAM,IAAIC,MACN,qKAKR,GAAID,aAAkCE,MAClC,MAAM,IAAID,MACN,kKAKJD,IAA2BA,SAAsC,QAAtCA,EAAAA,EAAwBZ,sBAAxBY,IAAAA,OAAAA,EAAAA,EAAwCG,UAAWH,SAA4C,QAA5CA,EAAAA,EAAwBJ,4BAAxBI,IAAAA,SAAAA,EAA8CG,SAC5HC,QAAQC,KAAK"}
|
package/dist/es-legacy/core/ProcessResponse/{process-response.js → PaymentStatus/PaymentStatus.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function e(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function r(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){e(r,t,n[t])})}return r}function t(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}const n=e=>{switch(e.resultCode.toLowerCase()){case"refused":case"error":case"cancelled":return{type:"error",props:t(r({},e),{message:"error.subtitle.refused"})};case"unknown":return{type:"error",props:t(r({},e),{message:"error.message.unknown"})};case"pending":case"received":return{type:e.resultCode.toLowerCase(),props:e};default:return{type:"success",props:e}}},o=e=>{if(!e.type&&e.resultCode)return n(e);if(!e.type)return{type:"error",props:e};switch(e.type.toLowerCase()){case"pending":return{type:"pending",props:e};case"complete":return n(e);default:return{type:"error",props:e}}};export{o as
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
function e(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function r(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){e(r,t,n[t])})}return r}function t(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}const n=e=>{switch(e.resultCode.toLowerCase()){case"refused":case"error":case"cancelled":return{type:"error",props:t(r({},e),{message:"error.subtitle.refused"})};case"unknown":return{type:"error",props:t(r({},e),{message:"error.message.unknown"})};case"pending":case"received":return{type:e.resultCode.toLowerCase(),props:e};default:return{type:"success",props:e}}},o=e=>{if(!e.type&&e.resultCode)return n(e);if(!e.type)return{type:"error",props:e};switch(e.type.toLowerCase()){case"pending":return{type:"pending",props:e};case"complete":return n(e);default:return{type:"error",props:e}}};export{o as processPaymentStatusResponse};
|
|
2
|
+
//# sourceMappingURL=PaymentStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentStatus.js","sources":["../../../../../src/core/ProcessResponse/PaymentStatus/PaymentStatus.ts"],"sourcesContent":["import { ProcessedPaymentStatusResponse, RawPaymentStatusResponse } from '../../../types/global-types';\n\n/**\n * Processes a complete response from Adyen by resultCode\n * @param response - to be processed\n * @returns a new object describing the response result (ready for onStatusChange)\n */\nconst processPaymentStatusCompleteResponse = (response: RawPaymentStatusResponse): ProcessedPaymentStatusResponse => {\n switch (response.resultCode.toLowerCase()) {\n case 'refused':\n case 'error':\n case 'cancelled':\n return { type: 'error', props: { ...response, message: 'error.subtitle.refused' } };\n case 'unknown':\n return { type: 'error', props: { ...response, message: 'error.message.unknown' } };\n case 'pending':\n case 'received':\n return { type: response.resultCode.toLowerCase(), props: response };\n case 'authorised':\n return { type: 'success', props: response };\n default:\n return { type: 'success', props: response };\n }\n};\n\n/**\n * Processes a response from Adyen by type\n * @param response - to be processed\n * @returns a new object describing the response result (ready for onStatusChange)\n */\nexport const processPaymentStatusResponse = (response: RawPaymentStatusResponse): ProcessedPaymentStatusResponse => {\n if (!response.type && response.resultCode) {\n return processPaymentStatusCompleteResponse(response);\n }\n\n if (!response.type) {\n return { type: 'error', props: response };\n }\n\n switch (response.type.toLowerCase()) {\n case 'pending':\n return { type: 'pending', props: response };\n case 'complete':\n return processPaymentStatusCompleteResponse(response);\n case 'validation':\n return { type: 'error', props: response };\n default:\n return { type: 'error', props: response };\n }\n};\n"],"names":["processPaymentStatusCompleteResponse","response","resultCode","toLowerCase","type","props","_object_spread_props","_object_spread","message","processPaymentStatusResponse"],"mappings":"yyBAOA,MAAMA,EAAwCC,IAC1C,OAAQA,EAASC,WAAWC,eACxB,IAAK,UACL,IAAK,QACL,IAAK,YACD,MAAO,CAAEC,KAAM,QAASC,MAAOC,EAAAC,EAAA,CAAA,EAAKN,GAAAA,CAAUO,QAAS,4BAC3D,IAAK,UACD,MAAO,CAAEJ,KAAM,QAASC,MAAOC,EAAAC,EAAA,CAAA,EAAKN,GAAAA,CAAUO,QAAS,2BAC3D,IAAK,UACL,IAAK,WACD,MAAO,CAAEJ,KAAMH,EAASC,WAAWC,cAAeE,MAAOJ,GAG7D,QACI,MAAO,CAAEG,KAAM,UAAWC,MAAOJ,KAShCQ,EAAgCR,IACzC,IAAKA,EAASG,MAAQH,EAASC,WAC3B,OAAOF,EAAqCC,GAGhD,IAAKA,EAASG,KACV,MAAO,CAAEA,KAAM,QAASC,MAAOJ,GAGnC,OAAQA,EAASG,KAAKD,eAClB,IAAK,UACD,MAAO,CAAEC,KAAM,UAAWC,MAAOJ,GACrC,IAAK,WACD,OAAOD,EAAqCC,GAGhD,QACI,MAAO,CAAEG,KAAM,QAASC,MAAOJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{FALLBACK_CONTEXT as e,DEFAULT_HTTP_TIMEOUT as r}from"../config.js";import t from"../Errors/AdyenCheckoutError.js";function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function n(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){o(e,r,t[r])})}return e}function c(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}function a(o,c){var a,s;const{headers:l=[],errorLevel:u="warn",errorCode:f,loadingContext:d=e,method:p="GET",path:b,timeout:O=r}=o,g=n({method:p,mode:"cors",cache:"default",credentials:"same-origin",headers:n({Accept:"application/json, text/plain, */*","Content-Type":"POST"===p?"application/json":"text/plain"},l),redirect:"follow",referrerPolicy:"no-referrer-when-downgrade"},(null===(a=AbortSignal)||void 0===a?void 0:a.timeout)&&{signal:null===(s=AbortSignal)||void 0===s?void 0:s.timeout(O)},c&&{body:JSON.stringify(c)}),m=`${d}${b}`;return fetch(m,g).then(async e=>{const r=await e.json();if(e.ok)return r;if(function(e){return e&&e.errorCode&&e.errorType&&e.message&&e.status}(r))return void i({message:r.message,level:u,cause:r,code:f});i({message:o.errorMessage||`Service at ${m} is not available`,level:u,cause:r,code:f})}).catch(e=>{if(e instanceof t)throw e;i({message:o.errorMessage||`Call to ${m} failed. Error= ${e}`,level:u,cause:e,code:f})})}function i({message:e,level:r,cause:o,code:n}){switch(r){case"silent":break;case"info":case"warn":case"error":console[r](e);break;default:throw new t("NETWORK_ERROR",e,{cause:o,code:n})}}function s(e,r){return a(c(n({},e),{method:"GET"}),r)}function l(e,r){return a(c(n({},e),{method:"POST"}),r)}export{a as http,s as httpGet,l as httpPost};
|
|
1
|
+
import{FALLBACK_CONTEXT as e,DEFAULT_HTTP_TIMEOUT as r}from"../config.js";import t from"../Errors/AdyenCheckoutError.js";function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function n(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){o(e,r,t[r])})}return e}function c(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}function a(o,c){var a,s;const{headers:l=[],errorLevel:u="warn",errorCode:f,loadingContext:d=e,method:p="GET",path:b,timeout:O=r}=o,g=n({method:p,mode:"cors",cache:"default",credentials:"same-origin",headers:n({Accept:"application/json, text/plain, */*","Content-Type":"POST"===p?"application/json":"text/plain"},l),redirect:"follow",referrerPolicy:"no-referrer-when-downgrade"},(null===(a=AbortSignal)||void 0===a?void 0:a.timeout)&&{signal:null===(s=AbortSignal)||void 0===s?void 0:s.timeout(O)},c&&{body:JSON.stringify(c)}),m=`${d}${b}`;return fetch(m,g).then(async e=>{if(204===e.status)return;const r=await e.json();if(e.ok)return r;if(function(e){return e&&e.errorCode&&e.errorType&&e.message&&e.status}(r))return void i({message:r.message,level:u,cause:r,code:f});i({message:o.errorMessage||`Service at ${m} is not available`,level:u,cause:r,code:f})}).catch(e=>{if(e instanceof t)throw e;i({message:o.errorMessage||`Call to ${m} failed. Error= ${e}`,level:u,cause:e,code:f})})}function i({message:e,level:r,cause:o,code:n}){switch(r){case"silent":break;case"info":case"warn":case"error":console[r](e);break;default:throw new t("NETWORK_ERROR",e,{cause:o,code:n})}}function s(e,r){return a(c(n({},e),{method:"GET"}),r)}function l(e,r){return a(c(n({},e),{method:"POST"}),r)}export{a as http,s as httpGet,l as httpPost};
|
|
2
2
|
//# sourceMappingURL=http.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sources":["../../../../src/core/Services/http.ts"],"sourcesContent":["import { DEFAULT_HTTP_TIMEOUT, FALLBACK_CONTEXT } from '../config';\nimport AdyenCheckoutError from '../Errors/AdyenCheckoutError';\n\nexport interface HttpOptions {\n accept?: string;\n contentType?: string;\n headers?;\n loadingContext?: string;\n method?: string;\n path: string;\n timeout?: number;\n errorLevel?: ErrorLevel;\n errorMessage?: string;\n errorCode?: string;\n}\n\ninterface FetchErrorOptions {\n message?: string;\n level?: ErrorLevel;\n cause?: unknown;\n code?: string;\n}\n\ntype ErrorLevel = 'silent' | 'info' | 'warn' | 'error' | 'fatal';\n\ntype AdyenApiErrorResponse = {\n errorCode: string;\n message: string;\n errorType: string;\n status: number;\n};\n\nfunction isAdyenApiErrorResponse(data: any): data is AdyenApiErrorResponse {\n return data && data.errorCode && data.errorType && data.message && data.status;\n}\n\nexport function http<T>(options: HttpOptions,
|
|
1
|
+
{"version":3,"file":"http.js","sources":["../../../../src/core/Services/http.ts"],"sourcesContent":["import { DEFAULT_HTTP_TIMEOUT, FALLBACK_CONTEXT } from '../config';\nimport AdyenCheckoutError from '../Errors/AdyenCheckoutError';\n\nexport interface HttpOptions {\n accept?: string;\n contentType?: string;\n headers?;\n loadingContext?: string;\n method?: string;\n path: string;\n timeout?: number;\n errorLevel?: ErrorLevel;\n errorMessage?: string;\n errorCode?: string;\n}\n\ninterface FetchErrorOptions {\n message?: string;\n level?: ErrorLevel;\n cause?: unknown;\n code?: string;\n}\n\ntype ErrorLevel = 'silent' | 'info' | 'warn' | 'error' | 'fatal';\n\ntype AdyenApiErrorResponse = {\n errorCode: string;\n message: string;\n errorType: string;\n status: number;\n};\n\nfunction isAdyenApiErrorResponse(data: any): data is AdyenApiErrorResponse {\n return data && data.errorCode && data.errorType && data.message && data.status;\n}\n\nexport function http<T>(options: HttpOptions, payload?: any): Promise<T> {\n const {\n headers = [],\n errorLevel = 'warn',\n errorCode,\n loadingContext = FALLBACK_CONTEXT,\n method = 'GET',\n path,\n timeout = DEFAULT_HTTP_TIMEOUT\n } = options;\n\n const request: RequestInit = {\n method,\n mode: 'cors',\n cache: 'default',\n credentials: 'same-origin',\n headers: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': method === 'POST' ? 'application/json' : 'text/plain',\n ...headers\n },\n redirect: 'follow',\n referrerPolicy: 'no-referrer-when-downgrade',\n ...(AbortSignal?.timeout && { signal: AbortSignal?.timeout(timeout) }),\n ...(payload && { body: JSON.stringify(payload) })\n };\n\n const url = `${loadingContext}${path}`;\n\n return (\n fetch(url, request)\n .then(async response => {\n // Handle empty responses (e.g., 204 No Content)\n if (response.status === 204) {\n return;\n }\n\n const data = await response.json();\n\n if (response.ok) {\n return data;\n }\n\n if (isAdyenApiErrorResponse(data)) {\n handleFetchError({ message: data.message, level: errorLevel, cause: data, code: errorCode });\n return;\n }\n\n const errorMessage = options.errorMessage || `Service at ${url} is not available`;\n handleFetchError({ message: errorMessage, level: errorLevel, cause: data, code: errorCode });\n return;\n })\n /**\n * Catch block handles Network error, CORS error, or exception throw by the `handleFetchError`\n * inside the `then` block\n */\n .catch((error: unknown) => {\n /**\n * If error is instance of AdyenCheckoutError, which means that it was already\n * handled by the `handleFetchError` on the `then` block, then we just throw it.\n * There is no need to create it again\n */\n if (error instanceof AdyenCheckoutError) {\n throw error;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-base-to-string,@typescript-eslint/restrict-template-expressions\n const errorMessage = options.errorMessage || `Call to ${url} failed. Error= ${error}`;\n handleFetchError({ message: errorMessage, level: errorLevel, cause: error, code: errorCode });\n })\n );\n}\n\nfunction handleFetchError({ message, level, cause, code }: FetchErrorOptions): void {\n switch (level) {\n case 'silent': {\n break;\n }\n case 'info':\n case 'warn':\n case 'error': {\n console[level](message);\n break;\n }\n default:\n throw new AdyenCheckoutError('NETWORK_ERROR', message, { cause, code });\n }\n}\n\nexport function httpGet<T = any>(options: HttpOptions, data?: any): Promise<T> {\n return http<T>({ ...options, method: 'GET' }, data);\n}\n\nexport function httpPost<T = any>(options: HttpOptions, data?: any): Promise<T> {\n return http<T>({ ...options, method: 'POST' }, data);\n}\n"],"names":["http","options","payload","AbortSignal","headers","errorLevel","errorCode","loadingContext","FALLBACK_CONTEXT","method","path","timeout","DEFAULT_HTTP_TIMEOUT","request","_object_spread","mode","cache","credentials","Accept","redirect","referrerPolicy","signal","body","JSON","stringify","url","fetch","then","async","response","status","data","json","ok","errorType","message","isAdyenApiErrorResponse","handleFetchError","level","cause","code","errorMessage","catch","error","AdyenCheckoutError","console","httpGet","_object_spread_props","httpPost"],"mappings":"k6BAoCO,SAASA,EAAQC,EAAsBC,OAuBlCC,EAAkCA,EAtB1C,MAAMC,QACFA,EAAU,GAAEC,WACZA,EAAa,OAAMC,UACnBA,EAASC,eACTA,EAAiBC,EAAgBC,OACjCA,EAAS,MAAKC,KACdA,EAAIC,QACJA,EAAUC,GACVX,EAEEY,EAAuBC,EAAA,CACzBL,SACAM,KAAM,OACNC,MAAO,UACPC,YAAa,cACbb,QAASU,EAAA,CACLI,OAAQ,oCACR,eAA2B,SAAXT,EAAoB,mBAAqB,cACtDL,GAEPe,SAAU,SACVC,eAAgB,+BACZjB,QAAAA,EAAAA,mBAAAA,IAAAA,OAAAA,EAAA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A,CAASQ,OAAQ,SAAUsB,EACnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-status.js","sources":["../../../../src/core/Services/payment-status.ts"],"sourcesContent":["import { httpPost } from './http';\n\n/**\n * Calls the payment status endpoint\n * @param paymentData -\n * @param clientKey -\n * @param loadingContext -\n * @param timeout - in milliseconds\n * @returns a promise containing the response of the call\n */\nexport default function checkPaymentStatus(paymentData, clientKey, loadingContext, timeout) {\n if (!paymentData || !clientKey) {\n throw new Error('Could not check the payment status');\n }\n\n const options = {\n loadingContext,\n path: `services/PaymentInitiation/v1/status?clientKey=${clientKey}`,\n timeout\n };\n\n return httpPost(options, { paymentData });\n}\n"],"names":["checkPaymentStatus","paymentData","clientKey","loadingContext","timeout","Error","httpPost","path"],"mappings":"
|
|
1
|
+
{"version":3,"file":"payment-status.js","sources":["../../../../src/core/Services/payment-status.ts"],"sourcesContent":["import { RawPaymentStatusResponse } from '../../types';\nimport { httpPost } from './http';\n\n/**\n * Calls the payment status endpoint\n * @param paymentData -\n * @param clientKey -\n * @param loadingContext -\n * @param timeout - in milliseconds\n * @returns a promise containing the response of the call\n */\nexport default function checkPaymentStatus(paymentData, clientKey, loadingContext, timeout): Promise<RawPaymentStatusResponse> {\n if (!paymentData || !clientKey) {\n throw new Error('Could not check the payment status');\n }\n\n const options = {\n loadingContext,\n path: `services/PaymentInitiation/v1/status?clientKey=${clientKey}`,\n timeout\n };\n\n return httpPost(options, { paymentData });\n}\n"],"names":["checkPaymentStatus","paymentData","clientKey","loadingContext","timeout","Error","httpPost","path"],"mappings":"qCAWe,SAASA,EAAmBC,EAAaC,EAAWC,EAAgBC,GAC/E,IAAKH,IAAgBC,EACjB,MAAM,IAAIG,MAAM,sCASpB,OAAOC,EANS,CACZH,iBACAI,KAAM,kDAAkDL,IACxDE,WAGqB,CAAEH,eAC/B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e="https://checkoutshopper-live.adyen.com/checkoutshopper/",n="6.
|
|
1
|
+
const e="https://checkoutshopper-live.adyen.com/checkoutshopper/",n="6.26.0",o="eslegacy",t=["amount","secondaryAmount","countryCode","environment","_environmentUrls","loadingContext","i18n","modules","order","session","clientKey","showPayButton","redirectFromTopWhenInIframe","onPaymentCompleted","onPaymentFailed","beforeRedirect","beforeSubmit","onSubmit","onActionHandled","onAdditionalDetails","onChange","onEnterKeyPressed","onError","onBalanceCheck","onOrderCancel","onOrderRequest","onOrderUpdated","onPaymentMethodsRequest"],r=6e4;export{r as DEFAULT_HTTP_TIMEOUT,e as FALLBACK_CONTEXT,t as GENERIC_OPTIONS,o as LIBRARY_BUNDLE_TYPE,n as LIBRARY_VERSION};
|
|
2
2
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Language as t}from"../language/Language.js";import
|
|
1
|
+
import{Language as t}from"../language/Language.js";import e from"./RiskModule/RiskModule.js";import o from"./ProcessResponse/PaymentMethods/PaymentMethods.js";import{getComponentForAction as s}from"./ProcessResponse/PaymentAction/PaymentAction.js";import i from"./Analytics/Analytics.js";import{processGlobalOptions as n,assertConfigurationPropertiesAreValid as r}from"./utils.js";import a from"./CheckoutSession/CheckoutSession.js";import{hasOwnProperty as l}from"../utils/hasOwnProperty.js";import{Resources as c}from"./Context/Resources.js";import{SRPanel as h}from"./Errors/SRPanel.js";import p from"./core.registry.js";import{sanitizeResponse as d,verifyPaymentDidNotFail as m,cleanupFinalResult as u}from"../components/internal/UIElement/utils.js";import y,{IMPLEMENTATION_ERROR as f}from"./Errors/AdyenCheckoutError.js";import{THREEDS2_FULL as v}from"../components/ThreeDS2/constants.js";import{DEFAULT_LOCALE as g}from"../language/constants.js";import b from"./Services/get-translations.js";import{defaultProps as w}from"./core.defaultProps.js";import{formatLocale as j,formatCustomTranslations as C}from"../language/utils.js";import{resolveEnvironments as O}from"./Environment/Environment.js";import{LIBRARY_BUNDLE_TYPE as A,LIBRARY_VERSION as P}from"./config.js";import{AnalyticsLogEvent as E,LogEventType as M}from"./Analytics/events/AnalyticsLogEvent.js";import T from"./Errors/CancelError.js";import{AnalyticsService as x}from"./Analytics/AnalyticsService.js";import{AnalyticsEventQueue as R}from"./Analytics/AnalyticsEventQueue.js";function k(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function D(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},s=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),s.forEach(function(e){k(t,e,o[e])})}return t}function I(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e.push.apply(e,o)}return e}(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))}),t}function S(t,e){if(null==t)return{};var o,s,i=function(t,e){if(null==t)return{};var o,s,i={},n=Object.keys(t);for(s=0;s<n.length;s++)o=n[s],e.indexOf(o)>=0||(i[o]=t[o]);return i}(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(s=0;s<n.length;s++)o=n[s],e.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(t,o)&&(i[o]=t[o])}return i}class U{static setBundleType(t){U.metadata.bundleType=t}static register(...t){p.add(...t)}register(...t){p.add(...t)}getComponent(t){return p.getComponent(t)}async initialize(){return await this.initializeCore(),this.validateCoreConfiguration(),await this.createCoreModules(),await this.requestAnalyticsAttemptId(),this}async initializeCore(){return this.session?this.session.setupSession(this.options).then(t=>{const{amount:e,shopperLocale:o,countryCode:s,paymentMethods:i}=t,n=S(t,["amount","shopperLocale","countryCode","paymentMethods"]);return this.setOptions(I(D({},n),{amount:this.options.order?this.options.order.remainingAmount:e,locale:this.options.locale||o,countryCode:this.options.countryCode||s})),this.createPaymentMethodsList(i),this}).catch(t=>(this.options.onError&&this.options.onError(t),Promise.reject(t))):(this.createPaymentMethodsList(),Promise.resolve(this))}async fetchLocaleTranslations(){try{return await b(this.cdnTranslationsUrl,U.metadata.version,this.options.locale)}catch(i){var t,e,o,s;i instanceof y?null===(t=(e=this.options).onError)||void 0===t||t.call(e,i):null===(o=(s=this.options).onError)||void 0===o||o.call(s,new y("ERROR","Failed to fetch translation",{cause:i}))}}validateCoreConfiguration(){if(this.options.paymentMethodsConfiguration&&console.warn('WARNING: "paymentMethodsConfiguration" is supported only by Drop-in.'),!this.options.countryCode)throw new y(f,"You must specify a countryCode when initializing checkout.");this.options.locale||this.setOptions({locale:g}),this.options.locale=j(this.options.locale),this.options.translations=C(this.options.translations)}submitDetails(t){let e=null;var o,s;(this.options.onAdditionalDetails&&(e=new Promise((e,o)=>{this.options.onAdditionalDetails({data:t},void 0,{resolve:e,reject:o})})),this.session&&(e=this.session.submitDetails(t).catch(t=>{var e,o;return null===(e=(o=this.options).onError)||void 0===e||e.call(o,t),Promise.reject(t)})),e)?e.then(d).then(m).then(this.afterAdditionalDetails).then(t=>{var e,o;u(t),null===(e=(o=this.options).onPaymentCompleted)||void 0===e||e.call(o,t)}).catch(t=>{var e,o;t instanceof T||(u(t),null===(e=(o=this.options).onPaymentFailed)||void 0===e||e.call(o,t))}):null===(o=(s=this.options).onError)||void 0===o||o.call(s,new y("IMPLEMENTATION_ERROR",'It can not submit the details. The callback "onAdditionalDetails" or the Session is not setup correctly.'))}createFromAction(t,e={}){if(!t||!t.type){if(l(t,"action")&&l(t,"resultCode"))throw new Error('createFromAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?');throw new Error('createFromAction::Invalid Action - the passed action object does not have a "type" property')}if(t.type){const o=t.type===v?`${t.type}${t.subtype}`:t.paymentMethodType,i=new E({type:M.action,subType:E.getSubtypeFromActionType(t.type),message:`${o} action was handled by the SDK`,component:o});this.modules.analytics.sendAnalytics(i);const n=D({},this.getCorePropsForComponent(),e);return s(this,p,t,n)}return this.handleCreateError()}getCorePropsForComponent(){return I(D({},n(this.options)),{core:this,i18n:this.modules.i18n,modules:this.modules,session:this.session,loadingContext:this.loadingContext,cdnContext:this.cdnImagesUrl,createFromAction:this.createFromAction})}storeElementReference(t){t&&this.components.push(t)}handleCreateError(t){var e;const o=null!==(e=null==t?void 0:t.name)&&void 0!==e?e:"The passed payment method",s=t?`${o} is not a valid Checkout Component. What was passed as a txVariant was: ${JSON.stringify(t)}. Check if this payment method is configured in the Backoffice or if the txVariant is a valid one`:"No Payment Method component was passed";throw new Error(s)}createPaymentMethodsList(t){this.paymentMethodsResponse=new o(this.options.paymentMethodsResponse||t,this.options)}async createCoreModules(){var o,s;if(this.modules)return;const n=await this.fetchLocaleTranslations();this.modules=Object.freeze({risk:new e(this,I(D({},this.options),{loadingContext:this.loadingContext})),analytics:new i({eventQueue:new R,service:new x({analyticsContext:this.analyticsContext,clientKey:this.options.clientKey}),enabled:null===(o=this.options.analytics)||void 0===o?void 0:o.enabled,analyticsData:null===(s=this.options.analytics)||void 0===s?void 0:s.analyticsData}),resources:new c(this.cdnImagesUrl),i18n:new t({locale:this.options.locale,translations:n,customTranslations:this.options.translations}),srPanel:new h(this,D({},this.options.srConfig))})}async requestAnalyticsAttemptId(){var t;await this.modules.analytics.setUp(D({locale:this.options.locale},(null===(t=this.session)||void 0===t?void 0:t.id)&&{sessionId:this.session.id}))}constructor(t){var e;k(this,"session",void 0),k(this,"paymentMethodsResponse",void 0),k(this,"modules",void 0),k(this,"options",void 0),k(this,"analyticsContext",void 0),k(this,"loadingContext",void 0),k(this,"cdnImagesUrl",void 0),k(this,"cdnTranslationsUrl",void 0),k(this,"components",[]),k(this,"afterAdditionalDetails",t=>{if(this.options.afterAdditionalDetails&&(null==t?void 0:t.action)){const e=this.createFromAction(t.action);return this.options.afterAdditionalDetails(e),Promise.reject(new T("Handled by afterAdditionalDetails"))}return Promise.resolve(t)}),k(this,"update",(t={})=>(this.setOptions(t),this.initialize().then(()=>(this.components.forEach(e=>{const o=D({},t,this.session&&{session:this.session});e.update(o)}),this)))),k(this,"remove",t=>(this.components=this.components.filter(e=>e._id!==t._id),t.unmount(),this)),k(this,"setOptions",t=>{var e;this.options=I(D({},this.options,t),{locale:(null==t?void 0:t.locale)||(null===(e=this.options)||void 0===e?void 0:e.locale)})}),r(t),this.createFromAction=this.createFromAction.bind(this),this.setOptions(D({},w,t));const{apiUrl:o,analyticsUrl:s,cdnImagesUrl:i,cdnTranslationsUrl:n}=O(this.options.environment,this.options._environmentUrls);this.loadingContext=o,this.analyticsContext=s,this.cdnImagesUrl=i,this.cdnTranslationsUrl=n,this.session=this.options.session&&new a(this.options.session,this.options.clientKey,this.loadingContext);const l=null===(e=this.options.clientKey)||void 0===e?void 0:e.substring(0,4);var c,h;if(("test"===l||"live"===l)&&!this.loadingContext.includes(l))throw new y("IMPLEMENTATION_ERROR",`Error: you are using a ${l} clientKey against the ${(null===(c=this.options._environmentUrls)||void 0===c?void 0:c.api)||this.options.environment} environment`);"pub."===l&&console.debug(`The value you are passing as your "clientKey" looks like an originKey (${null===(h=this.options.clientKey)||void 0===h?void 0:h.substring(0,12)}..). Although this is supported it is not the recommended way to integrate. To generate a clientKey, see the documentation (https://docs.adyen.com/development-resources/client-side-authentication/migrate-from-origin-key-to-client-key/) for more details.`);this.options.exposeLibraryMetadata&&(window.AdyenWebMetadata=U.metadata)}}k(U,"metadata",{version:P,bundleType:A}),k(U,"registry",p);export{U as default};
|
|
2
2
|
//# sourceMappingURL=core.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sources":["../../../src/core/core.ts"],"sourcesContent":["import Language from '../language';\nimport UIElement from '../components/internal/UIElement/UIElement';\nimport RiskModule from './RiskModule';\nimport PaymentMethods from './ProcessResponse/PaymentMethods';\nimport getComponentForAction from './ProcessResponse/PaymentAction';\nimport Analytics from './Analytics';\nimport { assertConfigurationPropertiesAreValid, processGlobalOptions } from './utils';\nimport Session from './CheckoutSession';\nimport { hasOwnProperty } from '../utils/hasOwnProperty';\nimport { Resources } from './Context/Resources';\nimport { SRPanel } from './Errors/SRPanel';\nimport registry, { NewableComponent } from './core.registry';\nimport { cleanupFinalResult, sanitizeResponse, verifyPaymentDidNotFail } from '../components/internal/UIElement/utils';\nimport AdyenCheckoutError, { IMPLEMENTATION_ERROR } from './Errors/AdyenCheckoutError';\nimport { ANALYTICS_ACTION_STR } from './Analytics/constants';\nimport { THREEDS2_FULL } from '../components/ThreeDS2/constants';\nimport { DEFAULT_LOCALE } from '../language/constants';\nimport getTranslations from './Services/get-translations';\nimport { defaultProps } from './core.defaultProps';\nimport { formatCustomTranslations, formatLocale } from '../language/utils';\nimport { resolveEnvironments } from './Environment';\nimport { LIBRARY_BUNDLE_TYPE, LIBRARY_VERSION } from './config';\n\nimport type { PaymentAction, PaymentResponseData } from '../types/global-types';\nimport type { CoreConfiguration, ICore, AdditionalDetailsData, CoreModules } from './types';\nimport type { Translations } from '../language/types';\nimport type { UIElementProps } from '../components/internal/UIElement/types';\nimport { AnalyticsLogEvent } from './Analytics/AnalyticsLogEvent';\nimport CancelError from './Errors/CancelError';\n\nclass Core implements ICore {\n public session?: Session;\n public paymentMethodsResponse: PaymentMethods;\n public modules: CoreModules;\n public options: CoreConfiguration;\n\n public analyticsContext: string;\n public loadingContext: string;\n public cdnImagesUrl: string;\n public cdnTranslationsUrl: string;\n\n private components: UIElement[] = [];\n\n public static readonly metadata = {\n version: LIBRARY_VERSION,\n bundleType: LIBRARY_BUNDLE_TYPE\n };\n\n public static registry = registry;\n\n public static setBundleType(type: string): void {\n Core.metadata.bundleType = type;\n }\n\n public static register(...items: NewableComponent[]) {\n registry.add(...items);\n }\n\n /**\n * Used internally by the PaymentMethod components to auto-register themselves\n * @internal\n */\n public register(...items: NewableComponent[]) {\n registry.add(...items);\n }\n\n public getComponent(txVariant: string) {\n return registry.getComponent(txVariant);\n }\n\n constructor(props: CoreConfiguration) {\n assertConfigurationPropertiesAreValid(props);\n\n this.createFromAction = this.createFromAction.bind(this);\n\n this.setOptions({ ...defaultProps, ...props });\n\n const { apiUrl, analyticsUrl, cdnImagesUrl, cdnTranslationsUrl } = resolveEnvironments(\n this.options.environment,\n this.options._environmentUrls\n );\n\n this.loadingContext = apiUrl;\n this.analyticsContext = analyticsUrl;\n this.cdnImagesUrl = cdnImagesUrl;\n this.cdnTranslationsUrl = cdnTranslationsUrl;\n\n this.session = this.options.session && new Session(this.options.session, this.options.clientKey, this.loadingContext);\n\n const clientKeyType = this.options.clientKey?.substring(0, 4);\n if ((clientKeyType === 'test' || clientKeyType === 'live') && !this.loadingContext.includes(clientKeyType)) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n `Error: you are using a ${clientKeyType} clientKey against the ${this.options._environmentUrls?.api || this.options.environment} environment`\n );\n }\n if (clientKeyType === 'pub.') {\n console.debug(\n `The value you are passing as your \"clientKey\" looks like an originKey (${this.options.clientKey?.substring(0, 12)}..). Although this is supported it is not the recommended way to integrate. To generate a clientKey, see the documentation (https://docs.adyen.com/development-resources/client-side-authentication/migrate-from-origin-key-to-client-key/) for more details.`\n );\n }\n\n if (this.options.exposeLibraryMetadata) {\n window['AdyenWebMetadata'] = Core.metadata;\n }\n }\n\n public async initialize(): Promise<this> {\n await this.initializeCore();\n this.validateCoreConfiguration();\n await this.createCoreModules();\n return this;\n }\n\n private async initializeCore(): Promise<this> {\n if (this.session) {\n return this.session\n .setupSession(this.options)\n .then(sessionResponse => {\n const { amount, shopperLocale, countryCode, paymentMethods, ...rest } = sessionResponse;\n\n this.setOptions({\n ...rest,\n amount: this.options.order ? this.options.order.remainingAmount : amount,\n locale: this.options.locale || shopperLocale,\n countryCode: this.options.countryCode || countryCode\n });\n\n this.createPaymentMethodsList(paymentMethods);\n\n return this;\n })\n .catch(error => {\n if (this.options.onError) this.options.onError(error);\n return Promise.reject(error);\n });\n }\n\n this.createPaymentMethodsList();\n return Promise.resolve(this);\n }\n\n private async fetchLocaleTranslations(): Promise<Translations> {\n try {\n return await getTranslations(this.cdnTranslationsUrl, Core.metadata.version, this.options.locale);\n } catch (error: unknown) {\n if (error instanceof AdyenCheckoutError) this.options.onError?.(error);\n else this.options.onError?.(new AdyenCheckoutError('ERROR', 'Failed to fetch translation', { cause: error }));\n }\n }\n\n private validateCoreConfiguration(): void {\n // @ts-ignore This property does not exist, although merchants might be using when migrating from v5 to v6\n if (this.options.paymentMethodsConfiguration) {\n console.warn('WARNING: \"paymentMethodsConfiguration\" is supported only by Drop-in.');\n }\n\n if (!this.options.countryCode) {\n throw new AdyenCheckoutError(IMPLEMENTATION_ERROR, 'You must specify a countryCode when initializing checkout.');\n }\n\n if (!this.options.locale) {\n this.setOptions({ locale: DEFAULT_LOCALE });\n }\n\n this.options.locale = formatLocale(this.options.locale);\n this.options.translations = formatCustomTranslations(this.options.translations);\n }\n\n /**\n * Method used when handling redirects. It submits details using 'onAdditionalDetails' or the Sessions flow if available.\n *\n * @public\n * @see {https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Components&version=5.55.1#handle-the-redirect}\n * @param details - Details object containing the redirectResult\n */\n public submitDetails(details: AdditionalDetailsData['data']): void {\n let promise = null;\n\n if (this.options.onAdditionalDetails) {\n promise = new Promise((resolve, reject) => {\n this.options.onAdditionalDetails({ data: details }, undefined, { resolve, reject });\n });\n }\n\n if (this.session) {\n promise = this.session.submitDetails(details).catch(error => {\n this.options.onError?.(error);\n return Promise.reject(error);\n });\n }\n\n if (!promise) {\n this.options.onError?.(\n new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n 'It can not submit the details. The callback \"onAdditionalDetails\" or the Session is not setup correctly.'\n )\n );\n return;\n }\n\n promise\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.afterAdditionalDetails)\n .then((response: PaymentResponseData) => {\n cleanupFinalResult(response);\n this.options.onPaymentCompleted?.(response);\n })\n .catch((e: PaymentResponseData | Error) => {\n if (e instanceof CancelError) {\n return;\n }\n\n cleanupFinalResult(e as PaymentResponseData);\n this.options.onPaymentFailed?.(e as PaymentResponseData);\n });\n }\n\n private readonly afterAdditionalDetails = (response: PaymentResponseData): Promise<PaymentResponseData | Error> => {\n /**\n * After the user is redirected back, a request to `/details` or `/paymentDetails` will be made.\n * Typically, the response will not include an action object, except for the case of `paybybank_pix` payment method.\n * In terms of `paybybank_pix`, the action UIElement will be created and passed to the `afterAdditionalDetails` callback, allowing it to be mounted on the page.\n */\n if (this.options.afterAdditionalDetails && response?.action) {\n const actionEle = this.createFromAction(response.action);\n this.options.afterAdditionalDetails(actionEle);\n return Promise.reject(new CancelError('Handled by afterAdditionalDetails'));\n }\n return Promise.resolve(response);\n };\n\n /**\n * Instantiates a new element component ready to be mounted from an action object\n *\n * @param action - action defining the component with the component data\n * @param options - options that will be merged to the global Checkout props\n * @returns new UIElement\n */\n public createFromAction(action: PaymentAction, options = {}): UIElement {\n if (!action || !action.type) {\n if (hasOwnProperty(action, 'action') && hasOwnProperty(action, 'resultCode')) {\n throw new Error(\n 'createFromAction::Invalid Action - the passed action object itself has an \"action\" property and ' +\n 'a \"resultCode\": have you passed in the whole response object by mistake?'\n );\n }\n throw new Error('createFromAction::Invalid Action - the passed action object does not have a \"type\" property');\n }\n\n if (action.type) {\n // 'threeDS2' OR 'qrCode', 'voucher', 'redirect', 'await', 'bankTransfer`\n const component = action.type === THREEDS2_FULL ? `${action.type}${action.subtype}` : action.paymentMethodType;\n\n const event = new AnalyticsLogEvent({\n type: ANALYTICS_ACTION_STR,\n subType: action.type,\n message: `${component} action was handled by the SDK`,\n component\n });\n this.modules.analytics.sendAnalytics(event);\n\n const props = {\n ...this.getCorePropsForComponent(),\n ...options\n };\n\n return getComponentForAction(this, registry, action, props);\n }\n\n return this.handleCreateError();\n }\n\n /**\n * Updates global configurations, resets the internal state and remounts each element.\n *\n * @param options - props to update\n * @returns this - the element instance\n */\n public update = (options: Partial<CoreConfiguration> = {}): Promise<this> => {\n this.setOptions(options);\n\n return this.initialize().then(() => {\n this.components.forEach(component => {\n // We update only with the new options that have been received\n const newProps: Partial<UIElementProps> = {\n ...options,\n ...(this.session && { session: this.session })\n };\n component.update(newProps);\n });\n return this;\n });\n };\n\n /**\n * Remove the reference of a component\n * @param component - reference to the component to be removed\n * @returns this - the element instance\n * // TODO: Do we need this?\n */\n public remove = (component): this => {\n this.components = this.components.filter(c => c._id !== component._id);\n component.unmount();\n\n return this;\n };\n\n /**\n * @internal\n * Create or update the config object passed when AdyenCheckout is initialised (environment, clientKey, etc...)\n */\n private setOptions = (options: CoreConfiguration): void => {\n this.options = {\n ...this.options,\n ...options,\n locale: options?.locale || this.options?.locale\n };\n };\n\n /**\n * @internal\n * @returns props for a new UIElement\n */\n public getCorePropsForComponent(): any {\n const globalOptions = processGlobalOptions(this.options);\n\n return {\n ...globalOptions,\n core: this,\n i18n: this.modules.i18n,\n modules: this.modules,\n session: this.session,\n loadingContext: this.loadingContext,\n cdnContext: this.cdnImagesUrl,\n createFromAction: this.createFromAction\n };\n }\n\n public storeElementReference(element: UIElement) {\n if (element) {\n this.components.push(element);\n }\n }\n\n /**\n * @internal\n */\n private handleCreateError(paymentMethod?): never {\n const paymentMethodName = paymentMethod?.name ?? 'The passed payment method';\n const errorMessage = paymentMethod\n ? `${paymentMethodName} is not a valid Checkout Component. What was passed as a txVariant was: ${JSON.stringify(\n paymentMethod\n )}. Check if this payment method is configured in the Backoffice or if the txVariant is a valid one`\n : 'No Payment Method component was passed';\n\n throw new Error(errorMessage);\n }\n\n private createPaymentMethodsList(paymentMethodsResponse?: PaymentMethods): void {\n this.paymentMethodsResponse = new PaymentMethods(this.options.paymentMethodsResponse || paymentMethodsResponse, this.options);\n }\n\n private async createCoreModules(): Promise<void> {\n if (this.modules) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('Core: Core modules are already created.');\n }\n return;\n }\n\n const translations = await this.fetchLocaleTranslations();\n\n this.modules = Object.freeze({\n risk: new RiskModule(this, { ...this.options, loadingContext: this.loadingContext }),\n analytics: Analytics({\n analyticsContext: this.analyticsContext,\n clientKey: this.options.clientKey,\n locale: this.options.locale,\n analytics: this.options.analytics\n }),\n resources: new Resources(this.cdnImagesUrl),\n i18n: new Language({\n locale: this.options.locale,\n translations,\n customTranslations: this.options.translations\n }),\n srPanel: new SRPanel(this, { ...this.options.srConfig })\n });\n }\n}\n\nexport default Core;\n"],"names":["Core","setBundleType","type","metadata","bundleType","register","items","registry","add","getComponent","txVariant","initialize","this","initializeCore","validateCoreConfiguration","createCoreModules","session","setupSession","options","then","sessionResponse","amount","shopperLocale","countryCode","paymentMethods","rest","setOptions","_object_spread_props","_object_spread","order","remainingAmount","locale","createPaymentMethodsList","catch","error","onError","Promise","reject","resolve","fetchLocaleTranslations","getTranslations","cdnTranslationsUrl","version","_this_options_onError","_this_options","_this_options_onError1","_this_options1","AdyenCheckoutError","call","cause","paymentMethodsConfiguration","console","warn","IMPLEMENTATION_ERROR","DEFAULT_LOCALE","formatLocale","translations","formatCustomTranslations","submitDetails","details","promise","onAdditionalDetails","data","undefined","sanitizeResponse","verifyPaymentDidNotFail","afterAdditionalDetails","response","_this_options_onPaymentCompleted","cleanupFinalResult","onPaymentCompleted","e","_this_options_onPaymentFailed","CancelError","onPaymentFailed","createFromAction","action","hasOwnProperty","Error","component","THREEDS2_FULL","subtype","paymentMethodType","event","AnalyticsLogEvent","ANALYTICS_ACTION_STR","subType","message","modules","analytics","sendAnalytics","props","getCorePropsForComponent","getComponentForAction","handleCreateError","processGlobalOptions","globalOptions","core","i18n","loadingContext","cdnContext","cdnImagesUrl","storeElementReference","element","components","push","paymentMethod","paymentMethodName","name","errorMessage","JSON","stringify","paymentMethodsResponse","PaymentMethods","Object","freeze","risk","RiskModule","Analytics","analyticsContext","clientKey","resources","Resources","Language","customTranslations","srPanel","SRPanel","srConfig","constructor","_this_options_clientKey","_define_property","actionEle","update","forEach","newProps","remove","filter","c","_id","unmount","assertConfigurationPropertiesAreValid","bind","defaultProps","apiUrl","analyticsUrl","resolveEnvironments","environment","_environmentUrls","Session","clientKeyType","substring","_this_options__environmentUrls","_this_options_clientKey1","includes","api","debug","exposeLibraryMetadata","window","LIBRARY_VERSION","LIBRARY_BUNDLE_TYPE"],"mappings":"kkFA8BA,MAAMA,EAoBF,oBAAcC,CAAcC,GACxBF,EAAKG,SAASC,WAAaF,CAC/B,CAEA,eAAcG,IAAYC,GACtBC,EAASC,OAAOF,EACpB,CAMA,QAAAD,IAAmBC,GACfC,EAASC,OAAOF,EACpB,CAEOG,YAAAA,CAAaC,GAChB,OAAOH,EAASE,aAAaC,EACjC,CAuCA,gBAAaC,GAIT,aAHMC,KAAKC,iBACXD,KAAKE,kCACCF,KAAKG,oBACJH,IACX,CAEA,oBAAcC,GACV,OAAID,KAAKI,QACEJ,KAAKI,QACPC,aAAaL,KAAKM,SAClBC,KAAKC,IACF,MAAMC,OAAEA,EAAMC,cAAEA,EAAaC,YAAEA,EAAWC,eAAEA,GAA4BJ,EAATK,EAAAA,EAASL,EAAAA,CAAhEC,SAAQC,gBAAeC,cAAaC,mBAW5C,OATAZ,KAAKc,WAAWC,EAAAC,EAAA,CAAA,EACTH,GAAAA,CACHJ,OAAQT,KAAKM,QAAQW,MAAQjB,KAAKM,QAAQW,MAAMC,gBAAkBT,EAClEU,OAAQnB,KAAKM,QAAQa,QAAUT,EAC/BC,YAAaX,KAAKM,QAAQK,aAAeA,KAG7CX,KAAKoB,yBAAyBR,GAEvBZ,OAEVqB,MAAMC,IACCtB,KAAKM,QAAQiB,SAASvB,KAAKM,QAAQiB,QAAQD,GACxCE,QAAQC,OAAOH,MAIlCtB,KAAKoB,2BACEI,QAAQE,QAAQ1B,MAC3B,CAEA,6BAAc2B,GACV,IACI,aAAaC,EAAgB5B,KAAK6B,mBAAoBzC,EAAKG,SAASuC,QAAS9B,KAAKM,QAAQa,OAC9F,CAAE,MAAOG,GACoC,IAAAS,EAAA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uF,gBAEtG,MAAMkD,EAAsC,QAAtBpB,EAAArH,KAAKM,QAAQsG,iBAAb,IAAAS,OAAA,EAAAA,EAAwBqB,UAAU,EAAG,GAIc,IAAAC,EAKSC,EARlF,IAAuB,SAAlBH,GAA8C,SAAlBA,KAA8BzI,KAAKuF,eAAesD,SAASJ,GACxF,MAAM,IAAItG,EACN,uBACA,0BAA0BsG,4BAAoE,QAA7BE,EAAA3I,KAAKM,QAAQiI,wBAAb,IAAAI,OAAA,EAAAA,EAA+BG,MAAO9I,KAAKM,QAAQgI,2BAGtG,SAAlBG,GACAlG,QAAQwG,MACJ,0EAAgG,QAAtBH,EAAA5I,KAAKM,QAAQsG,qBAAbgC,SAAAA,EAAwBF,UAAU,EAAG,oQAInH1I,KAAKM,QAAQ0I,wBACbC,OAAO,iBAAsB7J,EAAKG,SAE1C,EA9DA+H,EAbElI,EAaqBG,WAAW,CAC9BuC,QAASoH,EACT1J,WAAY2J,IAGhB7B,EAlBElI,EAkBYO,WAAWA"}
|
|
1
|
+
{"version":3,"file":"core.js","sources":["../../../src/core/core.ts"],"sourcesContent":["import Language from '../language';\nimport UIElement from '../components/internal/UIElement/UIElement';\nimport RiskModule from './RiskModule';\nimport PaymentMethods from './ProcessResponse/PaymentMethods';\nimport getComponentForAction from './ProcessResponse/PaymentAction';\nimport Analytics from './Analytics';\nimport { assertConfigurationPropertiesAreValid, processGlobalOptions } from './utils';\nimport Session from './CheckoutSession';\nimport { hasOwnProperty } from '../utils/hasOwnProperty';\nimport { Resources } from './Context/Resources';\nimport { SRPanel } from './Errors/SRPanel';\nimport registry, { NewableComponent } from './core.registry';\nimport { cleanupFinalResult, sanitizeResponse, verifyPaymentDidNotFail } from '../components/internal/UIElement/utils';\nimport AdyenCheckoutError, { IMPLEMENTATION_ERROR } from './Errors/AdyenCheckoutError';\nimport { THREEDS2_FULL } from '../components/ThreeDS2/constants';\nimport { DEFAULT_LOCALE } from '../language/constants';\nimport getTranslations from './Services/get-translations';\nimport { defaultProps } from './core.defaultProps';\nimport { formatCustomTranslations, formatLocale } from '../language/utils';\nimport { resolveEnvironments } from './Environment';\nimport { LIBRARY_BUNDLE_TYPE, LIBRARY_VERSION } from './config';\n\nimport type { PaymentAction, PaymentResponseData } from '../types/global-types';\nimport type { CoreConfiguration, ICore, AdditionalDetailsData, CoreModules } from './types';\nimport type { Translations } from '../language/types';\nimport type { UIElementProps } from '../components/internal/UIElement/types';\nimport { AnalyticsLogEvent, LogEventType } from './Analytics/events/AnalyticsLogEvent';\nimport CancelError from './Errors/CancelError';\nimport { AnalyticsService } from './Analytics/AnalyticsService';\nimport { AnalyticsEventQueue } from './Analytics/AnalyticsEventQueue';\n\nclass Core implements ICore {\n public session?: Session;\n public paymentMethodsResponse: PaymentMethods;\n public modules: CoreModules;\n public options: CoreConfiguration;\n\n public analyticsContext: string;\n public loadingContext: string;\n public cdnImagesUrl: string;\n public cdnTranslationsUrl: string;\n\n private components: UIElement[] = [];\n\n public static readonly metadata = {\n version: LIBRARY_VERSION,\n bundleType: LIBRARY_BUNDLE_TYPE\n };\n\n public static registry = registry;\n\n public static setBundleType(type: string): void {\n Core.metadata.bundleType = type;\n }\n\n public static register(...items: NewableComponent[]) {\n registry.add(...items);\n }\n\n /**\n * Used internally by the PaymentMethod components to auto-register themselves\n * @internal\n */\n public register(...items: NewableComponent[]) {\n registry.add(...items);\n }\n\n public getComponent(txVariant: string) {\n return registry.getComponent(txVariant);\n }\n\n constructor(props: CoreConfiguration) {\n assertConfigurationPropertiesAreValid(props);\n\n this.createFromAction = this.createFromAction.bind(this);\n\n this.setOptions({ ...defaultProps, ...props });\n\n const { apiUrl, analyticsUrl, cdnImagesUrl, cdnTranslationsUrl } = resolveEnvironments(\n this.options.environment,\n this.options._environmentUrls\n );\n\n this.loadingContext = apiUrl;\n this.analyticsContext = analyticsUrl;\n this.cdnImagesUrl = cdnImagesUrl;\n this.cdnTranslationsUrl = cdnTranslationsUrl;\n\n this.session = this.options.session && new Session(this.options.session, this.options.clientKey, this.loadingContext);\n\n const clientKeyType = this.options.clientKey?.substring(0, 4);\n if ((clientKeyType === 'test' || clientKeyType === 'live') && !this.loadingContext.includes(clientKeyType)) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n `Error: you are using a ${clientKeyType} clientKey against the ${this.options._environmentUrls?.api || this.options.environment} environment`\n );\n }\n if (clientKeyType === 'pub.') {\n console.debug(\n `The value you are passing as your \"clientKey\" looks like an originKey (${this.options.clientKey?.substring(0, 12)}..). Although this is supported it is not the recommended way to integrate. To generate a clientKey, see the documentation (https://docs.adyen.com/development-resources/client-side-authentication/migrate-from-origin-key-to-client-key/) for more details.`\n );\n }\n\n if (this.options.exposeLibraryMetadata) {\n window['AdyenWebMetadata'] = Core.metadata;\n }\n }\n\n public async initialize(): Promise<this> {\n await this.initializeCore();\n this.validateCoreConfiguration();\n await this.createCoreModules();\n await this.requestAnalyticsAttemptId();\n return this;\n }\n\n private async initializeCore(): Promise<this> {\n if (this.session) {\n return this.session\n .setupSession(this.options)\n .then(sessionResponse => {\n const { amount, shopperLocale, countryCode, paymentMethods, ...rest } = sessionResponse;\n\n this.setOptions({\n ...rest,\n amount: this.options.order ? this.options.order.remainingAmount : amount,\n locale: this.options.locale || shopperLocale,\n countryCode: this.options.countryCode || countryCode\n });\n\n this.createPaymentMethodsList(paymentMethods);\n\n return this;\n })\n .catch(error => {\n if (this.options.onError) this.options.onError(error);\n return Promise.reject(error);\n });\n }\n\n this.createPaymentMethodsList();\n return Promise.resolve(this);\n }\n\n private async fetchLocaleTranslations(): Promise<Translations> {\n try {\n return await getTranslations(this.cdnTranslationsUrl, Core.metadata.version, this.options.locale);\n } catch (error: unknown) {\n if (error instanceof AdyenCheckoutError) this.options.onError?.(error);\n else this.options.onError?.(new AdyenCheckoutError('ERROR', 'Failed to fetch translation', { cause: error }));\n }\n }\n\n private validateCoreConfiguration(): void {\n // @ts-ignore This property does not exist, although merchants might be using when migrating from v5 to v6\n if (this.options.paymentMethodsConfiguration) {\n console.warn('WARNING: \"paymentMethodsConfiguration\" is supported only by Drop-in.');\n }\n\n if (!this.options.countryCode) {\n throw new AdyenCheckoutError(IMPLEMENTATION_ERROR, 'You must specify a countryCode when initializing checkout.');\n }\n\n if (!this.options.locale) {\n this.setOptions({ locale: DEFAULT_LOCALE });\n }\n\n this.options.locale = formatLocale(this.options.locale);\n this.options.translations = formatCustomTranslations(this.options.translations);\n }\n\n /**\n * Method used when handling redirects. It submits details using 'onAdditionalDetails' or the Sessions flow if available.\n *\n * @public\n * @see {https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Components&version=5.55.1#handle-the-redirect}\n * @param details - Details object containing the redirectResult\n */\n public submitDetails(details: AdditionalDetailsData['data']): void {\n let promise = null;\n\n if (this.options.onAdditionalDetails) {\n promise = new Promise((resolve, reject) => {\n this.options.onAdditionalDetails({ data: details }, undefined, { resolve, reject });\n });\n }\n\n if (this.session) {\n promise = this.session.submitDetails(details).catch(error => {\n this.options.onError?.(error);\n return Promise.reject(error);\n });\n }\n\n if (!promise) {\n this.options.onError?.(\n new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n 'It can not submit the details. The callback \"onAdditionalDetails\" or the Session is not setup correctly.'\n )\n );\n return;\n }\n\n promise\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.afterAdditionalDetails)\n .then((response: PaymentResponseData) => {\n cleanupFinalResult(response);\n this.options.onPaymentCompleted?.(response);\n })\n .catch((e: PaymentResponseData | Error) => {\n if (e instanceof CancelError) {\n return;\n }\n\n cleanupFinalResult(e as PaymentResponseData);\n this.options.onPaymentFailed?.(e as PaymentResponseData);\n });\n }\n\n private readonly afterAdditionalDetails = (response: PaymentResponseData): Promise<PaymentResponseData | Error> => {\n /**\n * After the user is redirected back, a request to `/details` or `/paymentDetails` will be made.\n * Typically, the response will not include an action object, except for the case of `paybybank_pix` payment method.\n * In terms of `paybybank_pix`, the action UIElement will be created and passed to the `afterAdditionalDetails` callback, allowing it to be mounted on the page.\n */\n if (this.options.afterAdditionalDetails && response?.action) {\n const actionEle = this.createFromAction(response.action);\n this.options.afterAdditionalDetails(actionEle);\n return Promise.reject(new CancelError('Handled by afterAdditionalDetails'));\n }\n return Promise.resolve(response);\n };\n\n /**\n * Instantiates a new element component ready to be mounted from an action object\n *\n * @param action - action defining the component with the component data\n * @param options - options that will be merged to the global Checkout props\n * @returns new UIElement\n */\n public createFromAction(action: PaymentAction, options = {}): UIElement {\n if (!action || !action.type) {\n if (hasOwnProperty(action, 'action') && hasOwnProperty(action, 'resultCode')) {\n throw new Error(\n 'createFromAction::Invalid Action - the passed action object itself has an \"action\" property and ' +\n 'a \"resultCode\": have you passed in the whole response object by mistake?'\n );\n }\n throw new Error('createFromAction::Invalid Action - the passed action object does not have a \"type\" property');\n }\n\n if (action.type) {\n // 'threeDS2' OR 'qrCode', 'voucher', 'redirect', 'await', 'bankTransfer`\n const component = action.type === THREEDS2_FULL ? `${action.type}${action.subtype}` : action.paymentMethodType;\n\n const event = new AnalyticsLogEvent({\n type: LogEventType.action,\n subType: AnalyticsLogEvent.getSubtypeFromActionType(action.type),\n message: `${component} action was handled by the SDK`,\n component\n });\n this.modules.analytics.sendAnalytics(event);\n\n const props = {\n ...this.getCorePropsForComponent(),\n ...options\n };\n\n return getComponentForAction(this, registry, action, props);\n }\n\n return this.handleCreateError();\n }\n\n /**\n * Updates global configurations, resets the internal state and remounts each element.\n *\n * @param options - props to update\n * @returns this - the element instance\n */\n public update = (options: Partial<CoreConfiguration> = {}): Promise<this> => {\n this.setOptions(options);\n\n return this.initialize().then(() => {\n this.components.forEach(component => {\n // We update only with the new options that have been received\n const newProps: Partial<UIElementProps> = {\n ...options,\n ...(this.session && { session: this.session })\n };\n component.update(newProps);\n });\n return this;\n });\n };\n\n /**\n * Remove the reference of a component\n * @param component - reference to the component to be removed\n * @returns this - the element instance\n * // TODO: Do we need this?\n */\n public remove = (component): this => {\n this.components = this.components.filter(c => c._id !== component._id);\n component.unmount();\n\n return this;\n };\n\n /**\n * @internal\n * Create or update the config object passed when AdyenCheckout is initialised (environment, clientKey, etc...)\n */\n private setOptions = (options: CoreConfiguration): void => {\n this.options = {\n ...this.options,\n ...options,\n locale: options?.locale || this.options?.locale\n };\n };\n\n /**\n * @internal\n * @returns props for a new UIElement\n */\n public getCorePropsForComponent(): any {\n const globalOptions = processGlobalOptions(this.options);\n\n return {\n ...globalOptions,\n core: this,\n i18n: this.modules.i18n,\n modules: this.modules,\n session: this.session,\n loadingContext: this.loadingContext,\n cdnContext: this.cdnImagesUrl,\n createFromAction: this.createFromAction\n };\n }\n\n public storeElementReference(element: UIElement) {\n if (element) {\n this.components.push(element);\n }\n }\n\n /**\n * @internal\n */\n private handleCreateError(paymentMethod?): never {\n const paymentMethodName = paymentMethod?.name ?? 'The passed payment method';\n const errorMessage = paymentMethod\n ? `${paymentMethodName} is not a valid Checkout Component. What was passed as a txVariant was: ${JSON.stringify(\n paymentMethod\n )}. Check if this payment method is configured in the Backoffice or if the txVariant is a valid one`\n : 'No Payment Method component was passed';\n\n throw new Error(errorMessage);\n }\n\n private createPaymentMethodsList(paymentMethodsResponse?: PaymentMethods): void {\n this.paymentMethodsResponse = new PaymentMethods(this.options.paymentMethodsResponse || paymentMethodsResponse, this.options);\n }\n\n private async createCoreModules(): Promise<void> {\n if (this.modules) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('Core: Core modules are already created.');\n }\n return;\n }\n\n const translations = await this.fetchLocaleTranslations();\n\n this.modules = Object.freeze({\n risk: new RiskModule(this, { ...this.options, loadingContext: this.loadingContext }),\n analytics: new Analytics({\n eventQueue: new AnalyticsEventQueue(),\n service: new AnalyticsService({\n analyticsContext: this.analyticsContext,\n clientKey: this.options.clientKey\n }),\n enabled: this.options.analytics?.enabled,\n analyticsData: this.options.analytics?.analyticsData\n }),\n resources: new Resources(this.cdnImagesUrl),\n i18n: new Language({\n locale: this.options.locale,\n translations,\n customTranslations: this.options.translations\n }),\n srPanel: new SRPanel(this, { ...this.options.srConfig })\n });\n }\n\n private async requestAnalyticsAttemptId(): Promise<void> {\n await this.modules.analytics.setUp({\n locale: this.options.locale,\n ...(this.session?.id && { sessionId: this.session.id })\n });\n }\n}\n\nexport default Core;\n"],"names":["Core","setBundleType","type","metadata","bundleType","register","items","registry","add","getComponent","txVariant","initialize","this","initializeCore","validateCoreConfiguration","createCoreModules","requestAnalyticsAttemptId","session","setupSession","options","then","sessionResponse","amount","shopperLocale","countryCode","paymentMethods","rest","setOptions","_object_spread_props","_object_spread","order","remainingAmount","locale","createPaymentMethodsList","catch","error","onError","Promise","reject","resolve","fetchLocaleTranslations","getTranslations","cdnTranslationsUrl","version","_this_options_onError","_this_options","_this_options_onError1","_this_options1","AdyenCheckoutError","call","cause","paymentMethodsConfiguration","console","warn","IMPLEMENTATION_ERROR","DEFAULT_LOCALE","formatLocale","translations","formatCustomTranslations","submitDetails","details","promise","onAdditionalDetails","data","undefined","sanitizeResponse","verifyPaymentDidNotFail","afterAdditionalDetails","response","_this_options_onPaymentCompleted","cleanupFinalResult","onPaymentCompleted","e","_this_options_onPaymentFailed","CancelError","onPaymentFailed","createFromAction","action","hasOwnProperty","Error","component","THREEDS2_FULL","subtype","paymentMethodType","event","AnalyticsLogEvent","LogEventType","subType","getSubtypeFromActionType","message","modules","analytics","sendAnalytics","props","getCorePropsForComponent","getComponentForAction","handleCreateError","processGlobalOptions","globalOptions","core","i18n","loadingContext","cdnContext","cdnImagesUrl","storeElementReference","element","components","push","paymentMethod","paymentMethodName","name","errorMessage","JSON","stringify","paymentMethodsResponse","PaymentMethods","_this_options_analytics","_this_options_analytics1","Object","freeze","risk","RiskModule","Analytics","eventQueue","AnalyticsEventQueue","service","AnalyticsService","analyticsContext","clientKey","enabled","analyticsData","resources","Resources","Language","customTranslations","srPanel","SRPanel","srConfig","_this_session","setUp","id","sessionId","constructor","_this_options_clientKey","_define_property","actionEle","update","forEach","newProps","remove","filter","c","_id","unmount","assertConfigurationPropertiesAreValid","bind","defaultProps","apiUrl","analyticsUrl","resolveEnvironments","environment","_environmentUrls","Session","clientKeyType","substring","_this_options__environmentUrls","_this_options_clientKey1","includes","api","debug","exposeLibraryMetadata","window","LIBRARY_VERSION","LIBRARY_BUNDLE_TYPE"],"mappings":"uqFA+BA,MAAMA,EAoBF,oBAAcC,CAAcC,GACxBF,EAAKG,SAASC,WAAaF,CAC/B,CAEA,eAAcG,IAAYC,GACtBC,EAASC,OAAOF,EACpB,CAMA,QAAAD,IAAmBC,GACfC,EAASC,OAAOF,EACpB,CAEOG,YAAAA,CAAaC,GAChB,OAAOH,EAASE,aAAaC,EACjC,CAuCA,gBAAaC,GAKT,aAJMC,KAAKC,iBACXD,KAAKE,kCACCF,KAAKG,0BACLH,KAAKI,4BACJJ,IACX,CAEA,oBAAcC,GACV,OAAID,KAAKK,QACEL,KAAKK,QACPC,aAAaN,KAAKO,SAClBC,KAAKC,IACF,MAAMC,OAAEA,EAAMC,cAAEA,EAAaC,YAAEA,EAAWC,eAAEA,GAA4BJ,EAATK,EAAAA,EAASL,EAAAA,CAAhEC,SAAQC,gBAAeC,cAAaC,mBAW5C,OATAb,KAAKe,WAAWC,EAAAC,EAAA,CAAA,EACTH,GAAAA,CACHJ,OAAQV,KAAKO,QAAQW,MAAQlB,KAAKO,QAAQW,MAAMC,gBAAkBT,EAClEU,OAAQpB,KAAKO,QAAQa,QAAUT,EAC/BC,YAAaZ,KAAKO,QAAQK,aAAeA,KAG7CZ,KAAKqB,yBAAyBR,GAEvBb,OAEVsB,MAAMC,IACCvB,KAAKO,QAAQiB,SAASxB,KAAKO,QAAQiB,QAAQD,GACxCE,QAAQC,OAAOH,MAIlCvB,KAAKqB,2BACEI,QAAQE,QAAQ3B,MAC3B,CAEA,6BAAc4B,GACV,IACI,aAAaC,EAAgB7B,KAAK8B,mBAAoB1C,EAAKG,SAASwC,QAAS/B,KAAKO,QAAQa,OAC9F,CAAE,MAAOG,GACoC,IAAAS,EAAAC,EACpCC,EAAAC,EADDZ,aA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AAWE,EAAA,CAAA,EAAK+H,EAAiB/D,IAEtC,MAAMgE,OAAEA,EAAMC,aAAEA,EAAYvD,aAAEA,EAAY7D,mBAAEA,GAAuBqH,EAC/DnJ,KAAKO,QAAQ6I,YACbpJ,KAAKO,QAAQ8I,kBAGjBrJ,KAAKyF,eAAiBwD,EACtBjJ,KAAKmH,iBAAmB+B,EACxBlJ,KAAK2F,aAAeA,EACpB3F,KAAK8B,mBAAqBA,EAE1B9B,KAAKK,QAAUL,KAAKO,QAAQF,SAAW,IAAIiJ,EAAQtJ,KAAKO,QAAQF,QAASL,KAAKO,QAAQ6G,UAAWpH,KAAKyF,gBAEtG,MAAM8D,EAAsC,QAAtBpB,EAAAnI,KAAKO,QAAQ6G,iBAAb,IAAAe,OAAA,EAAAA,EAAwBqB,UAAU,EAAG,GAIc,IAAAC,EAKSC,EARlF,IAAuB,SAAlBH,GAA8C,SAAlBA,KAA8BvJ,KAAKyF,eAAekE,SAASJ,GACxF,MAAM,IAAInH,EACN,uBACA,0BAA0BmH,4BAAoE,QAA7BE,EAAAzJ,KAAKO,QAAQ8I,wBAAb,IAAAI,OAAA,EAAAA,EAA+BG,MAAO5J,KAAKO,QAAQ6I,2BAGtG,SAAlBG,GACA/G,QAAQqH,MACJ,0EAAgG,QAAtBH,EAAA1J,KAAKO,QAAQ6G,qBAAbsC,SAAAA,EAAwBF,UAAU,EAAG,oQAInHxJ,KAAKO,QAAQuJ,wBACbC,OAAO,iBAAsB3K,EAAKG,SAE1C,EA9DA6I,EAbEhJ,EAaqBG,WAAW,CAC9BwC,QAASiI,EACTxK,WAAYyK,IAGhB7B,EAlBEhJ,EAkBYO,WAAWA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Component as e,options as t,createElement as n,Fragment as o,toChildArray as r,render as i}from"../../dist/preact.js";export{createContext}from"../../dist/preact.js";export{useCallback,useContext,useEffect,useLayoutEffect,useMemo,useReducer,useRef,useState}from"../../hooks/dist/hooks.js";function
|
|
1
|
+
import{Component as e,options as t,createElement as n,Fragment as o,toChildArray as r,render as i}from"../../dist/preact.js";export{createContext}from"../../dist/preact.js";export{useCallback,useContext,useEffect,useLayoutEffect,useMemo,useReducer,useRef,useState}from"../../hooks/dist/hooks.js";function u(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var o in t)if("__source"!==o&&e[o]!==t[o])return!0;return!1}function l(e,t){this.props=e,this.context=t}function _(e,t){function o(e){var n=this.props.ref,o=n==e.ref;return!o&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!o:u(this.props,e)}function r(t){return this.shouldComponentUpdate=o,n(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(l.prototype=new e).isPureReactComponent=!0,l.prototype.shouldComponentUpdate=function(e,t){return u(this.props,e)||u(this.state,t)};var a=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),a&&a(e)};var c=t.__e;t.__e=function(e,t,n,o){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);c(e,t,n,o)};var s=t.unmount;function p(e,t,n){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=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return p(e,t,n)})),e}function f(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return f(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function d(){this.__u=0,this.t=null,this.__b=null}function h(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function v(){this.u=null,this.o=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),s&&s(e)},(d.prototype=new e).__c=function(e,t){var n=t.__c,o=this;null==o.t&&(o.t=[]),o.t.push(n);var r=h(o.__v),i=!1,u=function(){i||(i=!0,n.__R=null,r?r(l):l())};n.__R=u;var l=function(){if(! --o.__u){if(o.state.__a){var e=o.state.__a;o.__v.__k[0]=f(e,e.__c.__P,e.__c.__O)}var t;for(o.setState({__a:o.__b=null});t=o.t.pop();)t.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(u,u)},d.prototype.componentWillUnmount=function(){this.t=[]},d.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=p(this.__b,r,i.__O=i.__P)}this.__b=null}var u=t.__a&&n(o,null,e.fallback);return u&&(u.__u&=-33),[n(o,null,t.__a?null:e.children),u]};var m=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function y(e){return this.getChildContext=function(){return e.context},e.children}function b(e){var t=this,o=e.i;t.componentWillUnmount=function(){i(null,t.l),t.l=null,t.i=null},t.i&&t.i!==o&&t.componentWillUnmount(),t.l||(t.i=o,t.l={nodeType:1,parentNode:o,childNodes:[],contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),i(n(y,{context:t.context},e.__v),t.l)}function C(e,t){var o=n(b,{__v:e,i:t});return o.containerInfo=t,o}(v.prototype=new e).__a=function(e){var t=this,n=h(t.__v),o=t.o.get(e);return o[0]++,function(r){var i=function(){t.props.revealOrder?(o.push(r),m(t,e,o)):r()};n?n(i):i()}},v.prototype.render=function(e){this.u=null,this.o=new Map;var t=r(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},v.prototype.componentDidUpdate=v.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){m(e,n,t)})};var k="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,g=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|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]/,x=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,P=/[A-Z0-9]/g,N="undefined"!=typeof document,O=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};e.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(e.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var S=t.event;function E(){}function R(){return this.cancelBubble}function U(){return this.defaultPrevented}t.event=function(e){return S&&(e=S(e)),e.persist=E,e.isPropagationStopped=R,e.isDefaultPrevented=U,e.nativeEvent=e};var w={enumerable:!1,configurable:!0,get:function(){return this.class}},A=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,o={};for(var i in t){var u=t[i];if(!("value"===i&&"defaultValue"in t&&null==u||N&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===u?u="":"translate"===l&&"no"===u?u=!1:"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||O(t.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":x.test(i)?i=l:-1===n.indexOf("-")&&g.test(i)?i=i.replace(P,"-$&").toLowerCase():null===u&&(u=void 0):l=i="oninput","oninput"===l&&o[i=l]&&(i="oninputCapture"),o[i]=u}}"select"==n&&o.multiple&&Array.isArray(o.value)&&(o.value=r(t.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),"select"==n&&null!=o.defaultValue&&(o.value=r(t.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value})),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",w)):(t.className&&!t.class||t.class&&t.className)&&(o.class=o.className=t.className),e.props=o}(e),e.$$typeof=k,A&&A(e)};var W=t.__r;t.__r=function(e){W&&W(e),e.__c};var j=t.diffed;t.diffed=function(e){j&&j(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};export{e as Component,o as Fragment,l as PureComponent,d as Suspense,v as SuspenseList,n as createElement,C as createPortal,_ as memo};
|
|
2
2
|
//# sourceMappingURL=compat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","sources":["../../../../../../../../node_modules/preact/compat/dist/compat.mjs"],"sourcesContent":["import{Component as n,createElement as t,options as e,toChildArray as r,Fragment as u,render as o,hydrate as i,createContext as c,createRef as l,cloneElement as f}from\"preact\";export{Component,Fragment,createContext,createElement,createRef}from\"preact\";import{useCallback as a,useContext as s,useDebugValue as h,useEffect as v,useId as d,useImperativeHandle as p,useLayoutEffect as m,useMemo as y,useReducer as _,useRef as b,useState as S}from\"preact/hooks\";export*from\"preact/hooks\";function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function C(n,t){this.props=n,this.context=t}function x(n,e){function r(n){var t=this.props.ref,r=t==n.ref;return!r&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!r:E(this.props,n)}function u(e){return this.shouldComponentUpdate=r,t(n,e)}return u.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",u.prototype.isReactComponent=!0,u.__f=!0,u}(C.prototype=new n).isPureReactComponent=!0,C.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var R=e.__b;e.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n)};var w=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function k(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=w,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var I=function(n,t){return null==n?null:r(r(n).map(t))},N={map:I,forEach:I,count:function(n){return n?r(n).length:0},only:function(n){var t=r(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:r},M=e.__e;e.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);M(n,t,e,r)};var T=e.unmount;function A(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){\"function\"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return A(n,t,e)})),n}function D(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return D(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function L(){this.__u=0,this.t=null,this.__b=null}function O(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function F(n){var e,r,u;function o(o){if(e||(e=n()).then(function(n){r=n.default||n},function(n){u=n}),u)throw u;if(!r)throw e;return t(r,o)}return o.displayName=\"Lazy\",o.__f=!0,o}function U(){this.u=null,this.o=null}e.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),T&&T(n)},(L.prototype=new n).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=O(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(c):c())};e.__R=i;var c=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=D(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},L.prototype.componentWillUnmount=function(){this.t=[]},L.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement(\"div\"),o=this.__v.__k[0].__c;this.__v.__k[0]=A(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&t(u,null,n.fallback);return i&&(i.__u&=-33),[t(u,null,e.__a?null:n.children),i]};var V=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2]}};function W(n){return this.getChildContext=function(){return n.context},n.children}function P(n){var e=this,r=n.i;e.componentWillUnmount=function(){o(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],contains:function(){return!0},appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),o(t(W,{context:e.context},n.__v),e.l)}function j(n,e){var r=t(P,{__v:n,i:e});return r.containerInfo=e,r}(U.prototype=new n).__a=function(n){var t=this,e=O(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),V(t,n,r)):u()};e?e(o):o()}},U.prototype.render=function(n){this.u=null,this.o=new Map;var t=r(n.children);n.revealOrder&&\"b\"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},U.prototype.componentDidUpdate=U.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){V(n,e,t)})};var z=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,B=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|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]/,H=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Z=/[A-Z0-9]/g,Y=\"undefined\"!=typeof document,$=function(n){return(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function q(n,t,e){return null==t.__k&&(t.textContent=\"\"),o(n,t),\"function\"==typeof e&&e(),n?n.__c:null}function G(n,t,e){return i(n,t),\"function\"==typeof e&&e(),n?n.__c:null}n.prototype.isReactComponent={},[\"componentWillMount\",\"componentWillReceiveProps\",\"componentWillUpdate\"].forEach(function(t){Object.defineProperty(n.prototype,t,{configurable:!0,get:function(){return this[\"UNSAFE_\"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var J=e.event;function K(){}function Q(){return this.cancelBubble}function X(){return this.defaultPrevented}e.event=function(n){return J&&(n=J(n)),n.persist=K,n.isPropagationStopped=Q,n.isDefaultPrevented=X,n.nativeEvent=n};var nn,tn={enumerable:!1,configurable:!0,get:function(){return this.class}},en=e.vnode;e.vnode=function(n){\"string\"==typeof n.type&&function(n){var t=n.props,e=n.type,u={};for(var o in t){var i=t[o];if(!(\"value\"===o&&\"defaultValue\"in t&&null==i||Y&&\"children\"===o&&\"noscript\"===e||\"class\"===o||\"className\"===o)){var c=o.toLowerCase();\"defaultValue\"===o&&\"value\"in t&&null==t.value?o=\"value\":\"download\"===o&&!0===i?i=\"\":\"translate\"===c&&\"no\"===i?i=!1:\"ondoubleclick\"===c?o=\"ondblclick\":\"onchange\"!==c||\"input\"!==e&&\"textarea\"!==e||$(t.type)?\"onfocus\"===c?o=\"onfocusin\":\"onblur\"===c?o=\"onfocusout\":H.test(o)?o=c:-1===e.indexOf(\"-\")&&B.test(o)?o=o.replace(Z,\"-$&\").toLowerCase():null===i&&(i=void 0):c=o=\"oninput\",\"oninput\"===c&&u[o=c]&&(o=\"oninputCapture\"),u[o]=i}}\"select\"==e&&u.multiple&&Array.isArray(u.value)&&(u.value=r(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),\"select\"==e&&null!=u.defaultValue&&(u.value=r(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value})),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,\"className\",tn)):(t.className&&!t.class||t.class&&t.className)&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=z,en&&en(n)};var rn=e.__r;e.__r=function(n){rn&&rn(n),nn=n.__c};var un=e.diffed;e.diffed=function(n){un&&un(n);var t=n.props,e=n.__e;null!=e&&\"textarea\"===n.type&&\"value\"in t&&t.value!==e.value&&(e.value=null==t.value?\"\":t.value),nn=null};var on={ReactCurrentDispatcher:{current:{readContext:function(n){return nn.__n[n.__c].props.value},useCallback:a,useContext:s,useDebugValue:h,useDeferredValue:bn,useEffect:v,useId:d,useImperativeHandle:p,useInsertionEffect:gn,useLayoutEffect:m,useMemo:y,useReducer:_,useRef:b,useState:S,useSyncExternalStore:Cn,useTransition:Sn}}},cn=\"17.0.2\";function ln(n){return t.bind(null,n)}function fn(n){return!!n&&n.$$typeof===z}function an(n){return fn(n)&&n.type===u}function sn(n){return!!n&&!!n.displayName&&(\"string\"==typeof n.displayName||n.displayName instanceof String)&&n.displayName.startsWith(\"Memo(\")}function hn(n){return fn(n)?f.apply(null,arguments):n}function vn(n){return!!n.__k&&(o(null,n),!0)}function dn(n){return n&&(n.base||1===n.nodeType&&n)||null}var pn=function(n,t){return n(t)},mn=function(n,t){return n(t)},yn=u;function _n(n){n()}function bn(n){return n}function Sn(){return[!1,_n]}var gn=m,En=fn;function Cn(n,t){var e=t(),r=S({h:{__:e,v:t}}),u=r[0].h,o=r[1];return m(function(){u.__=e,u.v=t,xn(u)&&o({h:u})},[n,e,t]),v(function(){return xn(u)&&o({h:u}),n(function(){xn(u)&&o({h:u})})},[n]),e}function xn(n){var t,e,r=n.v,u=n.__;try{var o=r();return!((t=u)===(e=o)&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}}var Rn={useState:S,useId:d,useReducer:_,useEffect:v,useLayoutEffect:m,useInsertionEffect:gn,useTransition:Sn,useDeferredValue:bn,useSyncExternalStore:Cn,startTransition:_n,useRef:b,useImperativeHandle:p,useMemo:y,useCallback:a,useContext:s,useDebugValue:h,version:\"17.0.2\",Children:N,render:q,hydrate:G,unmountComponentAtNode:vn,createPortal:j,createElement:t,createContext:c,createFactory:ln,cloneElement:hn,createRef:l,Fragment:u,isValidElement:fn,isElement:En,isFragment:an,isMemo:sn,findDOMNode:dn,Component:n,PureComponent:C,memo:x,forwardRef:k,flushSync:mn,unstable_batchedUpdates:pn,StrictMode:yn,Suspense:L,SuspenseList:U,lazy:F,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:on};export{N as Children,C as PureComponent,yn as StrictMode,L as Suspense,U as SuspenseList,on as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hn as cloneElement,ln as createFactory,j as createPortal,Rn as default,dn as findDOMNode,mn as flushSync,k as forwardRef,G as hydrate,En as isElement,an as isFragment,sn as isMemo,fn as isValidElement,F as lazy,x as memo,q as render,_n as startTransition,vn as unmountComponentAtNode,pn as unstable_batchedUpdates,bn as useDeferredValue,gn as useInsertionEffect,Cn as useSyncExternalStore,Sn as useTransition,cn as version};\n//# sourceMappingURL=compat.module.js.map\n"],"names":["E","n","t","e","r","C","this","props","context","prototype","isPureReactComponent","shouldComponentUpdate","state","R","__b","type","__f","ref","M","__e","then","u","o","__","__c","__k","T","unmount","A","__H","forEach","g","__P","map","D","__v","appendChild","L","__u","O","__a","U","__R","push","i","c","__O","setState","pop","forceUpdate","componentWillUnmount","render","document","createElement","fallback","children","V","delete","revealOrder","size","length","W","getChildContext","P","l","nodeType","parentNode","childNodes","contains","insertBefore","removeChild","splice","indexOf","j","containerInfo","get","Map","reverse","set","componentDidUpdate","componentDidMount","z","Symbol","for","B","H","Z","Y","$","test","isReactComponent","Object","defineProperty","configurable","writable","value","J","event","K","Q","cancelBubble","X","defaultPrevented","persist","isPropagationStopped","isDefaultPrevented","nativeEvent","tn","enumerable","class","en","vnode","toLowerCase","replace","multiple","Array","isArray","selected","defaultValue","className","$$typeof","rn","__r","un","diffed"],"mappings":"wSAAshB,SAASA,EAAEC,EAAEC,GAAG,IAAI,IAAIC,KAAKF,EAAE,GAAG,aAAaE,KAAKA,KAAKD,GAAG,SAAS,IAAI,IAAIE,KAAKF,EAAE,GAAG,aAAaE,GAAGH,EAAEG,KAAKF,EAAEE,GAAG,OAAM,EAAG,OAAM,CAAE,CAAC,SAASC,EAAEJ,EAAEC,GAAGI,KAAKC,MAAMN,EAAEK,KAAKE,QAAQN,CAAC,EAAiTG,EAAEI,UAAU,IAAIR,GAAGS,sBAAqB,EAAGL,EAAEI,UAAUE,sBAAsB,SAASV,EAAEC,GAAG,OAAOF,EAAEM,KAAKC,MAAMN,IAAID,EAAEM,KAAKM,MAAMV,EAAE,EAAE,IAAIW,EAAEV,EAAEW,IAAIX,EAAEW,IAAI,SAASb,GAAGA,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AAM,MAAM7F,EAAE6F,MAAM,GAAG7F,EAAE6F,MAAc","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"compat.js","sources":["../../../../../../../../node_modules/preact/compat/dist/compat.mjs"],"sourcesContent":["import{Component as n,createElement as t,options as e,toChildArray as r,Fragment as u,render as o,hydrate as i,createContext as c,createRef as l,cloneElement as f}from\"preact\";export{Component,Fragment,createContext,createElement,createRef}from\"preact\";import{useCallback as a,useContext as s,useDebugValue as h,useEffect as v,useId as d,useImperativeHandle as p,useLayoutEffect as m,useMemo as y,useReducer as _,useRef as b,useState as S}from\"preact/hooks\";export*from\"preact/hooks\";function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function C(n,t){this.props=n,this.context=t}function x(n,e){function r(n){var t=this.props.ref,r=t==n.ref;return!r&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!r:E(this.props,n)}function u(e){return this.shouldComponentUpdate=r,t(n,e)}return u.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",u.prototype.isReactComponent=!0,u.__f=!0,u}(C.prototype=new n).isPureReactComponent=!0,C.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var R=e.__b;e.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n)};var w=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function k(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=w,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var I=function(n,t){return null==n?null:r(r(n).map(t))},N={map:I,forEach:I,count:function(n){return n?r(n).length:0},only:function(n){var t=r(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:r},M=e.__e;e.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);M(n,t,e,r)};var T=e.unmount;function A(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){\"function\"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return A(n,t,e)})),n}function D(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return D(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function L(){this.__u=0,this.t=null,this.__b=null}function O(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function F(n){var e,r,u;function o(o){if(e||(e=n()).then(function(n){r=n.default||n},function(n){u=n}),u)throw u;if(!r)throw e;return t(r,o)}return o.displayName=\"Lazy\",o.__f=!0,o}function U(){this.u=null,this.o=null}e.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),T&&T(n)},(L.prototype=new n).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=O(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(c):c())};e.__R=i;var c=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=D(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},L.prototype.componentWillUnmount=function(){this.t=[]},L.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement(\"div\"),o=this.__v.__k[0].__c;this.__v.__k[0]=A(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&t(u,null,n.fallback);return i&&(i.__u&=-33),[t(u,null,e.__a?null:n.children),i]};var V=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2]}};function W(n){return this.getChildContext=function(){return n.context},n.children}function P(n){var e=this,r=n.i;e.componentWillUnmount=function(){o(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],contains:function(){return!0},appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),o(t(W,{context:e.context},n.__v),e.l)}function j(n,e){var r=t(P,{__v:n,i:e});return r.containerInfo=e,r}(U.prototype=new n).__a=function(n){var t=this,e=O(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),V(t,n,r)):u()};e?e(o):o()}},U.prototype.render=function(n){this.u=null,this.o=new Map;var t=r(n.children);n.revealOrder&&\"b\"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},U.prototype.componentDidUpdate=U.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){V(n,e,t)})};var z=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,B=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|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]/,H=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Z=/[A-Z0-9]/g,Y=\"undefined\"!=typeof document,$=function(n){return(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function q(n,t,e){return null==t.__k&&(t.textContent=\"\"),o(n,t),\"function\"==typeof e&&e(),n?n.__c:null}function G(n,t,e){return i(n,t),\"function\"==typeof e&&e(),n?n.__c:null}n.prototype.isReactComponent={},[\"componentWillMount\",\"componentWillReceiveProps\",\"componentWillUpdate\"].forEach(function(t){Object.defineProperty(n.prototype,t,{configurable:!0,get:function(){return this[\"UNSAFE_\"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var J=e.event;function K(){}function Q(){return this.cancelBubble}function X(){return this.defaultPrevented}e.event=function(n){return J&&(n=J(n)),n.persist=K,n.isPropagationStopped=Q,n.isDefaultPrevented=X,n.nativeEvent=n};var nn,tn={enumerable:!1,configurable:!0,get:function(){return this.class}},en=e.vnode;e.vnode=function(n){\"string\"==typeof n.type&&function(n){var t=n.props,e=n.type,u={};for(var o in t){var i=t[o];if(!(\"value\"===o&&\"defaultValue\"in t&&null==i||Y&&\"children\"===o&&\"noscript\"===e||\"class\"===o||\"className\"===o)){var c=o.toLowerCase();\"defaultValue\"===o&&\"value\"in t&&null==t.value?o=\"value\":\"download\"===o&&!0===i?i=\"\":\"translate\"===c&&\"no\"===i?i=!1:\"ondoubleclick\"===c?o=\"ondblclick\":\"onchange\"!==c||\"input\"!==e&&\"textarea\"!==e||$(t.type)?\"onfocus\"===c?o=\"onfocusin\":\"onblur\"===c?o=\"onfocusout\":H.test(o)?o=c:-1===e.indexOf(\"-\")&&B.test(o)?o=o.replace(Z,\"-$&\").toLowerCase():null===i&&(i=void 0):c=o=\"oninput\",\"oninput\"===c&&u[o=c]&&(o=\"oninputCapture\"),u[o]=i}}\"select\"==e&&u.multiple&&Array.isArray(u.value)&&(u.value=r(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),\"select\"==e&&null!=u.defaultValue&&(u.value=r(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value})),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,\"className\",tn)):(t.className&&!t.class||t.class&&t.className)&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=z,en&&en(n)};var rn=e.__r;e.__r=function(n){rn&&rn(n),nn=n.__c};var un=e.diffed;e.diffed=function(n){un&&un(n);var t=n.props,e=n.__e;null!=e&&\"textarea\"===n.type&&\"value\"in t&&t.value!==e.value&&(e.value=null==t.value?\"\":t.value),nn=null};var on={ReactCurrentDispatcher:{current:{readContext:function(n){return nn.__n[n.__c].props.value},useCallback:a,useContext:s,useDebugValue:h,useDeferredValue:bn,useEffect:v,useId:d,useImperativeHandle:p,useInsertionEffect:gn,useLayoutEffect:m,useMemo:y,useReducer:_,useRef:b,useState:S,useSyncExternalStore:Cn,useTransition:Sn}}},cn=\"17.0.2\";function ln(n){return t.bind(null,n)}function fn(n){return!!n&&n.$$typeof===z}function an(n){return fn(n)&&n.type===u}function sn(n){return!!n&&!!n.displayName&&(\"string\"==typeof n.displayName||n.displayName instanceof String)&&n.displayName.startsWith(\"Memo(\")}function hn(n){return fn(n)?f.apply(null,arguments):n}function vn(n){return!!n.__k&&(o(null,n),!0)}function dn(n){return n&&(n.base||1===n.nodeType&&n)||null}var pn=function(n,t){return n(t)},mn=function(n,t){return n(t)},yn=u;function _n(n){n()}function bn(n){return n}function Sn(){return[!1,_n]}var gn=m,En=fn;function Cn(n,t){var e=t(),r=S({h:{__:e,v:t}}),u=r[0].h,o=r[1];return m(function(){u.__=e,u.v=t,xn(u)&&o({h:u})},[n,e,t]),v(function(){return xn(u)&&o({h:u}),n(function(){xn(u)&&o({h:u})})},[n]),e}function xn(n){var t,e,r=n.v,u=n.__;try{var o=r();return!((t=u)===(e=o)&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}}var Rn={useState:S,useId:d,useReducer:_,useEffect:v,useLayoutEffect:m,useInsertionEffect:gn,useTransition:Sn,useDeferredValue:bn,useSyncExternalStore:Cn,startTransition:_n,useRef:b,useImperativeHandle:p,useMemo:y,useCallback:a,useContext:s,useDebugValue:h,version:\"17.0.2\",Children:N,render:q,hydrate:G,unmountComponentAtNode:vn,createPortal:j,createElement:t,createContext:c,createFactory:ln,cloneElement:hn,createRef:l,Fragment:u,isValidElement:fn,isElement:En,isFragment:an,isMemo:sn,findDOMNode:dn,Component:n,PureComponent:C,memo:x,forwardRef:k,flushSync:mn,unstable_batchedUpdates:pn,StrictMode:yn,Suspense:L,SuspenseList:U,lazy:F,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:on};export{N as Children,C as PureComponent,yn as StrictMode,L as Suspense,U as SuspenseList,on as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hn as cloneElement,ln as createFactory,j as createPortal,Rn as default,dn as findDOMNode,mn as flushSync,k as forwardRef,G as hydrate,En as isElement,an as isFragment,sn as isMemo,fn as isValidElement,F as lazy,x as memo,q as render,_n as startTransition,vn as unmountComponentAtNode,pn as unstable_batchedUpdates,bn as useDeferredValue,gn as useInsertionEffect,Cn as useSyncExternalStore,Sn as useTransition,cn as version};\n//# sourceMappingURL=compat.module.js.map\n"],"names":["E","n","t","e","r","C","this","props","context","x","ref","call","current","u","shouldComponentUpdate","displayName","name","prototype","isReactComponent","__f","isPureReactComponent","state","R","__b","type","M","__e","then","o","__","__c","__k","T","unmount","A","__H","forEach","g","__P","map","D","__v","appendChild","L","__u","O","__a","U","__R","push","i","c","__O","setState","pop","forceUpdate","componentWillUnmount","render","document","createElement","fallback","children","V","delete","revealOrder","size","length","W","getChildContext","P","l","nodeType","parentNode","childNodes","contains","insertBefore","removeChild","splice","indexOf","j","containerInfo","get","Map","reverse","set","componentDidUpdate","componentDidMount","z","Symbol","for","B","H","Z","Y","$","test","Object","defineProperty","configurable","writable","value","J","event","K","Q","cancelBubble","X","defaultPrevented","persist","isPropagationStopped","isDefaultPrevented","nativeEvent","tn","enumerable","class","en","vnode","toLowerCase","replace","multiple","Array","isArray","selected","defaultValue","className","$$typeof","rn","__r","un","diffed"],"mappings":"wSAAshB,SAASA,EAAEC,EAAEC,GAAG,IAAI,IAAIC,KAAKF,EAAE,GAAG,aAAaE,KAAKA,KAAKD,GAAG,OAAM,EAAG,IAAI,IAAIE,KAAKF,EAAE,GAAG,aAAaE,GAAGH,EAAEG,KAAKF,EAAEE,GAAG,OAAM,EAAG,OAAM,CAAE,CAAC,SAASC,EAAEJ,EAAEC,GAAGI,KAAKC,MAAMN,EAAEK,KAAKE,QAAQN,CAAC,CAAC,SAASO,EAAER,EAAEE,GAAG,SAASC,EAAEH,GAAG,IAAIC,EAAEI,KAAKC,MAAMG,IAAIN,EAAEF,GAAGD,EAAES,IAAI,OAAON,GAAGF,IAAIA,EAAES,KAAKT,EAAE,MAAMA,EAAEU,QAAQ,MAAMT,GAAGA,EAAEG,KAAKC,MAAMN,KAAKG,EAAEJ,EAAEM,KAAKC,MAAMN,EAAE,CAAC,SAASY,EAAEV,GAAG,OAAOG,KAAKQ,sBAAsBV,EAAEF,EAAED,EAAEE,EAAE,CAAC,OAAOU,EAAEE,YAAY,SAASd,EAAEc,aAAad,EAAEe,MAAM,IAAIH,EAAEI,UAAUC,kBAAiB,EAAGL,EAAEM,KAAI,EAAGN,CAAC,EAAER,EAAEY,UAAU,IAAIhB,GAAGmB,sBAAqB,EAAGf,EAAEY,UAAUH,sBAAsB,SAASb,EAAEC,GAAG,OAAOF,EAAEM,KAAKC,MAAMN,IAAID,EAAEM,KAAKe,MAAMnB,EAAE,EAAE,IAAIoB,EAAEnB,EAAEoB,IAAIpB,EAAEoB,IAAI,SAAStB,GAAGA,EAAEuB,MAAMvB,EAAEuB,KAAKL,KAAKlB,EAAES,MAAMT,EAAEM,MAAMG,IAAIT,EAAES,IAAIT,EAAES,IAAI,MAAMY,GAAGA,EAAErB,EAAE,EAAuS,IAA2MwB,EAAEtB,EAAEuB,IAAIvB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US_TIMER_COUNTDOWN_TIME_MIN,e as DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS,t as DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS,o as DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS};
|
|
2
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/hooks/usePaymentStatusTimer/constants.ts"],"sourcesContent":["export const DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS = 2_000;\nexport const DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS = 60_000;\nexport const DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS = 10_000;\nexport const DEFAULT_PAYMENT_STATUS_TIMER_COUNTDOWN_TIME_MIN = 15;\n"],"names":["DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS","DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS","DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS","DEFAULT_PAYMENT_STATUS_TIMER_COUNTDOWN_TIME_MIN"],"mappings":"AAAO,MAAMA,EAAwC,IACxCC,EAAgD,IAChDC,EAAoD,IACpDC,EAAkD"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useState as e,useRef as t,useEffect as o}from"../../external/preact/hooks/dist/hooks.js";import r from"../../core/Services/payment-status.js";import{processPaymentStatusResponse as a}from"../../core/ProcessResponse/PaymentStatus/PaymentStatus.js";import n from"../../core/Errors/AdyenCheckoutError.js";import{DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS as s,DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS as l,DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS as p}from"./constants.js";function c(c){const[i,u]=e(!1),[d,m]=e(!1),[y,f]=e(!0);var h;const[v,R]=e(null!==(h=c.delay)&&void 0!==h?h:p),[E,w]=e(100),[k,T]=e(0),[D,g]=e(!1),j=t(null),x=async()=>{const{paymentData:e,clientKey:t,throttleInterval:o,pollStatus:s}=c,l=null!=s?s:()=>r(e,t,c.loadingContext,o);var p;D||(null===(p=c.onActionHandled)||void 0===p||p.call(c,{componentType:c.type,actionDescription:"polling-started"}),g(!0));return l().then(a).catch(e=>({type:"network-error",props:e})).then(e=>{switch(e.type){case"success":(e=>{if(u(!0),f(!1),e.props.payload){const t={data:{details:{payload:e.props.payload},paymentData:c.paymentData}};c.onComplete(t)}else m(!0),c.onError(new n("ERROR","successful result, but no payload in response"))})(e);break;case"error":(e=>{if(m(!0),f(!1),e.props.payload){const t={data:{details:{payload:e.props.payload},paymentData:c.paymentData}};c.onComplete(t)}else{const e=new n("ERROR","error result with no payload in response");c.onError(e)}})(e);break;default:f(!1)}})};o(()=>{x()},[]),o(()=>{if(d||i||y)return;return j.current=setTimeout(()=>{(async()=>{const e=performance.now();await x();const t=performance.now(),o=Math.round(t-e),r=k+o+v;var a,n,p;T(r),r>=(null!==(a=c.throttleTime)&&void 0!==a?a:s)&&v!==(null!==(n=c.throttleInterval)&&void 0!==n?n:l)&&R(null!==(p=c.throttleInterval)&&void 0!==p?p:l)})()},v),()=>{clearTimeout(j.current)}},[d,i,y,v,c.throttleTime,c.throttleInterval,k]);return{state:{completed:i,expired:d,loading:y,percentage:E,timePassed:k},actions:{onTick:e=>{w(e.percentage)},onTimeUp:()=>{m(!0),c.onError(new n("ERROR","Payment Expired"))}}}}export{c as usePaymentStatusTimer};
|
|
2
|
+
//# sourceMappingURL=usePaymentStatusTimer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePaymentStatusTimer.js","sources":["../../../../src/hooks/usePaymentStatusTimer/usePaymentStatusTimer.tsx"],"sourcesContent":["import { useState, useEffect, useRef } from 'preact/hooks';\nimport checkPaymentStatus from '../../core/Services/payment-status';\nimport { processPaymentStatusResponse } from '../../core/ProcessResponse/PaymentStatus';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { CountdownTime } from '../../components/internal/Countdown/types';\nimport { PaymentStatusTimerActions, PaymentStatusTimerState, UsePaymentStatusTimerProps } from './types';\nimport {\n DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS,\n DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS,\n DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS\n} from './constants';\nimport { AdditionalDetailsData, ProcessedPaymentStatusResponse } from '../../types';\n\nexport function usePaymentStatusTimer(props: UsePaymentStatusTimerProps): { state: PaymentStatusTimerState; actions: PaymentStatusTimerActions } {\n const [completed, setCompleted] = useState(false);\n const [expired, setExpired] = useState(false);\n const [loading, setLoading] = useState(true);\n const [delay, setDelay] = useState(props.delay ?? DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS);\n const [percentage, setPercentage] = useState(100);\n const [timePassed, setTimePassed] = useState(0);\n const [onPollingStartedActionHandled, setOnPollingStartedActionHandled] = useState(false);\n const timeoutRef = useRef<NodeJS.Timeout | number | null>(null);\n\n const onTick = (time: CountdownTime): void => {\n setPercentage(time.percentage);\n };\n\n const onTimeUp = (): void => {\n setExpired(true);\n props.onError(new AdyenCheckoutError('ERROR', 'Payment Expired'));\n };\n\n const onComplete = (status: ProcessedPaymentStatusResponse): void => {\n setCompleted(true);\n setLoading(false);\n\n if (status.props.payload) {\n const additionalDetailsData: AdditionalDetailsData = {\n data: {\n details: { payload: status.props.payload },\n paymentData: props.paymentData\n }\n };\n props.onComplete(additionalDetailsData);\n } else {\n setExpired(true);\n props.onError(new AdyenCheckoutError('ERROR', 'successful result, but no payload in response'));\n }\n };\n\n const onError = (status: ProcessedPaymentStatusResponse): void => {\n setExpired(true);\n setLoading(false);\n\n if (status.props.payload) {\n const additionalDetailsData: AdditionalDetailsData = {\n data: {\n details: { payload: status.props.payload },\n paymentData: props.paymentData\n }\n };\n props.onComplete(additionalDetailsData);\n } else {\n const error = new AdyenCheckoutError('ERROR', 'error result with no payload in response');\n props.onError(error);\n }\n };\n\n const checkStatus = async (): Promise<void> => {\n const { paymentData, clientKey, throttleInterval, pollStatus } = props;\n\n const pollStatusFunction = pollStatus ?? (() => checkPaymentStatus(paymentData, clientKey, props.loadingContext, throttleInterval));\n\n if (!onPollingStartedActionHandled) {\n props.onActionHandled?.({ componentType: props.type, actionDescription: 'polling-started' });\n setOnPollingStartedActionHandled(true);\n }\n\n return pollStatusFunction()\n .then(processPaymentStatusResponse)\n .catch(\n (error: unknown) =>\n ({\n type: 'network-error',\n props: error\n }) as ProcessedPaymentStatusResponse\n )\n .then((status: ProcessedPaymentStatusResponse) => {\n switch (status.type) {\n case 'success':\n onComplete(status);\n break;\n case 'error':\n onError(status);\n break;\n default:\n setLoading(false);\n }\n });\n };\n\n useEffect(() => {\n void checkStatus();\n }, []);\n\n useEffect(() => {\n if (expired || completed || loading) {\n return;\n }\n\n const statusInterval = async (): Promise<void> => {\n const start = performance.now();\n await checkStatus();\n const end = performance.now();\n const responseTime = Math.round(end - start);\n\n const actualTimePassed = timePassed + responseTime + delay;\n setTimePassed(actualTimePassed);\n\n if (\n actualTimePassed >= (props.throttleTime ?? DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS) &&\n delay !== (props.throttleInterval ?? DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS)\n ) {\n setDelay(props.throttleInterval ?? DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS);\n }\n };\n\n timeoutRef.current = setTimeout(() => {\n void statusInterval();\n }, delay);\n\n return () => {\n clearTimeout(timeoutRef.current);\n };\n }, [expired, completed, loading, delay, props.throttleTime, props.throttleInterval, timePassed]);\n\n const state: PaymentStatusTimerState = {\n completed,\n expired,\n loading,\n percentage,\n timePassed\n };\n\n const actions: PaymentStatusTimerActions = {\n onTick,\n onTimeUp\n };\n\n return { state, actions };\n}\n"],"names":["usePaymentStatusTimer","props","completed","setCompleted","useState","expired","setExpired","loading","setLoading","delay","setDelay","DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS","percentage","setPercentage","timePassed","setTimePassed","onPollingStartedActionHandled","setOnPollingStartedActionHandled","timeoutRef","useRef","checkStatus","async","paymentData","clientKey","throttleInterval","pollStatus","pollStatusFunction","checkPaymentStatus","loadingContext","onActionHandled","componentType","type","actionDescription","then","processPaymentStatusResponse","catch","error","status","payload","additionalDetailsData","data","details","onComplete","onError","AdyenCheckoutError","useEffect","current","setTimeout","start","performance","now","end","responseTime","Math","round","actualTimePassed","throttleTime","DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS","DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS","statusInterval","clearTimeout","state","actions","onTick","time","onTimeUp"],"mappings":"seAaO,SAASA,EAAsBC,GAClC,MAAOC,EAAWC,GAAgBC,GAAS,IACpCC,EAASC,GAAcF,GAAS,IAChCG,EAASC,GAAcJ,GAAS,GACJH,IAAAA,EAAnC,MAAOQ,EAAOC,GAAYN,EAAoB,QAAXH,EAAAA,EAAMQ,aAANR,IAAAA,EAAAA,EAAeU,IAC3CC,EAAYC,GAAiBT,EAAS,MACtCU,EAAYC,GAAiBX,EAAS,IACtCY,EAA+BC,GAAoCb,GAAS,GAC7Ec,EAAaC,EAAuC,MA+CpDC,EAAcC,UAChB,MAAMC,YAAEA,EAAWC,UAAEA,EAASC,iBAAEA,EAAgBC,WAAEA,GAAexB,EAE3DyB,EAAqBD,QAAAA,EAAe,IAAME,EAAmBL,EAAaC,EAAWtB,EAAM2B,eAAgBJ,GAG7GvB,IAAAA,EADCe,IACoB,QAArBf,EAAAA,EAAM4B,uBAAN5B,IAAAA,GAAAA,OAAAA,EAAwB,CAAE6B,cAAe7B,EAAM8B,KAAMC,kBAAmB,oBACxEf,GAAiC,IAGrC,OAAOS,IACFO,KAAKC,GACLC,MACIC,KAEOL,KAAM,gBACN9B,MAAOmC,KAGl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K,EAASE,EAAOR,EAAMuD,aAAcvD,EAAMuB,iBAAkBV,IAepF,MAAO,CAAE+C,MAb8B,CACnC3D,YACAG,UACAE,UACAK,aACAE,cAQYgD,QAL2B,CACvCC,OA1HYC,IACZnD,EAAcmD,EAAKpD,aA0HnBqD,SAvHa,KACb3D,GAAW,GACXL,EAAM0C,QAAQ,IAAIC,EAAmB,QAAS,sBAyHtD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"../core/Errors/AdyenCheckoutError.js";import{AnalyticsInfoEvent as i,InfoEventType as s}from"../core/Analytics/AnalyticsInfoEvent.js";function e(t,i,s){return i in t?Object.defineProperty(t,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[i]=s,t}class r{removeScript(){var t,i;null===(i=this.script)||void 0===i||null===(t=i.parentNode)||void 0===t||t.removeChild(this.script),this.script=null}loadScript(){return new Promise((i,s)=>{var e;const r=document.querySelector(this.node);if(!r)return void s(new t("SCRIPT_ERROR",`Unable to find script container node: ${this.node}`));const o=()=>{this.script&&(this.script.removeEventListener("load",n),this.script.removeEventListener("error",a))},n=()=>{this.script.setAttribute("data-script-loaded","true"),o(),i()},a=i=>{o(),s(new t("SCRIPT_ERROR",`Unable to load script ${this.src}.${(null==i?void 0:i.message)&&`Message: ${i.message}`}`,{cause:(null==i?void 0:i.error)||i}))};if(this.script=r.querySelector(`script[src="${this.src}"]`),null===(e=this.script)||void 0===e?void 0:e.getAttribute("data-script-loaded"))i();else{if(this.script)return this.script.addEventListener("load",n),void this.script.addEventListener("error",a);this.script=document.createElement("script"),Object.assign(this.script,this.attributes),Object.assign(this.script.dataset,this.dataAttributes),this.script.src=this.src,this.script.async=!0,this.script.addEventListener("load",n),this.script.addEventListener("error",a),r.appendChild(this.script)}})}trackEvent(t){var s;const e=new i({type:t,component:this.component,cdnUrl:this.baseUrl});null===(s=this.analytics)||void 0===s||s.sendAnalytics(e)}constructor({src:i,component:o,node:n="body",attributes:a,dataAttributes:c,analytics:d}){e(this,"src",void 0),e(this,"component",void 0),e(this,"node",void 0),e(this,"attributes",void 0),e(this,"dataAttributes",void 0),e(this,"analytics",void 0),e(this,"baseUrl",void 0),e(this,"script",void 0),e(this,"loadPromise",null),e(this,"rejectLoadPromise",null),e(this,"load",()=>(null!==this.loadPromise||(this.loadPromise=new Promise((t,i)=>{this.rejectLoadPromise=i;let e=0;this.trackEvent(s.sdkDownloadInitiated);const o=async()=>{try{e++,await this.loadScript(),this.trackEvent(s.sdkDownloadCompleted),t()}catch(t){if(null===this.loadPromise)return;this.trackEvent(s.sdkDownloadFailed),this.removeScript(),e<r.MAX_NUMBER_OF_RETRIES?setTimeout(()=>{o()},r.RETRY_DELAY):(this.trackEvent(s.sdkDownloadAborted),this.loadPromise=null,this.rejectLoadPromise=null,i(t))}};o()})),this.loadPromise)),e(this,"remove",()=>{var i;null===(i=this.rejectLoadPromise)||void 0===i||i.call(this,new t("CANCEL","Script loading cancelled.")),this.removeScript(),this.loadPromise=null}),this.src=i,this.component=o,this.node=n,this.attributes=a,this.dataAttributes=c,this.analytics=d,this.baseUrl=function(t){const i=new URL(t);return i.origin+i.pathname}(this.src)}}e(r,"RETRY_DELAY",1e3),e(r,"MAX_NUMBER_OF_RETRIES",3);export{r as default};
|
|
1
|
+
import t from"../core/Errors/AdyenCheckoutError.js";import{AnalyticsInfoEvent as i,InfoEventType as s}from"../core/Analytics/events/AnalyticsInfoEvent.js";function e(t,i,s){return i in t?Object.defineProperty(t,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[i]=s,t}class r{removeScript(){var t,i;null===(i=this.script)||void 0===i||null===(t=i.parentNode)||void 0===t||t.removeChild(this.script),this.script=null}loadScript(){return new Promise((i,s)=>{var e;const r=document.querySelector(this.node);if(!r)return void s(new t("SCRIPT_ERROR",`Unable to find script container node: ${this.node}`));const o=()=>{this.script&&(this.script.removeEventListener("load",n),this.script.removeEventListener("error",a))},n=()=>{this.script.setAttribute("data-script-loaded","true"),o(),i()},a=i=>{o(),s(new t("SCRIPT_ERROR",`Unable to load script ${this.src}.${(null==i?void 0:i.message)&&`Message: ${i.message}`}`,{cause:(null==i?void 0:i.error)||i}))};if(this.script=r.querySelector(`script[src="${this.src}"]`),null===(e=this.script)||void 0===e?void 0:e.getAttribute("data-script-loaded"))i();else{if(this.script)return this.script.addEventListener("load",n),void this.script.addEventListener("error",a);this.script=document.createElement("script"),Object.assign(this.script,this.attributes),Object.assign(this.script.dataset,this.dataAttributes),this.script.src=this.src,this.script.async=!0,this.script.addEventListener("load",n),this.script.addEventListener("error",a),r.appendChild(this.script)}})}trackEvent(t){var s;const e=new i({type:t,component:this.component,cdnUrl:this.baseUrl});null===(s=this.analytics)||void 0===s||s.sendAnalytics(e)}constructor({src:i,component:o,node:n="body",attributes:a,dataAttributes:c,analytics:d}){e(this,"src",void 0),e(this,"component",void 0),e(this,"node",void 0),e(this,"attributes",void 0),e(this,"dataAttributes",void 0),e(this,"analytics",void 0),e(this,"baseUrl",void 0),e(this,"script",void 0),e(this,"loadPromise",null),e(this,"rejectLoadPromise",null),e(this,"load",()=>(null!==this.loadPromise||(this.loadPromise=new Promise((t,i)=>{this.rejectLoadPromise=i;let e=0;this.trackEvent(s.sdkDownloadInitiated);const o=async()=>{try{e++,await this.loadScript(),this.trackEvent(s.sdkDownloadCompleted),t()}catch(t){if(null===this.loadPromise)return;this.trackEvent(s.sdkDownloadFailed),this.removeScript(),e<r.MAX_NUMBER_OF_RETRIES?setTimeout(()=>{o()},r.RETRY_DELAY):(this.trackEvent(s.sdkDownloadAborted),this.loadPromise=null,this.rejectLoadPromise=null,i(t))}};o()})),this.loadPromise)),e(this,"remove",()=>{var i;null===(i=this.rejectLoadPromise)||void 0===i||i.call(this,new t("CANCEL","Script loading cancelled.")),this.removeScript(),this.loadPromise=null}),this.src=i,this.component=o,this.node=n,this.attributes=a,this.dataAttributes=c,this.analytics=d,this.baseUrl=function(t){const i=new URL(t);return i.origin+i.pathname}(this.src)}}e(r,"RETRY_DELAY",1e3),e(r,"MAX_NUMBER_OF_RETRIES",3);export{r as default};
|
|
2
2
|
//# sourceMappingURL=Script.js.map
|