@adyen/adyen-web 6.40.0 → 6.40.2

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.
Files changed (85) hide show
  1. package/dist/cjs/index.cjs +2 -2
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/index.d.cts +6 -21
  4. package/dist/es/components/ANCV/ANCV.js +1 -1
  5. package/dist/es/components/ANCV/ANCV.js.map +1 -1
  6. package/dist/es/components/Blik/Blik.js +1 -1
  7. package/dist/es/components/Blik/Blik.js.map +1 -1
  8. package/dist/es/components/Iris/Iris.js +1 -1
  9. package/dist/es/components/Iris/Iris.js.map +1 -1
  10. package/dist/es/components/MBWay/MBWay.js +1 -1
  11. package/dist/es/components/MBWay/MBWay.js.map +1 -1
  12. package/dist/es/components/PayTo/PayTo.js +1 -1
  13. package/dist/es/components/PayTo/PayTo.js.map +1 -1
  14. package/dist/es/components/PayTo/components/BSBInput.js +1 -1
  15. package/dist/es/components/PayTo/components/BSBInput.js.map +1 -1
  16. package/dist/es/components/PayTo/components/IdentifierSelector.js +1 -1
  17. package/dist/es/components/PayTo/components/IdentifierSelector.js.map +1 -1
  18. package/dist/es/components/PayTo/components/PayIDInput.js +1 -1
  19. package/dist/es/components/PayTo/components/PayIDInput.js.map +1 -1
  20. package/dist/es/components/PayTo/components/validate.js +1 -1
  21. package/dist/es/components/PayTo/components/validate.js.map +1 -1
  22. package/dist/es/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
  23. package/dist/es/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
  24. package/dist/es/components/UPI/UPI.js +1 -1
  25. package/dist/es/components/UPI/UPI.js.map +1 -1
  26. package/dist/es/components/internal/Await/Await.js +1 -1
  27. package/dist/es/components/internal/Await/Await.js.map +1 -1
  28. package/dist/es/components/internal/FormFields/Fieldset/Fieldset.js +1 -1
  29. package/dist/es/components/internal/FormFields/Fieldset/Fieldset.js.map +1 -1
  30. package/dist/es/components/internal/FormFields/InputBase.js +1 -1
  31. package/dist/es/components/internal/FormFields/InputBase.js.map +1 -1
  32. package/dist/es/components/internal/FormFields/Select/Select.js +1 -1
  33. package/dist/es/components/internal/FormFields/Select/Select.js.map +1 -1
  34. package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +1 -1
  35. package/dist/es/components/internal/FormFields/Select/components/SelectButton.js.map +1 -1
  36. package/dist/es/components/internal/SecuredFields/lib/securedField/utils/createIframe.js +1 -1
  37. package/dist/es/components/internal/SecuredFields/lib/securedField/utils/createIframe.js.map +1 -1
  38. package/dist/es/core/config.js +1 -1
  39. package/dist/es/index.d.ts +6 -21
  40. package/dist/es/language/utils.js +1 -1
  41. package/dist/es/language/utils.js.map +1 -1
  42. package/dist/es/packages/server/translations/en-US.json.js +1 -1
  43. package/dist/es/utils/get-process-message-handler.js +1 -1
  44. package/dist/es/utils/get-process-message-handler.js.map +1 -1
  45. package/dist/es-legacy/components/ANCV/ANCV.js +1 -1
  46. package/dist/es-legacy/components/ANCV/ANCV.js.map +1 -1
  47. package/dist/es-legacy/components/Blik/Blik.js +1 -1
  48. package/dist/es-legacy/components/Blik/Blik.js.map +1 -1
  49. package/dist/es-legacy/components/Iris/Iris.js +1 -1
  50. package/dist/es-legacy/components/Iris/Iris.js.map +1 -1
  51. package/dist/es-legacy/components/MBWay/MBWay.js +1 -1
  52. package/dist/es-legacy/components/MBWay/MBWay.js.map +1 -1
  53. package/dist/es-legacy/components/PayTo/PayTo.js +1 -1
  54. package/dist/es-legacy/components/PayTo/PayTo.js.map +1 -1
  55. package/dist/es-legacy/components/PayTo/components/BSBInput.js +1 -1
  56. package/dist/es-legacy/components/PayTo/components/BSBInput.js.map +1 -1
  57. package/dist/es-legacy/components/PayTo/components/IdentifierSelector.js +1 -1
  58. package/dist/es-legacy/components/PayTo/components/IdentifierSelector.js.map +1 -1
  59. package/dist/es-legacy/components/PayTo/components/PayIDInput.js +1 -1
  60. package/dist/es-legacy/components/PayTo/components/PayIDInput.js.map +1 -1
  61. package/dist/es-legacy/components/PayTo/components/validate.js +1 -1
  62. package/dist/es-legacy/components/PayTo/components/validate.js.map +1 -1
  63. package/dist/es-legacy/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
  64. package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
  65. package/dist/es-legacy/components/UPI/UPI.js +1 -1
  66. package/dist/es-legacy/components/UPI/UPI.js.map +1 -1
  67. package/dist/es-legacy/components/internal/Await/Await.js +1 -1
  68. package/dist/es-legacy/components/internal/Await/Await.js.map +1 -1
  69. package/dist/es-legacy/components/internal/FormFields/Fieldset/Fieldset.js +1 -1
  70. package/dist/es-legacy/components/internal/FormFields/Fieldset/Fieldset.js.map +1 -1
  71. package/dist/es-legacy/components/internal/FormFields/InputBase.js +1 -1
  72. package/dist/es-legacy/components/internal/FormFields/InputBase.js.map +1 -1
  73. package/dist/es-legacy/components/internal/FormFields/Select/Select.js +1 -1
  74. package/dist/es-legacy/components/internal/FormFields/Select/Select.js.map +1 -1
  75. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectButton.js +1 -1
  76. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectButton.js.map +1 -1
  77. package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/utils/createIframe.js +1 -1
  78. package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/utils/createIframe.js.map +1 -1
  79. package/dist/es-legacy/core/config.js +1 -1
  80. package/dist/es-legacy/language/utils.js +1 -1
  81. package/dist/es-legacy/language/utils.js.map +1 -1
  82. package/dist/es-legacy/packages/server/translations/en-US.json.js +1 -1
  83. package/dist/es-legacy/utils/get-process-message-handler.js +1 -1
  84. package/dist/es-legacy/utils/get-process-message-handler.js.map +1 -1
  85. package/package.json +19 -19
@@ -1 +1 @@
1
- {"version":3,"file":"createIframe.js","sources":["../../../../../../../../src/components/internal/SecuredFields/lib/securedField/utils/createIframe.ts"],"sourcesContent":["export default function createIframe({ src, title = 'iframe element', policy = 'origin' }) {\n const iframeEl = document.createElement('iframe');\n iframeEl.setAttribute('src', src);\n iframeEl.classList.add('js-iframe');\n\n // Following a11y advice from LevelAccess, we always set the iframe to be role=presentation\n iframeEl.setAttribute('role', 'presentation');\n\n if (title !== '' && title.trim().length > 0) {\n iframeEl.setAttribute('title', title);\n }\n\n iframeEl.setAttribute('allowtransparency', 'true');\n iframeEl.setAttribute('referrerpolicy', policy); // Necessary for ClientKey to work\n // Commenting out stops the \"The devicemotion events are blocked by feature policy\" warning in Chrome >=66 that some merchant experienced\n // Commenting in stops the same warnings in development (??)\n if (process.env.NODE_ENV === 'development') {\n iframeEl.setAttribute('allow', 'accelerometer; gyroscope');\n }\n\n const noIframeElContent = document.createTextNode('<p>Your browser does not support iframes.</p>');\n iframeEl.appendChild(noIframeElContent);\n\n return iframeEl;\n}\n"],"names":["createIframe","src","title","policy","iframeEl","document","createElement","setAttribute","classList","add","trim","length","noIframeElContent","createTextNode","appendChild"],"mappings":"AAAe,SAASA,GAAaC,IAAEA,EAAGC,MAAEA,EAAQ,iBAAgBC,OAAEA,EAAS,WAC3E,MAAMC,EAAWC,SAASC,cAAc,UACxCF,EAASG,aAAa,MAAON,GAC7BG,EAASI,UAAUC,IAAI,aAGvBL,EAASG,aAAa,OAAQ,gBAEhB,KAAVL,GAAgBA,EAAMQ,OAAOC,OAAS,GACtCP,EAASG,aAAa,QAASL,GAGnCE,EAASG,aAAa,oBAAqB,QAC3CH,EAASG,aAAa,iBAAkBJ,GAOxC,MAAMS,EAAoBP,SAASQ,eAAe,iDAGlD,OAFAT,EAASU,YAAYF,GAEdR,CACX"}
1
+ {"version":3,"file":"createIframe.js","sources":["../../../../../../../../src/components/internal/SecuredFields/lib/securedField/utils/createIframe.ts"],"sourcesContent":["export default function createIframe({ src, title = 'iframe element', policy = 'origin' }) {\n const iframeEl = document.createElement('iframe');\n iframeEl.setAttribute('src', src);\n iframeEl.classList.add('js-iframe');\n\n if (title !== '' && title.trim().length > 0) {\n iframeEl.setAttribute('title', title);\n }\n\n iframeEl.setAttribute('allowtransparency', 'true');\n iframeEl.setAttribute('referrerpolicy', policy); // Necessary for ClientKey to work\n // Commenting out stops the \"The devicemotion events are blocked by feature policy\" warning in Chrome >=66 that some merchant experienced\n // Commenting in stops the same warnings in development (??)\n if (process.env.NODE_ENV === 'development') {\n iframeEl.setAttribute('allow', 'accelerometer; gyroscope');\n }\n\n const noIframeElContent = document.createTextNode('<p>Your browser does not support iframes.</p>');\n iframeEl.appendChild(noIframeElContent);\n\n return iframeEl;\n}\n"],"names":["createIframe","src","title","policy","iframeEl","document","createElement","setAttribute","classList","add","trim","length","noIframeElContent","createTextNode","appendChild"],"mappings":"AAAe,SAASA,GAAaC,IAAEA,EAAGC,MAAEA,EAAQ,iBAAgBC,OAAEA,EAAS,WAC3E,MAAMC,EAAWC,SAASC,cAAc,UACxCF,EAASG,aAAa,MAAON,GAC7BG,EAASI,UAAUC,IAAI,aAET,KAAVP,GAAgBA,EAAMQ,OAAOC,OAAS,GACtCP,EAASG,aAAa,QAASL,GAGnCE,EAASG,aAAa,oBAAqB,QAC3CH,EAASG,aAAa,iBAAkBJ,GAOxC,MAAMS,EAAoBP,SAASQ,eAAe,iDAGlD,OAFAT,EAASU,YAAYF,GAEdR,CACX"}
@@ -1,2 +1,2 @@
1
- function e(e,n){if(null==e)throw new Error(n);return e}const n="https://checkoutshopper-live.adyen.com/checkoutshopper/",o=e("6.40.0","LIBRARY_VERSION is not defined"),t=e("esm","BUNDLE_TYPE is not defined"),r=["amount","secondaryAmount","countryCode","environment","_environmentUrls","loadingContext","i18n","modules","order","session","clientKey","showPayButton","redirectFromTopWhenInIframe","donation","onPaymentCompleted","onPaymentFailed","beforeRedirect","beforeSubmit","onSubmit","onActionHandled","onAdditionalDetails","onChange","onEnterKeyPressed","onError","onBalanceCheck","onOrderCancel","onOrderRequest","onOrderUpdated","onPaymentMethodsRequest"],i=6e4;var d=function(e){return e.WEB="web",e}({});const a="web";var s=function(e){return e.NATIVE="nativeComponent",e.GENERIC="genericComponent",e}({});export{d as CHANNEL,i as DEFAULT_HTTP_TIMEOUT,n as FALLBACK_CONTEXT,r as GENERIC_OPTIONS,t as LIBRARY_BUNDLE_TYPE,o as LIBRARY_VERSION,s as PAYMENT_METHOD_BEHAVIOR,a as PLATFORM};
1
+ function e(e,n){if(null==e)throw new Error(n);return e}const n="https://checkoutshopper-live.adyen.com/checkoutshopper/",o=e("6.40.2","LIBRARY_VERSION is not defined"),t=e("esm","BUNDLE_TYPE is not defined"),r=["amount","secondaryAmount","countryCode","environment","_environmentUrls","loadingContext","i18n","modules","order","session","clientKey","showPayButton","redirectFromTopWhenInIframe","donation","onPaymentCompleted","onPaymentFailed","beforeRedirect","beforeSubmit","onSubmit","onActionHandled","onAdditionalDetails","onChange","onEnterKeyPressed","onError","onBalanceCheck","onOrderCancel","onOrderRequest","onOrderUpdated","onPaymentMethodsRequest"],i=6e4;var d=function(e){return e.WEB="web",e}({});const a="web";var s=function(e){return e.NATIVE="nativeComponent",e.GENERIC="genericComponent",e}({});export{d as CHANNEL,i as DEFAULT_HTTP_TIMEOUT,n as FALLBACK_CONTEXT,r as GENERIC_OPTIONS,t as LIBRARY_BUNDLE_TYPE,o as LIBRARY_VERSION,s as PAYMENT_METHOD_BEHAVIOR,a as PLATFORM};
2
2
  //# sourceMappingURL=config.js.map
@@ -1825,7 +1825,7 @@ interface ThreeDS2Configuration extends UIElementProps {
1825
1825
  };
1826
1826
  notificationURL?: string;
1827
1827
  onActionHandled?: (rtnObj: ActionHandledReturnObject) => void;
1828
- on3DS2RedirectFlowComplete?: (state: LegacyChallengeResolveData | ChallengeResolveData | LegacyFingerprintResolveData | FingerprintResolveData, component: UIElement) => void;
1828
+ on3DS2RedirectFlowComplete?: (state: ChallengeResolveData | FingerprintResolveData, component: UIElement) => void;
1829
1829
  onError?: (error: AdyenCheckoutError, element?: UIElement) => void;
1830
1830
  paymentData?: string;
1831
1831
  token?: string;
@@ -1916,14 +1916,6 @@ interface FingerprintResolveData {
1916
1916
  paymentData: string;
1917
1917
  };
1918
1918
  }
1919
- interface LegacyFingerprintResolveData {
1920
- data: {
1921
- details: {
1922
- [key: string]: string;
1923
- };
1924
- paymentData: string;
1925
- };
1926
- }
1927
1919
  interface ChallengeResolveData {
1928
1920
  data: {
1929
1921
  details: {
@@ -1931,14 +1923,6 @@ interface ChallengeResolveData {
1931
1923
  };
1932
1924
  };
1933
1925
  }
1934
- interface LegacyChallengeResolveData {
1935
- data: {
1936
- details: {
1937
- [key: string]: string;
1938
- };
1939
- paymentData: string;
1940
- };
1941
- }
1942
1926
  interface ErrorCodeObject {
1943
1927
  errorCode: string | ErrorEventCode;
1944
1928
  message: string;
@@ -1954,7 +1938,7 @@ type ThreeDS2ConfigProps = {
1954
1938
  readonly token: string;
1955
1939
  readonly paymentData: string;
1956
1940
  readonly onActionHandled?: (rtnObj: ActionHandledReturnObject) => void;
1957
- readonly on3DS2RedirectFlowComplete?: (state: LegacyChallengeResolveData | ChallengeResolveData, component: UIElement) => void;
1941
+ readonly on3DS2RedirectFlowComplete?: (state: ChallengeResolveData | FingerprintResolveData, component: UIElement) => void;
1958
1942
  readonly onAdditionalDetails?: (state: AdditionalDetailsData, component: UIElement, actions: AdditionalDetailsActions) => void;
1959
1943
  readonly onError?: (error: AdyenCheckoutError, element?: UIElement) => void;
1960
1944
  readonly isDropin?: boolean;
@@ -4714,6 +4698,7 @@ interface AwaitComponentProps {
4714
4698
  onError: (error: AdyenCheckoutError) => void;
4715
4699
  onComplete: (status: AdditionalDetailsData) => void;
4716
4700
  brandLogo?: string;
4701
+ brandName?: string;
4717
4702
  messageText?: string;
4718
4703
  awaitText: string;
4719
4704
  onActionHandled?: (rtnObj: ActionHandledReturnObject) => void;
@@ -8177,7 +8162,7 @@ declare class ThreeDS2Challenge extends UIElement<ThreeDS2ChallengeConfiguration
8177
8162
  * However, if the action to create this component came from the 3DS2InMDFlow process it will instead equal a call to the onComplete callback
8178
8163
  * (as defined in the 3DS2InMDFlow and passed in as a config prop).
8179
8164
  */
8180
- onComplete(state: LegacyChallengeResolveData | ChallengeResolveData): void;
8165
+ onComplete(state: ChallengeResolveData): void;
8181
8166
  protected componentToRender(): h.JSX.Element;
8182
8167
  }
8183
8168
 
@@ -8193,7 +8178,7 @@ declare class ThreeDS2DeviceFingerprint extends UIElement<ThreeDS2DeviceFingerpr
8193
8178
  /**
8194
8179
  * Can be called directly from PrepareFingerprint (MDFlow) or after the call to /submitThreeDS2Fingerprint endpoint (native flow)
8195
8180
  */
8196
- onComplete(state: LegacyFingerprintResolveData | FingerprintResolveData): void;
8181
+ onComplete(state: FingerprintResolveData): void;
8197
8182
  protected componentToRender(): h.JSX.Element;
8198
8183
  }
8199
8184
 
@@ -8728,4 +8713,4 @@ declare namespace AdyenCheckout {
8728
8713
  }
8729
8714
 
8730
8715
  export { ANCVElement as ANCV, AchElement as Ach, AddressElement as Address, AdyenCheckout, AdyenCheckoutError, Affirm, AfterPay, AfterPayB2B, AmazonPayElement as AmazonPay, ApplePayElement as ApplePay, Atome, BacsElement as BacsDirectDebit, BancontactElement as Bancontact, BankTransferElement as BankTransfer, BCMCMobileElement as BcmcMobile, BillDeskOnlineElement as BillDeskOnline, BillDeskWalletElement as BillDeskWallet, BlikElement as Blik, BoletoElement as Boleto, CardElement as Card, CashAppPay, ClickToPayElement as ClickToPay, Core, CustomCard, DokuElement as Doku, DonationElement as Donation, DotpayElement as Dotpay, DragonpayElement as Dragonpay, DropinElement as Dropin, DuitNowElement as DuitNow, EPSElement as EPS, EcontextElement as Econtext, FacilyPay10x as FacilPay10x, FacilyPay12x as FacilPay12x, FacilyPay3x as FacilPay3x, FacilyPay4x as FacilPay4x, FacilyPay6x as FacilPay6x, Fastlane, FastlaneSDK, GiftcardElement as Giftcard, GiropayElement as Giropay, GooglePay, Iris, IrisMode, KlarnaPayments as Klarna, MBWayElement as MBWay, MealVoucherFRElement as MealVoucherFR, MolPayEBankingMYElement as MolPayEBankingMY, MolPayEBankingTHElement as MolPayEBankingTH, MolPayEbankingVNElement as MolPayEBankingVN, MultibancoElement as Multibanco, OnlineBankingCZElement as OnlineBankingCZ, OnlineBankingFI, OnlineBankingINElement as OnlineBankingIN, OnlineBankingPL, OnlineBankingSKElement as OnlineBankingSK, OxxoElement as Oxxo, PayByBank, PayByBankPixElement as PayByBankPix, PayByBankUS, PayMeElement as PayMe, PayNowElement as PayNow, PaypalElement as PayPal, PayToElement as PayTo, PayuNetCashcardElement as PayuCashcard, PayuNetBankingElement as PayuNetBanking, PersonalDetailsElement as PersonalDetails, PixElement as Pix, PreAuthorizedDebitCanada, PromptPayElement as PromptPay, RatePay, RatePayDirectDebit, RedirectElement as Redirect, Riverty, SepaElement as SepaDirectDebit, SwishElement as Swish, ThreeDS2Challenge, ThreeDS2DeviceFingerprint, TrustlyElement as Trustly, TwintElement as Twint, UIElement, UPI, VippsElement as Vipps, WalletINElement as WalletIN, WeChatPayElement as WeChat, index_d as components, initializeFastlane };
8731
- export type { ANCVConfiguration, ANCVDataState, AchConfiguration, AchPlaceholders, ActionDescriptionType, ActionHandledReturnObject, AdditionalDetailsActions, AdditionalDetailsData, AddressData, AddressField, AmazonPayBackendConfiguration, AmazonPayButtonProps, AmazonPayButtonSettings, AmazonPayComponentProps, AmazonPayConfiguration, AmazonPayElementData, AmazonWindowObject, App, ApplePayButtonStyle, ApplePayButtonType, ApplePayConfiguration, ApplePayElementData, ApplePayPaymentAuthorizationResult, ApplePayPaymentOrderDetails, ApplePaySessionRequest, ApplePayWebConfiguration, AwaitComponentProps, AwaitConfiguration, BankDetailsSchema, BankTransferConfiguration, BankTransferSchema, BankTransferState, BeforeSubmitActions, BinLookupResponse, BinLookupResponseRaw, BoletoConfiguration, BoletoElementProps, BoletoInputDataState, BoletoInputErrorState, BoletoInputValidState, BrandConfiguration, BrandObject, BrowserInfo, CReqData, CardAllValidData, CardAutoCompleteData, CardBackendConfiguration, CardBinLookupData, CardBinValueData, CardBrandData, CardBrandsConfiguration, CardConfigSuccessData, CardConfiguration, CardElementData, CardErrorData, CardFieldValidData, CardFocusData, CardLoadData, CardPlaceholders, CashAppPayConfiguration, CashAppPayElementData, CashAppPayEventData, ChallengeData, ChallengeResolveData, ChallengeWindowSize, ChangeActionOptions, ChangePaymentDetailsButtonProps, ChargeAmount, CheckoutAdvancedFlowResponse, CheckoutDetailsRequest, CheckoutSession, CheckoutSessionConfig, ClickToPayConfiguration, ClickToPayPaymentData, ClickToPayProps, ClickToPayScheme, CommonVoucherProps, ComponentFocusObject, ComponentMethodsRef, CoreConfiguration, CoreModules, Currency, CustomCardConfiguration, CustomTranslations, DecodeObject, DeliverySpecifications, DokuVoucherResultProps, DonationCampaign, DonationCampaignOptions, DonationConfiguration, DonationOptions, DonationProps, DragonpayConfiguraton, DragonpayInputData, DragonpayInputIssuerItem, DragonpayInputProps, DragonpayVoucherResultProps, DropinComponentProps, DropinComponentState, DropinConfiguration, DropinStatus, DropinStatusProps, DualBrandButtons, DualBrandSelectElement, DualBrandingChangeHandler, EcontextConfiguration, EcontextInputSchema, EcontextVoucherResultProps, ErrorCodeObject, ExtendedMerchantInfo, FastlaneAddress, FastlaneAuthenticatedCustomerResult, FastlaneConfiguration, FastlaneConsentRenderState, FastlaneData, FastlaneOptions, FastlanePaymentMethodConfiguration, FastlaneProfile, FastlaneSDKConfiguration, FastlaneShipping, FastlaneShippingAddressSelectorResult, FastlaneSignupConfiguration, FastlaneWindowInstance, FieldsetVisibility, FingerPrintData, FingerprintResolveData, FundingSource, FundingSourceKeys, GiftCardBalanceCheckErrorType, GiftCardConfiguration, GiftCardElementData, GiftCardValidationError, GooglePayConfiguration, GooglePaymentDataRequest, ICore, IDropin, InstantPaymentTypes, Intent, IrisConfiguration, IrisData, IrisState, IssuerListConfiguration, IssuerListData, KlarnaAction, KlarnaAdditionalDetailsData, KlarnaComponentRef, KlarnaConfiguration, KlarnaSdkData, KlarnaWidgetAuthorizeResponse, KlarnaWidgetProps, LedgerCurrencies, LegacyChallengeResolveData, LegacyFingerprintResolveData, MandateFrequencyType, MandateType, OnChangeData, OpenInvoiceActiveFieldsets, OpenInvoiceConfiguration, OpenInvoiceFieldsetsRefs, OpenInvoiceProps, OpenInvoiceStateData, OpenInvoiceStateError, OpenInvoiceStateValid, OpenInvoiceVisibility, Order, OrderButtonProps, OrderStatus, PayPalConfiguration, PayToConfiguration, PayToData, PayToPlaceholdersType, PayloadJSON, PaymentAction, PaymentActionsType, PaymentAmount, PaymentCompletedData, PaymentData, PaymentFailedData, PaymentMethodBrand, PaymentMethodData, PaymentMethodGroup, PaymentMethodOptions, PaymentMethods, PaymentMethodsConfiguration, PaymentMethodsRequestData, PaymentMethodsResponse, PaymentResponseData, PersonalDetailsSchema, PixConfiguration, PixElementData, PostMsgParseErrorObject, PreAuthorizedDebitCanadaConfiguration, PreAuthorizedDebitCanadaPlaceholders, ProcessedPaymentStatusResponse, QRLoaderConfiguration, RawPaymentMethod, RawPaymentResponse, RawPaymentStatusResponse, RawStoredPaymentMethod, RecurringMetadata, RedirectConfiguration, Region, ResultCode, ResultObject, ResultValue, SepaConfiguration, SepaElementData, SessionsResponse, SignOutButtonProps, SocialSecurityMode, StatusFromAction, SubmitActions, SubmitData, SupportedLocale, SupportedPayPalFundingSources, ThreeDS2ActionProps, ThreeDS2ChallengeConfiguration, ThreeDS2ConfigProps, ThreeDS2DeviceFingerprintConfiguration, ThreeDS2FingerprintResponse, ThreeDS2FlowObject, ThreeDS2FlowProps, ThreeDS2Token, UIElementProps, UIElementStatus, UPIAppList, UPIConfiguration, UpdateAmazonCheckoutSessionRequest, UpiMode, UpiPaymentData, UpiType, ValidationError, VoucherConfiguration, VoucherDetail, VoucherProps, balanceCheckResponseType, onBalanceCheckCallbackType, onOrderCancelData, onOrderCancelType, onOrderRequestCallbackType, onRequiringConfirmationCallbackType };
8716
+ export type { ANCVConfiguration, ANCVDataState, AchConfiguration, AchPlaceholders, ActionDescriptionType, ActionHandledReturnObject, AdditionalDetailsActions, AdditionalDetailsData, AddressData, AddressField, AmazonPayBackendConfiguration, AmazonPayButtonProps, AmazonPayButtonSettings, AmazonPayComponentProps, AmazonPayConfiguration, AmazonPayElementData, AmazonWindowObject, App, ApplePayButtonStyle, ApplePayButtonType, ApplePayConfiguration, ApplePayElementData, ApplePayPaymentAuthorizationResult, ApplePayPaymentOrderDetails, ApplePaySessionRequest, ApplePayWebConfiguration, AwaitComponentProps, AwaitConfiguration, BankDetailsSchema, BankTransferConfiguration, BankTransferSchema, BankTransferState, BeforeSubmitActions, BinLookupResponse, BinLookupResponseRaw, BoletoConfiguration, BoletoElementProps, BoletoInputDataState, BoletoInputErrorState, BoletoInputValidState, BrandConfiguration, BrandObject, BrowserInfo, CReqData, CardAllValidData, CardAutoCompleteData, CardBackendConfiguration, CardBinLookupData, CardBinValueData, CardBrandData, CardBrandsConfiguration, CardConfigSuccessData, CardConfiguration, CardElementData, CardErrorData, CardFieldValidData, CardFocusData, CardLoadData, CardPlaceholders, CashAppPayConfiguration, CashAppPayElementData, CashAppPayEventData, ChallengeData, ChallengeResolveData, ChallengeWindowSize, ChangeActionOptions, ChangePaymentDetailsButtonProps, ChargeAmount, CheckoutAdvancedFlowResponse, CheckoutDetailsRequest, CheckoutSession, CheckoutSessionConfig, ClickToPayConfiguration, ClickToPayPaymentData, ClickToPayProps, ClickToPayScheme, CommonVoucherProps, ComponentFocusObject, ComponentMethodsRef, CoreConfiguration, CoreModules, Currency, CustomCardConfiguration, CustomTranslations, DecodeObject, DeliverySpecifications, DokuVoucherResultProps, DonationCampaign, DonationCampaignOptions, DonationConfiguration, DonationOptions, DonationProps, DragonpayConfiguraton, DragonpayInputData, DragonpayInputIssuerItem, DragonpayInputProps, DragonpayVoucherResultProps, DropinComponentProps, DropinComponentState, DropinConfiguration, DropinStatus, DropinStatusProps, DualBrandButtons, DualBrandSelectElement, DualBrandingChangeHandler, EcontextConfiguration, EcontextInputSchema, EcontextVoucherResultProps, ErrorCodeObject, ExtendedMerchantInfo, FastlaneAddress, FastlaneAuthenticatedCustomerResult, FastlaneConfiguration, FastlaneConsentRenderState, FastlaneData, FastlaneOptions, FastlanePaymentMethodConfiguration, FastlaneProfile, FastlaneSDKConfiguration, FastlaneShipping, FastlaneShippingAddressSelectorResult, FastlaneSignupConfiguration, FastlaneWindowInstance, FieldsetVisibility, FingerPrintData, FingerprintResolveData, FundingSource, FundingSourceKeys, GiftCardBalanceCheckErrorType, GiftCardConfiguration, GiftCardElementData, GiftCardValidationError, GooglePayConfiguration, GooglePaymentDataRequest, ICore, IDropin, InstantPaymentTypes, Intent, IrisConfiguration, IrisData, IrisState, IssuerListConfiguration, IssuerListData, KlarnaAction, KlarnaAdditionalDetailsData, KlarnaComponentRef, KlarnaConfiguration, KlarnaSdkData, KlarnaWidgetAuthorizeResponse, KlarnaWidgetProps, LedgerCurrencies, MandateFrequencyType, MandateType, OnChangeData, OpenInvoiceActiveFieldsets, OpenInvoiceConfiguration, OpenInvoiceFieldsetsRefs, OpenInvoiceProps, OpenInvoiceStateData, OpenInvoiceStateError, OpenInvoiceStateValid, OpenInvoiceVisibility, Order, OrderButtonProps, OrderStatus, PayPalConfiguration, PayToConfiguration, PayToData, PayToPlaceholdersType, PayloadJSON, PaymentAction, PaymentActionsType, PaymentAmount, PaymentCompletedData, PaymentData, PaymentFailedData, PaymentMethodBrand, PaymentMethodData, PaymentMethodGroup, PaymentMethodOptions, PaymentMethods, PaymentMethodsConfiguration, PaymentMethodsRequestData, PaymentMethodsResponse, PaymentResponseData, PersonalDetailsSchema, PixConfiguration, PixElementData, PostMsgParseErrorObject, PreAuthorizedDebitCanadaConfiguration, PreAuthorizedDebitCanadaPlaceholders, ProcessedPaymentStatusResponse, QRLoaderConfiguration, RawPaymentMethod, RawPaymentResponse, RawPaymentStatusResponse, RawStoredPaymentMethod, RecurringMetadata, RedirectConfiguration, Region, ResultCode, ResultObject, ResultValue, SepaConfiguration, SepaElementData, SessionsResponse, SignOutButtonProps, SocialSecurityMode, StatusFromAction, SubmitActions, SubmitData, SupportedLocale, SupportedPayPalFundingSources, ThreeDS2ActionProps, ThreeDS2ChallengeConfiguration, ThreeDS2ConfigProps, ThreeDS2DeviceFingerprintConfiguration, ThreeDS2FingerprintResponse, ThreeDS2FlowObject, ThreeDS2FlowProps, ThreeDS2Token, UIElementProps, UIElementStatus, UPIAppList, UPIConfiguration, UpdateAmazonCheckoutSessionRequest, UpiMode, UpiPaymentData, UpiType, ValidationError, VoucherConfiguration, VoucherDetail, VoucherProps, balanceCheckResponseType, onBalanceCheckCallbackType, onOrderCancelData, onOrderCancelType, onOrderRequestCallbackType, onRequiringConfirmationCallbackType };
@@ -1,2 +1,2 @@
1
- import{DEFAULT_LOCALE as t,LOCALE_NAME_MIN_LENGTH as n,LOCALE_NAME_MAX_LENGTH as e}from"./constants.js";const r=t=>t.toLowerCase().substring(0,2),o=t=>Boolean(t)&&t.length>=n&&t.length<=e;function l(t,n){return t&&"string"==typeof t&&n.find(n=>r(n)===r(t))||null}function s(t){const n=t.replace("_","-");if(/^([a-z]{2})(-)([A-Z]{2})$/.test(n))return n;const[e,r]=n.split("-");if(!e||!r)return null;const o=[e.toLowerCase(),r.toUpperCase()].join("-");return 5===o.length?o:null}function u(n,e){if(!o(n))return t;const r=s(n);return r&&e.includes(r)?r:l(r||n,e)||t}function c(t={}){return Object.keys(t).reduce((n,e)=>{if(!o(e))return n;return n[s(e)||r(e)]=t[e],n},{})}const a=(t,n)=>t.replace(/%{(\w+)}/g,(t,e)=>n[e]||""),i=(t,n,e={})=>{const{values:r={},count:o=0}=e,l=`${n}__plural`,s=t=>`${n}__${t}`;return Object.prototype.hasOwnProperty.call(t,s(o))?a(t[s(o)],r):Object.prototype.hasOwnProperty.call(t,l)&&o>1?a(t[l],r):Object.prototype.hasOwnProperty.call(t,n)?a(t[n],r):null},p=(t,n)=>{const e=t.split(/%#(.*?)%#/gm);if(n.length!==Math.floor(e.length/2))throw Error("The number of functions provided does not match the number of elements in the translation string.");return e.map((t,e)=>{const r=Math.floor(e/2);return e%2==0?t:n[r](t)})};export{c as formatCustomTranslations,s as formatLocaleToLanguageCountryLocale,i as getTranslation,p as interpolateElement,l as matchLocale,u as parseLocale};
1
+ import{DEFAULT_LOCALE as t,LOCALE_NAME_MIN_LENGTH as n,LOCALE_NAME_MAX_LENGTH as e}from"./constants.js";const r=t=>t.toLowerCase().substring(0,2),o=t=>Boolean(t)&&t.length>=n&&t.length<=e;function s(t,n){if(!t||"string"!=typeof t)return null;const e=t.toLowerCase(),o=n.find(t=>t.toLowerCase()===e);if(o)return o;const s=r(t);return n.find(t=>r(t)===s)||null}function l(t){const n=t.replace("_","-");if(/^([a-z]{2})(-)([A-Z]{2})$/.test(n))return n;const[e,r]=n.split("-");if(!e||!r)return null;const o=[e.toLowerCase(),r.toUpperCase()].join("-");return 5===o.length?o:null}function u(n,e){if(!o(n))return t;const r=l(n);return r&&e.includes(r)?r:s(r||n,e)||t}function c(t={}){return Object.keys(t).reduce((n,e)=>{if(!o(e))return n;return n[l(e)||r(e)]=t[e],n},{})}const i=(t,n)=>t.replace(/%{(\w+)}/g,(t,e)=>n[e]||""),a=(t,n,e={})=>{const{values:r={},count:o=0}=e,s=`${n}__plural`,l=t=>`${n}__${t}`;return Object.prototype.hasOwnProperty.call(t,l(o))?i(t[l(o)],r):Object.prototype.hasOwnProperty.call(t,s)&&o>1?i(t[s],r):Object.prototype.hasOwnProperty.call(t,n)?i(t[n],r):null},p=(t,n)=>{const e=t.split(/%#(.*?)%#/gm);if(n.length!==Math.floor(e.length/2))throw Error("The number of functions provided does not match the number of elements in the translation string.");return e.map((t,e)=>{const r=Math.floor(e/2);return e%2==0?t:n[r](t)})};export{c as formatCustomTranslations,l as formatLocaleToLanguageCountryLocale,a as getTranslation,p as interpolateElement,s as matchLocale,u as parseLocale};
2
2
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/language/utils.ts"],"sourcesContent":["import { h } from 'preact';\nimport { CustomTranslations } from './types';\nimport { DEFAULT_LOCALE, LOCALE_NAME_MAX_LENGTH, LOCALE_NAME_MIN_LENGTH } from './constants';\n\n/**\n * @description Convert to ISO 639-1\n */\nconst toTwoLetterCode = (locale: string): string => locale.toLowerCase().substring(0, 2);\n\n/**\n * @description Checks if the locale length is valid\n * @param locale - The locale to check\n * @returns true if the locale length is valid, false otherwise\n */\nconst isLocaleLenghtValid = (locale: string): boolean =>\n Boolean(locale) && locale.length >= LOCALE_NAME_MIN_LENGTH && locale.length <= LOCALE_NAME_MAX_LENGTH;\n\n/**\n * Matches a string with one of the locales\n *\n * @param locale - The locale to match\n * @param supportedLocales - Array of possible locales\n *\n * @example\n * matchLocale('en-GB', ['en-US', 'es-ES']);\n * // returns 'en-US'\n */\nexport function matchLocale(locale: string, supportedLocales: readonly string[]): string | null {\n if (!locale || typeof locale !== 'string') return null;\n return supportedLocales.find(supLoc => toTwoLetterCode(supLoc) === toTwoLetterCode(locale)) || null;\n}\n\n/**\n * Returns a locale with the proper format.\n *\n * @param localeParam - Locale example: 'En_us' or 'en-US'\n *\n * @example\n * formatLocaleToLanguageCountryLocale('En_us');\n * // returns 'en-US'\n */\nexport function formatLocaleToLanguageCountryLocale(localeParam: string): string | null {\n const locale = localeParam.replace('_', '-');\n const format = /^([a-z]{2})(-)([A-Z]{2})$/;\n\n // If it's already formatted, return the locale\n if (format.test(locale)) return locale;\n\n // Split the string in two\n const [languageCode, countryCode] = locale.split('-');\n\n // If the locale or the country codes are missing, return null\n if (!languageCode || !countryCode) return null;\n\n // Ensure correct format and join the strings back together\n const fullLocale = [languageCode.toLowerCase(), countryCode.toUpperCase()].join('-');\n\n return fullLocale.length === 5 ? fullLocale : null;\n}\n\nexport function parseLocale(locale: string, supportedLocales: readonly string[]): string {\n if (!isLocaleLenghtValid(locale)) return DEFAULT_LOCALE;\n\n const formattedLocale = formatLocaleToLanguageCountryLocale(locale);\n const hasMatch = formattedLocale && supportedLocales.includes(formattedLocale);\n\n if (hasMatch) return formattedLocale;\n\n return matchLocale(formattedLocale || locale, supportedLocales) || DEFAULT_LOCALE;\n}\n\n/**\n * @description Makes sure that if custom translation is defined using not properly formatted locale keys, then it gets formatted correctly\n *\n * @example { en_US: { ... }} will be adjusted to { 'en-US': { ... }} . { ar: { ... }} is kept as is.\n */\nexport function formatCustomTranslations(customTranslations: CustomTranslations = {}): CustomTranslations {\n return Object.keys(customTranslations).reduce<CustomTranslations>((memo, localeKey) => {\n if (!isLocaleLenghtValid(localeKey)) return memo;\n\n const locale = formatLocaleToLanguageCountryLocale(localeKey) || toTwoLetterCode(localeKey);\n memo[locale] = customTranslations[localeKey];\n return memo;\n }, {});\n}\n\nconst replaceTranslationValues = (translation: string, values: Record<string, string>) => {\n return translation.replace(/%{(\\w+)}/g, (_, k) => values[k] || '');\n};\n\n/**\n * Returns a translation string by key\n * @param translations -\n * @param key -\n * @param options -\n *\n * @internal\n */\nexport const getTranslation = (\n translations: Record<string, string>,\n key: string,\n options: { values?: Record<string, string>; count?: number } = {}\n): string | null => {\n const { values = {}, count = 0 } = options;\n const keyPlural = `${key}__plural`;\n const keyForCount = (count: number) => `${key}__${count}`;\n\n if (Object.prototype.hasOwnProperty.call(translations, keyForCount(count))) {\n // Find key__count translation key\n return replaceTranslationValues(translations[keyForCount(count)], values);\n } else if (Object.prototype.hasOwnProperty.call(translations, keyPlural) && count > 1) {\n // Find key__plural translation key, if count greater than 1 (e.g. myTranslation__plural)\n return replaceTranslationValues(translations[keyPlural], values);\n } else if (Object.prototype.hasOwnProperty.call(translations, key)) {\n // Find key translation key (e.g. myTranslation)\n return replaceTranslationValues(translations[key], values);\n }\n\n return null;\n};\n\n/**\n * Injects JSX elements in a middle of a translation and returns a JSX array\n * The input string should use %# as the token to know where to insert the component\n * @param translation - Translation string\n * @param renderFunctions - An array function that renders JSX elements\n */\nexport const interpolateElement = (translation: string, renderFunctions: Array<(translation: string) => h.JSX.Element | string>) => {\n // splits by regex group, it guarantees that it only splits with 2 tokens (%#)\n const matches = translation.split(/%#(.*?)%#/gm);\n\n if (renderFunctions.length !== Math.floor(matches.length / 2)) {\n throw Error('The number of functions provided does not match the number of elements in the translation string.');\n }\n\n // the map will create an array of JSX / string elements, this syntax in accepted in JSX/react to render elements\n return matches.map((term, index) => {\n // math to get the index of the renderFunction that should be used\n // since we split on tokens, that means the index of the render function is half of the index of the string\n const indexInFunctionArray = Math.floor(index / 2);\n return index % 2 === 0 ? term : renderFunctions[indexInFunctionArray](term);\n });\n};\n"],"names":["toTwoLetterCode","locale","toLowerCase","substring","isLocaleLenghtValid","Boolean","length","LOCALE_NAME_MIN_LENGTH","LOCALE_NAME_MAX_LENGTH","matchLocale","supportedLocales","find","supLoc","formatLocaleToLanguageCountryLocale","localeParam","replace","test","languageCode","countryCode","split","fullLocale","toUpperCase","join","parseLocale","DEFAULT_LOCALE","formattedLocale","includes","formatCustomTranslations","customTranslations","Object","keys","reduce","memo","localeKey","replaceTranslationValues","translation","values","_","k","getTranslation","translations","key","options","count","keyPlural","keyForCount","prototype","hasOwnProperty","call","interpolateElement","renderFunctions","matches","Math","floor","Error","map","term","index","indexInFunctionArray"],"mappings":"wGAOA,MAAMA,EAAmBC,GAA2BA,EAAOC,cAAcC,UAAU,EAAG,GAOhFC,EAAuBH,GACzBI,QAAQJ,IAAWA,EAAOK,QAAUC,GAA0BN,EAAOK,QAAUE,EAY5E,SAASC,EAAYR,EAAgBS,GACxC,OAAKT,GAA4B,iBAAXA,GACfS,EAAiBC,KAAKC,GAAUZ,EAAgBY,KAAYZ,EAAgBC,KADjC,IAEtD,CAWO,SAASY,EAAoCC,GAChD,MAAMb,EAASa,EAAYC,QAAQ,IAAK,KAIxC,GAHe,4BAGJC,KAAKf,GAAS,OAAOA,EAGhC,MAAOgB,EAAcC,GAAejB,EAAOkB,MAAM,KAGjD,IAAKF,IAAiBC,EAAa,OAAO,KAG1C,MAAME,EAAa,CAACH,EAAaf,cAAegB,EAAYG,eAAeC,KAAK,KAEhF,OAA6B,IAAtBF,EAAWd,OAAec,EAAa,IAClD,CAEO,SAASG,EAAYtB,EAAgBS,GACxC,IAAKN,EAAoBH,GAAS,OAAOuB,EAEzC,MAAMC,EAAkBZ,EAAoCZ,GAG5D,OAFiBwB,GAAmBf,EAAiBgB,SAASD,GAEzCA,EAEdhB,EAAYgB,GAAmBxB,EAAQS,IAAqBc,CACvE,CAOO,SAASG,EAAyBC,EAAyC,IAC9E,OAAOC,OAAOC,KAAKF,GAAoBG,OAA2B,CAACC,EAAMC,KACrE,IAAK7B,EAAoB6B,GAAY,OAAOD,EAI5C,OADAA,EADenB,EAAoCoB,IAAcjC,EAAgBiC,IAClEL,EAAmBK,GAC3BD,GACR,CAAA,EACP,CAEA,MAAME,EAA2B,CAACC,EAAqBC,IAC5CD,EAAYpB,QAAQ,YAAa,CAACsB,EAAGC,IAAMF,EAAOE,IAAM,IAWtDC,EAAiB,CAC1BC,EACAC,EACAC,EAA+D,CAAA,KAE/D,MAAMN,OAAEA,EAAS,CAAA,EAAEO,MAAEA,EAAQ,GAAMD,EAC7BE,EAAY,GAAGH,YACfI,EAAeF,GAAkB,GAAGF,MAAQE,IAElD,OAAId,OAAOiB,UAAUC,eAAeC,KAAKR,EAAcK,EAAYF,IAExDT,EAAyBM,EAAaK,EAAYF,IAASP,GAC3DP,OAAOiB,UAAUC,eAAeC,KAAKR,EAAcI,IAAcD,EAAQ,EAEzET,EAAyBM,EAAaI,GAAYR,GAClDP,OAAOiB,UAAUC,eAAeC,KAAKR,EAAcC,GAEnDP,EAAyBM,EAAaC,GAAML,GAGhD,MASEa,EAAqB,CAACd,EAAqBe,KAEpD,MAAMC,EAAUhB,EAAYhB,MAAM,eAElC,GAAI+B,EAAgB5C,SAAW8C,KAAKC,MAAMF,EAAQ7C,OAAS,GACvD,MAAMgD,MAAM,qGAIhB,OAAOH,EAAQI,IAAI,CAACC,EAAMC,KAGtB,MAAMC,EAAuBN,KAAKC,MAAMI,EAAQ,GAChD,OAAOA,EAAQ,GAAM,EAAID,EAAON,EAAgBQ,GAAsBF"}
1
+ {"version":3,"file":"utils.js","sources":["../../../src/language/utils.ts"],"sourcesContent":["import { h } from 'preact';\nimport { CustomTranslations } from './types';\nimport { DEFAULT_LOCALE, LOCALE_NAME_MAX_LENGTH, LOCALE_NAME_MIN_LENGTH } from './constants';\n\n/**\n * @description Convert to ISO 639-1\n */\nconst toTwoLetterCode = (locale: string): string => locale.toLowerCase().substring(0, 2);\n\n/**\n * @description Checks if the locale length is valid\n * @param locale - The locale to check\n * @returns true if the locale length is valid, false otherwise\n */\nconst isLocaleLenghtValid = (locale: string): boolean =>\n Boolean(locale) && locale.length >= LOCALE_NAME_MIN_LENGTH && locale.length <= LOCALE_NAME_MAX_LENGTH;\n\n/**\n * Matches a string with one of the locales\n *\n * @param locale - The locale to match\n * @param supportedLocales - Array of possible locales\n *\n * @example\n * matchLocale('en-GB', ['en-US', 'es-ES']);\n * // returns 'en-US'\n */\nexport function matchLocale(locale: string, supportedLocales: readonly string[]): string | null {\n if (!locale || typeof locale !== 'string') return null;\n\n const lowerLocale = locale.toLowerCase();\n const exactMatch = supportedLocales.find(supLoc => supLoc.toLowerCase() === lowerLocale);\n\n if (exactMatch) return exactMatch;\n\n const localeTwoLetter = toTwoLetterCode(locale);\n return supportedLocales.find(supLoc => toTwoLetterCode(supLoc) === localeTwoLetter) || null;\n}\n\n/**\n * Returns a locale with the proper format.\n *\n * @param localeParam - Locale example: 'En_us' or 'en-US'\n *\n * @example\n * formatLocaleToLanguageCountryLocale('En_us');\n * // returns 'en-US'\n */\nexport function formatLocaleToLanguageCountryLocale(localeParam: string): string | null {\n const locale = localeParam.replace('_', '-');\n const format = /^([a-z]{2})(-)([A-Z]{2})$/;\n\n // If it's already formatted, return the locale\n if (format.test(locale)) return locale;\n\n // Split the string in two\n const [languageCode, countryCode] = locale.split('-');\n\n // If the locale or the country codes are missing, return null\n if (!languageCode || !countryCode) return null;\n\n // Ensure correct format and join the strings back together\n const fullLocale = [languageCode.toLowerCase(), countryCode.toUpperCase()].join('-');\n\n return fullLocale.length === 5 ? fullLocale : null;\n}\n\nexport function parseLocale(locale: string, supportedLocales: readonly string[]): string {\n if (!isLocaleLenghtValid(locale)) return DEFAULT_LOCALE;\n\n const formattedLocale = formatLocaleToLanguageCountryLocale(locale);\n const hasMatch = formattedLocale && supportedLocales.includes(formattedLocale);\n\n if (hasMatch) return formattedLocale;\n\n return matchLocale(formattedLocale || locale, supportedLocales) || DEFAULT_LOCALE;\n}\n\n/**\n * @description Makes sure that if custom translation is defined using not properly formatted locale keys, then it gets formatted correctly\n *\n * @example { en_US: { ... }} will be adjusted to { 'en-US': { ... }} . { ar: { ... }} is kept as is.\n */\nexport function formatCustomTranslations(customTranslations: CustomTranslations = {}): CustomTranslations {\n return Object.keys(customTranslations).reduce<CustomTranslations>((memo, localeKey) => {\n if (!isLocaleLenghtValid(localeKey)) return memo;\n\n const locale = formatLocaleToLanguageCountryLocale(localeKey) || toTwoLetterCode(localeKey);\n memo[locale] = customTranslations[localeKey];\n return memo;\n }, {});\n}\n\nconst replaceTranslationValues = (translation: string, values: Record<string, string>) => {\n return translation.replace(/%{(\\w+)}/g, (_, k) => values[k] || '');\n};\n\n/**\n * Returns a translation string by key\n * @param translations -\n * @param key -\n * @param options -\n *\n * @internal\n */\nexport const getTranslation = (\n translations: Record<string, string>,\n key: string,\n options: { values?: Record<string, string>; count?: number } = {}\n): string | null => {\n const { values = {}, count = 0 } = options;\n const keyPlural = `${key}__plural`;\n const keyForCount = (count: number) => `${key}__${count}`;\n\n if (Object.prototype.hasOwnProperty.call(translations, keyForCount(count))) {\n // Find key__count translation key\n return replaceTranslationValues(translations[keyForCount(count)], values);\n } else if (Object.prototype.hasOwnProperty.call(translations, keyPlural) && count > 1) {\n // Find key__plural translation key, if count greater than 1 (e.g. myTranslation__plural)\n return replaceTranslationValues(translations[keyPlural], values);\n } else if (Object.prototype.hasOwnProperty.call(translations, key)) {\n // Find key translation key (e.g. myTranslation)\n return replaceTranslationValues(translations[key], values);\n }\n\n return null;\n};\n\n/**\n * Injects JSX elements in a middle of a translation and returns a JSX array\n * The input string should use %# as the token to know where to insert the component\n * @param translation - Translation string\n * @param renderFunctions - An array function that renders JSX elements\n */\nexport const interpolateElement = (translation: string, renderFunctions: Array<(translation: string) => h.JSX.Element | string>) => {\n // splits by regex group, it guarantees that it only splits with 2 tokens (%#)\n const matches = translation.split(/%#(.*?)%#/gm);\n\n if (renderFunctions.length !== Math.floor(matches.length / 2)) {\n throw Error('The number of functions provided does not match the number of elements in the translation string.');\n }\n\n // the map will create an array of JSX / string elements, this syntax in accepted in JSX/react to render elements\n return matches.map((term, index) => {\n // math to get the index of the renderFunction that should be used\n // since we split on tokens, that means the index of the render function is half of the index of the string\n const indexInFunctionArray = Math.floor(index / 2);\n return index % 2 === 0 ? term : renderFunctions[indexInFunctionArray](term);\n });\n};\n"],"names":["toTwoLetterCode","locale","toLowerCase","substring","isLocaleLenghtValid","Boolean","length","LOCALE_NAME_MIN_LENGTH","LOCALE_NAME_MAX_LENGTH","matchLocale","supportedLocales","lowerLocale","exactMatch","find","supLoc","localeTwoLetter","formatLocaleToLanguageCountryLocale","localeParam","replace","test","languageCode","countryCode","split","fullLocale","toUpperCase","join","parseLocale","DEFAULT_LOCALE","formattedLocale","includes","formatCustomTranslations","customTranslations","Object","keys","reduce","memo","localeKey","replaceTranslationValues","translation","values","_","k","getTranslation","translations","key","options","count","keyPlural","keyForCount","prototype","hasOwnProperty","call","interpolateElement","renderFunctions","matches","Math","floor","Error","map","term","index","indexInFunctionArray"],"mappings":"wGAOA,MAAMA,EAAmBC,GAA2BA,EAAOC,cAAcC,UAAU,EAAG,GAOhFC,EAAuBH,GACzBI,QAAQJ,IAAWA,EAAOK,QAAUC,GAA0BN,EAAOK,QAAUE,EAY5E,SAASC,EAAYR,EAAgBS,GACxC,IAAKT,GAA4B,iBAAXA,EAAqB,OAAO,KAElD,MAAMU,EAAcV,EAAOC,cACrBU,EAAaF,EAAiBG,KAAKC,GAAUA,EAAOZ,gBAAkBS,GAE5E,GAAIC,EAAY,OAAOA,EAEvB,MAAMG,EAAkBf,EAAgBC,GACxC,OAAOS,EAAiBG,KAAKC,GAAUd,EAAgBc,KAAYC,IAAoB,IAC3F,CAWO,SAASC,EAAoCC,GAChD,MAAMhB,EAASgB,EAAYC,QAAQ,IAAK,KAIxC,GAHe,4BAGJC,KAAKlB,GAAS,OAAOA,EAGhC,MAAOmB,EAAcC,GAAepB,EAAOqB,MAAM,KAGjD,IAAKF,IAAiBC,EAAa,OAAO,KAG1C,MAAME,EAAa,CAACH,EAAalB,cAAemB,EAAYG,eAAeC,KAAK,KAEhF,OAA6B,IAAtBF,EAAWjB,OAAeiB,EAAa,IAClD,CAEO,SAASG,EAAYzB,EAAgBS,GACxC,IAAKN,EAAoBH,GAAS,OAAO0B,EAEzC,MAAMC,EAAkBZ,EAAoCf,GAG5D,OAFiB2B,GAAmBlB,EAAiBmB,SAASD,GAEzCA,EAEdnB,EAAYmB,GAAmB3B,EAAQS,IAAqBiB,CACvE,CAOO,SAASG,EAAyBC,EAAyC,IAC9E,OAAOC,OAAOC,KAAKF,GAAoBG,OAA2B,CAACC,EAAMC,KACrE,IAAKhC,EAAoBgC,GAAY,OAAOD,EAI5C,OADAA,EADenB,EAAoCoB,IAAcpC,EAAgBoC,IAClEL,EAAmBK,GAC3BD,GACR,CAAA,EACP,CAEA,MAAME,EAA2B,CAACC,EAAqBC,IAC5CD,EAAYpB,QAAQ,YAAa,CAACsB,EAAGC,IAAMF,EAAOE,IAAM,IAWtDC,EAAiB,CAC1BC,EACAC,EACAC,EAA+D,CAAA,KAE/D,MAAMN,OAAEA,EAAS,CAAA,EAAEO,MAAEA,EAAQ,GAAMD,EAC7BE,EAAY,GAAGH,YACfI,EAAeF,GAAkB,GAAGF,MAAQE,IAElD,OAAId,OAAOiB,UAAUC,eAAeC,KAAKR,EAAcK,EAAYF,IAExDT,EAAyBM,EAAaK,EAAYF,IAASP,GAC3DP,OAAOiB,UAAUC,eAAeC,KAAKR,EAAcI,IAAcD,EAAQ,EAEzET,EAAyBM,EAAaI,GAAYR,GAClDP,OAAOiB,UAAUC,eAAeC,KAAKR,EAAcC,GAEnDP,EAAyBM,EAAaC,GAAML,GAGhD,MASEa,EAAqB,CAACd,EAAqBe,KAEpD,MAAMC,EAAUhB,EAAYhB,MAAM,eAElC,GAAI+B,EAAgB/C,SAAWiD,KAAKC,MAAMF,EAAQhD,OAAS,GACvD,MAAMmD,MAAM,qGAIhB,OAAOH,EAAQI,IAAI,CAACC,EAAMC,KAGtB,MAAMC,EAAuBN,KAAKC,MAAMI,EAAQ,GAChD,OAAOA,EAAQ,GAAM,EAAID,EAAON,EAAgBQ,GAAsBF"}
@@ -1,2 +1,2 @@
1
- var e={payButton:"Pay","payButton.redirecting":"Redirecting...","payButton.with":"Pay %{value} with %{maskedData}","payButton.saveDetails":"Save details",close:"Close",storeDetails:"Save for my next payment",readMore:"Read more","creditCard.holderName":"Name on card","creditCard.holderName.invalid":"Enter name as shown on card","creditCard.expiryDateField.month":"Month","creditCard.expiryDateField.year":"Year","creditCard.storeDetailsButton":"Remember for next time","creditCard.dualBrand.title":"Card Brand","creditCard.dualBrand.description":"You can select the card brand you prefer to pay with. This is optional.",installments:"Number of installments",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} months","installments.oneTime":"One time payment","installments.installments":"Installments payment","installments.revolving":"Revolving payment","installments.bonus":"Bonus payment","sepaDirectDebit.ibanField.invalid":"Invalid account number","sepa.ownerName":"Holder Name","sepa.ibanNumber":"Account Number (IBAN)","error.title":"Error","error.subtitle.redirect":"Redirect failed","error.subtitle.payment":"Payment failed","error.subtitle.refused":"Payment refused","error.message.unknown":"An unknown error occurred","errorPanel.title":"Existing errors","idealIssuer.selectField.title":"Bank","creditCard.success":"Payment Successful",loading:"Loading…",continue:"Continue",continueTo:"Continue to","wechatpay.timetopay":"You have %@ to pay","sr.wechatpay.timetopay":"You have %#minutes%# %#seconds%# to pay","wechatpay.scanqrcode":"Scan QR code",personalDetails:"Personal details",companyDetails:"Company details","companyDetails.name":"Company name","companyDetails.registrationNumber":"Registration number",socialSecurityNumber:"Social security number",firstName:"First name","firstName.invalid":"Enter your first name",infix:"Prefix",lastName:"Last name","lastName.invalid":"Enter your last name",mobileNumber:"Mobile number","mobileNumber.invalid":"Invalid mobile number",city:"City",postalCode:"Postal code","postalCode.optional":"Postal code (optional)",countryCode:"Country Code",telephoneNumber:"Telephone number",telephonePrefix:"Prefix",dateOfBirth:"Date of birth",shopperEmail:"Email address",gender:"Gender","gender.notselected":"Select your gender",male:"Male",female:"Female",billingAddress:"Billing address",street:"Street",stateOrProvince:"State or province",country:"Country/Region",houseNumberOrName:"House number",separateDeliveryAddress:"Specify a separate delivery address",deliveryAddress:"Delivery Address","deliveryAddress.firstName":"Recipient first name","deliveryAddress.lastName":"Recipient last name",zipCode:"Zip code",apartmentSuite:"Apartment / Suite",provinceOrTerritory:"Province or Territory",cityTown:"City / Town",address:"Address","address.search.contextualText":"Type to start searching your address","address.errors.incomplete":"Enter an address to continue","address.enterManually":"Enter address manually",state:"State",payAmountFormat:"Pay %@","field.title.optional":"(optional)","issuerList.selectField.contextualText":"Select your bank to continue","issuerList.selectField.label":"Bank selection",privacyPolicy:"Privacy policy","afterPay.agreement":"I agree with the %@ of Riverty","riverty.termsAndConditions":"I agree with the general %#Terms & Conditions%# for the Riverty Payment Method. The privacy policy of Riverty can be found %#here%#.",paymentConditions:"payment conditions",openApp:"Open the app","voucher.readInstructions":"Read instructions","voucher.introduction":"Thank you for your purchase, please use the following coupon to complete your payment.","voucher.expirationDate":"Expiration Date","voucher.alternativeReference":"Alternative Reference","voucher.paymentReferenceLabel":"Payment Reference","voucher.surcharge":"Incl. %@ surcharge","voucher.introduction.doku":"Thank you for your purchase, please use the following information to complete your payment.","voucher.shopperName":"Shopper Name","voucher.merchantName":"Merchant","voucher.introduction.econtext":"Thank you for your purchase, please use the following information to complete your payment.","voucher.telephoneNumber":"Phone Number","voucher.shopperReference":"Shopper Reference","voucher.collectionInstitutionNumber":"Collection Institution Number","voucher.econtext.telephoneNumber.invalid":"Telephone number must be 10 or 11 digits long","boletobancario.btnLabel":"Generate Boleto","boleto.sendCopyToEmail":"Send a copy to my email","button.copy":"Copy","button.copied":"Copied!","button.download":"Download","boleto.socialSecurityNumber":"CPF/CNPJ","boleto.socialSecurityNumber.invalid":"Enter a valid CPF/CNPJ number","creditCard.storedCard.description.ariaLabel":"Stored card ends in %@","voucher.entity":"Entity",donateButton:"Donate",donationTermsCondition:"By donating you agree to the %#terms and conditions%#",donationRoundUpDescription:"%{donationAmount} is a round up from your original payment (%{originalPaymentAmount})",notNowButton:"Not now",thanksForYourSupport:"Thanks for your support!","resultMessages.preauthorized":"Details saved",preauthorizeWith:"Preauthorize with",confirmPreauthorization:"Confirm preauthorization",confirmPurchase:"Confirm purchase",applyGiftcard:"Redeem",giftcardBalance:"Gift card balance",deductedBalance:"Deducted balance","creditCard.taxNumber":"Cardholder birthdate or Corporate registration number","creditCard.taxNumber.label":"Cardholder birthdate (YYMMDD) or Corporate registration number (10 digits)","creditCard.taxNumber.labelAlt":"Corporate registration number (10 digits)","creditCard.taxNumber.invalid":"Invalid Cardholder birthdate or Corporate registration number","storedPaymentMethod.disable.button":"Remove","storedPaymentMethod.disable.confirmation":"Remove stored payment method","storedPaymentMethod.disable.confirmButton":"Yes, remove","storedPaymentMethod.disable.cancelButton":"Cancel","ach.bankAccount":"Bank account","ach.bankAccount.title":"Bank account details","ach.bankAccount.label":"Account type","ach.bankAccount.placeholder":"Choose an account type","ach.bankAccount.nothing-selected-error":"Choose an account type","ach.bankAccount.option.personal-checking":"Personal Checking Account","ach.bankAccount.option.personal-savings":"Personal Savings Account","ach.bankAccount.option.business-checking":"Business Checking Account","ach.bankAccount.option.business-savings":"Business Savings Account","ach.bankAccountNumberVerification.label":"Verify account number","ach.bankAccountNumberVerification.error.not-match":"Account number does not match","ach.bankAccountNumberVerification.error.empty":"Enter the provided account number to verify the account number","ach.routingNumber.label":"Routing number","ach.accountHolderNameField.title":"Account holder name","ach.accountHolderNameField.contextualText":"Located on the front of your card","ach.accountHolderNameField.invalid":"Invalid account holder name","ach.accountNumberField.invalid":"Invalid account number","ach.accountLocationField.invalid":"Invalid ABA routing number","ach.savedBankAccount":"Saved bank account","ach.savings":"Savings account","ach.checking":"Checking account","select.state":"Select state","select.stateOrProvince":"Select state or province","select.provinceOrTerritory":"Select province or territory","select.country":"Select country/region","select.noOptionsFound":"No options found","select.results":"%{count} results available","telephoneNumber.invalid":"Invalid telephone number",qrCodeOrApp:"or","paypal.processingPayment":"Processing payment...",generateQRCode:"Generate QR code","await.waitForConfirmation":"Waiting for confirmation","mbway.confirmPayment":"Confirm your payment on the MB WAY app","shopperEmail.invalid":"Invalid email address","dateOfBirth.format":"DD/MM/YYYY","dateOfBirth.invalid":"Enter a valid date of birth that indicates you are at least 18 years old","blik.confirmPayment":"Open your banking app to confirm the payment.","blik.invalid":"Enter 6 numbers","blik.code":"6-digit code","blik.help":"Get the code from your banking app.","swish.pendingMessage":"After you scan, the status can be pending for up to 10 minutes. Attempting to pay again within this time may result in multiple charges.","field.valid":"Field valid","field.invalid":"Field not valid","field.error.required":"Enter the %{label}","field.error.invalid":"Enter a valid %{label}","error.giftcard.no-balance":"This gift card has zero balance","error.giftcard.card-error":"In our records we have no gift card with this number","error.giftcard.currency-error":"Gift cards are only valid in the currency they were issued in","err.gen.9100":"Incomplete field","err.gen.9101":"Field not valid","err.gen.9102":"Data parsing error","3ds.chal.805":"Challenge resolved without a %{result} object","cc.num.902":"Enter a valid card number","cc.num.900":"Enter the card number","cc.num.903":"Enter a supported card brand","cc.num.901":"Enter the complete card number","cc.dat.912":"Enter a valid expiry date","cc.dat.913":"Enter a valid expiry date","cc.dat.914":"Credit card about to expire","cc.dat.910":"Enter the expiry date","cc.dat.911":"Enter the complete expiry date","cc.mth.915":"Enter the expiry month","cc.yr.917":"Enter the expiry year","cc.yr.918":"Enter the complete expiry year","cc.cvc.920":"Enter the security code","cc.cvc.921":"Enter the complete security code","ach.num.945":"Enter the bank account number","ach.num.946":"Enter the complete bank account number","ach.loc.947":"Enter the bank routing number","ach.loc.948":"Enter the complete bank routing number","kcp.pwd.940":"Enter the password","kcp.pwd.941":"Enter the complete password","amazonpay.signout":"Sign out from Amazon","amazonpay.changePaymentDetails":"Change payment details","partialPayment.warning":"Select another payment method to pay the remaining","partialPayment.remainingBalance":"Remaining balance will be %{amount}","order.paymentMethod.description":"%{name} ending in %{lastFour}","bankTransfer.beneficiary":"Beneficiary name","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Reference","bankTransfer.accountNumber":"Account number","bankTransfer.sortCode":"Sort code","bankTransfer.routingNumber":"Routing number","bankTransfer.branchCode":"Branch code","bankTransfer.bankCode":"Bank code","bankTransfer.introduction":"Press ‘Continue’ to create a new bank transfer payment. You can use the details in the following screen to finalize this payment.","bankTransfer.instructions":"Thank you for your purchase, please use the following information to complete your payment.","bankTransfer.shopperEmail.contextualText":"A copy of the payment details will be sent to your email so you can complete the payment later.","bankTransfer.details.title":"Payment details","bankTransfer.instruction.title":"Payment process","bankTransfer.instruction.step1":"Open your banking app","bankTransfer.instruction.step2":"Start a new transfer","bankTransfer.instruction.step3":"Enter the account details provided below","bankTransfer.instruction.step4":"Review and confirm the payment","bacs.accountHolderName":"Bank account holder name","bacs.accountHolderName.invalid":"Invalid bank account holder name","bacs.accountNumber":"Bank account number","bacs.accountNumber.invalid":"Invalid bank account number","bacs.bankLocationId":"Sort code","bacs.bankLocationId.invalid":"Invalid sort code","bacs.consent.amount":"I agree that the above amount will be deducted from my bank account.","bacs.consent.account":"I confirm the account is in my name and I am the only signatory required to authorise the Direct Debit on this account.",edit:"Edit","bacs.confirm":"Confirm and pay","bacs.result.introduction":"Download your Direct Debit Instruction (DDI / Mandate)","download.pdf":"Download PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Card number","creditCard.encryptedExpiryDate.aria.iframeTitle":"Expiry date","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Expiry month","creditCard.encryptedExpiryYear.aria.iframeTitle":"Expiry year","creditCard.encryptedSecurityCode.aria.iframeTitle":"Security code","creditCard.encryptedPassword.aria.iframeTitle":"Password","giftcard.encryptedCardNumber.aria.iframeTitle":"Card number","giftcard.encryptedSecurityCode.aria.iframeTitle":"Pin",giftcardTransactionLimit:"Max. %{amount} allowed per transaction on this gift card","pix.instructions":"Use your banking app to scan the QR code or copy the PIX code below to complete your payment.","pix.code.label":"PIX code","pix.code.copy.label":"Copy PIX code","pix.code.copied.label":"PIX code copied","twint.saved":"saved",orPayWith:"or pay with","invalid.format.expects":"%{label} Invalid format. Expected format: %{format}","upi.qrCodeWaitingMessage":"Scan the QR code using your preferred UPI app to complete the payment","upi.vpaWaitingMessage":"Open your UPI app to confirm the payment","upi.modeSelection":"How would you like to use UPI?","upi.completePayment":"Complete your payment","upi.mode.enterUpiId":"UPI ID","upi.mode.qrCode":"QR code","upi.mode.payByAnyUpi":"UPI apps","upi.collect.dropdown.label":"Enter UPI ID","upi.collect.instruction":"Enter your UPI ID","upi.collect.field.label":"UPI ID","upi.collect.field.contextualText":"Enter the UPI ID connected to your account and press continue","upi.collect.field.invalid-id-error":"Enter a valid UPI","upi.error.noAppSelected":"Select your preferred UPI app to continue","upi.intent.instruction":"Select your preferred UPI app","upi.qrCode.instruction":"After generating the QR code you can use your preferred UPI app to complete the payment.","onlineBanking.termsAndConditions":"By continuing you agree with the %#terms and conditions%#","onlineBankingPL.termsAndConditions":"By continuing you agree with the %#regulations%# and %#information obligation%# of Przelewy24","ctp.loading.poweredByCtp":"Powered by Click to Pay","ctp.loading.intro":"We are checking to see if you have any saved cards with Click to Pay...","ctp.login.title":"Continue to Click to Pay","ctp.login.subtitle":"Enter the email address that is connected to Click to Pay to continue.","ctp.login.inputLabel":"Email","ctp.logout.notYou":"Not you?","ctp.logout.notYourCards":"Not your cards?","ctp.logout.notYourCard":"Not your card?","ctp.logout.notYourProfile":"Not your profile?","ctp.otp.fieldLabel":"One time code","ctp.otp.resendCode":"Resend code","ctp.otp.codeResent":"Code resent","ctp.otp.title":"Access your Click to Pay cards","ctp.otp.subtitle":"Enter the code %@ sent to %@ to verify it‘s you.","ctp.otp.saveCookiesCheckbox.label":"Skip verification next time","ctp.otp.saveCookiesCheckbox.information":"Select to be remembered on your device and browser at participating stores for faster checkout. Not recommended for shared devices.","ctp.otp.saveCookiesCheckbox.shorterInfo":"Select to be remembered on your device and browser","ctp.emptyProfile.message":"No cards registered in this Click to Pay profile","ctp.separatorText":"or use","ctp.cards.title":"Complete payment with Click to Pay","ctp.cards.subtitle":"Select a card to use.","ctp.cards.expiredCard":"Expired","ctp.manualCardEntry":"Manual card entry","ctp.aria.infoModalButton":"What is Click to Pay","ctp.infoPopup.title":"Click to Pay brings the ease of contactless, online","ctp.infoPopup.subtitle":"A fast, secure payment method supported by Mastercard, Visa and other payment cards.","ctp.infoPopup.benefit1":"Click to Pay uses encryption to keep your information safe and secure","ctp.infoPopup.benefit2":"Use it with merchants worldwide","ctp.infoPopup.benefit3":"Set up once for hassle-free payments in the future","ctp.errors.AUTH_INVALID":"Authentication Invalid","ctp.errors.NOT_FOUND":"No account found, enter a valid email or continue using manual card entry","ctp.errors.ID_FORMAT_UNSUPPORTED":"Format not supported","ctp.errors.FRAUD":"The user account was locked or disabled","ctp.errors.CONSUMER_ID_MISSING":"Consumer identity is missing in the request","ctp.errors.ACCT_INACCESSIBLE":"This account is currently not available, e.g it is locked","ctp.errors.CODE_INVALID":"Incorrect verification code","ctp.errors.CODE_EXPIRED":"This code has expired","ctp.errors.RETRIES_EXCEEDED":"The limit for the number of retries for OTP generation was exceeded","ctp.errors.OTP_SEND_FAILED":"The OTP could not be sent to the recipient","ctp.errors.REQUEST_TIMEOUT":"Something went wrong, try again or use the manual card entry","ctp.errors.UNKNOWN_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.SERVICE_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.SERVER_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.INVALID_PARAMETER":"Something went wrong, try again or use the manual card entry","ctp.errors.INVALID_EMAIL":"Enter a valid email address (e.g. name@example.com)","ctp.errors.AUTH_ERROR":"Something went wrong, try again or use the manual card entry","paymentMethodsList.aria.label":"Choose a payment method","paymentMethodsList.storedPayments.label":"Saved payment methods","paymentMethodsList.otherPayments.label":"More payment options","paymentMethodsList.otherPayments.buttonLabel":"Show %{count} more","paymentMethodsList.promotedPayments.label":"Other","companyDetails.name.invalid":"Enter the company name","companyDetails.registrationNumber.invalid":"Enter the registration number","consent.checkbox.invalid":"You must agree with the terms & conditions","form.instruction":"All fields are required unless marked otherwise.","trustly.descriptor":"Instant Bank Payment","trustly.description1":"Pay directly from any of your bank accounts, backed by bank-level security","trustly.description2":"No cards, no app download, no registration","ancv.input.label":"Your ANCV identification","ancv.confirmPayment":"Use your ANCV application to confirm the payment.","ancv.form.instruction":"The Cheque-Vacances application is necessary to validate this payment.","ancv.beneficiaryId.invalid":"Enter a valid email address or ANCV ID","creditCard.cardNumber.label":"Card number","creditCard.expiryDate.label":"Expiry date","creditCard.expiryDate.contextualText":"Front of card in MM/YY format","creditCard.securityCode.label":"Security code","creditCard.securityCode.label.optional":"Security code (optional)","creditCard.securityCode.contextualText.3digits":"3 digits on back of card","creditCard.securityCode.contextualText.4digits":"4 digits on front of card","creditCard.expiryMonth.label":"Expiry month","creditCard.expiryYear.label":"Expiry year","creditCard.pin.label":"Pin","creditCard.password.label":"First 2 digits of card password","giftcard.cardNumber.label":"Card Number","giftcard.expiryDate.label":"Expiry date","giftcard.securityCode.label":"Pin","ach.bankAccountNumber.label":"Account number","ach.bankLocationId.label":"ABA routing number","dragonpayVoucher.selectField.contextualText.nonBank":"Select your provider","dragonpayVoucher.selectField.contextualText.bank":"Select your bank","payme.openPayMeApp":"Complete your payment in the PayMe app by authorizing the payment in the app and wait for the confirmation.","payme.redirectButtonLabel":"Open PayMe app","payme.scanQrCode":"Complete your payment by QR code","payme.timeToPay":"This QR code is valid for %@","payme.instructions.steps":"Open the PayMe app.%@Scan the QR code to authorize the payment.%@Complete the payment in the app and wait for confirmation.","payme.instructions.footnote":"Please do not close this page before the payment is completed","payByBankAISDD.disclaimer.header":"Use Pay by Bank to pay instantly from any bank account.","payByBankAISDD.disclaimer.body":"By connecting your bank account you are authorizing debits to your account for any amount owed for use of our services and/or purchase of our products, until this authorization is revoked.","paymentMethodBrand.other":"other","paynow.scanQrCode":"Scan the QR code using the PayNow app to complete the payment","paynow.mobileViewInstruction.step1":"Take a screenshot of the QR code.","paynow.mobileViewInstruction.step2":"Open the PayNow bank or payment app.","paynow.mobileViewInstruction.step3":"Select the option to scan a QR code.","paynow.mobileViewInstruction.step4":"Choose the option to upload a QR and select the screenshot.","paynow.mobileViewInstruction.step5":"Complete the transaction.","payto.payid.description":"Enter the PayID and account details that are connected to your PayTo account.","payto.payid.label.identifier":"Identifier","payto.payid.label.orgid":"Organization ID","payto.payid.option.phone":"Mobile","payto.payid.option.email":"Email","payto.payid.option.orgid":"Organization ID","payto.bsb.description":"Enter the bank account number and the Bank State Branch that is connected to your account to continue","payto.bsb.label.bankAccountNumber":"Bank account number","payto.instructions.steps":"Log into your PayTo banking app@Authorize the PayTo agreement@Approve the payment terms@Complete the transaction","payto.confirmPayment":"Thank you for your purchase, complete your payment by following the instructions below.","payto.mandate.amount.label":"Amount","payto.mandate.frequency.label":"Frequency","payto.mandate.remarks.label":"Description","payto.mandate.startsAt.label":"First payment date","payto.mandate.endsAt.label":"End date","payto.mandate.payee.label":"Payee","payto.mandate.amount.max":"Up to %{amount} per transaction","payto.mandate.frequency.adhoc-no-count":"Ad Hoc","payto.mandate.frequency.adhoc":"%{count} time(s)","payto.mandate.frequency.daily":"%{count} payment(s) Daily","payto.mandate.frequency.weekly":"%{count} payment(s) Weekly","payto.mandate.frequency.biWeekly":"%{count} payment(s) Fortnightly","payto.mandate.frequency.monthly":"%{count} payment(s) Monthly","payto.mandate.frequency.quarterly":"%{count} payment(s) Quarterly","payto.mandate.frequency.halfYearly":"%{count} payment(s) Bi-Annual","payto.mandate.frequency.yearly":"%{count} payment(s) Yearly","payto.label.firstName":"Account holder first name","payto.label.lastName":"Account holder last name","payto.await.waitForConfirmation":"Awaiting your approval","payto.bsb.option.label":"BSB and account number","card.fastlane.a11y.logo":"Fastlane by Paypal logo","card.fastlane.a11y.openDialog":"Read more about Fastlane","card.fastlane.a11y.closeDialog":"Close dialog","card.fastlane.mobileInputLabel":"Mobile number","card.fastlane.consentToggle":"Save your info with Fastlane for faster checkouts and more","card.fastlane.consentText":"By saving your info, you agree to get codes by text to use Fastlane everywhere it's available. Fastlane will text the number provided. You also agree to this %#terms%# and %#privacy statement%#.","card.fastlane.modal.benefit1.header":"Autofill your checkouts","card.fastlane.modal.benefit1.text":"Get one-time codes to use card and addresses you’ve saved.","card.fastlane.modal.benefit2.header":"Protect your info","card.fastlane.modal.benefit2.text":"Your payment info is encrypted when it’s stored and sent to places you shop.","card.fastlane.modal.benefit3.header":"Use across stores","card.fastlane.modal.benefit3.text":"Speed through checkout everywhere Fastlane is available.","paybybankpix.redirectBtn.label":"Continue to PIX through OpenBanking","paybybankpix.issuerList.disclaimer":"By continuing, you agree to the %#Consent Notice%# and will be redirected to your bank.","paybybankpix.issuerList.selectField.label":"Bank","paybybankpix.issuerList.introduction.logo.content":"Connect your favorite PIX keys to pay through Open Finance","paybybankpix.await.waitForConfirmation":"Waiting for your confirmation...","paybybankpix.await.timeToPay":"This process will take approximately %{numberOfMin} minute(s)","paybybankpix.await.withOpenFinance":"With the ease of Open Finance","paybybankpix.await.logoAlt.openFinance":"Open Finance","paybybankpix.storedPayment.payButton.label":"Continue payment","paybybankpix.storedPayment.additionalLabel":"%{receiver} account through PIX","paybybankpix.await.fetchDetails":"Fetching details...","eftpad-canada.input.accountHolderName.label":"Account holder name","eftpad-canada.input.accountHolderName.error":"Enter an account holder name","eftpad-canada.input.accountNumber.label":"Account number","eftpad-canada.input.accountNumber.contextualText":"Between 7 and 12 digits","eftpad-canada.input.accountNumber.error":"Enter an account number that is between 7 and 12 digits","eftpad-canada.input.institutionNumber.label":"Institution number","eftpad-canada.input.institutionNumber.contextualText":"3 digits","eftpad-canada.input.institutionNumber.error":"Enter an institution number that consists of 3 digits","eftpad-canada.input.transitNumber.label":"Transit number","eftpad-canada.input.transitNumber.contextualText":"5 digits","eftpad-canada.input.transitNumber.error":"Enter a transit number that consists of 5 digits","eftpad-canada.settlement-info":"The funds will be withdrawn from your bank account within 1–3 business days.","upi.mandate.intro":"You’re setting up a UPI Autopay recurring payment","upi.mandate.max.extraText":"You’ll approve a higher limit to allow future plan changes","upi.mandate.upTo":"up to %{amount}","upi.mandate.frequency.monthly":"/month","upi.mandate.frequency.weekly":"/week","upi.mandate.frequency.adhoc":" as presented",bankList:"Bank list",qrCode:"QR code","iris.instructions.generateQrCode":"After generating the QR code you can use your preferred banking app to complete the payment.","iris.instructions.payment.step1":"Open your preferred banking app.","iris.instructions.payment.step2":"Scan the QR code with your banking app.","iris.instructions.payment.step3":"Complete the payment in the app and wait for the confirmation here.","econtext.customerNumber":"Customer number","econtext.confirmationNumber":"Confirmation number","econtext.useBefore":"Use before","econtext.paymentInformation":"Payment information","issuerList.separatorText":"or choose from list","upi.intent.apps.title":"Options","upi.intent.apps.dropdown.label":"UPI apps","upi.intent.apps.dropdown.placeholder":"Choose preferred app"};export{e as default};
1
+ var e={payButton:"Pay","payButton.redirecting":"Redirecting...","payButton.with":"Pay %{value} with %{maskedData}","payButton.saveDetails":"Save details",close:"Close",storeDetails:"Save for my next payment",readMore:"Read more","creditCard.holderName":"Name on card","creditCard.holderName.invalid":"Enter name as shown on card","creditCard.expiryDateField.month":"Month","creditCard.expiryDateField.year":"Year","creditCard.storeDetailsButton":"Remember for next time","creditCard.dualBrand.title":"Card Brand","creditCard.dualBrand.description":"You can select the card brand you prefer to pay with. This is optional.",installments:"Number of installments",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} months","installments.oneTime":"One time payment","installments.installments":"Installments payment","installments.revolving":"Revolving payment","installments.bonus":"Bonus payment","sepaDirectDebit.ibanField.invalid":"Invalid account number","sepa.ownerName":"Holder Name","sepa.ibanNumber":"Account Number (IBAN)","error.title":"Error","error.subtitle.redirect":"Redirect failed","error.subtitle.payment":"Payment failed","error.subtitle.refused":"Payment refused","error.message.unknown":"An unknown error occurred","errorPanel.title":"Existing errors","idealIssuer.selectField.title":"Bank","creditCard.success":"Payment Successful",loading:"Loading…",continue:"Continue",continueTo:"Continue to","wechatpay.timetopay":"You have %@ to pay","sr.wechatpay.timetopay":"You have %#minutes%# %#seconds%# to pay","wechatpay.scanqrcode":"Scan QR code",personalDetails:"Personal details",companyDetails:"Company details","companyDetails.name":"Company name","companyDetails.registrationNumber":"Registration number",socialSecurityNumber:"Social security number",firstName:"First name","firstName.invalid":"Enter your first name",infix:"Prefix",lastName:"Last name","lastName.invalid":"Enter your last name",mobileNumber:"Mobile number","mobileNumber.invalid":"Invalid mobile number",city:"City",postalCode:"Postal code","postalCode.optional":"Postal code (optional)",countryCode:"Country Code",telephoneNumber:"Telephone number",telephonePrefix:"Prefix",dateOfBirth:"Date of birth",shopperEmail:"Email address",gender:"Gender","gender.notselected":"Select your gender",male:"Male",female:"Female",billingAddress:"Billing address",street:"Street",stateOrProvince:"State or province",country:"Country/Region",houseNumberOrName:"House number",separateDeliveryAddress:"Specify a separate delivery address",deliveryAddress:"Delivery Address","deliveryAddress.firstName":"Recipient first name","deliveryAddress.lastName":"Recipient last name",zipCode:"Zip code",apartmentSuite:"Apartment / Suite",provinceOrTerritory:"Province or Territory",cityTown:"City / Town",address:"Address","address.search.contextualText":"Type to start searching your address","address.errors.incomplete":"Enter an address to continue","address.enterManually":"Enter address manually",state:"State",payAmountFormat:"Pay %@","field.title.optional":"(optional)","issuerList.selectField.contextualText":"Select your bank to continue","issuerList.selectField.label":"Bank selection",privacyPolicy:"Privacy policy","afterPay.agreement":"I agree with the %@ of Riverty","riverty.termsAndConditions":"I agree with the general %#Terms & Conditions%# for the Riverty Payment Method. The privacy policy of Riverty can be found %#here%#.",paymentConditions:"payment conditions",openApp:"Open the app","voucher.readInstructions":"Read instructions","voucher.introduction":"Thank you for your purchase, please use the following coupon to complete your payment.","voucher.expirationDate":"Expiration Date","voucher.alternativeReference":"Alternative Reference","voucher.paymentReferenceLabel":"Payment Reference","voucher.surcharge":"Incl. %@ surcharge","voucher.introduction.doku":"Thank you for your purchase, please use the following information to complete your payment.","voucher.shopperName":"Shopper Name","voucher.merchantName":"Merchant","voucher.introduction.econtext":"Thank you for your purchase, please use the following information to complete your payment.","voucher.telephoneNumber":"Phone Number","voucher.shopperReference":"Shopper Reference","voucher.collectionInstitutionNumber":"Collection Institution Number","voucher.econtext.telephoneNumber.invalid":"Telephone number must be 10 or 11 digits long","boletobancario.btnLabel":"Generate Boleto","boleto.sendCopyToEmail":"Send a copy to my email","button.copy":"Copy","button.copied":"Copied!","button.download":"Download","boleto.socialSecurityNumber":"CPF/CNPJ","boleto.socialSecurityNumber.invalid":"Enter a valid CPF/CNPJ number","creditCard.storedCard.description.ariaLabel":"Stored card ends in %@","voucher.entity":"Entity",donateButton:"Donate",donationTermsCondition:"By donating you agree to the %#terms and conditions%#",donationRoundUpDescription:"%{donationAmount} is a round up from your original payment (%{originalPaymentAmount})",notNowButton:"Not now",thanksForYourSupport:"Thanks for your support!","resultMessages.preauthorized":"Details saved",preauthorizeWith:"Preauthorize with",confirmPreauthorization:"Confirm preauthorization",confirmPurchase:"Confirm purchase",applyGiftcard:"Redeem",giftcardBalance:"Gift card balance",deductedBalance:"Deducted balance","creditCard.taxNumber":"Cardholder birthdate or Corporate registration number","creditCard.taxNumber.label":"Cardholder birthdate (YYMMDD) or Corporate registration number (10 digits)","creditCard.taxNumber.labelAlt":"Corporate registration number (10 digits)","creditCard.taxNumber.invalid":"Invalid Cardholder birthdate or Corporate registration number","storedPaymentMethod.disable.button":"Remove","storedPaymentMethod.disable.confirmation":"Remove stored payment method","storedPaymentMethod.disable.confirmButton":"Yes, remove","storedPaymentMethod.disable.cancelButton":"Cancel","ach.bankAccount":"Bank account","ach.bankAccount.title":"Bank account details","ach.bankAccount.label":"Account type","ach.bankAccount.placeholder":"Choose an account type","ach.bankAccount.nothing-selected-error":"Choose an account type","ach.bankAccount.option.personal-checking":"Personal Checking Account","ach.bankAccount.option.personal-savings":"Personal Savings Account","ach.bankAccount.option.business-checking":"Business Checking Account","ach.bankAccount.option.business-savings":"Business Savings Account","ach.bankAccountNumberVerification.label":"Verify account number","ach.bankAccountNumberVerification.error.not-match":"Account number does not match","ach.bankAccountNumberVerification.error.empty":"Enter the provided account number to verify the account number","ach.routingNumber.label":"Routing number","ach.accountHolderNameField.title":"Account holder name","ach.accountHolderNameField.contextualText":"Located on the front of your card","ach.accountHolderNameField.invalid":"Invalid account holder name","ach.accountNumberField.invalid":"Invalid account number","ach.accountLocationField.invalid":"Invalid ABA routing number","ach.savedBankAccount":"Saved bank account","ach.savings":"Savings account","ach.checking":"Checking account","select.state":"Select state","select.stateOrProvince":"Select state or province","select.provinceOrTerritory":"Select province or territory","select.country":"Select country/region","select.noOptionsFound":"No options found","select.results":"%{count} results available","telephoneNumber.invalid":"Invalid telephone number",qrCodeOrApp:"or","paypal.processingPayment":"Processing payment...",generateQRCode:"Generate QR code","await.waitForConfirmation":"Waiting for confirmation","mbway.confirmPayment":"Confirm your payment on the MB WAY app","shopperEmail.invalid":"Invalid email address","dateOfBirth.format":"DD/MM/YYYY","dateOfBirth.invalid":"Enter a valid date of birth that indicates you are at least 18 years old","blik.confirmPayment":"Open your banking app to confirm the payment.","blik.invalid":"Enter 6 numbers","blik.code":"6-digit code","blik.help":"Get the code from your banking app.","swish.pendingMessage":"After you scan, the status can be pending for up to 10 minutes. Attempting to pay again within this time may result in multiple charges.","field.valid":"Field valid","field.invalid":"Field not valid","field.error.required":"Enter the %{label}","field.error.invalid":"Enter a valid %{label}","error.giftcard.no-balance":"This gift card has zero balance","error.giftcard.card-error":"In our records we have no gift card with this number","error.giftcard.currency-error":"Gift cards are only valid in the currency they were issued in","err.gen.9100":"Incomplete field","err.gen.9101":"Field not valid","err.gen.9102":"Data parsing error","3ds.chal.805":"Challenge resolved without a %{result} object","cc.num.902":"Enter a valid card number","cc.num.900":"Enter the card number","cc.num.903":"Enter a supported card brand","cc.num.901":"Enter the complete card number","cc.dat.912":"Enter a valid expiry date","cc.dat.913":"Enter a valid expiry date","cc.dat.914":"Credit card about to expire","cc.dat.910":"Enter the expiry date","cc.dat.911":"Enter the complete expiry date","cc.mth.915":"Enter the expiry month","cc.yr.917":"Enter the expiry year","cc.yr.918":"Enter the complete expiry year","cc.cvc.920":"Enter the security code","cc.cvc.921":"Enter the complete security code","ach.num.945":"Enter the bank account number","ach.num.946":"Enter the complete bank account number","ach.loc.947":"Enter the bank routing number","ach.loc.948":"Enter the complete bank routing number","kcp.pwd.940":"Enter the password","kcp.pwd.941":"Enter the complete password","amazonpay.signout":"Sign out from Amazon","amazonpay.changePaymentDetails":"Change payment details","partialPayment.warning":"Select another payment method to pay the remaining","partialPayment.remainingBalance":"Remaining balance will be %{amount}","order.paymentMethod.description":"%{name} ending in %{lastFour}","bankTransfer.beneficiary":"Beneficiary name","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Reference","bankTransfer.accountNumber":"Account number","bankTransfer.sortCode":"Sort code","bankTransfer.routingNumber":"Routing number","bankTransfer.branchCode":"Branch code","bankTransfer.bankCode":"Bank code","bankTransfer.introduction":"Press ‘Continue’ to create a new bank transfer payment. You can use the details in the following screen to finalize this payment.","bankTransfer.instructions":"Thank you for your purchase, please use the following information to complete your payment.","bankTransfer.shopperEmail.contextualText":"A copy of the payment details will be sent to your email so you can complete the payment later.","bankTransfer.details.title":"Payment details","bankTransfer.instruction.title":"Payment process","bankTransfer.instruction.step1":"Open your banking app","bankTransfer.instruction.step2":"Start a new transfer","bankTransfer.instruction.step3":"Enter the account details provided below","bankTransfer.instruction.step4":"Review and confirm the payment","bacs.accountHolderName":"Bank account holder name","bacs.accountHolderName.invalid":"Invalid bank account holder name","bacs.accountNumber":"Bank account number","bacs.accountNumber.invalid":"Invalid bank account number","bacs.bankLocationId":"Sort code","bacs.bankLocationId.invalid":"Invalid sort code","bacs.consent.amount":"I agree that the above amount will be deducted from my bank account.","bacs.consent.account":"I confirm the account is in my name and I am the only signatory required to authorise the Direct Debit on this account.",edit:"Edit","bacs.confirm":"Confirm and pay","bacs.result.introduction":"Download your Direct Debit Instruction (DDI / Mandate)","download.pdf":"Download PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Card number","creditCard.encryptedExpiryDate.aria.iframeTitle":"Expiry date","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Expiry month","creditCard.encryptedExpiryYear.aria.iframeTitle":"Expiry year","creditCard.encryptedSecurityCode.aria.iframeTitle":"Security code","creditCard.encryptedPassword.aria.iframeTitle":"Password","giftcard.encryptedCardNumber.aria.iframeTitle":"Card number","giftcard.encryptedSecurityCode.aria.iframeTitle":"Pin",giftcardTransactionLimit:"Max. %{amount} allowed per transaction on this gift card","pix.instructions":"Use your banking app to scan the QR code or copy the PIX code below to complete your payment.","pix.code.label":"PIX code","pix.code.copy.label":"Copy PIX code","pix.code.copied.label":"PIX code copied","twint.saved":"saved",orPayWith:"or pay with","invalid.format.expects":"%{label} Invalid format. Expected format: %{format}","upi.qrCodeWaitingMessage":"Scan the QR code using your preferred UPI app to complete the payment","upi.vpaWaitingMessage":"Open your UPI app to confirm the payment","upi.modeSelection":"How would you like to use UPI?","upi.completePayment":"Complete your payment","upi.mode.enterUpiId":"UPI ID","upi.mode.qrCode":"QR code","upi.mode.payByAnyUpi":"UPI apps","upi.collect.dropdown.label":"Enter UPI ID","upi.collect.instruction":"Enter your UPI ID","upi.collect.field.label":"UPI ID","upi.collect.field.contextualText":"Enter the UPI ID connected to your account and press continue","upi.collect.field.invalid-id-error":"Enter a valid UPI","upi.error.noAppSelected":"Select your preferred UPI app to continue","upi.intent.instruction":"Select your preferred UPI app","upi.qrCode.instruction":"After generating the QR code you can use your preferred UPI app to complete the payment.","onlineBanking.termsAndConditions":"By continuing you agree with the %#terms and conditions%#","onlineBankingPL.termsAndConditions":"By continuing you agree with the %#regulations%# and %#information obligation%# of Przelewy24","ctp.loading.poweredByCtp":"Powered by Click to Pay","ctp.loading.intro":"We are checking to see if you have any saved cards with Click to Pay...","ctp.login.title":"Continue to Click to Pay","ctp.login.subtitle":"Enter the email address that is connected to Click to Pay to continue.","ctp.login.inputLabel":"Email","ctp.logout.notYou":"Not you?","ctp.logout.notYourCards":"Not your cards?","ctp.logout.notYourCard":"Not your card?","ctp.logout.notYourProfile":"Not your profile?","ctp.otp.fieldLabel":"One time code","ctp.otp.resendCode":"Resend code","ctp.otp.codeResent":"Code resent","ctp.otp.title":"Access your Click to Pay cards","ctp.otp.subtitle":"Enter the code %@ sent to %@ to verify it‘s you.","ctp.otp.saveCookiesCheckbox.label":"Skip verification next time","ctp.otp.saveCookiesCheckbox.information":"Select to be remembered on your device and browser at participating stores for faster checkout. Not recommended for shared devices.","ctp.otp.saveCookiesCheckbox.shorterInfo":"Select to be remembered on your device and browser","ctp.emptyProfile.message":"No cards registered in this Click to Pay profile","ctp.separatorText":"or use","ctp.cards.title":"Complete payment with Click to Pay","ctp.cards.subtitle":"Select a card to use.","ctp.cards.expiredCard":"Expired","ctp.manualCardEntry":"Manual card entry","ctp.aria.infoModalButton":"What is Click to Pay","ctp.infoPopup.title":"Click to Pay brings the ease of contactless, online","ctp.infoPopup.subtitle":"A fast, secure payment method supported by Mastercard, Visa and other payment cards.","ctp.infoPopup.benefit1":"Click to Pay uses encryption to keep your information safe and secure","ctp.infoPopup.benefit2":"Use it with merchants worldwide","ctp.infoPopup.benefit3":"Set up once for hassle-free payments in the future","ctp.errors.AUTH_INVALID":"Authentication Invalid","ctp.errors.NOT_FOUND":"No account found, enter a valid email or continue using manual card entry","ctp.errors.ID_FORMAT_UNSUPPORTED":"Format not supported","ctp.errors.FRAUD":"The user account was locked or disabled","ctp.errors.CONSUMER_ID_MISSING":"Consumer identity is missing in the request","ctp.errors.ACCT_INACCESSIBLE":"This account is currently not available, e.g it is locked","ctp.errors.CODE_INVALID":"Incorrect verification code","ctp.errors.CODE_EXPIRED":"This code has expired","ctp.errors.RETRIES_EXCEEDED":"The limit for the number of retries for OTP generation was exceeded","ctp.errors.OTP_SEND_FAILED":"The OTP could not be sent to the recipient","ctp.errors.REQUEST_TIMEOUT":"Something went wrong, try again or use the manual card entry","ctp.errors.UNKNOWN_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.SERVICE_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.SERVER_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.INVALID_PARAMETER":"Something went wrong, try again or use the manual card entry","ctp.errors.INVALID_EMAIL":"Enter a valid email address (e.g. name@example.com)","ctp.errors.AUTH_ERROR":"Something went wrong, try again or use the manual card entry","paymentMethodsList.aria.label":"Choose a payment method","paymentMethodsList.storedPayments.label":"Saved payment methods","paymentMethodsList.otherPayments.label":"More payment options","paymentMethodsList.otherPayments.buttonLabel":"Show %{count} more","paymentMethodsList.promotedPayments.label":"Other","companyDetails.name.invalid":"Enter the company name","companyDetails.registrationNumber.invalid":"Enter the registration number","consent.checkbox.invalid":"You must agree with the terms & conditions","form.instruction":"All fields are required unless marked otherwise.","trustly.descriptor":"Instant Bank Payment","trustly.description1":"Pay directly from any of your bank accounts, backed by bank-level security","trustly.description2":"No cards, no app download, no registration","ancv.input.label":"Your ANCV identification","ancv.confirmPayment":"Use your ANCV application to confirm the payment.","ancv.form.instruction":"The Cheque-Vacances application is necessary to validate this payment.","ancv.beneficiaryId.invalid":"Enter a valid email address or ANCV ID","creditCard.cardNumber.label":"Card number","creditCard.expiryDate.label":"Expiry date","creditCard.expiryDate.contextualText":"Front of card in MM/YY format","creditCard.securityCode.label":"Security code","creditCard.securityCode.label.optional":"Security code (optional)","creditCard.securityCode.contextualText.3digits":"3 digits on back of card","creditCard.securityCode.contextualText.4digits":"4 digits on front of card","creditCard.expiryMonth.label":"Expiry month","creditCard.expiryYear.label":"Expiry year","creditCard.pin.label":"Pin","creditCard.password.label":"First 2 digits of card password","giftcard.cardNumber.label":"Card Number","giftcard.expiryDate.label":"Expiry date","giftcard.securityCode.label":"Pin","ach.bankAccountNumber.label":"Account number","ach.bankLocationId.label":"ABA routing number","dragonpayVoucher.selectField.contextualText.nonBank":"Select your provider","dragonpayVoucher.selectField.contextualText.bank":"Select your bank","payme.openPayMeApp":"Complete your payment in the PayMe app by authorizing the payment in the app and wait for the confirmation.","payme.redirectButtonLabel":"Open PayMe app","payme.scanQrCode":"Complete your payment by QR code","payme.timeToPay":"This QR code is valid for %@","payme.instructions.steps":"Open the PayMe app.%@Scan the QR code to authorize the payment.%@Complete the payment in the app and wait for confirmation.","payme.instructions.footnote":"Please do not close this page before the payment is completed","payByBankAISDD.disclaimer.header":"Use Pay by Bank to pay instantly from any bank account.","payByBankAISDD.disclaimer.body":"By connecting your bank account you are authorizing debits to your account for any amount owed for use of our services and/or purchase of our products, until this authorization is revoked.","paymentMethodBrand.other":"other","paynow.scanQrCode":"Scan the QR code using the PayNow app to complete the payment","paynow.mobileViewInstruction.step1":"Take a screenshot of the QR code.","paynow.mobileViewInstruction.step2":"Open the PayNow bank or payment app.","paynow.mobileViewInstruction.step3":"Select the option to scan a QR code.","paynow.mobileViewInstruction.step4":"Choose the option to upload a QR and select the screenshot.","paynow.mobileViewInstruction.step5":"Complete the transaction.","payto.payid.description":"Enter the PayID and account details that are connected to your PayTo account.","payto.payid.label.identifier":"Identifier","payto.payid.label.orgid":"Organization ID","payto.payid.option.phone":"Mobile","payto.payid.option.email":"Email","payto.payid.option.orgid":"Organization ID","payto.bsb.description":"Enter the bank account number and the Bank State Branch that is connected to your account to continue","payto.bsb.label.bankAccountNumber":"Bank account number","payto.instructions.steps":"Log into your PayTo banking app@Authorize the PayTo agreement@Approve the payment terms@Complete the transaction","payto.confirmPayment":"Thank you for your purchase, complete your payment by following the instructions below.","payto.mandate.amount.label":"Amount","payto.mandate.frequency.label":"Frequency","payto.mandate.remarks.label":"Description","payto.mandate.startsAt.label":"First payment date","payto.mandate.endsAt.label":"End date","payto.mandate.payee.label":"Payee","payto.mandate.amount.max":"Up to %{amount} per transaction","payto.mandate.frequency.adhoc-no-count":"Ad Hoc","payto.mandate.frequency.adhoc":"%{count} time(s)","payto.mandate.frequency.daily":"%{count} payment(s) Daily","payto.mandate.frequency.weekly":"%{count} payment(s) Weekly","payto.mandate.frequency.biWeekly":"%{count} payment(s) Fortnightly","payto.mandate.frequency.monthly":"%{count} payment(s) Monthly","payto.mandate.frequency.quarterly":"%{count} payment(s) Quarterly","payto.mandate.frequency.halfYearly":"%{count} payment(s) Bi-Annual","payto.mandate.frequency.yearly":"%{count} payment(s) Yearly","payto.label.firstName":"Account holder first name","payto.label.lastName":"Account holder last name","payto.errors.accountHolderFirstName.invalid":"Enter your account holder first name","payto.errors.accountHolderLastName.invalid":"Enter your account holder last name","payto.await.waitForConfirmation":"Awaiting your approval","payto.bsb.option.label":"BSB and account number","card.fastlane.a11y.logo":"Fastlane by Paypal logo","card.fastlane.a11y.openDialog":"Read more about Fastlane","card.fastlane.a11y.closeDialog":"Close dialog","card.fastlane.mobileInputLabel":"Mobile number","card.fastlane.consentToggle":"Save your info with Fastlane for faster checkouts and more","card.fastlane.consentText":"By saving your info, you agree to get codes by text to use Fastlane everywhere it's available. Fastlane will text the number provided. You also agree to this %#terms%# and %#privacy statement%#.","card.fastlane.modal.benefit1.header":"Autofill your checkouts","card.fastlane.modal.benefit1.text":"Get one-time codes to use card and addresses you’ve saved.","card.fastlane.modal.benefit2.header":"Protect your info","card.fastlane.modal.benefit2.text":"Your payment info is encrypted when it’s stored and sent to places you shop.","card.fastlane.modal.benefit3.header":"Use across stores","card.fastlane.modal.benefit3.text":"Speed through checkout everywhere Fastlane is available.","paybybankpix.redirectBtn.label":"Continue to PIX through OpenBanking","paybybankpix.issuerList.disclaimer":"By continuing, you agree to the %#Consent Notice%# and will be redirected to your bank.","paybybankpix.issuerList.selectField.label":"Bank","paybybankpix.issuerList.introduction.logo.content":"Connect your favorite PIX keys to pay through Open Finance","paybybankpix.await.waitForConfirmation":"Waiting for your confirmation...","paybybankpix.await.timeToPay":"This process will take approximately %{numberOfMin} minute(s)","paybybankpix.await.withOpenFinance":"With the ease of Open Finance","paybybankpix.await.logoAlt.openFinance":"Open Finance","paybybankpix.storedPayment.payButton.label":"Continue payment","paybybankpix.storedPayment.additionalLabel":"%{receiver} account through PIX","paybybankpix.await.fetchDetails":"Fetching details...","eftpad-canada.input.accountHolderName.label":"Account holder name","eftpad-canada.input.accountHolderName.error":"Enter an account holder name","eftpad-canada.input.accountNumber.label":"Account number","eftpad-canada.input.accountNumber.contextualText":"Between 7 and 12 digits","eftpad-canada.input.accountNumber.error":"Enter an account number that is between 7 and 12 digits","eftpad-canada.input.institutionNumber.label":"Institution number","eftpad-canada.input.institutionNumber.contextualText":"3 digits","eftpad-canada.input.institutionNumber.error":"Enter an institution number that consists of 3 digits","eftpad-canada.input.transitNumber.label":"Transit number","eftpad-canada.input.transitNumber.contextualText":"5 digits","eftpad-canada.input.transitNumber.error":"Enter a transit number that consists of 5 digits","eftpad-canada.settlement-info":"The funds will be withdrawn from your bank account within 1–3 business days.","upi.mandate.intro":"You’re setting up a UPI Autopay recurring payment","upi.mandate.max.extraText":"You’ll approve a higher limit to allow future plan changes","upi.mandate.upTo":"up to %{amount}","upi.mandate.frequency.monthly":"/month","upi.mandate.frequency.weekly":"/week","upi.mandate.frequency.adhoc":" as presented",bankList:"Bank list",qrCode:"QR code","iris.instructions.generateQrCode":"After generating the QR code you can use your preferred banking app to complete the payment.","iris.instructions.payment.step1":"Open your preferred banking app.","iris.instructions.payment.step2":"Scan the QR code with your banking app.","iris.instructions.payment.step3":"Complete the payment in the app and wait for the confirmation here.","econtext.customerNumber":"Customer number","econtext.confirmationNumber":"Confirmation number","econtext.useBefore":"Use before","econtext.paymentInformation":"Payment information","issuerList.separatorText":"or choose from list","upi.intent.apps.title":"Options","upi.intent.apps.dropdown.label":"UPI apps","upi.intent.apps.dropdown.placeholder":"Choose preferred app"};export{e as default};
2
2
  //# sourceMappingURL=en-US.json.js.map
@@ -1,2 +1,2 @@
1
- import{hasOwnProperty as e}from"./hasOwnProperty.js";const t=(t,a,r,n)=>r=>{const o={};if((r.origin||r.originalEvent?.origin)!==t)return"Message was not sent from the expected domain";if("string"!=typeof r.data)return"Event data was not of type string";if(!r.data.length)return"Invalid event data string";try{const t=JSON.parse(r.data);if(!e(t,"type")||t.type!==n)return"Event data was not of expected type";a(t)}catch(e){return o.type=`${n}-JSON-parse-error`,o.comment="failed to JSON parse event.data",o.extraInfo=`event.data = ${r.data}`,o.eventDataRaw=r.data,console.debug("get-process-message-handler::CATCH::Un-parseable JSON:: parseErrorObj=",o),!1}return!0};export{t as default};
1
+ import{hasOwnProperty as e}from"./hasOwnProperty.js";const t=(t,a,r,n)=>r=>{const o={};if(r.origin!==t)return"Message was not sent from the expected domain";if("string"!=typeof r.data)return"Event data from expected domain but not in expected form";if(!r.data.length)return"Event data from expected domain, in expected form, but empty";try{const t=JSON.parse(r.data);return t&&"object"==typeof t&&e(t,"type")?t.type===n?(a(t),!0):'Event data has "type" but the object is not in the expected form':"Event data had no type"}catch(e){return o.type=`${n}-JSON-parse-error`,o.comment="failed to JSON parse event.data",o.extraInfo=`event.data = ${r.data}`,o.eventDataRaw=r.data,console.debug("get-process-message-handler::CATCH::Un-parseable JSON:: parseErrorObj=",o),!1}};export{t as default};
2
2
  //# sourceMappingURL=get-process-message-handler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-process-message-handler.js","sources":["../../../src/utils/get-process-message-handler.ts"],"sourcesContent":["/**\n * Centralised window.postMessage processing function used in 3DS2 components and also by the deviceFingerprinting process\n * NOTE: this latter use case means that while the deviceFingerprinting is still completing this component is also listening to\n * securedFields related postMessaging\n *\n * @param domain - expected domain for the postMesssage to have originated from\n * @param resolve - the resolve function from the Promise that called this function\n * @param reject - the reject function from the Promise that called this function\n * @param parseErrorObj - an error object to log in the case of unparseable data (albeit from a valid origin)\n * @param expectedType - string to check that the passed data has the expected type\n */\nimport { hasOwnProperty } from './hasOwnProperty';\nimport { PostMsgParseErrorObject } from '../components/ThreeDS2/types';\n\nconst getProcessMessageHandler =\n (domain: string, resolve: Function, reject: Function, expectedType: string): Function =>\n event => {\n const parseErrorObj: PostMsgParseErrorObject = {};\n const origin = event.origin || event.originalEvent?.origin;\n\n if (origin !== domain) {\n return 'Message was not sent from the expected domain';\n }\n\n if (typeof event.data !== 'string') {\n return 'Event data was not of type string';\n }\n\n if (!event.data.length) {\n return 'Invalid event data string';\n }\n\n // Try to parse the data\n try {\n const feedbackObj = JSON.parse(event.data);\n if (hasOwnProperty(feedbackObj, 'type') && feedbackObj.type === expectedType) {\n resolve(feedbackObj);\n } else {\n // Silent fail - applies when RiskModule device fingerprinting is ongoing and this handler is picking up securedFields traffic\n return 'Event data was not of expected type';\n }\n } catch (e) {\n parseErrorObj.type = `${expectedType}-JSON-parse-error`;\n parseErrorObj.comment = 'failed to JSON parse event.data';\n parseErrorObj.extraInfo = `event.data = ${event.data}`;\n parseErrorObj.eventDataRaw = event.data;\n\n // TODO - decide whether to console.log/debug/error &/or call the merchant defined onError callback\n console.debug('get-process-message-handler::CATCH::Un-parseable JSON:: parseErrorObj=', parseErrorObj);\n\n return false;\n }\n\n return true;\n };\n\nexport default getProcessMessageHandler;\n"],"names":["getProcessMessageHandler","domain","resolve","reject","expectedType","event","parseErrorObj","origin","originalEvent","data","length","feedbackObj","JSON","parse","hasOwnProperty","type","e","comment","extraInfo","eventDataRaw","console","debug"],"mappings":"qDAcA,MAAMA,EACF,CAACC,EAAgBC,EAAmBC,EAAkBC,IACtDC,IACI,MAAMC,EAAyC,CAAA,EAG/C,IAFeD,EAAME,QAAUF,EAAMG,eAAeD,UAErCN,EACX,MAAO,gDAGX,GAA0B,iBAAfI,EAAMI,KACb,MAAO,oCAGX,IAAKJ,EAAMI,KAAKC,OACZ,MAAO,4BAIX,IACI,MAAMC,EAAcC,KAAKC,MAAMR,EAAMI,MACrC,IAAIK,EAAeH,EAAa,SAAWA,EAAYI,OAASX,EAI5D,MAAO,sCAHPF,EAAQS,EAKhB,CAAE,MAAOK,GASL,OARAV,EAAcS,KAAO,GAAGX,qBACxBE,EAAcW,QAAU,kCACxBX,EAAcY,UAAY,gBAAgBb,EAAMI,OAChDH,EAAca,aAAed,EAAMI,KAGnCW,QAAQC,MAAM,yEAA0Ef,IAEjF,CACX,CAEA,OAAO"}
1
+ {"version":3,"file":"get-process-message-handler.js","sources":["../../../src/utils/get-process-message-handler.ts"],"sourcesContent":["/**\n * Centralised window.postMessage processing function used in 3DS2 components and *also* by the RiskModule's device fingerprinting process\n * NOTE: this latter use case means that while the deviceFingerprinting is still completing this component is also listening to\n * securedFields related postMessaging\n *\n * @param domain - expected domain for the postMesssage to have originated from\n * @param resolve - the resolve function from the Promise that called this function\n * @param reject - the reject function from the Promise that called this function\n * @param parseErrorObj - an error object to log in the case of unparseable data (albeit from a valid origin)\n * @param expectedType - string to check that the message event's data has the expected type\n */\nimport { hasOwnProperty } from './hasOwnProperty';\nimport { PostMsgParseErrorObject } from '../components/ThreeDS2/types';\n\nconst getProcessMessageHandler =\n (\n domain: string,\n resolve: (value: unknown) => void,\n reject: (reason?: unknown) => void,\n expectedType: string\n ): ((event: Pick<MessageEvent, 'origin' | 'data'>) => string | boolean) =>\n (event: Pick<MessageEvent, 'origin' | 'data'>): string | boolean => {\n const parseErrorObj: PostMsgParseErrorObject = {};\n const origin = event.origin;\n\n if (origin !== domain) {\n // FAIL SILENTLY: if it's not from the expected domain then it's not our traffic\n return 'Message was not sent from the expected domain';\n }\n\n /**\n * At this point we know the message is from the expected domain\n * - so is presumably \"our\" traffic and not random messages from the merchant's site, the build process, or from the browser (or extensions)\n * // TODO - Do more here in terms of logging to help debug issues with 3DS2\n */\n\n if (typeof event.data !== 'string') {\n // If it's from our domain but not a string - log this somewhere?\n return 'Event data from expected domain but not in expected form';\n }\n\n if (!event.data.length) {\n // If it's from our domain, is a string, but is empty - log this somewhere?\n return 'Event data from expected domain, in expected form, but empty';\n }\n\n // Try to parse the data\n try {\n const feedbackObj = JSON.parse(event.data) as Record<string, unknown>;\n if (feedbackObj && typeof feedbackObj === 'object' && hasOwnProperty(feedbackObj, 'type')) {\n if (feedbackObj.type === expectedType) {\n // Happy flow\n resolve(feedbackObj);\n return true;\n } else {\n // feedbackObj.type != expectedType - log this somewhere?\n return 'Event data has \"type\" but the object is not in the expected form';\n }\n } else {\n // FAIL SILENTLY: event.data had no 'type' property\n // example: applies when RiskModule device fingerprinting is ongoing and this handler is picking up securedFields traffic\n // - But, *if* we know we're in 3DS2 scenario - log this somewhere?\n return 'Event data had no type';\n }\n } catch (e) {\n parseErrorObj.type = `${expectedType}-JSON-parse-error`;\n parseErrorObj.comment = 'failed to JSON parse event.data';\n parseErrorObj.extraInfo = `event.data = ${event.data}`;\n parseErrorObj.eventDataRaw = event.data;\n\n // TODO - decide whether to console.log/debug/error &/or call the merchant defined onError callback\n console.debug('get-process-message-handler::CATCH::Un-parseable JSON:: parseErrorObj=', parseErrorObj);\n\n return false;\n }\n };\n\nexport default getProcessMessageHandler;\n"],"names":["getProcessMessageHandler","domain","resolve","reject","expectedType","event","parseErrorObj","origin","data","length","feedbackObj","JSON","parse","hasOwnProperty","type","e","comment","extraInfo","eventDataRaw","console","debug"],"mappings":"qDAcA,MAAMA,EACF,CACIC,EACAC,EACAC,EACAC,IAEHC,IACG,MAAMC,EAAyC,CAAA,EAG/C,GAFeD,EAAME,SAENN,EAEX,MAAO,gDASX,GAA0B,iBAAfI,EAAMG,KAEb,MAAO,2DAGX,IAAKH,EAAMG,KAAKC,OAEZ,MAAO,+DAIX,IACI,MAAMC,EAAcC,KAAKC,MAAMP,EAAMG,MACrC,OAAIE,GAAsC,iBAAhBA,GAA4BG,EAAeH,EAAa,QAC1EA,EAAYI,OAASV,GAErBF,EAAQQ,IACD,GAGA,mEAMJ,wBAEf,CAAE,MAAOK,GASL,OARAT,EAAcQ,KAAO,GAAGV,qBACxBE,EAAcU,QAAU,kCACxBV,EAAcW,UAAY,gBAAgBZ,EAAMG,OAChDF,EAAcY,aAAeb,EAAMG,KAGnCW,QAAQC,MAAM,yEAA0Ed,IAEjF,CACX"}
@@ -1,2 +1,2 @@
1
- import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import r from"./components/ANCVInput.js";import o from"./components/ANCVAwait/config.js";import{Await as n}from"../internal/Await/Await.js";import s from"../../core/Errors/AdyenCheckoutError.js";import i from"../internal/PayButton/PayButton.js";import{sanitizeResponse as a,verifyPaymentDidNotFail as p}from"../internal/UIElement/utils.js";function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(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 r=Object.getOwnPropertySymbols(t);e.push.apply(e,r)}return e}(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}class l extends e{formatData(){var t;return{paymentMethod:{type:l.type,beneficiaryId:null===(t=this.state.data)||void 0===t?void 0:t.beneficiaryId}}}submit(){if(!this.isValid)return this.showValidation(),!1;this.createOrder().then(this.makePaymentsCall).then(a).then(p).then(this.handleResponse).catch(this.handleFailedResult)}get isValid(){return!!this.state.isValid}get displayName(){return this.props.name}componentToRender(){return this.props.paymentData?t(n,{clientKey:this.props.clientKey,paymentData:this.props.paymentData,onError:this.props.onError,onComplete:this.onComplete,brandLogo:this.icon,type:this.constructor.type,messageText:this.props.i18n.get("ancv.confirmPayment"),awaitText:this.props.i18n.get("await.waitForConfirmation"),showCountdownTimer:o.showCountdownTimer,throttleTime:o.THROTTLE_TIME,throttleInterval:o.THROTTLE_INTERVAL,onActionHandled:this.onActionHandled}):t(r,h(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.forEach(function(e){c(t,e,r[e])})}return t}({ref:t=>{this.componentRef=t}},this.props),{onSubmit:this.submit,onChange:this.setState,payButton:this.payButton,showPayButton:this.props.showPayButton}))}constructor(...e){super(...e),c(this,"onOrderRequest",t=>this.props.onOrderRequest?new Promise((e,r)=>{this.props.onOrderRequest(e,r,t)}):this.props.session?this.props.session.createOrder():void 0),c(this,"createOrder",()=>(this.setStatus("loading"),this.props.order?Promise.resolve():this.onOrderRequest(this.data).then(t=>{const e={order:{orderData:t.orderData,pspReference:t.pspReference}};return this.setState(e),Promise.resolve()}).catch(t=>{t instanceof s?this.handleError(t):this.handleError(new s("ERROR",t))}))),c(this,"payButton",e=>t(i,e))}}c(l,"type","ancv");export{l as ANCVElement,l as default};
1
+ import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import r from"./components/ANCVInput.js";import o from"./components/ANCVAwait/config.js";import{Await as n}from"../internal/Await/Await.js";import s from"../../core/Errors/AdyenCheckoutError.js";import i from"../internal/PayButton/PayButton.js";import{sanitizeResponse as a,verifyPaymentDidNotFail as p}from"../internal/UIElement/utils.js";function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(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 r=Object.getOwnPropertySymbols(t);e.push.apply(e,r)}return e}(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}class l extends e{formatData(){var t;return{paymentMethod:{type:l.type,beneficiaryId:null===(t=this.state.data)||void 0===t?void 0:t.beneficiaryId}}}submit(){if(!this.isValid)return this.showValidation(),!1;this.createOrder().then(this.makePaymentsCall).then(a).then(p).then(this.handleResponse).catch(this.handleFailedResult)}get isValid(){return!!this.state.isValid}get displayName(){return this.props.name}componentToRender(){return this.props.paymentData?t(n,{clientKey:this.props.clientKey,paymentData:this.props.paymentData,onError:this.props.onError,onComplete:this.onComplete,brandLogo:this.icon,brandName:this.displayName,type:this.constructor.type,messageText:this.props.i18n.get("ancv.confirmPayment"),awaitText:this.props.i18n.get("await.waitForConfirmation"),showCountdownTimer:o.showCountdownTimer,throttleTime:o.THROTTLE_TIME,throttleInterval:o.THROTTLE_INTERVAL,onActionHandled:this.onActionHandled}):t(r,h(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.forEach(function(e){c(t,e,r[e])})}return t}({ref:t=>{this.componentRef=t}},this.props),{onSubmit:this.submit,onChange:this.setState,payButton:this.payButton,showPayButton:this.props.showPayButton}))}constructor(...e){super(...e),c(this,"onOrderRequest",t=>this.props.onOrderRequest?new Promise((e,r)=>{this.props.onOrderRequest(e,r,t)}):this.props.session?this.props.session.createOrder():void 0),c(this,"createOrder",()=>(this.setStatus("loading"),this.props.order?Promise.resolve():this.onOrderRequest(this.data).then(t=>{const e={order:{orderData:t.orderData,pspReference:t.pspReference}};return this.setState(e),Promise.resolve()}).catch(t=>{t instanceof s?this.handleError(t):this.handleError(new s("ERROR",t))}))),c(this,"payButton",e=>t(i,e))}}c(l,"type","ancv");export{l as ANCVElement,l as default};
2
2
  //# sourceMappingURL=ANCV.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ANCV.js","sources":["../../../../src/components/ANCV/ANCV.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport ANCVInput from './components/ANCVInput';\nimport config from './components/ANCVAwait/config';\nimport { Await } from '../../components/internal/Await';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport PayButton from '../internal/PayButton';\nimport { ANCVConfiguration } from './types';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\n\nexport class ANCVElement extends UIElement<ANCVConfiguration> {\n public static readonly type = 'ancv';\n\n /**\n * Formats the component data output\n */\n formatData() {\n return {\n paymentMethod: {\n type: ANCVElement.type,\n beneficiaryId: this.state.data?.beneficiaryId\n }\n };\n }\n\n private onOrderRequest = data => {\n if (this.props.onOrderRequest)\n return new Promise((resolve, reject) => {\n this.props.onOrderRequest(resolve, reject, data);\n });\n\n if (this.props.session) {\n return this.props.session.createOrder();\n }\n };\n\n /**\n * Check if order exists, if it does Resolve.\n * Otherwise createOrder and then Resolve.\n */\n public createOrder = (): Promise<void> => {\n this.setStatus('loading');\n\n // allow for multiple ANCV payments, follow giftcard logic and just use order if it exists\n if (this.props.order) {\n return Promise.resolve();\n }\n\n return this.onOrderRequest(this.data)\n .then((order: { orderData: string; pspReference: string }) => {\n const stateOrder = { order: { orderData: order.orderData, pspReference: order.pspReference } };\n this.setState(stateOrder);\n return Promise.resolve();\n })\n .catch(error => {\n if (error instanceof AdyenCheckoutError) {\n this.handleError(error);\n } else {\n this.handleError(new AdyenCheckoutError('ERROR', error));\n }\n });\n };\n\n public submit() {\n if (!this.isValid) {\n this.showValidation();\n return false;\n }\n\n this.createOrder()\n .then(this.makePaymentsCall)\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.handleResponse)\n .catch(this.handleFailedResult);\n }\n\n // Reimplement payButton similar to GiftCard to allow to set onClick\n protected override payButton = (props: PayButtonProps): h.JSX.Element => {\n return <PayButton {...props} />;\n };\n\n get isValid(): boolean {\n return !!this.state.isValid;\n }\n\n get displayName(): string {\n return this.props.name;\n }\n\n protected override componentToRender(): h.JSX.Element {\n if (this.props.paymentData) {\n return (\n <Await\n clientKey={this.props.clientKey}\n paymentData={this.props.paymentData}\n onError={this.props.onError}\n onComplete={this.onComplete}\n brandLogo={this.icon}\n type={this.constructor['type']}\n messageText={this.props.i18n.get('ancv.confirmPayment')}\n awaitText={this.props.i18n.get('await.waitForConfirmation')}\n showCountdownTimer={config.showCountdownTimer}\n throttleTime={config.THROTTLE_TIME}\n throttleInterval={config.THROTTLE_INTERVAL}\n onActionHandled={this.onActionHandled}\n />\n );\n }\n\n return (\n <ANCVInput\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n onSubmit={this.submit}\n onChange={this.setState}\n payButton={this.payButton}\n showPayButton={this.props.showPayButton}\n />\n );\n }\n}\n\nexport default ANCVElement;\n"],"names":["ANCVElement","UIElement","formatData","_this_state_data","paymentMethod","type","beneficiaryId","this","state","data","submit","isValid","showValidation","createOrder","then","makePaymentsCall","sanitizeResponse","verifyPaymentDidNotFail","handleResponse","catch","handleFailedResult","displayName","props","name","componentToRender","paymentData","h","Await","clientKey","onError","onComplete","brandLogo","icon","constructor","messageText","i18n","get","awaitText","showCountdownTimer","config","throttleTime","THROTTLE_TIME","throttleInterval","THROTTLE_INTERVAL","onActionHandled","ANCVInput","ref","componentRef","onSubmit","onChange","setState","payButton","showPayButton","super","args","_define_property","onOrderRequest","Promise","resolve","reject","session","setStatus","order","stateOrder","orderData","pspReference","error","AdyenCheckoutError","handleError","PayButton"],"mappings":"67BAWO,MAAMA,UAAoBC,EAM7BC,UAAAA,GAI2B,IAAAC,EAHvB,MAAO,CACHC,cAAe,CACXC,KAAML,EAAYK,KAClBC,cAA8B,QAAfH,EAAAI,KAAKC,MAAMC,YAAX,IAAAN,OAAA,EAAAA,EAAiBG,eAG5C,CAwCOI,MAAAA,GACH,IAAKH,KAAKI,QAEN,OADAJ,KAAKK,kBACE,EAGXL,KAAKM,cACAC,KAAKP,KAAKQ,kBACVD,KAAKE,GACLF,KAAKG,GACLH,KAAKP,KAAKW,gBACVC,MAAMZ,KAAKa,mBACpB,CAOA,WAAIT,GACA,QAASJ,KAAKC,MAAMG,OACxB,CAEA,eAAIU,GACA,OAAOd,KAAKe,MAAMC,IACtB,CAEmBC,iBAAAA,GACf,OAAIjB,KAAKe,MAAMG,YAEPC,EAACC,EAAAA,CACGC,UAAWrB,KAAKe,MAAMM,UACtBH,YAAalB,KAAKe,MAAMG,YACxBI,QAAStB,KAAKe,MAAMO,QACpBC,WAAYvB,KAAKuB,WACjBC,UAAWxB,KAAKyB,KAChB3B,KAAME,KAAK0B,YAAY,KACvBC,YAAa3B,KAAKe,MAAMa,KAAKC,IAAI,uBACjCC,UAAW9B,KAAKe,MAAMa,KAAKC,IAAI,6BAC/BE,mBAAoBC,EAAOD,mBAC3BE,aAAcD,EAAOE,cACrBC,iBAAkBH,EAAOI,kBACzBC,gBAAiBrC,KAAKqC,kBAM9BlB,EAACmB,EAAAA,oUAAAA,CAAAA,CACGC,IAAKA,IACDvC,KAAKwC,aAAeD,IAEpBvC,KAAKe,OAAK,CACd0B,SAAUzC,KAAKG,OACfuC,SAAU1C,KAAK2C,SACfC,UAAW5C,KAAK4C,UAChBC,cAAe7C,KAAKe,MAAM8B,gBAGtC,mBAhHGC,SAAAC,GAeHC,EAAAhD,KAAQiD,iBAAiB/C,GACjBF,KAAKe,MAAMkC,eACJ,IAAIC,QAAQ,CAACC,EAASC,KACzBpD,KAAKe,MAAMkC,eAAeE,EAASC,EAAQlD,KAG/CF,KAAKe,MAAMsC,QACJrD,KAAKe,MAAMsC,QAAQ/C,mBAD9B,GASJ0C,OAAO1C,cAAc,KACjBN,KAAKsD,UAAU,WAGXtD,KAAKe,MAAMwC,MACJL,QAAQC,UAGZnD,KAAKiD,eAAejD,KAAKE,MAC3BK,KAAMgD,IACH,MAAMC,EAAa,CAAED,MAAO,CAAEE,UAAWF,EAAME,UAAWC,aAAcH,EAAMG,eAE9E,OADA1D,KAAK2C,SAASa,GACPN,QAAQC,YAElBvC,MAAM+C,IACCA,aAAiBC,EACjB5D,KAAK6D,YAAYF,GAEjB3D,KAAK6D,YAAY,IAAID,EAAmB,QAASD,QAoBjEX,EAAAhD,KAAmB4C,YAAa7B,GACrBI,EAAC2C,EAAc/C,KApE1BiC,EADSvD,EACcK,OAAO"}
1
+ {"version":3,"file":"ANCV.js","sources":["../../../../src/components/ANCV/ANCV.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport ANCVInput from './components/ANCVInput';\nimport config from './components/ANCVAwait/config';\nimport { Await } from '../../components/internal/Await';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport PayButton from '../internal/PayButton';\nimport { ANCVConfiguration } from './types';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\n\nexport class ANCVElement extends UIElement<ANCVConfiguration> {\n public static readonly type = 'ancv';\n\n /**\n * Formats the component data output\n */\n formatData() {\n return {\n paymentMethod: {\n type: ANCVElement.type,\n beneficiaryId: this.state.data?.beneficiaryId\n }\n };\n }\n\n private onOrderRequest = data => {\n if (this.props.onOrderRequest)\n return new Promise((resolve, reject) => {\n this.props.onOrderRequest(resolve, reject, data);\n });\n\n if (this.props.session) {\n return this.props.session.createOrder();\n }\n };\n\n /**\n * Check if order exists, if it does Resolve.\n * Otherwise createOrder and then Resolve.\n */\n public createOrder = (): Promise<void> => {\n this.setStatus('loading');\n\n // allow for multiple ANCV payments, follow giftcard logic and just use order if it exists\n if (this.props.order) {\n return Promise.resolve();\n }\n\n return this.onOrderRequest(this.data)\n .then((order: { orderData: string; pspReference: string }) => {\n const stateOrder = { order: { orderData: order.orderData, pspReference: order.pspReference } };\n this.setState(stateOrder);\n return Promise.resolve();\n })\n .catch(error => {\n if (error instanceof AdyenCheckoutError) {\n this.handleError(error);\n } else {\n this.handleError(new AdyenCheckoutError('ERROR', error));\n }\n });\n };\n\n public submit() {\n if (!this.isValid) {\n this.showValidation();\n return false;\n }\n\n this.createOrder()\n .then(this.makePaymentsCall)\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.handleResponse)\n .catch(this.handleFailedResult);\n }\n\n // Reimplement payButton similar to GiftCard to allow to set onClick\n protected override payButton = (props: PayButtonProps): h.JSX.Element => {\n return <PayButton {...props} />;\n };\n\n get isValid(): boolean {\n return !!this.state.isValid;\n }\n\n get displayName(): string {\n return this.props.name;\n }\n\n protected override componentToRender(): h.JSX.Element {\n if (this.props.paymentData) {\n return (\n <Await\n clientKey={this.props.clientKey}\n paymentData={this.props.paymentData}\n onError={this.props.onError}\n onComplete={this.onComplete}\n brandLogo={this.icon}\n brandName={this.displayName}\n type={this.constructor['type']}\n messageText={this.props.i18n.get('ancv.confirmPayment')}\n awaitText={this.props.i18n.get('await.waitForConfirmation')}\n showCountdownTimer={config.showCountdownTimer}\n throttleTime={config.THROTTLE_TIME}\n throttleInterval={config.THROTTLE_INTERVAL}\n onActionHandled={this.onActionHandled}\n />\n );\n }\n\n return (\n <ANCVInput\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n onSubmit={this.submit}\n onChange={this.setState}\n payButton={this.payButton}\n showPayButton={this.props.showPayButton}\n />\n );\n }\n}\n\nexport default ANCVElement;\n"],"names":["ANCVElement","UIElement","formatData","_this_state_data","paymentMethod","type","beneficiaryId","this","state","data","submit","isValid","showValidation","createOrder","then","makePaymentsCall","sanitizeResponse","verifyPaymentDidNotFail","handleResponse","catch","handleFailedResult","displayName","props","name","componentToRender","paymentData","h","Await","clientKey","onError","onComplete","brandLogo","icon","brandName","constructor","messageText","i18n","get","awaitText","showCountdownTimer","config","throttleTime","THROTTLE_TIME","throttleInterval","THROTTLE_INTERVAL","onActionHandled","ANCVInput","ref","componentRef","onSubmit","onChange","setState","payButton","showPayButton","super","args","_define_property","onOrderRequest","Promise","resolve","reject","session","setStatus","order","stateOrder","orderData","pspReference","error","AdyenCheckoutError","handleError","PayButton"],"mappings":"67BAWO,MAAMA,UAAoBC,EAM7BC,UAAAA,GAI2B,IAAAC,EAHvB,MAAO,CACHC,cAAe,CACXC,KAAML,EAAYK,KAClBC,cAA8B,QAAfH,EAAAI,KAAKC,MAAMC,YAAX,IAAAN,OAAA,EAAAA,EAAiBG,eAG5C,CAwCOI,MAAAA,GACH,IAAKH,KAAKI,QAEN,OADAJ,KAAKK,kBACE,EAGXL,KAAKM,cACAC,KAAKP,KAAKQ,kBACVD,KAAKE,GACLF,KAAKG,GACLH,KAAKP,KAAKW,gBACVC,MAAMZ,KAAKa,mBACpB,CAOA,WAAIT,GACA,QAASJ,KAAKC,MAAMG,OACxB,CAEA,eAAIU,GACA,OAAOd,KAAKe,MAAMC,IACtB,CAEmBC,iBAAAA,GACf,OAAIjB,KAAKe,MAAMG,YAEPC,EAACC,EAAAA,CACGC,UAAWrB,KAAKe,MAAMM,UACtBH,YAAalB,KAAKe,MAAMG,YACxBI,QAAStB,KAAKe,MAAMO,QACpBC,WAAYvB,KAAKuB,WACjBC,UAAWxB,KAAKyB,KAChBC,UAAW1B,KAAKc,YAChBhB,KAAME,KAAK2B,YAAY,KACvBC,YAAa5B,KAAKe,MAAMc,KAAKC,IAAI,uBACjCC,UAAW/B,KAAKe,MAAMc,KAAKC,IAAI,6BAC/BE,mBAAoBC,EAAOD,mBAC3BE,aAAcD,EAAOE,cACrBC,iBAAkBH,EAAOI,kBACzBC,gBAAiBtC,KAAKsC,kBAM9BnB,EAACoB,EAAAA,oUAAAA,CAAAA,CACGC,IAAKA,IACDxC,KAAKyC,aAAeD,IAEpBxC,KAAKe,OAAK,CACd2B,SAAU1C,KAAKG,OACfwC,SAAU3C,KAAK4C,SACfC,UAAW7C,KAAK6C,UAChBC,cAAe9C,KAAKe,MAAM+B,gBAGtC,mBAjHGC,SAAAC,GAeHC,EAAAjD,KAAQkD,iBAAiBhD,GACjBF,KAAKe,MAAMmC,eACJ,IAAIC,QAAQ,CAACC,EAASC,KACzBrD,KAAKe,MAAMmC,eAAeE,EAASC,EAAQnD,KAG/CF,KAAKe,MAAMuC,QACJtD,KAAKe,MAAMuC,QAAQhD,mBAD9B,GASJ2C,OAAO3C,cAAc,KACjBN,KAAKuD,UAAU,WAGXvD,KAAKe,MAAMyC,MACJL,QAAQC,UAGZpD,KAAKkD,eAAelD,KAAKE,MAC3BK,KAAMiD,IACH,MAAMC,EAAa,CAAED,MAAO,CAAEE,UAAWF,EAAME,UAAWC,aAAcH,EAAMG,eAE9E,OADA3D,KAAK4C,SAASa,GACPN,QAAQC,YAElBxC,MAAMgD,IACCA,aAAiBC,EACjB7D,KAAK8D,YAAYF,GAEjB5D,KAAK8D,YAAY,IAAID,EAAmB,QAASD,QAoBjEX,EAAAjD,KAAmB6C,YAAa9B,GACrBI,EAAC4C,EAAchD,KApE1BkC,EADSxD,EACcK,OAAO"}
@@ -1,2 +1,2 @@
1
- import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import o from"./components/BlikInput.js";import{Await as r}from"../internal/Await/Await.js";import n from"./config.js";import s from"../internal/RedirectButton/RedirectButton.js";import{TxVariants as i}from"../tx-variants.js";function a(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function p(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},r=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),r.forEach(function(e){a(t,e,o[e])})}return t}function l(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}class m extends e{formatData(){var t,e;const o=!!this.props.storedPaymentMethodId;return{paymentMethod:p({type:m.type},!o&&{blikCode:null===(e=this.state)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.blikCode},o&&{storedPaymentMethodId:this.props.storedPaymentMethodId})}}get isValid(){return!!this.props.storedPaymentMethodId||!!this.state.isValid}get displayName(){return this.props.storedPaymentMethodId&&this.props.label?this.props.label:this.props.name}get additionalInfo(){return this.props.storedPaymentMethodId&&this.props.label?this.props.name:null}componentToRender(){return this.props.paymentData?t(r,{clientKey:this.props.clientKey,paymentData:this.props.paymentData,onError:this.handleError,onComplete:this.onComplete,brandLogo:this.icon,type:n.type,messageText:this.props.i18n.get(n.messageTextId),awaitText:this.props.i18n.get(n.awaitTextId),showCountdownTimer:n.showCountdownTimer,delay:n.STATUS_INTERVAL,countdownTime:n.COUNTDOWN_MINUTES,throttleTime:n.THROTTLE_TIME,throttleInterval:n.THROTTLE_INTERVAL,onActionHandled:this.onActionHandled}):this.props.storedPaymentMethodId?t(s,{showPayButton:this.props.showPayButton,name:this.displayName,payButton:this.payButton,onSubmit:this.submit,ref:t=>{this.componentRef=t}}):t(o,l(p({ref:t=>{this.componentRef=t}},this.props),{onChange:this.setState,onSubmit:this.submit,payButton:this.payButton}))}}a(m,"type",i.blik);export{m as default};
1
+ import{createElement as t}from"../../external/preact/dist/preact.js";import{UIElement as e}from"../internal/UIElement/UIElement.js";import o from"./components/BlikInput.js";import{Await as r}from"../internal/Await/Await.js";import n from"./config.js";import s from"../internal/RedirectButton/RedirectButton.js";import{TxVariants as i}from"../tx-variants.js";function a(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function p(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},r=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),r.forEach(function(e){a(t,e,o[e])})}return t}function l(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}class m extends e{formatData(){var t,e;const o=!!this.props.storedPaymentMethodId;return{paymentMethod:p({type:m.type},!o&&{blikCode:null===(e=this.state)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.blikCode},o&&{storedPaymentMethodId:this.props.storedPaymentMethodId})}}get isValid(){return!!this.props.storedPaymentMethodId||!!this.state.isValid}get displayName(){return this.props.storedPaymentMethodId&&this.props.label?this.props.label:this.props.name}get additionalInfo(){return this.props.storedPaymentMethodId&&this.props.label?this.props.name:null}componentToRender(){return this.props.paymentData?t(r,{clientKey:this.props.clientKey,paymentData:this.props.paymentData,onError:this.handleError,onComplete:this.onComplete,brandLogo:this.icon,brandName:this.displayName,type:n.type,messageText:this.props.i18n.get(n.messageTextId),awaitText:this.props.i18n.get(n.awaitTextId),showCountdownTimer:n.showCountdownTimer,delay:n.STATUS_INTERVAL,countdownTime:n.COUNTDOWN_MINUTES,throttleTime:n.THROTTLE_TIME,throttleInterval:n.THROTTLE_INTERVAL,onActionHandled:this.onActionHandled}):this.props.storedPaymentMethodId?t(s,{showPayButton:this.props.showPayButton,name:this.displayName,payButton:this.payButton,onSubmit:this.submit,ref:t=>{this.componentRef=t}}):t(o,l(p({ref:t=>{this.componentRef=t}},this.props),{onChange:this.setState,onSubmit:this.submit,payButton:this.payButton}))}}a(m,"type",i.blik);export{m as default};
2
2
  //# sourceMappingURL=Blik.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Blik.js","sources":["../../../../src/components/Blik/Blik.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport BlikInput from '../../components/Blik/components/BlikInput';\nimport { Await } from '../internal/Await';\nimport config from './config';\nimport RedirectButton from '../../components/internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport { AwaitConfiguration } from '../internal/Await/types';\n\ninterface BlikElementData {\n paymentMethod: {\n type: string;\n blikCode: string;\n };\n}\n\nclass BlikElement extends UIElement<AwaitConfiguration> {\n public static readonly type = TxVariants.blik;\n\n formatData(): BlikElementData {\n const recurringPayment = !!this.props.storedPaymentMethodId;\n\n return {\n paymentMethod: {\n type: BlikElement.type,\n ...(!recurringPayment && { blikCode: this.state?.data?.blikCode }),\n ...(recurringPayment && { storedPaymentMethodId: this.props.storedPaymentMethodId })\n }\n };\n }\n\n get isValid(): boolean {\n if (this.props.storedPaymentMethodId) {\n return true;\n }\n\n return !!this.state.isValid;\n }\n\n get displayName() {\n if (this.props.storedPaymentMethodId && this.props.label) {\n return this.props.label;\n }\n return this.props.name;\n }\n\n get additionalInfo() {\n if (this.props.storedPaymentMethodId && this.props.label) {\n return this.props.name;\n }\n return null;\n }\n\n /**\n * NOTE: for future reference:\n * this.props.onComplete (which is called from this.onComplete) equates to the merchant defined onAdditionalDetails callback\n * (the initial /payments response defines an \"await\" action, actionTypes.ts translates this to \"onComplete: props.onAdditionalDetails\")\n */\n protected override componentToRender(): h.JSX.Element {\n if (this.props.paymentData) {\n return (\n <Await\n clientKey={this.props.clientKey}\n paymentData={this.props.paymentData}\n onError={this.handleError}\n onComplete={this.onComplete}\n brandLogo={this.icon}\n type={config.type}\n messageText={this.props.i18n.get(config.messageTextId)}\n awaitText={this.props.i18n.get(config.awaitTextId)}\n showCountdownTimer={config.showCountdownTimer}\n delay={config.STATUS_INTERVAL}\n countdownTime={config.COUNTDOWN_MINUTES}\n throttleTime={config.THROTTLE_TIME}\n throttleInterval={config.THROTTLE_INTERVAL}\n onActionHandled={this.onActionHandled}\n />\n );\n }\n\n return this.props.storedPaymentMethodId ? (\n <RedirectButton\n showPayButton={this.props.showPayButton}\n name={this.displayName}\n payButton={this.payButton}\n onSubmit={this.submit}\n ref={ref => {\n this.componentRef = ref;\n }}\n />\n ) : (\n <BlikInput\n // @ts-ignore Ref is used by preact component\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n onChange={this.setState}\n onSubmit={this.submit}\n payButton={this.payButton}\n />\n );\n }\n}\n\nexport default BlikElement;\n"],"names":["BlikElement","UIElement","formatData","_this_state_data","_this_state","recurringPayment","this","props","storedPaymentMethodId","paymentMethod","_object_spread","type","blikCode","state","data","isValid","displayName","label","name","additionalInfo","componentToRender","paymentData","h","Await","clientKey","onError","handleError","onComplete","brandLogo","icon","config","messageText","i18n","get","messageTextId","awaitText","awaitTextId","showCountdownTimer","delay","STATUS_INTERVAL","countdownTime","COUNTDOWN_MINUTES","throttleTime","THROTTLE_TIME","throttleInterval","THROTTLE_INTERVAL","onActionHandled","RedirectButton","showPayButton","payButton","onSubmit","submit","ref","componentRef","BlikInput","onChange","setState","_define_property","TxVariants","blik"],"mappings":"+oCAgBA,MAAMA,UAAoBC,EAGtBC,UAAAA,OAMiDC,EAAAC,EAL7C,MAAMC,IAAqBC,KAAKC,MAAMC,sBAEtC,MAAO,CACHC,cAAeC,EAAA,CACXC,KAAMX,EAAYW,OACbN,GAAoB,CAAEO,SAAoB,QAAVR,EAAAE,KAAKO,iBAALT,GAAgB,QAAhBD,EAAAC,EAAYU,YAAZ,IAAAX,OAAA,EAAAA,EAAkBS,UACnDP,GAAoB,CAAEG,sBAAuBF,KAAKC,MAAMC,wBAGxE,CAEA,WAAIO,GACA,QAAIT,KAAKC,MAAMC,yBAINF,KAAKO,MAAME,OACxB,CAEA,eAAIC,GACA,OAAIV,KAAKC,MAAMC,uBAAyBF,KAAKC,MAAMU,MACxCX,KAAKC,MAAMU,MAEfX,KAAKC,MAAMW,IACtB,CAEA,kBAAIC,GACA,OAAIb,KAAKC,MAAMC,uBAAyBF,KAAKC,MAAMU,MACxCX,KAAKC,MAAMW,KAEf,IACX,CAOA,iBAAAE,GACI,OAAId,KAAKC,MAAMc,YAEPC,EAACC,EAAAA,CACGC,UAAWlB,KAAKC,MAAMiB,UACtBH,YAAaf,KAAKC,MAAMc,YACxBI,QAASnB,KAAKoB,YACdC,WAAYrB,KAAKqB,WACjBC,UAAWtB,KAAKuB,KAChBlB,KAAMmB,EAAOnB,KACboB,YAAazB,KAAKC,MAAMyB,KAAKC,IAAIH,EAAOI,eACxCC,UAAW7B,KAAKC,MAAMyB,KAAKC,IAAIH,EAAOM,aACtCC,mBAAoBP,EAAOO,mBAC3BC,MAAOR,EAAOS,gBACdC,cAAeV,EAAOW,kBACtBC,aAAcZ,EAAOa,cACrBC,iBAAkBd,EAAOe,kBACzBC,gBAAiBxC,KAAKwC,kBAK3BxC,KAAKC,MAAMC,sBACdc,EAACyB,EAAAA,CACGC,cAAe1C,KAAKC,MAAMyC,cAC1B9B,KAAMZ,KAAKU,YACXiC,UAAW3C,KAAK2C,UAChBC,SAAU5C,KAAK6C,OACfC,IAAKA,IACD9C,KAAK+C,aAAeD,KAI5B9B,EAACgC,EAAAA,EAAAA,EAAAA,CAEGF,IAAKA,IACD9C,KAAK+C,aAAeD,IAEpB9C,KAAKC,OAAK,CACdgD,SAAUjD,KAAKkD,SACfN,SAAU5C,KAAK6C,OACfF,UAAW3C,KAAK2C,YAG5B,EArFAQ,EADEzD,EACqBW,OAAO+C,EAAWC"}
1
+ {"version":3,"file":"Blik.js","sources":["../../../../src/components/Blik/Blik.tsx"],"sourcesContent":["import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport BlikInput from '../../components/Blik/components/BlikInput';\nimport { Await } from '../internal/Await';\nimport config from './config';\nimport RedirectButton from '../../components/internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport { AwaitConfiguration } from '../internal/Await/types';\n\ninterface BlikElementData {\n paymentMethod: {\n type: string;\n blikCode: string;\n };\n}\n\nclass BlikElement extends UIElement<AwaitConfiguration> {\n public static readonly type = TxVariants.blik;\n\n formatData(): BlikElementData {\n const recurringPayment = !!this.props.storedPaymentMethodId;\n\n return {\n paymentMethod: {\n type: BlikElement.type,\n ...(!recurringPayment && { blikCode: this.state?.data?.blikCode }),\n ...(recurringPayment && { storedPaymentMethodId: this.props.storedPaymentMethodId })\n }\n };\n }\n\n get isValid(): boolean {\n if (this.props.storedPaymentMethodId) {\n return true;\n }\n\n return !!this.state.isValid;\n }\n\n get displayName() {\n if (this.props.storedPaymentMethodId && this.props.label) {\n return this.props.label;\n }\n return this.props.name;\n }\n\n get additionalInfo() {\n if (this.props.storedPaymentMethodId && this.props.label) {\n return this.props.name;\n }\n return null;\n }\n\n /**\n * NOTE: for future reference:\n * this.props.onComplete (which is called from this.onComplete) equates to the merchant defined onAdditionalDetails callback\n * (the initial /payments response defines an \"await\" action, actionTypes.ts translates this to \"onComplete: props.onAdditionalDetails\")\n */\n protected override componentToRender(): h.JSX.Element {\n if (this.props.paymentData) {\n return (\n <Await\n clientKey={this.props.clientKey}\n paymentData={this.props.paymentData}\n onError={this.handleError}\n onComplete={this.onComplete}\n brandLogo={this.icon}\n brandName={this.displayName}\n type={config.type}\n messageText={this.props.i18n.get(config.messageTextId)}\n awaitText={this.props.i18n.get(config.awaitTextId)}\n showCountdownTimer={config.showCountdownTimer}\n delay={config.STATUS_INTERVAL}\n countdownTime={config.COUNTDOWN_MINUTES}\n throttleTime={config.THROTTLE_TIME}\n throttleInterval={config.THROTTLE_INTERVAL}\n onActionHandled={this.onActionHandled}\n />\n );\n }\n\n return this.props.storedPaymentMethodId ? (\n <RedirectButton\n showPayButton={this.props.showPayButton}\n name={this.displayName}\n payButton={this.payButton}\n onSubmit={this.submit}\n ref={ref => {\n this.componentRef = ref;\n }}\n />\n ) : (\n <BlikInput\n // @ts-ignore Ref is used by preact component\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n onChange={this.setState}\n onSubmit={this.submit}\n payButton={this.payButton}\n />\n );\n }\n}\n\nexport default BlikElement;\n"],"names":["BlikElement","UIElement","formatData","_this_state_data","_this_state","recurringPayment","this","props","storedPaymentMethodId","paymentMethod","_object_spread","type","blikCode","state","data","isValid","displayName","label","name","additionalInfo","componentToRender","paymentData","h","Await","clientKey","onError","handleError","onComplete","brandLogo","icon","brandName","config","messageText","i18n","get","messageTextId","awaitText","awaitTextId","showCountdownTimer","delay","STATUS_INTERVAL","countdownTime","COUNTDOWN_MINUTES","throttleTime","THROTTLE_TIME","throttleInterval","THROTTLE_INTERVAL","onActionHandled","RedirectButton","showPayButton","payButton","onSubmit","submit","ref","componentRef","BlikInput","onChange","setState","_define_property","TxVariants","blik"],"mappings":"+oCAgBA,MAAMA,UAAoBC,EAGtBC,UAAAA,OAMiDC,EAAAC,EAL7C,MAAMC,IAAqBC,KAAKC,MAAMC,sBAEtC,MAAO,CACHC,cAAeC,EAAA,CACXC,KAAMX,EAAYW,OACbN,GAAoB,CAAEO,SAAoB,QAAVR,EAAAE,KAAKO,iBAALT,GAAgB,QAAhBD,EAAAC,EAAYU,YAAZ,IAAAX,OAAA,EAAAA,EAAkBS,UACnDP,GAAoB,CAAEG,sBAAuBF,KAAKC,MAAMC,wBAGxE,CAEA,WAAIO,GACA,QAAIT,KAAKC,MAAMC,yBAINF,KAAKO,MAAME,OACxB,CAEA,eAAIC,GACA,OAAIV,KAAKC,MAAMC,uBAAyBF,KAAKC,MAAMU,MACxCX,KAAKC,MAAMU,MAEfX,KAAKC,MAAMW,IACtB,CAEA,kBAAIC,GACA,OAAIb,KAAKC,MAAMC,uBAAyBF,KAAKC,MAAMU,MACxCX,KAAKC,MAAMW,KAEf,IACX,CAOA,iBAAAE,GACI,OAAId,KAAKC,MAAMc,YAEPC,EAACC,EAAAA,CACGC,UAAWlB,KAAKC,MAAMiB,UACtBH,YAAaf,KAAKC,MAAMc,YACxBI,QAASnB,KAAKoB,YACdC,WAAYrB,KAAKqB,WACjBC,UAAWtB,KAAKuB,KAChBC,UAAWxB,KAAKU,YAChBL,KAAMoB,EAAOpB,KACbqB,YAAa1B,KAAKC,MAAM0B,KAAKC,IAAIH,EAAOI,eACxCC,UAAW9B,KAAKC,MAAM0B,KAAKC,IAAIH,EAAOM,aACtCC,mBAAoBP,EAAOO,mBAC3BC,MAAOR,EAAOS,gBACdC,cAAeV,EAAOW,kBACtBC,aAAcZ,EAAOa,cACrBC,iBAAkBd,EAAOe,kBACzBC,gBAAiBzC,KAAKyC,kBAK3BzC,KAAKC,MAAMC,sBACdc,EAAC0B,EAAAA,CACGC,cAAe3C,KAAKC,MAAM0C,cAC1B/B,KAAMZ,KAAKU,YACXkC,UAAW5C,KAAK4C,UAChBC,SAAU7C,KAAK8C,OACfC,IAAKA,IACD/C,KAAKgD,aAAeD,KAI5B/B,EAACiC,EAAAA,EAAAA,EAAAA,CAEGF,IAAKA,IACD/C,KAAKgD,aAAeD,IAEpB/C,KAAKC,OAAK,CACdiD,SAAUlD,KAAKmD,SACfN,SAAU7C,KAAK8C,OACfF,UAAW5C,KAAK4C,YAG5B,EAtFAQ,EADE1D,EACqBW,OAAOgD,EAAWC"}
@@ -1,2 +1,2 @@
1
- import{createElement as t}from"../../external/preact/dist/preact.js";import e from"../../utils/isMobile.js";import o from"../helpers/IssuerListContainer/IssuerListContainer.js";import{QRLoader as r}from"../internal/QRLoader/QRLoader.js";import"../../core/Context/CoreProvider.js";import"../../external/preact/hooks/dist/hooks.js";import"../../core/Errors/SRPanelContext.js";import"../internal/Button/Button.js";import"../internal/QRLoader/QRLoaderDetailsProvider.js";import{TxVariants as s}from"../tx-variants.js";import n from"./components/IrisComponent.js";import{IrisQrCodeInstructions as i}from"./components/IrisQrCodeInstructions.js";import{IrisMode as p}from"./types.js";import{DEFAULT_IRIS_COUNTDOWN_TIME as a}from"./constants.js";function d(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function u(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}class c extends o{renderIssuerList(){return super.componentToRender()}formatData(){var t,e;return this.state.mode===p.BANK_LIST?{paymentMethod:{type:this.type,issuer:null===(e=this.state)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.issuer}}:{paymentMethod:{type:this.type}}}formatProps(t){var e;return u(function(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},r=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),r.forEach(function(e){d(t,e,o[e])})}return t}({},super.formatProps(t)),{countdownTime:null!==(e=t.countdownTime)&&void 0!==e?e:a})}get isValid(){return this.state.mode!==p.BANK_LIST||super.isValid}componentToRender(){return"qrCode"===this.props.type?t(r,{type:s.iris,brandLogo:this.icon,clientKey:this.props.clientKey,qrCodeData:this.props.qrCodeData?encodeURIComponent(this.props.qrCodeData):void 0,countdownTime:this.props.countdownTime,paymentData:this.props.paymentData,delay:this.props.delay,onActionHandled:this.onActionHandled,onError:this.props.onError,onComplete:this.onComplete,introduction:i,showAmount:!0,copyBtn:!1}):t(n,{setComponentRef:this.setComponentRef,defaultMode:this.defaultMode,onUpdateMode:t=>{this.setState({mode:t})},issuerListUI:this.renderIssuerList(),showPayButton:this.props.showPayButton,payButton:this.payButton,issuers:this.props.issuers||[]})}constructor(...t){super(...t),d(this,"defaultMode",e()?p.BANK_LIST:p.QR_CODE),d(this,"state",{isValid:this.defaultMode===p.QR_CODE,mode:this.defaultMode,data:{}})}}d(c,"type",s.iris);export{c as Iris,c as default};
1
+ import{createElement as t}from"../../external/preact/dist/preact.js";import e from"../../utils/isMobile.js";import o from"../helpers/IssuerListContainer/IssuerListContainer.js";import{QRLoader as r}from"../internal/QRLoader/QRLoader.js";import"../../core/Context/CoreProvider.js";import"../../external/preact/hooks/dist/hooks.js";import"../../core/Errors/SRPanelContext.js";import"../internal/Button/Button.js";import"../internal/QRLoader/QRLoaderDetailsProvider.js";import{TxVariants as s}from"../tx-variants.js";import n from"./components/IrisComponent.js";import{IrisQrCodeInstructions as i}from"./components/IrisQrCodeInstructions.js";import{IrisMode as p}from"./types.js";import{DEFAULT_IRIS_COUNTDOWN_TIME as a}from"./constants.js";function d(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function u(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}class c extends o{renderIssuerList(){return super.componentToRender()}formatData(){var t,e;return this.state.mode===p.BANK_LIST?{paymentMethod:{type:this.type,issuer:null===(e=this.state)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.issuer}}:{paymentMethod:{type:this.type}}}formatProps(t){var e;return u(function(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},r=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),r.forEach(function(e){d(t,e,o[e])})}return t}({},super.formatProps(t)),{countdownTime:null!==(e=t.countdownTime)&&void 0!==e?e:a})}get isValid(){return this.state.mode!==p.BANK_LIST||super.isValid}componentToRender(){return"qrCode"===this.props.type?t(r,{type:s.iris,brandLogo:this.icon,brandName:this.displayName,clientKey:this.props.clientKey,qrCodeData:this.props.qrCodeData?encodeURIComponent(this.props.qrCodeData):void 0,countdownTime:this.props.countdownTime,paymentData:this.props.paymentData,delay:this.props.delay,onActionHandled:this.onActionHandled,onError:this.props.onError,onComplete:this.onComplete,introduction:i,showAmount:!0,copyBtn:!1}):t(n,{setComponentRef:this.setComponentRef,defaultMode:this.defaultMode,onUpdateMode:t=>{this.setState({mode:t})},issuerListUI:this.renderIssuerList(),showPayButton:this.props.showPayButton,payButton:this.payButton,issuers:this.props.issuers||[]})}constructor(...t){super(...t),d(this,"defaultMode",e()?p.BANK_LIST:p.QR_CODE),d(this,"state",{isValid:this.defaultMode===p.QR_CODE,mode:this.defaultMode,data:{}})}}d(c,"type",s.iris);export{c as Iris,c as default};
2
2
  //# sourceMappingURL=Iris.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Iris.js","sources":["../../../../src/components/Iris/Iris.tsx"],"sourcesContent":["import { h } from 'preact';\nimport isMobile from '../../utils/isMobile';\nimport IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { QRLoader } from '../internal/QRLoader';\nimport { TxVariants } from '../tx-variants';\nimport IrisComponent from './components/IrisComponent';\nimport { IrisQrCodeInstructions } from './components/IrisQrCodeInstructions';\nimport { IrisConfiguration, IrisData, IrisMode, IrisState } from './types';\nimport { DEFAULT_IRIS_COUNTDOWN_TIME } from './constants';\n\nexport class Iris extends IssuerListContainer<IrisConfiguration, IrisData> {\n public static readonly type = TxVariants.iris;\n\n private readonly defaultMode = isMobile() ? IrisMode.BANK_LIST : IrisMode.QR_CODE;\n\n public state: IrisState = {\n isValid: this.defaultMode === IrisMode.QR_CODE,\n mode: this.defaultMode,\n data: {}\n };\n\n private renderIssuerList(): h.JSX.Element {\n return super.componentToRender();\n }\n\n formatData(): IrisData {\n if (this.state.mode === IrisMode.BANK_LIST) {\n return {\n paymentMethod: {\n type: this.type,\n issuer: this.state?.data?.issuer\n }\n };\n }\n\n return {\n paymentMethod: {\n type: this.type\n }\n };\n }\n\n formatProps(props: IrisConfiguration): IrisConfiguration {\n return {\n ...super.formatProps(props),\n countdownTime: props.countdownTime ?? DEFAULT_IRIS_COUNTDOWN_TIME\n };\n }\n\n get isValid() {\n if (this.state.mode === IrisMode.BANK_LIST) {\n return super.isValid;\n }\n\n return true;\n }\n\n protected override componentToRender(): h.JSX.Element {\n if (this.props.type === 'qrCode') {\n return (\n <QRLoader\n type={TxVariants.iris}\n brandLogo={this.icon}\n clientKey={this.props.clientKey}\n qrCodeData={this.props.qrCodeData ? encodeURIComponent(this.props.qrCodeData) : undefined}\n countdownTime={this.props.countdownTime}\n paymentData={this.props.paymentData}\n delay={this.props.delay}\n onActionHandled={this.onActionHandled}\n onError={this.props.onError}\n onComplete={this.onComplete}\n introduction={IrisQrCodeInstructions}\n showAmount\n copyBtn={false}\n />\n );\n }\n\n return (\n <IrisComponent\n setComponentRef={this.setComponentRef}\n defaultMode={this.defaultMode}\n onUpdateMode={mode => {\n this.setState({ mode });\n }}\n issuerListUI={this.renderIssuerList()}\n showPayButton={this.props.showPayButton}\n payButton={this.payButton}\n issuers={this.props.issuers || []}\n />\n );\n }\n}\n\nexport default Iris;\n"],"names":["Iris","IssuerListContainer","renderIssuerList","super","componentToRender","formatData","_this_state_data","_this_state","this","state","mode","IrisMode","BANK_LIST","paymentMethod","type","issuer","data","formatProps","props","_object_spread_props","_object_spread","countdownTime","DEFAULT_IRIS_COUNTDOWN_TIME","isValid","h","QRLoader","TxVariants","iris","brandLogo","icon","clientKey","qrCodeData","encodeURIComponent","undefined","paymentData","delay","onActionHandled","onError","onComplete","introduction","IrisQrCodeInstructions","showAmount","copyBtn","IrisComponent","setComponentRef","defaultMode","onUpdateMode","setState","issuerListUI","showPayButton","payButton","issuers","args","_define_property","isMobile","QR_CODE"],"mappings":"usCAUO,MAAMA,UAAaC,EAWdC,gBAAAA,GACJ,OAAOC,MAAMC,mBACjB,CAEAC,UAAAA,OAKwBC,EAAAC,EAJpB,OAAIC,KAAKC,MAAMC,OAASC,EAASC,UACtB,CACHC,cAAe,CACXC,KAAMN,KAAKM,KACXC,OAAkB,QAAVR,EAAAC,KAAKC,iBAALF,GAAgB,QAAhBD,EAAAC,EAAYS,YAAZ,IAAAV,OAAA,EAAAA,EAAkBS,SAK/B,CACHF,cAAe,CACXC,KAAMN,KAAKM,MAGvB,CAEAG,WAAAA,CAAYC,GAGWA,IAAAA,EAFnB,OAAOC,oUAAAC,CAAA,CAAA,EACAjB,MAAMc,YAAYC,IAAAA,CACrBG,cAAkC,QAAnBH,EAAAA,EAAMG,yBAANH,EAAAA,EAAuBI,GAE9C,CAEA,WAAIC,GACA,OAAIf,KAAKC,MAAMC,OAASC,EAASC,WACtBT,MAAMoB,OAIrB,CAEmBnB,iBAAAA,GACf,MAAwB,WAApBI,KAAKU,MAAMJ,KAEPU,EAACC,EAAAA,CACGX,KAAMY,EAAWC,KACjBC,UAAWpB,KAAKqB,KAChBC,UAAWtB,KAAKU,MAAMY,UACtBC,WAAYvB,KAAKU,MAAMa,WAAaC,mBAAmBxB,KAAKU,MAAMa,iBAAcE,EAChFZ,cAAeb,KAAKU,MAAMG,cAC1Ba,YAAa1B,KAAKU,MAAMgB,YACxBC,MAAO3B,KAAKU,MAAMiB,MAClBC,gBAAiB5B,KAAK4B,gBACtBC,QAAS7B,KAAKU,MAAMmB,QACpBC,WAAY9B,KAAK8B,WACjBC,aAAcC,EACdC,YAAAA,EACAC,SAAS,IAMjBlB,EAACmB,EAAAA,CACGC,gBAAiBpC,KAAKoC,gBACtBC,YAAarC,KAAKqC,YAClBC,aAAcpC,IACVF,KAAKuC,SAAS,CAAErC,UAEpBsC,aAAcxC,KAAKN,mBACnB+C,cAAezC,KAAKU,MAAM+B,cAC1BC,UAAW1C,KAAK0C,UAChBC,QAAS3C,KAAKU,MAAMiC,SAAW,IAG3C,mBAjFGhD,SAAAiD,GAGHC,EAAA7C,KAAiBqC,cAAcS,IAAa3C,EAASC,UAAYD,EAAS4C,SAE1EF,EAAA7C,KAAOC,QAAmB,CACtBc,QAASf,KAAKqC,cAAgBlC,EAAS4C,QACvC7C,KAAMF,KAAKqC,YACX7B,KAAM,CAAA,KAPVqC,EADSrD,EACcc,OAAOY,EAAWC"}
1
+ {"version":3,"file":"Iris.js","sources":["../../../../src/components/Iris/Iris.tsx"],"sourcesContent":["import { h } from 'preact';\nimport isMobile from '../../utils/isMobile';\nimport IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { QRLoader } from '../internal/QRLoader';\nimport { TxVariants } from '../tx-variants';\nimport IrisComponent from './components/IrisComponent';\nimport { IrisQrCodeInstructions } from './components/IrisQrCodeInstructions';\nimport { IrisConfiguration, IrisData, IrisMode, IrisState } from './types';\nimport { DEFAULT_IRIS_COUNTDOWN_TIME } from './constants';\n\nexport class Iris extends IssuerListContainer<IrisConfiguration, IrisData> {\n public static readonly type = TxVariants.iris;\n\n private readonly defaultMode = isMobile() ? IrisMode.BANK_LIST : IrisMode.QR_CODE;\n\n public state: IrisState = {\n isValid: this.defaultMode === IrisMode.QR_CODE,\n mode: this.defaultMode,\n data: {}\n };\n\n private renderIssuerList(): h.JSX.Element {\n return super.componentToRender();\n }\n\n formatData(): IrisData {\n if (this.state.mode === IrisMode.BANK_LIST) {\n return {\n paymentMethod: {\n type: this.type,\n issuer: this.state?.data?.issuer\n }\n };\n }\n\n return {\n paymentMethod: {\n type: this.type\n }\n };\n }\n\n formatProps(props: IrisConfiguration): IrisConfiguration {\n return {\n ...super.formatProps(props),\n countdownTime: props.countdownTime ?? DEFAULT_IRIS_COUNTDOWN_TIME\n };\n }\n\n get isValid() {\n if (this.state.mode === IrisMode.BANK_LIST) {\n return super.isValid;\n }\n\n return true;\n }\n\n protected override componentToRender(): h.JSX.Element {\n if (this.props.type === 'qrCode') {\n return (\n <QRLoader\n type={TxVariants.iris}\n brandLogo={this.icon}\n brandName={this.displayName}\n clientKey={this.props.clientKey}\n qrCodeData={this.props.qrCodeData ? encodeURIComponent(this.props.qrCodeData) : undefined}\n countdownTime={this.props.countdownTime}\n paymentData={this.props.paymentData}\n delay={this.props.delay}\n onActionHandled={this.onActionHandled}\n onError={this.props.onError}\n onComplete={this.onComplete}\n introduction={IrisQrCodeInstructions}\n showAmount\n copyBtn={false}\n />\n );\n }\n\n return (\n <IrisComponent\n setComponentRef={this.setComponentRef}\n defaultMode={this.defaultMode}\n onUpdateMode={mode => {\n this.setState({ mode });\n }}\n issuerListUI={this.renderIssuerList()}\n showPayButton={this.props.showPayButton}\n payButton={this.payButton}\n issuers={this.props.issuers || []}\n />\n );\n }\n}\n\nexport default Iris;\n"],"names":["Iris","IssuerListContainer","renderIssuerList","super","componentToRender","formatData","_this_state_data","_this_state","this","state","mode","IrisMode","BANK_LIST","paymentMethod","type","issuer","data","formatProps","props","_object_spread_props","_object_spread","countdownTime","DEFAULT_IRIS_COUNTDOWN_TIME","isValid","h","QRLoader","TxVariants","iris","brandLogo","icon","brandName","displayName","clientKey","qrCodeData","encodeURIComponent","undefined","paymentData","delay","onActionHandled","onError","onComplete","introduction","IrisQrCodeInstructions","showAmount","copyBtn","IrisComponent","setComponentRef","defaultMode","onUpdateMode","setState","issuerListUI","showPayButton","payButton","issuers","args","_define_property","isMobile","QR_CODE"],"mappings":"usCAUO,MAAMA,UAAaC,EAWdC,gBAAAA,GACJ,OAAOC,MAAMC,mBACjB,CAEAC,UAAAA,OAKwBC,EAAAC,EAJpB,OAAIC,KAAKC,MAAMC,OAASC,EAASC,UACtB,CACHC,cAAe,CACXC,KAAMN,KAAKM,KACXC,OAAkB,QAAVR,EAAAC,KAAKC,iBAALF,GAAgB,QAAhBD,EAAAC,EAAYS,YAAZ,IAAAV,OAAA,EAAAA,EAAkBS,SAK/B,CACHF,cAAe,CACXC,KAAMN,KAAKM,MAGvB,CAEAG,WAAAA,CAAYC,GAGWA,IAAAA,EAFnB,OAAOC,oUAAAC,CAAA,CAAA,EACAjB,MAAMc,YAAYC,IAAAA,CACrBG,cAAkC,QAAnBH,EAAAA,EAAMG,yBAANH,EAAAA,EAAuBI,GAE9C,CAEA,WAAIC,GACA,OAAIf,KAAKC,MAAMC,OAASC,EAASC,WACtBT,MAAMoB,OAIrB,CAEmBnB,iBAAAA,GACf,MAAwB,WAApBI,KAAKU,MAAMJ,KAEPU,EAACC,EAAAA,CACGX,KAAMY,EAAWC,KACjBC,UAAWpB,KAAKqB,KAChBC,UAAWtB,KAAKuB,YAChBC,UAAWxB,KAAKU,MAAMc,UACtBC,WAAYzB,KAAKU,MAAMe,WAAaC,mBAAmB1B,KAAKU,MAAMe,iBAAcE,EAChFd,cAAeb,KAAKU,MAAMG,cAC1Be,YAAa5B,KAAKU,MAAMkB,YACxBC,MAAO7B,KAAKU,MAAMmB,MAClBC,gBAAiB9B,KAAK8B,gBACtBC,QAAS/B,KAAKU,MAAMqB,QACpBC,WAAYhC,KAAKgC,WACjBC,aAAcC,EACdC,YAAAA,EACAC,SAAS,IAMjBpB,EAACqB,EAAAA,CACGC,gBAAiBtC,KAAKsC,gBACtBC,YAAavC,KAAKuC,YAClBC,aAActC,IACVF,KAAKyC,SAAS,CAAEvC,UAEpBwC,aAAc1C,KAAKN,mBACnBiD,cAAe3C,KAAKU,MAAMiC,cAC1BC,UAAW5C,KAAK4C,UAChBC,QAAS7C,KAAKU,MAAMmC,SAAW,IAG3C,mBAlFGlD,SAAAmD,GAGHC,EAAA/C,KAAiBuC,cAAcS,IAAa7C,EAASC,UAAYD,EAAS8C,SAE1EF,EAAA/C,KAAOC,QAAmB,CACtBc,QAASf,KAAKuC,cAAgBpC,EAAS8C,QACvC/C,KAAMF,KAAKuC,YACX/B,KAAM,CAAA,KAPVuC,EADSvD,EACcc,OAAOY,EAAWC"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../external/preact/dist/preact.js";import{UIElement as t}from"../internal/UIElement/UIElement.js";import r from"./components/MBWayInput/MBWayInput.js";import n from"./components/MBWayAwait/config.js";import{Await as o}from"../internal/Await/Await.js";import{TxVariants as a}from"../tx-variants.js";function p(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]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){p(e,t,r[t])})}return e}function s(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}class m extends t{formatProps(e){const{data:t={},placeholders:r={}}=e;return s(i({},e),{data:{phoneNumber:t.telephoneNumber||t.phoneNumber,phonePrefix:t.phonePrefix||"+351"},placeholders:{phoneNumber:r.telephoneNumber||r.phoneNumber}})}formatData(){var e;return{paymentMethod:i({type:m.type},(null===(e=this.state.data)||void 0===e?void 0:e.phoneNumber)&&{telephoneNumber:this.state.data.phonePrefix+this.state.data.phoneNumber})}}get isValid(){return!!this.state.isValid}get displayName(){return this.props.name}componentToRender(){return this.props.paymentData?e(o,{clientKey:this.props.clientKey,paymentData:this.props.paymentData,onError:this.props.onError,onComplete:this.onComplete,brandLogo:this.icon,type:n.type,messageText:this.props.i18n.get(n.messageTextId),awaitText:this.props.i18n.get(n.awaitTextId),showCountdownTimer:n.showCountdownTimer,delay:n.STATUS_INTERVAL,countdownTime:n.COUNTDOWN_MINUTES,throttleTime:n.THROTTLE_TIME,throttleInterval:n.THROTTLE_INTERVAL,onActionHandled:this.onActionHandled}):e(r,s(i({ref:e=>{this.componentRef=e}},this.props),{setComponentRef:this.setComponentRef,onChange:this.setState,onSubmit:this.submit,payButton:this.payButton}))}}p(m,"type",a.mbway);export{m as MBWayElement,m as default};
1
+ import{createElement as e}from"../../external/preact/dist/preact.js";import{UIElement as t}from"../internal/UIElement/UIElement.js";import r from"./components/MBWayInput/MBWayInput.js";import n from"./components/MBWayAwait/config.js";import{Await as o}from"../internal/Await/Await.js";import{TxVariants as a}from"../tx-variants.js";function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){i(e,t,r[t])})}return e}function s(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}class m extends t{formatProps(e){const{data:t={},placeholders:r={}}=e;return s(p({},e),{data:{phoneNumber:t.telephoneNumber||t.phoneNumber,phonePrefix:t.phonePrefix||"+351"},placeholders:{phoneNumber:r.telephoneNumber||r.phoneNumber}})}formatData(){var e;return{paymentMethod:p({type:m.type},(null===(e=this.state.data)||void 0===e?void 0:e.phoneNumber)&&{telephoneNumber:this.state.data.phonePrefix+this.state.data.phoneNumber})}}get isValid(){return!!this.state.isValid}get displayName(){return this.props.name}componentToRender(){return this.props.paymentData?e(o,{clientKey:this.props.clientKey,paymentData:this.props.paymentData,onError:this.props.onError,onComplete:this.onComplete,brandLogo:this.icon,brandName:this.displayName,type:n.type,messageText:this.props.i18n.get(n.messageTextId),awaitText:this.props.i18n.get(n.awaitTextId),showCountdownTimer:n.showCountdownTimer,delay:n.STATUS_INTERVAL,countdownTime:n.COUNTDOWN_MINUTES,throttleTime:n.THROTTLE_TIME,throttleInterval:n.THROTTLE_INTERVAL,onActionHandled:this.onActionHandled}):e(r,s(p({ref:e=>{this.componentRef=e}},this.props),{setComponentRef:this.setComponentRef,onChange:this.setState,onSubmit:this.submit,payButton:this.payButton}))}}i(m,"type",a.mbway);export{m as MBWayElement,m as default};
2
2
  //# sourceMappingURL=MBWay.js.map