straumur-web-component 0.5.1 → 0.5.6-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +10 -2318
- package/dist/index.mjs.map +1 -0
- package/package.json +4 -12
- package/dist/index.cjs +0 -2331
- package/dist/index.d.cts +0 -110
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../node_modules/preact/src/constants.js","../node_modules/preact/src/util.js","../node_modules/preact/src/options.js","../node_modules/preact/src/create-element.js","../node_modules/preact/src/component.js","../node_modules/preact/src/diff/props.js","../node_modules/preact/src/create-context.js","../node_modules/preact/src/diff/children.js","../node_modules/preact/src/diff/index.js","../node_modules/preact/src/render.js","../node_modules/preact/src/clone-element.js","../node_modules/preact/src/diff/catch-error.js","#style-inject:#style-inject","../node_modules/@adyen/adyen-web/dist/es/adyen.css","../src/styles/main.css","../src/env.ts","../src/adapter/straumur-adapter.ts","../src/services/straumur-service.ts","../node_modules/preact/hooks/src/index.js","../src/features/card/card-component.css","../src/components/payment-method-group/payment-method-group-context.tsx","../node_modules/node_modules/preact/dist/preact.mjs","../node_modules/node_modules/preact/hooks/dist/hooks.mjs","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/constants.ts","../node_modules/@adyen/adyen-web/src/utils/getProp.ts","../node_modules/@adyen/adyen-web/src/core/Errors/constants.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/SFP/SFPUtils.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/AbstractCSF.ts","../node_modules/@adyen/adyen-web/src/utils/commonUtils.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/utils/getCardGroupTypes.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/utilities/logger.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/extensions/handleConfig.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/utils/callbackUtils.ts","../node_modules/@adyen/adyen-web/src/utils/hasOwnProperty.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/utils/processErrors.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/extensions/handleValidation.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/utils/iframes/postMessageToIframe.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/utils/iframes/getIframeContentWin.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/extensions/handleEncryption.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/utilities/dom.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/utils/cardType.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/securedField/utils/createIframe.ts","../node_modules/@adyen/adyen-web/src/utils/listenerUtils.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/utils/iframes/postMessageValidation.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/utilities/commonUtils.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.ts","../node_modules/@adyen/adyen-web/src/core/Errors/utils.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/utilities/addContextTranslations.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/securedField/utils/processAriaConfig.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/securedField/utils/processPlaceholders.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/securedField/SecuredField.ts","../node_modules/@adyen/adyen-web/src/core/Errors/AdyenCheckoutError.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/utils/userAgent.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/extensions/handleIOSTouchEvents.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/utils/tabbing/utils.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/utils/tabbing/tabScenarioCreditCard.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/utils/tabbing/tabScenarioGiftCard.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/utils/tabbing/tabScenarioKCP.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/extensions/handleTab.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/extensions/handleBrandFromBinLookup.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/partials/setFocusOnFrame.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/partials/postMessageToAllIframes.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/partials/processBrand.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/partials/processAutoComplete.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/partials/handleFocus.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/partials/handleIframeConfigFeedback.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/partials/isConfigured.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/partials/validateForm.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/partials/handleBinValue.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/utils/destroySecuredFields.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/CSF.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/lib/CSF/initCSF.ts","../node_modules/@adyen/adyen-web/src/utils/textUtils.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/utils.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/SFP/defaultProps.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/SFP/SecuredFieldsProvider.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/binLookup/createCardVariantSwitcher.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/binLookup/extensions.ts","../node_modules/@adyen/adyen-web/src/core/Context/CoreProvider.tsx","../node_modules/@adyen/adyen-web/src/core/Context/useImage.ts","../node_modules/@adyen/adyen-web/src/components/ThreeDS2/constants.ts","../node_modules/@adyen/adyen-web/src/utils/isValidURL.ts","../node_modules/@adyen/adyen-web/dist/es/_virtual/_commonjsHelpers.js","../node_modules/@adyen/adyen-web/dist/es/_virtual/index2.js","../node_modules/node_modules/classnames/index.js","../node_modules/@adyen/adyen-web/dist/es/_virtual/index.js","../node_modules/@adyen/adyen-web/src/components/internal/Spinner/Spinner.tsx","../node_modules/@adyen/adyen-web/src/utils/uuid.ts","../node_modules/@adyen/adyen-web/src/components/internal/Img/Img.tsx","../node_modules/@adyen/adyen-web/src/language/utils.ts","../node_modules/@adyen/adyen-web/src/core/config.ts","../node_modules/@adyen/adyen-web/src/core/Services/http.ts","../node_modules/@adyen/adyen-web/src/utils/debounce.ts","../node_modules/@adyen/adyen-web/src/components/internal/Button/Button.tsx","../node_modules/@adyen/adyen-web/src/core/Analytics/constants.ts","../node_modules/@adyen/adyen-web/src/utils/Formatters/formatters.ts","../node_modules/@adyen/adyen-web/src/core/Analytics/utils.ts","../node_modules/@adyen/adyen-web/src/core/Analytics/AnalyticsEvent.ts","../node_modules/@adyen/adyen-web/src/core/Analytics/AnalyticsInfoEvent.ts","../node_modules/@adyen/adyen-web/src/utils/browserInfo.ts","../node_modules/@adyen/adyen-web/src/components/internal/SecuredFields/binLookup/triggerBinLookUp.ts","../node_modules/@adyen/adyen-web/src/utils/Script.ts","../node_modules/@adyen/adyen-web/src/components/internal/PayButton/utils.ts","../node_modules/@adyen/adyen-web/src/components/internal/PayButton/components/SecondaryButtonLabel.tsx","../node_modules/@adyen/adyen-web/src/components/internal/PayButton/PayButton.tsx","../node_modules/@adyen/adyen-web/src/components/internal/IFrame/Iframe.tsx","../node_modules/@adyen/adyen-web/src/components/tx-variants.ts","../node_modules/@adyen/adyen-web/src/components/internal/BaseElement/BaseElement.ts","../node_modules/@adyen/adyen-web/src/components/internal/UIElement/utils.ts","../node_modules/@adyen/adyen-web/src/core/Errors/CancelError.ts","../node_modules/@adyen/adyen-web/src/core/Analytics/AnalyticsLogEvent.ts","../node_modules/@adyen/adyen-web/src/core/Analytics/AnalyticsErrorEvent.ts","../node_modules/@adyen/adyen-web/src/components/internal/UIElement/UIElement.tsx","../node_modules/@adyen/adyen-web/src/components/CustomCard/CustomCardInput/CustomCardInput.tsx","../node_modules/@adyen/adyen-web/src/components/CustomCard/CustomCard.tsx","../node_modules/@adyen/adyen-web/src/components/ThreeDS2/components/Form/ThreeDS2Form.tsx","../node_modules/@adyen/adyen-web/src/utils/get-process-message-handler.ts","../node_modules/@adyen/adyen-web/src/utils/getOrigin.ts","../node_modules/@adyen/adyen-web/src/utils/base64.ts","../node_modules/@adyen/adyen-web/src/components/ThreeDS2/components/utils.ts","../node_modules/@adyen/adyen-web/src/utils/promiseTimeout.ts","../node_modules/@adyen/adyen-web/src/components/ThreeDS2/components/Challenge/DoChallenge3DS2.tsx","../node_modules/@adyen/adyen-web/src/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.tsx","../node_modules/@adyen/adyen-web/src/components/ThreeDS2/ThreeDS2Challenge.tsx","../node_modules/@adyen/adyen-web/src/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.tsx","../node_modules/@adyen/adyen-web/src/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.tsx","../node_modules/@adyen/adyen-web/src/core/Services/sessions/constants.ts","../node_modules/@adyen/adyen-web/src/components/ThreeDS2/callSubmit3DS2Fingerprint.ts","../node_modules/@adyen/adyen-web/src/components/ThreeDS2/ThreeDS2DeviceFingerprint.tsx","../node_modules/@adyen/adyen-web/src/components/internal/RedirectButton/RedirectButton.tsx","../node_modules/@adyen/adyen-web/src/utils/constants/currency-decimals.ts","../node_modules/@adyen/adyen-web/src/utils/constants/currency-minor-units.ts","../node_modules/@adyen/adyen-web/src/utils/amount-util.ts","../node_modules/@adyen/adyen-web/src/components/ApplePay/components/ApplePayButton.tsx","../node_modules/@adyen/adyen-web/src/components/ApplePay/services/ApplePayService.ts","../node_modules/@adyen/adyen-web/src/components/ApplePay/defaultProps.ts","../node_modules/@adyen/adyen-web/src/components/ApplePay/utils/payment-request.ts","../node_modules/@adyen/adyen-web/src/components/ApplePay/utils/resolve-supported-version.ts","../node_modules/@adyen/adyen-web/src/components/ApplePay/utils/format-applepay-contact-to-adyen-format.ts","../node_modules/@adyen/adyen-web/src/components/ApplePay/utils/map-adyen-brands-to-applepay-brands.ts","../node_modules/@adyen/adyen-web/src/components/ApplePay/services/ApplePaySdkLoader.ts","../node_modules/@adyen/adyen-web/src/utils/detectInIframe.ts","../node_modules/@adyen/adyen-web/src/components/ApplePay/ApplePay.tsx","../node_modules/@adyen/adyen-web/src/components/GooglePay/config.ts","../node_modules/@adyen/adyen-web/src/components/GooglePay/requests.ts","../node_modules/@adyen/adyen-web/src/components/GooglePay/utils.ts","../node_modules/@adyen/adyen-web/src/components/GooglePay/GooglePayService.ts","../node_modules/@adyen/adyen-web/src/components/GooglePay/components/GooglePayButton.tsx","../node_modules/@adyen/adyen-web/src/components/GooglePay/defaultProps.ts","../node_modules/@adyen/adyen-web/src/components/GooglePay/GooglePay.tsx","../node_modules/@adyen/adyen-web/src/utils/detectInIframeInSameOrigin.ts","../node_modules/@adyen/adyen-web/src/components/Redirect/components/RedirectShopper/RedirectShopper.tsx","../node_modules/@adyen/adyen-web/src/components/Redirect/Redirect.tsx","../node_modules/@adyen/adyen-web/src/core/Environment/constants.ts","../node_modules/@adyen/adyen-web/src/core/Environment/Environment.ts","../node_modules/@adyen/adyen-web/src/core/utils.ts","../node_modules/@adyen/adyen-web/src/language/Language.ts","../node_modules/@adyen/adyen-web/src/core/RiskModule/constants.ts","../node_modules/@adyen/adyen-web/src/core/RiskModule/components/DeviceFingerprint/GetDeviceFingerprint.tsx","../node_modules/@adyen/adyen-web/src/core/RiskModule/components/DeviceFingerprint/utils.ts","../node_modules/@adyen/adyen-web/src/core/RiskModule/components/DeviceFingerprint/DeviceFingerprint.tsx","../node_modules/@adyen/adyen-web/src/core/RiskModule/RiskModule.tsx","../node_modules/@adyen/adyen-web/src/core/ProcessResponse/PaymentMethods/filters.ts","../node_modules/@adyen/adyen-web/src/core/ProcessResponse/PaymentMethods/utils.ts","../node_modules/@adyen/adyen-web/src/core/ProcessResponse/PaymentMethods/PaymentMethods.ts","../node_modules/@adyen/adyen-web/src/core/ProcessResponse/PaymentAction/actionTypes.ts","../node_modules/@adyen/adyen-web/src/core/ProcessResponse/PaymentAction/PaymentAction.ts","../node_modules/@adyen/adyen-web/src/utils/Storage.ts","../node_modules/@adyen/adyen-web/src/core/Services/analytics/collect-id.ts","../node_modules/@adyen/adyen-web/src/core/Analytics/EventsQueue.ts","../node_modules/@adyen/adyen-web/src/core/Analytics/Analytics.ts","../node_modules/@adyen/adyen-web/src/core/Services/sessions/make-payment.ts","../node_modules/@adyen/adyen-web/src/core/Services/sessions/submit-details.ts","../node_modules/@adyen/adyen-web/src/core/Services/sessions/setup-session.ts","../node_modules/@adyen/adyen-web/src/core/Services/sessions/check-balance.ts","../node_modules/@adyen/adyen-web/src/core/Services/sessions/create-order.ts","../node_modules/@adyen/adyen-web/src/core/CheckoutSession/utils.ts","../node_modules/@adyen/adyen-web/src/core/Services/sessions/cancel-order.ts","../node_modules/@adyen/adyen-web/src/core/CheckoutSession/CheckoutSession.ts","../node_modules/@adyen/adyen-web/src/core/Context/Resources.ts","../node_modules/@adyen/adyen-web/src/core/Errors/SRMessages.tsx","../node_modules/@adyen/adyen-web/src/core/Errors/SRPanel.tsx","../node_modules/@adyen/adyen-web/src/core/core.registry.ts","../node_modules/@adyen/adyen-web/src/language/constants.ts","../node_modules/@adyen/adyen-web/src/core/Services/get-translations.ts","../node_modules/@adyen/adyen-web/src/core/core.defaultProps.ts","../node_modules/@adyen/adyen-web/src/core/core.ts","../node_modules/@adyen/adyen-web/src/core/AdyenCheckout.ts","../src/localizations/translations.ts","../src/localizations/i18n.ts","../src/components/tooltip/tooltip.css","../src/components/tooltip/tooltip.tsx","../src/assets/icons/card.tsx","../src/assets/icons/info.tsx","../src/assets/icons/mastercard.tsx","../src/assets/icons/visa.tsx","../src/assets/icons/maestro.tsx","../src/assets/icons/amex.tsx","../src/assets/icons/jcb.tsx","../src/assets/icons/diners.tsx","../src/assets/icons/discover.tsx","../src/assets/icons/cup.tsx","../src/utils/custom-hooks/use-media-query.ts","../src/utils/renderBrandIcons.tsx","../src/assets/icons/loader.tsx","../src/assets/icons/checkmark.tsx","../src/features/card/card-component.tsx","../src/features/google-pay/google-pay-component.css","../src/assets/icons/googlepay.tsx","../src/models/constants.ts","../src/features/google-pay/google-pay-component.tsx","../src/features/apple-pay/apple-pay-component.css","../src/assets/icons/applepay.tsx","../src/features/apple-pay/apple-pay-component.tsx","../src/features/stored-card/stored-card-component.css","../src/assets/icons/warning.tsx","../src/features/stored-card/stored-card-component.tsx","../src/features/stored-card/stored-card-container-component.tsx","../src/components/payment-method-group/payment-method-group.css","../src/components/payment-method-group/payment-method-group.tsx","../src/features/result-component/result-component.css","../src/assets/icons/success.tsx","../src/assets/icons/failure.tsx","../src/features/result-component/result-component.tsx","../src/features/payment-methods-wrapper/payment-methods-wrapper.tsx","../src/features/straumur-checkout-container.tsx","../src/straumur-checkout.tsx"],"sourcesContent":["export { default as StraumurCheckout } from \"./straumur-checkout\";\r\n","/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { EMPTY_ARR } from './constants';\n\nexport const isArray = Array.isArray;\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-expect-error We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {import('./index').ContainerNode} node The node to remove\n */\nexport function removeNode(node) {\n\tif (node && node.parentNode) node.parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","import { slice } from './util';\nimport options from './options';\nimport { NULL, UNDEFINED } from './constants';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor for this\n * virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array<import('.').ComponentChildren>} [children] The children of the\n * virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != NULL) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] == UNDEFINED) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, NULL);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\t/** @type {import('./internal').VNode} */\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: NULL,\n\t\t_parent: NULL,\n\t\t_depth: 0,\n\t\t_dom: NULL,\n\t\t_component: NULL,\n\t\tconstructor: UNDEFINED,\n\t\t_original: original == NULL ? ++vnodeId : original,\n\t\t_index: -1,\n\t\t_flags: 0\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == NULL && options.vnode != NULL) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: NULL };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != NULL && vnode.constructor == UNDEFINED;\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { MODE_HYDRATE, NULL } from './constants';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function BaseComponent(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nBaseComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != NULL && this._nextState != this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == NULL) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nBaseComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](https://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {ComponentChildren | void}\n */\nBaseComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == NULL) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._index + 1)\n\t\t\t: NULL;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != NULL && sibling._dom != NULL) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : NULL;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet oldVNode = component._vnode,\n\t\toldDom = oldVNode._dom,\n\t\tcommitQueue = [],\n\t\trefQueue = [];\n\n\tif (component._parentDom) {\n\t\tconst newVNode = assign({}, oldVNode);\n\t\tnewVNode._original = oldVNode._original + 1;\n\t\tif (options.vnode) options.vnode(newVNode);\n\n\t\tdiff(\n\t\t\tcomponent._parentDom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tcomponent._parentDom.namespaceURI,\n\t\t\toldVNode._flags & MODE_HYDRATE ? [oldDom] : NULL,\n\t\t\tcommitQueue,\n\t\t\toldDom == NULL ? getDomSibling(oldVNode) : oldDom,\n\t\t\t!!(oldVNode._flags & MODE_HYDRATE),\n\t\t\trefQueue\n\t\t);\n\n\t\tnewVNode._original = oldVNode._original;\n\t\tnewVNode._parent._children[newVNode._index] = newVNode;\n\t\tcommitRoot(commitQueue, newVNode, refQueue);\n\n\t\tif (newVNode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(newVNode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != NULL && vnode._component != NULL) {\n\t\tvnode._dom = vnode._component.base = NULL;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != NULL && child._dom != NULL) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array<import('./internal').Component>}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce != options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet c,\n\t\tl = 1;\n\n\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t// process() calls from getting scheduled while `queue` is still being consumed.\n\twhile (rerenderQueue.length) {\n\t\t// Keep the rerender queue sorted by (depth, insertion order). The queue\n\t\t// will initially be sorted on the first iteration only if it has more than 1 item.\n\t\t//\n\t\t// New items can be added to the queue e.g. when rerendering a provider, so we want to\n\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t// single pass\n\t\tif (rerenderQueue.length > l) {\n\t\t\trerenderQueue.sort(depthSort);\n\t\t}\n\n\t\tc = rerenderQueue.shift();\n\t\tl = rerenderQueue.length;\n\n\t\tif (c._dirty) {\n\t\t\trenderComponent(c);\n\t\t}\n\t}\n\tprocess._rerenderCount = 0;\n}\n\nprocess._rerenderCount = 0;\n","import { IS_NON_DIMENSIONAL, NULL, SVG_NAMESPACE } from '../constants';\nimport options from '../options';\n\nfunction setStyle(style, key, value) {\n\tif (key[0] == '-') {\n\t\tstyle.setProperty(key, value == NULL ? '' : value);\n\t} else if (value == NULL) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\nconst CAPTURE_REGEX = /(PointerCapture)$|Capture$/i;\n\n// A logical clock to solve issues like https://github.com/preactjs/preact/issues/3927.\n// When the DOM performs an event it leaves micro-ticks in between bubbling up which means that\n// an event can trigger on a newly reated DOM-node while the event bubbles up.\n//\n// Originally inspired by Vue\n// (https://github.com/vuejs/core/blob/caeb8a68811a1b0f79/packages/runtime-dom/src/modules/events.ts#L90-L101),\n// but modified to use a logical clock instead of Date.now() in case event handlers get attached\n// and events get dispatched during the same millisecond.\n//\n// The clock is incremented after each new event dispatch. This allows 1 000 000 new events\n// per second for over 280 years before the value reaches Number.MAX_SAFE_INTEGER (2**53 - 1).\nlet eventClock = 0;\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {string} namespace Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, namespace) {\n\tlet useCapture;\n\n\to: if (name == 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] != oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] == 'o' && name[1] == 'n') {\n\t\tuseCapture = name != (name = name.replace(CAPTURE_REGEX, '$1'));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (\n\t\t\tname.toLowerCase() in dom ||\n\t\t\tname == 'onFocusOut' ||\n\t\t\tname == 'onFocusIn'\n\t\t)\n\t\t\tname = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tvalue._attached = eventClock;\n\t\t\t\tdom.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\t\tuseCapture\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tvalue._attached = oldValue._attached;\n\t\t\t}\n\t\t} else {\n\t\t\tdom.removeEventListener(\n\t\t\t\tname,\n\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\tuseCapture\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (namespace == SVG_NAMESPACE) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname != 'width' &&\n\t\t\tname != 'height' &&\n\t\t\tname != 'href' &&\n\t\t\tname != 'list' &&\n\t\t\tname != 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname != 'tabIndex' &&\n\t\t\tname != 'download' &&\n\t\t\tname != 'rowSpan' &&\n\t\t\tname != 'colSpan' &&\n\t\t\tname != 'role' &&\n\t\t\tname != 'popover' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == NULL ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value == 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != NULL && (value !== false || name[4] == '-')) {\n\t\t\tdom.setAttribute(name, name == 'popover' && value == true ? '' : value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Create an event proxy function.\n * @param {boolean} useCapture Is the event handler for the capture phase.\n * @private\n */\nfunction createEventProxy(useCapture) {\n\t/**\n\t * Proxy an event to hooked event handlers\n\t * @param {import('../internal').PreactEvent} e The event object from the browser\n\t * @private\n\t */\n\treturn function (e) {\n\t\tif (this._listeners) {\n\t\t\tconst eventHandler = this._listeners[e.type + useCapture];\n\t\t\tif (e._dispatched == NULL) {\n\t\t\t\te._dispatched = eventClock++;\n\n\t\t\t\t// When `e._dispatched` is smaller than the time when the targeted event\n\t\t\t\t// handler was attached we know we have bubbled up to an element that was added\n\t\t\t\t// during patching the DOM.\n\t\t\t} else if (e._dispatched < eventHandler._attached) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn eventHandler(options.event ? options.event(e) : e);\n\t\t}\n\t};\n}\n\nconst eventProxy = createEventProxy(false);\nconst eventProxyCapture = createEventProxy(true);\n","import { enqueueRender } from './component';\nimport { NULL } from './constants';\n\nexport let i = 0;\n\nexport function createContext(defaultValue) {\n\tfunction Context(props) {\n\t\tif (!this.getChildContext) {\n\t\t\t/** @type {Set<import('./internal').Component> | null} */\n\t\t\tlet subs = new Set();\n\t\t\tlet ctx = {};\n\t\t\tctx[Context._id] = this;\n\n\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\tthis.componentWillUnmount = () => {\n\t\t\t\tsubs = NULL;\n\t\t\t};\n\n\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t// @ts-expect-error even\n\t\t\t\tif (this.props.value != _props.value) {\n\t\t\t\t\tsubs.forEach(c => {\n\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.sub = c => {\n\t\t\t\tsubs.add(c);\n\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\tif (subs) {\n\t\t\t\t\t\tsubs.delete(c);\n\t\t\t\t\t}\n\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\treturn props.children;\n\t}\n\n\tContext._id = '__cC' + i++;\n\tContext._defaultValue = defaultValue;\n\n\t/** @type {import('./internal').FunctionComponent} */\n\tContext.Consumer = (props, contextValue) => {\n\t\treturn props.children(contextValue);\n\t};\n\n\t// we could also get rid of _contextRef entirely\n\tContext.Provider =\n\t\tContext._contextRef =\n\t\tContext.Consumer.contextType =\n\t\t\tContext;\n\n\treturn Context;\n}\n","import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport {\n\tEMPTY_OBJ,\n\tEMPTY_ARR,\n\tINSERT_VNODE,\n\tMATCHED,\n\tUNDEFINED,\n\tNULL\n} from '../constants';\nimport { isArray } from '../util';\nimport { getDomSibling } from '../component';\n\n/**\n * @typedef {import('../internal').ComponentChildren} ComponentChildren\n * @typedef {import('../internal').Component} Component\n * @typedef {import('../internal').PreactElement} PreactElement\n * @typedef {import('../internal').VNode} VNode\n */\n\n/**\n * Diff the children of a virtual node\n * @param {PreactElement} parentDom The DOM element whose children are being\n * diffed\n * @param {ComponentChildren[]} renderResult\n * @param {VNode} newParentVNode The new virtual node whose children should be\n * diff'ed against oldParentVNode\n * @param {VNode} oldParentVNode The old virtual node whose children should be\n * diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by\n * getChildContext\n * @param {string} namespace Current namespace of the DOM node (HTML, SVG, or MathML)\n * @param {Array<PreactElement>} excessDomChildren\n * @param {Array<Component>} commitQueue List of components which have callbacks\n * to invoke in commitRoot\n * @param {PreactElement} oldDom The current attached DOM element any new dom\n * elements should be placed around. Likely `null` on first render (except when\n * hydrating). Can be a sibling DOM element when diffing Fragments that have\n * siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {any[]} refQueue an array of elements needed to invoke refs\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tnamespace,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet i,\n\t\t/** @type {VNode} */\n\t\toldVNode,\n\t\t/** @type {VNode} */\n\t\tchildVNode,\n\t\t/** @type {PreactElement} */\n\t\tnewDom,\n\t\t/** @type {PreactElement} */\n\t\tfirstChildDom;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\t/** @type {VNode[]} */\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet newChildrenLength = renderResult.length;\n\n\toldDom = constructNewChildrenArray(\n\t\tnewParentVNode,\n\t\trenderResult,\n\t\toldChildren,\n\t\toldDom,\n\t\tnewChildrenLength\n\t);\n\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\tchildVNode = newParentVNode._children[i];\n\t\tif (childVNode == NULL) continue;\n\n\t\t// At this point, constructNewChildrenArray has assigned _index to be the\n\t\t// matchingIndex for this VNode's oldVNode (or -1 if there is no oldVNode).\n\t\tif (childVNode._index == -1) {\n\t\t\toldVNode = EMPTY_OBJ;\n\t\t} else {\n\t\t\toldVNode = oldChildren[childVNode._index] || EMPTY_OBJ;\n\t\t}\n\n\t\t// Update childVNode._index to its final index\n\t\tchildVNode._index = i;\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tlet result = diff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tnamespace,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\t// Adjust DOM nodes\n\t\tnewDom = childVNode._dom;\n\t\tif (childVNode.ref && oldVNode.ref != childVNode.ref) {\n\t\t\tif (oldVNode.ref) {\n\t\t\t\tapplyRef(oldVNode.ref, NULL, childVNode);\n\t\t\t}\n\t\t\trefQueue.push(\n\t\t\t\tchildVNode.ref,\n\t\t\t\tchildVNode._component || newDom,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t}\n\n\t\tif (firstChildDom == NULL && newDom != NULL) {\n\t\t\tfirstChildDom = newDom;\n\t\t}\n\n\t\tif (\n\t\t\tchildVNode._flags & INSERT_VNODE ||\n\t\t\toldVNode._children === childVNode._children\n\t\t) {\n\t\t\toldDom = insert(childVNode, oldDom, parentDom);\n\t\t} else if (typeof childVNode.type == 'function' && result !== UNDEFINED) {\n\t\t\toldDom = result;\n\t\t} else if (newDom) {\n\t\t\toldDom = newDom.nextSibling;\n\t\t}\n\n\t\t// Unset diffing flags\n\t\tchildVNode._flags &= ~(INSERT_VNODE | MATCHED);\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\treturn oldDom;\n}\n\n/**\n * @param {VNode} newParentVNode\n * @param {ComponentChildren[]} renderResult\n * @param {VNode[]} oldChildren\n */\nfunction constructNewChildrenArray(\n\tnewParentVNode,\n\trenderResult,\n\toldChildren,\n\toldDom,\n\tnewChildrenLength\n) {\n\t/** @type {number} */\n\tlet i;\n\t/** @type {VNode} */\n\tlet childVNode;\n\t/** @type {VNode} */\n\tlet oldVNode;\n\n\tlet oldChildrenLength = oldChildren.length,\n\t\tremainingOldChildren = oldChildrenLength;\n\n\tlet skew = 0;\n\n\tnewParentVNode._children = new Array(newChildrenLength);\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\t// @ts-expect-error We are reusing the childVNode variable to hold both the\n\t\t// pre and post normalized childVNode\n\t\tchildVNode = renderResult[i];\n\n\t\tif (\n\t\t\tchildVNode == NULL ||\n\t\t\ttypeof childVNode == 'boolean' ||\n\t\t\ttypeof childVNode == 'function'\n\t\t) {\n\t\t\tnewParentVNode._children[i] = NULL;\n\t\t\tcontinue;\n\t\t}\n\t\t// If this newVNode is being reused (e.g. <div>{reuse}{reuse}</div>) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint' ||\n\t\t\tchildVNode.constructor == String\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tNULL,\n\t\t\t\tchildVNode,\n\t\t\t\tNULL,\n\t\t\t\tNULL,\n\t\t\t\tNULL\n\t\t\t);\n\t\t} else if (isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tNULL,\n\t\t\t\tNULL,\n\t\t\t\tNULL\n\t\t\t);\n\t\t} else if (childVNode.constructor == UNDEFINED && childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t// const reuse = <div />\n\t\t\t// <div>{reuse}<span />{reuse}</div>\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : NULL,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\tconst skewedIndex = i + skew;\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\t// Temporarily store the matchingIndex on the _index property so we can pull\n\t\t// out the oldVNode in diffChildren. We'll override this to the VNode's\n\t\t// final index after using this property to get the oldVNode\n\t\tconst matchingIndex = (childVNode._index = findMatchingIndex(\n\t\t\tchildVNode,\n\t\t\toldChildren,\n\t\t\tskewedIndex,\n\t\t\tremainingOldChildren\n\t\t));\n\n\t\toldVNode = NULL;\n\t\tif (matchingIndex != -1) {\n\t\t\toldVNode = oldChildren[matchingIndex];\n\t\t\tremainingOldChildren--;\n\t\t\tif (oldVNode) {\n\t\t\t\toldVNode._flags |= MATCHED;\n\t\t\t}\n\t\t}\n\n\t\t// Here, we define isMounting for the purposes of the skew diffing\n\t\t// algorithm. Nodes that are unsuspending are considered mounting and we detect\n\t\t// this by checking if oldVNode._original == null\n\t\tconst isMounting = oldVNode == NULL || oldVNode._original == NULL;\n\n\t\tif (isMounting) {\n\t\t\tif (matchingIndex == -1) {\n\t\t\t\t// When the array of children is growing we need to decrease the skew\n\t\t\t\t// as we are adding a new element to the array.\n\t\t\t\t// Example:\n\t\t\t\t// [1, 2, 3] --> [0, 1, 2, 3]\n\t\t\t\t// oldChildren newChildren\n\t\t\t\t//\n\t\t\t\t// The new element is at index 0, so our skew is 0,\n\t\t\t\t// we need to decrease the skew as we are adding a new element.\n\t\t\t\t// The decrease will cause us to compare the element at position 1\n\t\t\t\t// with value 1 with the element at position 0 with value 0.\n\t\t\t\t//\n\t\t\t\t// A linear concept is applied when the array is shrinking,\n\t\t\t\t// if the length is unchanged we can assume that no skew\n\t\t\t\t// changes are needed.\n\t\t\t\tif (newChildrenLength > oldChildrenLength) {\n\t\t\t\t\tskew--;\n\t\t\t\t} else if (newChildrenLength < oldChildrenLength) {\n\t\t\t\t\tskew++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we are mounting a DOM VNode, mark it for insertion\n\t\t\tif (typeof childVNode.type != 'function') {\n\t\t\t\tchildVNode._flags |= INSERT_VNODE;\n\t\t\t}\n\t\t} else if (matchingIndex != skewedIndex) {\n\t\t\t// When we move elements around i.e. [0, 1, 2] --> [1, 0, 2]\n\t\t\t// --> we diff 1, we find it at position 1 while our skewed index is 0 and our skew is 0\n\t\t\t// we set the skew to 1 as we found an offset.\n\t\t\t// --> we diff 0, we find it at position 0 while our skewed index is at 2 and our skew is 1\n\t\t\t// this makes us increase the skew again.\n\t\t\t// --> we diff 2, we find it at position 2 while our skewed index is at 4 and our skew is 2\n\t\t\t//\n\t\t\t// this becomes an optimization question where currently we see a 1 element offset as an insertion\n\t\t\t// or deletion i.e. we optimize for [0, 1, 2] --> [9, 0, 1, 2]\n\t\t\t// while a more than 1 offset we see as a swap.\n\t\t\t// We could probably build heuristics for having an optimized course of action here as well, but\n\t\t\t// might go at the cost of some bytes.\n\t\t\t//\n\t\t\t// If we wanted to optimize for i.e. only swaps we'd just do the last two code-branches and have\n\t\t\t// only the first item be a re-scouting and all the others fall in their skewed counter-part.\n\t\t\t// We could also further optimize for swaps\n\t\t\tif (matchingIndex == skewedIndex - 1) {\n\t\t\t\tskew--;\n\t\t\t} else if (matchingIndex == skewedIndex + 1) {\n\t\t\t\tskew++;\n\t\t\t} else {\n\t\t\t\tif (matchingIndex > skewedIndex) {\n\t\t\t\t\tskew--;\n\t\t\t\t} else {\n\t\t\t\t\tskew++;\n\t\t\t\t}\n\n\t\t\t\t// Move this VNode's DOM if the original index (matchingIndex) doesn't\n\t\t\t\t// match the new skew index (i + new skew)\n\t\t\t\t// In the former two branches we know that it matches after skewing\n\t\t\t\tchildVNode._flags |= INSERT_VNODE;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove remaining oldChildren if there are any. Loop forwards so that as we\n\t// unmount DOM from the beginning of the oldChildren, we can adjust oldDom to\n\t// point to the next child, which needs to be the first DOM node that won't be\n\t// unmounted.\n\tif (remainingOldChildren) {\n\t\tfor (i = 0; i < oldChildrenLength; i++) {\n\t\t\toldVNode = oldChildren[i];\n\t\t\tif (oldVNode != NULL && (oldVNode._flags & MATCHED) == 0) {\n\t\t\t\tif (oldVNode._dom == oldDom) {\n\t\t\t\t\toldDom = getDomSibling(oldVNode);\n\t\t\t\t}\n\n\t\t\t\tunmount(oldVNode, oldVNode);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * @param {VNode} parentVNode\n * @param {PreactElement} oldDom\n * @param {PreactElement} parentDom\n * @returns {PreactElement}\n */\nfunction insert(parentVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\n\tif (typeof parentVNode.type == 'function') {\n\t\tlet children = parentVNode._children;\n\t\tfor (let i = 0; children && i < children.length; i++) {\n\t\t\tif (children[i]) {\n\t\t\t\t// If we enter this code path on sCU bailout, where we copy\n\t\t\t\t// oldVNode._children to newVNode._children, we need to update the old\n\t\t\t\t// children's _parent pointer to point to the newVNode (parentVNode\n\t\t\t\t// here).\n\t\t\t\tchildren[i]._parent = parentVNode;\n\t\t\t\toldDom = insert(children[i], oldDom, parentDom);\n\t\t\t}\n\t\t}\n\n\t\treturn oldDom;\n\t} else if (parentVNode._dom != oldDom) {\n\t\tif (oldDom && parentVNode.type && !parentDom.contains(oldDom)) {\n\t\t\toldDom = getDomSibling(parentVNode);\n\t\t}\n\t\tparentDom.insertBefore(parentVNode._dom, oldDom || NULL);\n\t\toldDom = parentVNode._dom;\n\t}\n\n\tdo {\n\t\toldDom = oldDom && oldDom.nextSibling;\n\t} while (oldDom != NULL && oldDom.nodeType == 8);\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {ComponentChildren} children The unflattened children of a virtual\n * node\n * @returns {VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == NULL || typeof children == 'boolean') {\n\t} else if (isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\n/**\n * @param {VNode} childVNode\n * @param {VNode[]} oldChildren\n * @param {number} skewedIndex\n * @param {number} remainingOldChildren\n * @returns {number}\n */\nfunction findMatchingIndex(\n\tchildVNode,\n\toldChildren,\n\tskewedIndex,\n\tremainingOldChildren\n) {\n\tconst key = childVNode.key;\n\tconst type = childVNode.type;\n\tlet oldVNode = oldChildren[skewedIndex];\n\n\t// We only need to perform a search if there are more children\n\t// (remainingOldChildren) to search. However, if the oldVNode we just looked\n\t// at skewedIndex was not already used in this diff, then there must be at\n\t// least 1 other (so greater than 1) remainingOldChildren to attempt to match\n\t// against. So the following condition checks that ensuring\n\t// remainingOldChildren > 1 if the oldVNode is not already used/matched. Else\n\t// if the oldVNode was null or matched, then there could needs to be at least\n\t// 1 (aka `remainingOldChildren > 0`) children to find and compare against.\n\t//\n\t// If there is an unkeyed functional VNode, that isn't a built-in like our Fragment,\n\t// we should not search as we risk re-using state of an unrelated VNode. (reverted for now)\n\tlet shouldSearch =\n\t\t// (typeof type != 'function' || type === Fragment || key) &&\n\t\tremainingOldChildren >\n\t\t(oldVNode != NULL && (oldVNode._flags & MATCHED) == 0 ? 1 : 0);\n\n\tif (\n\t\t(oldVNode === NULL && childVNode.key == null) ||\n\t\t(oldVNode &&\n\t\t\tkey == oldVNode.key &&\n\t\t\ttype == oldVNode.type &&\n\t\t\t(oldVNode._flags & MATCHED) == 0)\n\t) {\n\t\treturn skewedIndex;\n\t} else if (shouldSearch) {\n\t\tlet x = skewedIndex - 1;\n\t\tlet y = skewedIndex + 1;\n\t\twhile (x >= 0 || y < oldChildren.length) {\n\t\t\tif (x >= 0) {\n\t\t\t\toldVNode = oldChildren[x];\n\t\t\t\tif (\n\t\t\t\t\toldVNode &&\n\t\t\t\t\t(oldVNode._flags & MATCHED) == 0 &&\n\t\t\t\t\tkey == oldVNode.key &&\n\t\t\t\t\ttype == oldVNode.type\n\t\t\t\t) {\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t\tx--;\n\t\t\t}\n\n\t\t\tif (y < oldChildren.length) {\n\t\t\t\toldVNode = oldChildren[y];\n\t\t\t\tif (\n\t\t\t\t\toldVNode &&\n\t\t\t\t\t(oldVNode._flags & MATCHED) == 0 &&\n\t\t\t\t\tkey == oldVNode.key &&\n\t\t\t\t\ttype == oldVNode.type\n\t\t\t\t) {\n\t\t\t\t\treturn y;\n\t\t\t\t}\n\t\t\t\ty++;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn -1;\n}\n","import {\n\tEMPTY_OBJ,\n\tMATH_NAMESPACE,\n\tMODE_HYDRATE,\n\tMODE_SUSPENDED,\n\tNULL,\n\tRESET_MODE,\n\tSVG_NAMESPACE,\n\tUNDEFINED,\n\tXHTML_NAMESPACE\n} from '../constants';\nimport { BaseComponent, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { setProperty } from './props';\nimport { assign, isArray, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * @typedef {import('../internal').ComponentChildren} ComponentChildren\n * @typedef {import('../internal').Component} Component\n * @typedef {import('../internal').PreactElement} PreactElement\n * @typedef {import('../internal').VNode} VNode\n */\n\n/**\n * @template {any} T\n * @typedef {import('../internal').Ref<T>} Ref<T>\n */\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {PreactElement} parentDom The parent of the DOM element\n * @param {VNode} newVNode The new virtual node\n * @param {VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by\n * getChildContext\n * @param {string} namespace Current namespace of the DOM node (HTML, SVG, or MathML)\n * @param {Array<PreactElement>} excessDomChildren\n * @param {Array<Component>} commitQueue List of components which have callbacks\n * to invoke in commitRoot\n * @param {PreactElement} oldDom The current attached DOM element any new dom\n * elements should be placed around. Likely `null` on first render (except when\n * hydrating). Can be a sibling DOM element when diffing Fragments that have\n * siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {any[]} refQueue an array of elements needed to invoke refs\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tnamespace,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\t/** @type {any} */\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor != UNDEFINED) return NULL;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._flags & MODE_SUSPENDED) {\n\t\tisHydrating = !!(oldVNode._flags & MODE_HYDRATE);\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\touter: if (typeof newType == 'function') {\n\t\ttry {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\t\t\tconst isClassComponent =\n\t\t\t\t'prototype' in newType && newType.prototype.render;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif (isClassComponent) {\n\t\t\t\t\t// @ts-expect-error The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-expect-error Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new BaseComponent(\n\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (isClassComponent && c._nextState == NULL) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (isClassComponent && newType.getDerivedStateFromProps != NULL) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tisClassComponent &&\n\t\t\t\t\tnewType.getDerivedStateFromProps == NULL &&\n\t\t\t\t\tc.componentWillMount != NULL\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (isClassComponent && c.componentDidMount != NULL) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tisClassComponent &&\n\t\t\t\t\tnewType.getDerivedStateFromProps == NULL &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != NULL\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(!c._force &&\n\t\t\t\t\t\tc.shouldComponentUpdate != NULL &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\tnewVNode._original == oldVNode._original\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original != oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.some(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t\t}\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != NULL) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (isClassComponent && c.componentDidUpdate != NULL) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\t\t\tc._force = false;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif (isClassComponent) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t}\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != NULL) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (isClassComponent && !isNew && c.getSnapshotBeforeUpdate != NULL) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != NULL && tmp.type === Fragment && tmp.key == NULL;\n\t\t\tlet renderResult = tmp;\n\n\t\t\tif (isTopLevelFragment) {\n\t\t\t\trenderResult = cloneNode(tmp.props.children);\n\t\t\t}\n\n\t\t\toldDom = diffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tisArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tnamespace,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._flags &= RESET_MODE;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = NULL;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tnewVNode._original = NULL;\n\t\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\t\tif (isHydrating || excessDomChildren != NULL) {\n\t\t\t\tif (e.then) {\n\t\t\t\t\tnewVNode._flags |= isHydrating\n\t\t\t\t\t\t? MODE_HYDRATE | MODE_SUSPENDED\n\t\t\t\t\t\t: MODE_SUSPENDED;\n\n\t\t\t\t\twhile (oldDom && oldDom.nodeType == 8 && oldDom.nextSibling) {\n\t\t\t\t\t\toldDom = oldDom.nextSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = NULL;\n\t\t\t\t\tnewVNode._dom = oldDom;\n\t\t\t\t} else {\n\t\t\t\t\tfor (let i = excessDomChildren.length; i--; ) {\n\t\t\t\t\t\tremoveNode(excessDomChildren[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t}\n\t\t\toptions._catchError(e, newVNode, oldVNode);\n\t\t}\n\t} else if (\n\t\texcessDomChildren == NULL &&\n\t\tnewVNode._original == oldVNode._original\n\t) {\n\t\tnewVNode._children = oldVNode._children;\n\t\tnewVNode._dom = oldVNode._dom;\n\t} else {\n\t\toldDom = newVNode._dom = diffElementNodes(\n\t\t\toldVNode._dom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tnamespace,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\t}\n\n\tif ((tmp = options.diffed)) tmp(newVNode);\n\n\treturn newVNode._flags & MODE_SUSPENDED ? undefined : oldDom;\n}\n\n/**\n * @param {Array<Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {VNode} root\n */\nexport function commitRoot(commitQueue, root, refQueue) {\n\tfor (let i = 0; i < refQueue.length; i++) {\n\t\tapplyRef(refQueue[i], refQueue[++i], refQueue[++i]);\n\t}\n\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-expect-error Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-expect-error See above comment on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\nfunction cloneNode(node) {\n\tif (\n\t\ttypeof node != 'object' ||\n\t\tnode == NULL ||\n\t\t(node._depth && node._depth > 0)\n\t) {\n\t\treturn node;\n\t}\n\n\tif (isArray(node)) {\n\t\treturn node.map(cloneNode);\n\t}\n\n\treturn assign({}, node);\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {PreactElement} dom The DOM element representing the virtual nodes\n * being diffed\n * @param {VNode} newVNode The new virtual node\n * @param {VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {string} namespace Current namespace of the DOM node (HTML, SVG, or MathML)\n * @param {Array<PreactElement>} excessDomChildren\n * @param {Array<Component>} commitQueue List of components which have callbacks\n * to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {any[]} refQueue an array of elements needed to invoke refs\n * @returns {PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tnamespace,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating,\n\trefQueue\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = /** @type {string} */ (newVNode.type);\n\t/** @type {any} */\n\tlet i;\n\t/** @type {{ __html?: string }} */\n\tlet newHtml;\n\t/** @type {{ __html?: string }} */\n\tlet oldHtml;\n\t/** @type {ComponentChildren} */\n\tlet newChildren;\n\tlet value;\n\tlet inputValue;\n\tlet checked;\n\n\t// Tracks entering and exiting namespaces when descending through the tree.\n\tif (nodeType == 'svg') namespace = SVG_NAMESPACE;\n\telse if (nodeType == 'math') namespace = MATH_NAMESPACE;\n\telse if (!namespace) namespace = XHTML_NAMESPACE;\n\n\tif (excessDomChildren != NULL) {\n\t\tfor (i = 0; i < excessDomChildren.length; i++) {\n\t\t\tvalue = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tvalue &&\n\t\t\t\t'setAttribute' in value == !!nodeType &&\n\t\t\t\t(nodeType ? value.localName == nodeType : value.nodeType == 3)\n\t\t\t) {\n\t\t\t\tdom = value;\n\t\t\t\texcessDomChildren[i] = NULL;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == NULL) {\n\t\tif (nodeType == NULL) {\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tdom = document.createElementNS(\n\t\t\tnamespace,\n\t\t\tnodeType,\n\t\t\tnewProps.is && newProps\n\t\t);\n\n\t\t// we are creating a new node, so we can assume this is a new subtree (in\n\t\t// case we are hydrating), this deopts the hydrate\n\t\tif (isHydrating) {\n\t\t\tif (options._hydrationMismatch)\n\t\t\t\toptions._hydrationMismatch(newVNode, excessDomChildren);\n\t\t\tisHydrating = false;\n\t\t}\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = NULL;\n\t}\n\n\tif (nodeType == NULL) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data != newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\t// If we are in a situation where we are not hydrating but are using\n\t\t// existing DOM (e.g. replaceNode) we should read the existing DOM\n\t\t// attributes to diff them\n\t\tif (!isHydrating && excessDomChildren != NULL) {\n\t\t\toldProps = {};\n\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\tvalue = dom.attributes[i];\n\t\t\t\toldProps[value.name] = value.value;\n\t\t\t}\n\t\t}\n\n\t\tfor (i in oldProps) {\n\t\t\tvalue = oldProps[i];\n\t\t\tif (i == 'children') {\n\t\t\t} else if (i == 'dangerouslySetInnerHTML') {\n\t\t\t\toldHtml = value;\n\t\t\t} else if (!(i in newProps)) {\n\t\t\t\tif (\n\t\t\t\t\t(i == 'value' && 'defaultValue' in newProps) ||\n\t\t\t\t\t(i == 'checked' && 'defaultChecked' in newProps)\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tsetProperty(dom, i, NULL, value, namespace);\n\t\t\t}\n\t\t}\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tfor (i in newProps) {\n\t\t\tvalue = newProps[i];\n\t\t\tif (i == 'children') {\n\t\t\t\tnewChildren = value;\n\t\t\t} else if (i == 'dangerouslySetInnerHTML') {\n\t\t\t\tnewHtml = value;\n\t\t\t} else if (i == 'value') {\n\t\t\t\tinputValue = value;\n\t\t\t} else if (i == 'checked') {\n\t\t\t\tchecked = value;\n\t\t\t} else if (\n\t\t\t\t(!isHydrating || typeof value == 'function') &&\n\t\t\t\toldProps[i] !== value\n\t\t\t) {\n\t\t\t\tsetProperty(dom, i, value, oldProps[i], namespace);\n\t\t\t}\n\t\t}\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\tif (\n\t\t\t\t!isHydrating &&\n\t\t\t\t(!oldHtml ||\n\t\t\t\t\t(newHtml.__html != oldHtml.__html && newHtml.__html != dom.innerHTML))\n\t\t\t) {\n\t\t\t\tdom.innerHTML = newHtml.__html;\n\t\t\t}\n\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\tif (oldHtml) dom.innerHTML = '';\n\n\t\t\tdiffChildren(\n\t\t\t\t// @ts-expect-error\n\t\t\t\tnewVNode.type == 'template' ? dom.content : dom,\n\t\t\t\tisArray(newChildren) ? newChildren : [newChildren],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tnodeType == 'foreignObject' ? XHTML_NAMESPACE : namespace,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != NULL) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tremoveNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// As above, don't diff props during hydration\n\t\tif (!isHydrating) {\n\t\t\ti = 'value';\n\t\t\tif (nodeType == 'progress' && inputValue == NULL) {\n\t\t\t\tdom.removeAttribute('value');\n\t\t\t} else if (\n\t\t\t\tinputValue != UNDEFINED &&\n\t\t\t\t// #2756 For the <progress>-element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(inputValue !== dom[i] ||\n\t\t\t\t\t(nodeType == 'progress' && !inputValue) ||\n\t\t\t\t\t// This is only for IE 11 to fix <select> value not being updated.\n\t\t\t\t\t// To avoid a stale select value we need to set the option.value\n\t\t\t\t\t// again, which triggers IE11 to re-evaluate the select value\n\t\t\t\t\t(nodeType == 'option' && inputValue != oldProps[i]))\n\t\t\t) {\n\t\t\t\tsetProperty(dom, i, inputValue, oldProps[i], namespace);\n\t\t\t}\n\n\t\t\ti = 'checked';\n\t\t\tif (checked != UNDEFINED && checked != dom[i]) {\n\t\t\t\tsetProperty(dom, i, checked, oldProps[i], namespace);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/**\n * Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {Ref<any> & { _unmount?: unknown }} ref\n * @param {any} value\n * @param {VNode} vnode\n */\nexport function applyRef(ref, value, vnode) {\n\ttry {\n\t\tif (typeof ref == 'function') {\n\t\t\tlet hasRefUnmount = typeof ref._unmount == 'function';\n\t\t\tif (hasRefUnmount) {\n\t\t\t\t// @ts-ignore TS doesn't like moving narrowing checks into variables\n\t\t\t\tref._unmount();\n\t\t\t}\n\n\t\t\tif (!hasRefUnmount || value != NULL) {\n\t\t\t\t// Store the cleanup function on the function\n\t\t\t\t// instance object itself to avoid shape\n\t\t\t\t// transitioning vnode\n\t\t\t\tref._unmount = ref(value);\n\t\t\t}\n\t\t} else ref.current = value;\n\t} catch (e) {\n\t\toptions._catchError(e, vnode);\n\t}\n}\n\n/**\n * Unmount a virtual node from the tree and apply DOM changes\n * @param {VNode} vnode The virtual node to unmount\n * @param {VNode} parentVNode The parent of the VNode that initiated the unmount\n * @param {boolean} [skipRemove] Flag that indicates that a parent node of the\n * current element is already detached from the DOM.\n */\nexport function unmount(vnode, parentVNode, skipRemove) {\n\tlet r;\n\tif (options.unmount) options.unmount(vnode);\n\n\tif ((r = vnode.ref)) {\n\t\tif (!r.current || r.current == vnode._dom) {\n\t\t\tapplyRef(r, NULL, parentVNode);\n\t\t}\n\t}\n\n\tif ((r = vnode._component) != NULL) {\n\t\tif (r.componentWillUnmount) {\n\t\t\ttry {\n\t\t\t\tr.componentWillUnmount();\n\t\t\t} catch (e) {\n\t\t\t\toptions._catchError(e, parentVNode);\n\t\t\t}\n\t\t}\n\n\t\tr.base = r._parentDom = NULL;\n\t}\n\n\tif ((r = vnode._children)) {\n\t\tfor (let i = 0; i < r.length; i++) {\n\t\t\tif (r[i]) {\n\t\t\t\tunmount(\n\t\t\t\t\tr[i],\n\t\t\t\t\tparentVNode,\n\t\t\t\t\tskipRemove || typeof vnode.type != 'function'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!skipRemove) {\n\t\tremoveNode(vnode._dom);\n\t}\n\n\tvnode._component = vnode._parent = vnode._dom = UNDEFINED;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n","import { EMPTY_OBJ, NULL } from './constants';\nimport { commitRoot, diff } from './diff/index';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\nimport { slice } from './util';\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to render into\n * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an\n * existing DOM tree rooted at `replaceNode`\n */\nexport function render(vnode, parentDom, replaceNode) {\n\t// https://github.com/preactjs/preact/issues/3794\n\tif (parentDom == document) {\n\t\tparentDom = document.documentElement;\n\t}\n\n\tif (options._root) options._root(vnode, parentDom);\n\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in\n\t// hydration mode or not by passing the `hydrate` function instead of a DOM\n\t// element..\n\tlet isHydrating = typeof replaceNode == 'function';\n\n\t// To be able to support calling `render()` multiple times on the same\n\t// DOM node, we need to obtain a reference to the previous tree. We do\n\t// this by assigning a new `_children` property to DOM nodes which points\n\t// to the last rendered tree. By default this property is not present, which\n\t// means that we are mounting a new tree for the first time.\n\tlet oldVNode = isHydrating\n\t\t? NULL\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\n\n\tvnode = ((!isHydrating && replaceNode) || parentDom)._children =\n\t\tcreateElement(Fragment, NULL, [vnode]);\n\n\t// List of effects that need to be called after diffing.\n\tlet commitQueue = [],\n\t\trefQueue = [];\n\tdiff(\n\t\tparentDom,\n\t\t// Determine the new vnode tree and store it on the DOM element on\n\t\t// our custom `_children` property.\n\t\tvnode,\n\t\toldVNode || EMPTY_OBJ,\n\t\tEMPTY_OBJ,\n\t\tparentDom.namespaceURI,\n\t\t!isHydrating && replaceNode\n\t\t\t? [replaceNode]\n\t\t\t: oldVNode\n\t\t\t\t? NULL\n\t\t\t\t: parentDom.firstChild\n\t\t\t\t\t? slice.call(parentDom.childNodes)\n\t\t\t\t\t: NULL,\n\t\tcommitQueue,\n\t\t!isHydrating && replaceNode\n\t\t\t? replaceNode\n\t\t\t: oldVNode\n\t\t\t\t? oldVNode._dom\n\t\t\t\t: parentDom.firstChild,\n\t\tisHydrating,\n\t\trefQueue\n\t);\n\n\t// Flush all queued effects\n\tcommitRoot(commitQueue, vnode, refQueue);\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to update\n */\nexport function hydrate(vnode, parentDom) {\n\trender(vnode, parentDom, hydrate);\n}\n","import { assign, slice } from './util';\nimport { createVNode } from './create-element';\nimport { NULL, UNDEFINED } from './constants';\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its\n * children.\n * @param {import('./internal').VNode} vnode The virtual DOM element to clone\n * @param {object} props Attributes/props to add when cloning\n * @param {Array<import('./internal').ComponentChildren>} rest Any additional arguments will be used\n * as replacement children.\n * @returns {import('./internal').VNode}\n */\nexport function cloneElement(vnode, props, children) {\n\tlet normalizedProps = assign({}, vnode.props),\n\t\tkey,\n\t\tref,\n\t\ti;\n\n\tlet defaultProps;\n\n\tif (vnode.type && vnode.type.defaultProps) {\n\t\tdefaultProps = vnode.type.defaultProps;\n\t}\n\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse if (props[i] == UNDEFINED && defaultProps != UNDEFINED) {\n\t\t\tnormalizedProps[i] = defaultProps[i];\n\t\t} else {\n\t\t\tnormalizedProps[i] = props[i];\n\t\t}\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\treturn createVNode(\n\t\tvnode.type,\n\t\tnormalizedProps,\n\t\tkey || vnode.key,\n\t\tref || vnode.ref,\n\t\tNULL\n\t);\n}\n","import { NULL } from '../constants';\n\n/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw the error that was caught (except\n * for unmounting when this parameter is the highest parent that was being\n * unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component,\n\t\t/** @type {import('../internal').ComponentType} */\n\t\tctor,\n\t\t/** @type {boolean} */\n\t\thandled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != NULL) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != NULL) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","\n export default function styleInject(css, { insertAt } = {}) {\n if (!css || typeof document === 'undefined') return\n \n const head = document.head || document.getElementsByTagName('head')[0]\n const style = document.createElement('style')\n style.type = 'text/css'\n \n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild)\n } else {\n head.appendChild(style)\n }\n } else {\n head.appendChild(style)\n }\n \n if (style.styleSheet) {\n style.styleSheet.cssText = css\n } else {\n style.appendChild(document.createTextNode(css))\n }\n }\n ","import styleInject from '#style-inject';styleInject(\".js-iframe{border:none;color-scheme:auto;height:100%;overflow:hidden;width:100%}.adyen-checkout-card-input__wrapper{position:relative}.adyen-checkout-card-input__icon{border-radius:var(--adyen-sdk-border-radius-s,4px);height:18px;margin-right:var(--adyen-sdk-spacer-060,12px);width:27px}.adyen-checkout-card-input__form{opacity:1}.adyen-checkout-card-input__spinner{display:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.adyen-checkout-card-input__spinner--active{display:block}.adyen-checkout-card-input__form--loading{opacity:0}.adyen-checkout__input{display:block;max-height:100px}.adyen-checkout__field.adyen-checkout__card__cvc__input--hidden,.adyen-checkout__field.adyen-checkout__card__exp-date__input--hidden{display:none}.adyen-checkout__card__exp-cvc__exp-date__input--hidden{justify-content:flex-end}.revolving-plan-installments__disabled{opacity:.4;pointer-events:none}.adyen-checkout__card-input__form{transition:opacity .25s ease-out}.adyen-checkout__card__cardNumber{max-width:400px}.adyen-checkout__card__cardNumber__input{padding-left:var(--adyen-sdk-spacer-060,12px)}.adyen-checkout__card__exp-date__input--oneclick{font-weight:var(--adyen-sdk-text-body-font-weight,400);line-height:var(--adyen-sdk-text-title-line-height,26px);overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.adyen-checkout__card__holderName,.adyen-checkout__field--expiryDate,.adyen-checkout__field--storedCard{margin-bottom:0}.adyen-checkout__card-input .adyen-checkout__fieldset--billingAddress,.adyen-checkout__card__holderName,.adyen-checkout__card__kcp-authentication,.adyen-checkout__card__socialSecurityNumber,.adyen-checkout__installments{margin-top:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__card-input.adyen-checkout__card-input--loading{pointer-events:none}.adyen-checkout__card__holderName:first-child{margin:0 0 var(--adyen-sdk-spacer-060,12px)}.adyen-checkout__field--cardNumber .adyen-checkout-card-input__icon--hidden,.adyen-checkout__field--cardNumber .adyen-checkout__input--error+.adyen-checkout__card__cardNumber__brandIcon,.adyen-checkout__field--cardNumber .adyen-checkout__input--valid:not(.adyen-checkout__card__cardNumber__input--noBrand)+.adyen-checkout-input__inline-validation--valid{display:none}.adyen-checkout__field--securityCode.adyen-checkout__field--error .adyen-checkout__card__cvc__hint,.adyen-checkout__field--securityCode.adyen-checkout__field--valid .adyen-checkout__card__cvc__hint{opacity:0}@keyframes cvc-indicate-location{0%{opacity:1}to{opacity:.3}}.adyen-checkout__label--focused .adyen-checkout__field__cvc--back-hint .adyen-checkout__card__cvc__hint--back .adyen-checkout__card__cvc__hint__location,.adyen-checkout__label--focused .adyen-checkout__field__cvc--front-hint .adyen-checkout__card__cvc__hint--front .adyen-checkout__card__cvc__hint__location{animation-direction:alternate;animation-duration:1s;animation-iteration-count:infinite;animation-name:cvc-indicate-location}.adyen-checkout__card__cvc__hint__wrapper{align-items:center;backface-visibility:visible;display:flex;height:100%;margin-right:var(--adyen-sdk-spacer-060,12px);position:absolute;right:0;transform:translateZ(0);transform-origin:center;transform-style:preserve-3d;transition:transform .3s cubic-bezier(.455,.03,.515,.955);width:27px;will-change:transform}.adyen-checkout__field__cvc--front-hint.adyen-checkout__card__cvc__hint__wrapper{transform:rotateY(180deg)}.adyen-checkout__card__cvc__hint{backface-visibility:hidden;position:absolute;transition:opacity .1s linear}.adyen-checkout__field__exp-date_hint_wrapper{align-items:center;display:flex;margin-right:var(--adyen-sdk-spacer-060,12px);position:absolute;right:0;transition:opacity .1s linear}.adyen-checkout__field__exp-date_hint_wrapper.adyen-checkout__field__exp-date_hint_wrapper--hidden{opacity:0}.adyen-checkout__field__exp-date_hint{height:18px;width:27px}.adyen-checkout__card__cvc__hint--front{transform:rotateY(180deg)}@media (prefers-reduced-motion:reduce){.adyen-checkout__card__cvc__hint__wrapper{transition:none}}.adyen-checkout__fieldset--revolving-plan .adyen-checkout__fieldset__fields{justify-content:left}.adyen-checkout__fieldset--revolving-plan .adyen-checkout__radio_group{display:flex;flex-direction:column}.adyen-checkout__fieldset--revolving-plan .adyen-checkout__radio_group__input-wrapper{margin-top:var(--adyen-sdk-spacer-080,20px)}.adyen-checkout__fieldset--revolving-plan .adyen-checkout__field--revolving-plan-installments{margin-left:var(--adyen-sdk-spacer-070,16px);position:relative;top:52px;width:30%}.adyen-checkout__card-input .adyen-checkout__fieldset--dual-brand-switcher{margin-top:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__card-input .adyen-checkout__fieldset--dual-brand-switcher .adyen-checkout__fieldset__title{padding-bottom:0}.adyen-checkout__spinner__wrapper{align-items:center;display:flex;height:100%;justify-content:center}.adyen-checkout__spinner__wrapper--inline{display:inline-block;height:auto;margin-right:var(--adyen-sdk-spacer-040,8px)}[dir=rtl] .adyen-checkout__spinner__wrapper--inline{margin-left:var(--adyen-sdk-spacer-040,8px);margin-right:0}.adyen-checkout__spinner{height:var(--adyen-sdk-spacer-090,24px);position:relative;width:var(--adyen-sdk-spacer-090,24px)}.adyen-checkout__spinner:after,.adyen-checkout__spinner:before{animation:rotate 1s cubic-bezier(.785,.135,.15,.86) infinite;border:var(--adyen-sdk-border-width-l,3px) solid transparent;border-radius:50%;box-sizing:border-box;content:\\\"\\\";display:block;height:100%;left:0;position:absolute;top:0;width:100%}.adyen-checkout__spinner:before{border-color:var(--adyen-sdk-color-background-inverse-primary,#00112c);border-top-color:transparent;opacity:.1}.adyen-checkout__spinner:after{border-color:transparent;border-top-color:var(--adyen-sdk-color-outline-primary-active,#00112c)}.adyen-checkout__spinner--small{height:var(--adyen-sdk-spacer-070,16px);width:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__spinner--small:after,.adyen-checkout__spinner--small:before{border-width:var(--adyen-sdk-spacer-010,2px)}.adyen-checkout__spinner--medium{height:28px;width:28px}.adyen-checkout__spinner--large{height:var(--adyen-sdk-spacer-120,48px);width:var(--adyen-sdk-spacer-120,48px)}.adyen-checkout__spinner--large:after,.adyen-checkout__spinner--large:before{border-width:var(--adyen-sdk-spacer-020,4px)}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.loading-input__form{opacity:1}.loading-input__form--loading{opacity:0}.loading-input__spinner{display:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.loading-input__spinner--active{display:block}.adyen-checkout__field{display:block;margin-bottom:var(--adyen-sdk-spacer-070,16px);width:100%}.adyen-checkout__field-static-value{background-color:var(--adyen-sdk-color-background-primary-hover,#f7f7f8);border-radius:var(--adyen-sdk-border-radius-s,4px);color:var(--adyen-sdk-color-background-inverse-primary,#00112c);display:flex;font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);height:28px;line-height:var(--adyen-sdk-text-body-line-height,20px);margin-left:var(--adyen-sdk-spacer-020,4px);padding:var(--adyen-sdk-spacer-020,4px) var(--adyen-sdk-spacer-030,6px)}.adyen-checkout__field--no-borders .adyen-checkout__input-wrapper{background-color:transparent;border:none;box-shadow:none}.adyen-checkout__field--no-borders .adyen-checkout__input-wrapper:active,.adyen-checkout__field--no-borders .adyen-checkout__input-wrapper:active:hover,.adyen-checkout__field--no-borders .adyen-checkout__input-wrapper:focus-within,.adyen-checkout__field--no-borders .adyen-checkout__input-wrapper:focus-within:hover{border:none;box-shadow:none}.adyen-checkout__field--no-borders .adyen-checkout__input-wrapper:hover{border:none;box-shadow:none}.adyen-checkout__input-wrapper{align-items:center;background:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-primary,#dbdee2);border-radius:var(--adyen-sdk-border-radius-m,8px);display:flex;position:relative}.adyen-checkout__input-wrapper div,.adyen-checkout__input-wrapper input,.adyen-checkout__input-wrapper span{border-radius:inherit}.adyen-checkout__input-wrapper button,.adyen-checkout__input-wrapper div,.adyen-checkout__input-wrapper input{border:none}.adyen-checkout__input-wrapper:active,.adyen-checkout__input-wrapper:active:hover,.adyen-checkout__input-wrapper:focus-within,.adyen-checkout__input-wrapper:focus-within:hover{border-color:var(--adyen-sdk-color-outline-primary-active,#00112c);box-shadow:0 0 0 .5px var(--adyen-sdk-color-outline-primary-active,#00112c)}.adyen-checkout__input-wrapper:hover{border-color:var(--adyen-sdk-color-outline-tertiary,#8d95a3)}.adyen-checkout__field--inactive>.adyen-checkout__input-wrapper{background:var(--adyen-sdk-color-background-disabled,#eeeff1);border-color:transparent}.adyen-checkout__field--error>:not(.adyen-checkout__label--focused)+.adyen-checkout__input-wrapper:not(:focus-within,:active){border-color:var(--adyen-sdk-color-outline-critical,#e22d2d)}.adyen-checkout__label{display:block;position:relative}.adyen-checkout__label--focused+.adyen-checkout__input-wrapper{border-color:var(--adyen-sdk-color-outline-primary-active,#00112c);box-shadow:0 0 0 .5px var(--adyen-sdk-color-outline-primary-active,#00112c)}.adyen-checkout__label--disabled+.adyen-checkout__input-wrapper{background:var(--adyen-sdk-color-background-disabled,#eeeff1);border-color:transparent}.adyen-checkout__helper-text{color:var(--adyen-sdk-color-label-primary,#00112c);display:block;font-size:var(--adyen-sdk-text-caption-font-size,.75rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin-bottom:var(--adyen-sdk-spacer-020,4px)}.adyen-checkout__label-adornment--end{position:absolute;right:0;top:0}.adyen-checkout__label__text{color:var(--adyen-sdk-color-label-primary,#00112c);display:block;font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);line-height:var(--adyen-sdk-text-body-line-height,20px);margin-bottom:var(--adyen-sdk-spacer-020,4px);overflow:hidden;text-overflow:ellipsis;transition:color .1s ease-out;white-space:nowrap}.adyen-checkout__label__text--error{color:var(--adyen-sdk-color-label-critical,#c72727)}.adyen-checkout__label--focused .adyen-checkout__label__text{color:var(--adyen-sdk-color-label-primary,#00112c)}.adyen-checkout-contextual-text,.adyen-checkout-contextual-text--error{align-items:center;color:var(--adyen-sdk-color-label-primary,#00112c);display:flex;font-size:var(--adyen-sdk-text-caption-font-size,.75rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin-top:var(--adyen-sdk-spacer-020,4px);opacity:1;transition:margin .2s ease-out,opacity .2s ease-out}.adyen-checkout-contextual-text--error{color:var(--adyen-sdk-color-label-critical,#c72727)}.adyen-checkout-contextual-text--hidden{height:0;margin:0;opacity:0}.adyen-checkout__filter-input:-webkit-autofill,.adyen-checkout__input:-webkit-autofill{color:var(--adyen-sdk-color-label-primary,#00112c)!important;-webkit-text-fill-color:var(--adyen-sdk-color-label-primary,#00112c)!important;-webkit-background-clip:text!important;background-clip:text!important;background-color:var(--adyen-sdk-color-label-primary,#00112c)!important;box-shadow:0 0 0 1000px var(--adyen-sdk-color-background-primary,#ffffff) inset!important;-webkit-transition:none!important;transition:none!important}.adyen-checkout__filter-input:-webkit-autofill,.adyen-checkout__filter-input:-webkit-autofill:active,.adyen-checkout__filter-input:-webkit-autofill:focus,.adyen-checkout__filter-input:-webkit-autofill:hover,.adyen-checkout__filter-input:autofill,.adyen-checkout__input:-webkit-autofill,.adyen-checkout__input:-webkit-autofill:active,.adyen-checkout__input:-webkit-autofill:focus,.adyen-checkout__input:-webkit-autofill:hover,.adyen-checkout__input:autofill{color:var(--adyen-sdk-color-label-primary,#00112c)!important;-webkit-text-fill-color:var(--adyen-sdk-color-label-primary,#00112c)!important;-webkit-background-clip:text!important;background-clip:text!important;background-color:var(--adyen-sdk-color-label-primary,#00112c)!important;box-shadow:0 0 0 1000px var(--adyen-sdk-color-background-primary,#ffffff) inset!important;-webkit-transition:none!important;transition:none!important}.adyen-checkout__filter-input,.adyen-checkout__input{-webkit-background-clip:text!important;background-clip:text!important;color:var(--adyen-sdk-color-label-primary,#00112c)!important}.adyen-checkout__field-wrapper{display:flex;width:100%}@media (min-width:480px){.adyen-checkout__field--20{width:20%}.adyen-checkout__field--30{width:30%}.adyen-checkout__field--40{width:40%}.adyen-checkout__field--50{width:50%}.adyen-checkout__field--60{width:60%}.adyen-checkout__field--70{width:70%}.adyen-checkout__field--80{width:80%}.adyen-checkout__field--col-20{width:calc(20% - var(--adyen-sdk-spacer-040, 8px))}.adyen-checkout__field--col-30{width:calc(30% - var(--adyen-sdk-spacer-040, 8px))}.adyen-checkout__field--col-40{width:calc(40% - var(--adyen-sdk-spacer-040, 8px))}.adyen-checkout__field--col-50{width:calc(50% - var(--adyen-sdk-spacer-040, 8px))}.adyen-checkout__field--col-60{width:calc(60% - var(--adyen-sdk-spacer-040, 8px))}.adyen-checkout__field--col-70{width:calc(70% - var(--adyen-sdk-spacer-040, 8px))}.adyen-checkout__field--col-80{width:calc(80% - var(--adyen-sdk-spacer-040, 8px))}}.adyen-checkout__field-wrapper>.adyen-checkout__field:first-child{margin-right:var(--adyen-sdk-spacer-040,8px)}[dir=rtl] .adyen-checkout__field-wrapper>.adyen-checkout__field:first-child{margin-left:var(--adyen-sdk-spacer-040,8px);margin-right:0}.adyen-checkout__field-wrapper>.adyen-checkout__field:nth-child(2){margin-left:var(--adyen-sdk-spacer-040,8px)}[dir=rtl] .adyen-checkout__field-wrapper>.adyen-checkout__field:nth-child(2){margin-left:0;margin-right:var(--adyen-sdk-spacer-040,8px)}.adyen-checkout__field-wrapper:last-of-type>.adyen-checkout__field{margin-bottom:0}.adyen-checkout__input{background:inherit;color:var(--adyen-sdk-color-label-primary,#00112c);display:block;font-family:inherit;font-size:var(--adyen-sdk-text-subtitle-font-size,1rem);height:var(--adyen-sdk-spacer-110,40px);outline:none;padding-left:var(--adyen-sdk-spacer-060,12px);transition:border .2s ease-out,box-shadow .2s ease-out;width:100%}.adyen-checkout__input:required{box-shadow:none}.adyen-checkout__input:-moz-read-only{color:var(--adyen-sdk-color-label-secondary,#5c687c)!important;cursor:default}.adyen-checkout__input:disabled,.adyen-checkout__input:read-only{color:var(--adyen-sdk-color-label-secondary,#5c687c)!important;cursor:default}span.adyen-checkout__input{overflow:hidden}.adyen-checkout-input__inline-validation{height:var(--adyen-sdk-spacer-070,16px);margin-right:var(--adyen-sdk-spacer-060,12px);width:var(--adyen-sdk-spacer-070,16px)}[dir=rtl] .adyen-checkout-input__inline-validation{margin-left:var(--adyen-sdk-spacer-060,12px)}.adyen-checkout-input__inline-validation>.adyen-checkout__icon{display:block}.adyen-checkout-input__inline-validation--valid{color:var(--adyen-sdk-color-label-success,#07893c)}.adyen-checkout-input__inline-validation--invalid{color:var(--adyen-sdk-color-label-critical,#c72727)}.adyen-checkout__input--date{padding:.5em}.adyen-checkout__fieldset{border:none;display:block;margin-inline-end:0;margin-inline-start:0;margin:0;padding-block-start:0;padding-bottom:var(--adyen-sdk-spacer-040,8px);padding-block-end:0;padding-inline-end:0;padding-inline-start:0;width:100%}.adyen-checkout__fieldset__description{color:var(--adyen-sdk-color-label-secondary,#5c687c);font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);line-height:1.5;list-style-type:disc;margin:0}.adyen-checkout__fieldset:last-of-type{padding-bottom:0}.adyen-checkout__fieldset+.adyen-checkout__fieldset{margin-top:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__fieldset__title{color:var(--adyen-sdk-color-label-primary,#00112c);display:block;font-size:var(--adyen-sdk-text-subtitle-font-size,1rem);font-weight:var(--adyen-sdk-text-subtitle-stronger-font-weight,600);font-weight:var(--adyen-sdk-text-subtitle-font-weight,500);line-height:var(--adyen-sdk-text-subtitle-line-height,26px);margin:0;padding:0 0 var(--adyen-sdk-spacer-060,12px)}.adyen-checkout__fieldset__title:has(+.adyen-checkout__fieldset__description){padding:0}.adyen-checkout__field-group,.adyen-checkout__fieldset__fields{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}@media (min-width:480px){.adyen-checkout__field-group:last-of-type .adyen-checkout__field{margin-bottom:0}}.adyen-checkout__field-group:last-of-type .adyen-checkout__field:last-of-type,:not(.adyen-checkout__field-group)>.adyen-checkout__field:last-of-type{margin-bottom:0}.adyen-checkout__fieldset--readonly .adyen-checkout__fieldset__fields{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-body-font-size,.875rem);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin:0}.adyen-checkout__radio_group+.adyen-checkout-input__inline-validation{display:none}.adyen-checkout__radio_group__input{opacity:0;position:absolute}.adyen-checkout__radio_group__label{color:inherit;display:block;font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:400;line-height:var(--adyen-sdk-text-body-line-height,20px);margin:0;overflow:visible;padding-bottom:0;padding-left:var(--adyen-sdk-spacer-090,24px);position:relative}.adyen-checkout__label--focused .adyen-checkout__radio_group__label{color:inherit}.adyen-checkout__radio_group__label:before{background-color:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-tertiary,#8d95a3);border-radius:50%;content:\\\"\\\";height:var(--adyen-sdk-spacer-070,16px);left:0;position:absolute;top:var(--adyen-sdk-spacer-010,2px);transition:border-color .2s ease-out,box-shadow .2s ease-out;width:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__radio_group__label:hover:before{box-shadow:0 0 0 var(--adyen-sdk-spacer-010,2px) var(--adyen-sdk-color-outline-primary-hover,#c9cdd3);cursor:pointer}.adyen-checkout__radio_group__label:after{background-color:var(--adyen-sdk-color-background-primary,#ffffff);border-radius:50%;box-shadow:0 1px 1px #000f2d40;content:\\\"\\\";display:block;height:var(--adyen-sdk-spacer-030,6px);left:5px;margin:0 auto;position:absolute;top:7px;transform:scale(0);transition:transform .2s ease-out;width:var(--adyen-sdk-spacer-030,6px)}.adyen-checkout__radio_group__label:hover{border-color:var(--adyen-sdk-color-label-primary,#00112c);cursor:pointer}.adyen-checkout__radio_group__input:checked+.adyen-checkout__radio_group__label:before,.adyen-checkout__radio_group__label--selected{background-color:var(--adyen-sdk-color-label-primary,#00112c);border:0;transition:all .2s ease-out}.adyen-checkout__radio_group__input:checked+.adyen-checkout__radio_group__label:after{transform:scale(1)}.adyen-checkout__radio_group__input:focus+.adyen-checkout__radio_group__label:before{border-color:var(--adyen-sdk-color-label-primary,#00112c)}.adyen-checkout__radio_group__input:checked+.adyen-checkout__radio_group__label:hover:before,.adyen-checkout__radio_group__input:checked:active+.adyen-checkout__radio_group__label:before,.adyen-checkout__radio_group__input:checked:focus+.adyen-checkout__radio_group__label:before,.adyen-checkout__radio_group__input:focus+.adyen-checkout__radio_group__label:before{box-shadow:0 0 0 var(--adyen-sdk-spacer-010,2px) var(--adyen-sdk-color-outline-tertiary,#8d95a3)}.adyen-checkout__radio_group__label.adyen-checkout__radio_group__label--invalid:before{border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-critical,#e22d2d)}.adyen-checkout__radio_group--button{align-items:flex-start;align-self:stretch;display:flex;flex-wrap:wrap;gap:var(--adyen-sdk-spacer-070,16px);width:100%}.adyen-checkout__radio_group--button .adyen-checkout__radio_group__input-wrapper{display:flex;flex:1 0 0}.adyen-checkout__radio_group--button .adyen-checkout__radio_group__label:after{left:calc(var(--adyen-sdk-spacer-060, 12px) + 5px);position:absolute;top:calc(50% - var(--adyen-sdk-spacer-030, 6px)/2)}.adyen-checkout__radio_group--button .adyen-checkout__radio_group__label:before{left:calc(var(--adyen-sdk-spacer-060, 12px));position:absolute;top:calc(50% - var(--adyen-sdk-spacer-070, 16px)/2)}.adyen-checkout__radio_group--button .adyen-checkout__radio_group__label{background-color:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-primary,#dbdee2);border-radius:var(--adyen-sdk-border-radius-m,8px);padding:var(--adyen-sdk-spacer-060,12px);padding-left:calc(var(--adyen-sdk-spacer-060, 12px) + var(--adyen-sdk-spacer-090, 24px));width:100%}.adyen-checkout__radio_group--button .adyen-checkout__radio_group__input+.adyen-checkout__radio_group__label:hover,.adyen-checkout__radio_group--button .adyen-checkout__radio_group__input:checked+.adyen-checkout__radio_group__label{border-color:var(--adyen-sdk-color-outline-primary-active,#00112c)}.adyen-checkout__radio_group--button .adyen-checkout__radio_group__input:checked:active+.adyen-checkout__radio_group__label,.adyen-checkout__radio_group--button .adyen-checkout__radio_group__input:checked:focus+.adyen-checkout__radio_group__label{border-color:var(--adyen-sdk-color-outline-primary-active,#00112c);box-shadow:0 0 0 .5px var(--adyen-sdk-color-outline-primary-active,#00112c)}.adyen-checkout__image{opacity:0;transition:opacity .6s ease-out}.adyen-checkout__image--loaded{opacity:1}.adyen-checkout__dropdown__button-icon--left{flex-direction:row-reverse;justify-content:flex-end}.adyen-checkout__dropdown__button-icon--left>img{margin-left:0;margin-right:var(--adyen-sdk-spacer-060,12px)}.adyen-checkout__dropdown{max-width:100%;position:relative}.adyen-checkout__dropdown,.adyen-checkout__dropdown__button{font-size:var(--adyen-sdk-text-subtitle-font-size,1rem);width:100%}.adyen-checkout__dropdown__button{align-items:center;background:inherit;border-radius:inherit;color:var(--adyen-sdk-color-label-primary,#00112c);cursor:pointer;display:flex;height:var(--adyen-sdk-spacer-110,40px);line-height:var(--adyen-sdk-text-body-line-height,20px);outline:0;padding:0 var(--adyen-sdk-spacer-060,12px);text-decoration:none;transition:border .2s ease-out,box-shadow .2s ease-out;-webkit-user-select:none;-moz-user-select:none;user-select:none}[dir=rtl] .adyen-checkout__dropdown__button{padding:7px var(--adyen-sdk-spacer-060,12px) 7px var(--adyen-sdk-spacer-090,24px)}.adyen-checkout__dropdown__button:after{background-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none' viewBox='0 0 16 17'%3E%3Cpath fill='%2300112C' fill-rule='evenodd' d='M4.47 6.47a.75.75 0 0 1 1.06 0L8 8.94l2.47-2.47a.75.75 0 0 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E\\\");background-position:50%;background-repeat:no-repeat;content:\\\"\\\";height:var(--adyen-sdk-spacer-030,6px);position:absolute;right:var(--adyen-sdk-spacer-070,16px);width:var(--adyen-sdk-spacer-040,8px)}[dir=rtl] .adyen-checkout__dropdown__button:after{left:var(--adyen-sdk-spacer-070,16px);right:auto}.adyen-checkout__dropdown__button--active:after{transform:rotate(180deg)}.adyen-checkout__dropdown__button--disabled{opacity:.4}.adyen-checkout__dropdown__button--readonly,.adyen-checkout__dropdown__button--readonly--active,.adyen-checkout__dropdown__button--readonly:focus,.adyen-checkout__dropdown__button--readonly:hover{background:var(--adyen-sdk-color-background-disabled,#eeeff1);border-color:transparent;color:var(--adyen-sdk-color-label-primary,#00112c);cursor:not-allowed}.adyen-checkout__dropdown__button--readonly:after{background-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='7' fill='none' viewBox='0 0 8 7'%3E%3Cpath fill='%23B9C4C9' d='M3.195 6.565a1 1 0 0 0 1.6 0l2.992-3.98a1 1 0 0 0-.8-1.602H1.013a1 1 0 0 0-.8 1.6z'/%3E%3C/svg%3E\\\")}.adyen-checkout__dropdown__button--invalid{border-color:var(--adyen-sdk-color-outline-critical,#e22d2d)}.adyen-checkout__dropdown__button__icon{border-radius:3px;height:26px;margin-right:var(--adyen-sdk-spacer-060,12px);max-width:var(--adyen-sdk-spacer-110,40px)}.adyen-checkout__dropdown__button__text{flex-grow:1;overflow:hidden;pointer-events:none;text-align:left;text-overflow:ellipsis;white-space:nowrap}.adyen-checkout__dropdown__button__text-placeholder{color:var(--adyen-sdk-color-label-secondary,#5c687c)}.adyen-checkout__dropdown__button__secondary-text{margin-right:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__filter-input{background:inherit;border:0;color:var(--adyen-sdk-color-label-primary,#00112c);font-family:inherit;font-size:var(--adyen-sdk-text-subtitle-font-size,1rem);height:100%;padding:0;width:100%}.adyen-checkout__filter-input:active,.adyen-checkout__filter-input:focus{outline:0}.adyen-checkout__filter-input[readonly]{border-color:transparent;color:var(--adyen-sdk-color-label-secondary,#5c687c)!important;cursor:not-allowed}.adyen-checkout__dropdown__list{background:var(--adyen-sdk-color-background-primary,#ffffff);border-radius:var(--adyen-sdk-border-radius-m,8px);box-shadow:0 var(--adyen-sdk-spacer-010,2px) 7px #000f2d4d;display:none;list-style:none;margin:0 0 var(--adyen-sdk-spacer-120,48px);max-height:375px;overflow-y:auto;padding:0;position:absolute;width:100%;z-index:2}.adyen-checkout__dropdown__list.adyen-checkout__dropdown__list--active{display:block;margin-top:var(--adyen-sdk-spacer-010,2px)}.adyen-checkout__dropdown__element{align-items:center;border:var(--adyen-sdk-border-width-s,1px) solid transparent;cursor:pointer;display:flex;font-size:var(--adyen-sdk-text-body-font-size,.875rem);-webkit-hyphens:auto;hyphens:auto;line-height:var(--adyen-sdk-text-body-line-height,20px);outline:0;padding:var(--adyen-sdk-spacer-040,8px);transition:background .2s ease-out,border-color .2s ease-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;word-break:break-word}.adyen-checkout__dropdown__element .adyen-checkout__icon{position:absolute;right:var(--adyen-sdk-spacer-040,8px)}.adyen-checkout__dropdown__element:last-child{border-bottom:0}.adyen-checkout__dropdown__element.adyen-checkout__dropdown__element--active{background:#e6e9eb99}.adyen-checkout__dropdown__element.adyen-checkout__dropdown__element--selected{background:#0066ff1a}.adyen-checkout__dropdown__element.adyen-checkout__dropdown__element--selected:active,.adyen-checkout__dropdown__element.adyen-checkout__dropdown__element--selected:focus,.adyen-checkout__dropdown__element.adyen-checkout__dropdown__element--selected:hover{background:#0066ff26}.adyen-checkout__dropdown__element--disabled{cursor:not-allowed;opacity:.4}.adyen-checkout__dropdown__element__icon{border-radius:var(--adyen-sdk-border-radius-s,4px);margin-right:var(--adyen-sdk-spacer-060,12px);max-height:26px;max-width:var(--adyen-sdk-spacer-110,40px)}.adyen-checkout__dropdown__element__text{flex-grow:1}.adyen-checkout__dropdown__element__secondary-text:not(:last-child){margin-right:var(--adyen-sdk-spacer-040,8px)}.adyen-checkout__dropdown__element__flag{margin-left:var(--adyen-sdk-spacer-040,8px);margin-right:var(--adyen-sdk-spacer-050,10px);max-height:18px;max-width:27px}.adyen-checkout__dropdown+.adyen-checkout-input__inline-validation{right:var(--adyen-sdk-spacer-100,32px)}.adyen-checkout__installments .adyen-checkout__input-wrapper{background-color:transparent;border:none;box-shadow:none}.adyen-checkout__installments .adyen-checkout__input-wrapper:active,.adyen-checkout__installments .adyen-checkout__input-wrapper:active:hover,.adyen-checkout__installments .adyen-checkout__input-wrapper:focus-within,.adyen-checkout__installments .adyen-checkout__input-wrapper:focus-within:hover{box-shadow:none}.adyen-checkout__installments .adyen-checkout__fieldset--revolving-plan{margin-top:-5px}.adyen-checkout-disclaimer__label{color:var(--adyen-sdk-color-label-secondary,#5c687c);display:inline-block;font-size:var(--adyen-sdk-text-caption-font-size,.75rem);font-weight:400;line-height:var(--adyen-sdk-text-caption-line-height,18px);margin-top:var(--adyen-sdk-spacer-070,16px);padding-left:0}[dir=rtl] .adyen-checkout-disclaimer__label{padding-right:0}.adyen-checkout-link{--text-decoration:none;color:var(--adyen-sdk-color-label-highlight,#0070f5);-webkit-text-decoration:var(--text-decoration);text-decoration:var(--text-decoration)}.adyen-checkout-link:focus-visible{outline:none}.adyen-checkout-link:active,.adyen-checkout-link:hover{--text-decoration:underline}.adyen-checkout-link:focus-visible{border-radius:var(--adyen-sdk-border-radius-xs,2px);box-shadow:0 0 0 1px #fff,0 0 0 3px var(--adyen-sdk-focus-ring-color,rgba(0,112,245,.8));transition:.1s cubic-bezier(.785,.135,.15,.86)}.adyen-checkout__card__dual-branding__icons{display:flex;pointer-events:auto}.adyen-checkout__card__dual-branding__icons .adyen-checkout__card__cardNumber__brandIcon{cursor:inherit;opacity:1}.adyen-checkout__card__dual-branding__icons .adyen-checkout__card__cardNumber__brandIcon:first-child{right:var(--adyen-sdk-spacer-110,40px)}.adyen-checkout__card__brands{display:flex;flex-basis:auto;flex-shrink:1;flex-wrap:wrap;margin-bottom:var(--adyen-sdk-spacer-060,12px);margin-top:-12px;min-height:var(--adyen-sdk-spacer-090,24px);transition:all .3s ease-out}.adyen-checkout__card__brands__brand-wrapper{border-radius:var(--adyen-sdk-border-radius-s,4px);box-shadow:var(--adyen-sdk-shadow-low,0 2px 4px rgba(0,17,44,.04),0 1px 2px rgba(0,17,44,.02));display:inline-block;height:var(--adyen-sdk-spacer-070,16px);margin:var(--adyen-sdk-spacer-020,4px) var(--adyen-sdk-spacer-010,2px);overflow:hidden;position:relative;width:var(--adyen-sdk-spacer-090,24px)}.adyen-checkout__card__brands--hidden{margin:-8px 0 8px;max-height:0;min-height:0;opacity:0}.adyen-checkout__card__brands img{display:block;height:auto;margin:0;padding:0;width:100%}.adyen-checkout__checkbox{display:flex;width:100%}.adyen-checkout__checkbox__label{color:var(--adyen-sdk-color-label-primary,#00112c);cursor:pointer;display:inline-block;flex:1;font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:400;line-height:var(--adyen-sdk-text-caption-line-height,18px);padding-left:var(--adyen-sdk-spacer-090,24px);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}[dir=rtl] .adyen-checkout__checkbox__label{padding-left:0;padding-right:var(--adyen-sdk-spacer-090,24px)}.adyen-checkout__checkbox__input{opacity:0;pointer-events:none;position:absolute}.adyen-checkout__checkbox__input:checked+.adyen-checkout__checkbox__label:before{opacity:1}.adyen-checkout__checkbox__input:checked+.adyen-checkout__checkbox__label:after{background-color:var(--adyen-sdk-color-label-primary,#00112c);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-label-primary,#00112c)}.adyen-checkout__checkbox__input:checked:hover+.adyen-checkout__checkbox__label:after{border-color:var(--adyen-sdk-color-label-primary,#00112c);box-shadow:0 0 0 var(--adyen-sdk-spacer-010,2px) var(--adyen-sdk-color-outline-tertiary,#8d95a3)}.adyen-checkout__checkbox__input:focus+.adyen-checkout__checkbox__label:after{border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-label-primary,#00112c);box-shadow:0 0 0 var(--adyen-sdk-spacer-010,2px) var(--adyen-sdk-color-outline-tertiary,#8d95a3)}.adyen-checkout__checkbox__input:hover:not(:focus)+.adyen-checkout__checkbox__label:after{border-color:var(--adyen-sdk-color-outline-tertiary,#8d95a3);box-shadow:0 0 0 var(--adyen-sdk-spacer-010,2px) var(--adyen-sdk-color-outline-primary-hover,#c9cdd3)}.adyen-checkout__checkbox__input+.adyen-checkout__checkbox__label:before{border-bottom:var(--adyen-sdk-spacer-010,2px) solid var(--adyen-sdk-color-label-on-color,#ffffff);border-left:1px solid transparent;border-radius:0 var(--adyen-sdk-spacer-010,2px) 1px;border-right:var(--adyen-sdk-spacer-010,2px) solid var(--adyen-sdk-color-label-on-color,#ffffff);border-top:1px solid transparent;content:\\\"\\\";height:11px;left:1px;opacity:0;position:absolute;top:var(--adyen-sdk-spacer-010,2px);transform:rotate(37deg);transform-origin:100% 100%;transition:opacity .2s ease-out;width:var(--adyen-sdk-spacer-030,6px);z-index:1}[dir=rtl] .adyen-checkout__checkbox__input+.adyen-checkout__checkbox__label:before{left:auto;right:var(--adyen-sdk-spacer-040,8px)}.adyen-checkout__checkbox__input+.adyen-checkout__checkbox__label:after{background-color:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-primary,#dbdee2);border-radius:var(--adyen-sdk-border-radius-s,4px);content:\\\"\\\";height:var(--adyen-sdk-spacer-070,16px);left:0;position:absolute;top:0;transition:background .15s ease-out,border .05s ease-out,box-shadow .1s ease-out;width:var(--adyen-sdk-spacer-070,16px);z-index:0}[dir=rtl] .adyen-checkout__checkbox__input+.adyen-checkout__checkbox__label:after{left:auto;right:0}.adyen-checkout__field--consentCheckbox{align-items:center;background:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-primary,#dbdee2);border-radius:var(--adyen-sdk-border-radius-m,8px);display:flex}.adyen-checkout__field--consentCheckbox,[dir=rtl] .adyen-checkout__field--consentCheckbox{padding:var(--adyen-sdk-spacer-060,12px) var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__field--consentCheckbox .adyen-checkout__input-wrapper{background-color:transparent;border:none;box-shadow:none;flex:1;justify-content:space-between}.adyen-checkout__field--consentCheckbox .adyen-checkout__input-wrapper:active,.adyen-checkout__field--consentCheckbox .adyen-checkout__input-wrapper:active:hover,.adyen-checkout__field--consentCheckbox .adyen-checkout__input-wrapper:focus-within,.adyen-checkout__field--consentCheckbox .adyen-checkout__input-wrapper:focus-within:hover{box-shadow:none}.adyen-checkout__field--consentCheckbox.adyen-checkout__field--error{border-color:var(--adyen-sdk-color-outline-critical,#e22d2d)}.adyen-checkout__field--consentCheckbox .adyen-checkout-input__inline-validation{margin-right:0}[dir=rtl] .adyen-checkout__field--consentCheckbox .adyen-checkout-input__inline-validation{margin-left:0}.adyen-checkout__store-details{align-items:center;background:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-primary,#dbdee2);border-radius:var(--adyen-sdk-border-radius-m,8px);display:flex;gap:var(--adyen-sdk-spacer-060,12px);margin-top:var(--adyen-sdk-spacer-070,16px);padding:var(--adyen-sdk-spacer-060,12px) var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__address-search{position:relative}.adyen-checkout__address-search .adyen-checkout__dropdown__button:after{background-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23687282' d='M6.5 11.9a4.5 4.5 0 0 0 2.6-.83l2.77 2.74c.13.13.3.19.48.19.38 0 .65-.29.65-.66a.63.63 0 0 0-.19-.46l-2.75-2.73a4.4 4.4 0 0 0 .92-2.7 4.48 4.48 0 0 0-8.98 0 4.48 4.48 0 0 0 4.5 4.45m0-.96a3.53 3.53 0 0 1-3.53-3.49 3.52 3.52 0 0 1 7.04 0c0 1.9-1.59 3.49-3.52 3.49Z'/%3E%3C/svg%3E\\\");background-position:50%;background-repeat:no-repeat;content:\\\"\\\";height:var(--adyen-sdk-spacer-070,16px);left:var(--adyen-sdk-spacer-060,12px);position:absolute;width:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__address-search .adyen-checkout__dropdown__button--active:after{background-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%2300112C' d='M6.5 11.9a4.5 4.5 0 0 0 2.6-.83l2.77 2.74c.13.13.3.19.48.19.38 0 .65-.29.65-.66a.63.63 0 0 0-.19-.46l-2.75-2.73a4.4 4.4 0 0 0 .92-2.7 4.48 4.48 0 0 0-8.98 0 4.48 4.48 0 0 0 4.5 4.45m0-.96a3.53 3.53 0 0 1-3.53-3.49 3.52 3.52 0 0 1 7.04 0c0 1.9-1.59 3.49-3.52 3.49Z'/%3E%3C/svg%3E\\\");transform:none}.adyen-checkout__address-search .adyen-checkout__filter-input{padding-left:calc(var(--adyen-sdk-spacer-040, 8px) + var(--adyen-sdk-spacer-070, 16px));position:relative}.adyen-checkout__address-search__manual-add{position:absolute;right:0;top:0}.adyen-checkout__address-search__manual-add .adyen-checkout__address-search__manual-add__button{border:0;padding:0}.adyen-checkout__input-icon{border-radius:var(--adyen-sdk-border-radius-s,4px);height:18px;margin-right:var(--adyen-sdk-spacer-060,12px);width:27px}.adyen-checkout__input-icon--hidden{display:none}.adyen-checkout__input-icon--no-radio-icon{margin-left:calc(var(--adyen-sdk-spacer-090, 24px)*-1)}.adyen-checkout__radio_group__label--no-radio{color:inherit;display:block;font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:400;line-height:var(--adyen-sdk-text-body-line-height,20px);margin:0;overflow:visible;padding-bottom:0;padding-left:var(--adyen-sdk-spacer-090,24px);position:relative}.adyen-checkout__radio_group__label--no-radio:hover{border-color:var(--adyen-sdk-color-label-primary,#00112c);cursor:pointer}.adyen-checkout__label--focused .adyen-checkout__radio_group__label--no-radio{color:inherit}.adyen-checkout__radio_group__label--no-radio.adyen-checkout__radio_group__label--no-radio--invalid{color:var(--adyen-sdk-color-outline-critical,#e22d2d)}.adyen-checkout__radio_group--button .adyen-checkout__radio_group__label--no-radio{background-color:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-primary,#dbdee2);border-radius:var(--adyen-sdk-border-radius-m,8px);padding:var(--adyen-sdk-spacer-060,12px);padding-left:calc(var(--adyen-sdk-spacer-060, 12px) + var(--adyen-sdk-spacer-090, 24px));width:100%}.adyen-checkout__radio_group--button .adyen-checkout__radio_group__input:checked+.adyen-checkout__radio_group__label--no-radio{border-color:var(--adyen-sdk-color-outline-primary-active,#00112c);box-shadow:0 0 0 .5px var(--adyen-sdk-color-outline-primary-active,#00112c)}.adyen-checkout__radio_group--button .adyen-checkout__radio_group__input+.adyen-checkout__radio_group__label--no-radio:hover{border-color:var(--adyen-sdk-color-outline-primary-active,#00112c)}.adyen-checkout__radio_group--button .adyen-checkout__radio_group__input:checked:active+.adyen-checkout__radio_group__label--no-radio,.adyen-checkout__radio_group--button .adyen-checkout__radio_group__input:checked:focus+.adyen-checkout__radio_group__label--no-radio{border-color:var(--adyen-sdk-color-outline-primary-active,#00112c);box-shadow:0 0 0 .5px var(--adyen-sdk-color-outline-primary-active,#00112c)}.adyen-checkout__radio_group--button .adyen-checkout__radio_group__input:checked:focus+.adyen-checkout__radio_group__label--no-radio{outline:var(--adyen-sdk-border-width-m,2px) solid var(--adyen-sdk-color-outline-primary-active,#00112c)}.adyen-checkout__radio_group--button .adyen-checkout__radio_group-extended__label-wrapper{display:flex}.adyen-checkout__radio_group--button .adyen-checkout__radio_group-extended__label-wrapper .adyen-checkout__radio_group-extended__label{width:100%}.adyen-checkout__radio_group--button .adyen-checkout__radio_group-extended__label-wrapper .adyen-checkout-input__inline-validation{display:none;margin-right:var(--adyen-sdk-spacer-000,0)}.adyen-checkout__radio_group--button .adyen-checkout__radio_group-extended__label-wrapper .adyen-checkout-input__inline-validation.adyen-checkout-input__inline-validation--valid{display:block;margin-left:var(--adyen-sdk-spacer-040,8px);margin-top:1px}@media (max-width:480px){.adyen-checkout__radio_group__input-wrapper.adyen-checkout__field--50{min-width:100%}}.adyen-checkout-form-instruction{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-caption-font-size,.75rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin-bottom:var(--adyen-sdk-spacer-070,16px);margin-top:0}[dir=rtl] .adyen-checkout-form-instruction{padding-right:0}.adyen-checkout-toggle{color:inherit;cursor:pointer;display:flex;width:auto}.adyen-checkout-toggle,.adyen-checkout-toggle *,.adyen-checkout-toggle :after,.adyen-checkout-toggle :before,.adyen-checkout-toggle:after,.adyen-checkout-toggle:before{box-sizing:border-box}.adyen-checkout-toggle--disabled{cursor:not-allowed;display:flex}.adyen-checkout-toggle--readonly{pointer-events:none}.adyen-checkout-toggle--label-first{align-items:flex-start;flex-direction:row-reverse;justify-content:flex-end}.adyen-checkout-toggle__input{cursor:inherit;opacity:0;position:absolute}.adyen-checkout-toggle__track{align-items:center;background-color:var(--adyen-sdk-toggle-track-background-color,#ffffff);border:var(--adyen-sdk-toggle-track-border,1px solid #8d95a3);border-radius:var(--adyen-sdk-toggle-track-border-radius,12px);display:flex;height:var(--adyen-sdk-toggle-track-height,20px);min-width:var(--adyen-sdk-toggle-track-width,36px);padding:var(--adyen-sdk-toggle-track-padding,2px 4px);position:relative}.adyen-checkout-toggle__input:focus-visible+.adyen-checkout-toggle__track{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--adyen-sdk-focus-ring-color,rgba(0,112,245,.8));transition:.1s cubic-bezier(.785,.135,.15,.86)}.adyen-checkout-toggle__input:hover:enabled+.adyen-checkout-toggle__track{background-color:var(--adyen-sdk-toggle-track-hover-background-color,#f7f7f8);border-color:var(--adyen-sdk-toggle-track-hover-border-color,#6d7789)}.adyen-checkout-toggle__input:active:enabled+.adyen-checkout-toggle__track{background-color:var(--adyen-sdk-toggle-track-active-background-color,#eeeff1);border-color:var(--adyen-sdk-toggle-track-active-border-color,#00112c)}.adyen-checkout-toggle__input:disabled+.adyen-checkout-toggle__track{background-color:var(--adyen-sdk-toggle-track-disabled-background-color,#f7f7f8);border-color:var(--adyen-sdk-toggle-track-disabled-border-color,#dbdee2);cursor:not-allowed}.adyen-checkout-toggle__input:disabled+.adyen-checkout-toggle__track path{fill:#8d95a3}.adyen-checkout-toggle--readonly .adyen-checkout-toggle__input+.adyen-checkout-toggle__track{background-color:var(--adyen-sdk-toggle-track-readonly-background-color,#f7f7f8);border-color:var(--adyen-sdk-toggle-track-readonly-border-color,#dbdee2)}.adyen-checkout-toggle__input:checked+.adyen-checkout-toggle__track{background-color:var(--adyen-sdk-toggle-track-toggled-background-color,#00112c);border:var(--adyen-sdk-toggle-track-toggled-border,0);padding:var(--adyen-sdk-toggle-track-toggled-padding,2px)}.adyen-checkout-toggle__input:checked:hover:enabled+.adyen-checkout-toggle__track{background-color:var(--adyen-sdk-toggle-track-toggled-hover-background-color,#5c687c)}.adyen-checkout-toggle__input:checked:active:enabled+.adyen-checkout-toggle__track{background-color:var(--adyen-sdk-toggle-track-toggled-active-background-color,#8d95a3)}.adyen-checkout-toggle__input:checked:disabled+.adyen-checkout-toggle__track{background-color:var(--adyen-sdk-toggle-track-toggled-disabled-background-color,#c0c5cc)}.adyen-checkout-toggle--readonly .adyen-checkout-toggle__input:checked+.adyen-checkout-toggle__track{background-color:var(--adyen-sdk-toggle-track-toggled-readonly-background-color,#c0c5cc)}.adyen-checkout-toggle__handle{align-content:center;background-color:var(--adyen-sdk-toggle-handle-background-color,#00112c);border-radius:var(--adyen-sdk-toggle-handle-border-radius,12px);color:var(--adyen-sdk-toggle-handle-toggled-color,#00112c);display:inline-flex;height:var(--adyen-sdk-toggle-handle-height,12px);justify-content:center;transition:var(--adyen-sdk-toggle-handle-transition,transform .15s cubic-bezier(.2,0,.4,.9));width:var(--adyen-sdk-toggle-handle-width,12px)}.adyen-checkout-toggle__input:disabled+* .adyen-checkout-toggle__handle{background-color:var(--adyen-sdk-toggle-handle-disabled-background-color,#8d95a3);cursor:not-allowed}.adyen-checkout-toggle__input:checked+* .adyen-checkout-toggle__handle{background-color:var(--adyen-sdk-toggle-handle-toggled-background-color,#ffffff);height:var(--adyen-sdk-toggle-handle-toggled-height,16px);transform:translate(100%);width:var(--adyen-sdk-toggle-handle-toggled-width,16px)}.adyen-checkout-toggle__input:checked:disabled+* .adyen-checkout-toggle__handle{background-color:var(--adyen-sdk-toggle-handle-toggled-disabled-background-color,#eeeff1);color:var(--adyen-sdk-toggle-handle-toggled-disabled-color,#8d95a3);cursor:not-allowed}.adyen-checkout-toggle--readonly .adyen-checkout-toggle__input:checked+* .adyen-checkout-toggle__handle{background-color:var(--adyen-sdk-toggle-handle-toggled-readonly-background-color,#eeeff1)}.adyen-checkout-toggle__label-container{display:flex;flex-direction:column;font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);line-height:var(--adyen-sdk-text-body-line-height,20px);padding-left:var(--adyen-sdk-toggle-label-padding,16px)}.adyen-checkout-toggle--label-first>.adyen-checkout-toggle__label-container{padding-left:0;padding-right:var(--adyen-sdk-toggle-label-padding,16px)}.adyen-checkout-toggle__label{vertical-align:baseline}.adyen-checkout-toggle__description,.adyen-checkout-toggle__label{font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);line-height:var(--adyen-sdk-text-body-line-height,20px)}.adyen-checkout-toggle__description{color:var(--adyen-sdk-toggle-description-color,#5c687c);padding-top:var(--adyen-sdk-toggle-description-padding,4px)}.adyen-checkout__modal-wrapper{align-items:center;display:flex;height:100%;left:0;overflow-y:auto;overscroll-behavior-y:contain;padding:var(--adyen-sdk-spacer-090,24px);position:fixed;top:0;visibility:hidden;width:100%;z-index:10}.adyen-checkout__modal-wrapper:before{background:#00112c80;content:\\\"\\\";height:100%;left:0;opacity:0;position:fixed;top:0;transition:opacity .3s linear;width:100%;z-index:10}.adyen-checkout__modal-wrapper--open{visibility:visible}.adyen-checkout__modal-wrapper--open .adyen-checkout__modal,.adyen-checkout__modal-wrapper--open:before{opacity:1}.adyen-checkout__modal{background-color:var(--adyen-sdk-color-background-primary,#ffffff);border-radius:var(--adyen-sdk-border-radius-m,8px);box-shadow:0 var(--adyen-sdk-spacer-040,8px) var(--adyen-sdk-spacer-090,24px) #00112c26;margin:auto;opacity:0;padding:var(--adyen-sdk-spacer-070,16px);position:relative;transition:opacity .2s ease,visibility .2s ease;z-index:11}.adyen-checkout__button{background:var(--adyen-sdk-color-background-always-dark,#00112c);border:0;border-radius:var(--adyen-sdk-border-radius-m,8px);color:var(--adyen-sdk-color-label-on-color,#ffffff);cursor:pointer;font-size:var(--adyen-sdk-text-title-font-size,1rem);font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500);height:var(--adyen-sdk-spacer-120,48px);margin:0;padding:var(--adyen-sdk-spacer-060,12px) var(--adyen-sdk-spacer-000,0);text-decoration:none;transition:background .3s ease-out,box-shadow .3s ease-out;width:100%}.adyen-checkout__button:focus{box-shadow:0 0 0 1px var(--adyen-sdk-color-outline-tertiary,#8d95a3);outline:0}.adyen-checkout__button:hover{background:var(--adyen-sdk-color-background-inverse-primary-hover,#5c687c);box-shadow:0 0,0 var(--adyen-sdk-spacer-010,2px) var(--adyen-sdk-spacer-020,4px) -1px #0003,0 var(--adyen-sdk-spacer-020,4px) 5px 0 #00000024}.adyen-checkout__button:active{background:var(--adyen-sdk-color-background-always-dark-active,#8d95a3)}.adyen-checkout__button:hover:focus{box-shadow:0 0 0 var(--adyen-sdk-spacer-010,2px) var(--adyen-sdk-color-outline-tertiary,#8d95a3),0 3px var(--adyen-sdk-spacer-020,4px) #000f2d33}.adyen-checkout__button:disabled,.adyen-checkout__button:disabled:hover{box-shadow:none;cursor:not-allowed;opacity:.4;-webkit-user-select:all;-moz-user-select:all;user-select:all}.adyen-checkout__button.adyen-checkout__button--loading{background:var(--adyen-sdk-color-label-disabled,#8d95a3);box-shadow:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.adyen-checkout__button.adyen-checkout__button--pay{display:flex;justify-content:center;margin-top:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__button.adyen-checkout__button--pay:disabled{opacity:.4}.adyen-checkout__button.adyen-checkout__button--standalone{margin-top:0}.adyen-checkout__button.adyen-checkout__button--inline{display:block;font-size:.81em;height:auto;padding:var(--adyen-sdk-spacer-050,10px) var(--adyen-sdk-spacer-040,8px);width:auto}.adyen-checkout__button.adyen-checkout__button--ghost{background:none;border:0;color:var(--adyen-sdk-color-label-primary,#00112c)}.adyen-checkout__button.adyen-checkout__button--ghost .adyen-checkout__spinner:before{border-color:var(--adyen-sdk-color-background-inverse-primary,#00112c);border-top-color:transparent;opacity:.1}.adyen-checkout__button.adyen-checkout__button--ghost .adyen-checkout__spinner:after{border-color:transparent;border-top-color:var(--adyen-sdk-color-outline-primary-active,#00112c)}.adyen-checkout__button.adyen-checkout__button--ghost:hover{background:var(--adyen-sdk-color-background-secondary-hover,#eeeff1);box-shadow:none}.adyen-checkout__button.adyen-checkout__button--ghost:active{background:var(--adyen-sdk-color-background-secondary-active,#e3e5e9);box-shadow:none}.adyen-checkout__button.adyen-checkout__button--secondary{background:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-label-primary,#00112c);color:var(--adyen-sdk-color-label-primary,#00112c);padding:var(--adyen-sdk-spacer-050,10px) var(--adyen-sdk-spacer-060,12px)}.adyen-checkout__button.adyen-checkout__button--secondary .adyen-checkout__spinner:before{border-color:var(--adyen-sdk-color-background-inverse-primary,#00112c);border-top-color:transparent;opacity:.1}.adyen-checkout__button.adyen-checkout__button--secondary .adyen-checkout__spinner:after{border-color:transparent;border-top-color:var(--adyen-sdk-color-outline-primary-active,#00112c)}.adyen-checkout__button.adyen-checkout__button--secondary:hover{background:var(--adyen-sdk-color-background-secondary,#f7f7f8);box-shadow:0 var(--adyen-sdk-spacer-010,2px) var(--adyen-sdk-spacer-020,4px) #1b2a3c33,0 var(--adyen-sdk-spacer-020,4px) 5px #1b2a3c24}.adyen-checkout__button.adyen-checkout__button--secondary:active,.adyen-checkout__button.adyen-checkout__button--secondary:active:hover{background:var(--adyen-sdk-color-background-secondary,#f7f7f8);box-shadow:none}.adyen-checkout__button.adyen-checkout__button--secondary:focus{box-shadow:0 0 0 .5px var(--adyen-sdk-color-outline-tertiary,#8d95a3);outline:0}.adyen-checkout__button.adyen-checkout__button--secondary:disabled,.adyen-checkout__button.adyen-checkout__button--secondary:disabled:hover{background-color:var(--adyen-sdk-color-background-secondary,#f7f7f8);border-color:var(--adyen-sdk-color-outline-disabled,#dbdee2);box-shadow:none;cursor:not-allowed;opacity:.5;-webkit-user-select:all;-moz-user-select:all;user-select:all}.adyen-checkout__button.adyen-checkout__button--action{background:var(--adyen-sdk-color-background-always-dark,#00112c);border:var(--adyen-sdk-border-width-s,1px) solid transparent;color:var(--adyen-sdk-color-label-on-color,#ffffff);padding:var(--adyen-sdk-spacer-050,10px) var(--adyen-sdk-spacer-060,12px)}.adyen-checkout__button.adyen-checkout__button--action:hover{background:var(--adyen-sdk-color-background-inverse-primary-hover,#5c687c);box-shadow:none}.adyen-checkout__button.adyen-checkout__button--action:active,.adyen-checkout__button.adyen-checkout__button--action:active:hover{background:var(--adyen-sdk-color-background-always-dark-active,#8d95a3);box-shadow:none}.adyen-checkout__button.adyen-checkout__button--link{background:transparent;border:var(--adyen-sdk-border-width-s,1px) solid transparent;border-radius:var(--adyen-sdk-border-radius-s,4px);color:var(--adyen-sdk-color-label-highlight,#0070f5);font-weight:var(--adyen-sdk-text-body-font-weight,400);padding:var(--adyen-sdk-spacer-010,2px);text-decoration:none}.adyen-checkout__button.adyen-checkout__button--link:hover{background:transparent;box-shadow:none;text-decoration:underline}.adyen-checkout__button.adyen-checkout__button--completed,.adyen-checkout__button.adyen-checkout__button--completed:active,.adyen-checkout__button.adyen-checkout__button--completed:active:hover,.adyen-checkout__button.adyen-checkout__button--completed:hover{background:var(--adyen-sdk-color-label-success,#07893c);color:var(--adyen-sdk-color-label-on-color,#ffffff)}.adyen-checkout__button.adyen-checkout__button--completed .adyen-checkout__button__icon{filter:brightness(0) invert(1)}.adyen-checkout__button__content{align-items:center;display:flex;height:100%;justify-content:center}.adyen-checkout__button__icon{margin-right:var(--adyen-sdk-spacer-040,8px)}[dir=rtl] .adyen-checkout__button__icon{margin-left:var(--adyen-sdk-spacer-040,8px);margin-right:0}.adyen-checkout__button__text{display:block;justify-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.adyen-checkout__button__text--sr-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.adyen-checkout__button .adyen-checkout__spinner:before{border-color:var(--adyen-sdk-color-label-on-color,#ffffff);border-top-color:transparent;opacity:.1}.adyen-checkout__button .adyen-checkout__spinner:after{border-color:transparent;border-top-color:var(--adyen-sdk-color-label-on-color,#ffffff)}.adyen-checkout-card-fastlane__modal{margin-bottom:var(--adyen-sdk-spacer-070,16px);max-width:372px}.adyen-checkout-card-fastlane__modal-section{-moz-column-gap:var(--adyen-sdk-spacer-070,16px);column-gap:var(--adyen-sdk-spacer-070,16px);display:grid;grid-template-areas:\\\"image header\\\" \\\". text\\\";grid-template-columns:auto 1fr;grid-template-rows:auto;margin-bottom:var(--adyen-sdk-spacer-060,12px);place-items:start}.adyen-checkout-card-fastlane__modal-section-image{grid-area:image;place-self:center}.adyen-checkout-card-fastlane__modal-section-header{color:var(--adyen-sdk-color-background-inverse-primary,#00112c);font-size:var(--adyen-sdk-text-title-m-font-size,1.25rem);font-weight:var(--adyen-sdk-text-title-m-font-weight,600);grid-area:header;line-height:var(--adyen-sdk-text-title-m-line-height,30px);margin:0}.adyen-checkout-card-fastlane__modal-section-text{color:var(--adyen-sdk-color-background-inverse-primary,#00112c);font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);grid-area:text;line-height:var(--adyen-sdk-text-body-line-height,20px)}.adyen-checkout-card-fastlane__modal-brand{height:23px;margin-top:var(--adyen-sdk-spacer-040,8px);width:168px}.adyen-checkout-card-fastlane__modal-button-container{display:flex;flex-direction:row-reverse;margin-bottom:var(--adyen-sdk-spacer-060,12px)}.adyen-checkout-card-fastlane__modal-button-container>button{line-height:0}.adyen-checkout-card__fastlane{align-items:center;background:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-primary,#dbdee2);border-radius:var(--adyen-sdk-border-radius-m,8px);margin-top:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout-card__fastlane,[dir=rtl] .adyen-checkout-card__fastlane{padding:var(--adyen-sdk-spacer-060,12px) var(--adyen-sdk-spacer-070,16px)}.adyen-checkout-card__fastlane-consent-toggle{display:flex}.adyen-checkout-card__fastlane-consent-text,.adyen-checkout-card__fastlane-consent-toggle--active{margin-bottom:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout-card__fastlane-consent-text{font-size:var(--adyen-sdk-text-caption-font-size,.75rem);font-weight:var(--adyen-sdk-text-caption-font-weight,400);line-height:var(--adyen-sdk-text-caption-line-height,18px)}.adyen-checkout-card__fastlane-brand{height:23px;width:168px}.adyen-checkout__button.adyen-checkout__button--fastlane-info-modal{height:20px;line-height:0;margin-left:var(--adyen-sdk-spacer-020,4px);padding:0;vertical-align:bottom;width:20px}.adyen-checkout-ctp__otp-resend-code-wrapper{line-height:var(--adyen-sdk-text-body-line-height,20px);margin-left:auto;position:absolute;right:0;top:0}.adyen-checkout-ctp__otp-resend-code--confirmation,.adyen-checkout-ctp__otp-resend-code--disabled{color:var(--adyen-sdk-color-label-tertiary,#5c687c);cursor:default;font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);margin-left:auto;pointer-events:none}.adyen-checkout-ctp__otp-resend-code--confirmation{align-items:center;display:flex}.adyen-checkout-ctp__otp-resend-code--confirmation>img{margin-left:var(--adyen-sdk-spacer-020,4px)}.adyen-checkout-ctp__otp-resend-code-counter{color:var(--adyen-sdk-color-label-primary,#00112c);cursor:default;display:inline-block;font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);margin-left:auto;text-align:right}.adyen-checkout-ctp__section>.adyen-checkout__field.adyen-checkout__field--otp{margin-bottom:var(--adyen-sdk-spacer-060,12px)}.adyen-checkout-ctp__otp-field-wrapper{position:relative}.adyen_checkout-ctp__brand-wrapper{align-items:center;display:flex;height:18px}.adyen_checkout-ctp__brand-logo{margin-right:var(--adyen-sdk-spacer-030,6px);width:var(--adyen-sdk-spacer-090,24px)}.adyen_checkout-ctp__brand-pipe{height:15px;margin-right:var(--adyen-sdk-spacer-030,6px)}.adyen_checkout-ctp__brand-scheme{margin-right:var(--adyen-sdk-spacer-030,6px);-o-object-fit:none;object-fit:none}.adyen_checkout-ctp__brand-scheme-mc{width:27px}.adyen_checkout-ctp__brand-scheme-visa{width:35px}.adyen-checkout__ctp-modal-header-image{display:block;margin:auto}.adyen-checkout__ctp-modal-title{font-size:var(--adyen-sdk-text-title-m-font-size,1.25rem);font-weight:700;line-height:var(--adyen-sdk-spacer-090,24px);margin:0 0 var(--adyen-sdk-spacer-060,12px);padding:0}.adyen-checkout__ctp-modal-text{font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin-bottom:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__ctp-modal-benefits{margin-left:0;padding-left:var(--adyen-sdk-spacer-080,20px)}.adyen-checkout__ctp-modal-benefits li{list-style:disc;margin-bottom:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__modal-wrapper--ctp .adyen-checkout__modal{max-width:464px}.adyen_checkout-ctp__brand-wrapper--popup{justify-content:center;margin-bottom:var(--adyen-sdk-spacer-090,24px)}.adyen-web__ctp-info-button{background-color:transparent;border:0;cursor:pointer;padding:0}.adyen-checkout__button--section-logout-button{margin-left:auto}.adyen-checkout__button--section-logout-button--disabled{color:var(--adyen-sdk-color-label-disabled,#8d95a3);pointer-events:none}.adyen-checkout-ctp__section{background-color:#fff;border-radius:var(--adyen-sdk-spacer-060,12px);box-shadow:0 6px 12px #00112c14,0 2px 4px #00112c0a;padding:var(--adyen-sdk-spacer-070,16px);position:relative}.adyen-checkout-ctp__section-brand{align-items:center;display:flex;height:18px;margin-bottom:16px}.adyen-checkout-ctp__section--standalone{all:unset}.adyen-checkout-ctp__section .adyen-checkout__fieldset{margin-bottom:var(--adyen-sdk-spacer-090,24px)}.adyen-checkout-ctp__section-header{align-items:center;display:flex}.adyen-checkout-ctp__section-header-title{font-size:var(--adyen-sdk-text-title-font-size,1rem);font-weight:var(--adyen-sdk-text-title-font-weight,600);line-height:22px;margin:0;padding:0;width:auto}@media screen and (max-width:400px){.adyen-checkout-ctp__section-header-title{font-size:var(--adyen-sdk-text-body-font-size,.875rem)}}.adyen-checkout-ctp__section-header-adornment{margin-left:5px}.adyen-checkout-ctp__section-text{color:var(--adyen-sdk-color-label-tertiary,#5c687c);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin:0 0 var(--adyen-sdk-spacer-070,16px)}.adyen-checkout-ctp__section-text,.adyen-checkout-ctp__separator{font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400)}.adyen-checkout-ctp__separator{color:var(--adyen-sdk-color-label-primary,#00112c)}.adyen-checkout-ctp__otp-subtitle--highlighted{color:var(--adyen-sdk-color-label-primary,#00112c);font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500)}.adyen-checkout-ctp__otp-checkbox-container{background-color:#f7f8f9;border-radius:var(--adyen-sdk-border-radius-s,4px);margin-bottom:var(--adyen-sdk-spacer-070,16px);padding:var(--adyen-sdk-spacer-060,12px)}.adyen-checkout-ctp__otp-checkbox-container--checked{background-color:#f2f8ff}.adyen-checkout-ctp__otp-checkbox-container label{cursor:pointer}.adyen-checkout-ctp__section .adyen-checkout__field.adyen-checkout-ctp__otp-checkbox-container{margin-bottom:var(--adyen-sdk-spacer-020,4px)}.adyen-checkout-ctp__otp-checkbox-info{color:#707070;font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);line-height:var(--adyen-sdk-text-body-line-height,20px);margin:var(--adyen-sdk-spacer-020,4px) 0 0}.adyen-checkout-ctp__otp-readmore-button{all:unset;color:#0075ff;cursor:pointer;text-transform:lowercase}.adyen-checkout-ctp__card-list-single-card{align-items:center;background-color:var(--adyen-sdk-color-background-secondary,#f7f7f8);border-radius:var(--adyen-sdk-spacer-030,6px);display:flex;font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);height:var(--adyen-sdk-spacer-110,40px);line-height:var(--adyen-sdk-text-caption-line-height,18px);padding:var(--adyen-sdk-spacer-060,12px)}.adyen-checkout-ctp__card-list-single-card-expired{color:var(--adyen-sdk-color-label-tertiary,#5c687c);text-decoration:line-through}.adyen-checkout-ctp__expired-label{color:var(--adyen-sdk-color-label-tertiary,#5c687c);font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500);line-height:17px;margin-left:auto}.adyen-checkout-ctp__card-image{border-radius:3px;height:24px;margin-right:var(--adyen-sdk-spacer-040,8px)}.checkout-secondary-button__text{font-size:.85em;margin-left:5px;margin-top:1px}.adyen-checkout-ctp__cards-list-dropdown .adyen-checkout__dropdown__element--disabled{opacity:1}.adyen-checkout-ctp__cards-list-dropdown .adyen-checkout__dropdown__element--disabled .adyen-checkout__dropdown__element__text{margin:0;opacity:.4;text-decoration:line-through}.adyen-checkout-ctp__cards-list-dropdown .adyen-checkout__dropdown__element--disabled .adyen-checkout__dropdown__element__secondary-text{color:var(--adyen-sdk-color-label-tertiary,#5c687c);font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500);line-height:17px}.adyen-checkout-ctp__cards-list-dropdown .adyen-checkout__dropdown__button--disabled{opacity:1}.adyen-checkout-ctp__cards-list-dropdown .adyen-checkout__dropdown__button--disabled .adyen-checkout__dropdown__button__text{opacity:.4;text-decoration:line-through}.adyen-checkout-ctp__cards-list-dropdown .adyen-checkout__dropdown__button--disabled .adyen-checkout__dropdown__button__secondary-text{color:var(--adyen-sdk-color-label-tertiary,#5c687c);font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500);opacity:1}.adyen-checkout__iframe{border:0}.adyen-checkout-ctp__card{background-color:#fff;border:none;border-radius:var(--adyen-sdk-spacer-020,4px);box-shadow:0 0 0 var(--adyen-sdk-spacer-010,2px) #999595;cursor:pointer;height:var(--adyen-sdk-spacer-110,40px);margin:0;margin-bottom:var(--adyen-sdk-spacer-080,20px);width:100%}.adyen-checkout-ctp__empty-cards{align-items:center;background-color:var(--adyen-sdk-color-background-secondary,#f7f7f8);border-radius:var(--adyen-sdk-spacer-030,6px);color:var(--adyen-sdk-color-label-tertiary,#5c687c);display:flex;font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);height:var(--adyen-sdk-spacer-110,40px);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin-bottom:var(--adyen-sdk-spacer-090,24px);padding:var(--adyen-sdk-spacer-060,12px) var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__iframe--ctpIframe{pointer-events:auto}.adyen-checkout__iframe--ctpIframe-hidden{display:none}@keyframes card-bounce{0%{animation-timing-function:cubic-bezier(.17,.17,.32,1);-webkit-translate:0 -60%;-moz-translate:0 -60%;-ms-translate:0 -60%;translate:0 -60%}9.70874%{animation-timing-function:cubic-bezier(.41,0,.49,1);-webkit-translate:0 8.5%;-moz-translate:0 8.5%;-ms-translate:0 8.5%;translate:0 8.5%}23.4466%{animation-timing-function:cubic-bezier(.29,0,.26,1);-webkit-translate:0 -22.5%;-moz-translate:0 -22.5%;-ms-translate:0 -22.5%;translate:0 -22.5%}47.7184%{-webkit-translate:0;-moz-translate:0;-ms-translate:0;translate:0}63.8835%{animation-timing-function:cubic-bezier(1,0,.78,1);-webkit-translate:0;-moz-translate:0;-ms-translate:0;translate:0}86.5534%{-webkit-translate:0 40.7%;-moz-translate:0 40.7%;-ms-translate:0 40.7%;translate:0 40.7%}to{-webkit-translate:0 40.7%;-moz-translate:0 40.7%;-ms-translate:0 40.7%;translate:0 40.7%}}@keyframes card-fade-100{0%{animation-timing-function:linear;opacity:0}8.1068%{opacity:1}78.4466%{opacity:1}86.5534%{opacity:0}to{opacity:0}}@keyframes card-fade-60{0%{animation-timing-function:linear;opacity:0}8.1068%{opacity:.6}78.4466%{opacity:.6}86.5534%{opacity:0}to{opacity:0}}@keyframes card-fade-20{0%{animation-timing-function:linear;opacity:0}8.1068%{opacity:.2}78.4466%{opacity:.2}86.5534%{opacity:0}to{opacity:0}}.adyen-checkout-ctp__card-animation{aspect-ratio:1/.438;filter:grayscale(1);margin:40px auto 50px;max-width:100%;position:relative;width:140px}.adyen-checkout-ctp__card-animation>.adyen-checkout-ctp__card-animation-layer{background-size:contain!important;height:100%;opacity:0;position:absolute;width:100%}.adyen-checkout-ctp__card-animation>.adyen-checkout-ctp__card-animation-layer:first-of-type{animation:card-bounce 2.06s linear infinite both,card-fade-100 2.06s linear infinite both;animation-delay:.1s;background:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1064' height='466' fill='none'%3E%3Cpath fill='%23fff' fill-rule='evenodd' d='m895.31 228.862-46.416-10.988c-1.172-.381-2.528-.481-3.565-.203-1.582.424-1.825 1.567-.543 2.554.676.52 1.641.893 2.634 1.067l42.816 10.545-.537 21.742-2.328.624-6.897 1.848 1.146-20.056q.002-.019.003-.037h.005c.061-.536-.274-1.054-.864-1.494-.563-.447-1.399-.831-2.462-1.065l-.003.001-.072-.016-46.587-10.849-.032-.008c-1.18-.39-2.554-.496-3.601-.215l-16.926 4.535c-1.582.424-1.825 1.568-.542 2.555.389.299.859.593 1.407.742l44.453 10.938-.526 19.429c-.021.101.234 2.007-2.662 2.783l-22.831 6.118c-3.105.832-7.644.01-10.253-1.998l-32.227-24.8c-2.271-1.748-2.029-4.233 1.146-5.083l14.204-3.806c1.674-.449 1.938-1.481.58-2.526s-3.556-1.501-5.23-1.053l-14.297 3.879c-6.795 1.82-6.817 6.539-2.199 10.093l32.275 24.837c4.972 3.826 14.615 5.636 20.567 4.042l22.824-6.116c1.151-.309 2.067-.696 2.797-1.118q.156-.091.301-.183c2.32-1.48 2.521-3.296 2.528-3.671l1.19-21.406c.081-.992-1.14-2.073-3.289-2.548l-.003.002-.072-.017-39.385-9.196 7.065-1.893 2.329-.624 41.998 10.256-.496 22.836q0 .01.093.032c.113.304.361.618.75.918 1.283.987 3.605 1.443 5.187 1.02l16.925-4.535c1.048-.281 1.507-.878 1.326-1.536l1.612-23.779.002-.037.005-.001c.123-1.083-1.369-2.092-3.323-2.539'/%3E%3Cpath stroke='%23fff' d='m895.31 228.862-46.416-10.988c-1.172-.381-2.528-.481-3.565-.203-1.582.424-1.825 1.567-.543 2.554.676.52 1.641.893 2.634 1.067l42.816 10.545-.537 21.742-2.328.624-6.897 1.848 1.146-20.056q.002-.019.003-.037h.005c.061-.536-.274-1.054-.864-1.494-.563-.447-1.399-.831-2.462-1.065l-.003.001-.072-.016-46.587-10.849-.032-.008c-1.18-.39-2.554-.496-3.601-.215l-16.926 4.535c-1.582.424-1.825 1.568-.542 2.555.389.299.859.593 1.407.742l44.453 10.938-.526 19.429c-.021.101.234 2.007-2.662 2.783l-22.831 6.118c-3.105.832-7.644.01-10.253-1.998l-32.227-24.8c-2.271-1.748-2.029-4.233 1.146-5.083l14.204-3.806c1.674-.449 1.938-1.481.58-2.526s-3.556-1.501-5.23-1.053l-14.297 3.879c-6.795 1.82-6.817 6.539-2.199 10.093l32.275 24.837c4.972 3.826 14.615 5.636 20.567 4.042l22.824-6.116c1.151-.309 2.067-.696 2.797-1.118q.156-.091.301-.183c2.32-1.48 2.521-3.296 2.528-3.671l1.19-21.406c.081-.992-1.14-2.073-3.289-2.548l-.003.002-.072-.017-39.385-9.196 7.065-1.893 2.329-.624 41.998 10.256-.496 22.836q0 .01.093.032c.113.304.361.618.75.918 1.283.987 3.605 1.443 5.187 1.02l16.925-4.535c1.048-.281 1.507-.878 1.326-1.536l1.612-23.779.002-.037.005-.001c.123-1.083-1.369-2.092-3.323-2.539'/%3E%3Cpath fill='%23fff' fill-opacity='.9' fill-rule='evenodd' d='M418.95 242.813c-1.166.08-3.042-.372-4.121-.994-.702-.405-.941-.755-1.527-2.243-2.373-6.017-6.517-11.028-13.679-16.54-6.921-5.325-13.863-9.053-24.178-12.987-2.215-.844-4.182-1.652-4.368-1.795-.687-.528-.979-1.482-.612-1.986.505-.691 2.349-1.081 3.824-.809.567.103 2.521.743 4.345 1.421 7.215 2.687 13.99 5.937 20.009 9.598 3.723 2.267 9.803 6.823 12.219 9.164 4.462 4.317 7.493 8.422 9.4 12.73 1.153 2.604 1.269 3.77.4 4.003a2.4 2.4 0 0 0-.548.23c-.132.08-.653.173-1.164.208m-16.069-.701c-1.791.122-4.29-.719-4.965-1.671-.163-.23-.697-1.349-1.19-2.485-2.083-4.815-6.346-9.43-12.427-13.455-4.994-3.305-8.797-5.218-15.392-7.737-4.424-1.69-4.929-2-5.087-3.117-.146-1.06 1.961-1.804 4.061-1.431 1.457.258 8.467 2.972 11.969 4.634 11.594 5.498 19.993 12.484 23.913 19.889 2.008 3.792 1.779 5.192-.882 5.373m-16.492-.659c-1.224-.015-2.768-.406-3.758-.951-.603-.332-.912-.797-1.614-2.437-2.575-6.024-8.768-10.833-18.898-14.676-4.447-1.688-5.038-2.104-4.718-3.324.158-.605.358-.757 1.34-1.02 1.642-.44 3.175-.146 7.121 1.365 6.068 2.325 10.298 4.621 14.525 7.881 4.345 3.352 6.465 5.882 8.069 9.62.915 2.141.839 2.79-.389 3.282-.375.149-1.131.266-1.678.26m-15.379-.611c-.949.006-2.546-.385-3.476-.851-1.035-.519-1.424-1.045-1.796-2.434-.477-1.786-1.147-2.632-3.558-4.488s-3.719-2.531-6.931-3.584c-1.089-.356-2.302-.809-2.698-1.003-1.658-.818-1.914-2.296-.508-2.936 1.187-.544 2.67-.406 5.617.522 8.533 2.685 14.934 7.611 15.941 12.27.357 1.645-.521 2.495-2.591 2.504'/%3E%3Crect width='110' height='74' fill='url(%23a)' rx='10' transform='matrix(.96593 -.25882 .7925 .60987 199.717 245.906)'/%3E%3Cg stroke='%23000' stroke-opacity='.8' stroke-width='2'%3E%3Cpath d='m233.447 236.868 46.846 36.05c.876.673.72 1.451-.347 1.737l-31.799 8.521M266.657 262.424l-33.731 9.038m17.126-21.816-33.73 9.038m115.215 13.423-46.846-36.05c-.875-.673-.72-1.451.347-1.737l31.799-8.52M298.327 246.551l33.731-9.038m-17.126 21.816 33.731-9.038'/%3E%3Crect width='112' height='76' x='-1.758' y='-.351' rx='11' style='mix-blend-mode:soft-light' transform='matrix(.96593 -.25882 .7925 .60987 199.935 245.314)'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='a' x1='-12.604' x2='99.193' y1='0' y2='88.114' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23fff'/%3E%3Cstop offset='.484' stop-color='%23b3b3b3'/%3E%3Cstop offset='1' stop-color='%23fff'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E\\\") 0 0 no-repeat,url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1064' height='466' fill='none'%3E%3Cg clip-path='url(%23a)'%3E%3Crect width='728' height='455' fill='url(%23b)' rx='24' transform='matrix(.96593 -.25882 .7925 .60987 0 188.42)'/%3E%3Cg fill='%23033783'%3E%3Cpath fill-opacity='.2' d='M638.209-50.009C376.564 99.506 477.408 320.518 560.535 412.335L1063.78 277.49z'/%3E%3Cpath fill-opacity='.4' d='M711.119 6.099C494.132 130.043 577.63 313.21 646.503 389.3l417.277-111.81z'/%3E%3C/g%3E%3Cpath fill='%23003780' d='M791.162 67.695C624.04 163.343 688.839 304.87 742.129 363.677l321.651-86.187z'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='b' x1='72.545' x2='249.224' y1='26.435' y2='498.002' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%233382ea'/%3E%3Cstop offset='1' stop-color='%23003ea9'/%3E%3C/linearGradient%3E%3CclipPath id='a'%3E%3Crect width='728' height='455' fill='%23fff' rx='24' transform='matrix(.96593 -.25882 .7925 .60987 0 188.42)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E\\\") 0 0 no-repeat;opacity:1;z-index:3}.adyen-checkout-ctp__card-animation>.adyen-checkout-ctp__card-animation-layer:nth-of-type(2){animation:card-bounce 2.06s linear infinite both,card-fade-60 2.06s linear infinite both;animation-delay:50ms;opacity:.6;transform:translateY(25%);z-index:2}.adyen-checkout-ctp__card-animation>.adyen-checkout-ctp__card-animation-layer:nth-of-type(2),.adyen-checkout-ctp__card-animation>.adyen-checkout-ctp__card-animation-layer:nth-of-type(3){background:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1064' height='466' fill='none'%3E%3Cg clip-path='url(%23a)'%3E%3Crect width='728' height='455' fill='url(%23b)' rx='24' transform='matrix(.96593 -.25882 .7925 .60987 0 188.42)'/%3E%3Cg fill='%23033783'%3E%3Cpath fill-opacity='.2' d='M638.209-50.009C376.564 99.506 477.408 320.518 560.535 412.335L1063.78 277.49z'/%3E%3Cpath fill-opacity='.4' d='M711.119 6.099C494.132 130.043 577.63 313.21 646.503 389.3l417.277-111.81z'/%3E%3C/g%3E%3Cpath fill='%23003780' d='M791.162 67.695C624.04 163.343 688.839 304.87 742.129 363.677l321.651-86.187z'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='b' x1='72.545' x2='249.224' y1='26.435' y2='498.002' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%233382ea'/%3E%3Cstop offset='1' stop-color='%23003ea9'/%3E%3C/linearGradient%3E%3CclipPath id='a'%3E%3Crect width='728' height='455' fill='%23fff' rx='24' transform='matrix(.96593 -.25882 .7925 .60987 0 188.42)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E\\\") 0 0 no-repeat}.adyen-checkout-ctp__card-animation>.adyen-checkout-ctp__card-animation-layer:nth-of-type(3){animation:card-bounce 2.06s linear infinite both,card-fade-20 2.06s linear infinite both;opacity:.2;transform:translateY(50%);z-index:1}.adyen-checkout-ctp__loading-subtitle{font-size:var(--adyen-sdk-text-subtitle-font-size,1rem);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin:0 auto 58px;max-width:280px;text-align:center}.adyen-checkout-ctp__section>.adyen-checkout__field.adyen-checkout__field--shopperLogin{margin-bottom:var(--adyen-sdk-spacer-080,20px)}.adyen-checkout__content-separator{align-items:center;color:var(--adyen-sdk-color-label-primary,#00112c);display:flex;font-size:var(--adyen-sdk-text-body-font-size,.875rem);justify-content:center;line-height:var(--adyen-sdk-text-caption-line-height,18px);margin-bottom:var(--adyen-sdk-spacer-070,16px);margin-top:var(--adyen-sdk-spacer-070,16px);text-transform:capitalize;white-space:nowrap}.adyen-checkout__content-separator:after,.adyen-checkout__content-separator:before{border-bottom:1px solid var(--adyen-sdk-color-separator-primary,#dbdee2);content:\\\"\\\";flex:1}.adyen-checkout__content-separator:after{margin-left:var(--adyen-sdk-spacer-080,20px)}.adyen-checkout__content-separator:before{margin-right:var(--adyen-sdk-spacer-080,20px)}[class^=adyen-checkout],[class^=adyen-checkout] *,[class^=adyen-checkout] :after,[class^=adyen-checkout] :before,[class^=adyen-checkout]:after,[class^=adyen-checkout]:before{box-sizing:border-box}.adyen-checkout__threeds2__challenge,.adyen-checkout__threeds2__challenge-container{background-color:transparent;display:block;height:inherit;min-height:400px;overflow:hidden;position:relative;width:100%}.adyen-checkout__threeds2__challenge--01,.adyen-checkout__threeds2__challenge--01 .adyen-checkout__iframe--threeDSIframe{height:400px;width:250px}.adyen-checkout__threeds2__challenge--02,.adyen-checkout__threeds2__challenge--02 .adyen-checkout__iframe--threeDSIframe{height:400px;width:390px}.adyen-checkout__threeds2__challenge--03,.adyen-checkout__threeds2__challenge--03 .adyen-checkout__iframe--threeDSIframe{height:600px;width:500px}.adyen-checkout__threeds2__challenge--04,.adyen-checkout__threeds2__challenge--04 .adyen-checkout__iframe--threeDSIframe{height:400px;width:600px}.adyen-checkout__threeds2__challenge--05,.adyen-checkout__threeds2__challenge--05 .adyen-checkout__iframe--threeDSIframe{height:100%;width:100%}.adyen-checkout__iframe--threeDSIframe{border:0;left:0;position:absolute;top:0}.adyen-checkout__threeds2-challenge-error .adyen-checkout__status__icon{display:block;margin:var(--adyen-sdk-spacer-130,56px) auto var(--adyen-sdk-spacer-100,32px)}.adyen-checkout__threeds2-challenge-error .adyen-checkout__status__text{color:var(--adyen-sdk-color-label-critical,#c72727);font-size:var(--adyen-sdk-text-title-font-size,1rem);margin-bottom:var(--adyen-sdk-spacer-130,56px);text-align:center}.adyen-checkout__bacs--confirm{position:relative}.adyen-checkout__bacs--confirm .adyen-checkout-input__inline-validation--valid{display:none}.adyen-checkout__bacs .adyen-checkout__field--inactive{pointer-events:none}.adyen-checkout__bacs .adyen-checkout__bacs--edit{cursor:pointer;position:absolute;right:0;top:0}.adyen-checkout__bacs .adyen-checkout__bacs--edit-dropin{top:-50px}.adyen-checkout__bacs .adyen-checkout__bacs--edit .adyen-checkout__bacs--edit-button{background:none;border:none;color:var(--adyen-sdk-color-label-primary,#00112c);cursor:pointer;padding:0;text-align:end;text-decoration:underline}.adyen-checkout__voucher-result{border-radius:var(--adyen-sdk-border-radius-m,8px);position:relative;text-align:center}.adyen-checkout__voucher-result__bottom,.adyen-checkout__voucher-result__top{background:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-separator-primary,#dbdee2)}.adyen-checkout__voucher-result__top{border-bottom:0;border-radius:var(--adyen-sdk-border-radius-m,8px) var(--adyen-sdk-border-radius-m,8px) 0 0;padding:var(--adyen-sdk-spacer-110,40px) 0 var(--adyen-sdk-spacer-090,24px)}.adyen-checkout__voucher-result__bottom{border-radius:0 0 var(--adyen-sdk-border-radius-m,8px) var(--adyen-sdk-border-radius-m,8px);border-top:0}.adyen-checkout__voucher-result__separator{align-items:center;background:var(--adyen-sdk-color-background-primary,#ffffff);display:flex;margin:0 auto;position:relative}.adyen-checkout__voucher-result__separator__inner{border-top:1px solid var(--adyen-sdk-color-separator-primary,#dbdee2);width:100%}.adyen-checkout__voucher-result__image{align-items:center;display:flex;justify-content:center;margin-bottom:var(--adyen-sdk-spacer-110,40px);width:100%}.adyen-checkout-link--voucher-result-instructions{display:inline-block}.adyen-checkout__voucher-result__image__wrapper{display:block;height:var(--adyen-sdk-spacer-120,48px);margin:0 var(--adyen-sdk-spacer-090,24px);position:relative}.adyen-checkout__voucher-result__image__wrapper:after{border-radius:var(--adyen-sdk-border-radius-m,8px);box-shadow:var(--adyen-sdk-shadow-low,0 2px 4px rgba(0,17,44,.04),0 1px 2px rgba(0,17,44,.02));content:\\\"\\\";height:100%;left:0;position:absolute;top:0;width:100%}.adyen-checkout__voucher-result__image__wrapper:nth-child(2){margin-left:0}.adyen-checkout__voucher-result__image__brand,.adyen-checkout__voucher-result__image__issuer{border-radius:var(--adyen-sdk-border-radius-m,8px);height:var(--adyen-sdk-spacer-120,48px)}.adyen-checkout__voucher-result__introduction{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-body-font-size,.875rem);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin:0 auto;max-width:400px;text-align:center}.adyen-checkout__voucher-result__amount{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-subtitle-font-size,1rem);font-weight:700;margin:var(--adyen-sdk-spacer-090,24px) auto 0;text-align:center}.adyen-checkout__voucher-result__surcharge{color:var(--adyen-sdk-color-label-secondary,#5c687c);font-size:var(--adyen-sdk-text-body-font-size,.875rem);text-align:center}.adyen-checkout__voucher-result__code__label,.adyen-checkout__voucher-result__surcharge{display:block;font-weight:400;line-height:var(--adyen-sdk-text-caption-line-height,18px)}.adyen-checkout__voucher-result__code__label{left:0;margin:0 auto;position:absolute;right:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto}.adyen-checkout__voucher-result__code__label:before{content:\\\"\\\";position:absolute}.adyen-checkout__voucher-result__code__label__text{background:var(--adyen-sdk-color-background-primary,#ffffff);color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-body-font-size,.875rem);letter-spacing:normal;line-height:1;padding:0 var(--adyen-sdk-spacer-040,8px)}.adyen-checkout__voucher-result__code__barcode{display:block;height:var(--adyen-sdk-spacer-130,56px);margin:0 auto var(--adyen-sdk-spacer-040,8px);max-width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.adyen-checkout__voucher-result__code{border-width:1px 0;color:var(--adyen-sdk-color-label-primary,#00112c);display:inline-block;font-size:var(--adyen-sdk-text-title-l-font-size,1.5rem);font-weight:700;letter-spacing:1px;line-height:1.2;margin:0 auto;padding:var(--adyen-sdk-spacer-070,16px) var(--adyen-sdk-spacer-120,48px);position:relative;text-align:center;-webkit-user-select:all;-moz-user-select:all;user-select:all;width:100%;word-break:break-word}.adyen-checkout__voucher-result__actions{align-items:center;display:flex;justify-content:center;list-style:none;margin:0 auto var(--adyen-sdk-spacer-100,32px);max-width:100%;min-width:200px;padding:0;width:300px}.adyen-checkout__voucher-result__actions__item{margin:0 var(--adyen-sdk-spacer-020,4px)}.adyen-checkout__details-table{list-style:none;margin:-1px auto 0;padding:0}.adyen-checkout__details-table__item{border-top:1px solid var(--adyen-sdk-color-separator-primary,#dbdee2);color:var(--adyen-sdk-color-label-primary,#00112c);display:flex;font-size:var(--adyen-sdk-text-body-font-size,.875rem);justify-content:space-between;padding:var(--adyen-sdk-spacer-070,16px) var(--adyen-sdk-spacer-090,24px);word-break:break-word}.adyen-checkout__details-table__item:last-child{margin-bottom:0}.adyen-checkout__details-table__label{max-width:50%;text-align:left}.adyen-checkout__details-table__value{font-weight:700;max-width:50%;text-align:right}.adyen-checkout__voucher-result__introduction{font-size:var(--adyen-sdk-text-title-font-size,1rem);max-width:420px}.adyen-checkout__eftpad-canada-info{align-items:center;background-color:#f2f8ff;border:1px solid var(--adyen-sdk-color-outline-primary,#dbdee2);border-radius:var(--adyen-sdk-border-radius-m,8px);display:flex;font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);gap:var(--adyen-sdk-spacer-070,16px);line-height:var(--adyen-sdk-text-body-line-height,20px);margin-bottom:var(--adyen-sdk-spacer-070,16px);padding:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout_eftpad-canada-store-details{margin-bottom:var(--adyen-sdk-spacer-070,16px);margin-top:0}.adyen-checkout__fieldset--personalDetails .adyen-checkout__field--gender .adyen-checkout__radio_group{display:flex}.adyen-checkout__fieldset--personalDetails .adyen-checkout__radio_group{display:flex;margin:var(--adyen-sdk-spacer-040,8px) 0}.adyen-checkout__fieldset--personalDetails .adyen-checkout__radio_group__input-wrapper{margin-right:var(--adyen-sdk-spacer-080,20px)}.adyen-checkout__fieldset--personalDetails .adyen-checkout__radio_group__input-wrapper:last-child{margin:0}.adyen-checkout__field--gender .adyen-checkout__input-wrapper{background-color:transparent;border:none;box-shadow:none}.adyen-checkout__field--gender .adyen-checkout__input-wrapper:active,.adyen-checkout__field--gender .adyen-checkout__input-wrapper:active:hover,.adyen-checkout__field--gender .adyen-checkout__input-wrapper:focus-within,.adyen-checkout__field--gender .adyen-checkout__input-wrapper:focus-within:hover{box-shadow:none}.adyen-checkout__field--separateDeliveryAddress .adyen-checkout__input-wrapper{background-color:transparent;border:none;box-shadow:none}.adyen-checkout__field--separateDeliveryAddress .adyen-checkout__input-wrapper:active,.adyen-checkout__field--separateDeliveryAddress .adyen-checkout__input-wrapper:active:hover,.adyen-checkout__field--separateDeliveryAddress .adyen-checkout__input-wrapper:focus-within,.adyen-checkout__field--separateDeliveryAddress .adyen-checkout__input-wrapper:focus-within:hover{box-shadow:none}.adyen-checkout__open-invoice .adyen-checkout__fieldset--billingAddress,.adyen-checkout__open-invoice .adyen-checkout__fieldset--personalDetails{padding-bottom:var(--adyen-sdk-spacer-040,8px)}.adyen-checkout__open-invoice .adyen-checkout__fieldset--deliveryAddress{margin-top:var(--adyen-sdk-spacer-090,24px);padding-bottom:var(--adyen-sdk-spacer-040,8px)}.adyen-checkout__open-invoice .adyen-checkout__input--separateDeliveryAddress{margin-bottom:0}.adyen-checkout__open-invoice .adyen-checkout__field--consentCheckbox{margin-top:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__open-invoice--loading{pointer-events:none}.adyen-checkout__amazonpay__button{margin:auto}.adyen-checkout__amazonpay .adyen-checkout__button--ghost{display:block;margin:var(--adyen-sdk-spacer-040,8px) auto 0;width:auto}apple-pay-button{--apple-pay-button-width:100%;--apple-pay-button-height:48px;--apple-pay-button-border-radius:4px}.adyen-checkout__cashapp>.adyen-checkout__store-details{margin-bottom:var(--adyen-sdk-spacer-070,16px);margin-top:0}.adyen-checkout__paywithgoogle{height:var(--adyen-sdk-spacer-120,48px)}.adyen-checkout__paypal__buttons{position:relative;z-index:0}.adyen-checkout__paypal__button{display:flex;margin-bottom:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__paypal__button:empty{display:none}.adyen-checkout__paypal__status--pending{margin:var(--adyen-sdk-spacer-070,16px) 0}.adyen-checkout__paypal__status--processing{align-items:center;display:flex;font-size:var(--adyen-sdk-text-body-font-size,.875rem);justify-content:center;padding:var(--adyen-sdk-spacer-090,24px) 0}.adyen-checkout__paypal-processing .adyen-checkout__paypal__button{display:none}.adyen-checkout__payment-method .adyen-checkout__paypal__status--pending{margin:var(--adyen-sdk-spacer-070,16px) 0 38px}.adyen-checkout__payment-method .adyen-checkout__paypal__status--processing{padding:var(--adyen-sdk-spacer-080,20px) 0 65px}.adyen-checkout-fastlane__card-brand--wrapper{align-items:center;border-radius:var(--adyen-sdk-border-radius-s,4px);box-shadow:var(--adyen-sdk-shadow-low,0 2px 4px rgba(0,17,44,.04),0 1px 2px rgba(0,17,44,.02));display:flex;height:26px;justify-content:center;margin-right:var(--adyen-sdk-spacer-060,12px);overflow:hidden;position:relative;width:var(--adyen-sdk-spacer-110,40px)}.adyen-checkout-fastlane__card-section{align-items:center;display:flex}.adyen-checkout-fastlane__card-number{font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500);line-height:var(--adyen-sdk-text-body-line-height,20px)}.adyen-checkout-fastlane__brand{display:flex;justify-content:center;margin-top:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout-fastlane__brand img{width:95px}.adyen-checkout__field--sendCopyToEmail .adyen-checkout__input-wrapper{background-color:transparent;border:none;box-shadow:none}.adyen-checkout__field--sendCopyToEmail .adyen-checkout__input-wrapper:active,.adyen-checkout__field--sendCopyToEmail .adyen-checkout__input-wrapper:active:hover,.adyen-checkout__field--sendCopyToEmail .adyen-checkout__input-wrapper:focus-within,.adyen-checkout__field--sendCopyToEmail .adyen-checkout__input-wrapper:focus-within:hover{box-shadow:none}.adyen-checkout__voucher-result--boletobancario .adyen-checkout__voucher-result__code,.adyen-checkout__voucher-result--oxxo .adyen-checkout__voucher-result__code{font-size:var(--adyen-sdk-text-body-font-size,.875rem);line-height:var(--adyen-sdk-text-caption-line-height,18px);padding:var(--adyen-sdk-spacer-090,24px);word-break:break-all}.adyen-checkout__issuer-button{align-items:center;background-color:var(--adyen-sdk-color-background-primary,#ffffff);border:none;border-radius:var(--adyen-sdk-border-radius-m,8px);box-shadow:inset 0 0 0 1px var(--adyen-sdk-color-outline-primary,#dbdee2);cursor:pointer;display:flex;flex-basis:47%;flex-grow:2;font-size:var(--adyen-sdk-text-body-font-size,.875rem);height:var(--adyen-sdk-spacer-110,40px);justify-content:space-between;padding:var(--adyen-sdk-spacer-000,0) var(--adyen-sdk-spacer-060,12px);transition:background .3s ease-out,box-shadow .3s ease-out}.adyen-checkout__issuer-button:active{color:var(--adyen-sdk-color-label-primary,#00112c)}.adyen-checkout__issuer-button:not(.adyen-checkout__issuer-button--selected):focus{box-shadow:inset 0 0 0 1px var(--adyen-sdk-color-outline-tertiary,#8d95a3);outline:none}.adyen-checkout__issuer-button:not(.adyen-checkout__issuer-button--selected):focus-visible{box-shadow:inset 0 0 0 1px var(--adyen-sdk-color-outline-tertiary,#8d95a3);outline:none}.adyen-checkout__issuer-button:not(.adyen-checkout__issuer-button--selected):hover{box-shadow:inset 0 0 0 1px var(--adyen-sdk-color-outline-tertiary,#8d95a3);outline:none}.adyen-checkout__issuer-button--selected{background:var(--adyen-sdk-color-background-primary,#ffffff);box-shadow:inset 0 0 0 1.5px var(--adyen-sdk-color-outline-primary-active,#00112c);color:var(--adyen-sdk-color-label-primary,#00112c);font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500);height:var(--adyen-sdk-spacer-110,40px);transition:none}.adyen-checkout__issuer-button-img{margin-right:var(--adyen-sdk-spacer-040,8px);max-height:26px}.adyen-checkout__issuer-button-group{display:flex;flex-wrap:wrap;gap:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__field--issuer-list{margin-bottom:0}.adyen-checkout__field--issuer-list .adyen-checkout__dropdown{position:static}.adyen-checkout__field--issuer-list .adyen-checkout__dropdown__button{position:relative}.adyen-checkout__econtext-input__field>.adyen-checkout__button--pay:only-child{margin-top:0}.adyen-checkout-trustly{margin-bottom:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout-trustly__descriptor{font-size:var(--adyen-sdk-text-subtitle-font-size,1rem);font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500);margin:var(--adyen-sdk-spacer-000,0) var(--adyen-sdk-spacer-000,0) var(--adyen-sdk-spacer-020,4px)}.adyen-checkout-trustly__description-list{font-size:var(--adyen-sdk-text-body-font-size,.875rem);line-height:1.5;list-style-type:disc;margin:0;padding-left:var(--adyen-sdk-spacer-080,20px)}.adyen-checkout-paybybank_AIS_DD{margin-bottom:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout-paybybank_AIS_DD__description-header{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-subtitle-font-size,1rem);font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500);margin:var(--adyen-sdk-spacer-000,0) var(--adyen-sdk-spacer-000,0) var(--adyen-sdk-spacer-020,4px)}.adyen-checkout-paybybank_AIS_DD__description-body{color:var(--adyen-sdk-color-label-secondary,#5c687c);font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);line-height:1.5;list-style-type:disc;margin:0}@media (max-width:330px){.adyen-checkout__payment-method--paybybank_AIS_DD .adyen-checkout__payment-method__brands .adyen-checkout__payment-method__image__wrapper:nth-child(2){display:none}}@media (max-width:360px){.adyen-checkout__payment-method--paybybank_AIS_DD .adyen-checkout__payment-method__brands .adyen-checkout__payment-method__image__wrapper:nth-child(3){display:none}}@media (max-width:390px){.adyen-checkout__payment-method--paybybank_AIS_DD .adyen-checkout__payment-method__brands .adyen-checkout__payment-method__image__wrapper:nth-child(4){display:none}}.adyen-checkout__payment-method--paybybank_AIS_DD .adyen-checkout__payment-method__brand-number{text-overflow:clip;white-space:nowrap}.adyen-checkout__voucher-result--paybybank_pix{background-color:var(--adyen-sdk-color-background-primary,#ffffff);margin-bottom:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__voucher-result--paybybank_pix .adyen-checkout__voucher-result__top{border:none;margin:var(--adyen-sdk-spacer-070,16px) var(--adyen-sdk-spacer-000,0);padding:var(--adyen-sdk-spacer-000,0)}.adyen-checkout__voucher-result--paybybank_pix .adyen-checkout__voucher-result__bottom{border:none}.adyen-checkout__voucher-result--paybybank_pix .adyen-checkout__voucher-result__image{margin-bottom:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__voucher-result--paybybank_pix .adyen-checkout__voucher-result__image__wrapper{width:8em}.adyen-checkout__voucher-result--paybybank_pix .adyen-checkout__voucher-result__image__wrapper>img{width:100%}.adyen-checkout__voucher-result--paybybank_pix .adyen-checkout__voucher-result__amount{font-size:var(--adyen-sdk-text-title-l-font-size,1.5rem);font-weight:var(--adyen-sdk-text-title-l-font-weight,600);line-height:var(--adyen-sdk-text-title-l-line-height,34px);margin-top:var(--adyen-sdk-spacer-000,0)}.adyen-checkout-await-logo-container{align-items:center;background:var(--adyen-sdk-color-background-secondary,#f7f7f8);border-radius:var(--adyen-sdk-border-radius-m,8px);display:flex;flex-direction:column;gap:var(--adyen-sdk-spacer-070,16px);padding:var(--adyen-sdk-spacer-070,16px) var(--adyen-sdk-spacer-090,24px);width:-moz-fit-content;width:fit-content}.adyen-checkout-await-logo-container:has(>:only-child){background:none}.adyen-checkout__await{background:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-secondary,#c9cdd3);border-radius:var(--adyen-sdk-border-radius-m,8px);padding:var(--adyen-sdk-spacer-110,40px);text-align:center}.adyen-checkout__await--result{padding:100px}.adyen-checkout__await__brand-logo{border-radius:3px;width:74px}.adyen-checkout__await__indicator-text,.adyen-checkout__await__subtitle{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-subtitle-font-size,1rem);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin-top:var(--adyen-sdk-spacer-100,32px)}.adyen-checkout__await__indicator-holder .adyen-checkout__await__indicator-text{margin-left:var(--adyen-sdk-spacer-050,10px);margin-top:var(--adyen-sdk-spacer-030,6px)}.adyen-checkout__await__indicator-holder{display:flex;justify-content:center;margin-bottom:var(--adyen-sdk-spacer-080,20px);margin-top:var(--adyen-sdk-spacer-100,32px)}.adyen-checkout__await__subtitle--result{margin-bottom:var(--adyen-sdk-spacer-100,32px)}.adyen-checkout__await__icon{height:88px;width:88px}.adyen-checkout__await__progress{background:var(--adyen-sdk-color-outline-secondary,#c9cdd3);border-radius:var(--adyen-sdk-border-radius-l,12px);height:var(--adyen-sdk-spacer-020,4px);margin:var(--adyen-sdk-spacer-100,32px) auto var(--adyen-sdk-spacer-060,12px);width:152px}.adyen-checkout__await__percentage{background:var(--adyen-sdk-color-label-primary,#00112c);border-radius:var(--adyen-sdk-border-radius-l,12px);display:block;height:100%}.adyen-checkout__await__countdown{color:var(--adyen-sdk-color-label-secondary,#5c687c);font-size:var(--adyen-sdk-text-body-font-size,.875rem)}.adyen-checkout__await>.adyen-checkout__spinner__wrapper{margin:60px 0}.adyen-checkout__await__app-link{display:none;margin-top:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__await__amount{font-size:var(--adyen-sdk-text-title-l-font-size,1.5rem);font-weight:var(--adyen-sdk-text-title-font-weight,600);margin-top:var(--adyen-sdk-spacer-070,16px);text-align:center}@media only screen and (max-device-width:1200px){.adyen-checkout__await__app-link{display:block}}.adyen-checkout-pay-by-bank-pix-await{align-items:center;display:flex;flex-direction:column}.adyen-checkout-pay-by-bank-pix-await .adyen-checkout__await__countdown-holder,.adyen-checkout-pay-by-bank-pix-await .adyen-checkout__await__subtitle{display:none}.adyen-checkout-pay-by-bank-pix-await .adyen-checkout__await,.adyen-checkout-pay-by-bank-pix-await .adyen-checkout__await--paybybank_pix{border:none;padding:0}.adyen-checkout-pay-by-bank-pix-await .adyen-checkout__await__indicator-holder{margin-top:var(--adyen-sdk-spacer-090,24px)}.adyen-checkout-pay-by-bank-pix-await .adyen-checkout__await__countdown{color:var(--adyen-sdk-color-label-primary,#00112c)}.adyen-checkout-pay-by-bank-pix-await .adyen-checkout__await__end-slot{color:var(--adyen-sdk-color-label-tertiary,#5c687c);font-size:var(--adyen-sdk-text-caption-font-size,.75rem);font-weight:var(--adyen-sdk-text-caption-font-weight,400);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin-top:var(--adyen-sdk-spacer-090,24px)}.adyen-checkout-issuer-list-introduction-logo-container{background:var(--adyen-sdk-color-background-primary,#ffffff);border-radius:var(--adyen-sdk-border-radius-m,8px);margin-bottom:var(--adyen-sdk-spacer-070,16px);padding:var(--adyen-sdk-spacer-070,16px);text-align:center}.adyen-checkout-issuer-list-introduction-logo-container__title{font-size:var(--adyen-sdk-text-caption-font-size,.75rem);font-weight:var(--adyen-sdk-text-caption-font-weight,400);font-weight:var(--adyen-sdk-text-caption-stronger-font-weight,500);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin:0}.adyen-checkout-issuer-list-introduction-logo-container__logo{height:auto;width:8em}.adyen-checkout-issuer-list-introduction-text-container,.adyen-checkout-issuer-list-introduction-text-container__title{font-size:var(--adyen-sdk-text-caption-font-size,.75rem);font-weight:var(--adyen-sdk-text-caption-font-weight,400);line-height:var(--adyen-sdk-text-caption-line-height,18px)}.adyen-checkout-issuer-list-introduction-text-container__title{font-weight:var(--adyen-sdk-text-caption-stronger-font-weight,500);margin:0 0 var(--adyen-sdk-spacer-020,4px)}.adyen-checkout-issuer-list-introduction-text-container__content{margin:0}.adyen-checkout-issuer-list-introduction-text-container__content:not(:last-child){margin-bottom:var(--adyen-sdk-spacer-040,8px)}.adyen-checkout-pix-enrollment-issuer-list{display:flex;flex-direction:column;gap:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout-pix-enrollment-issuer-list .adyen-checkout-disclaimer__label{color:var(--adyen-sdk-color-label-secondary,#5c687c);display:inline-block;font-size:var(--adyen-sdk-text-caption-font-size,.75rem);font-weight:var(--adyen-sdk-text-caption-font-weight,400);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin:0;text-align:center}.adyen-checkout-await-logo-open-finance{height:auto;width:8em}.adyen-checkout-await-logo-arrow-down{height:auto;width:1em}.adyen-checkout-await-logo-bank{height:auto;width:3em}.adyen-checkout__klarna-widget{pointer-events:all}.adyen-checkout__qr-loader{align-items:center;background:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-secondary,#c9cdd3);border-radius:var(--adyen-sdk-border-radius-m,8px);display:flex;flex-direction:column;padding:var(--adyen-sdk-spacer-110,40px);padding-bottom:var(--adyen-sdk-spacer-090,24px)}.adyen-checkout__qr-loader--result{gap:var(--adyen-sdk-spacer-090,24px);padding:100px}.adyen-checkout__qr-loader--app{border:0;border-radius:0;padding:0}.adyen-checkout__qr-loader__brand-logo-wrapper{border-radius:var(--adyen-sdk-border-radius-s,4px);box-shadow:var(--adyen-sdk-shadow-low,0 2px 4px rgba(0,17,44,.04),0 1px 2px rgba(0,17,44,.02));margin-bottom:var(--adyen-sdk-spacer-090,24px);overflow:hidden}.adyen-checkout__qr-loader__brand-logo{display:block;width:80px}.adyen-checkout__qr-loader__subtitle{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-body-font-size,.875rem);line-height:var(--adyen-sdk-text-body-line-height,20px);max-width:400px;text-align:center}.adyen-checkout__qr-loader__icon{height:88px;width:88px}.adyen-checkout__qr-loader__payment_amount{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-title-l-font-size,1.5rem);font-weight:var(--adyen-sdk-text-title-l-font-weight,600);line-height:var(--adyen-sdk-text-body-wide-line-height,24px);margin-bottom:var(--adyen-sdk-spacer-090,24px)}.adyen-checkout__qr-loader__progress{background:var(--adyen-sdk-color-outline-secondary,#c9cdd3);border-radius:var(--adyen-sdk-border-radius-l,12px);height:var(--adyen-sdk-spacer-020,4px);margin-bottom:var(--adyen-sdk-spacer-060,12px);padding-right:3%;width:152px}[dir=rtl] .adyen-checkout__qr-loader__progress{padding-left:3%;padding-right:0}.adyen-checkout__qr-loader__percentage{background:var(--adyen-sdk-color-label-primary,#00112c);border-radius:var(--adyen-sdk-border-radius-l,12px);display:block;height:100%}.adyen-checkout__qr-loader__countdown{font-size:var(--adyen-sdk-text-caption-font-size,.75rem);text-align:center}.adyen-checkout__qr-loader>.adyen-checkout__spinner__wrapper{margin:60px 0}.adyen-checkout__qr-loader__app-link{display:none}.adyen-checkout__button.adyen-checkout__button--qr-loader{margin-top:var(--adyen-sdk-spacer-090,24px);text-decoration:none}.adyen-checkout__qr-loader__instructions{color:var(--adyen-sdk-color-label-tertiary,#5c687c);font-size:var(--adyen-sdk-text-subtitle-font-size,1rem);line-height:1.5;margin-top:var(--adyen-sdk-spacer-090,24px);max-width:300px}.adyen-checkout__qr-loader__actions{align-items:center;display:flex;justify-content:center;margin-top:var(--adyen-sdk-spacer-100,32px)}.adyen-checkout__await__instructions{display:flex;justify-content:center}@media (max-width:1024px){.adyen-checkout__qr-loader__app-link{display:block;min-width:220px}}.adyen-checkout__qr-loader--swish>.adyen-checkout__qr-loader__instructions{text-align:center}.adyen-checkout-paynow__introduction{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);line-height:var(--adyen-sdk-text-body-line-height,20px);text-align:center}.adyen-checkout-timeline-wrapper{background-color:var(--adyen-sdk-color-background-secondary,#f7f7f8);border-radius:8px;max-width:300px;padding:16px}.adyen-checkout-timeline{scrollbar-color:var(--adyen-sdk-color-background-quaternary,#c0c5cc) transparent}.adyen-checkout-timeline__items{all:unset}.adyen-checkout-timeline-item{scrollbar-color:var(--adyen-sdk-color-background-quaternary,#c0c5cc) transparent;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;list-style-type:none;max-width:500px}.adyen-checkout-timeline-item:last-child .adyen-checkout-timeline-item__separator{display:none}.adyen-checkout-timeline-item:last-child .adyen-checkout-timeline-item__content{padding-bottom:0}.adyen-checkout-timeline-item__row{display:flex;gap:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout-timeline-item__marker{display:flex;flex-flow:column;margin-top:var(--adyen-sdk-spacer-010,2px);max-width:var(--adyen-sdk-spacer-070,16px);width:100%}.adyen-checkout-timeline-item__separator{flex-grow:1;position:relative}.adyen-checkout-timeline-item__separator:before{background-color:var(--adyen-sdk-color-separator-secondary,#c9cdd3);content:\\\"\\\";height:100%;left:50%;position:absolute;transform:translate(-50%);width:1px}.adyen-checkout-timeline-item__content{align-items:flex-start;display:flex;flex-direction:column;flex-grow:1;padding-bottom:var(--adyen-sdk-spacer-060,12px)}.adyen-checkout-timeline-item__title{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-caption-font-size,.75rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);letter-spacing:0;line-height:var(--adyen-sdk-text-body-line-height,20px);margin-bottom:var(--adyen-sdk-spacer-010,2px);text-align:left}.adyen-checkout-paynow__instructions{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);line-height:var(--adyen-sdk-text-body-line-height,20px);text-align:center}.adyen-checkout-paynow__instructions>p{margin-bottom:0}.adyen-checkout__blik__helper{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-subtitle-font-size,1rem);font-weight:400;margin:0 0 var(--adyen-sdk-spacer-070,16px);padding:0}.adyen-checkout__loading-input__form{transition:opacity .25s ease-out}.adyen-checkout__fieldset--phone-input{direction:ltr}.adyen-checkout__fieldset--phone-input .adyen-checkout__fieldset__fields{gap:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__fieldset--phone-input .adyen-checkout__fieldset__fields>.adyen-checkout__field{margin-bottom:0}.adyen-checkout-field--phone-prefix{width:144px}.adyen-checkout-field--phone-number{flex:1}.adyen-checkout__field--vpa{margin-bottom:0}.adyen-checkout_upi-mode-selection-text{font-size:var(--adyen-sdk-text-caption-font-size,.75rem);font-weight:var(--adyen-sdk-text-caption-font-weight,400);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin-bottom:var(--adyen-sdk-spacer-040,8px);margin-top:var(--adyen-sdk-spacer-000,0)}.adyen-checkout__segmented-control--upi-margin-bottom{margin-bottom:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout-upi-area-intent .adyen-checkout__button--pay{margin-top:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout-upi-area-qr-code .adyen-checkout__button--pay{margin-top:var(--adyen-sdk-spacer-000,0)}.adyen-checkout-checkmark{border-bottom:1.5px solid var(--adyen-sdk-color-label-primary,#00112c);border-right:1.5px solid var(--adyen-sdk-color-label-primary,#00112c);height:var(--adyen-sdk-spacer-060,12px);transform:rotate(45deg);width:var(--adyen-sdk-spacer-030,6px)}.adyen-checkout__segmented-control{background:var(--adyen-sdk-color-background-tertiary,#eeeff1);border-radius:var(--adyen-sdk-border-radius-l,12px);display:flex;gap:var(--adyen-sdk-spacer-020,4px);justify-content:space-between;padding:var(--adyen-sdk-spacer-030,6px)}.adyen-checkout__segmented-control--disabled{pointer-events:none}.adyen-checkout__segmented-control--disabled>.adyen-checkout__segmented-control-segment{color:var(--adyen-sdk-color-label-disabled,#8d95a3)}.adyen-checkout__segmented-control--disabled>.adyen-checkout__segmented-control-segment--selected .adyen-checkout-checkmark{border-bottom:1.5px solid var(--adyen-sdk-color-label-disabled,#8d95a3);border-right:1.5px solid var(--adyen-sdk-color-label-disabled,#8d95a3)}.adyen-checkout__segmented-control-segment{align-items:center;background:transparent;border:0;border-radius:var(--adyen-sdk-border-radius-m,8px);color:var(--adyen-sdk-color-label-primary,#00112c);cursor:pointer;display:flex;flex-grow:1;font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500);gap:var(--adyen-sdk-spacer-050,10px);height:var(--adyen-sdk-spacer-110,40px);justify-content:center;text-align:center;transition:background .3s ease-out;width:100%}.adyen-checkout__segmented-control-segment:active,.adyen-checkout__segmented-control-segment:not(.adyen-checkout__segmented-control-segment--selected):hover{background-color:var(--adyen-sdk-color-background-secondary,#f7f7f8)}.adyen-checkout__segmented-control-segment--selected{background:var(--adyen-sdk-color-background-primary,#ffffff);box-shadow:var(--adyen-sdk-shadow-low,0 2px 4px rgba(0,17,44,.04),0 1px 2px rgba(0,17,44,.02));color:var(--adyen-sdk-color-label-primary,#00112c)}.adyen-checkout__payment-method__header__title{align-items:center;background:none;border:none;color:var(--adyen-sdk-color-label-primary,#00112c);cursor:pointer;display:flex;flex-shrink:0;font-size:1em;font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500);gap:var(--adyen-sdk-spacer-060,12px);margin-right:var(--adyen-sdk-spacer-070,16px);max-height:38px;max-width:100%;padding:0}[dir=rtl] .adyen-checkout__payment-method__header__title{margin-left:var(--adyen-sdk-spacer-070,16px);margin-right:var(--adyen-sdk-spacer-000,0)}.adyen-checkout__payment-method__header__title--standalone{cursor:default}.adyen-checkout__payment-method__radio{background-color:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-secondary,#c9cdd3);border-radius:50%;height:var(--adyen-sdk-spacer-070,16px);left:var(--adyen-sdk-spacer-070,16px);transition:border-color .2s ease-out,box-shadow .2s ease-out;width:var(--adyen-sdk-spacer-070,16px)}[dir=rtl] .adyen-checkout__payment-method__radio{left:auto;right:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__payment-method__radio:after{background-color:var(--adyen-sdk-color-background-primary,#ffffff);border-radius:50%;content:\\\"\\\";display:block;height:var(--adyen-sdk-spacer-040,8px);left:0;margin:0 auto;position:relative;right:0;top:50%;transform:translateY(-50%) scale(0);transition:transform .3s ease-out;width:var(--adyen-sdk-spacer-040,8px)}.adyen-checkout__payment-method__radio--selected{background-color:var(--adyen-sdk-color-label-primary,#00112c);border:0;transition:all .3s ease-out}.adyen-checkout__payment-method__radio--selected:hover{box-shadow:0 0 0 var(--adyen-sdk-spacer-010,2px) var(--adyen-sdk-color-outline-primary-hover,#c9cdd3)}.adyen-checkout__payment-method__radio--selected:after{transform:translateY(-50%) scale(1)}.adyen-checkout-upi-app-item{background:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-primary,#dbdee2);border-radius:var(--adyen-sdk-border-radius-m,8px);cursor:pointer;display:flex;flex-direction:column;gap:var(--adyen-sdk-spacer-070,16px);padding:var(--adyen-sdk-spacer-050,10px) var(--adyen-sdk-spacer-070,16px);transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease,border-radius .15s ease;width:100%}.adyen-checkout-upi-app-item__label{cursor:pointer}.adyen-checkout-upi-app-item:hover:not(.adyen-checkout-upi-app-item--selected){border-color:var(--adyen-sdk-color-outline-primary-hover,#c9cdd3)}.adyen-checkout-upi-app-item--selected:not(.adyen-checkout-upi-app-item:last-child){border-color:var(--adyen-sdk-color-outline-primary-active,#00112c);box-shadow:0 0 0 .5px var(--adyen-sdk-color-outline-primary-active,#00112c)}.adyen-checkout-upi-app-item--selected{border-color:var(--adyen-sdk-color-outline-secondary,#c9cdd3);cursor:default}.adyen-checkout-upi-app-item--selected .adyen-checkout-expand-button--upi-app-item,.adyen-checkout-upi-app-item--selected .adyen-checkout-expand-button--upi-app-item>label{cursor:default}.adyen-checkout-upi-app-item .adyen-checkout-expand-button--upi-app-item{margin-right:0}.adyen-checkout-upi-app-list{display:flex;flex-direction:column;gap:var(--adyen-sdk-spacer-070,16px);list-style:none;margin:0;padding:0}.adyen-checkout-upi-app-list--loading{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.adyen-checkout__payto-component .adyen-checkout__fieldset{margin-top:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__payto-component .adyen-checkout__fieldset .adyen-checkout__fieldset__fields{gap:0 var(--adyen-sdk-spacer-060,12px);margin-top:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__payto-component .adyen-checkout-field--phone-prefix{width:98px}.adyen-checkout__payto-component--loading{pointer-events:none}.adyen-checkout__await--payto .adyen-checkout__details-table{margin-top:var(--adyen-sdk-spacer-070,16px);padding-top:var(--adyen-sdk-spacer-060,12px)}.adyen-checkout__await--payto .adyen-checkout__details-table__item:first-child{border-top:none}.adyen-checkout__alert-message{border-radius:var(--adyen-sdk-border-radius-m,8px);display:flex;font-size:var(--adyen-sdk-text-caption-font-size,.75rem);margin:0 0 var(--adyen-sdk-spacer-070,16px);padding:var(--adyen-sdk-spacer-060,12px);text-align:left}.adyen-checkout__alert-message--error{background:var(--adyen-sdk-color-background-critical-strong,#e22d2d)}.adyen-checkout__alert-message--info{background:var(--adyen-sdk-color-background-secondary,#f7f7f8)}.adyen-checkout__alert-message__icon{height:14px;margin-right:var(--adyen-sdk-spacer-040,8px);width:14px}.adyen-checkout__giftcard-result__header{align-items:center;display:flex;flex-wrap:nowrap;font-size:var(--adyen-sdk-text-title-font-size,1rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);justify-content:space-between;position:relative;width:100%}.adyen-checkout__giftcard-result__header__title{align-items:center;display:flex}.adyen-checkout__giftcard-result__name{margin-left:var(--adyen-sdk-spacer-040,8px)}.adyen-checkout__giftcard-result__balance{list-style:none;margin:var(--adyen-sdk-spacer-070,16px) 0 0;padding:0}.adyen-checkout__giftcard-result__balance__item{display:flex;justify-content:space-between;margin-bottom:var(--adyen-sdk-spacer-040,8px)}.adyen-checkout__giftcard-result__balance__item .adyen-checkout__giftcard-result__balance__title--transactionLimit{color:var(--adyen-sdk-color-label-secondary,#5c687c)}.adyen-checkout__giftcard-result__balance__item:last-child{margin-bottom:0}.adyen-checkout__giftcard-result__balance__value--amount{font-weight:700}.adyen-checkout__giftcard-result__remaining-balance{color:var(--adyen-sdk-color-label-secondary,#5c687c);font-size:var(--adyen-sdk-text-body-font-size,.875rem);line-height:var(--adyen-sdk-text-caption-line-height,18px);margin:var(--adyen-sdk-spacer-040,8px) auto 0;text-align:center}.adyen-checkout__bankTransfer__introduction{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);margin:0 0 var(--adyen-sdk-spacer-070,16px);padding:0}.adyen-checkout__bankTransfer__emailField{margin:0 0 var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__adyen-giving .adyen-checkout__status__icon{display:block;margin:var(--adyen-sdk-spacer-130,56px) auto var(--adyen-sdk-spacer-100,32px)}.adyen-checkout__adyen-giving .adyen-checkout__status__text{color:var(--adyen-sdk-color-label-primary,#00112c);margin-bottom:var(--adyen-sdk-spacer-130,56px);text-align:center}.adyen-checkout__adyen-giving .adyen-checkout-disclaimer__label{color:var(--adyen-sdk-color-label-primary,#00112c);margin-top:0}.adyen-checkout__campaign{position:relative}.adyen-checkout__campaign-link:hover .adyen-checkout__campaign-description{text-decoration:underline}.adyen-checkout__campaign-logo{border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-primary,#dbdee2);border-radius:var(--adyen-sdk-border-radius-s,4px);display:block;flex-shrink:0;height:var(--adyen-sdk-spacer-120,48px);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;overflow:hidden;width:var(--adyen-sdk-spacer-120,48px)}.adyen-checkout__campaign-background-image{aspect-ratio:5/2;background-color:var(--adyen-sdk-color-label-primary,#00112c);background-position:50%;background-size:100%;border-radius:var(--adyen-sdk-border-radius-m,8px);margin-bottom:var(--adyen-sdk-spacer-060,12px);overflow:hidden;transition:background-size .6s ease-out}.adyen-checkout__campaign-background-image:hover{background-size:110%}.adyen-checkout__campaign-link{text-decoration:none}.adyen-checkout__campaign-link:hover{text-decoration:underline}.adyen-checkout__campaign-content{align-items:flex-start;display:flex;gap:var(--adyen-sdk-spacer-060,12px)}.adyen-checkout__campaign-description,.adyen-checkout__campaign-title{color:var(--adyen-sdk-color-label-primary,#00112c);margin:0}.adyen-checkout__campaign-title{font-size:var(--adyen-sdk-text-title-font-size,1rem);font-weight:var(--adyen-sdk-text-title-font-weight,600);line-height:var(--adyen-sdk-text-title-line-height,26px)}.adyen-checkout__campaign-cause{font-weight:var(--adyen-sdk-text-caption-font-weight,400);font-weight:var(--adyen-sdk-text-caption-stronger-font-weight,500)}.adyen-checkout__campaign-cause,.adyen-checkout__campaign-description{font-size:var(--adyen-sdk-text-caption-font-size,.75rem);line-height:var(--adyen-sdk-text-caption-line-height,18px)}.adyen-checkout__campaign-description{font-weight:var(--adyen-sdk-text-caption-font-weight,400);margin-top:var(--adyen-sdk-spacer-060,12px)}.adyen-checkout-roundup-description{color:var(--adyen-sdk-color-label-secondary,#5c687c);display:inline-block;font-size:var(--adyen-sdk-text-caption-font-size,.75rem);font-weight:var(--adyen-sdk-text-caption-font-weight,400);line-height:var(--adyen-sdk-text-caption-line-height,18px);padding-left:0}.adyen-checkout__adyen-giving-actions{display:flex;flex-direction:column;gap:var(--adyen-sdk-spacer-070,16px);margin-top:var(--adyen-sdk-spacer-070,16px);text-align:center}.adyen-checkout__button.adyen-checkout__button--donate{margin:var(--adyen-sdk-spacer-000,0)}.adyen-checkout__button.adyen-checkout__button--decline{display:block;margin:auto}.adyen-checkout__button-group{background:transparent;display:flex;justify-content:space-between}.adyen-checkout__button-group .adyen-checkout__button{background:transparent;border:0;box-shadow:inset 0 0 0 1px var(--adyen-sdk-color-outline-primary,#dbdee2);color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-body-font-size,.875rem);font-weight:400;height:var(--adyen-sdk-spacer-110,40px);line-height:var(--adyen-sdk-spacer-110,40px);margin-right:var(--adyen-sdk-spacer-040,8px);padding:0;text-align:center}.adyen-checkout__button-group .adyen-checkout__button:last-child{margin-right:0}.adyen-checkout__button-group .adyen-checkout__button:hover{background:transparent;box-shadow:inset 0 0 0 var(--adyen-sdk-spacer-010,2px) var(--adyen-sdk-color-outline-primary-hover,#c9cdd3)}.adyen-checkout__button-group .adyen-checkout__button:active{background:var(--adyen-sdk-color-background-secondary,#f7f7f8);box-shadow:inset 0 0 0 var(--adyen-sdk-spacer-010,2px) var(--adyen-sdk-color-outline-tertiary,#8d95a3)}.adyen-checkout__button-group .adyen-checkout__button--disabled,.adyen-checkout__button-group .adyen-checkout__button--disabled:hover{cursor:not-allowed;opacity:.4;-webkit-user-select:none;-moz-user-select:none;user-select:none}.adyen-checkout__button-group .adyen-checkout__button--selected,.adyen-checkout__button-group .adyen-checkout__button--selected:active,.adyen-checkout__button-group .adyen-checkout__button--selected:active:hover,.adyen-checkout__button-group .adyen-checkout__button--selected:hover{background:var(--adyen-sdk-color-background-secondary,#f7f7f8);box-shadow:inset 0 0 0 1px var(--adyen-sdk-color-label-primary,#00112c);color:var(--adyen-sdk-color-label-primary,#00112c);font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500);height:var(--adyen-sdk-spacer-110,40px);transition:none}.adyen-checkout__button-group .adyen-checkout__button .adyen-checkout__button-group__input{opacity:0;pointer-events:none;position:absolute}.adyen-checkout__order-payment-methods-list{list-style:none;margin:0 auto var(--adyen-sdk-spacer-070,16px);padding:0}.adyen-checkout__order-payment-method{background:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-tertiary,#8d95a3);margin-top:-1px;position:relative;width:100%}.adyen-checkout__order-payment-method:first-child{border-top-left-radius:var(--adyen-sdk-border-radius-m,8px);border-top-right-radius:var(--adyen-sdk-border-radius-m,8px)}.adyen-checkout__order-payment-method:last-child{border-bottom-left-radius:var(--adyen-sdk-border-radius-m,8px);border-bottom-right-radius:var(--adyen-sdk-border-radius-m,8px)}.adyen-checkout__order-payment-method__header{align-items:center;color:var(--adyen-sdk-color-label-primary,#00112c);display:flex;flex-wrap:nowrap;font-size:var(--adyen-sdk-text-title-font-size,1rem);font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500);justify-content:space-between;padding:var(--adyen-sdk-spacer-070,16px);position:relative;transition:background .1s ease-out;width:100%}.adyen-checkout__order-payment-method__header .adyen-checkout__payment-method__header__title{padding:var(--adyen-sdk-spacer-000,0)}.adyen-checkout__order-payment-method__details{padding:0 var(--adyen-sdk-spacer-070,16px) var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__order-payment-method__deducted-amount{display:flex;font-size:var(--adyen-sdk-text-subtitle-font-size,1rem);justify-content:space-between;line-height:var(--adyen-sdk-text-subtitle-font-size,1rem)}.adyen-checkout__order-payment-method__deducted-amount__label{font-size:var(--adyen-sdk-text-body-font-size,.875rem)}.adyen-checkout__order-payment-method__deducted-amount__value{font-weight:var(--adyen-sdk-text-body-stronger-font-weight,500)}.adyen-checkout__order-remaining-amount{border-radius:var(--adyen-sdk-border-radius-m,8px);color:var(--adyen-sdk-color-label-secondary,#5c687c);display:block;font-size:var(--adyen-sdk-text-body-font-size,.875rem);padding:var(--adyen-sdk-spacer-040,8px) var(--adyen-sdk-spacer-070,16px);width:100%}.adyen-checkout__order-remaining-amount strong{font-weight:700}.adyen-checkout__dropin--loading .adyen-checkout__instant-payment-methods-list{opacity:.2;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.adyen-checkout__payment-method__disable-confirmation{background:var(--adyen-sdk-color-background-critical-strong,#e22d2d);border-left:1px solid #e12424;border-right:1px solid #e12424;color:var(--adyen-sdk-color-label-on-color,#ffffff);display:grid;font-size:var(--adyen-sdk-text-body-font-size,.875rem);grid-template-rows:0fr;margin:0 -17px;opacity:0;overflow:hidden;transition:grid-template-rows var(--adyen-sdk-animation-duration-moderate,.15s) var(--adyen-sdk-animation-easing-linear,linear),opacity var(--adyen-sdk-animation-duration-moderate,.15s) var(--adyen-sdk-animation-easing-standard,cubic-bezier(.2,0,.4,.9)),margin-bottom var(--adyen-sdk-animation-duration-fast,.1s) var(--adyen-sdk-animation-easing-linear,linear)}.adyen-checkout__payment-method__disable-confirmation__content{align-items:center;display:flex;justify-content:space-between;min-height:0;transition:visibility var(--adyen-sdk-animation-duration-moderate,.15s) var(--adyen-sdk-animation-easing-linear,linear),padding var(--adyen-sdk-animation-duration-fast,.1s) var(--adyen-sdk-animation-easing-linear,linear);visibility:hidden}.adyen-checkout__payment-method__disable-confirmation--open{grid-template-rows:1fr;margin-bottom:var(--adyen-sdk-spacer-070,16px);opacity:1}.adyen-checkout__payment-method__disable-confirmation--open .adyen-checkout__payment-method__disable-confirmation__content{padding:var(--adyen-sdk-spacer-040,8px) var(--adyen-sdk-spacer-070,16px);visibility:visible}.adyen-checkout__payment-method__disable-confirmation__buttons{display:flex}.adyen-checkout__payment-method__disable-confirmation__button{background:var(--adyen-sdk-color-background-critical-strong,#e22d2d);border:var(--adyen-sdk-border-width-s,1px) solid transparent;border-radius:var(--adyen-sdk-border-radius-m,8px);color:var(--adyen-sdk-color-label-on-color,#ffffff);cursor:pointer;display:block;font-size:var(--adyen-sdk-text-body-font-size,.875rem);height:auto;margin:0 0 0 var(--adyen-sdk-spacer-040,8px);padding:var(--adyen-sdk-spacer-040,8px);width:auto}.adyen-checkout__payment-method__disable-confirmation__button:hover,.adyen-checkout__payment-method__disable-confirmation__button:hover:focus{background:#d81e1e;box-shadow:none}.adyen-checkout__payment-method__disable-confirmation__button:active,.adyen-checkout__payment-method__disable-confirmation__button:hover:active{background:#c11b1b;box-shadow:none}.adyen-checkout__payment-method__disable-confirmation__button--remove,.adyen-checkout__payment-method__disable-confirmation__button--remove:disabled{border-color:var(--adyen-sdk-color-label-on-color,#ffffff)}.adyen-checkout__payment-method__disable-confirmation__button--cancel,.adyen-checkout__payment-method__disable-confirmation__button--cancel:disabled{border-color:transparent}.adyen-checkout__payment-method{background:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-primary,#dbdee2);border-radius:var(--adyen-sdk-border-radius-m,8px);cursor:pointer;position:relative;transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease,border-radius .15s ease;width:100%}.adyen-checkout__payment-method:focus{outline:0}.adyen-checkout__payment-method:hover:not(.adyen-checkout__payment-method--selected){border-color:var(--adyen-sdk-color-outline-primary-hover,#c9cdd3)}.adyen-checkout__payment-method--loading{opacity:.2}.adyen-checkout__payment-method--selected.adyen-checkout__payment-method--loading{opacity:.9}.adyen-checkout__payment-method--confirming .adyen-checkout__payment-method__details__content,.adyen-checkout__payment-method--disabling{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.adyen-checkout__payment-method--disabling{opacity:.3}.adyen-checkout__payment-method--standalone .adyen-checkout__payment-method__radio{display:none}.adyen-checkout__payment-method__header{align-items:center;color:var(--adyen-sdk-color-label-primary,#00112c);display:flex;flex-wrap:nowrap;font-size:var(--adyen-sdk-text-title-font-size,1rem);font-weight:var(--adyen-sdk-text-body-font-weight,400);justify-content:space-between;padding:var(--adyen-sdk-spacer-070,16px);position:relative;transition:background .1s ease-out;width:100%}[dir=rtl] .adyen-checkout__payment-method__header{padding:calc(var(--adyen-sdk-spacer-070, 16px) - var(--adyen-sdk-spacer-020, 4px));padding-right:calc(var(--adyen-sdk-spacer-120, 48px) - var(--adyen-sdk-spacer-020, 4px))}.adyen-checkout__payment-method--standalone .adyen-checkout__payment-method__header{padding:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__payment-method__surcharge{color:var(--adyen-sdk-color-label-secondary,#5c687c);margin-left:var(--adyen-sdk-spacer-020,4px)}.adyen-checkout__payment-method--selected{background:var(--adyen-sdk-color-background-secondary,#f7f7f8);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-secondary,#c9cdd3);cursor:default;transition:opacity .3s ease-out}.adyen-checkout__payment-method--selected .adyen-checkout__payment-method__header{flex-wrap:wrap}.adyen-checkout__payment-method__details{padding:var(--adyen-sdk-spacer-000,0) var(--adyen-sdk-spacer-070,16px);position:relative}.adyen-checkout__payment-method__details__content>:last-child{margin-bottom:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__payment-method__image__wrapper{align-items:center;border-radius:var(--adyen-sdk-border-radius-s,4px);box-shadow:var(--adyen-sdk-shadow-low,0 2px 4px rgba(0,17,44,.04),0 1px 2px rgba(0,17,44,.02));display:flex;height:26px;justify-content:center;overflow:hidden;position:relative;width:var(--adyen-sdk-spacer-110,40px)}.adyen-checkout__payment-method__image{border-radius:var(--adyen-checkout-border-radius-s);display:block;flex-shrink:0;height:100%;overflow:hidden;width:100%}.adyen-checkout__payment-method__brands{display:flex;flex-basis:auto;flex-shrink:1;flex-wrap:wrap;gap:var(--adyen-sdk-spacer-020,4px);height:var(--adyen-sdk-spacer-070,16px);margin:var(--adyen-sdk-spacer-020,4px) var(--adyen-sdk-spacer-000,0);overflow:hidden;text-align:right}.adyen-checkout__payment-method__brands .adyen-checkout__payment-method__brand-number{color:var(--adyen-sdk-color-label-secondary,#5c687c);font-size:var(--adyen-sdk-text-body-font-size,.875rem)}.adyen-checkout__payment-method--selected .adyen-checkout__payment-method__brands{height:auto;overflow:visible;text-align:left}.adyen-checkout__payment-method__brands .adyen-checkout__payment-method__image__wrapper{display:inline-block;height:var(--adyen-sdk-spacer-070,16px);transition:opacity .2s ease-out;width:var(--adyen-sdk-spacer-090,24px)}.adyen-checkout__payment-method__brands .adyen-checkout__payment-method__image__wrapper:last-child{margin:var(--adyen-sdk-spacer-000,0)}.adyen-checkout__payment-method--selected .adyen-checkout__payment-method__brands .adyen-checkout__payment-method__image__wrapper{margin-bottom:var(--adyen-sdk-spacer-020,4px)}.adyen-checkout__payment-method__brands img{display:block;height:100%;width:100%}.adyen-checkout__payment-method__image__wrapper--disabled{opacity:.25}.adyen-checkout__payment-method:hover:not(.adyen-checkout__payment-method--selected) .adyen-checkout__payment-method__radio{box-shadow:0 0 0 var(--adyen-sdk-spacer-010,2px) var(--adyen-sdk-color-outline-primary-hover,#c9cdd3);cursor:pointer}.adyen-checkout__payment-method__name{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.adyen-checkout__payment-method__additional-info{color:var(--adyen-sdk-color-label-secondary,#5c687c);font-size:var(--adyen-sdk-text-caption-font-size,.75rem);font-weight:var(--adyen-sdk-text-body-font-weight,400)}.adyen-checkout__payment-method__name_wrapper{align-items:flex-start;display:flex;flex-direction:column;gap:var(--adyen-sdk-spacer-020,4px);min-width:var(--adyen-sdk-spacer-120,48px);text-align:start}.adyen-checkout__status{align-items:center;background-color:var(--adyen-sdk-color-background-primary,#ffffff);border:var(--adyen-sdk-border-width-s,1px) solid var(--adyen-sdk-color-outline-secondary,#c9cdd3);border-radius:var(--adyen-sdk-border-radius-m,8px);color:var(--adyen-sdk-color-label-primary,#00112c);display:flex;flex-direction:column;font-size:var(--adyen-sdk-text-title-font-size,1rem);height:350px;justify-content:center;margin:0;padding:var(--adyen-sdk-spacer-100,32px);text-align:center}.adyen-checkout__status__icon{margin-bottom:var(--adyen-sdk-spacer-090,24px)}.adyen-checkout__status .adyen-checkout__spinner__wrapper{max-height:88px}.adyen-checkout__dropin{display:flex;flex-direction:column;gap:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout__button--dropin-show-paymentmethods{align-self:start}.adyen-checkout-payment-methods-container{display:flex;flex-direction:column;gap:var(--adyen-sdk-spacer-070,16px)}.adyen-checkout-payment-methods-list-label{color:var(--adyen-sdk-color-label-primary,#00112c);font-size:var(--adyen-sdk-text-subtitle-font-size,1rem);font-weight:var(--adyen-sdk-text-subtitle-stronger-font-weight,600);line-height:var(--adyen-sdk-text-subtitle-line-height,26px)}.adyen-checkout__payment-methods-list{display:flex;flex-direction:column;gap:var(--adyen-sdk-spacer-070,16px);list-style:none;margin:0;padding:0}.adyen-checkout__payment-methods-list--loading{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.adyen-checkout__instant-payment-methods-list{display:flex;flex-wrap:wrap;gap:var(--adyen-sdk-spacer-070,16px);list-style:none;margin:0;padding:0}.adyen-checkout__instant-payment-methods-list li{flex:1 0 calc(50% - var(--adyen-sdk-spacer-070, 16px)/2)}.adyen-checkout__payment-method{display:block}.adyen-checkout__payment-method__details{overflow:hidden}.adyen-checkout__payment-method__image{height:26px;width:var(--adyen-sdk-spacer-110,40px)}[dir=rtl] .adyen-checkout__payment-method__image__wrapper{margin-left:var(--adyen-sdk-spacer-040,8px);margin-right:0}.adyen-checkout-pm-details-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease;visibility:hidden}.adyen-checkout-pm-details-wrapper[aria-hidden=false]{grid-template-rows:1fr;visibility:visible}.adyen-checkout-pm-details-wrapper[aria-hidden=false] .adyen-checkout__payment-method__details{overflow:visible}.adyen-checkout-sr-panel{font-size:.75em;margin-bottom:var(--adyen-sdk-spacer-080,20px)}.adyen-checkout-sr-panel--sr-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}\\n\")","import styleInject from '#style-inject';styleInject(\":root{--straumur__color-primary: #002649;--straumur__color-secondary: #72889d;--straumur__color-secondary-gamma: #eef0f2;--straumur__color-blue-beta: #bce6f3;--straumur__color-blue-gamma: #eff8fa;--straumur__color-red-beta: #d96666;--straumur__color-red-gamma: #fff8f5;--straumur__color-gray-epsilon: #e7e7e7;--straumur__color-cosmos-blue-delta: #cdd8e2;--straumur__color-cosmos-blue-gamma: #e6ebef;--straumur__color-white: #ffffff;--straumur__color-transparent: transparent;--straumur__border-radius-xxs: 4px;--straumur__border-radius-xs: 6px;--straumur__border-radius-s: 8px;--straumur__border-radius-md: 10px;--straumur__border-radius-lg: 12px;--straumur__border-radius-xlg: 14px;--straumur__border-radius-xxlg: 16px;--straumur__space-xxs: 4px;--straumur__space-xs: 6px;--straumur__space-s: 8px;--straumur__space-md: 10px;--straumur__space-lg: 12px;--straumur__space-xlg: 14px;--straumur__space-xxlg: 16px;--straumur__space-3xlg: 18px;--straumur__space-4xlg: 20px;--straumur__space-5xlg: 24px}.straumur__root-component{font-family:AkzidenzGroteskPro,sans-serif;max-width:440px;min-width:320px}.straumur__component *{font-family:inherit}.straumur__render-brand-icons__overflow{color:#72889d}.straumur__component{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:300px;background-color:var(--straumur__color-white);border-radius:var(--straumur__border-radius-xxlg)}\\n\")","const getEnv = (): Env => {\r\n return {\r\n STAGING_BASE_URL: \"https://checkout-api.staging.straumur.is/api/v1/embeddedcheckout\",\r\n PRODUCTION_BASE_URL: \"https://greidslugatt.straumur.is/api/v1/embeddedcheckout\",\r\n\r\n GET_PAYMENT_METHODS_URL: \"payment-methods\",\r\n POST_PAYMENT_URL: \"payment\",\r\n POST_DETAILS_URL: \"details\",\r\n POST_DISABLE_TOKEN_URL: \"disable-token\",\r\n };\r\n};\r\n\r\ninterface Env {\r\n STAGING_BASE_URL: string;\r\n PRODUCTION_BASE_URL: string;\r\n\r\n GET_PAYMENT_METHODS_URL: string;\r\n POST_PAYMENT_URL: string;\r\n POST_DETAILS_URL: string;\r\n POST_DISABLE_TOKEN_URL: string;\r\n}\r\n\r\nexport const env = getEnv();\r\n","import { ICreateDetailsBody, ICreatePaymentBody, IGetPaymentMethodsBody, IPostDisableTokenBody } from \"./models\";\r\nimport { env } from \"../env\";\r\n\r\nfunction getBaseUrl(environment: \"test\" | \"live\"): string {\r\n switch (environment) {\r\n case \"test\":\r\n return env.STAGING_BASE_URL;\r\n case \"live\":\r\n return env.PRODUCTION_BASE_URL;\r\n default:\r\n throw new Error(`Unknown environment: ${environment}`);\r\n }\r\n}\r\n\r\nexport function getPaymentMethods(environment: \"test\" | \"live\", body: IGetPaymentMethodsBody) {\r\n return fetch(`${getBaseUrl(environment)}/${env.GET_PAYMENT_METHODS_URL}`, {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n },\r\n body: JSON.stringify(body),\r\n });\r\n}\r\n\r\nexport function createPaymentRequest(environment: \"test\" | \"live\", body: ICreatePaymentBody) {\r\n return fetch(`${getBaseUrl(environment)}/${env.POST_PAYMENT_URL}`, {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n },\r\n body: JSON.stringify(body),\r\n });\r\n}\r\n\r\nexport function createDetailsRequest(environment: \"test\" | \"live\", body: ICreateDetailsBody) {\r\n return fetch(`${getBaseUrl(environment)}/${env.POST_DETAILS_URL}`, {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n },\r\n body: JSON.stringify(body),\r\n });\r\n}\r\n\r\nexport function postDisableTokenRequest(environment: \"test\" | \"live\", body: IPostDisableTokenBody) {\r\n return fetch(`${getBaseUrl(environment)}/${env.POST_DISABLE_TOKEN_URL}`, {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n },\r\n body: JSON.stringify(body),\r\n });\r\n}\r\n","import { getPaymentMethods } from \"../adapter/straumur-adapter\";\r\nimport { TranslationKey } from \"../localizations/translations\";\r\nimport { StraumurCheckoutPaymentMethods, StraumurCheckoutPaymentMethodsResponse } from \"./models\";\r\n\r\nexport async function setupPaymentMethods(\r\n environment: \"test\" | \"live\",\r\n sessionId: string\r\n): Promise<StraumurCheckoutPaymentMethodsResponse> {\r\n try {\r\n const fetchResponse = await getPaymentMethods(environment, {\r\n sessionId,\r\n });\r\n\r\n if (!fetchResponse.ok) {\r\n const contentType = fetchResponse.headers.get(\"content-type\");\r\n let errorMessage: TranslationKey = \"error.failedToInitializePaymentMethods\";\r\n if (contentType && contentType.includes(\"application/json\")) {\r\n errorMessage = (await fetchResponse.json()).errorMessage;\r\n }\r\n\r\n return {\r\n resultCode: \"Error\",\r\n error: errorMessage,\r\n };\r\n }\r\n\r\n const data: StraumurCheckoutPaymentMethods = await fetchResponse.json();\r\n\r\n return {\r\n resultCode: \"Success\",\r\n ...data,\r\n };\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n } catch (error: any) {\r\n return {\r\n resultCode: \"Error\",\r\n error: \"error.failedToInitializePaymentMethods\",\r\n };\r\n }\r\n}\r\n","import { options as _options } from 'preact';\n\n/** @type {number} */\nlet currentIndex;\n\n/** @type {import('./internal').Component} */\nlet currentComponent;\n\n/** @type {import('./internal').Component} */\nlet previousComponent;\n\n/** @type {number} */\nlet currentHook = 0;\n\n/** @type {Array<import('./internal').Component>} */\nlet afterPaintEffects = [];\n\n// Cast to use internal Options type\nconst options = /** @type {import('./internal').Options} */ (_options);\n\nlet oldBeforeDiff = options._diff;\nlet oldBeforeRender = options._render;\nlet oldAfterDiff = options.diffed;\nlet oldCommit = options._commit;\nlet oldBeforeUnmount = options.unmount;\nlet oldRoot = options._root;\n\nconst RAF_TIMEOUT = 100;\nlet prevRaf;\n\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions._diff = vnode => {\n\tcurrentComponent = null;\n\tif (oldBeforeDiff) oldBeforeDiff(vnode);\n};\n\noptions._root = (vnode, parentDom) => {\n\tif (vnode && parentDom._children && parentDom._children._mask) {\n\t\tvnode._mask = parentDom._children._mask;\n\t}\n\n\tif (oldRoot) oldRoot(vnode, parentDom);\n};\n\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions._render = vnode => {\n\tif (oldBeforeRender) oldBeforeRender(vnode);\n\n\tcurrentComponent = vnode._component;\n\tcurrentIndex = 0;\n\n\tconst hooks = currentComponent.__hooks;\n\tif (hooks) {\n\t\tif (previousComponent === currentComponent) {\n\t\t\thooks._pendingEffects = [];\n\t\t\tcurrentComponent._renderCallbacks = [];\n\t\t\thooks._list.forEach(hookItem => {\n\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t}\n\t\t\t\thookItem._pendingArgs = hookItem._nextValue = undefined;\n\t\t\t});\n\t\t} else {\n\t\t\thooks._pendingEffects.forEach(invokeCleanup);\n\t\t\thooks._pendingEffects.forEach(invokeEffect);\n\t\t\thooks._pendingEffects = [];\n\t\t\tcurrentIndex = 0;\n\t\t}\n\t}\n\tpreviousComponent = currentComponent;\n};\n\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.diffed = vnode => {\n\tif (oldAfterDiff) oldAfterDiff(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tif (c.__hooks._pendingEffects.length) afterPaint(afterPaintEffects.push(c));\n\t\tc.__hooks._list.forEach(hookItem => {\n\t\t\tif (hookItem._pendingArgs) {\n\t\t\t\thookItem._args = hookItem._pendingArgs;\n\t\t\t}\n\t\t\thookItem._pendingArgs = undefined;\n\t\t});\n\t}\n\tpreviousComponent = currentComponent = null;\n};\n\n// TODO: Improve typing of commitQueue parameter\n/** @type {(vnode: import('./internal').VNode, commitQueue: any) => void} */\noptions._commit = (vnode, commitQueue) => {\n\tcommitQueue.some(component => {\n\t\ttry {\n\t\t\tcomponent._renderCallbacks.forEach(invokeCleanup);\n\t\t\tcomponent._renderCallbacks = component._renderCallbacks.filter(cb =>\n\t\t\t\tcb._value ? invokeEffect(cb) : true\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tcommitQueue.some(c => {\n\t\t\t\tif (c._renderCallbacks) c._renderCallbacks = [];\n\t\t\t});\n\t\t\tcommitQueue = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t});\n\n\tif (oldCommit) oldCommit(vnode, commitQueue);\n};\n\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.unmount = vnode => {\n\tif (oldBeforeUnmount) oldBeforeUnmount(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tlet hasErrored;\n\t\tc.__hooks._list.forEach(s => {\n\t\t\ttry {\n\t\t\t\tinvokeCleanup(s);\n\t\t\t} catch (e) {\n\t\t\t\thasErrored = e;\n\t\t\t}\n\t\t});\n\t\tc.__hooks = undefined;\n\t\tif (hasErrored) options._catchError(hasErrored, c._vnode);\n\t}\n};\n\n/**\n * Get a hook's state from the currentComponent\n * @param {number} index The index of the hook to get\n * @param {number} type The index of the hook to get\n * @returns {any}\n */\nfunction getHookState(index, type) {\n\tif (options._hook) {\n\t\toptions._hook(currentComponent, index, currentHook || type);\n\t}\n\tcurrentHook = 0;\n\n\t// Largely inspired by:\n\t// * https://github.com/michael-klein/funcy.js/blob/f6be73468e6ec46b0ff5aa3cc4c9baf72a29025a/src/hooks/core_hooks.mjs\n\t// * https://github.com/michael-klein/funcy.js/blob/650beaa58c43c33a74820a3c98b3c7079cf2e333/src/renderer.mjs\n\t// Other implementations to look at:\n\t// * https://codesandbox.io/s/mnox05qp8\n\tconst hooks =\n\t\tcurrentComponent.__hooks ||\n\t\t(currentComponent.__hooks = {\n\t\t\t_list: [],\n\t\t\t_pendingEffects: []\n\t\t});\n\n\tif (index >= hooks._list.length) {\n\t\thooks._list.push({});\n\t}\n\n\treturn hooks._list[index];\n}\n\n/**\n * @template {unknown} S\n * @param {import('./index').Dispatch<import('./index').StateUpdater<S>>} [initialState]\n * @returns {[S, (state: S) => void]}\n */\nexport function useState(initialState) {\n\tcurrentHook = 1;\n\treturn useReducer(invokeOrReturn, initialState);\n}\n\n/**\n * @template {unknown} S\n * @template {unknown} A\n * @param {import('./index').Reducer<S, A>} reducer\n * @param {import('./index').Dispatch<import('./index').StateUpdater<S>>} initialState\n * @param {(initialState: any) => void} [init]\n * @returns {[ S, (state: S) => void ]}\n */\nexport function useReducer(reducer, initialState, init) {\n\t/** @type {import('./internal').ReducerHookState} */\n\tconst hookState = getHookState(currentIndex++, 2);\n\thookState._reducer = reducer;\n\tif (!hookState._component) {\n\t\thookState._value = [\n\t\t\t!init ? invokeOrReturn(undefined, initialState) : init(initialState),\n\n\t\t\taction => {\n\t\t\t\tconst currentValue = hookState._nextValue\n\t\t\t\t\t? hookState._nextValue[0]\n\t\t\t\t\t: hookState._value[0];\n\t\t\t\tconst nextValue = hookState._reducer(currentValue, action);\n\n\t\t\t\tif (currentValue !== nextValue) {\n\t\t\t\t\thookState._nextValue = [nextValue, hookState._value[1]];\n\t\t\t\t\thookState._component.setState({});\n\t\t\t\t}\n\t\t\t}\n\t\t];\n\n\t\thookState._component = currentComponent;\n\n\t\tif (!currentComponent._hasScuFromHooks) {\n\t\t\tcurrentComponent._hasScuFromHooks = true;\n\t\t\tlet prevScu = currentComponent.shouldComponentUpdate;\n\t\t\tconst prevCWU = currentComponent.componentWillUpdate;\n\n\t\t\t// If we're dealing with a forced update `shouldComponentUpdate` will\n\t\t\t// not be called. But we use that to update the hook values, so we\n\t\t\t// need to call it.\n\t\t\tcurrentComponent.componentWillUpdate = function (p, s, c) {\n\t\t\t\tif (this._force) {\n\t\t\t\t\tlet tmp = prevScu;\n\t\t\t\t\t// Clear to avoid other sCU hooks from being called\n\t\t\t\t\tprevScu = undefined;\n\t\t\t\t\tupdateHookState(p, s, c);\n\t\t\t\t\tprevScu = tmp;\n\t\t\t\t}\n\n\t\t\t\tif (prevCWU) prevCWU.call(this, p, s, c);\n\t\t\t};\n\n\t\t\t// This SCU has the purpose of bailing out after repeated updates\n\t\t\t// to stateful hooks.\n\t\t\t// we store the next value in _nextValue[0] and keep doing that for all\n\t\t\t// state setters, if we have next states and\n\t\t\t// all next states within a component end up being equal to their original state\n\t\t\t// we are safe to bail out for this specific component.\n\t\t\t/**\n\t\t\t *\n\t\t\t * @type {import('./internal').Component[\"shouldComponentUpdate\"]}\n\t\t\t */\n\t\t\t// @ts-ignore - We don't use TS to downtranspile\n\t\t\t// eslint-disable-next-line no-inner-declarations\n\t\t\tfunction updateHookState(p, s, c) {\n\t\t\t\tif (!hookState._component.__hooks) return true;\n\n\t\t\t\t/** @type {(x: import('./internal').HookState) => x is import('./internal').ReducerHookState} */\n\t\t\t\tconst isStateHook = x => !!x._component;\n\t\t\t\tconst stateHooks =\n\t\t\t\t\thookState._component.__hooks._list.filter(isStateHook);\n\n\t\t\t\tconst allHooksEmpty = stateHooks.every(x => !x._nextValue);\n\t\t\t\t// When we have no updated hooks in the component we invoke the previous SCU or\n\t\t\t\t// traverse the VDOM tree further.\n\t\t\t\tif (allHooksEmpty) {\n\t\t\t\t\treturn prevScu ? prevScu.call(this, p, s, c) : true;\n\t\t\t\t}\n\n\t\t\t\t// We check whether we have components with a nextValue set that\n\t\t\t\t// have values that aren't equal to one another this pushes\n\t\t\t\t// us to update further down the tree\n\t\t\t\tlet shouldUpdate = hookState._component.props !== p;\n\t\t\t\tstateHooks.forEach(hookItem => {\n\t\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\t\tconst currentValue = hookItem._value[0];\n\t\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t\t\thookItem._nextValue = undefined;\n\t\t\t\t\t\tif (currentValue !== hookItem._value[0]) shouldUpdate = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn prevScu\n\t\t\t\t\t? prevScu.call(this, p, s, c) || shouldUpdate\n\t\t\t\t\t: shouldUpdate;\n\t\t\t}\n\n\t\t\tcurrentComponent.shouldComponentUpdate = updateHookState;\n\t\t}\n\t}\n\n\treturn hookState._nextValue || hookState._value;\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {unknown[]} args\n * @returns {void}\n */\nexport function useEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 3);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent.__hooks._pendingEffects.push(state);\n\t}\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {unknown[]} args\n * @returns {void}\n */\nexport function useLayoutEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 4);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent._renderCallbacks.push(state);\n\t}\n}\n\n/** @type {(initialValue: unknown) => unknown} */\nexport function useRef(initialValue) {\n\tcurrentHook = 5;\n\treturn useMemo(() => ({ current: initialValue }), []);\n}\n\n/**\n * @param {object} ref\n * @param {() => object} createHandle\n * @param {unknown[]} args\n * @returns {void}\n */\nexport function useImperativeHandle(ref, createHandle, args) {\n\tcurrentHook = 6;\n\tuseLayoutEffect(\n\t\t() => {\n\t\t\tif (typeof ref == 'function') {\n\t\t\t\tconst result = ref(createHandle());\n\t\t\t\treturn () => {\n\t\t\t\t\tref(null);\n\t\t\t\t\tif (result && typeof result == 'function') result();\n\t\t\t\t};\n\t\t\t} else if (ref) {\n\t\t\t\tref.current = createHandle();\n\t\t\t\treturn () => (ref.current = null);\n\t\t\t}\n\t\t},\n\t\targs == null ? args : args.concat(ref)\n\t);\n}\n\n/**\n * @template {unknown} T\n * @param {() => T} factory\n * @param {unknown[]} args\n * @returns {T}\n */\nexport function useMemo(factory, args) {\n\t/** @type {import('./internal').MemoHookState<T>} */\n\tconst state = getHookState(currentIndex++, 7);\n\tif (argsChanged(state._args, args)) {\n\t\tstate._value = factory();\n\t\tstate._args = args;\n\t\tstate._factory = factory;\n\t}\n\n\treturn state._value;\n}\n\n/**\n * @param {() => void} callback\n * @param {unknown[]} args\n * @returns {() => void}\n */\nexport function useCallback(callback, args) {\n\tcurrentHook = 8;\n\treturn useMemo(() => callback, args);\n}\n\n/**\n * @param {import('./internal').PreactContext} context\n */\nexport function useContext(context) {\n\tconst provider = currentComponent.context[context._id];\n\t// We could skip this call here, but than we'd not call\n\t// `options._hook`. We need to do that in order to make\n\t// the devtools aware of this hook.\n\t/** @type {import('./internal').ContextHookState} */\n\tconst state = getHookState(currentIndex++, 9);\n\t// The devtools needs access to the context object to\n\t// be able to pull of the default value when no provider\n\t// is present in the tree.\n\tstate._context = context;\n\tif (!provider) return context._defaultValue;\n\t// This is probably not safe to convert to \"!\"\n\tif (state._value == null) {\n\t\tstate._value = true;\n\t\tprovider.sub(currentComponent);\n\t}\n\treturn provider.props.value;\n}\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {<T>(value: T, cb?: (value: T) => string | number) => void}\n */\nexport function useDebugValue(value, formatter) {\n\tif (options.useDebugValue) {\n\t\toptions.useDebugValue(\n\t\t\tformatter ? formatter(value) : /** @type {any}*/ (value)\n\t\t);\n\t}\n}\n\n/**\n * @param {(error: unknown, errorInfo: import('preact').ErrorInfo) => void} cb\n * @returns {[unknown, () => void]}\n */\nexport function useErrorBoundary(cb) {\n\t/** @type {import('./internal').ErrorBoundaryHookState} */\n\tconst state = getHookState(currentIndex++, 10);\n\tconst errState = useState();\n\tstate._value = cb;\n\tif (!currentComponent.componentDidCatch) {\n\t\tcurrentComponent.componentDidCatch = (err, errorInfo) => {\n\t\t\tif (state._value) state._value(err, errorInfo);\n\t\t\terrState[1](err);\n\t\t};\n\t}\n\treturn [\n\t\terrState[0],\n\t\t() => {\n\t\t\terrState[1](undefined);\n\t\t}\n\t];\n}\n\n/** @type {() => string} */\nexport function useId() {\n\t/** @type {import('./internal').IdHookState} */\n\tconst state = getHookState(currentIndex++, 11);\n\tif (!state._value) {\n\t\t// Grab either the root node or the nearest async boundary node.\n\t\t/** @type {import('./internal').VNode} */\n\t\tlet root = currentComponent._vnode;\n\t\twhile (root !== null && !root._mask && root._parent !== null) {\n\t\t\troot = root._parent;\n\t\t}\n\n\t\tlet mask = root._mask || (root._mask = [0, 0]);\n\t\tstate._value = 'P' + mask[0] + '-' + mask[1]++;\n\t}\n\n\treturn state._value;\n}\n\n/**\n * After paint effects consumer.\n */\nfunction flushAfterPaintEffects() {\n\tlet component;\n\twhile ((component = afterPaintEffects.shift())) {\n\t\tif (!component._parentDom || !component.__hooks) continue;\n\t\ttry {\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeCleanup);\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeEffect);\n\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t} catch (e) {\n\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t}\n}\n\nlet HAS_RAF = typeof requestAnimationFrame == 'function';\n\n/**\n * Schedule a callback to be invoked after the browser has a chance to paint a new frame.\n * Do this by combining requestAnimationFrame (rAF) + setTimeout to invoke a callback after\n * the next browser frame.\n *\n * Also, schedule a timeout in parallel to the the rAF to ensure the callback is invoked\n * even if RAF doesn't fire (for example if the browser tab is not visible)\n *\n * @param {() => void} callback\n */\nfunction afterNextFrame(callback) {\n\tconst done = () => {\n\t\tclearTimeout(timeout);\n\t\tif (HAS_RAF) cancelAnimationFrame(raf);\n\t\tsetTimeout(callback);\n\t};\n\tconst timeout = setTimeout(done, RAF_TIMEOUT);\n\n\tlet raf;\n\tif (HAS_RAF) {\n\t\traf = requestAnimationFrame(done);\n\t}\n}\n\n// Note: if someone used options.debounceRendering = requestAnimationFrame,\n// then effects will ALWAYS run on the NEXT frame instead of the current one, incurring a ~16ms delay.\n// Perhaps this is not such a big deal.\n/**\n * Schedule afterPaintEffects flush after the browser paints\n * @param {number} newQueueLength\n * @returns {void}\n */\nfunction afterPaint(newQueueLength) {\n\tif (newQueueLength === 1 || prevRaf !== options.requestAnimationFrame) {\n\t\tprevRaf = options.requestAnimationFrame;\n\t\t(prevRaf || afterNextFrame)(flushAfterPaintEffects);\n\t}\n}\n\n/**\n * @param {import('./internal').HookState} hook\n * @returns {void}\n */\nfunction invokeCleanup(hook) {\n\t// A hook cleanup can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\tlet cleanup = hook._cleanup;\n\tif (typeof cleanup == 'function') {\n\t\thook._cleanup = undefined;\n\t\tcleanup();\n\t}\n\n\tcurrentComponent = comp;\n}\n\n/**\n * Invoke a Hook's effect\n * @param {import('./internal').EffectHookState} hook\n * @returns {void}\n */\nfunction invokeEffect(hook) {\n\t// A hook call can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\thook._cleanup = hook._value();\n\tcurrentComponent = comp;\n}\n\n/**\n * @param {unknown[]} oldArgs\n * @param {unknown[]} newArgs\n * @returns {boolean}\n */\nfunction argsChanged(oldArgs, newArgs) {\n\treturn (\n\t\t!oldArgs ||\n\t\toldArgs.length !== newArgs.length ||\n\t\tnewArgs.some((arg, index) => arg !== oldArgs[index])\n\t);\n}\n\n/**\n * @template Arg\n * @param {Arg} arg\n * @param {(arg: Arg) => any} f\n * @returns {any}\n */\nfunction invokeOrReturn(arg, f) {\n\treturn typeof f == 'function' ? f(arg) : f;\n}\n","import styleInject from '#style-inject';styleInject(\".straumur__card-component{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__card-component__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__card-component__content{display:grid;grid-template-columns:26px 40px auto 1fr;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__card-component__radio-selector:checked+.straumur__card-component__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__card-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__card-component__content:hover .straumur__card-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component--circle:after{content:\\\"\\\";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__card-component__radio-selector:checked+.straumur__card-component__content .straumur__card-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__card-component__radio-selector:checked+.straumur__card-component__content .straumur__card-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__card-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__card-component--brands{display:flex;margin-left:auto;align-items:center;gap:var(--straumur__space-xxs)}.straumur__card-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__card-component__loading-text{display:flex;justify-content:center}.straumur__card-component__radio-selector:checked~.straumur__card-component__expandable{max-height:600px;opacity:1}.straumur__card-component__form{display:flex;padding-top:var(--straumur__space-xxlg);flex-direction:column;gap:var(--straumur__space-5xlg)}.straumur__card-component__form--wrapper{display:flex;flex-direction:column;justify-items:start;position:relative;width:100%}.straumur__card-component__form--wrapper--error{color:var(--straumur__color-red-beta);font-size:12px}.straumur__card-component__form--wrapper--label{transform:translate(var(--straumur__space-md)) translateY(-50%);z-index:1;background:linear-gradient(to top,var(--straumur__color-secondary-gamma) 53%,var(--straumur__color-transparent) 50%);position:absolute;font-weight:500;font-size:14px;padding:0 var(--straumur__space-xxs)}.straumur__card-component__form--wrapper--label--error{color:var(--straumur__color-red-beta);background:linear-gradient(to top,var(--straumur__color-red-gamma) 53%,var(--straumur__color-transparent) 50%)}.straumur__card-component__form--wrapper--label--info{position:absolute;top:33%;right:var(--straumur__space-md)}.straumur__card-component__form--wrapper--input{background:var(--straumur__color-secondary-gamma);color:#00112c;display:block;font-family:inherit;border:1px solid var(--straumur__color-transparent);border-radius:var(--straumur__border-radius-s);font-size:1rem;height:48px;outline:none;padding-left:var(--straumur__space-lg);transition:border .2s ease-out,box-shadow .2s ease-out}.straumur__card-component__form--wrapper--input:hover{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--input--error{background:var(--straumur__color-red-gamma);border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--wrapper--input--error:hover{border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--field-wrapper{display:flex;width:100%;gap:var(--straumur__space-5xlg)}.straumur__card-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-white);cursor:pointer;font-size:1rem;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__card-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid #dbdee2}.straumur__card-component__submit-button:disabled{background:#72889d;border:1px solid #dbdee2;cursor:not-allowed}.straumur__card-component__form--wrapper--label-checkbox{height:38px;display:flex;align-items:center;padding:8px;gap:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);cursor:pointer;user-select:none;transition:background-color .25s ease-in-out}.straumur__card-component__form--wrapper--label-checkbox:hover{background-color:var(--straumur__color-blue-gamma)}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--label-checkbox--checkmark{height:var(--straumur__space-5xlg);width:var(--straumur__space-5xlg);background-color:var(--straumur__color-secondary-gamma);border-radius:var(--straumur__border-radius-xxs);flex-shrink:0;border:1px solid var(--straumur__color-transparent);transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{border:1px solid var(--straumur__color-transparent)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{background-color:var(--straumur__color-blue-beta)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon{height:100%;display:flex;justify-content:center;align-items:center;font-size:9px;opacity:0;visibility:hidden;transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked{opacity:1;visibility:visible}.straumur__card-component__form--wrapper--label-checkbox--checkbox{display:none}\\n\")","import { h } from \"preact\";\r\nimport { createContext } from \"preact\";\r\nimport { useState, useContext } from \"preact/hooks\";\r\nimport { ComponentChildren } from \"preact\";\r\nimport { PaymentMethod } from \"../../models/constants\";\r\nimport { TranslationKey } from \"../../localizations/translations\";\r\n\r\ntype PaymentMethodContextType = {\r\n activePaymentMethod: PaymentMethod | null;\r\n setActivePaymentMethod: (value: PaymentMethod) => void;\r\n activeStoredPaymentMethodId: string | null;\r\n setActiveStoredPaymentMethodId: (value: string) => void;\r\n isPaymentMethodInitialized: Record<PaymentMethod, boolean>;\r\n updatePaymentMethodInitialization: (paymentMethod: PaymentMethod, isInitialized: boolean) => void;\r\n isStoredCardInitialized: Record<string, boolean>;\r\n updateStoredCardInitialization: (storedPaymentMethod: string, isInitialized: boolean) => void;\r\n handleSuccess: (success: TranslationKey) => void;\r\n success: TranslationKey | null;\r\n handleError: (error: TranslationKey) => void;\r\n error: TranslationKey | null;\r\n threeDSecureActive: boolean;\r\n setThreeDSecureActive: (value: boolean) => void;\r\n};\r\n\r\nconst PaymentMethodContext = createContext<PaymentMethodContextType | undefined>(undefined);\r\n\r\nconst defaultIsInitialized: Record<PaymentMethod, boolean> = {\r\n card: false,\r\n storedcard: false,\r\n googlepay: false,\r\n applepay: false,\r\n};\r\n\r\nexport const PaymentMethodGroupContext = ({\r\n children,\r\n initialValue,\r\n}: {\r\n children: ComponentChildren;\r\n initialValue: PaymentMethod | null;\r\n}): h.JSX.Element => {\r\n const [activePaymentMethod, setActivePaymentMethod] = useState(initialValue);\r\n const [activeStoredPaymentMethodId, setActiveStoredPaymentMethodId] = useState<string | null>(null);\r\n const [threeDSecureActive, setThreeDSecureActive] = useState<boolean>(false);\r\n const [isPaymentMethodInitialized, setIsPaymentMethodInitialized] = useState(defaultIsInitialized);\r\n const [isStoredCardInitialized, setIsStoredCardInitialized] = useState<Record<string, boolean>>({});\r\n\r\n const [success, setSuccess] = useState<TranslationKey | null>(null);\r\n const [error, setError] = useState<TranslationKey | null>(null);\r\n\r\n const updatePaymentMethodInitialization = (paymentMethod: PaymentMethod, isInitialized: boolean) => {\r\n setIsPaymentMethodInitialized((prevState) => ({\r\n ...prevState,\r\n [paymentMethod]: isInitialized,\r\n }));\r\n };\r\n\r\n const updateStoredCardInitialization = (storedPaymentMethod: string, isInitialized: boolean) => {\r\n setIsStoredCardInitialized((prevState) => ({\r\n ...prevState,\r\n [storedPaymentMethod]: isInitialized,\r\n }));\r\n };\r\n\r\n const handleError = (error: TranslationKey) => {\r\n setError(error);\r\n };\r\n\r\n const handleSuccess = (success: TranslationKey) => {\r\n setSuccess(success);\r\n };\r\n\r\n return (\r\n <PaymentMethodContext.Provider\r\n value={{\r\n activePaymentMethod,\r\n setActivePaymentMethod,\r\n activeStoredPaymentMethodId,\r\n setActiveStoredPaymentMethodId,\r\n isPaymentMethodInitialized,\r\n updatePaymentMethodInitialization,\r\n isStoredCardInitialized,\r\n updateStoredCardInitialization,\r\n handleSuccess,\r\n success,\r\n handleError,\r\n error,\r\n threeDSecureActive,\r\n setThreeDSecureActive,\r\n }}\r\n >\r\n {children}\r\n </PaymentMethodContext.Provider>\r\n );\r\n};\r\n\r\nexport const usePaymentMethodGroup = (): PaymentMethodContextType => {\r\n const context = useContext(PaymentMethodContext);\r\n if (context === undefined) {\r\n throw new Error(\"usePaymentMethodGroup must be used within a PaymentMethodGroup\");\r\n }\r\n return context as PaymentMethodContextType;\r\n};\r\n","var n,l,u,t,i,o,r,f,e,c,s,a,h={},p=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function w(n){var l=n.parentNode;l&&l.removeChild(n)}function _(l,u,t){var i,o,r,f={};for(r in u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return g(l,f,i,o,null)}function g(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(f),f}function m(){return{current:null}}function k(n){return n.children}function b(n,l){this.props=n,this.context=l}function x(n,l){if(null==l)return n.__?x(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?x(n):null}function C(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!P.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(P)}function P(){var n,u,t,o,r,e,c,s;for(i.sort(f);n=i.shift();)n.__d&&(u=i.length,o=void 0,e=(r=(t=n).__v).__e,c=[],s=[],t.__P&&((o=d({},r)).__v=r.__v+1,l.vnode&&l.vnode(o),O(t.__P,o,r,t.__n,t.__P.namespaceURI,32&r.__u?[e]:null,c,null==e?x(r):e,!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,j(c,o,s),o.__e!=e&&C(o)),i.length>u&&i.sort(f));P.__r=0}function S(n,l,u,t,i,o,r,f,e,c,s){var a,v,y,d,w,_=t&&t.__k||p,g=l.length;for(u.__d=e,$(u,l,_),e=u.__d,a=0;a<g;a++)null!=(y=u.__k[a])&&\"boolean\"!=typeof y&&\"function\"!=typeof y&&(v=-1===y.__i?h:_[y.__i]||h,y.__i=a,O(n,y,v,i,o,r,f,e,c,s),d=y.__e,y.ref&&v.ref!=y.ref&&(v.ref&&N(v.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),65536&y.__u||v.__k===y.__k?(e&&\"string\"==typeof y.type&&!n.contains(e)&&(e=x(v)),e=I(y,e,n)):\"function\"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=w}function $(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)r=t+a,null!=(i=n.__k[t]=null==(i=l[t])||\"boolean\"==typeof i||\"function\"==typeof i?null:\"string\"==typeof i||\"number\"==typeof i||\"bigint\"==typeof i||i.constructor==String?g(null,i,null,null,null):y(i)?g(k,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?g(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=L(i,u,r,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,\"function\"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f==r-1?a=f-r:f==r+1?a++:f>r?s>e-r?a+=f-r:a--:f<r&&a++,f!==t+a&&(i.__u|=65536))):(o=u[r])&&null==o.key&&o.__e&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V(o,o,!1),u[r]=null,s--);if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V(o,o))}function I(n,l,u){var t,i;if(\"function\"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=I(t[i],l,u));return l}n.__e!=l&&(u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8===l.nodeType);return l}function H(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(y(n)?n.some(function(n){H(n,l)}):l.push(n)),l}function L(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type&&0==(131072&e.__u))return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++}}return-1}function T(n,l,u){\"-\"===l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||v.test(l)?u:u+\"px\"}function A(n,l,u,t,i){var o;n:if(\"style\"===l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||T(n.style,l,\"\");if(u)for(l in u)t&&u[l]===t[l]||T(n.style,l,u[l])}else if(\"o\"===l[0]&&\"n\"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,\"$1\")),l=l.toLowerCase()in n||\"onFocusOut\"===l||\"onFocusIn\"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=e,n.addEventListener(l,o?s:c,o)):n.removeEventListener(l,o?s:c,o);else{if(\"http://www.w3.org/2000/svg\"==i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!=l&&\"height\"!=l&&\"href\"!=l&&\"list\"!=l&&\"form\"!=l&&\"tabIndex\"!=l&&\"download\"!=l&&\"rowSpan\"!=l&&\"colSpan\"!=l&&\"role\"!=l&&\"popover\"!=l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!==l[4]?n.removeAttribute(l):n.setAttribute(l,\"popover\"==l&&1==u?\"\":u))}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=e++;else if(u.t<t.u)return;return t(l.event?l.event(u):u)}}}function O(n,u,t,i,o,r,f,e,c,s){var a,h,p,v,w,_,g,m,x,C,M,P,$,I,H,L,T=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l.__b)&&a(u);n:if(\"function\"==typeof T)try{if(m=u.props,x=\"prototype\"in T&&T.prototype.render,C=(a=T.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?g=(h=u.__c=t.__c).__=h.__E:(x?u.__c=h=new T(m,M):(u.__c=h=new b(m,M),h.constructor=T,h.render=q),C&&C.sub(h),h.props=m,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d({},h.__s)),d(h.__s,T.getDerivedStateFromProps(m,h.__s))),v=h.props,w=h.state,h.__v=u,p)x&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(x&&null==T.getDerivedStateFromProps&&m!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,M)||u.__v===t.__v)){for(u.__v!==t.__v&&(h.props=m,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u)}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,M),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,w,_)})}if(h.context=M,h.props=m,h.__P=n,h.__e=!1,$=l.__r,I=0,x){for(h.state=h.__s,h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++I<25);h.state=h.__s,null!=h.getChildContext&&(i=d(d({},i),h.getChildContext())),x&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,w)),S(n,y(L=null!=a&&a.type===k&&null==a.key?a.props.children:a)?L:[L],u,t,i,o,r,f,e,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&f.push(h),g&&(h.__E=h.__=null)}catch(n){u.__v=null,c||null!=r?(u.__e=e,u.__u|=c?160:32,r[r.indexOf(e)]=null):(u.__e=t.__e,u.__k=t.__k),l.__e(n,u,t)}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=z(t.__e,u,t,i,o,r,f,c,s);(a=l.diffed)&&a(u)}function j(n,u,t){u.__d=void 0;for(var i=0;i<t.length;i++)N(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function z(l,u,t,i,o,r,f,e,c){var s,a,p,v,d,_,g,m=t.props,k=u.props,b=u.type;if(\"svg\"===b?o=\"http://www.w3.org/2000/svg\":\"math\"===b?o=\"http://www.w3.org/1998/Math/MathML\":o||(o=\"http://www.w3.org/1999/xhtml\"),null!=r)for(s=0;s<r.length;s++)if((d=r[s])&&\"setAttribute\"in d==!!b&&(b?d.localName===b:3===d.nodeType)){l=d,r[s]=null;break}if(null==l){if(null===b)return document.createTextNode(k);l=document.createElementNS(o,b,k.is&&k),r=null,e=!1}if(null===b)m===k||e&&l.data===k||(l.data=k);else{if(r=r&&n.call(l.childNodes),m=t.props||h,!e&&null!=r)for(m={},s=0;s<l.attributes.length;s++)m[(d=l.attributes[s]).name]=d.value;for(s in m)if(d=m[s],\"children\"==s);else if(\"dangerouslySetInnerHTML\"==s)p=d;else if(\"key\"!==s&&!(s in k)){if(\"value\"==s&&\"defaultValue\"in k||\"checked\"==s&&\"defaultChecked\"in k)continue;A(l,s,null,d,o)}for(s in k)d=k[s],\"children\"==s?v=d:\"dangerouslySetInnerHTML\"==s?a=d:\"value\"==s?_=d:\"checked\"==s?g=d:\"key\"===s||e&&\"function\"!=typeof d||m[s]===d||A(l,s,d,m[s],o);if(a)e||p&&(a.__html===p.__html||a.__html===l.innerHTML)||(l.innerHTML=a.__html),u.__k=[];else if(p&&(l.innerHTML=\"\"),S(l,y(v)?v:[v],u,t,i,\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":o,r,f,r?r[0]:t.__k&&x(t,0),e,c),null!=r)for(s=r.length;s--;)null!=r[s]&&w(r[s]);e||(s=\"value\",void 0!==_&&(_!==l[s]||\"progress\"===b&&!_||\"option\"===b&&_!==m[s])&&A(l,s,_,m[s],o),s=\"checked\",void 0!==g&&g!==l[s]&&A(l,s,g,m[s],o))}return l}function N(n,u,t){try{\"function\"==typeof n?n(u):n.current=u}catch(n){l.__e(n,t)}}function V(n,u,t){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||N(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&V(i[o],u,t||\"function\"!=typeof n.type);t||null==n.__e||w(n.__e),n.__c=n.__=n.__e=n.__d=void 0}function q(n,l,u){return this.constructor(n,u)}function B(u,t,i){var o,r,f,e;l.__&&l.__(u,t),r=(o=\"function\"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],O(t,u=(!o&&i||t).__k=_(k,null,[u]),r||h,h,t.namespaceURI,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),j(f,u,e)}function D(n,l){B(n,l,D)}function E(l,u,t){var i,o,r,f,e=d({},l.props);for(r in l.type&&l.type.defaultProps&&(f=l.type.defaultProps),u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:e[r]=void 0===u[r]&&void 0!==f?f[r]:u[r];return arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),g(l.type,e,i||l.key,o||l.ref,null)}function G(n,l){var u={__c:l=\"__cC\"+a++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,M(n)})},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=p.slice,l={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==n.constructor},b.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),\"function\"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},b.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},b.prototype.render=k,i=[],r=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},P.__r=0,e=0,c=F(!1),s=F(!0),a=0;export{b as Component,k as Fragment,E as cloneElement,G as createContext,_ as createElement,m as createRef,_ as h,D as hydrate,t as isValidElement,l as options,B as render,H as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=n,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function d(n,t){c.__h&&c.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function h(n){return o=1,p(D,n)}function p(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return!!n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function y(n,u){var i=d(t++,3);!c.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__H.__h.push(i))}function _(n,u){var i=d(t++,4);!c.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__h.push(i))}function A(n){return o=5,T(function(){return{current:n}},[])}function F(n,t,r){o=6,_(function(){return\"function\"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))}function T(n,r){var u=d(t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return o=8,T(function(){return n},t)}function x(n){var u=r.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P(n,t){c.useDebugValue&&c.useDebugValue(t?t(n):n)}function b(n){var u=d(t++,10),i=h();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=d(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function j(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[]}catch(t){n.__H.__h=[],c.__e(t,n.__v)}}c.__b=function(n){r=null,e&&e(n)},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t)},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],t=0)),u=r},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),u=r=null},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],c.__e(r,n.__v)}}),l&&l(n,t)},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&c.__e(t,r.__v))};var k=\"function\"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return\"function\"==typeof t?t(n):t}export{q as useCallback,x as useContext,P as useDebugValue,y as useEffect,b as useErrorBoundary,g as useId,F as useImperativeHandle,_ as useLayoutEffect,T as useMemo,p as useReducer,A as useRef,h as useState};\n//# sourceMappingURL=hooks.module.js.map\n","import { CVCPolicyType, DatePolicyType } from './types';\n\nexport const ENCRYPTED = 'encrypted';\n\nexport const ENCRYPTED_CARD_NUMBER = 'encryptedCardNumber';\nexport const ENCRYPTED_EXPIRY_DATE = 'encryptedExpiryDate';\nexport const ENCRYPTED_EXPIRY_MONTH = 'encryptedExpiryMonth';\nexport const ENCRYPTED_EXPIRY_YEAR = 'encryptedExpiryYear';\nexport const ENCRYPTED_SECURITY_CODE = 'encryptedSecurityCode';\nexport const ENCRYPTED_PWD_FIELD = 'encryptedPassword';\nexport const ENCRYPTED_PIN_FIELD = 'encryptedPin';\n\nexport const ENCRYPTED_SECURITY_CODE_3_DIGITS = 'encryptedSecurityCode3digits';\nexport const ENCRYPTED_SECURITY_CODE_4_DIGITS = 'encryptedSecurityCode4digits';\n\nexport const GIFT_CARD = 'giftcard';\n\nexport const SF_VERSION = '5.5.3';\n\nexport const DEFAULT_CARD_GROUP_TYPES = ['amex', 'mc', 'visa'];\n\nexport const NON_CREDIT_CARD_TYPE_SECURED_FIELDS = [GIFT_CARD]; // Maybe, sometime in the future will include 'sepa' & 'sepadirectdebit'\n\n// Credit card (CardInput) related securedFields (based on the data-cse attribute)\nexport const CREDIT_CARD_SF_FIELDS = [\n ENCRYPTED_CARD_NUMBER,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR,\n ENCRYPTED_SECURITY_CODE,\n ENCRYPTED_PWD_FIELD\n // ENCRYPTED_PIN_FIELD,// probably redundant - it was an alt. name for KCP's encryptedPassword. But maybe has a role to play if we ever encrypt ibans.\n];\n\n/** A list of all the data-cse attributes that relate to securedFields (as found in card, giftcard) */\nexport const ALL_SECURED_FIELDS = CREDIT_CARD_SF_FIELDS;\n\n// Card components created as: checkout.create({BRAND}) e.g. checkout.create('bcmc')\n// - which are dedicated to a single, core, brand e.g. 'bcmc' BUT which can in effect handle multiple brands e.g. \"bcmc\", \"maestro\", \"visa\"\nexport const DEDICATED_CARD_COMPONENTS = ['bcmc'];\n\nexport const REQUIRED = 'required';\nexport const OPTIONAL = 'optional';\nexport const HIDDEN = 'hidden';\n\nexport const CVC_POLICY_REQUIRED: CVCPolicyType = REQUIRED;\nexport const CVC_POLICY_OPTIONAL: CVCPolicyType = OPTIONAL;\nexport const CVC_POLICY_HIDDEN: CVCPolicyType = HIDDEN;\n\nexport const DATE_POLICY_REQUIRED: DatePolicyType = REQUIRED;\nexport const DATE_POLICY_OPTIONAL: DatePolicyType = OPTIONAL;\nexport const DATE_POLICY_HIDDEN: DatePolicyType = HIDDEN;\n\nexport const DATA_ENCRYPTED_FIELD_ATTR = 'data-cse';\nexport const DATA_INFO = 'data-info';\nexport const DATA_UID = 'data-uid';\n\nexport const BRAND_ICON_UI_EXCLUSION_LIST = ['accel', 'pulse', 'star', 'nyce'];\n\nexport const BRAND_READABLE_NAME_MAP = {\n visa: 'VISA',\n mc: 'MasterCard',\n amex: 'American Express',\n discover: 'Discover',\n cup: 'China Union Pay',\n jcb: 'JCB',\n diners: 'Diners Club',\n maestro: 'Maestro',\n bcmc: 'Bancontact card',\n bijcard: 'de Bijenkorf Card'\n};\n\nexport const SF_FIELDS_MAP = {\n [ENCRYPTED_CARD_NUMBER]: 'cardNumber', // ph\n [ENCRYPTED_EXPIRY_DATE]: 'expiryDate', // ph\n [ENCRYPTED_SECURITY_CODE]: 'securityCode',\n [ENCRYPTED_EXPIRY_MONTH]: 'expiryMonth', // ph\n [ENCRYPTED_EXPIRY_YEAR]: 'expiryYear', // ph\n //\n [ENCRYPTED_PWD_FIELD]: 'password',\n //\n [ENCRYPTED_SECURITY_CODE_3_DIGITS]: 'securityCodeThreeDigits', // ph\n [ENCRYPTED_SECURITY_CODE_4_DIGITS]: 'securityCodeFourDigits' // ph\n};\n\n/** time within which we expect to receive a \"configured\" message from a securedField iframe, once it has registered as having loaded */\nexport const SF_CONFIG_TIMEOUT = 6000;\n","/**\n * returns the indicated property of an object, if it exists.\n *\n * @param object - The object to query\n * @param path - The property name or path to the property\n * @returns The value at `obj[p]`.\n\n * @example\n * ```\n * getProp({x: 100}, 'x'); //=> 100\n * getProp({}, 'x'); //=> undefined\n * ```\n */\nconst getProp = (object: any, path: string): any => {\n const splitPath = path.split('.');\n const reducer = (xs, x) => (xs && xs[x] ? xs[x] : undefined);\n\n return splitPath.reduce(reducer, object);\n};\n\nexport default getProp;\n","import {\n ENCRYPTED_CARD_NUMBER,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR,\n ENCRYPTED_PWD_FIELD,\n ENCRYPTED_SECURITY_CODE\n} from '../../components/internal/SecuredFields/lib/constants';\n\nexport const ARIA_ERROR_SUFFIX = '-ariaError';\nexport const ARIA_CONTEXT_SUFFIX = '-ariaContext';\n\nexport const ERROR_ACTION_FOCUS_FIELD = 'focusField';\nexport const ERROR_ACTION_BLUR_SCENARIO = 'notValidating:blurScenario';\nexport const ERROR_FIELD_REQUIRED = 'field.error.required';\nexport const ERROR_FIELD_INVALID = 'field.error.invalid';\n\nexport const ERROR_INVALID_FORMAT_EXPECTS = 'invalid.format.expects';\nexport const CREDITCARD_HOLDER_NAME_INVALID = 'creditCard.holderName.invalid';\nexport const CREDITCARD_TAX_NUMBER_INVALID = 'creditCard.taxNumber.invalid';\nexport const BOLETO_SOCIAL_SECURITY_NUMBER_INVALID = 'boleto.socialSecurityNumber.invalid';\n\nexport enum ErrorCodePrefixes {\n CC_NUM = 'cc.num',\n CC_DAT = 'cc.dat',\n CC_MTH = 'cc.mth',\n CC_YR = 'cc.yr',\n CC_CVC = 'cc.cvc',\n KCP_PWD = 'kcp.pwd'\n}\n\n/**\n * For SecuredFields\n * Human readable error strings mapped to the codes, used as keys, in the translations files\n */\nexport enum SF_ErrorCodes {\n ERROR_MSG_INCOMPLETE_FIELD = 'err.gen.9100',\n ERROR_MSG_INVALID_FIELD = 'err.gen.9101',\n\n ERROR_MSG_LUHN_CHECK_FAILED = `${ErrorCodePrefixes.CC_NUM}.902`,\n ERROR_MSG_EMPTY_PAN = `${ErrorCodePrefixes.CC_NUM}.900`,\n ERROR_MSG_UNSUPPORTED_CARD_ENTERED = `${ErrorCodePrefixes.CC_NUM}.903`,\n ERROR_MSG_INCORRECTLY_FILLED_PAN = `${ErrorCodePrefixes.CC_NUM}.901`, // 'Enter the complete card number'\n\n ERROR_MSG_CARD_TOO_OLD = `${ErrorCodePrefixes.CC_DAT}.912`,\n ERROR_MSG_CARD_TOO_FAR_IN_FUTURE = `${ErrorCodePrefixes.CC_DAT}.913`,\n ERROR_MSG_CARD_EXPIRES_TOO_SOON = `${ErrorCodePrefixes.CC_DAT}.914`,\n ERROR_MSG_EMPTY_DATE = `${ErrorCodePrefixes.CC_DAT}.910`,\n ERROR_MSG_INCORRECTLY_FILLED__DATE = `${ErrorCodePrefixes.CC_DAT}.911`,\n\n ERROR_MSG_EMPTY_YEAR = `${ErrorCodePrefixes.CC_YR}.917`,\n ERROR_MSG_INCORRECTLY_FILLED_YEAR = `${ErrorCodePrefixes.CC_YR}.918`,\n\n // ERROR_MSG_INCORRECTLY_FILLED_MONTH= `cc.mth.916`,\n ERROR_MSG_EMPTY_MONTH = `${ErrorCodePrefixes.CC_MTH}.915`,\n\n ERROR_MSG_EMPTY_CVC = `${ErrorCodePrefixes.CC_CVC}.920`,\n ERROR_MSG_INCORRECTLY_FILLED_CVC = `${ErrorCodePrefixes.CC_CVC}.921`,\n\n ERROR_MSG_EMPTY_KCP_PWD = `${ErrorCodePrefixes.KCP_PWD}.940`,\n ERROR_MSG_INCORRECTLY_FILLED_KCP_PWD = `${ErrorCodePrefixes.KCP_PWD}.941`\n}\n\nexport const EMPTY_FIELD_ERROR_MESSAGES = {\n [ENCRYPTED_CARD_NUMBER]: SF_ErrorCodes.ERROR_MSG_EMPTY_PAN,\n [ENCRYPTED_EXPIRY_DATE]: SF_ErrorCodes.ERROR_MSG_EMPTY_DATE,\n [ENCRYPTED_EXPIRY_MONTH]: SF_ErrorCodes.ERROR_MSG_EMPTY_MONTH,\n [ENCRYPTED_EXPIRY_YEAR]: SF_ErrorCodes.ERROR_MSG_EMPTY_YEAR,\n [ENCRYPTED_SECURITY_CODE]: SF_ErrorCodes.ERROR_MSG_EMPTY_CVC,\n [ENCRYPTED_PWD_FIELD]: SF_ErrorCodes.ERROR_MSG_EMPTY_KCP_PWD\n};\n","// ROUTINES USED IN SecuredFieldsProvider.componentDidMount TO DETECT & MAP FIELD NAMES ///////////\nimport {\n CVC_POLICY_HIDDEN,\n CVC_POLICY_OPTIONAL,\n DATE_POLICY_HIDDEN,\n DATE_POLICY_OPTIONAL,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR,\n ENCRYPTED_SECURITY_CODE\n} from '../lib/constants';\nimport getProp from '../../../../utils/getProp';\nimport { EMPTY_FIELD_ERROR_MESSAGES } from '../../../../core/Errors/constants';\n\n/**\n * Make an array of encrypted field names based on the value of the 'data-cse' attribute of elements in the rootNode\n */\nexport const getFields = rootNode => {\n if (rootNode) {\n return Array.prototype.slice.call(rootNode.querySelectorAll('[data-cse*=\"encrypted\"]')).map(f => f.getAttribute('data-cse'));\n }\n return [];\n};\n\n/**\n * If, visually, we're dealing with a single date field (expiryDate) we still need separate entries\n * for expiryMonth & expiryYear - since that is how the values will be delivered from securedFields\n */\nexport const validFieldsReducer = (acc, cur) => {\n if (cur === ENCRYPTED_EXPIRY_DATE) {\n acc[ENCRYPTED_EXPIRY_MONTH] = false;\n acc[ENCRYPTED_EXPIRY_YEAR] = false;\n } else {\n acc[cur] = false;\n }\n\n return acc;\n};\n// -- end ROUTINES USED IN SecuredFieldsProvider.componentDidMount --------------------------------\n\n// ROUTINES USED IN SecuredFieldsProvider.showValidation TO GENERATE ERRORS ///////////\n/**\n * If, visually, we're dealing with a single date field (expiryDate) remap the separate entries we have\n * for the valid states of expiryMonth & expiryYear back to the single key we use to an store an error\n * i.e `\"encryptedExpiryMonth\" & \"encryptedExpiryYear\" => \"encryptedExpiryDate\"`\n */\nconst mapDateFields = (field, numDateFields) => {\n const isDateField = field === ENCRYPTED_EXPIRY_MONTH || field === ENCRYPTED_EXPIRY_YEAR;\n return numDateFields === 1 && isDateField ? ENCRYPTED_EXPIRY_DATE : field;\n};\n\n/**\n * Skip generating an error for an optional field, unless it is already in error\n */\nconst skipOptionalFields = (field, state, fieldNames) => {\n // console.log('\\n### utils::skipOptionalField3:: examining field=', field);\n const { isFieldOfType, fieldIsValid } = fieldNames.reduce(\n (acc, fieldName) => {\n if (!acc.isFieldOfType) {\n // console.log('### utils:: fieldName:: ', fieldName, 'match=', field === fieldName);\n acc.isFieldOfType = field === fieldName;\n acc.fieldIsValid = !state.errors[fieldName];\n }\n return acc;\n },\n { isFieldOfType: false, fieldIsValid: false }\n );\n\n const policyType = field === ENCRYPTED_SECURITY_CODE ? 'cvcPolicy' : 'expiryDatePolicy';\n\n const policyOptional = policyType === 'cvcPolicy' ? CVC_POLICY_OPTIONAL : DATE_POLICY_OPTIONAL;\n const policyHidden = policyType === 'cvcPolicy' ? CVC_POLICY_HIDDEN : DATE_POLICY_HIDDEN;\n\n // if policy != required\n return (state[policyType] === policyOptional || state[policyType] === policyHidden) && fieldIsValid && isFieldOfType ? null : field;\n};\n\nexport const getErrorReducer = (numDateFields, state) => (acc, field) => {\n // We're only interested in the non-valid fields from the state.valid object...\n let val =\n state.valid[field] !== true\n ? mapDateFields(field, numDateFields) // Map the keys we use for the valid state to the key(s) we use for the error state\n : null;\n\n // Skip error generation for optional/hidden CVC & Date unless the fields are already in error\n val = skipOptionalFields(val, state, [ENCRYPTED_SECURITY_CODE, ENCRYPTED_EXPIRY_DATE, ENCRYPTED_EXPIRY_MONTH, ENCRYPTED_EXPIRY_YEAR]);\n\n // console.log('### utils:::: ############# val=', val);\n\n if (val && !acc.includes(val)) acc.push(val);\n\n return acc;\n};\n\n/**\n * Create an object suitable for sending to our handleOnError function\n */\nexport const getErrorObject = (fieldType, rootNode, state) => {\n // Get existing error OR field is empty in which case get field specific msg OR use default\n const error = getProp(state, `errors.${fieldType}`) || EMPTY_FIELD_ERROR_MESSAGES[fieldType];\n return {\n rootNode,\n fieldType,\n error,\n type: 'card'\n };\n};\n// -- end ROUTINES USED IN SecuredFieldsProvider.showValidation -----------------------\n","import { CSFSetupObject, CSFConfigObject, CSFCallbacksConfig, CSFStateObject } from './types';\nimport { SFFeedbackObj, SendBrandObject, SendExpiryDateObject, CVCPolicyType, DatePolicyType, SFFieldType } from '../types';\nimport { createSecuredFields } from './extensions/createSecuredFields';\nimport processBrand from './partials/processBrand';\nimport handleBrandFromBinLookup from './extensions/handleBrandFromBinLookup';\n\nabstract class AbstractCSF {\n // Set in CSF\n protected callbacks: CSFCallbacksConfig;\n protected config: CSFConfigObject;\n protected props: CSFSetupObject;\n protected state: CSFStateObject;\n protected validateForm: () => void;\n protected handleBrandFromBinLookup: typeof handleBrandFromBinLookup;\n protected callbacksHandler: (callbacksObj: object) => void;\n protected configHandler: (props: CSFSetupObject) => void;\n protected createCardSecuredFields: (securedFields: HTMLElement[], cvcPolicy: CVCPolicyType, expiryDatePolicy: DatePolicyType) => Promise<any>;\n protected createNonCardSecuredFields: (securedFields: HTMLElement[]) => Promise<any>;\n protected createSecuredFields: typeof createSecuredFields;\n protected destroySecuredFields: () => void;\n protected handleIOSTouchEvents: () => void;\n protected destroyTouchendListener: () => void;\n protected destroyTouchstartListener: () => void;\n protected handleBinValue: (pFeedbackObj: SFFeedbackObj) => void;\n protected handleEncryption: (pFeedbackObj: SFFeedbackObj) => void;\n protected handleFocus: (pFeedbackObj: SFFeedbackObj) => void;\n protected handleIframeConfigFeedback: (pFeedbackObj) => boolean;\n protected handleValidation: (pFeedbackObj: SFFeedbackObj) => void;\n protected handleSFShiftTab: (fieldType: string) => void;\n protected handleShiftTab: (fieldType: string) => void;\n protected isConfigured: () => void;\n protected postMessageToAllIframes: (pDataObj: object) => void;\n protected processAutoComplete: (pFeedbackObj: SFFeedbackObj) => void;\n protected processBrand: typeof processBrand;\n protected sendBrandToCardSF: (brandObj: SendBrandObject) => void;\n protected sendExpiryDatePolicyToSF: (dateObj: SendExpiryDateObject) => void;\n protected setFocusOnFrame: (pFieldType: SFFieldType, doLog?: boolean) => void;\n protected setupSecuredField: (pItem: HTMLElement) => void;\n protected touchendListener: (e: Event) => void;\n protected touchstartListener: () => void;\n protected hasGenuineTouchEvents: boolean;\n // Set in createSecuredFields\n protected encryptedAttrName: string;\n protected hasRedundantCVCField: boolean;\n protected isSingleBrandedCard: boolean;\n protected securityCode: string;\n // --\n protected constructor(setupObj: CSFSetupObject) {\n this.props = setupObj;\n this.state = {} as any as CSFStateObject;\n\n // Initialise storage objects\n this.config = {} as any as CSFConfigObject; // {} as ConfigObject fails in linting\n this.callbacks = {} as any as CSFCallbacksConfig;\n }\n}\nexport default AbstractCSF;\n","/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n * @internal\n */\nconst objToString = Object.prototype.toString;\n\n/**\n * Checks if `prop` is classified as an `Array` primitive or object.\n * @internal\n * @param prop - The value to check.\n * @returns Returns `true` if `prop` is correctly classified, else `false`.\n * @example\n * ```\n * isArray([1, 2, 3]);\n * // => true\n *\n * isArray(1);\n * // => false\n * ```\n */\nexport function isArray(prop) {\n return typeof prop === 'object' && prop !== null && Object.prototype.toString.call(prop) === '[object Array]';\n}\n\n/**\n * The function existy is meant to define the existence of something.\n * Using the loose inequality operator (!=), it is possible to distinguish between null, undefined, and everything else.\n * @internal\n * @param x -\n * @returns\n */\nexport function existy(x) {\n return x != null;\n}\n\n/**\n * Used to determine if something should be considered a synonym for true\n * NOTE: The number zero is considered “truthy” by design as is '' & `{}`.\n * If you wish to retain the behavior where 0 is a synonym for false, then do not use truthy where you might expect 0\n * So - returns true if something is not false, undefined or null\n * @internal\n * @param x -\n * @returns\n */\nexport function truthy(x) {\n return x !== false && existy(x);\n}\n\n/**\n * Checks if `value` is object-like.\n * (FROM lodash.3.10.1)\n * @internal\n * @param value - The value to check.\n * @returns Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value === 'object';\n}\n\n/**\n * @internal\n * Checks if `value` is classified as a `Number` primitive or object.\n * NOTE: `Infinity`, `-Infinity`, and `NaN` are classified as numbers\n * (FROM lodash.3.10.1)\n * @param value - The value to check.\n * @returns Returns `true` if `value` is correctly classified, else `false`.\n * @example\n * ```\n * isNumber(8.4);\n * // => true\n *\n * isNumber(NaN);\n * // => true\n *\n * isNumber('8.4');\n * // => false\n * ```\n */\nfunction isNumber(value) {\n const numberTag = '[object Number]';\n return typeof value === 'number' || (isObjectLike(value) && objToString.call(value) === numberTag);\n}\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n * (FROM lodash.3.10.1)\n * @internal\n * @param value - The value to check.\n * @returns Returns `true` if `value` is correctly classified, else `false`.\n * @example\n * ```\n * isString('abc');\n * // => true\n *\n * isString(1);\n * // => false\n * ```\n */\nfunction isString(value) {\n const stringTag = '[object String]';\n return typeof value === 'string' || (isObjectLike(value) && objToString.call(value) === stringTag);\n}\n\n/**\n * Returns true if x is:\n * null, undefined, false, 0, NaN, empty object or array, empty string\n * @param x -\n * @example\n * ```\n * falsy(0) // => true\n * falsy('') // => true\n * falsy({}) // => true\n * falsy([]) // => true\n * falsy(false) // => true\n * falsy(NaN) // => true\n * falsy(null) // => true\n * falsy(undefined) // => true\n *\n * falsy(1) // => false\n * falsy('d') // => false\n * falsy({type:\"kin\"}) // => false\n * falsy([6]) // => false\n * falsy(true) // => false\n * ```\n */\nexport function falsy(x) {\n // Is null, undefined or false\n if (!truthy(x)) {\n return true;\n }\n\n // = 0 || NaN\n if (isNumber(x)) {\n if (x === 0 || Number.isNaN(x)) {\n return true;\n }\n }\n\n // empty array or string\n if ((isArray(x) || isString(x)) && x.length === 0) {\n return true;\n }\n\n // empty object\n if (isObjectLike(x) && Object.keys(x).length === 0) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Inverse of falsy - returns true if x is NOT null, undefined, false, 0, NaN, empty object or array, empty string\n * @param x -\n */\nexport function notFalsy(x) {\n return !falsy(x);\n}\n\n/**\n * 'Destructures' properties from object - returns a new object only containing those properties that were asked for (including if those properties\n * have values that are falsy: null, undefined, false, '').\n *\n * @param args - property names to select: can be either 'regular' arguments (comma separated list) or an array\n * @returns - an object with a function 'from' that accepts a single argument - the object from which to choose properties.\n * This function returns a new object - a copy of the original but only including the desired properties\n *\n * @example const strippedObj = pick('cardType', 'securityCode').from(cardObject);\n * @example const strippedObj = pick(['cardType', 'securityCode']).from(cardObject);\n */\nexport function pick(...args) {\n const myArgs = isArray(args[0]) ? args[0] : args;\n return {\n from: obj => {\n return myArgs.map(k => (k in obj ? { [k]: obj[k] } : {})).reduce((res, o) => ({ ...res, ...o }), {});\n }\n };\n}\n\n/**\n *'Destructures' properties from object, returning a new object containing all the original objects properties except those that were specifically rejected\n *\n * @param args - property names to reject: can be either 'regular' arguments (comma separated list) or an array\n * @returns - an object with a function 'from' that accepts a single argument - the object from which to reject properties.\n * This function returns a new object - a copy of the original but excluding the selected properties\n *\n * @example const strippedObj = reject('permittedLengths', 'pattern', 'startingRules').from(cardObject);\n * @example const strippedObj = reject(['permittedLengths', 'pattern', 'startingRules']).from(cardObject);\n */\nexport function reject(...args) {\n const myArgs = isArray(args[0]) ? args[0] : args;\n return {\n from: obj => {\n const vkeys = Object.keys(obj).filter(k => !myArgs.includes(k));\n return pick(...vkeys).from(obj);\n }\n };\n}\n","import { isArray } from '../../../../../../utils/commonUtils';\nimport { DEFAULT_CARD_GROUP_TYPES } from '../../constants';\n\nexport const getCardGroupTypes = (cardGroupTypes?): string[] =>\n isArray(cardGroupTypes) && cardGroupTypes.length ? cardGroupTypes : DEFAULT_CARD_GROUP_TYPES;\n","/**\n * @internal\n * Utility class for logging messages/errors\n * Usage:\n * logger.log('Log message, always visible');\n *\n * For debug only messages:\n * window._b$dl && logger.log('Log message only visible on dev env');\n *\n * Or just use a conditional:\n * ```\n * if (window._b$dl) {\n * logger.log('Log message only visible on dev env');\n * }\n * ```\n */\n\n/**\n * @internal\n * Logs errors\n * NOTE: changed to 'let' from 'const' for the purpose of running unit tests\n */\n// eslint-disable-next-line prefer-const\nexport let error = typeof window !== 'undefined' && window.console && window.console.error && window.console.error.bind(window.console);\n\n/**\n * @internal\n * Logs info\n */\nexport const info = typeof window !== 'undefined' && window.console && window.console.info && window.console.info.bind(window.console);\n\n/**\n * @internal\n * Logs\n * NOTE: changed to 'let' from 'const' for the purpose of running unit tests\n */\n\nexport let log = typeof window !== 'undefined' && window.console && window.console.log && window.console.log.bind(window.console); // eslint-disable-line\n\n/**\n * @internal\n * Logs warnings\n * NOTE: changed to 'let' from 'const' for the purpose of running unit tests\n */\n\nexport let warn = typeof window !== 'undefined' && window.console && window.console.warn && window.console.warn.bind(window.console); // eslint-disable-line\n","import { getCardGroupTypes } from '../utils/getCardGroupTypes';\nimport { NON_CREDIT_CARD_TYPE_SECURED_FIELDS, SF_VERSION } from '../../constants';\nimport * as logger from '../../utilities/logger';\nimport { CSFSetupObject } from '../types';\n\n/**\n * Parses this.props to set 'config' type vars on this (CSFComp)\n * - properties that just need to be set once, at startup, and then don't change\n *\n * See interface CSFConfigObject in types.ts\n */\nexport function handleConfig(props: CSFSetupObject): void {\n // --\n this.config.cardGroupTypes = getCardGroupTypes(props.cardGroupTypes);\n\n if (process.env.NODE_ENV === 'development' && window._b$dl) {\n logger.log('### StoreCls::init:: this.config.cardGroupTypes=', this.config.cardGroupTypes);\n }\n\n const loadingContext: string = props.loadingContext;\n\n if (!loadingContext) {\n logger.warn('WARNING Config :: no loadingContext has been specified!');\n return;\n }\n\n // Ensure passed loadingContext has trailing slash\n const lastChar = str => str.charAt(str.length - 1);\n this.config.loadingContext = lastChar(loadingContext) === '/' ? loadingContext : `${loadingContext}/`;\n\n // Is this for the regular creditCard or for another use-case for securedFields e.g. 'ach' or 'giftcard'\n this.config.isCreditCardType = NON_CREDIT_CARD_TYPE_SECURED_FIELDS.includes(props.type) === false;\n\n // Configuration object for individual txVariants - contains styling object values for securedFields inputs\n this.config.iframeUIConfig = props.iframeUIConfig ?? {};\n\n // By default CSF is allowed to automatically shift focus from the date to CVC fields - user of CSF must explicitly 'opt-out' to prevent this happening\n this.config.autoFocus = !(props.autoFocus === false || props.autoFocus === 'false');\n\n // By default CSF will NOT perform a console.warn when receiving postMessages with origin or numKey mismatches - user of CSF must explicitly 'opt-in' to get this\n this.config.showWarnings = props.showWarnings === true || props.showWarnings === 'true';\n\n // By default CSF will strip the trailing separator character from valid credit card numbers - user of CSF must explicitly 'opt-out' to prevent this happening\n this.config.trimTrailingSeparator = !(props.trimTrailingSeparator === false || props.trimTrailingSeparator === 'false');\n\n // By default CSF is allowed to add a fix for iOS to force the keypad to retract - user of CSF must explicitly 'opt-out' to prevent this happening\n this.config.keypadFix = !(props.keypadFix === false || props.keypadFix === 'false');\n\n // To set the type on the iframe input fields to 'tel' c.f. the default 'text' (with inputmode='numeric')\n this.config.legacyInputMode = props.legacyInputMode || null;\n\n // To configure the minimum expiry date to a merchant defined value - this means the card has to be valid until at least this date\n this.config.minimumExpiryDate = props.minimumExpiryDate || null;\n\n this.config.sfLogAtStart = window._b$dl === true;\n\n const sfBundleType: string = this.config.isCreditCardType ? 'card' : props.type;\n\n // Add a hash of the origin to ensure urls are different across domains\n const d = btoa(window.location.origin);\n\n /**\n * Unless we are forcing the use of the compat version via card config\n * - detect Edge vn \\<= 18 & IE11 - who don't support TextEncoder; and use this as an indicator to load a different, compatible, version of SF\n */\n const needsJWECompatVersion = props.forceCompat ? true : !(typeof window.TextEncoder === 'function');\n\n const bundleType = `${sfBundleType}${needsJWECompatVersion ? 'Compat' : ''}`; // e.g. 'card' or 'cardCompat'\n\n this.config.iframeSrc = `${this.config.loadingContext}securedfields/${props.clientKey}/${SF_VERSION}/securedFields.html?type=${bundleType}&d=${d}`;\n\n // TODO###### FOR QUICK LOCAL TESTING of sf\n if (process.env.NODE_ENV === 'development' && process.env.__SF_ENV__ !== 'build') {\n this.config.iframeSrc = `${process.env.__SF_ENV__}securedFields.${SF_VERSION}.html?type=${sfBundleType}`;\n }\n // TODO######\n}\n","import { CSFCallbacksConfig } from '../types';\n\nconst noop = () => {};\n\nexport function configureCallbacks(callbacksObj: CSFCallbacksConfig = {} as any as CSFCallbacksConfig): void {\n // --\n this.callbacks.onLoad = callbacksObj.onLoad ? callbacksObj.onLoad : noop;\n\n this.callbacks.onConfigSuccess = callbacksObj.onConfigSuccess ? callbacksObj.onConfigSuccess : noop;\n\n this.callbacks.onFieldValid = callbacksObj.onFieldValid ? callbacksObj.onFieldValid : noop;\n\n this.callbacks.onAllValid = callbacksObj.onAllValid ? callbacksObj.onAllValid : noop;\n\n this.callbacks.onBrand = callbacksObj.onBrand ? callbacksObj.onBrand : noop;\n\n this.callbacks.onError = callbacksObj.onError ? callbacksObj.onError : noop;\n\n this.callbacks.onFocus = callbacksObj.onFocus ? callbacksObj.onFocus : noop;\n\n this.callbacks.onBinValue = callbacksObj.onBinValue ? callbacksObj.onBinValue : noop;\n\n this.callbacks.onAutoComplete = callbacksObj.onAutoComplete ? callbacksObj.onAutoComplete : noop;\n\n this.callbacks.onAdditionalSFConfig = callbacksObj.onAdditionalSFConfig ? callbacksObj.onAdditionalSFConfig : noop;\n\n this.callbacks.onAdditionalSFRemoved = callbacksObj.onAdditionalSFRemoved ? callbacksObj.onAdditionalSFRemoved : noop;\n\n this.callbacks.onTouchstartIOS = callbacksObj.onTouchstartIOS ? callbacksObj.onTouchstartIOS : noop;\n\n this.callbacks.onKeyPressed = callbacksObj.onKeyPressed ? callbacksObj.onKeyPressed : noop;\n}\n","import { ENCRYPTED_EXPIRY_DATE } from '../../constants';\nimport { CardFieldValidData, EncryptionObj } from '../../types';\n\ninterface CallbackObjectProps {\n fieldType: string;\n encryptedFieldName: string;\n uuid: string;\n isValid: boolean;\n txVariant: string;\n rootNode: HTMLElement;\n}\n\nconst makeCallbackObj = ({ fieldType, encryptedFieldName, uuid, isValid, txVariant, rootNode }: CallbackObjectProps): CardFieldValidData => ({\n fieldType, // encryptedCardNumber, encryptedSecurityCode, encryptedExpiryDate\n encryptedFieldName, // encryptedCardNumber, encryptedSecurityCode, encryptedExpiryMonth, encryptedExpiryYear\n uid: uuid, // card-encrypted-encryptedCardNumber, card-encrypted-encryptedSecurityCode, card-encrypted-month, card-encrypted-year, card-encrypted-encryptedExpiryMonth, card-encrypted-encryptedExpiryYear\n valid: isValid,\n type: txVariant,\n rootNode // A ref to the 'form' element holding the securedFields\n});\n\nexport const makeCallbackObjectsValidation = ({ fieldType, txVariant, rootNode }): CardFieldValidData[] => {\n // - create callback objects to report the changed valid state of the field\n const isExpiryDateField: boolean = fieldType === ENCRYPTED_EXPIRY_DATE;\n\n const callbackObjectsArr: CardFieldValidData[] = [];\n\n const sepExpiryDateNames: string[] = ['encryptedExpiryMonth', 'encryptedExpiryYear'];\n\n let i: number;\n let uuid: string;\n let encryptedType: string;\n let encryptedFieldName: string;\n\n // For expiryDate field we need to remove 2 DOM elements & create 2 objects (relating to month & year)\n // - for everything else we just need to remove 1 element & create 1 callback object\n const totalFields: number = isExpiryDateField ? 2 : 1;\n\n for (i = 0; i < totalFields; i += 1) {\n encryptedType = isExpiryDateField ? sepExpiryDateNames[i] : fieldType; // encryptedCardNumber, encryptedSecurityCode, encryptedExpiryMonth, encryptedExpiryYear\n\n uuid = `${txVariant}-encrypted-${encryptedType}`; // card-encrypted-encryptedCardNumber, card-encrypted-encryptedSecurityCode, card-encrypted-encryptedExpiryMonth, card-encrypted-encryptedExpiryYear\n\n encryptedFieldName = isExpiryDateField ? encryptedType : fieldType; // encryptedCardNumber, encryptedSecurityCode, encryptedExpiryMonth, encryptedExpiryYear\n\n // Create objects to broadcast valid state\n // const callbackObj: CardFieldValidData = makeCallbackObj(pFieldType, encryptedFieldName, uuid, false, pTxVariant, pRootNode, null);\n const callbackObj: CardFieldValidData = makeCallbackObj({\n fieldType,\n encryptedFieldName,\n uuid,\n isValid: false,\n txVariant,\n rootNode\n } as CallbackObjectProps);\n\n callbackObjectsArr.push(callbackObj);\n }\n\n return callbackObjectsArr;\n};\n\nexport const makeCallbackObjectsEncryption = ({ fieldType, txVariant, rootNode, encryptedObjArr }): CardFieldValidData[] => {\n let i: number;\n let uuid: string;\n let encryptedObj: EncryptionObj;\n let encryptedFieldName: string;\n let encryptedBlob: string;\n\n const callbackObjectsArr: CardFieldValidData[] = [];\n\n for (i = 0; i < encryptedObjArr.length; i += 1) {\n encryptedObj = encryptedObjArr[i];\n encryptedFieldName = encryptedObj.encryptedFieldName;\n uuid = `${txVariant}-encrypted-${encryptedFieldName}`;\n encryptedBlob = encryptedObj.blob;\n\n // Create objects to broadcast valid state\n // const callbackObj: CardFieldValidData = makeCallbackObj(fieldType, encryptedFieldName, uuid, true, txVariant, rootNode, code);\n const callbackObj: CardFieldValidData = makeCallbackObj({\n fieldType,\n encryptedFieldName,\n uuid,\n isValid: true,\n txVariant,\n rootNode\n } as CallbackObjectProps);\n callbackObj.blob = encryptedBlob;\n\n callbackObjectsArr.push(callbackObj);\n }\n\n return callbackObjectsArr;\n};\n","export function hasOwnProperty(obj = {}, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n","import { CardErrorData, SFFeedbackObj } from '../../types';\nimport SecuredField from '../../securedField/SecuredField';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\n\ntype RtnType_callbackFn = (obj: CardErrorData) => void;\n\nexport const processErrors = (\n pFeedbackObj: SFFeedbackObj,\n securedField: SecuredField,\n type: string,\n rootNode: HTMLElement,\n callbackFn: RtnType_callbackFn\n): CardErrorData => {\n if (!hasOwnProperty(pFeedbackObj, 'error')) return null;\n\n const fieldType: string = pFeedbackObj.fieldType;\n\n const field: SecuredField = securedField;\n\n // Initialise error callback object\n const dataObj: CardErrorData = { rootNode, fieldType, error: null, type: null };\n\n const isError: boolean = pFeedbackObj.error !== '';\n\n // Error is empty string && field is not already in error: do nothing - don't need to propagate this non-error if the field wasn't already in error\n // This situation arises when we encrypt a field and trigger an \"error clearing\" event i.e. deleting a character\n // It also arises when an unsupportedCard (re. binLookup) is entered and the shopper continues to interact with the field (adding or deleting digits)\n if (!isError && !field.hasError) {\n return null;\n }\n\n // Add props to error callback object\n dataObj.error = isError ? pFeedbackObj.error : '';\n dataObj.type = type;\n\n // Set error state & type on securedField instance\n field.hasError = isError;\n field.errorType = dataObj.error;\n\n callbackFn(dataObj);\n\n return dataObj;\n};\n","import { makeCallbackObjectsValidation } from '../utils/callbackUtils';\nimport { processErrors } from '../utils/processErrors';\nimport { existy } from '../../../../../../utils/commonUtils';\nimport { ENCRYPTED_SECURITY_CODE, ENCRYPTED_CARD_NUMBER } from '../../constants';\nimport { SFFeedbackObj, CardFieldValidData } from '../../types';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\n\nexport function handleValidation(pFeedbackObj: SFFeedbackObj): void {\n // --\n let callbackObjectsArr: CardFieldValidData[];\n const fieldType: string = pFeedbackObj.fieldType;\n const isGenericCard: boolean = this.state.type === 'card';\n\n /**\n * CHECK IF CVC IS OPTIONAL\n */\n // Brand information (from setting the CC number) now contains information about\n // whether cvc is optional for that brand e.g. maestro\n // If it is optional, and we're dealing with the generic card type,\n // (re)set the property that indicates this (in the CVC SecuredField instance)\n if (\n isGenericCard &&\n hasOwnProperty(pFeedbackObj, 'cvcPolicy') &&\n existy(pFeedbackObj.cvcPolicy) &&\n hasOwnProperty(this.state.securedFields, ENCRYPTED_SECURITY_CODE)\n ) {\n this.state.securedFields[ENCRYPTED_SECURITY_CODE].cvcPolicy = pFeedbackObj.cvcPolicy;\n }\n\n /**\n * PROCESS & BROADCAST ERRORS (OR LACK OF)\n */\n processErrors(pFeedbackObj, this.state.securedFields[fieldType], this.state.type, this.props.rootNode, this.callbacks.onError);\n\n /**\n * REMOVE ANY EXISTING ENCRYPTED ELEMENT & CHECK VALIDITY OF THE FORM AS A WHOLE\n */\n // If the field was previously encrypted...\n if (this.state.securedFields[fieldType].isEncrypted) {\n // callbackObjectsArr will be an array containing 1 or 2 objects that need to be broadcast\n callbackObjectsArr = makeCallbackObjectsValidation({ fieldType, txVariant: this.state.type, rootNode: this.props.rootNode });\n\n // Add the endDigits to the object we send to the onFieldValid callback\n // NOTE: in this case (validation) this will be an empty string\n if (fieldType === ENCRYPTED_CARD_NUMBER) {\n callbackObjectsArr[0].endDigits = '';\n }\n\n for (let i = 0, len = callbackObjectsArr.length; i < len; i += 1) {\n // ...BROADCAST VALID STATE OF INDIVIDUAL INPUTS\n this.callbacks.onFieldValid(callbackObjectsArr[i]);\n }\n\n // Remove the field's encrypted state\n this.state.securedFields[fieldType].isEncrypted = false;\n }\n\n /**\n * STORE & BROADCAST VALID STATE OF THE FORM AS A WHOLE\n */\n this.validateForm();\n\n /**\n * PROCESS & BROADCAST CARD BRANDS\n */\n if (hasOwnProperty(pFeedbackObj, 'brand')) {\n this.processBrand(pFeedbackObj);\n }\n}\n","const postMessageToIframe = (pDataObj: object, pIframeObj: Window, pLoadingContext: string): void => {\n // Check that an iframe object exists for this fieldType... in some cases the iframe might not exist\n // e.g. bcmc which has no cvc field so e.g. a call to setFocus on the cvc field is not possible\n if (pIframeObj) {\n const dataObjStr: string = JSON.stringify(pDataObj);\n pIframeObj.postMessage(dataObjStr, pLoadingContext);\n }\n};\n\nexport default postMessageToIframe;\n","import { CSFStateObject } from '../../types';\n\n/**\n * Retrieves the iframe, stored by field type, & returns it's contentWindow\n */\nexport default function getIframeContentWin(csfState: CSFStateObject, fieldType: string): Window {\n return csfState.securedFields[fieldType]?.iframeContentWindow || null;\n}\n","import { makeCallbackObjectsEncryption } from '../utils/callbackUtils';\nimport {\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR,\n ENCRYPTED_SECURITY_CODE,\n ENCRYPTED_CARD_NUMBER,\n ENCRYPTED_EXPIRY_DATE\n} from '../../constants';\nimport { processErrors } from '../utils/processErrors';\nimport { truthy } from '../../../../../../utils/commonUtils';\nimport { SFFeedbackObj, CardFieldValidData, EncryptionObj } from '../../types';\nimport postMessageToIframe from '../utils/iframes/postMessageToIframe';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\nimport getIframeContentWin from '../utils/iframes/getIframeContentWin';\n\nexport function handleEncryption(pFeedbackObj: SFFeedbackObj): void {\n // EXTRACT VARS\n const fieldType: string = pFeedbackObj.fieldType;\n\n // SET FOCUS ON OTHER INPUT - If user has just typed a correct expiryDate - set focus on the cvc field OR typed a correct expiryMonth - focus on year field\n if (this.config.autoFocus) {\n // pFeedbackObj.type === 'year' when the encryption is happening on an expiryDate field c.f. a separate year field (when it equals ENCRYPTED_EXPIRY_YEAR)\n if (pFeedbackObj.type === 'year' || fieldType === ENCRYPTED_EXPIRY_YEAR) {\n this.setFocusOnFrame(ENCRYPTED_SECURITY_CODE);\n }\n if (fieldType === ENCRYPTED_EXPIRY_MONTH) {\n this.setFocusOnFrame(ENCRYPTED_EXPIRY_YEAR);\n }\n }\n //--\n\n let i: number;\n let len: number;\n\n const encryptedObjArr: EncryptionObj[] = pFeedbackObj[fieldType];\n\n // Set boolean saying this securedField is in an encryptedState\n this.state.securedFields[fieldType].isEncrypted = true;\n\n // REMOVE ANY ERRORS ON FIELD e.g. was a full number that failed the luhnCheck, then we corrected the number and now it passes\n processErrors(\n { error: '', fieldType } as any as SFFeedbackObj,\n this.state.securedFields[fieldType],\n this.state.type,\n this.props.rootNode,\n this.callbacks.onError\n );\n\n // MAKE ENCRYPTION OBJECTS FOR EACH OF THE INDIVIDUAL INPUTS\n // N.B. when considering \"individual inputs\" we are concerned with the 4 fields that the checkoutAPI expects to receive for a credit card payment:\n // encryptedCardNumber, encryptedSecurityCode, encryptedExpiryMonth, encryptedExpiryYear\n const callbackObjectsArr: CardFieldValidData[] = makeCallbackObjectsEncryption({\n fieldType,\n txVariant: this.state.type,\n rootNode: this.props.rootNode,\n encryptedObjArr\n });\n\n // For standalone month field\n if (fieldType === ENCRYPTED_EXPIRY_MONTH) {\n if (hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_YEAR)) {\n const dataObj: object = {\n txVariant: this.state.type,\n code: pFeedbackObj.code,\n blob: encryptedObjArr[0].blob,\n fieldType: ENCRYPTED_EXPIRY_YEAR,\n numKey: this.state.securedFields[ENCRYPTED_EXPIRY_YEAR].numKey\n };\n postMessageToIframe(dataObj, getIframeContentWin(this.state, ENCRYPTED_EXPIRY_YEAR), this.config.loadingContext);\n }\n }\n\n // For number field - add the endDigits to the encryption object\n if (fieldType === ENCRYPTED_CARD_NUMBER && truthy(pFeedbackObj.endDigits)) {\n callbackObjectsArr[0].endDigits = pFeedbackObj.endDigits;\n }\n\n // For number field - add the 8 digit issuerBin to the encryption object\n if (fieldType === ENCRYPTED_CARD_NUMBER && truthy(pFeedbackObj.issuerBin)) {\n callbackObjectsArr[0].issuerBin = +pFeedbackObj.issuerBin;\n }\n\n // Add expiryDate to \"encryptedExpiryYear\" field. It will only be present if the correct config has been sent to SF\n if (fieldType === ENCRYPTED_EXPIRY_DATE && truthy(pFeedbackObj.expiryDate)) {\n callbackObjectsArr[1].expiryDate = pFeedbackObj.expiryDate;\n }\n\n // BROADCAST VALID STATE OF INDIVIDUAL INPUTS - passing the encryption objects\n for (i = 0, len = callbackObjectsArr.length; i < len; i += 1) {\n this.callbacks.onFieldValid(callbackObjectsArr[i]);\n }\n //--------------------------------------------\n\n // STORE & BROADCAST VALID STATE OF THE FORM AS A WHOLE ///////\n this.validateForm();\n}\n","const select = (root, selector) => {\n let array = [];\n\n if (root) {\n // Convert NodeList to array\n if (typeof root.querySelectorAll === 'function') {\n array = [].slice.call(root.querySelectorAll(selector));\n }\n }\n\n return array;\n};\n\nconst selectOne = (root, selector) => {\n if (!root) {\n return undefined;\n }\n\n return root.querySelector(selector);\n};\n\nconst getAttribute = (node, attribute) => {\n if (!node) {\n return undefined;\n }\n return node.getAttribute(attribute);\n};\n\n/**\n * @internal\n * Removes all children elements of the given node.\n *\n * @param node -\n */\nconst removeAllChildren = node => {\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n};\n\nexport { getAttribute, select, selectOne, removeAllChildren };\n","import { CardObject } from '../../types';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\n\nlet shortestPermittedCardLength;\n\ninterface CardType {\n __NO_BRAND?: string;\n cards?: CardObject[];\n}\n\nconst CardType: CardType = {};\nCardType.__NO_BRAND = 'noBrand';\n\nCardType.cards = [];\n\nCardType.cards.push({\n cardType: 'mc',\n startingRules: [51, 52, 53, 54, 55, 22, 23, 24, 25, 26, 27],\n permittedLengths: [16],\n pattern: /^(5[1-5][0-9]{0,14}|2[2-7][0-9]{0,14})$/,\n securityCode: 'CVC'\n});\n\nCardType.cards.push({ cardType: 'visadankort', startingRules: [4571], permittedLengths: [16], pattern: /^(4571)[0-9]{0,12}$/ });\n\nCardType.cards.push({\n cardType: 'visa',\n startingRules: [4],\n permittedLengths: [13, 16, 19],\n pattern: /^4[0-9]{0,18}$/,\n securityCode: 'CVV'\n});\n\nCardType.cards.push({ cardType: 'amex', startingRules: [34, 37], permittedLengths: [15], pattern: /^3[47][0-9]{0,13}$/, securityCode: 'CID' });\n\nCardType.cards.push({ cardType: 'diners', startingRules: [36], permittedLengths: [14, 15, 16, 17, 18, 19], pattern: /^(36)[0-9]{0,12}$/ });\n\nCardType.cards.push({ cardType: 'maestrouk', startingRules: [6759], permittedLengths: [16, 18, 19], pattern: /^(6759)[0-9]{0,15}$/ });\n\nCardType.cards.push({ cardType: 'solo', startingRules: [6767], permittedLengths: [16, 18, 19], pattern: /^(6767)[0-9]{0,15}$/ });\n\nCardType.cards.push({\n cardType: 'laser',\n startingRules: [6304, 6706, 677117, 677120],\n permittedLengths: [16, 17, 18, 19],\n pattern: /^(6304|6706|6709|6771)[0-9]{0,15}$/,\n cvcPolicy: 'optional'\n});\n\nCardType.cards.push({\n cardType: 'discover',\n startingRules: [6011, 644, 645, 646, 647, 648, 649, 65],\n permittedLengths: [16, 17, 18, 19],\n pattern: /^(6011[0-9]{0,12}|(644|645|646|647|648|649)[0-9]{0,13}|65[0-9]{0,14})$/\n});\n\nCardType.cards.push({\n cardType: 'jcb',\n startingRules: [3528, 3529, 353, 354, 355, 356, 357, 358],\n permittedLengths: [16, 19],\n pattern: /^(352[8,9]{1}[0-9]{0,15}|35[4-8]{1}[0-9]{0,16})$/,\n securityCode: 'CAV'\n});\n\nCardType.cards.push({\n cardType: 'bcmc',\n startingRules: [6703, 479658, 606005],\n permittedLengths: [16, 17, 18, 19],\n pattern: /^((6703)[0-9]{0,15}|(479658|606005)[0-9]{0,13})$/,\n cvcPolicy: 'hidden'\n});\n\nCardType.cards.push({ cardType: 'bijcard', startingRules: [5100081], permittedLengths: [16], pattern: /^(5100081)[0-9]{0,9}$/ });\n\nCardType.cards.push({ cardType: 'dankort', startingRules: [5019], permittedLengths: [16], pattern: /^(5019)[0-9]{0,12}$/ });\n\nCardType.cards.push({ cardType: 'hipercard', startingRules: [606282], permittedLengths: [16], pattern: /^(606282)[0-9]{0,10}$/ });\n\n// Moved above maestro (from position below uatp) to stop maestro being recognised over cup\nCardType.cards.push({ cardType: 'cup', startingRules: [62, 81], permittedLengths: [14, 15, 16, 17, 18, 19], pattern: /^(62|81)[0-9]{0,17}$/ }); // orig & android v1 + modified to include our test cards (81...)\n\nCardType.cards.push({\n cardType: 'maestro',\n startingRules: [50, 56, 57, 58, 6],\n permittedLengths: [16, 17, 18, 19],\n pattern: /^(5[0|6-8][0-9]{0,17}|6[0-9]{0,18})$/,\n cvcPolicy: 'optional'\n});\n\nCardType.cards.push({\n cardType: 'elo',\n // prettier-ignore\n startingRules: [506699, 50670, 50671, 50672, 50673, 50674, 50675, 50676, 506770, 506771, 506772, 506773, 506774, 506775, 506776, 506777, 506778, 401178, 438935, 451416, 457631, 457632, 504175, 627780, 636297, 636368],\n permittedLengths: [16],\n // prettier-ignore\n pattern:\n /^((((506699)|(506770)|(506771)|(506772)|(506773)|(506774)|(506775)|(506776)|(506777)|(506778)|(401178)|(438935)|(451416)|(457631)|(457632)|(504175)|(627780)|(636368)|(636297))[0-9]{0,10})|((50676)|(50675)|(50674)|(50673)|(50672)|(50671)|(50670))[0-9]{0,11})$/\n});\n\nCardType.cards.push({ cardType: 'uatp', startingRules: [1], permittedLengths: [15], pattern: /^1[0-9]{0,14}$/, cvcPolicy: 'optional' });\n\nCardType.cards.push({\n cardType: 'cartebancaire',\n startingRules: [4, 5, 6],\n permittedLengths: [16],\n pattern: /^[4-6][0-9]{0,15}$/\n});\n\nCardType.cards.push({ cardType: 'visaalphabankbonus', startingRules: [450903], permittedLengths: [16], pattern: /^(450903)[0-9]{0,10}$/ });\n\nCardType.cards.push({ cardType: 'mcalphabankbonus', startingRules: [510099], permittedLengths: [16], pattern: /^(510099)[0-9]{0,10}$/ });\n\nCardType.cards.push({\n cardType: 'hiper',\n startingRules: [637095, 637568, 637599, 637609, 637612],\n permittedLengths: [16],\n pattern: /^(637095|637568|637599|637609|637612)[0-9]{0,10}$/\n});\n\nCardType.cards.push({ cardType: 'oasis', startingRules: [982616], permittedLengths: [16], pattern: /^(982616)[0-9]{0,10}$/, cvcPolicy: 'optional' });\n\nCardType.cards.push({\n cardType: 'karenmillen',\n startingRules: [98261465],\n permittedLengths: [16],\n pattern: /^(98261465)[0-9]{0,8}$/,\n cvcPolicy: 'optional'\n});\n\nCardType.cards.push({\n cardType: 'warehouse',\n startingRules: [982633],\n permittedLengths: [16],\n pattern: /^(982633)[0-9]{0,10}$/,\n cvcPolicy: 'optional'\n});\n\nCardType.cards.push({ cardType: 'mir', startingRules: [220], permittedLengths: [16, 17, 18, 19], pattern: /^(220)[0-9]{0,16}$/ });\n\nCardType.cards.push({ cardType: 'codensa', startingRules: [590712], permittedLengths: [16], pattern: /^(590712)[0-9]{0,10}$/ });\n\nCardType.cards.push({\n cardType: 'naranja',\n startingRules: [377798, 377799, 402917, 402918, 527571, 527572, 589562],\n permittedLengths: [16, 17, 18, 19],\n pattern: /^(37|40|5[28])([279])\\d*$/\n});\n\n// TODO: 589657 clashes with naranja, rest ok\nCardType.cards.push({\n cardType: 'cabal',\n startingRules: [589657, 600691, 603522, 6042, 6043, 636908],\n permittedLengths: [16, 17, 18, 19],\n pattern: /^(58|6[03])([03469])\\d*$/\n});\n\nCardType.cards.push({\n cardType: 'shopping',\n startingRules: [2799, 589407, 603488],\n permittedLengths: [16, 17, 18, 19],\n pattern: /^(27|58|60)([39])\\d*$/\n});\n\nCardType.cards.push({ cardType: 'argencard', startingRules: [501], permittedLengths: [16, 17, 18, 19], pattern: /^(50)(1)\\d*$/ }); // NOTE: starting rule changed, from 501105, to not clash with dankort. Plus it now matches its regEx!\n\nCardType.cards.push({ cardType: 'troy', startingRules: [9792], permittedLengths: [16], pattern: /^(97)(9)\\d*$/ });\n\n// TODO: clashes with cabal\nCardType.cards.push({ cardType: 'forbrugsforeningen', startingRules: [600722], permittedLengths: [16], pattern: /^(60)(0)\\d*$/ });\n\nCardType.cards.push({\n cardType: 'vpay',\n startingRules: [401, 408, 413, 434, 435, 437, 439, 441, 442, 443, 444, 446, 447, 455, 458, 460, 461, 463, 466, 471, 479, 482, 483, 487],\n permittedLengths: [13, 14, 15, 16, 17, 18, 19],\n pattern: /^(40[1,8]|413|43[4,5]|44[1,2,3,4,6,7]|45[5,8]|46[0,1,3,6]|47[1,9]|48[2,3,7])[0-9]{0,16}$/ // ^(4[0-1|3-8][0-9]{1,17})$\n});\n\nCardType.cards.push({\n cardType: 'rupay',\n startingRules: [508528],\n permittedLengths: [16],\n // prettier-ignore\n pattern:\n /^(100003|508(2|[5-9])|60(69|[7-8])|652(1[5-9]|[2-5][0-9]|8[5-9])|65300[3-4]|8172([0-1]|[3-5]|7|9)|817(3[3-8]|40[6-9]|410)|35380([0-2]|[5-6]|9))[0-9]{0,12}$/\n});\n\nCardType.cards.push({\n cardType: 'ticket',\n expiryDatePolicy: 'hidden'\n});\n\nconst detectCard = (pCardNumber, pAvailableCards?) => {\n let matchedCards;\n let i;\n let len;\n\n if (pAvailableCards) {\n // Filter CardType.cards down to those that are found in pAvailableCards\n matchedCards = CardType.cards\n .filter(card => pAvailableCards.includes(card.cardType))\n // Further filter them to those with a regEx pattern that matches pCardNumber\n .filter(card => hasOwnProperty(card, 'pattern') && pCardNumber.match(card.pattern));\n\n // If we have matched cards: if there's only one - return it; else return the one with the longest startingRule\n if (matchedCards.length) {\n if (matchedCards.length === 1) {\n return matchedCards[0];\n }\n\n // Find longest rule for each matched card & store it as a property on the card\n for (i = 0, len = matchedCards.length; i < len; i += 1) {\n if (!matchedCards[i].longestRule) {\n const longestRule = matchedCards[i].startingRules.reduce((a, b) => (a > b ? a : b));\n // What we actually store is how many chars are in the rule\n matchedCards[i].longestRule = String(longestRule).length;\n }\n }\n\n // Based on each matched cards longest rule - find the card with the longest one!\n return matchedCards.reduce((a, b) => (a.longestRule >= b.longestRule ? a : b));\n }\n\n return { cardType: CardType.__NO_BRAND };\n }\n\n return { cardType: CardType.__NO_BRAND };\n};\n\nconst detectCardLength = (pCard, pUnformattedVal) => {\n let maxLength;\n let shortenedNewValue;\n let lengthDiff = 0;\n let reachedValidLength = false;\n let unformattedVal = pUnformattedVal;\n\n // Find the longest of the permitted card number lengths for this card brand\n const maxPermittedLength = pCard.cardType !== CardType.__NO_BRAND ? pCard.permittedLengths[pCard.permittedLengths.length - 1] : 0;\n\n // If the input value is longer than it's max permitted length then shorten it to that length\n if (maxPermittedLength && unformattedVal > maxPermittedLength) {\n lengthDiff = unformattedVal.length - maxPermittedLength;\n\n if (lengthDiff > 0) {\n unformattedVal = unformattedVal.substring(0, unformattedVal.length - lengthDiff);\n shortenedNewValue = unformattedVal;\n }\n }\n\n // If cardNumber has reached one of the cardBrand's 'permitted lengths' - mark it as 'valid'\n pCard.permittedLengths.forEach(pItem => {\n if (unformattedVal.length === pItem) {\n reachedValidLength = true;\n }\n });\n\n // If cardNumber is as long as the cardBrand's maximum permitted length then set the maxLength var\n if (unformattedVal.length === maxPermittedLength) {\n // Set maxlength to max + the right amount of spaces (one for every 4 digits, but not on the last block)\n const div = Math.floor(unformattedVal.length / 4);\n const mod = unformattedVal.length % 4;\n const numSpaces = mod > 0 ? div : div - 1;\n\n maxLength = maxPermittedLength + numSpaces;\n\n if (pCard.cardType.toLowerCase() === 'amex') {\n maxLength = maxPermittedLength + 2; // = 17 = 15 digits with space after 4th & 10th\n }\n }\n\n return {\n shortenedNewValue,\n maxLength,\n reachedValidLength\n };\n};\n\nconst getShortestPermittedCardLength = () => {\n if (!shortestPermittedCardLength) {\n let permittedLengthsArray = [];\n\n CardType.cards.forEach(pItem => {\n permittedLengthsArray = permittedLengthsArray.concat(pItem.permittedLengths ?? []);\n });\n\n shortestPermittedCardLength = Math.min.apply(null, permittedLengthsArray);\n }\n\n return shortestPermittedCardLength;\n};\n\nconst getCardByBrand = pBrand => {\n const cardType = CardType.cards.filter(card => card.cardType === pBrand);\n\n return cardType[0];\n};\n\nconst isGenericCardType = type => {\n if (!type) throw new Error('Error: isGenericCardType: type param has not been specified');\n return type === 'card' || type === 'scheme';\n};\n\nexport default {\n detectCard,\n detectCardLength,\n getShortestPermittedCardLength,\n getCardByBrand,\n isGenericCardType,\n __NO_BRAND: CardType.__NO_BRAND,\n allCards: CardType.cards\n};\n","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 // For a11y some merchants want to be able to remove the title element on the iframe - seeing the info it carries as extraneous for the screenreader\n if (title === '' || title.trim().length === 0 || title === 'none') {\n iframeEl.setAttribute('role', 'presentation');\n } else {\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","export const on = (node: Window | HTMLElement | Document, event, callback, useCapture: boolean = false) => {\n if (node && typeof node.addEventListener === 'function') {\n node.addEventListener(event, callback, useCapture);\n return true;\n }\n return false;\n};\n\nexport const off = (node: Window | HTMLElement | Document, event, callback, useCapture: boolean = false) => {\n if (node && typeof node.removeEventListener === 'function') {\n node.removeEventListener(event, callback, useCapture);\n return true;\n }\n return false;\n};\n","import * as logger from '../../../utilities/logger';\n\nexport const originCheckPassed = (event: MessageEvent, pLoadingContext: string, pShowWarnings: boolean): boolean => {\n const origin = event.origin; // || event.originalEvent.origin;\n\n const isCheckoutUrl: number = pLoadingContext.indexOf('/checkoutshopper/');\n let adyenDomain: string = isCheckoutUrl > -1 ? pLoadingContext.substring(0, isCheckoutUrl) : pLoadingContext;\n\n // Strip trailing /\n const lastCharIndex: number = adyenDomain.length - 1;\n if (adyenDomain.charAt(lastCharIndex) === '/') {\n adyenDomain = adyenDomain.substring(0, lastCharIndex);\n }\n\n if (origin !== adyenDomain) {\n if (pShowWarnings) {\n logger.warn(\n 'WARNING postMessageValidation: postMessage listener for iframe::origin mismatch!\\n Received message with origin:',\n origin,\n 'but the only allowed origin for messages to CSF is',\n adyenDomain,\n '### event.data=',\n event.data\n );\n }\n return false;\n }\n\n return true;\n};\n\n// Catch webpack postMessages responses\nexport const isWebpackPostMsg = (event: MessageEvent): boolean =>\n event.data && event.data.type && typeof event.data.type === 'string' && event.data.type.indexOf('webpack') > -1;\n\n// Catch ChromeVox postMessages responses\nexport const isChromeVoxPostMsg = (event: MessageEvent): boolean => event.data && typeof event.data === 'string' && event.data.indexOf('cvox') > -1;\n","/**\n * Generate random number using window.crypto if available - otherwise fall back toMath.random\n *\n * @returns Number\n */\nexport function generateRandomNumber() {\n if (!window.crypto) {\n return (Math.random() * 0x100000000) | 0;\n }\n\n const ranNum = new Uint32Array(1);\n window.crypto.getRandomValues(ranNum);\n return ranNum[0];\n}\n\n/**\n * Recursively compare 2 objects\n */\nexport function objectsDeepEqual(x, y) {\n const xType = typeof x;\n const yType = typeof y;\n if (x && y && xType === 'object' && xType === yType) {\n if (Object.keys(x).length !== Object.keys(y).length) {\n return false;\n }\n return Object.keys(x).every(key => objectsDeepEqual(x[key], y[key]));\n }\n return x === y;\n}\n\n/**\n * This function allows us to partially apply any number of variables to functions that take any number of parameters.\n * @returns \\{function(): *\\}\n */\nexport function partial(...args) {\n // Store the args array\n const myArgs = args;\n\n // Grab the function (the first argument). myArgs now contains the remaining arguments\n const fn = myArgs.shift();\n\n // Return a function that calls fn with myArgs + whatever else is passed when this returned function is called\n function partialFn(...args2) {\n return fn.apply(this, myArgs.concat(args2));\n }\n return partialFn;\n}\n","import {\n CVCPolicyType,\n DatePolicyType,\n RtnType_callbackFn,\n RtnType_noParamVoidFn,\n RtnType_postMessageListener,\n SecuredFieldCommonProps\n} from '../types';\n\nabstract class AbstractSecuredField {\n public sfConfig: SecuredFieldCommonProps; // could be protected but needs to be public for tests to run\n protected loadingContext: string;\n protected holderEl: HTMLElement;\n protected iframeRef: HTMLElement;\n public loadToConfigTimeout: number;\n // From getters/setters with the same name\n protected _isValid: boolean;\n protected _iframeContentWindow: Window;\n protected _numKey: number;\n protected _isEncrypted: boolean;\n protected _hasError: boolean;\n protected _errorType: string;\n protected _cvcPolicy: CVCPolicyType;\n protected _expiryDatePolicy: DatePolicyType;\n protected _iframeOnLoadListener: RtnType_noParamVoidFn;\n protected _postMessageListener: RtnType_postMessageListener;\n // Callback fns assigned via public functions\n protected onIframeLoadedCallback: RtnType_noParamVoidFn;\n protected onConfigCallback: RtnType_callbackFn;\n protected onEncryptionCallback: RtnType_callbackFn;\n protected onValidationCallback: RtnType_callbackFn;\n protected onFocusCallback: RtnType_callbackFn;\n protected onBinValueCallback: RtnType_callbackFn;\n protected onTouchstartCallback: RtnType_callbackFn;\n protected onShiftTabCallback: RtnType_callbackFn;\n protected onAutoCompleteCallback: RtnType_callbackFn;\n protected onKeyPressedCallback: RtnType_callbackFn;\n\n protected constructor() {\n this.sfConfig = {} as any as SecuredFieldCommonProps;\n }\n}\n\nexport default AbstractSecuredField;\n","import { ERROR_ACTION_BLUR_SCENARIO, ERROR_ACTION_FOCUS_FIELD, ErrorCodePrefixes, SF_ErrorCodes } from './constants';\nimport { SFError } from '../../components/Card/components/CardInput/types';\nimport { SortErrorsObj, SortedErrorObject, GenericError, SetSRMessagesReturnObject } from './types';\nimport { ValidationRuleResult } from '../../utils/Validator/ValidationRuleResult';\nimport { ErrorMessageObject } from '../../utils/Validator/types';\nimport {\n ENCRYPTED_CARD_NUMBER,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR,\n ENCRYPTED_PWD_FIELD,\n ENCRYPTED_SECURITY_CODE\n} from '../../components/internal/SecuredFields/lib/constants';\nimport { AriaConfigObject } from '../../components/internal/SecuredFields/lib/types';\nimport type Language from '../../language';\n\n/**\n * Extract and translate all the errorCodes related to a specific securedField\n * @param i18n\n * @param errorCodeIdentifier - the identifier for which type of errorCodes we need to collect e.g. 'cc-num'\n */\nexport const getTranslatedErrors = (i18n: Language, errorCodeIdentifier: string): Record<SF_ErrorCodes, string> => {\n const transObj = Object.values(SF_ErrorCodes).reduce((acc, value) => {\n // Limit to errors related to specific sf\n if (value.includes(errorCodeIdentifier)) {\n acc[value] = i18n.get(value);\n }\n return acc;\n }, {}) as Record<SF_ErrorCodes, string>;\n\n return transObj;\n};\n\n/**\n * Adds a new error property to an object.\n * This error property is an object containing the translated errors, stored by code, that relate to the securedFields\n * @param originalObject - object we want to duplicate and enhance\n * @param i18n - an i18n object to use to get translations\n * @returns a duplicate of the original object with a new property: \"error\" whose value is a object containing the translated errors\n */\nexport const addErrorTranslationsToObject = (originalObj: AriaConfigObject, i18n: Language, fieldType: string): AriaConfigObject => {\n const nuObj: AriaConfigObject = { ...originalObj };\n\n const errorCodeIdentifier = fieldTypeToErrorCodeIdentifier(fieldType);\n nuObj.error = getTranslatedErrors(i18n, errorCodeIdentifier);\n\n return nuObj;\n};\n\nexport const getErrorMessageFromCode = (errorCode: string, codeMap: Record<string, string>): string => {\n let errMsg = errorCode;\n for (const [key, value] of Object.entries(codeMap)) {\n if (value === errorCode) {\n errMsg = key;\n break;\n }\n }\n return errMsg?.toLowerCase().replace(/[_.\\s]/g, '-');\n};\n\n/**\n * errorCodeIdentifiers must match the prefixes to the numbers in ERROR_CODES (Errors/constants.ts)\n * (Which in turn must match the keys in the translations files)\n */\nconst fieldTypeToErrorCodeIdentifier = (fieldType: string): string => {\n let errorCodeIdentifier;\n switch (fieldType) {\n case ENCRYPTED_CARD_NUMBER:\n errorCodeIdentifier = ErrorCodePrefixes.CC_NUM;\n break;\n case ENCRYPTED_EXPIRY_DATE:\n errorCodeIdentifier = ErrorCodePrefixes.CC_DAT;\n break;\n case ENCRYPTED_EXPIRY_MONTH:\n errorCodeIdentifier = ErrorCodePrefixes.CC_MTH;\n break;\n case ENCRYPTED_EXPIRY_YEAR:\n errorCodeIdentifier = ErrorCodePrefixes.CC_YR;\n break;\n case ENCRYPTED_SECURITY_CODE:\n errorCodeIdentifier = ErrorCodePrefixes.CC_CVC;\n break;\n case ENCRYPTED_PWD_FIELD:\n errorCodeIdentifier = ErrorCodePrefixes.KCP_PWD;\n break;\n default:\n }\n return errorCodeIdentifier;\n};\n\n/**\n * sortErrorsByLayout - takes a list of errors and a layout, and returns a sorted array of error objects with translated error messages\n *\n * @param errors - an object containing errors, referenced by field type\n * @param layout - a string[] controlling how the output error objects will be ordered. Required when it is known that the way the error object is populated can vary e.g. Card comp, &/or anything with a country selector\n * @param i18n - our internal Language mechanism\n * @param countrySpecificLabels - some errors are region specific, e.g. in the US \"postal code\" = \"zip code\", so map the fieldType value accordingly (if it is being added to the errorMessage string)\n * @param fieldTypeMappingFn - a component specific lookup function that will tell us both if we need to prepend the field type to the SR panel message, and, if so, will retrieve the correct translation for the field type\n */\nexport const sortErrorsByLayout = ({ errors, i18n, layout, countrySpecificLabels, fieldTypeMappingFn }: SortErrorsObj): SortedErrorObject[] => {\n const SR_INDICATOR_PREFIX = process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'test' ? '' : '-sr'; // Useful for testing whether SR is reading out aria-live errors (sr) or aria-describedby ones\n\n // Create array of error objects, sorted by layout\n const sortedErrors: SortedErrorObject[] = Object.entries(errors).reduce((acc, [key, value]) => {\n if (value) {\n const errObj: ValidationRuleResult | SFError | GenericError = errors[key];\n\n const TREAT_AS_SF_ERROR = 'errorI18n' in errObj && `rootNode` in errObj; // look for expected props, unique to an SFError\n\n // Some ValidationRuleResults can be passed an object in the 'errorMessage' prop (to give country specific errors)\n const ERROR_MSG_IS_OBJECT = typeof errObj.errorMessage === 'object';\n\n /**\n * Get error codes - these are used if we need to distinguish between showValidation & onBlur errors\n * - For a ValidationRuleResult or GenericError the error \"code\" is contained in the errorMessage prop.\n * - For an SFError the error \"code\" is contained in the error prop.\n */\n let errorCode: string;\n if (TREAT_AS_SF_ERROR) {\n errorCode = errObj.error;\n } else {\n /** Special handling for Address~postalCode (where the errorMessage is an object) */\n if (ERROR_MSG_IS_OBJECT) {\n /** is ValidationRuleResult w. country specific error */\n errorCode = (errObj.errorMessage as ErrorMessageObject).translationKey;\n } else {\n /** is ValidationRuleResult || GenericError || an as yet incorrectly formed error */\n errorCode = errObj.errorMessage as string;\n }\n }\n\n /**\n * Get corresponding error msg - a translated string we can place into the SRPanel\n * NOTE: the error object for a secured field already contains the error in a translated form (errorI18n).\n * For other fields we still need to translate it, so we use the errObj.errorMessage prop as a translation key\n */\n let errorMsg: string;\n if (TREAT_AS_SF_ERROR && 'errorI18n' in errObj) {\n errorMsg = errObj.errorI18n + SR_INDICATOR_PREFIX;\n } else {\n /**\n * For some fields, for a11y reasons (when the translated error msg doesn't contain a reference to the field it refers to), we need to\n * add the field type into the translated error message.\n *\n * This happens with generic errors\n * e.g. \"field.error.required\": \"Enter the %{label}\"\n * or \"invalid.format.expects\": \"%{label} Invalid format. Expected format: %{format}\"\n */\n const mappedLabel = fieldTypeMappingFn ? fieldTypeMappingFn(key, i18n, countrySpecificLabels) : ''; // Retrieve the translated field name, if required\n\n /** Special handling for Address~postalCode where the errorMessage object contains the details of the country specific format that should have been used for the postcode */\n if (ERROR_MSG_IS_OBJECT) {\n /** is ValidationRuleResult w. country specific error */\n const translationKey = (errObj.errorMessage as ErrorMessageObject).translationKey;\n const countrySpecificFormat = (errObj.errorMessage as ErrorMessageObject).translationObject.values.format;\n\n errorMsg = `${i18n.get(translationKey, { values: { label: mappedLabel, format: countrySpecificFormat } })}${SR_INDICATOR_PREFIX}`;\n } else {\n /** is ValidationRuleResult || GenericError || an as yet incorrectly formed error */\n errorMsg = i18n.get(errObj.errorMessage as string, { values: { label: mappedLabel } }) + SR_INDICATOR_PREFIX;\n }\n }\n\n acc.push({ field: key, errorMessage: errorMsg, errorCode });\n\n if (layout) acc.sort((a, b) => layout.indexOf(a.field) - layout.indexOf(b.field));\n }\n return acc;\n }, []);\n\n return sortedErrors;\n};\n\n/**\n * Implemented as a partial, with an object containing the first 6 arguments; then the final argument, errors, is passed to the partial\n *\n * NOTE: using this generic error setting fny is only suitable when errors for the SRPanel are *only* generated by showValidation().\n * When errors are also generated onBlur, as the user leaves the input, the SR message generation becomes more complex - see CardInput as an example\n */\nexport const setSRMessagesFromErrors = (\n { i18n, fieldTypeMappingFn, SRPanelRef },\n { errors, isValidating, layout, countrySpecificLabels }\n): SetSRMessagesReturnObject => {\n const currentErrorsSortedByLayout = sortErrorsByLayout({\n errors,\n i18n,\n fieldTypeMappingFn,\n countrySpecificLabels,\n layout\n });\n\n const doLog = false;\n\n if (doLog) console.log('### setSRMessagesFromErrors::currentErrorsSortedByLayout:: ', currentErrorsSortedByLayout);\n\n if (currentErrorsSortedByLayout.length) {\n /** If validating i.e. \"on submit\" type event - then display all errors in the SR panel */\n if (isValidating) {\n const errorMsgArr: string[] = currentErrorsSortedByLayout.map(errObj => errObj.errorMessage);\n if (doLog) console.log('### setSRMessagesFromErrors:: #1 multiple errors:: (validating) errorMsgArr=', errorMsgArr);\n SRPanelRef.setMessages(errorMsgArr);\n\n const fieldListArr: string[] = currentErrorsSortedByLayout.map(errObj => errObj.field);\n return { currentErrorsSortedByLayout, action: ERROR_ACTION_FOCUS_FIELD, fieldToFocus: fieldListArr[0] };\n } else {\n // prettier-ignore\n if (doLog) console.log('### setSRMessagesFromErrors:: #3 on blur scenario:: not validating but there might be an error, either to set or to clear');\n SRPanelRef?.setMessages(null);\n\n return { currentErrorsSortedByLayout, action: ERROR_ACTION_BLUR_SCENARIO }; // on blur scenario: not validating but there might be an error, either to set or to clear\n }\n } else {\n if (doLog) console.log('### setSRMessagesFromErrors::componentDidUpdate:: #4 clearing errors:: NO currentErrorsSortedByLayout');\n SRPanelRef?.setMessages(null); // no errors - so clear SR panel\n return { currentErrorsSortedByLayout, action: 'none' };\n }\n};\n\nexport const enhanceErrorObjectKeys = (errorObj, keyPrefix) => {\n if (!errorObj) return null;\n const enhancedObj = Object.entries(errorObj).reduce((acc, [key, value]) => {\n if (value) {\n const newKey = `${keyPrefix}${key}`;\n acc[newKey] = value;\n }\n return acc;\n }, {});\n\n return enhancedObj;\n};\n","import { ENCRYPTED_SECURITY_CODE, ENCRYPTED_SECURITY_CODE_3_DIGITS, ENCRYPTED_SECURITY_CODE_4_DIGITS, GIFT_CARD, SF_FIELDS_MAP } from '../constants';\nimport { AriaConfigObject } from '../types';\nimport type Language from '../../../../../language';\n\n/**\n * Based on txVariant & fieldType, add a field specific contextualTexts object to the passed object\n */\nexport default (originalObj: AriaConfigObject, i18n: Language, txVariant: string, fieldType: string): AriaConfigObject => {\n const nuObj: AriaConfigObject = { ...originalObj };\n\n const contextualTexts = {};\n\n switch (txVariant) {\n case 'ach':\n // TODO - when we know the required texts\n break;\n case GIFT_CARD:\n // TODO - when we know the required texts\n break;\n default:\n // Use field type to only add the texts specific to the creditCard securedField\n switch (fieldType) {\n case ENCRYPTED_SECURITY_CODE:\n contextualTexts[ENCRYPTED_SECURITY_CODE_3_DIGITS] = i18n.get('creditCard.securityCode.contextualText.3digits');\n contextualTexts[ENCRYPTED_SECURITY_CODE_4_DIGITS] = i18n.get('creditCard.securityCode.contextualText.4digits');\n break;\n\n default: {\n const translationKey = `creditCard.${SF_FIELDS_MAP[fieldType]}.contextualText`;\n const translation = i18n.get(translationKey);\n if (translation !== translationKey) {\n contextualTexts[fieldType] = translation;\n }\n }\n }\n }\n\n if (Object.keys(contextualTexts).length) {\n nuObj.contextualTexts = contextualTexts;\n }\n\n return nuObj;\n};\n","import { addErrorTranslationsToObject } from '../../../../../../core/Errors/utils';\nimport addContextTranslationsToObject from '../../utilities/addContextTranslations';\nimport Language from '../../../../../../language/Language';\nimport { SF_FIELDS_MAP } from '../../constants';\nimport { AriaConfig, AriaConfigObject } from '../../types';\n\n/**\n * Creates an ariaConfig object with 'iframeTitle' and 'label' properties, whose values are retrieved from the translations object.\n * (These values either come from the translation file or have been overwritten by the merchant in a translations config object.)\n * We then add an error object containing the possible errors for any securedField read from the translation file and stored under error-codes\n */\nexport function processAriaConfig(txVariant: string, fieldType: string, i18n: Language, showContextuaElement): AriaConfig {\n // txVariant can be the scheme name (VISA, Mastercard...) so we put all of them under creditCard\n const type = ['ach', 'giftcard'].includes(txVariant) ? txVariant : 'creditCard';\n\n // Get translation for iframeTitle\n const iframeTitle: string = i18n.get(`${type}.${fieldType}.aria.iframeTitle`);\n\n // Get translation for aria label using *same* key that is used to label the element - important a11y consideration for (securedField) iframe\n const label: string = i18n.get(`${type}.${SF_FIELDS_MAP[fieldType]}.label`);\n\n // Get lang property\n const lang = i18n.locale;\n\n // Create a new object with the iframeTitle & label values from translation file\n const ariaFieldConfigObj: AriaConfigObject = { iframeTitle, label };\n\n // Add error translations object\n let enhancedAriaFieldConfigObj: AriaConfigObject = addErrorTranslationsToObject(ariaFieldConfigObj, i18n, fieldType);\n\n // If allowed, add the translated contextual texts\n if (showContextuaElement) {\n enhancedAriaFieldConfigObj = addContextTranslationsToObject(enhancedAriaFieldConfigObj, i18n, txVariant, fieldType);\n }\n\n // Create a new aria config object keeping the old entries and adding a new one for this field\n // N.B. need to do this deconstruction of the original aria config object to break existing refs & avoid getting an \"accumulated\" object\n return {\n ...(lang && { lang }),\n [fieldType]: enhancedAriaFieldConfigObj\n } as AriaConfig;\n}\n","import { SFPlaceholdersObject } from '../../types';\nimport { Placeholders } from '../../../SFP/types';\nimport {\n ENCRYPTED_SECURITY_CODE,\n ENCRYPTED_SECURITY_CODE_3_DIGITS,\n ENCRYPTED_SECURITY_CODE_4_DIGITS,\n GIFT_CARD,\n SF_FIELDS_MAP\n} from '../../constants';\nimport { Placeholders as GiftcardPlaceholders } from '../../../../../Giftcard/components/types';\nimport { CardPlaceholders } from '../../../../../Card/types';\n\n/**\n * Create placeholders with a value from merchant's configuration\n *\n * Based on txVariant & fieldType, maps the entries in the passed placeholders object to create a field specific placeholder object\n */\nexport function processPlaceholders(txVariant: string, fieldType: string, placeholders: Placeholders): SFPlaceholdersObject {\n switch (txVariant) {\n case GIFT_CARD:\n return { [fieldType]: (placeholders as GiftcardPlaceholders)[SF_FIELDS_MAP[fieldType]] ?? '' };\n\n default:\n switch (fieldType) {\n case ENCRYPTED_SECURITY_CODE:\n return {\n [ENCRYPTED_SECURITY_CODE_3_DIGITS]: (placeholders as CardPlaceholders).securityCodeThreeDigits ?? '',\n [ENCRYPTED_SECURITY_CODE_4_DIGITS]: (placeholders as CardPlaceholders).securityCodeFourDigits ?? ''\n };\n\n default:\n return { [fieldType]: (placeholders as CardPlaceholders)[SF_FIELDS_MAP[fieldType]] ?? '' };\n }\n }\n}\n","import * as logger from '../utilities/logger';\nimport createIframe from './utils/createIframe';\nimport { removeAllChildren, selectOne } from '../utilities/dom';\nimport { off, on } from '../../../../../utils/listenerUtils';\nimport postMessageToIframe from '../CSF/utils/iframes/postMessageToIframe';\nimport { isChromeVoxPostMsg, isWebpackPostMsg, originCheckPassed } from '../CSF/utils/iframes/postMessageValidation';\nimport {\n CVC_POLICY_HIDDEN,\n CVC_POLICY_OPTIONAL,\n DATE_POLICY_HIDDEN,\n DATE_POLICY_OPTIONAL,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR,\n ENCRYPTED_SECURITY_CODE\n} from '../constants';\nimport { generateRandomNumber } from '../utilities/commonUtils';\nimport { CVCPolicyType, DatePolicyType, RtnType_callbackFn, RtnType_noParamVoidFn, RtnType_postMessageListener, SFFeedbackObj } from '../types';\nimport AbstractSecuredField from './AbstractSecuredField';\nimport { AriaConfig, IframeConfigObject, SecuredFieldSetupObject, SecuredFieldCommonProps } from '../types';\nimport { reject } from '../../../../../utils/commonUtils';\nimport { processAriaConfig } from './utils/processAriaConfig';\nimport { processPlaceholders } from './utils/processPlaceholders';\nimport Language from '../../../../../language/Language';\nimport { hasOwnProperty } from '../../../../../utils/hasOwnProperty';\nimport { Placeholders } from '../../SFP/types';\nimport './SecuredField.scss';\n\nconst logPostMsg = false;\nconst doLog = false;\n\nclass SecuredField extends AbstractSecuredField {\n constructor(pSetupObj: SecuredFieldSetupObject, i18n: Language) {\n super();\n\n /**\n * List of props to exclude from being set on this.sfConfig.\n * These props are only required for internal purposes. They do not get sent to the iframe\n */\n const deltaPropsArr: string[] = ['loadingContext', 'holderEl', 'iframeSrc', 'showContextualElement', 'placeholders'];\n\n /**\n * List of props from setup object that will be set on this.sfConfig\n * These props will all end up being sent to the iframe\n */\n const configVarsFromSetUpObj = reject(deltaPropsArr).from(pSetupObj);\n\n // Copy passed setup object values to this.sfConfig\n this.sfConfig = {\n // ...this.sfConfig, // Do we need to do this? Pretty sure we don't\n ...configVarsFromSetUpObj,\n // Break references on iframeUIConfig object so we can overwrite its properties in each securedField instance\n iframeUIConfig: { ...configVarsFromSetUpObj.iframeUIConfig }\n } as SecuredFieldCommonProps;\n\n /**\n * Extract values only needed for init\n */\n const { iframeSrc, placeholders, showContextualElement } = pSetupObj;\n\n /**\n * Store those passed setup object values that are needed in multiple functions\n */\n this.loadingContext = pSetupObj.loadingContext;\n this.holderEl = pSetupObj.holderEl;\n\n /**\n * Initiate other values on 'this' through setters\n */\n this.isValid = false;\n this.iframeContentWindow = null;\n this.numKey = generateRandomNumber();\n this.isEncrypted = false;\n this.hasError = false;\n this.errorType = '';\n this.cvcPolicy = pSetupObj.cvcPolicy;\n this.expiryDatePolicy = pSetupObj.expiryDatePolicy;\n\n if (process.env.NODE_ENV === 'development' && doLog) {\n logger.log(\n '### SecuredField::constructor:: this.sfConfig.fieldType=',\n this.sfConfig.fieldType,\n 'isValid=',\n this._isValid,\n 'numKey=',\n this.numKey\n );\n logger.log('\\n');\n }\n\n return this.init(i18n, iframeSrc, placeholders, showContextualElement);\n }\n\n init(i18n: Language, iframeSrc: string, placeholders: Placeholders, showContextualElement: boolean): SecuredField {\n /**\n * Ensure all fields have a related ariaConfig object containing, at minimum, an iframeTitle property and a (translated) errors object\n */\n const processedAriaConfig: AriaConfig = processAriaConfig(this.sfConfig.txVariant, this.sfConfig.fieldType, i18n, showContextualElement);\n // Set result back onto config object\n this.sfConfig.iframeUIConfig.ariaConfig = processedAriaConfig;\n\n // Set result back onto config object\n this.sfConfig.iframeUIConfig.placeholders = processPlaceholders(this.sfConfig.txVariant, this.sfConfig.fieldType, placeholders);\n\n /**\n * Configure, create & reference iframe and add load listener\n */\n const iframeConfig = {\n src: iframeSrc,\n title: processedAriaConfig[this.sfConfig.fieldType].iframeTitle,\n policy: 'origin'\n };\n\n const iframeEl: HTMLIFrameElement = createIframe(iframeConfig);\n\n // Place the iframe into the holder\n this.holderEl.appendChild(iframeEl);\n\n // Now examine the holder to get an actual DOM node\n const iframe: HTMLIFrameElement = selectOne(this.holderEl, '.js-iframe');\n\n if (iframe) {\n this.iframeContentWindow = iframe.contentWindow;\n\n // Create reference to bound fn (see getters/setters for binding)\n this.iframeOnLoadListener = this.iframeOnLoadListenerFn;\n\n on(iframe, 'load', this.iframeOnLoadListener, false);\n }\n\n this.iframeRef = iframe;\n\n return this;\n }\n\n iframeOnLoadListenerFn(): void {\n // Create reference to bound fn (see getters/setters for binding)\n this.postMessageListener = this.postMessageListenerFn;\n\n // Add general listener for 'message' EVENT - the event that 'powers' postMessage\n on(window, 'message', this.postMessageListener, false);\n\n // Create and send config object to iframe\n const configObj: IframeConfigObject = {\n ...this.sfConfig,\n numKey: this.numKey\n };\n\n if (window._b$dl) console.log('### SecuredField:::: onIframeLoaded:: created configObj=', configObj);\n\n postMessageToIframe(configObj, this.iframeContentWindow, this.loadingContext);\n //--\n\n // Callback to say iframe loaded\n this.onIframeLoadedCallback();\n }\n\n postMessageListenerFn(event: MessageEvent): void {\n // Check message is from expected domain\n if (!originCheckPassed(event, this.loadingContext, this.sfConfig.showWarnings)) {\n return;\n }\n\n // TODO - for debugging purposes this would always be useful to see\n // logger.log('\\n',this.sfConfig.fieldType,'### CSF SecuredField::postMessageListener:: event.data=',event.data);\n\n if (process.env.NODE_ENV === 'development' && logPostMsg) {\n logger.log(\n '\\n###CSF SecuredField::postMessageListener:: DOMAIN & ORIGIN MATCH, NO WEBPACK WEIRDNESS fieldType=',\n this.sfConfig.fieldType,\n 'txVariant=',\n this.sfConfig.txVariant,\n 'this.numKey=',\n this.numKey\n );\n }\n\n // PARSE DATA OBJECT (thus testing if it is a JSON string) - OR TRY & WORK OUT WHY THE PARSING FAILED\n let feedbackObj: SFFeedbackObj;\n\n try {\n feedbackObj = JSON.parse(event.data);\n } catch (e) {\n // Was the message generated by webpack?\n if (isWebpackPostMsg(event)) {\n if (this.sfConfig.showWarnings) logger.log('### SecuredField::postMessageListenerFn:: PARSE FAIL - WEBPACK');\n return;\n }\n\n // Was the message generated by ChromeVox?\n if (isChromeVoxPostMsg(event)) {\n if (this.sfConfig.showWarnings) logger.log('### SecuredField::postMessageListenerFn:: PARSE FAIL - CHROMEVOX');\n return;\n }\n\n if (this.sfConfig.showWarnings)\n logger.log('### SecuredField::postMessageListenerFn:: PARSE FAIL - UNKNOWN REASON: event.data=', event.data);\n return;\n }\n\n // CHECK FOR EXPECTED PROPS\n const hasMainProps: boolean = hasOwnProperty(feedbackObj, 'action') && hasOwnProperty(feedbackObj, 'numKey');\n\n if (!hasMainProps) {\n if (this.sfConfig.showWarnings) logger.warn('WARNING SecuredField :: postMessage listener for iframe :: data mismatch!');\n return;\n }\n\n if (process.env.NODE_ENV === 'development' && logPostMsg) {\n logger.log('### SecuredField::postMessageListener:: feedbackObj.numKey=', feedbackObj.numKey);\n }\n\n if (this.numKey !== feedbackObj.numKey) {\n if (this.sfConfig.showWarnings) {\n logger.warn(\n 'WARNING SecuredField :: postMessage listener for iframe :: data mismatch! (Probably a message from an unrelated securedField)'\n );\n }\n return;\n }\n\n // VALIDATION CHECKS PASSED - DECIDE ON COURSE OF ACTION\n if (process.env.NODE_ENV === 'development' && logPostMsg) {\n logger.log(\n '### SecuredField::postMessageListener:: numkeys match PROCEED WITH POST MESSAGE PROCESSING fieldType=',\n this.sfConfig.fieldType,\n 'txVariant=',\n this.sfConfig.txVariant\n );\n }\n\n switch (feedbackObj.action) {\n case 'encryption':\n this.isValid = true;\n this.onEncryptionCallback(feedbackObj);\n break;\n\n case 'config':\n if (window._b$dl)\n console.log('### SecuredField::postMessageListenerFn:: configured - calling onConfigCallback', feedbackObj.fieldType);\n this.onConfigCallback(feedbackObj);\n break;\n\n case 'focus':\n this.onFocusCallback(feedbackObj);\n break;\n\n case 'binValue':\n this.onBinValueCallback(feedbackObj);\n break;\n\n // iOS ONLY - RE. iOS BUGS AROUND BLUR AND FOCUS EVENTS\n case 'touch':\n this.onTouchstartCallback(feedbackObj);\n break;\n\n // Only happens for Firefox & IE <= 11\n case 'shifttab':\n this.onShiftTabCallback(feedbackObj);\n break;\n\n case 'autoComplete':\n this.onAutoCompleteCallback(feedbackObj);\n break;\n\n case 'enterKeyPressed':\n this.onKeyPressedCallback(feedbackObj);\n break;\n\n /**\n * Validate, because action =\n *\n * 'brand'\n * 'delete'\n * 'luhnCheck'\n * //'incomplete field' (an error that follows from a focus (blur) event)\n * 'incorrectly filled field' (an error that follows from a focus (blur) event) // NEW\n * 'numberKeyPressed' (or date-, month-, year-, cvc-, pin-, or iban- KeyPressed)\n * - since we have no \"error\" action \"...KeyPressed\" is the action type on most error events (other than \"incomplete field\" or \"luhnCheck\")\n * and often these error events representing the clearing of an existing error\n */\n default:\n // If we're validation handling (& not encryption handling) field must be invalid\n this.isValid = false;\n this.onValidationCallback(feedbackObj);\n }\n }\n\n destroy(): void {\n off(window, 'message', this.postMessageListener, false);\n off(this.iframeRef, 'load', this.iframeOnLoadListener, false);\n this.iframeContentWindow = null;\n removeAllChildren(this.holderEl);\n }\n\n /**\n * Returns whether the securedField is hidden OR whether it is optional and not in error\n */\n isOptionalOrHidden(): boolean {\n if (\n this.sfConfig.fieldType === ENCRYPTED_EXPIRY_DATE ||\n this.sfConfig.fieldType === ENCRYPTED_EXPIRY_MONTH ||\n this.sfConfig.fieldType === ENCRYPTED_EXPIRY_YEAR\n ) {\n switch (this.expiryDatePolicy) {\n case DATE_POLICY_HIDDEN:\n return true;\n case DATE_POLICY_OPTIONAL:\n return !this.hasError;\n default:\n return false;\n }\n }\n\n if (this.sfConfig.fieldType === ENCRYPTED_SECURITY_CODE) {\n switch (this.cvcPolicy) {\n case CVC_POLICY_HIDDEN:\n return true;\n case CVC_POLICY_OPTIONAL:\n return !this.hasError;\n default:\n return false;\n }\n }\n\n // Any other type of securedField is not optional & can't be hidden\n return false;\n }\n\n // /////// ALLOCATE CALLBACKS /////////\n onIframeLoaded(callbackFn: RtnType_noParamVoidFn): SecuredField {\n this.onIframeLoadedCallback = callbackFn;\n return this;\n }\n\n onEncryption(callbackFn: RtnType_callbackFn): SecuredField {\n this.onEncryptionCallback = callbackFn;\n return this;\n }\n\n onValidation(callbackFn: RtnType_callbackFn): SecuredField {\n this.onValidationCallback = callbackFn;\n return this;\n }\n\n onConfig(callbackFn: RtnType_callbackFn): SecuredField {\n this.onConfigCallback = callbackFn;\n return this;\n }\n\n onFocus(callbackFn: RtnType_callbackFn): SecuredField {\n this.onFocusCallback = callbackFn;\n return this;\n }\n\n onBinValue(callbackFn: RtnType_callbackFn): SecuredField {\n this.onBinValueCallback = callbackFn;\n return this;\n }\n\n onTouchstart(callbackFn: RtnType_callbackFn): SecuredField {\n this.onTouchstartCallback = callbackFn;\n return this;\n }\n\n onShiftTab(callbackFn: RtnType_callbackFn): SecuredField {\n this.onShiftTabCallback = callbackFn;\n return this;\n }\n\n onAutoComplete(callbackFn: RtnType_callbackFn): SecuredField {\n this.onAutoCompleteCallback = callbackFn;\n return this;\n }\n\n onKeyPressed(callbackFn: RtnType_callbackFn): SecuredField {\n this.onKeyPressedCallback = callbackFn;\n return this;\n }\n //------------------------------------\n\n // ///////////// GETTERS/SETTERS //////////////\n\n get errorType(): string {\n return this._errorType;\n }\n set errorType(value: string) {\n this._errorType = value;\n }\n\n get hasError(): boolean {\n return this._hasError;\n }\n set hasError(value: boolean) {\n this._hasError = value;\n }\n\n get isValid(): boolean {\n if (this.sfConfig.fieldType === ENCRYPTED_SECURITY_CODE) {\n switch (this.cvcPolicy) {\n case CVC_POLICY_HIDDEN:\n // If cvc is hidden then the field is always valid\n return true;\n case CVC_POLICY_OPTIONAL:\n // If cvc is optional then the field is always valid UNLESS it has an error\n return !this.hasError;\n default:\n return this._isValid;\n }\n }\n\n if (\n this.sfConfig.fieldType === ENCRYPTED_EXPIRY_DATE ||\n this.sfConfig.fieldType === ENCRYPTED_EXPIRY_MONTH ||\n this.sfConfig.fieldType === ENCRYPTED_EXPIRY_YEAR\n ) {\n switch (this.expiryDatePolicy) {\n case DATE_POLICY_HIDDEN:\n // If date is hidden then the field is always valid\n return true;\n case DATE_POLICY_OPTIONAL:\n // If date is optional then the field is always valid UNLESS it has an error\n return !this.hasError;\n default:\n return this._isValid;\n }\n }\n\n return this._isValid;\n }\n set isValid(value: boolean) {\n this._isValid = value;\n }\n\n get cvcPolicy(): CVCPolicyType {\n return this._cvcPolicy;\n }\n\n set cvcPolicy(value: CVCPolicyType) {\n // Only set if this is a CVC field\n if (this.sfConfig.fieldType !== ENCRYPTED_SECURITY_CODE) return;\n\n // Only set if value has changed\n if (value === this.cvcPolicy) return;\n\n if (process.env.NODE_ENV === 'development' && doLog) logger.log(this.sfConfig.fieldType, '### SecuredField::cvcPolicy:: value=', value);\n\n this._cvcPolicy = value;\n\n // If the field has changed status (required <--> not required) AND it's error state was due to an isValidated call\n // NOTE: fixes issue in Components where you first validate and then start typing a maestro number\n // - w/o this and the fix in CSF the maestro PM will never register as valid\n if (this.hasError && this.errorType === 'isValidated') {\n this.hasError = false;\n }\n }\n\n get expiryDatePolicy(): DatePolicyType {\n return this._expiryDatePolicy;\n }\n\n set expiryDatePolicy(value: DatePolicyType) {\n // Only set if this is a date field type of securedField\n if (\n this.sfConfig.fieldType !== ENCRYPTED_EXPIRY_DATE &&\n this.sfConfig.fieldType !== ENCRYPTED_EXPIRY_MONTH &&\n this.sfConfig.fieldType !== ENCRYPTED_EXPIRY_YEAR\n )\n return;\n\n // Only set if value has changed\n if (value === this.expiryDatePolicy) return;\n\n if (process.env.NODE_ENV === 'development' && doLog) logger.log(this.sfConfig.fieldType, '### SecuredField:expiryDatePolicy:: value=', value);\n\n this._expiryDatePolicy = value;\n\n // If the field has changed status (required <--> not required) AND it's error state was due to an isValidated call\n if (this.hasError && this.errorType === 'isValidated') {\n this.hasError = false;\n }\n }\n\n get iframeContentWindow(): Window {\n return this._iframeContentWindow;\n }\n set iframeContentWindow(value: Window) {\n this._iframeContentWindow = value;\n }\n\n get isEncrypted(): boolean {\n return this._isEncrypted;\n }\n set isEncrypted(value: boolean) {\n this._isEncrypted = value;\n }\n\n get numKey(): number {\n return this._numKey;\n }\n set numKey(value: number) {\n this._numKey = value;\n }\n\n // Internal use - way to create listener refs that we can add/remove\n get iframeOnLoadListener(): RtnType_noParamVoidFn {\n return this._iframeOnLoadListener;\n }\n set iframeOnLoadListener(value: RtnType_noParamVoidFn) {\n this._iframeOnLoadListener = value.bind(this);\n }\n\n get postMessageListener(): RtnType_postMessageListener {\n return this._postMessageListener;\n }\n set postMessageListener(value: RtnType_postMessageListener) {\n this._postMessageListener = value.bind(this);\n }\n}\n\nexport default SecuredField;\n","interface CheckoutErrorOptions {\n cause?: any;\n code?: string;\n}\n\nexport const NETWORK_ERROR = 'NETWORK_ERROR';\nexport const CANCEL = 'CANCEL';\nexport const IMPLEMENTATION_ERROR = 'IMPLEMENTATION_ERROR';\nexport const API_ERROR = 'API_ERROR';\nexport const ERROR = 'ERROR';\nexport const SCRIPT_ERROR = 'SCRIPT_ERROR';\nexport const SDK_ERROR = 'SDK_ERROR';\n\nclass AdyenCheckoutError extends Error {\n protected static errorTypes = {\n /** Network error. */\n NETWORK_ERROR,\n\n /** Shopper canceled the current transaction. */\n CANCEL,\n\n /** Implementation error. The method or parameter are incorrect or are not supported. */\n IMPLEMENTATION_ERROR,\n\n /** API error. The API has not returned the expected data */\n API_ERROR,\n\n /** Generic error. */\n ERROR,\n\n /** Script error. The browser failed to load 3rd party script */\n SCRIPT_ERROR,\n\n /** Something has gone wrong internally */\n SDK_ERROR\n };\n\n public cause: unknown;\n public options: CheckoutErrorOptions;\n\n constructor(type: keyof typeof AdyenCheckoutError.errorTypes, message?: string, options?: CheckoutErrorOptions) {\n super(message);\n\n this.name = AdyenCheckoutError.errorTypes[type];\n this.options = options || {};\n this.cause = this.options.cause;\n }\n}\n\nexport default AdyenCheckoutError;\n","import { select, getAttribute } from '../../utilities/dom';\nimport {\n ENCRYPTED_EXPIRY_YEAR,\n DATE_POLICY_REQUIRED,\n CVC_POLICY_REQUIRED,\n DATA_ENCRYPTED_FIELD_ATTR,\n DATA_INFO,\n DATA_UID,\n SF_CONFIG_TIMEOUT,\n ALL_SECURED_FIELDS,\n ENCRYPTED_EXPIRY_MONTH\n} from '../../constants';\nimport { existy } from '../../../../../../utils/commonUtils';\nimport cardType from '../utils/cardType';\nimport { SecuredFieldSetupObject } from '../../types';\nimport SecuredField from '../../securedField/SecuredField';\nimport { CardObject, CardBrandData, SFFeedbackObj, CardLoadData, CVCPolicyType, DatePolicyType } from '../../types';\nimport AdyenCheckoutError from '../../../../../../core/Errors/AdyenCheckoutError';\nimport type { SFKeyPressObj } from '../../types';\n\n/**\n * Bound to the instance of CSF\n * Handles specific functionality related to configuring & creating SecuredFields\n */\nexport function createSecuredFields(): number {\n this.encryptedAttrName = DATA_ENCRYPTED_FIELD_ATTR;\n\n // Detect DOM elements that qualify as securedField holders & filter them for valid types\n const securedFields: HTMLElement[] = select(this.props.rootNode, `[${this.encryptedAttrName}]`).filter(field => {\n const fieldType: string = getAttribute(field, this.encryptedAttrName);\n\n if (fieldType === ENCRYPTED_EXPIRY_MONTH) {\n // TODO send analytics about separate date fields\n }\n\n const isValidType = ALL_SECURED_FIELDS.includes(fieldType);\n if (!isValidType) {\n console.warn(\n `WARNING: '${fieldType}' is not a valid type for the '${this.encryptedAttrName}' attribute. A SecuredField will not be created for this element.`\n );\n }\n return isValidType;\n });\n\n /**\n * cvcPolicy - 'required' | 'optional' | 'hidden'\n * - Always 'required' for GiftCards\n * - Usually 'required' for single branded Credit Cards but with exceptions e.g. maestro ('optional'), bcmc ('hidden').\n * - Always 'required' for generic Credit Cards at start up - in this case, subsequent, supporting information about whether cvc stops being required\n * comes from the SF in the brand information (as the shopper inputs the cc number)\n */\n const cvcPolicy: CVCPolicyType = CVC_POLICY_REQUIRED;\n\n /** Usually 'required' for single branded Credit Cards but with exceptions e.g. ticket ('hidden', *technically* a meal voucher) */\n const expiryDatePolicy: DatePolicyType = DATE_POLICY_REQUIRED;\n\n // CHECK IF THIS SECURED FIELD IS NOT OF A CREDIT CARD TYPE\n if (!this.config.isCreditCardType) {\n this.createNonCardSecuredFields(securedFields);\n return securedFields.length;\n }\n\n // CONTINUE AS CREDIT-CARD TYPE...\n this.isSingleBrandedCard = false;\n\n this.securityCode = '';\n\n this.createCardSecuredFields(securedFields, cvcPolicy, expiryDatePolicy);\n\n // Return the number of iframes we're going to create\n return securedFields.length;\n}\n\n/**\n * i.e. giftcard and ach fields\n *\n * Create a new SecuredField for each detected holding element\n */\nexport async function createNonCardSecuredFields(securedFields: HTMLElement[]): Promise<any> {\n for (let i = 0; i < securedFields.length; i++) {\n const securedField = securedFields[i];\n await this.setupSecuredField(securedField).catch(e => {\n if (window._b$dl) console.log('Secured fields setup failure. e=', e);\n });\n }\n}\n\nexport async function createCardSecuredFields(\n securedFields: HTMLElement[],\n cvcPolicy: CVCPolicyType,\n expiryDatePolicy: DatePolicyType\n): Promise<any> {\n // Declared card type from the initialisation of CSF\n let type: string = this.state.type;\n\n // Maybe it's a single branded card defined by setting type: 'card' & a single item in cardGroupTypes\n // In which case update the type var both locally AND in State\n if (type === 'card' && this.config.cardGroupTypes.length === 1) {\n type = this.config.cardGroupTypes[0];\n this.state.type = type;\n }\n\n // So, is it a single branded card?\n this.isSingleBrandedCard = type !== 'card';\n\n // If single branded card field...\n if (this.isSingleBrandedCard) {\n // Check that type exists\n const card: CardObject = cardType.getCardByBrand(type);\n\n // It's possible we don't recognise the card type -\n // scenario: frontend initially recognises card as e.g. Visa - but then backend tokenises it as a sub-brand which we currently don't recognise\n if (!existy(card)) {\n this.state.type = 'unrecognised-single-brand'; // Will let CVC field accept 4 digits in the input\n } else {\n // Assess whether cvc field is required based on the card type & whether the cvc field should even be visible\n cvcPolicy = card.cvcPolicy || CVC_POLICY_REQUIRED;\n expiryDatePolicy = card.expiryDatePolicy || DATE_POLICY_REQUIRED;\n\n this.securityCode = card.securityCode;\n }\n }\n\n /**\n * Create a new SecuredField for each detected holding element\n *\n * - we do this in sequence, waiting until one has configured before creating the next.\n * We do it this way to avoid the 'bug' whereby if something interrupts the loading of an iframe the listener we have for its load event\n * never fires; which means the iframe never configures.\n * (NB - you can recreate this 'bug' by creating the securedFields in a synchronous loop:\n * securedFields.forEach(this.setupSecuredField.bind(this));\n * and putting a breakpoint on the line where we declare the setupSecuredField function)\n *\n * Also note we tried the Array.map/Promise.all way of asynchronously looping through an array - but it didn't fix the issue,\n * - so we fall back to a good old for-loop\n */\n for (let i = 0; i < securedFields.length; i++) {\n const securedField = securedFields[i];\n if (window._b$dl) console.log('\\nAbout to set up securedField:', securedField);\n await this.setupSecuredField(securedField, cvcPolicy, expiryDatePolicy).catch(e => {\n if (window._b$dl) console.log('Secured fields setup failure. e=', e);\n });\n if (window._b$dl) console.log('Finished setting up securedField:', securedField);\n }\n if (window._b$dl) console.log('Finished setting up all securedFields');\n\n /**\n * Now the securedFields have all been created and configured...\n *\n * For a single branded card we call to onBrand callback once.\n * This allows the UI to set the correct logo if they haven't already,\n * and we also pass the cvcPolicy & expiryDatePolicy so the UI can hide the iframe holders if necessary\n */\n if (this.isSingleBrandedCard) {\n const callbackObj: CardBrandData = {\n type: this.state.type,\n rootNode: this.props.rootNode,\n brand: type,\n cvcPolicy,\n expiryDatePolicy,\n cvcText: this.securityCode\n };\n\n // Allow a tick for the securedField to finish rendering\n setTimeout(() => {\n this.callbacks.onBrand(callbackObj);\n }, 0);\n }\n}\n\n// Run for each detected holder of a securedField...\nexport function setupSecuredField(pItem: HTMLElement, cvcPolicy?: CVCPolicyType, expiryDatePolicy?: DatePolicyType): Promise<any> {\n return new Promise((resolve, reject) => {\n /**\n * possible values:\n * encryptedCardNumber\n * encryptedExpiryDate\n * encryptedExpiryMonth\n * encryptedExpiryYear\n * encryptedSecurityCode\n * encryptedPassword\n * encryptedPin???\n * encryptedBankAccountNumber\n * encryptedBankLocationId\n * encryptedIBAN\n */\n const fieldType: string = getAttribute(pItem, this.encryptedAttrName);\n\n if (fieldType === ENCRYPTED_EXPIRY_YEAR) {\n this.state.hasSeparateDateFields = true;\n }\n\n const extraFieldData: string = getAttribute(pItem, DATA_INFO);\n const uid = getAttribute(pItem, DATA_UID);\n\n // CREATE SecuredField passing config object\n const sfInitObj: SecuredFieldSetupObject = {\n fieldType,\n extraFieldData,\n uid,\n cvcPolicy,\n holderEl: pItem,\n expiryDatePolicy,\n txVariant: this.state.type,\n // from this.config (calculated)\n cardGroupTypes: this.config.cardGroupTypes,\n iframeUIConfig: this.config.iframeUIConfig,\n sfLogAtStart: this.config.sfLogAtStart,\n trimTrailingSeparator: this.config.trimTrailingSeparator,\n isCreditCardType: this.config.isCreditCardType,\n iframeSrc: this.config.iframeSrc,\n loadingContext: this.config.loadingContext,\n showWarnings: this.config.showWarnings,\n legacyInputMode: this.config.legacyInputMode,\n minimumExpiryDate: this.config.minimumExpiryDate,\n // from this.props (passed straight thru)\n maskSecurityCode: this.props.maskSecurityCode,\n exposeExpiryDate: this.props.exposeExpiryDate,\n disableIOSArrowKeys: this.props.shouldDisableIOSArrowKeys,\n implementationType: this.props.implementationType,\n showContextualElement: this.props.showContextualElement,\n placeholders: this.props.placeholders\n };\n\n const sf: SecuredField = new SecuredField(sfInitObj, this.props.i18n)\n .onIframeLoaded((): void => {\n // Count\n this.state.iframeCount += 1;\n\n if (window._b$dl) console.log('### createSecuredFields::onIframeLoaded:: this.state.iframeCount=', this.state.iframeCount);\n\n // One of our existing securedFields has just loaded new content!\n if (this.state.iframeCount > this.state.numIframes) {\n this.destroySecuredFields();\n // TODO send analytics about this error\n throw new AdyenCheckoutError(\n 'ERROR',\n `One or more securedFields has just loaded new content. This should never happen. securedFields have been removed.\n iframe load count=${this.state.iframeCount}. Expected count:${this.state.numIframes}`\n );\n }\n\n /** Create timeout within which time we expect the securedField to configure */\n // @ts-ignore - timeout 'type' *is* a number\n sf.loadToConfigTimeout = setTimeout(() => {\n reject({ type: sfInitObj.fieldType, failReason: 'sf took too long to config' });\n }, SF_CONFIG_TIMEOUT);\n\n // If all iframes are loaded - call onLoad callback\n if (this.state.iframeCount === this.state.originalNumIframes) {\n const callbackObj: CardLoadData = { iframesLoaded: true };\n this.callbacks.onLoad(callbackObj);\n }\n })\n .onConfig((pFeedbackObj: SFFeedbackObj): void => {\n this.handleIframeConfigFeedback(pFeedbackObj);\n\n // Clear timeout since the securedField has configured\n clearTimeout(sf.loadToConfigTimeout);\n sf.loadToConfigTimeout = null;\n\n resolve(pFeedbackObj);\n })\n .onFocus((pFeedbackObj: SFFeedbackObj): void => {\n this.handleFocus(pFeedbackObj);\n })\n .onBinValue((pFeedbackObj: SFFeedbackObj): void => {\n this.handleBinValue(pFeedbackObj);\n })\n .onTouchstart((pFeedbackObj: SFFeedbackObj): void => {\n // re. Disabling arrow keys in iOS - need to disable all other fields in the form\n if (this.props.shouldDisableIOSArrowKeys) {\n /**\n * re. this.hasGenuineTouchEvents...\n * There seems to be an issue with Responsive Design mode in Safari that means it allows setting focus on cross-origin iframes,\n * without enabling the touch events that allow the \"disableIOSArrowKeys\" workaround to fully function.\n * This results in a click on an securedFields *label* leading to, for example, the holderName field being disabled, but w/o access\n * to the touch events that would let it re-enable itself.\n *\n * So we prevent the \"disableIOSArrowKeys\" workaround unless we genuinely have touch events available.\n */\n if (this.hasGenuineTouchEvents || pFeedbackObj.hasGenuineTouchEvents) {\n this.callbacks.onTouchstartIOS({ fieldType: pFeedbackObj.fieldType });\n }\n }\n\n // Only perform this step if we genuinely have touch events available\n if (pFeedbackObj.hasGenuineTouchEvents || this.hasGenuineTouchEvents) {\n // iOS ONLY - RE. iOS BUGS AROUND BLUR AND FOCUS EVENTS\n // - pass information about which field has just been clicked (gained focus) to the other iframes\n this.postMessageToAllIframes({ fieldType: pFeedbackObj.fieldType, fieldClick: true });\n }\n })\n .onShiftTab((pFeedbackObj: SFFeedbackObj): void => {\n // Only happens for Firefox & IE <= 11\n this.handleSFShiftTab(pFeedbackObj.fieldType);\n })\n .onEncryption((pFeedbackObj: SFFeedbackObj): void => {\n this.handleEncryption(pFeedbackObj);\n })\n .onValidation((pFeedbackObj: SFFeedbackObj): void => {\n this.handleValidation(pFeedbackObj);\n })\n .onAutoComplete((pFeedbackObj: SFFeedbackObj): void => {\n this.processAutoComplete(pFeedbackObj);\n })\n .onKeyPressed((pFeedbackObj: SFFeedbackObj): void => {\n const { numKey, ...rest } = pFeedbackObj;\n this.callbacks.onKeyPressed(rest as SFKeyPressObj);\n });\n\n // Store reference to securedField in this.state (under fieldType)\n this.state.securedFields[fieldType] = sf;\n });\n}\n","function isIE() {\n const ua = navigator.userAgent;\n\n const msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n const trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n const rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n const edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}\n\n// NOTE: change from const to let for the purposes of testing (the values get set in some tests)\n/* eslint-disable */\nlet __IS_ANDROID = typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent);\nlet __IS_IE = typeof navigator !== 'undefined' && isIE();\nlet __IS_IOS = typeof navigator !== 'undefined' && /iphone|ipod|ipad/i.test(navigator.userAgent);\nlet __IS_FIREFOX = typeof navigator !== 'undefined' && /(firefox)/i.test(navigator.userAgent);\nlet __IS_SAFARI = typeof navigator !== 'undefined' && /(safari)/i.test(navigator.userAgent) && !/(chrome)/i.test(navigator.userAgent);\n/* eslint-enable */\n\nexport default {\n __IS_ANDROID,\n __IS_IE,\n __IS_IOS,\n __IS_FIREFOX,\n __IS_SAFARI\n};\n","import { selectOne } from '../../utilities/dom';\nimport ua from '../utils/userAgent';\nimport { on, off } from '../../../../../../utils/listenerUtils';\n\nconst getCaretPos = (pNode: HTMLInputElement | HTMLTextAreaElement): number => {\n if ('selectionStart' in pNode) {\n return pNode.selectionStart;\n }\n return 0;\n};\n\n/**\n * Detect if touched element is an input or textArea.\n * - If it is do some quirky shit to set focus and caret position on this element\n * - Else do some quirky shit to make the iOS keyboard retract\n *\n * Always then remove this listener and set var saying we have done so (read in CSF...handleFocus)\n * Tell all securedFields some other element now has focus so they can blur themselves\n *\n * @param e -\n */\nfunction touchendListener(e: Event): void {\n const targetEl: EventTarget = e.target;\n\n // If other element is Input or TextArea\n if (targetEl instanceof HTMLInputElement || (HTMLTextAreaElement && targetEl instanceof HTMLTextAreaElement)) {\n // Force caret to show - 'requires' resetting field's value\n const val: string = targetEl.value;\n\n let caretPos: number = getCaretPos(targetEl);\n\n let adjFlag = false;\n\n // For some annoying, iOS Safari, reason if caretPos is at the end of the string then it won't show up\n // - so first decrease it; then set it again, asynchronously\n if (caretPos === val.length) {\n caretPos -= 1;\n adjFlag = true;\n }\n\n targetEl.value = val;\n\n /**\n * If the input element is of an unexpected type (perhaps the merchant is using a custom button that is an input element, type=\"button\", or,\n * it is something presented in the 3DS2 flow - both, TBC) then this next line will not work.\n * However, the input element still has a setSelectionRange property of type \"function\", but trying to call it will throw an error...\n * so, try, to see if setSelectionRange can be called\n */\n try {\n if (targetEl.setSelectionRange) {\n targetEl.focus();\n targetEl.setSelectionRange(caretPos, caretPos);\n\n // Quirky! (see comment about iOS Safari, above)\n if (adjFlag) {\n caretPos += 1;\n setTimeout(() => {\n targetEl.setSelectionRange(caretPos, caretPos);\n }, 0);\n }\n }\n /* eslint-disable-next-line */\n } catch (e) {}\n } else {\n /**\n * Workaround for iOS/Safari bug where keypad doesn't retract when SF paymentMethod is no longer active\n */\n const hasKeypadFix: boolean = this.config.keypadFix; // to avoid linting no-lonely-if\n if (hasKeypadFix) {\n // Create an input we can add focus to.\n // Otherwise 2nd & sub times the caret gets left in the SF even though it has lost focus and cannot be typed into\n const rootNode: HTMLElement = this.props.rootNode;\n const nuInput: HTMLInputElement = document.createElement('input');\n nuInput.style.width = '1px';\n nuInput.style.height = '1px';\n nuInput.style.opacity = '0';\n nuInput.style.fontSize = '18px'; // prevents zoom\n rootNode.appendChild(nuInput);\n nuInput.focus(); // Takes caret from SF\n rootNode.removeChild(nuInput); // Without this numpad will be replaced with text pad\n }\n }\n\n // Remove listener - it gets reset by next call to handleAdditionalFields from handleFocus\n this.destroyTouchendListener();\n\n // Store the fact we have unset the listener\n this.state.registerFieldForIos = false;\n\n // Clear focus on secured field inputs now this checkout element has gained focus\n this.postMessageToAllIframes({ fieldType: 'webInternalElement', fieldClick: true });\n}\n\n/**\n * re. Disabling arrow keys in iOS - need to enable all fields in the form and tell SFs to disable\n *\n * NOTE: Only called when iOS detected & this.props.shouldDisableIOSArrowKeys = true\n */\nfunction touchstartListener(e: Event): void {\n this.hasGenuineTouchEvents = true;\n const targetEl: EventTarget = e.target;\n // If other element is Input or Span (i.e. label text) TODO apply to other types of el?\n if (targetEl instanceof HTMLInputElement || targetEl instanceof HTMLSpanElement) {\n this.postMessageToAllIframes({ fieldType: 'webInternalElement', checkoutTouchEvent: true });\n\n const name = targetEl.getAttribute('name') ?? targetEl.getAttribute('data-id'); // if targetEl is a label's span it will only have a data-id\n this.callbacks.onTouchstartIOS?.({ fieldType: 'webInternalElement', name });\n }\n}\n\n/**\n * This works with the touchend handler to allow us to catch (click) events on non-securedFields elements\n * (re. http://gravitydept.com/blog/js-click-event-bubbling-on-ios - events don't bubble unless the click takes place on a link or input)\n *\n * We can use this event to:\n * 1. Set focus on these other elements, and\n * 2. Tell SecuredFields that this has happened so they can blur themselves\n * (see note in adyen-secured-fields...inputBase.js - \"Blur event never fires on input field\")\n *\n * NOTE: Only called when iOS detected\n */\nfunction handleTouchend(): void {\n const bodyEl: HTMLBodyElement = selectOne(document, 'body');\n bodyEl.style.cursor = 'pointer';\n\n on(bodyEl, 'touchend', this.touchendListener);\n\n // Store the fact we have set the listener\n this.state.registerFieldForIos = true;\n}\n\nfunction destroyTouchendListener(): boolean {\n if (!ua.__IS_IOS) return false; // For when fn is called as result of destroy being called on main csf instance\n\n const bodyEl: HTMLBodyElement = selectOne(document, 'body');\n bodyEl.style.cursor = 'auto';\n off(bodyEl, 'touchend', this.touchendListener);\n return true;\n}\n\nfunction destroyTouchstartListener(): boolean {\n if (!ua.__IS_IOS) return false; // For when fn is called as result of destroy being called on main csf instance\n\n off(document, 'touchstart', this.touchstartListener);\n return true;\n}\n\nexport default {\n touchendListener,\n touchstartListener,\n handleTouchend,\n destroyTouchendListener,\n destroyTouchstartListener\n};\n","import { selectOne, select } from '../../../utilities/dom';\n\nconst getPreviousTabbableEl = (matchEl, getPrevious = true) => {\n const selStr =\n '*[data-cse], a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), ' +\n 'button:not([disabled]), object, embed, *[tabindex], *[contenteditable]';\n const allPotentialTabEls = Array.prototype.slice.call(select(document, selStr));\n const actualTabEls = [];\n\n allPotentialTabEls.forEach(potentialTabEl => {\n const tabIndex = potentialTabEl.getAttribute('tabindex');\n const isValidTabEl = !tabIndex || parseInt(tabIndex, 10) >= 0; // If tabindex hasn't been set, or is set and is >= 0\n const bounds = potentialTabEl.getBoundingClientRect();\n const hasDimensions = bounds.width > 0 && bounds.height > 0;\n\n if (isValidTabEl && hasDimensions) {\n actualTabEls.push(potentialTabEl);\n }\n });\n\n // Loop through an array until it finds an element based on a test fn, and then return the elements index\n const getIndexThruTest = (arr, testFn) => {\n for (let n = 0; n < arr.length; n += 1) {\n if (testFn(arr[n])) {\n return n;\n }\n }\n return -1;\n };\n\n // Test function\n const isElOrContainsEl = tabEl => tabEl === matchEl || matchEl.contains(tabEl);\n\n // Loop through the actualTabEls array until it finds the matchEl, returning its index\n const matchElIndex = getIndexThruTest(actualTabEls, isElOrContainsEl);\n\n // Are we actually getting the previous element OR the next?\n const indexModifier = getPrevious ? -1 : 1;\n\n return actualTabEls[matchElIndex + indexModifier];\n};\n\nexport const getPreviousTabbableNonSFElement = (passedFieldType, rootNode, getPrevious?) => {\n // --\n const sfEl = selectOne(rootNode, `[data-cse=${passedFieldType}]`);\n return getPreviousTabbableEl(sfEl, getPrevious);\n};\n\nexport const focusExternalField = (pAdditionalField: HTMLElement): void => {\n if (pAdditionalField) {\n pAdditionalField.focus();\n\n // Quirky! - Needed to work in the Components scenario\n pAdditionalField.blur();\n pAdditionalField.focus();\n }\n};\n","import {\n ENCRYPTED_CARD_NUMBER,\n ENCRYPTED_SECURITY_CODE,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR\n} from '../../../constants';\nimport { getPreviousTabbableNonSFElement } from './utils';\nimport { SFFieldType, ShiftTabObject } from '../../../types';\n\n// Regular Credit Card scenario\nexport function shiftTabCreditCard(\n fieldType: SFFieldType,\n rootNode: HTMLElement,\n hasSeparateDateFields: boolean,\n numIframes: number\n): ShiftTabObject {\n let additionalField: HTMLElement;\n let fieldToFocus: SFFieldType;\n\n switch (fieldType) {\n case ENCRYPTED_CARD_NUMBER:\n additionalField = getPreviousTabbableNonSFElement(ENCRYPTED_CARD_NUMBER, rootNode);\n break;\n\n case ENCRYPTED_EXPIRY_DATE:\n fieldToFocus = ENCRYPTED_CARD_NUMBER;\n break;\n\n case ENCRYPTED_EXPIRY_MONTH:\n fieldToFocus = ENCRYPTED_CARD_NUMBER;\n break;\n\n case ENCRYPTED_EXPIRY_YEAR:\n fieldToFocus = ENCRYPTED_EXPIRY_MONTH;\n break;\n\n case ENCRYPTED_SECURITY_CODE:\n // Shifting focus away from securedFields\n if (numIframes === 1) {\n additionalField = getPreviousTabbableNonSFElement(ENCRYPTED_SECURITY_CODE, rootNode);\n } else {\n // Focus stays within securedFields\n fieldToFocus = !hasSeparateDateFields ? ENCRYPTED_EXPIRY_DATE : ENCRYPTED_EXPIRY_YEAR;\n }\n break;\n\n default:\n break;\n }\n\n return {\n fieldToFocus,\n additionalField\n };\n}\n","import { ENCRYPTED_CARD_NUMBER, ENCRYPTED_SECURITY_CODE } from '../../../constants';\nimport { getPreviousTabbableNonSFElement } from './utils';\nimport { SFFieldType, ShiftTabObject } from '../../../types';\n\n// GIFT CARD scenario: SecurityCode preceded by CardNumber\nexport function shiftTabGiftCard(fieldType: SFFieldType, rootNode: HTMLElement): ShiftTabObject {\n let additionalField: HTMLElement;\n let fieldToFocus: SFFieldType;\n\n switch (fieldType) {\n case ENCRYPTED_CARD_NUMBER:\n additionalField = getPreviousTabbableNonSFElement(ENCRYPTED_CARD_NUMBER, rootNode);\n\n break;\n\n case ENCRYPTED_SECURITY_CODE:\n fieldToFocus = ENCRYPTED_CARD_NUMBER;\n break;\n\n default:\n break;\n }\n\n return {\n fieldToFocus,\n additionalField\n };\n}\n","import {\n ENCRYPTED_CARD_NUMBER,\n ENCRYPTED_SECURITY_CODE,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR,\n ENCRYPTED_PWD_FIELD\n} from '../../../constants';\nimport { getPreviousTabbableNonSFElement } from './utils';\nimport { SFFieldType, ShiftTabObject } from '../../../types';\n\n// KCP scenario: Regular credit card but with additional fields -\n// an encrypted pin/password field preceded by a form field of a non-SF type (d.o.b/taxRefNum)\nexport function shiftTabKCP(fieldType: SFFieldType, rootNode: HTMLElement, hasSeparateDateFields: boolean): ShiftTabObject {\n let additionalField: HTMLElement;\n let fieldToFocus: SFFieldType;\n\n switch (fieldType) {\n case ENCRYPTED_CARD_NUMBER:\n additionalField = getPreviousTabbableNonSFElement(ENCRYPTED_CARD_NUMBER, rootNode);\n break;\n\n case ENCRYPTED_EXPIRY_DATE:\n fieldToFocus = ENCRYPTED_CARD_NUMBER;\n break;\n\n case ENCRYPTED_EXPIRY_MONTH:\n fieldToFocus = ENCRYPTED_CARD_NUMBER;\n break;\n\n case ENCRYPTED_EXPIRY_YEAR:\n fieldToFocus = ENCRYPTED_EXPIRY_MONTH;\n break;\n\n case ENCRYPTED_SECURITY_CODE:\n fieldToFocus = !hasSeparateDateFields ? ENCRYPTED_EXPIRY_DATE : ENCRYPTED_EXPIRY_YEAR;\n break;\n\n case ENCRYPTED_PWD_FIELD:\n additionalField = getPreviousTabbableNonSFElement(fieldType, rootNode);\n break;\n\n default:\n break;\n }\n\n return {\n fieldToFocus,\n additionalField\n };\n}\n","import ua from '../utils/userAgent';\nimport * as logger from '../../utilities/logger';\nimport { shiftTabCreditCard } from '../utils/tabbing/tabScenarioCreditCard';\nimport { shiftTabGiftCard } from '../utils/tabbing/tabScenarioGiftCard';\nimport { shiftTabKCP } from '../utils/tabbing/tabScenarioKCP';\nimport { SFFieldType, ShiftTabObject } from '../../types';\nimport { focusExternalField } from '../utils/tabbing/utils';\n\nconst logTab = false;\n\nfunction handleShiftTab(fieldType: SFFieldType): void {\n if (logTab) logger.log('### handleTab::handleShiftTab:: fieldType', fieldType);\n\n let shiftTabObj: ShiftTabObject;\n\n switch (this.state.type) {\n // GIFT CARD scenario: SecurityCode preceded by CardNumber\n case 'giftcard':\n shiftTabObj = shiftTabGiftCard(fieldType, this.props.rootNode);\n break;\n\n // Credit Card scenarios\n default:\n // KCP scenario: Regular credit card but with additional fields\n // - an encrypted pin/password field preceded by a form field of a non-SF type (d.o.b/taxRefNum)\n if (this.state.isKCP) {\n shiftTabObj = shiftTabKCP(fieldType, this.props.rootNode, this.state.hasSeparateDateFields);\n } else {\n // Regular Credit Card\n shiftTabObj = shiftTabCreditCard(fieldType, this.props.rootNode, this.state.hasSeparateDateFields, this.state.numIframes);\n }\n break;\n }\n\n const fieldToFocus: string = shiftTabObj.fieldToFocus;\n const additionalField: HTMLElement = shiftTabObj.additionalField;\n\n if (fieldToFocus) {\n this.setFocusOnFrame(fieldToFocus, logTab);\n } else if (additionalField) {\n focusExternalField(additionalField);\n }\n}\n\nconst eligibleForTabFix = (): boolean => ua.__IS_FIREFOX || (ua.__IS_IE && ua.__IS_IE <= 11);\n\nfunction handleSFShiftTab(fieldType: SFFieldType): void {\n if (eligibleForTabFix()) {\n this.handleShiftTab(fieldType);\n }\n}\n\nexport default {\n handleShiftTab,\n handleSFShiftTab\n};\n","import {\n ENCRYPTED_SECURITY_CODE,\n ENCRYPTED_CARD_NUMBER,\n DATE_POLICY_REQUIRED,\n DATE_POLICY_HIDDEN,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR\n} from '../../constants';\nimport postMessageToIframe from '../utils/iframes/postMessageToIframe';\nimport { SFFeedbackObj, SendBrandObject, SendExpiryDateObject } from '../../types';\nimport { BinLookupResponse, BrandObject } from '../../../../../Card/types';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\nimport getIframeContentWin from '../utils/iframes/getIframeContentWin';\nimport { SingleBrandResetObject } from '../../../SFP/types';\n\nexport function sendBrandToCardSF(brandObj: SendBrandObject): void {\n if (hasOwnProperty(this.state.securedFields, ENCRYPTED_CARD_NUMBER)) {\n const dataObj: object = {\n txVariant: this.state.type,\n ...brandObj,\n fieldType: ENCRYPTED_CARD_NUMBER,\n numKey: this.state.securedFields[ENCRYPTED_CARD_NUMBER].numKey\n };\n postMessageToIframe(dataObj, getIframeContentWin(this.state, ENCRYPTED_CARD_NUMBER), this.config.loadingContext);\n }\n}\n\nexport function sendExpiryDatePolicyToSF(expiryDateObj: SendExpiryDateObject): void {\n const separateDateFields =\n hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_MONTH) && hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_YEAR);\n\n const dateIframesArr = separateDateFields ? [ENCRYPTED_EXPIRY_MONTH, ENCRYPTED_EXPIRY_YEAR] : [ENCRYPTED_EXPIRY_DATE];\n\n dateIframesArr.forEach((key: string) => {\n const dataObj: object = {\n txVariant: this.state.type,\n ...expiryDateObj,\n fieldType: key,\n numKey: this.state.securedFields[key].numKey\n };\n postMessageToIframe(dataObj, getIframeContentWin(this.state, key), this.config.loadingContext);\n });\n}\n\nexport default function handleBrandFromBinLookup(binLookupResponse: BinLookupResponse, resetObj: SingleBrandResetObject): void {\n const isGenericCard: boolean = this.state.type === 'card';\n\n /**\n * The number of digits in number field has dropped below threshold for BIN lookup (or the bin wasn't found in the DB)\n * - so tell SF to reset & republish the brand it detects\n */\n if (!binLookupResponse || !Object.keys(binLookupResponse).length) {\n if (isGenericCard) {\n // This will be sent to CardNumber SF which will trigger the brand to be re-evaluated and broadcast\n // (which will reset cvcPolicy & expiryDatePolicy in state, here in Checkout)\n this.sendBrandToCardSF({ brand: 'reset' });\n // Also pass the reset expiryDatePolicy to the date related SFs so they can reset visibility & aria-required attrs\n this.sendExpiryDatePolicyToSF({ expiryDatePolicy: DATE_POLICY_REQUIRED });\n } else {\n /**\n * For \"dedicated\" card components, i.e a card component created as: checkout.create('bcmc') but which can accept multiple brands,\n * there will be no to-and-fro with the securedField iframe to reset brand.\n * The presence of a resetObj indicates we are in this \"dedicated\"\" scenario, so we need to use the information contained within this object\n * to internally reset the brand\n */\n if (resetObj) {\n this.processBrand({ ...resetObj, fieldType: ENCRYPTED_CARD_NUMBER } as SFFeedbackObj);\n }\n }\n\n // Reset expiryDatePolicy - which never comes from SF // TODO find out under which circumstances this clause is still required\n if (this.state.type === 'card' && hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_DATE)) {\n this.state.securedFields[ENCRYPTED_EXPIRY_DATE].expiryDatePolicy = DATE_POLICY_REQUIRED;\n }\n\n return;\n }\n\n const binBrandObj: BrandObject = binLookupResponse.supportedBrands[0];\n\n const passedBrand: string = binBrandObj.brand;\n\n // Look first for expiryDatePolicy string otherwise use showExpiryDate boolean\n const expiryDatePolicy = binBrandObj.expiryDatePolicy ?? (binBrandObj.showExpiryDate === true ? DATE_POLICY_REQUIRED : DATE_POLICY_HIDDEN);\n\n const brandObj: object = {\n brand: passedBrand,\n cvcPolicy: binBrandObj.cvcPolicy,\n expiryDatePolicy,\n cvcText: 'Security code',\n showSocialSecurityNumber: binBrandObj.showSocialSecurityNumber ?? false,\n fieldType: ENCRYPTED_CARD_NUMBER\n };\n\n // Take advantage of function used to handle brand messages from SF in order to process this new brand information\n this.processBrand(brandObj as SFFeedbackObj);\n\n if (isGenericCard) {\n // Pass brand to CardNumber SF\n const cardObj: SendBrandObject = {\n brand: passedBrand,\n enableLuhnCheck: binLookupResponse.supportedBrands[0].enableLuhnCheck !== false,\n // Only pass the panLength if a) we have one & b) we're not in a switching-between-dual-brands scenario\n // (because it causes unnecessary callbacks from SF which uses panLength to trigger moving focus to the expiryDate field)\n ...(binBrandObj?.panLength && !binLookupResponse.isDualBrandSelection && { panLength: binBrandObj?.panLength })\n };\n this.sendBrandToCardSF(cardObj);\n\n // Inform the date related securedFields\n // - if expiryDatePolicy is 'optional' or 'hidden' they need to set the aria-required attribute / hide themselves\n this.sendExpiryDatePolicyToSF({ expiryDatePolicy });\n }\n\n /**\n * CHECK IF BRAND CHANGE MEANS FORM IS NOW VALID e.g maestro/bcmc (which don't require cvc) OR bcmc/visa (one of which doesn't require cvc, one of which does)\n */\n\n /**\n * First set the cvcPolicy value on the relevant SecuredFields instance (which will reflect in the cvc field being considered valid,\n * as long as it is not in error)...\n */\n if (hasOwnProperty(this.state.securedFields, ENCRYPTED_SECURITY_CODE)) {\n this.state.securedFields[ENCRYPTED_SECURITY_CODE].cvcPolicy = binBrandObj.cvcPolicy;\n }\n\n /**\n * ...then set the expiryDatePolicy...\n */\n if (hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_DATE)) {\n this.state.securedFields[ENCRYPTED_EXPIRY_DATE].expiryDatePolicy = expiryDatePolicy;\n } else if (hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_MONTH) && hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_YEAR)) {\n this.state.securedFields[ENCRYPTED_EXPIRY_MONTH].expiryDatePolicy = expiryDatePolicy;\n this.state.securedFields[ENCRYPTED_EXPIRY_YEAR].expiryDatePolicy = expiryDatePolicy;\n }\n\n /**\n * ...and now re-check if form i.e all the SecuredFields, are valid\n */\n this.validateForm();\n}\n","import postMessageToIframe from '../utils/iframes/postMessageToIframe';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\nimport getIframeContentWin from '../utils/iframes/getIframeContentWin';\nimport { SFFieldType } from '../../types';\nimport { CSFThisObject } from '../types';\n\n/**\n * @param csfState - comes from initial, partial, implementation\n * @param csfConfig - comes from initial, partial, implementation\n *\n * @param pFieldType -\n * @param doLog -\n */\nexport function setFocusOnFrame({ csfState, csfConfig }: CSFThisObject, pFieldType: SFFieldType, doLog?: boolean): void {\n // Check destroySecuredFields hasn't been called (thus clearing the state's securedFields object)\n if (!hasOwnProperty(csfState.securedFields, pFieldType)) return;\n\n if (process.env.NODE_ENV === 'development' && doLog) console.log('\\n### setFocusOnFrame:: (SHIFT_TAB) place focus on:', pFieldType);\n\n const focusData = {\n txVariant: csfState.type,\n fieldType: pFieldType,\n focus: true,\n numKey: csfState.securedFields[pFieldType].numKey\n };\n\n postMessageToIframe(focusData, getIframeContentWin(csfState, pFieldType), csfConfig.loadingContext);\n}\n","import postMessageToIframe from '../utils/iframes/postMessageToIframe';\nimport getIframeContentWin from '../utils/iframes/getIframeContentWin';\nimport { CSFThisObject } from '../types';\nimport { SFFieldType } from '../../types';\n\n/**\n * UTIL TO BROADCAST TO ALL IFRAMES AT ONCE\n * Adds correct txVariant, fieldType and numKey for each iframe\n *\n * @param csfState - comes from initial, partial, implementation\n * @param csfConfig - comes from initial, partial, implementation\n *\n * @param pDataObj -\n */\nexport function postMessageToAllIframes({ csfState, csfConfig }: CSFThisObject, pDataObj: object): boolean {\n const objKeys: string[] = Object.keys(pDataObj || {});\n if (!objKeys.length) {\n // pDataObj is an object with the 'special' key(s) that represent the reason for making this postMessage\n // without it/them there is no reason to postMessage\n return false;\n }\n\n const securedFieldKeys: string[] = Object.keys(csfState.securedFields);\n securedFieldKeys.forEach((pFieldType: SFFieldType) => {\n const dataObj: object = {\n txVariant: csfState.type,\n fieldType: pFieldType,\n numKey: csfState.securedFields[pFieldType].numKey\n };\n\n // Copy across 'special' properties from passed data object\n objKeys.forEach(pKey => {\n dataObj[pKey] = pDataObj[pKey];\n });\n\n postMessageToIframe(dataObj, getIframeContentWin(csfState, pFieldType), csfConfig.loadingContext);\n });\n return true;\n}\n","import { ENCRYPTED_CARD_NUMBER, ENCRYPTED_SECURITY_CODE } from '../../constants';\nimport postMessageToIframe from '../utils/iframes/postMessageToIframe';\nimport { objectsDeepEqual } from '../../utilities/commonUtils';\nimport { BrandStorageObject, CardBrandData, SFFeedbackObj, SFFieldType } from '../../types';\nimport { pick } from '../../../../../../utils/commonUtils';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\nimport getIframeContentWin from '../utils/iframes/getIframeContentWin';\nimport { CSFThisObject } from '../types';\n\nconst checkForBrandChange = (pBrand: BrandStorageObject, storedBrand: BrandStorageObject): boolean => {\n // if the objects aren't the same - then return true = brandChange has happened\n return !objectsDeepEqual(pBrand, storedBrand);\n};\n\n/**\n * - If generic card type AND passed brand doesn't equal stored brand - send the new brand to the cvc input\n * (so it can reassess what length it should be and if any value it contains is now valid)\n *\n * - Create object for onBrand callback aka SFPHandlers.handleOnBrand\n *\n * @param csfState - comes from initial, partial, implementation\n * @param csfConfig - comes from initial, partial, implementation\n * @param csfProps - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n *\n * @param pFeedbackObj -\n */\nexport default function processBrand({ csfState, csfConfig, csfProps, csfCallbacks }: CSFThisObject, pFeedbackObj: SFFeedbackObj): boolean {\n const fieldType: SFFieldType = pFeedbackObj.fieldType;\n\n if (fieldType === ENCRYPTED_CARD_NUMBER) {\n // Check for new brand...\n const newBrandObj: BrandStorageObject = {\n brand: pFeedbackObj.brand,\n cvcPolicy: pFeedbackObj.cvcPolicy,\n expiryDatePolicy: pFeedbackObj.expiryDatePolicy,\n showSocialSecurityNumber: pFeedbackObj.showSocialSecurityNumber\n };\n const newBrand: boolean = checkForBrandChange(newBrandObj, csfState.brand);\n\n if (!newBrand) {\n return null;\n }\n\n // Now BCMC can dual brand with Visa it must also be treated as a generic card so we can show/hide the CVC field\n const treatAsGenericCard: boolean = csfState.type === 'card' || csfState.type === 'bcmc';\n\n // ...if also a generic card - tell cvc field...\n if (treatAsGenericCard && newBrand) {\n // Store on state so for subsequent brand messages we can compare the new and the old\n csfState.brand = newBrandObj;\n\n // Perform postMessage to send brand to CVC field - this also needs to happen for BCMC, single branded cards,\n // because it needs to know the cvcPolicy (to set the aria-required attribute & to show the iframe)\n if (hasOwnProperty(csfState.securedFields, ENCRYPTED_SECURITY_CODE)) {\n const dataObj: object = {\n txVariant: csfState.type,\n brand: newBrandObj.brand,\n fieldType: ENCRYPTED_SECURITY_CODE,\n cvcPolicy: pFeedbackObj.cvcPolicy,\n numKey: csfState.securedFields[ENCRYPTED_SECURITY_CODE].numKey\n };\n postMessageToIframe(dataObj, getIframeContentWin(csfState, ENCRYPTED_SECURITY_CODE), csfConfig.loadingContext);\n }\n }\n\n // Create object with brand related properties\n const brandInfoObj = treatAsGenericCard\n ? pick(['brand', 'cvcPolicy', 'cvcText', 'expiryDatePolicy', 'showSocialSecurityNumber']).from(pFeedbackObj)\n : null;\n\n if (brandInfoObj && brandInfoObj.brand) {\n const callbackObj: CardBrandData = brandInfoObj as CardBrandData;\n callbackObj.type = csfState.type;\n callbackObj.rootNode = csfProps.rootNode as HTMLElement;\n\n // ...and call SFPHandlers.handleOnBrand\n csfCallbacks.onBrand(callbackObj);\n }\n\n return true;\n }\n\n return false;\n}\n","import postMessageToIframe from '../utils/iframes/postMessageToIframe';\nimport { ENCRYPTED_EXPIRY_DATE, ENCRYPTED_EXPIRY_MONTH, ENCRYPTED_EXPIRY_YEAR } from '../../constants';\nimport { SFFeedbackObj, CardAutoCompleteData } from '../../types';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\nimport getIframeContentWin from '../utils/iframes/getIframeContentWin';\nimport { CSFThisObject } from '../types';\n\n/**\n *\n * @param csfState - comes from initial, partial, implementation\n * @param csfConfig - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n *\n * @param pFeedbackObj -\n */\nexport function processAutoComplete({ csfState, csfConfig, csfCallbacks }: CSFThisObject, pFeedbackObj: SFFeedbackObj): boolean {\n /**\n * NOTE: It seems Chrome has started autofilling across cross-origin iframes. Have tested as far back as v104 but have no resources to test further back\n * So, in theory for Chrome \\>= v104 we don't need to do any of this, including having special listeners in the securedFields\n */\n\n // Specifically for cc-name (but no reason not to propagate all AC objects to the merchant)\n if (pFeedbackObj.name === 'cc-name') {\n const feedbackObj: SFFeedbackObj = { ...pFeedbackObj };\n delete feedbackObj.numKey;\n const ACFeedbackObj: CardAutoCompleteData = feedbackObj as CardAutoCompleteData;\n csfCallbacks.onAutoComplete(ACFeedbackObj);\n return true;\n }\n\n // Send date info to relevant secured fields (needed for Safari whose Security model won't allow direct population of fields in 3rd party iframes)\n if (pFeedbackObj.name === 'cc-exp') {\n const splittableDateVal = pFeedbackObj.value.replace(/[^0-9]/gi, '/'); // Replace any non-digits with a fwd-slash so we can always split it\n\n const dateValArr: string[] = splittableDateVal.split('/');\n\n if (dateValArr.length !== 2) {\n // To avoid bug in some versions of Safari where date doesn't come through as expected\n return false;\n }\n\n if (dateValArr[0].length === 1) dateValArr[0] = `0${dateValArr[0]}`; // pad, if required\n\n const acMonthVal: string = dateValArr[0];\n\n // Extra checks that passed year is a valid value\n const year = dateValArr[1];\n const isValidYear = (year?.length === 4 || year?.length === 2) && !isNaN(parseInt(year));\n if (!isValidYear) {\n return false;\n }\n\n const acYearVal: string = year.slice(-2); // take last 2 digits of year\n const acDateVal = `${acMonthVal}/${acYearVal}`;\n\n if (hasOwnProperty(csfState.securedFields, ENCRYPTED_EXPIRY_DATE)) {\n const dataObj: object = {\n txVariant: csfState.type,\n fieldType: ENCRYPTED_EXPIRY_DATE,\n autoComplete: acDateVal,\n numKey: csfState.securedFields[ENCRYPTED_EXPIRY_DATE].numKey\n };\n postMessageToIframe(dataObj, getIframeContentWin(csfState, ENCRYPTED_EXPIRY_DATE), csfConfig.loadingContext);\n return true;\n }\n\n if (hasOwnProperty(csfState.securedFields, ENCRYPTED_EXPIRY_MONTH)) {\n const dataObj: object = {\n txVariant: csfState.type,\n fieldType: ENCRYPTED_EXPIRY_MONTH,\n autoComplete: acMonthVal,\n numKey: csfState.securedFields[ENCRYPTED_EXPIRY_MONTH].numKey\n };\n postMessageToIframe(dataObj, getIframeContentWin(csfState, ENCRYPTED_EXPIRY_MONTH), csfConfig.loadingContext);\n }\n\n if (hasOwnProperty(csfState.securedFields, ENCRYPTED_EXPIRY_YEAR)) {\n // Dirty! - Need to wait til next page draw if setting month and year at the same time, otherwise only year gets set\n setTimeout(() => {\n const dataObj: object = {\n txVariant: csfState.type,\n fieldType: ENCRYPTED_EXPIRY_YEAR,\n autoComplete: acYearVal,\n numKey: csfState.securedFields[ENCRYPTED_EXPIRY_YEAR].numKey\n };\n postMessageToIframe(dataObj, getIframeContentWin(csfState, ENCRYPTED_EXPIRY_YEAR), csfConfig.loadingContext);\n }, 0);\n }\n return true;\n }\n\n return false;\n}\n","import { SFFeedbackObj, CardFocusData } from '../../types';\nimport ua from '../utils/userAgent';\nimport { CSFThisObject } from '../types';\n\n/**\n * Call focus callback and store which field currently has focus\n *\n * @param csfState - comes from initial, partial, implementation\n * @param csfProps - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n *\n * @param pFeedbackObj -\n */\nexport function handleFocus({ csfState, csfProps, csfCallbacks }: CSFThisObject, handleIOSTouchEvents, pFeedbackObj: SFFeedbackObj): void {\n const feedbackObj: SFFeedbackObj = { ...pFeedbackObj };\n\n delete feedbackObj.numKey;\n\n feedbackObj.rootNode = csfProps.rootNode as HTMLElement;\n feedbackObj.type = csfState.type;\n\n // Store which field has focus\n const focusString: string = feedbackObj.fieldType;\n\n // FOCUS EVENT - store who has focus, if it differs to the current value\n if (feedbackObj.focus) {\n if (csfState.currentFocusObject !== focusString) {\n csfState.currentFocusObject = focusString;\n\n // If iOS detected AND we don't have a (touchend) listener\n if (ua.__IS_IOS && !csfState.registerFieldForIos) {\n handleIOSTouchEvents();\n }\n }\n } else {\n // BLUR EVENT - remove stored focus\n const focusObjectMatches: boolean = csfState.currentFocusObject === focusString;\n if (focusObjectMatches) {\n csfState.currentFocusObject = null;\n }\n }\n\n // Call callback (SecuredFieldsProviderHandlers > onFocus)\n const callbackObj: CardFocusData = feedbackObj as CardFocusData;\n callbackObj.currentFocusObject = csfState.currentFocusObject;\n csfCallbacks.onFocus(callbackObj);\n}\n","// Count how many iframes have successfully been configured and, if its all of them, call callback function\n\nimport { CardAdditionalSFData } from '../../types';\nimport { CSFThisObject } from '../types';\n\n// First, object, param comes from partial implementation\n/**\n * @param csfState - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n * @param isConfigured - comes from initial, partial, implementation\n *\n * @param pFeedbackObj -\n */\nexport function handleIframeConfigFeedback({ csfState, csfCallbacks }: CSFThisObject, isConfigured, pFeedbackObj): boolean {\n csfState.iframeConfigCount += 1;\n\n if (window._b$dl)\n console.log('### handleIframeConfigFeedback::csfState.iframeConfigCount:: ', csfState.iframeConfigCount, 'who=', pFeedbackObj.fieldType);\n\n if (!csfState.isConfigured) {\n if (csfState.iframeConfigCount === csfState.originalNumIframes) {\n if (process.env.NODE_ENV === 'development' && window._b$dl) {\n console.log('\\n### handleIframeConfigFeedback::handleIframeConfigFeedback:: ALL IFRAMES CONFIG DO CALLBACK type=', csfState.type);\n }\n\n // Announce we're configured to the rest of the system\n isConfigured();\n\n return true;\n }\n } else {\n const callbackObj: CardAdditionalSFData = { additionalIframeConfigured: true, fieldType: pFeedbackObj.fieldType, type: csfState.type };\n csfCallbacks.onAdditionalSFConfig(callbackObj);\n }\n\n return false;\n}\n","import cardType from '../utils/cardType';\nimport { CardObject, CardConfigSuccessData } from '../../types';\nimport * as logger from '../../utilities/logger';\nimport { CVC_POLICY_REQUIRED } from '../../constants';\nimport { CSFThisObject } from '../types';\n\n/**\n * @param csfState - comes from initial, partial, implementation\n * @param csfConfig - comes from initial, partial, implementation\n * @param csfProps - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n * @param validateForm - comes from initial, partial, implementation\n */\nexport function isConfigured({ csfState, csfConfig, csfProps, csfCallbacks }: CSFThisObject, validateForm): boolean {\n csfState.isConfigured = true;\n\n const callbackObj: CardConfigSuccessData = { iframesConfigured: true, type: csfState.type, rootNode: csfProps.rootNode as HTMLElement };\n\n csfCallbacks.onConfigSuccess(callbackObj);\n\n // If a recurring card\n if (csfState.numIframes === 1 && csfConfig.isCreditCardType) {\n if (csfState.type === 'card') {\n logger.error(\n \"ERROR: Payment method with a single secured field - but 'brands' has not been set to an array containing the specific card brand\"\n );\n return false;\n }\n\n // Get card object from txVariant\n const card: CardObject = cardType.getCardByBrand(csfState.type);\n\n // It's possible we don't recognise the card type -\n // scenario: frontend initially recognises card as e.g. Visa - but then backend tokenises it as a sub-brand which we currently don't recognise\n if (card) {\n // Assess whether cvc field is required\n const cvcPolicy = card.cvcPolicy ?? CVC_POLICY_REQUIRED;\n\n // If cvc is optional - the form can be considered valid\n if (cvcPolicy !== CVC_POLICY_REQUIRED) {\n validateForm();\n }\n }\n }\n return true;\n}\n","import { CardAllValidData, SecuredFields } from '../../types';\nimport { CSFThisObject } from '../types';\n\nconst checkFormIsValid = (pSecuredFields: SecuredFields): boolean => {\n const securedFieldKeys: string[] = Object.keys(pSecuredFields);\n\n for (let i = 0, len = securedFieldKeys.length; i < len; i += 1) {\n const key: string = securedFieldKeys[i];\n\n if (!pSecuredFields[key].isValid) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * @param csfState - comes from initial, partial, implementation\n * @param csfProps - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n */\nexport default function validateForm({ csfState, csfProps, csfCallbacks }: CSFThisObject): void {\n const isValid: boolean = checkFormIsValid(csfState.securedFields);\n\n const validityHasChanged: boolean = isValid !== csfState.allValid;\n\n csfState.allValid = isValid;\n\n // Only call onAllValid callback if value has changed OR is true\n if (!isValid && !validityHasChanged) return;\n\n const callbackObj: CardAllValidData = { allValid: isValid, type: csfState.type, rootNode: csfProps.rootNode as HTMLElement };\n\n // BROADCAST VALID STATE OF THE FORM AS A WHOLE\n csfCallbacks.onAllValid(callbackObj);\n}\n","import { SFFeedbackObj, CardBinValueData } from '../../types';\nimport { CSFThisObject } from '../types';\n\ninterface DestructuredFeedbackObj {\n binValue?: string;\n encryptedBin?: string;\n uuid?: string;\n}\n\n/**\n * @param csfState - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n *\n * @param pFeedbackObj -\n */\nexport function handleBinValue({ csfState, csfCallbacks }: CSFThisObject, pFeedbackObj: SFFeedbackObj): void {\n const { binValue, encryptedBin, uuid }: DestructuredFeedbackObj = pFeedbackObj;\n\n const callbacksObj: CardBinValueData = { binValue, type: csfState.type };\n\n if (encryptedBin) {\n callbacksObj.encryptedBin = encryptedBin;\n callbacksObj.uuid = uuid;\n }\n\n csfCallbacks.onBinValue(callbacksObj);\n}\n","import SecuredField from '../../securedField/SecuredField';\n\nexport function destroySecuredFields(): void {\n // Tell all securedFields iframes: they will remove all event listeners including keyboard events\n this.postMessageToAllIframes({ destroy: true });\n\n // Get ref to all the keys under which SecuredField instances are stores\n const securedFieldKeys: string[] = Object.keys(this.state.securedFields);\n\n // Tell each SecuredField instance to:\n // stop listening to message events, remove iframe window refs, remove iframes\n // Then remove ref to SecuredField instance\n securedFieldKeys.forEach(pFieldType => {\n const sf: SecuredField = this.state.securedFields[pFieldType];\n if (sf) sf.destroy(); // Comment out if you want to test the 'destroy' effects in the actual SF\n this.state.securedFields[pFieldType] = null;\n });\n // --\n\n // Stop listening to touchend event on body (iOS only)\n this.destroyTouchendListener();\n // Stop listening to touchstart event on document (iOS only)\n this.destroyTouchstartListener();\n\n // Clear SecuredField storage object\n this.state.securedFields = {};\n}\n","import AbstractCSF from './AbstractCSF';\nimport { CSFReturnObject, CSFSetupObject, CSFStateObject, CSFThisObject } from './types';\nimport { StylesObject, CardAdditionalSFData, SFFieldType } from '../types';\nimport { BinLookupResponse } from '../../../../Card/types';\nimport { handleConfig } from './extensions/handleConfig';\nimport { configureCallbacks } from './extensions/configureCallbacks';\nimport { handleValidation } from './extensions/handleValidation';\nimport { handleEncryption } from './extensions/handleEncryption';\nimport { createSecuredFields, createNonCardSecuredFields, createCardSecuredFields, setupSecuredField } from './extensions/createSecuredFields';\nimport handleIOSTouchEvents from './extensions/handleIOSTouchEvents';\nimport handleTab from './extensions/handleTab';\nimport handleBrandFromBinLookup, { sendBrandToCardSF, sendExpiryDatePolicyToSF } from './extensions/handleBrandFromBinLookup';\nimport { setFocusOnFrame } from './partials/setFocusOnFrame';\nimport { postMessageToAllIframes } from './partials/postMessageToAllIframes';\nimport processBrand from './partials/processBrand';\nimport { processAutoComplete } from './partials/processAutoComplete';\nimport { handleFocus } from './partials/handleFocus';\nimport { handleIframeConfigFeedback } from './partials/handleIframeConfigFeedback';\nimport { isConfigured } from './partials/isConfigured';\nimport validateForm from './partials/validateForm';\nimport { handleBinValue } from './partials/handleBinValue';\nimport { destroySecuredFields } from './utils/destroySecuredFields';\nimport postMessageToIframe from './utils/iframes/postMessageToIframe';\nimport getIframeContentWin from './utils/iframes/getIframeContentWin';\nimport * as logger from '../utilities/logger';\nimport { selectOne } from '../utilities/dom';\nimport { on } from '../../../../../utils/listenerUtils';\nimport { partial } from '../utilities/commonUtils';\nimport { hasOwnProperty } from '../../../../../utils/hasOwnProperty';\nimport ua from './utils/userAgent';\nimport { SingleBrandResetObject } from '../../SFP/types';\n\nconst notConfiguredWarning = (str = 'You cannot use secured fields') => {\n logger.warn(`${str} - they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.`);\n};\n\nclass CSF extends AbstractCSF {\n // --\n constructor(setupObj: CSFSetupObject) {\n /**\n * Initialises:\n * - this.props = setupObj: CSFSetupObject\n *\n * and empty objects for:\n * - this.config: CSFConfigObject (populated in handleConfig.ts)\n * - this.callbacks: CSFCallbacksConfig (populated in configureCallbacks.ts\n * - this.state: CSFStateObject (populated below)\n */\n super(setupObj);\n\n this.state = {\n /**\n * For generic card will always be 'card'.\n * For non-generic card will be hardcoded to a particular txVariant e.g. 'mc' or 'visa'\n * For other types of SecuredField will be the passed type e.g. 'ach' or 'giftcard'\n */\n type: this.props.type,\n /**\n * For generic card will change as shopper types\n * For non-generic card will be fixed\n */\n brand: this.props.type !== 'card' ? { brand: this.props.type, cvcPolicy: 'required' } : { brand: null, cvcPolicy: 'required' },\n allValid: undefined,\n numIframes: 0,\n originalNumIframes: 0,\n iframeCount: 0,\n iframeConfigCount: 0,\n isConfigured: false,\n hasSeparateDateFields: false,\n currentFocusObject: null,\n registerFieldForIos: false,\n securedFields: {},\n isKCP: false\n } as CSFStateObject;\n\n // Create object of references to properties on 'this', that can be used to set up the partials\n const thisObj: CSFThisObject = { csfState: this.state, csfConfig: this.config, csfProps: this.props, csfCallbacks: this.callbacks };\n\n // Setup 'this' references\n this.configHandler = handleConfig;\n\n this.callbacksHandler = configureCallbacks;\n\n this.validateForm = partial(validateForm, thisObj);\n\n this.isConfigured = partial(isConfigured, thisObj, this.validateForm);\n this.handleIframeConfigFeedback = partial(handleIframeConfigFeedback, thisObj, this.isConfigured);\n\n this.processBrand = partial(processBrand, thisObj);\n\n this.handleValidation = handleValidation;\n this.handleEncryption = handleEncryption;\n\n this.createSecuredFields = createSecuredFields;\n this.createNonCardSecuredFields = createNonCardSecuredFields;\n this.createCardSecuredFields = createCardSecuredFields;\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n this.setupSecuredField = setupSecuredField;\n\n this.postMessageToAllIframes = partial(postMessageToAllIframes, thisObj);\n\n this.handleIOSTouchEvents = handleIOSTouchEvents.handleTouchend.bind(this);\n this.touchendListener = handleIOSTouchEvents.touchendListener.bind(this);\n this.destroyTouchendListener = handleIOSTouchEvents.destroyTouchendListener.bind(this);\n this.touchstartListener = handleIOSTouchEvents.touchstartListener.bind(this);\n this.destroyTouchstartListener = handleIOSTouchEvents.destroyTouchstartListener.bind(this);\n\n this.setFocusOnFrame = partial(setFocusOnFrame, thisObj);\n this.handleFocus = partial(handleFocus, thisObj, this.handleIOSTouchEvents);\n\n this.handleSFShiftTab = handleTab.handleSFShiftTab;\n this.handleShiftTab = handleTab.handleShiftTab;\n\n this.destroySecuredFields = destroySecuredFields;\n\n this.processAutoComplete = partial(processAutoComplete, thisObj);\n\n this.handleBinValue = partial(handleBinValue, thisObj);\n\n this.handleBrandFromBinLookup = handleBrandFromBinLookup;\n this.sendBrandToCardSF = sendBrandToCardSF;\n this.sendExpiryDatePolicyToSF = sendExpiryDatePolicyToSF;\n\n // Populate config & callbacks objects & create securedFields\n this.init();\n }\n\n private init(): void {\n this.configHandler(this.props);\n this.callbacksHandler(this.props.callbacks);\n\n /**\n * Create all the securedFields\n */\n const numIframes: number = this.createSecuredFields();\n\n this.state.numIframes = this.state.originalNumIframes = numIframes;\n\n this.state.isKCP = !!this.props.isKCP;\n\n /**\n * Add touchstart listener\n * re. Disabling arrow keys in iOS\n */\n if (ua.__IS_IOS && this.props.shouldDisableIOSArrowKeys) {\n this.hasGenuineTouchEvents = false;\n on(document, 'touchstart', this.touchstartListener);\n }\n }\n\n // Expose functions that can be called on the CSF instance\n public createReturnObject(): CSFReturnObject {\n // --\n const returnObj: CSFReturnObject = {\n // --\n updateStyles: (pStyleObject: StylesObject): void => {\n if (this.state.isConfigured) {\n this.postMessageToAllIframes({ styleObject: pStyleObject });\n } else {\n logger.warn(\n 'You cannot update the secured fields styling ' +\n \"- they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.\"\n );\n }\n },\n setFocusOnFrame: (pFieldType: SFFieldType): void => {\n if (this.state.isConfigured) {\n this.setFocusOnFrame(pFieldType);\n // Comment in a quick way to test destroying secured fields (also see comment in destroySecuredFields)\n // this.destroySecuredFields();\n } else {\n notConfiguredWarning('You cannot set focus on any secured field');\n }\n },\n // For component based implementation - if showValidation function is called on the component use this\n // function as a way to notify the CSF that a field is in error\n isValidated: (pFieldType: SFFieldType, code: string): void => {\n if (this.state.isConfigured) {\n if (hasOwnProperty(this.state.securedFields, pFieldType)) {\n this.state.securedFields[pFieldType].hasError = true;\n\n // If there's not already an errorType, set one\n // NOTE: fixes issue in Components where you first validate and then start typing a maestro number\n // - w/o this and the corresponding fix in the SecuredField class the maestro PM will never register as valid\n if (this.state.securedFields[pFieldType].errorType === '') {\n this.state.securedFields[pFieldType].errorType = 'isValidated';\n }\n\n // Inform iframe\n const dataObj: object = {\n txVariant: this.state.type,\n fieldType: pFieldType,\n externalValidation: true,\n code,\n numKey: this.state.securedFields[pFieldType].numKey\n };\n postMessageToIframe(dataObj, getIframeContentWin(this.state, pFieldType), this.config.loadingContext);\n }\n } else {\n notConfiguredWarning('You cannot set validated on any secured field');\n }\n },\n hasUnsupportedCard: (pFieldType: SFFieldType, code: string): void => {\n if (this.state.isConfigured) {\n if (hasOwnProperty(this.state.securedFields, pFieldType)) {\n //\n this.state.securedFields[pFieldType].hasError = !!code;\n this.state.securedFields[pFieldType].errorType = code;\n\n // Inform iframe\n const dataObj: object = {\n txVariant: this.state.type,\n fieldType: pFieldType,\n unsupportedCard: !!code,\n code,\n numKey: this.state.securedFields[pFieldType].numKey\n };\n postMessageToIframe(dataObj, getIframeContentWin(this.state, pFieldType), this.config.loadingContext);\n }\n } else {\n notConfiguredWarning('You cannot set hasUnsupportedCard on any secured field');\n }\n },\n destroy: (): void => {\n if (this.state.isConfigured) {\n this.destroySecuredFields();\n } else {\n notConfiguredWarning('You cannot destroy secured fields');\n }\n },\n brandsFromBinLookup: (binLookupResponse: BinLookupResponse, resetObj: SingleBrandResetObject): void => {\n if (!this.config.isCreditCardType) return null;\n\n if (this.state.isConfigured) {\n this.handleBrandFromBinLookup(binLookupResponse, resetObj);\n } else {\n notConfiguredWarning('You cannot set pass brands to secured fields');\n }\n },\n addSecuredField: (pFieldType: SFFieldType): void => {\n const securedField: HTMLElement = selectOne(this.props.rootNode, `[data-cse=\"${pFieldType}\"]`);\n if (securedField) {\n this.state.numIframes += 1;\n this.setupSecuredField(securedField);\n }\n },\n removeSecuredField: (pFieldType: SFFieldType): void => {\n if (this.state.securedFields[pFieldType]) {\n this.state.securedFields[pFieldType].destroy();\n delete this.state.securedFields[pFieldType];\n this.state.numIframes -= 1;\n this.state.iframeCount -= 1;\n\n const callbackObj: CardAdditionalSFData = { additionalIframeRemoved: true, fieldType: pFieldType, type: this.state.type };\n this.callbacks.onAdditionalSFRemoved(callbackObj);\n }\n },\n setKCPStatus: (isKCP: boolean): void => {\n this.state.isKCP = isKCP;\n },\n sfIsOptionalOrHidden: (fieldType: string): boolean => {\n return this.state.securedFields[fieldType].isOptionalOrHidden();\n }\n };\n\n return returnObj;\n }\n}\n\nexport default CSF;\n","import CSF from './CSF';\nimport cardType from './utils/cardType';\nimport * as logger from '../utilities/logger';\nimport { falsy } from '../../../../../utils/commonUtils';\nimport { CSFReturnObject, CSFSetupObject } from './types';\nimport { hasOwnProperty } from '../../../../../utils/hasOwnProperty';\nimport { selectOne } from '../utilities/dom';\n\nconst initCSF = (pSetupObj: CSFSetupObject): CSFReturnObject => {\n if (!pSetupObj) {\n throw new Error('No securedFields configuration object defined');\n }\n\n const setupObj: CSFSetupObject = { ...pSetupObj };\n\n try {\n // Map the generic types (i.e. 'card', 'scheme') to 'card'\n const isGenericCardType: boolean = cardType.isGenericCardType(setupObj.type);\n setupObj.type = isGenericCardType ? 'card' : setupObj.type;\n } catch (e) {\n // If type has not been specified - ensure there is a default\n setupObj.type = 'card';\n }\n\n // //////// 1. Check passed config object has minimum expected properties //////////\n if (!hasOwnProperty(setupObj, 'rootNode')) {\n return logger.error('ERROR: SecuredFields configuration object is missing a \"rootNode\" property');\n }\n\n if (falsy(setupObj.clientKey)) {\n return logger.warn('WARNING: AdyenCheckout configuration object is missing a \"clientKey\" property.');\n }\n\n //----------------------------------------------------------------------------\n\n // //////// 2. Find and store reference to the root DOM element //////////\n const rootNode: HTMLElement = findRootNode(setupObj.rootNode);\n\n if (!rootNode) {\n return logger.error(`ERROR: SecuredFields cannot find a valid rootNode element for ${setupObj.type}`);\n }\n\n setupObj.rootNode = rootNode; // Overwrite with actual node (in case we were sent a string)\n\n // //////// 3. Add warning if in development mode and a custom http domain is detected\n const origin = window.location.origin;\n\n if (\n (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') &&\n origin.indexOf('http') > -1 &&\n origin.indexOf('localhost') === -1 &&\n origin.indexOf('127.0.0.1') === -1\n ) {\n console.warn(\n 'WARNING: you are are running from an insecure context:',\n origin,\n '\\nCrypto.subtle cannot function in this environment.\\nThe only secure contexts under http contain \"localhost\" or \"127.0.0.1\" in their url.' +\n '\\nSee https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts'\n );\n }\n\n const myCSF: CSF = new CSF(setupObj);\n return myCSF.createReturnObject();\n};\n\nconst findRootNode = pRootNode => {\n let rootNode;\n\n // Expect to be sent the actual html node...\n if (typeof pRootNode === 'object') {\n rootNode = pRootNode;\n }\n\n if (typeof pRootNode === 'string') {\n // ... but if only sent a string - find it ourselves\n rootNode = selectOne(document, pRootNode);\n\n if (!rootNode) {\n return null;\n }\n }\n\n return rootNode;\n};\n\nexport default initCSF;\n","export const camelCaseToSnakeCase = camelCaseString => {\n return camelCaseString.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase();\n};\n\nexport const capitalizeFirstLetter = (str: string): string => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n};\n","import { Resources } from '../../../core/Context/Resources';\nimport { camelCaseToSnakeCase } from '../../../utils/textUtils';\nimport { ALL_SECURED_FIELDS, ENCRYPTED } from './lib/constants';\n\n/**\n * Used by SecuredFieldsProviderHandlers\n */\nexport const getCardImageUrl = (brand, resources: Resources) => {\n const type = brand === 'card' ? 'nocard' : brand || 'nocard';\n\n const imageOptions = {\n type,\n extension: 'svg'\n };\n\n return resources.getImage(imageOptions)(type);\n};\n\n/**\n * Used by Card.tsx & SecuredFields.tsx\n * @param fieldType -\n */\nexport const fieldTypeToSnakeCase = (fieldType: string) => {\n let str = camelCaseToSnakeCase(fieldType);\n // SFs need their fieldType mapped to what the endpoint expects\n if (ALL_SECURED_FIELDS.includes(fieldType)) {\n str = str.substring(ENCRYPTED.length + 1); // strip 'encrypted_' off the string\n }\n return str;\n};\n","import { getCardImageUrl } from '../utils';\nimport {\n ENCRYPTED_SECURITY_CODE,\n ENCRYPTED_CARD_NUMBER,\n CVC_POLICY_REQUIRED,\n DATE_POLICY_REQUIRED,\n ENCRYPTED_EXPIRY_DATE,\n OPTIONAL,\n HIDDEN,\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR\n} from '../lib/constants';\nimport {\n CardErrorData,\n CardFocusData,\n CardBrandData,\n CardAllValidData,\n CardFieldValidData,\n CardAutoCompleteData,\n CardConfigSuccessData,\n CardLoadData,\n SFKeyPressObj\n} from '../lib/types';\nimport { existy } from '../../../../utils/commonUtils';\nimport AdyenCheckoutError from '../../../../core/Errors/AdyenCheckoutError';\n\n/**\n * Emits the onLoad event\n * Here we can assume all securedFields iframes have fired their 'load' event\n */\nfunction handleOnLoad(cbObj: CardLoadData): void {\n // Clear 'loading' timeout\n clearTimeout(this.csfLoadFailTimeout);\n this.csfLoadFailTimeout = null;\n\n // Propagate onLoad event\n this.props.onLoad(cbObj);\n\n /**\n * Having seen that the securedFields iframes have loaded some kind of content (we don't know what, yet)\n * - setTimeout since we expect to get a successful configuration message \"within a reasonable time\"\n *\n * Now we catch clientKey & environment mismatch in core.ts - this timeout being called indicates that the securedFields have not all configured\n * - so we need to clear the loading spinner to see if the securedFields are reporting anything\n */\n this.csfConfigFailTimeout = setTimeout(() => {\n if (this.state.status !== 'ready') {\n // Hide the spinner\n this.setState({ status: 'csfConfigFailure' });\n // Report the error\n this.props.onError(new AdyenCheckoutError('ERROR', 'secured fields have failed to configure'));\n }\n }, this.csfConfigFailTimeoutMS);\n}\n\n/**\n * Emits the onConfigSuccess (ready) event\n * Here we can assume CSF is loaded, configured and ready to be used\n */\nfunction handleOnConfigSuccess(cbObj: CardConfigSuccessData): void {\n // Clear 'config' timeout\n clearTimeout(this.csfConfigFailTimeout);\n this.csfConfigFailTimeout = null;\n\n this.setState({ status: 'ready' }, () => {\n // Propagate onConfigSuccess event\n this.props.onConfigSuccess(cbObj);\n });\n}\n\n/**\n * Emits the onAllValid event\n */\nfunction handleOnAllValid(status: CardAllValidData): boolean {\n // Form cannot be valid whilst there is an unsupported card\n if (this.state.detectedUnsupportedBrands) {\n return false;\n }\n\n this.setState({ isSfpValid: status.allValid }, () => {\n // New - fixes maestro-with-error-on-optional-cvc-field bug\n this.props.onChange(this.state, { event: 'handleOnAllValid' });\n // Propagate onAllValid event\n this.props.onAllValid(status);\n });\n\n return true;\n}\n\n/**\n * Saves a field value from CSF in the CardInput state\n * Emits the onFieldValid event\n */\nfunction handleOnFieldValid(fieldObj: CardFieldValidData): boolean {\n // A card number field cannot be valid whilst there is an unsupported card\n if (this.state.detectedUnsupportedBrands && fieldObj.fieldType === ENCRYPTED_CARD_NUMBER) {\n return false;\n }\n\n const setValidFieldState = prevState => ({\n data: { ...prevState.data, [fieldObj.encryptedFieldName]: fieldObj.blob },\n valid: { ...prevState.valid, [fieldObj.encryptedFieldName]: fieldObj.valid },\n /**\n * For a field that has just received valid:true (field has just been completed & encrypted) - mark the error state for this field as false\n * For a field that has just received valid:false (field was encrypted, now is not)\n * - field is either in a state of being incomplete but without errors (digit deleted) - so mark the error state for this field as false\n * or has switched from valid/encrypted state to being in error (digit edited to one that puts the field in error) - so keep any error that\n * might just have been set\n */\n errors: { ...prevState.errors, [fieldObj.fieldType]: prevState.errors[fieldObj.fieldType] ?? false }\n });\n\n this.setState(setValidFieldState, () => {\n this.props.onChange(this.state, { event: 'handleOnFieldValid', fieldType: fieldObj.fieldType });\n\n // Propagate onFieldValid event\n this.props.onFieldValid(fieldObj);\n });\n\n return true;\n}\n\nfunction fieldIsInError(fieldType: string, policy: string, numCharsObj: object, errorsObj) {\n return (policy === OPTIONAL || policy === HIDDEN) && numCharsObj[fieldType] === 0 ? false : errorsObj[fieldType];\n}\n\n/**\n * Saves the card brand in state\n * Emits the onBrand event\n */\nfunction handleOnBrand(cardInfo: CardBrandData): void {\n this.setState(\n prevState => {\n /**\n * If we change brand to one where the cvc or date field(s) are not required & are empty - then these fields cannot be in error\n * (scenario: have validated empty form, then choose brand w. optional/hidden cvc or date)...\n * ...else propagate the existing error.\n */\n const cvcFieldInError = fieldIsInError(ENCRYPTED_SECURITY_CODE, cardInfo.cvcPolicy, this.numCharsInField, prevState.errors);\n\n const dateFieldInError =\n this.numDateFields === 1\n ? fieldIsInError(ENCRYPTED_EXPIRY_DATE, cardInfo.expiryDatePolicy, this.numCharsInField, prevState.errors)\n : null;\n\n // For custom card comp\n const monthFieldInError =\n this.numDateFields === 2\n ? fieldIsInError(ENCRYPTED_EXPIRY_MONTH, cardInfo.expiryDatePolicy, this.numCharsInField, prevState.errors)\n : null;\n\n const yearFieldInError =\n this.numDateFields === 2\n ? fieldIsInError(ENCRYPTED_EXPIRY_YEAR, cardInfo.expiryDatePolicy, this.numCharsInField, prevState.errors)\n : null;\n // --\n /** end */\n\n return {\n brand: cardInfo.brand,\n cvcPolicy: cardInfo.cvcPolicy ?? CVC_POLICY_REQUIRED,\n showSocialSecurityNumber: cardInfo.showSocialSecurityNumber,\n errors: {\n ...prevState.errors,\n ...(existy(cvcFieldInError) && { [ENCRYPTED_SECURITY_CODE]: cvcFieldInError }),\n ...(existy(dateFieldInError) && { [ENCRYPTED_EXPIRY_DATE]: dateFieldInError }),\n ...(existy(monthFieldInError) && { [ENCRYPTED_EXPIRY_MONTH]: monthFieldInError }),\n ...(existy(yearFieldInError) && { [ENCRYPTED_EXPIRY_YEAR]: yearFieldInError })\n },\n expiryDatePolicy: cardInfo.expiryDatePolicy ?? DATE_POLICY_REQUIRED\n };\n },\n () => {\n this.props.onChange(this.state, { event: 'handleOnBrand' });\n\n // Enhance data object with the url for the brand image, first checking if the merchant has configured their own one for this brand\n const brandImageUrl = this.props.brandsConfiguration[cardInfo.brand]?.icon ?? getCardImageUrl(cardInfo.brand, this.props.resources);\n this.props.onBrand({ ...cardInfo, brandImageUrl });\n }\n );\n}\n\n/**\n * Handles validation errors\n */\nfunction handleOnError(cbObj: CardErrorData, hasUnsupportedCard: boolean = null): boolean {\n const errorCode = cbObj.error;\n\n this.setState(\n prevState => ({\n errors: { ...prevState.errors, [cbObj.fieldType]: errorCode || false },\n // If dealing with an unsupported card ensure these card number related fields are reset re. pasting a full, unsupported card straight in\n ...(hasUnsupportedCard && { data: { ...prevState.data, [ENCRYPTED_CARD_NUMBER]: undefined } }),\n ...(hasUnsupportedCard && { valid: { ...prevState.valid, [ENCRYPTED_CARD_NUMBER]: false } }),\n ...(hasUnsupportedCard && { isSfpValid: false })\n }),\n () => {\n this.props.onChange(this.state, { event: 'handleOnError', fieldType: cbObj.fieldType });\n }\n );\n\n return true;\n}\n\nfunction handleFocus(cbObj: CardFocusData): void {\n this.numCharsInField[cbObj.fieldType] = cbObj.numChars;\n\n this.props.onFocus(cbObj);\n}\n\nfunction handleOnTouchstartIOS(cbObj): void {\n // disableIOSArrowKeys is either null or a function (in which case we should call it)\n this.props.disableIOSArrowKeys?.(cbObj);\n}\n\n// Only called for holder name (from CSF>partials>processAutoComplete)\nfunction handleOnAutoComplete(cbObj: CardAutoCompleteData): void {\n this.setState({ autoCompleteName: cbObj.value }, () => {\n this.props.onChange(this.state, { event: 'handleOnAutoComplete', fieldType: cbObj.fieldType });\n this.setState({ autoCompleteName: null }); // Nullify ref after sending it (lets shopper edit holder name)\n });\n this.props.onAutoComplete(cbObj);\n}\n\nfunction handleKeyPressed(obj: SFKeyPressObj): void {\n if (obj.action === 'enterKeyPressed') {\n const kb = new KeyboardEvent('keypress', {\n bubbles: true,\n cancelable: true,\n key: 'Enter',\n code: 'Enter'\n });\n this.props.handleKeyPress?.(kb);\n }\n}\n\n/**\n * Handles cases where no secured fields are necessary (one click payments without CVC)\n * Automatically resolves with a valid state\n */\nfunction handleOnNoDataRequired(): void {\n this.setState({ status: 'ready' }, () => this.props.onChange({ isSfpValid: true }));\n}\n\nexport default {\n handleFocus,\n handleOnAllValid,\n handleOnAutoComplete,\n handleOnFieldValid,\n handleOnLoad,\n handleOnConfigSuccess,\n handleOnBrand,\n handleOnError,\n handleOnNoDataRequired,\n handleOnTouchstartIOS,\n handleKeyPressed\n};\n","export default {\n type: 'card',\n\n // Settings\n keypadFix: true,\n rootNode: null,\n loadingContext: null,\n brands: [],\n showWarnings: false,\n autoFocus: true,\n trimTrailingSeparator: true,\n\n // Events\n onChange: () => {},\n onLoad: () => {},\n onConfigSuccess: () => {},\n onAllValid: () => {},\n onFieldValid: () => {},\n onBrand: () => {},\n onError: () => {},\n onBinValue: () => {},\n onFocus: () => {},\n onAutoComplete: () => {},\n handleKeyPress: () => {},\n\n // Customization\n styles: {}\n};\n","import { Component } from 'preact';\nimport { getErrorObject, getFields, getErrorReducer, validFieldsReducer } from './SFPUtils';\nimport initCSF from '../lib/CSF';\nimport handlers from './SecuredFieldsProviderHandlers';\nimport defaultProps from './defaultProps';\nimport { SFPProps, SFPState, SingleBrandResetObject } from './types';\nimport {\n StylesObject,\n CardErrorData,\n CardFocusData,\n CardBrandData,\n CardAllValidData,\n CardFieldValidData,\n CardAutoCompleteData,\n CardConfigSuccessData,\n CardLoadData,\n SFKeyPressObj\n} from '../lib/types';\nimport { CSFReturnObject, CSFSetupObject } from '../lib/CSF/types';\nimport { CVC_POLICY_REQUIRED, DATE_POLICY_REQUIRED, DEDICATED_CARD_COMPONENTS, ENCRYPTED_CARD_NUMBER, ENCRYPTED_PWD_FIELD } from '../lib/constants';\nimport { BinLookupResponse } from '../../../Card/types';\nimport AdyenCheckoutError from '../../../../core/Errors/AdyenCheckoutError';\nimport { SFStateErrorObj } from '../../../Card/components/CardInput/types';\nimport { getErrorMessageFromCode } from '../../../../core/Errors/utils';\nimport { SF_ErrorCodes } from '../../../../core/Errors/constants';\n\n/**\n * SecuredFieldsProvider:\n * Initialises & handles the client-side part of SecuredFields\n */\nclass SecuredFieldsProvider extends Component<SFPProps, SFPState> {\n private csfLoadFailTimeout: number;\n private csfLoadFailTimeoutMS: number;\n private csfConfigFailTimeout: number;\n private csfConfigFailTimeoutMS: number;\n private numCharsInField: object;\n private rootNode;\n private numDateFields: number;\n private csf: CSFReturnObject;\n private handleOnLoad: (obj: CardLoadData) => void;\n private handleOnConfigSuccess: (obj: CardConfigSuccessData) => void;\n private handleOnFieldValid: (obj: CardFieldValidData) => void;\n private handleOnAllValid: (obj: CardAllValidData) => void;\n private handleOnBrand: (obj: CardBrandData) => void;\n private handleFocus: (obj: CardFocusData) => void;\n private handleOnError: (obj: CardErrorData, hasUnsupportedCard?: boolean) => void;\n private handleOnAutoComplete: (obj: CardAutoCompleteData) => void;\n private handleOnNoDataRequired: () => void;\n private handleOnTouchstartIOS: (obj) => void;\n private handleKeyPressed: (obj: SFKeyPressObj) => void;\n public state: SFPState;\n public props;\n private issuingCountryCode;\n\n constructor(props: SFPProps) {\n super(props);\n\n const stateObj: SFPState = {\n status: 'loading',\n brand: props.type,\n errors: {},\n valid: {},\n data: {},\n cvcPolicy: CVC_POLICY_REQUIRED,\n expiryDatePolicy: DATE_POLICY_REQUIRED,\n isSfpValid: false,\n hasKoreanFields: props.hasKoreanFields\n };\n this.state = stateObj;\n\n this.csfLoadFailTimeout = null;\n this.csfLoadFailTimeoutMS = 30000;\n\n this.csfConfigFailTimeout = null;\n this.csfConfigFailTimeoutMS = 15000;\n\n this.numCharsInField = {};\n\n // Handlers\n this.handleOnLoad = handlers.handleOnLoad.bind(this);\n this.handleOnConfigSuccess = handlers.handleOnConfigSuccess.bind(this);\n this.handleOnFieldValid = handlers.handleOnFieldValid.bind(this);\n this.handleOnAllValid = handlers.handleOnAllValid.bind(this);\n this.handleOnBrand = handlers.handleOnBrand.bind(this);\n this.handleFocus = handlers.handleFocus.bind(this);\n this.handleOnError = handlers.handleOnError.bind(this);\n this.handleOnNoDataRequired = handlers.handleOnNoDataRequired.bind(this);\n this.handleOnAutoComplete = handlers.handleOnAutoComplete.bind(this);\n this.handleOnTouchstartIOS = handlers.handleOnTouchstartIOS.bind(this); // Only called when iOS detected\n this.handleKeyPressed = handlers.handleKeyPressed.bind(this);\n\n this.processBinLookupResponse = this.processBinLookupResponse.bind(this);\n\n // Bindings for functions exposed to users of this component: SecuredFields & CardInput\n this.setFocusOn = this.setFocusOn.bind(this);\n this.updateStyles = this.updateStyles.bind(this);\n this.handleUnsupportedCard = this.handleUnsupportedCard.bind(this);\n this.showValidation = this.showValidation.bind(this);\n this.destroy = this.destroy.bind(this);\n }\n\n public static defaultProps = defaultProps;\n\n public componentDidMount(): void {\n // When SFP instantiated through SecuredFieldsInput c.f. CardInput\n if (this.props.rootNode) {\n this.setRootNode(this.props.rootNode);\n }\n\n // Find encryptedFields and map them to the values we use to store valid states\n const fields = getFields(this.rootNode);\n const valid = fields.reduce(validFieldsReducer, {});\n\n this.setState({ valid });\n\n // Populate numCharsInField object\n fields.forEach(field => {\n this.numCharsInField[field] = 0;\n });\n\n // Store how many dateFields we are dealing with visually\n this.numDateFields = fields.filter(f => f.match(/Expiry/)).length;\n\n if (fields.length) {\n this.destroy(); // TODO test if this solves the React double render problem.\n this.initializeCSF(this.rootNode);\n } else {\n this.handleOnNoDataRequired();\n }\n }\n\n public componentDidUpdate() {\n this.checkForKCPFields();\n // Pass all the state data up - Used right now for loading status\n this.props.onStateUpdate?.(this.state);\n }\n\n public componentWillUnmount(): void {\n this.csf = null;\n clearTimeout(this.csfLoadFailTimeout);\n clearTimeout(this.csfConfigFailTimeout);\n }\n\n private initializeCSF(root: HTMLElement): void {\n let loadingContext = this.props.loadingContext;\n\n // For loading securedFields from local server during development\n if (process.env.NODE_ENV === 'development' && process.env.__SF_ENV__ !== 'build') {\n loadingContext = process.env.__SF_ENV__;\n }\n\n const csfSetupObj: CSFSetupObject = {\n rootNode: root,\n type: this.props.type,\n clientKey: this.props.clientKey,\n cardGroupTypes: this.props.brands,\n autoFocus: this.props.autoFocus,\n trimTrailingSeparator: this.props.trimTrailingSeparator,\n loadingContext,\n keypadFix: this.props.keypadFix,\n showWarnings: this.props.showWarnings,\n iframeUIConfig: {\n sfStyles: this.props.styles\n },\n i18n: this.props.i18n,\n callbacks: {\n onLoad: this.handleOnLoad,\n onConfigSuccess: this.handleOnConfigSuccess,\n onFieldValid: this.handleOnFieldValid,\n onAllValid: this.handleOnAllValid,\n onBrand: this.handleOnBrand,\n onError: this.handleOnError,\n onFocus: this.handleFocus,\n onBinValue: this.props.onBinValue,\n onAutoComplete: this.handleOnAutoComplete,\n onAdditionalSFConfig: this.props.onAdditionalSFConfig,\n onAdditionalSFRemoved: this.props.onAdditionalSFRemoved,\n onTouchstartIOS: this.handleOnTouchstartIOS,\n onKeyPressed: this.handleKeyPressed\n },\n isKCP: this.state.hasKoreanFields,\n legacyInputMode: this.props.legacyInputMode,\n minimumExpiryDate: this.props.minimumExpiryDate,\n implementationType: this.props.implementationType || 'components', // to distinguish between 'regular' and 'custom' card component\n forceCompat: this.props.forceCompat,\n maskSecurityCode: this.props.maskSecurityCode,\n exposeExpiryDate: this.props.exposeExpiryDate,\n shouldDisableIOSArrowKeys: !!this.props.disableIOSArrowKeys, // convert whether function has been defined into a boolean\n placeholders: this.props.placeholders ?? {},\n showContextualElement: this.props.showContextualElement\n };\n\n this.csf = initCSF(csfSetupObj);\n\n /**\n * Expect to at least have had the handleOnLoad callback called within this time\n * - if this hasn't happened then something has happened to interrupt the loading of the securedFields\n * So we need to clear the loading spinner to see if the securedFields are reporting anything\n */\n // @ts-ignore - timout 'type' is a number\n this.csfLoadFailTimeout = setTimeout(() => {\n if (this.state.status !== 'ready') {\n // Hide the spinner\n this.setState({ status: 'csfLoadFailure' });\n // Report the error\n this.props.onError(new AdyenCheckoutError('ERROR', 'secured field iframes have failed to load'));\n }\n }, this.csfLoadFailTimeoutMS);\n }\n\n private checkForKCPFields() {\n let needsKoreanFields = false;\n if (this.props.koreanAuthenticationRequired) {\n needsKoreanFields = this.issuingCountryCode ? this.issuingCountryCode === 'kr' : this.props.countryCode === 'kr';\n }\n\n // Was korean, now isn't - hide password field\n if (this.state.hasKoreanFields && !needsKoreanFields) {\n // Clear any stored data\n const setRemovedFieldState = prevState => ({\n data: { ...prevState.data, [ENCRYPTED_PWD_FIELD]: undefined },\n valid: { ...prevState.valid, [ENCRYPTED_PWD_FIELD]: false },\n errors: { ...prevState.errors, [ENCRYPTED_PWD_FIELD]: false },\n hasKoreanFields: false\n });\n\n this.setState(setRemovedFieldState, () => {\n this.props.onChange(this.state);\n });\n\n this.csf.removeSecuredField(ENCRYPTED_PWD_FIELD);\n this.csf.setKCPStatus(false);\n }\n\n // Wasn't korean, now is - show password field\n if (!this.state.hasKoreanFields && needsKoreanFields) {\n const setAddedFieldState = prevState => ({\n valid: { ...prevState.valid, [ENCRYPTED_PWD_FIELD]: false },\n hasKoreanFields: true,\n isSfpValid: false\n });\n\n this.setState(setAddedFieldState, () => {\n this.props.onChange(this.state);\n });\n\n this.csf.addSecuredField(ENCRYPTED_PWD_FIELD);\n this.csf.setKCPStatus(true);\n }\n }\n\n public getChildContext(): object {\n return { i18n: this.props.i18n };\n }\n\n public handleUnsupportedCard(errObj: CardErrorData): boolean {\n const hasUnsupportedCard = !!errObj.error;\n\n // Store the brand(s) we detected and which we don't support\n if (hasUnsupportedCard) {\n this.setState({ detectedUnsupportedBrands: errObj.detectedBrands });\n }\n\n errObj.rootNode = this.rootNode; // Needed for CustomCard\n this.handleOnError(errObj, hasUnsupportedCard);\n // Inform CSF that the number field has an unsupportedCard error (or that it has been cleared)\n if (this.csf) {\n this.csf.hasUnsupportedCard(ENCRYPTED_CARD_NUMBER, errObj.error);\n }\n return hasUnsupportedCard;\n }\n\n public setFocusOn(frame: string): void {\n if (this.csf) this.csf.setFocusOnFrame(frame);\n }\n\n public updateStyles(stylesObj: StylesObject): void {\n if (this.csf) this.csf.updateStyles(stylesObj);\n }\n\n public sfIsOptionalOrHidden(fieldType: string): boolean {\n return this.csf.sfIsOptionalOrHidden(fieldType);\n }\n\n public destroy(): void {\n if (this.csf) this.csf.destroy();\n }\n\n public showValidation(): void {\n const { numDateFields, state }: SecuredFieldsProvider = this;\n\n Object.keys(state.valid)\n .reduce(getErrorReducer(numDateFields, state), [])\n .forEach(field => {\n // For each detected error pass an error object to the handler (calls error callback & sets state)\n const errorObj: CardErrorData = getErrorObject(field, this.rootNode, state);\n this.handleOnError(errorObj, !!state.detectedUnsupportedBrands);\n // Inform the secured-fields instance of which fields have been found to have errors\n if (this.csf && this.csf.isValidated) {\n this.csf.isValidated(field, errorObj.error);\n }\n });\n }\n\n /**\n * Map SF errors to ValidationRuleResult-like objects, for CardInput component\n */\n public mapErrorsToValidationRuleResult(): SFStateErrorObj {\n const fieldNames: string[] = Object.keys(this.state.errors);\n\n const sfStateErrorsObj = fieldNames.reduce((acc, fieldName) => {\n const errorCode = this.state.errors[fieldName];\n if (errorCode) {\n acc[fieldName] = {\n isValid: false,\n errorMessage: getErrorMessageFromCode(errorCode, SF_ErrorCodes), // this is the human-readable, untranslated, explanation of the error that will exist on the error object in card.state.errors\n // For v5 the object found in state.errors should also contain the additional properties that used to be sent to the onError callback\n // namely: translation, errorCode, a ref to rootNode &, in the case of failed binLookup, an array of the detectedBrands\n errorI18n: this.props.i18n.get(errorCode),\n error: errorCode,\n rootNode: this.rootNode,\n ...(this.state.detectedUnsupportedBrands && { detectedBrands: this.state.detectedUnsupportedBrands })\n };\n } else {\n acc[fieldName] = null;\n }\n return acc;\n }, {});\n return sfStateErrorsObj;\n }\n\n public processBinLookupResponse(binLookupResponse: BinLookupResponse, resetObject: SingleBrandResetObject): void {\n // If we were dealing with an unsupported card & now we have a valid /binLookup response (or a response triggering a reset of the UI),\n // - reset state to clear the error & the stored unsupportedBrands and, in the case of a valid /binLookup response, inform CSF (via handleUnsupportedCard)\n // (Scenario: from an unsupportedCard state the shopper has pasted another number long enough to trigger a /binLookup)\n if (this.state.detectedUnsupportedBrands) {\n this.setState(prevState => ({\n errors: { ...prevState.errors, [ENCRYPTED_CARD_NUMBER]: false },\n detectedUnsupportedBrands: null\n }));\n\n // If we have some sort of binLookupResponse object then this isn't the reset caused by digits dropping below a threshold\n // - so call handleUnsupportedCard to clear the error\n if (this.csf && binLookupResponse) {\n const errObj: CardErrorData = {\n type: 'card',\n fieldType: 'encryptedCardNumber',\n error: ''\n };\n this.handleUnsupportedCard(errObj);\n }\n }\n\n this.issuingCountryCode = binLookupResponse?.issuingCountryCode?.toLowerCase();\n\n const hasBrandedResetObj = resetObject?.brand;\n\n /**\n * Are we dealing with a \"dedicated\" card scenario i.e a card component created as: checkout.create('bcmc') but which can accept multiple brands\n * - in which case we will need to reset brand and pass on the resetObj to CSF\n */\n const mustResetDedicatedBrand = hasBrandedResetObj && DEDICATED_CARD_COMPONENTS.includes(resetObject.brand);\n\n if (mustResetDedicatedBrand) {\n // resetObject.brand will be the value of the brand whose logo we want to reshow in the UI\n this.setState(resetObject, () => {\n this.props.onChange(this.state);\n });\n }\n\n /**\n * Scenarios:\n *\n * - RESET (binLookupResponse === null): The number of digits in number field has dropped below threshold for BIN lookup\n * - RESULT (binLookupResponse.supportedBrands.length === 1): binLookup has found a result so inform CSF\n *\n * In the RESET scenario, for \"dedicated\" card components we also need to pass on the resetObject since this contains information about\n * the brand that CSF needs to reset to, internally.\n */\n if (this.csf) this.csf.brandsFromBinLookup(binLookupResponse, mustResetDedicatedBrand ? resetObject : null);\n }\n\n private setRootNode = (input: HTMLElement): void => {\n this.rootNode = input;\n };\n\n public render(props, state) {\n return props.render({ setRootNode: this.setRootNode, setFocusOn: this.setFocusOn }, state);\n }\n}\n\nexport default SecuredFieldsProvider;\n","import { BrandObject, DualBrandSelectElement } from '../../../Card/types';\n\n/**\n * Creates an object used for setting state - that will trigger the rendering of a select element to allow a choice between 2 different card variants\n * @param brandObjArr - array containing 2 card brands objects\n */\nexport default function createCardVariantSwitcher(brandObjArr: BrandObject[]) {\n const [leadBrand, subBrand] = brandObjArr;\n\n return {\n dualBrandSelectElements: [\n { id: leadBrand.brand, brandObject: leadBrand },\n { id: subBrand.brand, brandObject: subBrand }\n ] as DualBrandSelectElement[],\n selectedBrandValue: leadBrand.brand, // set to leadBrand.brand if an initial selection is to be made; else set to empty string\n leadBrand\n };\n}\n","import { SingleBrandResetObject } from '../SFP/types';\nimport { BrandObject } from '../../../Card/types';\nimport createCardVariantSwitcher from './createCardVariantSwitcher';\nimport { BRAND_ICON_UI_EXCLUSION_LIST } from '../lib/constants';\n\n// Externally testable utils\nexport const containsExcludedBrand = (brandsArr: BrandObject[], excludedBrands: string[]): boolean => {\n return brandsArr.reduce((acc, brandObj) => acc || excludedBrands.includes(brandObj.brand), false);\n};\n\nexport const cloneBrandsArr = (brandsArr: BrandObject[]): BrandObject[] => brandsArr.map(item => ({ ...item }));\n\nexport const removeExcludedBrand = (brandsArr: BrandObject[], mainBrand1 = 'mc', mainBrand2 = 'visa'): BrandObject[] => {\n const clonedBrands: BrandObject[] = cloneBrandsArr(brandsArr);\n\n if (clonedBrands[0].brand !== mainBrand1 && clonedBrands[0].brand !== mainBrand2) clonedBrands.reverse();\n clonedBrands.length = 1;\n return clonedBrands;\n};\n// --\n\nexport default function extensions(props, refs, states, hasPanLengthRef: Partial<{ current }> = {}) {\n // Destructure props, refs and state hooks\n const { type, cvcPolicy } = props;\n const { sfp } = refs;\n const { dualBrandSelectElements, setDualBrandSelectElements, setSelectedBrandValue, issuingCountryCode, setIssuingCountryCode } = states;\n\n return {\n /**\n * Handle the binLookup response object generated in triggerBinLookup and process it in relation to the CardInput and it's sub-components.\n * e.g. we might need to add/remove additional markup (a selector for brands), and inform SFP of the issuingCountryCode & detected brand(s).\n *\n * @param binLookupResponse -\n * @param isReset -\n */\n processBinLookup: (binLookupResponse, isReset) => {\n const issuingCode = binLookupResponse?.issuingCountryCode ? binLookupResponse.issuingCountryCode.toLowerCase() : null;\n setIssuingCountryCode(issuingCode);\n\n // Reset UI\n if (!binLookupResponse || !Object.keys(binLookupResponse).length) {\n setDualBrandSelectElements([]);\n setSelectedBrandValue('');\n\n // If /binLookup has 'reset' then for a generic card the internal regex will kick in to show the right brand icon - so set to null\n // However for a single-branded card we need to pass the \"base\" type so the brand logo is reset - so set to type\n const brandToReset = isReset && type !== 'card' ? type : null;\n\n sfp.current.processBinLookupResponse(binLookupResponse, {\n brand: brandToReset,\n cvcPolicy: cvcPolicy // undefined except for Bancontact\n } as SingleBrandResetObject);\n\n // Reset storage var\n hasPanLengthRef.current = 0;\n return;\n }\n\n // RESULT: binLookup has found a result so proceed accordingly\n if (binLookupResponse.supportedBrands?.length) {\n const hasExcludedBrand: boolean = containsExcludedBrand(binLookupResponse.supportedBrands, BRAND_ICON_UI_EXCLUSION_LIST);\n\n const supportedBrands: BrandObject[] = hasExcludedBrand\n ? removeExcludedBrand(binLookupResponse.supportedBrands)\n : cloneBrandsArr(binLookupResponse.supportedBrands);\n\n // 1) Multiple options found - add to the UI & inform SFP\n if (supportedBrands.length > 1) {\n // --\n const switcherObj = createCardVariantSwitcher(supportedBrands);\n\n // Set properties on state to trigger the dual branding icons in the UI\n setDualBrandSelectElements(switcherObj.dualBrandSelectElements);\n setSelectedBrandValue(switcherObj.selectedBrandValue); // initially this value from switcherObj will be ''\n\n // Pass an object through to SFP\n sfp.current.processBinLookupResponse({\n issuingCountryCode: binLookupResponse.issuingCountryCode,\n supportedBrands: [switcherObj.leadBrand]\n });\n\n // Store the fact the binLookup obj has a panLength prop\n if (switcherObj.leadBrand.panLength > 0) {\n hasPanLengthRef.current = switcherObj.leadBrand.panLength;\n }\n\n // 2) Single option found (binValueObject.supportedBrands.length === 1)\n } else {\n // Reset UI\n setDualBrandSelectElements([]);\n setSelectedBrandValue('');\n\n // Set (single) value from binLookup so it will be added to the 'brand' property in the paymentMethod object\n // EXCEPT - if we are dealing with a brand that we exclude from the UI\n if (!hasExcludedBrand) setSelectedBrandValue(supportedBrands[0].brand);\n\n // Pass object through to SFP\n sfp.current.processBinLookupResponse({\n issuingCountryCode: binLookupResponse.issuingCountryCode,\n supportedBrands\n });\n\n // Store the fact the binLookup obj has a panLength prop\n if (supportedBrands[0].panLength > 0) {\n hasPanLengthRef.current = supportedBrands[0].panLength;\n }\n }\n }\n },\n /**\n * Handler for clicks on the icons added in response to the /binLookup call\n * Inform SFP of the brand changes when these selections are made\n */\n handleDualBrandSelection: (e: Event | string): void => {\n let value: Event | string = e;\n if (e instanceof Event) {\n const target = e.target as HTMLLIElement;\n value = target.getAttribute('data-value') || target.getAttribute('value');\n }\n\n // Check if we have a value and whether that value corresponds to a brandObject we can propagate\n // If either are false then abandon the process\n let brandObjArr: BrandObject[] = [];\n if (value) {\n // Find the brandObject with the matching brand value and place into an array\n brandObjArr = dualBrandSelectElements.reduce((acc, item) => {\n if (item.brandObject.brand === value) {\n acc.push(item.brandObject);\n }\n return acc;\n }, []);\n\n if (!brandObjArr.length) {\n return; // no brand object associated with value was found\n }\n } else {\n return; // no value passed\n }\n\n setSelectedBrandValue(value);\n\n // Pass brand object into SecuredFields\n sfp.current.processBinLookupResponse({\n issuingCountryCode,\n supportedBrands: brandObjArr,\n isDualBrandSelection: true\n });\n }\n };\n}\n","import { h, toChildArray, createContext } from 'preact';\nimport { useContext, useEffect } from 'preact/hooks';\nimport { Resources } from './Resources';\nimport Language from '../../language';\nimport type { ComponentChildren } from 'preact';\n\ninterface CoreProviderProps {\n loadingContext: string;\n i18n: Language;\n resources: Resources;\n children: ComponentChildren;\n}\n\ntype ContextValue = {\n i18n: Language;\n loadingContext: string;\n resources: Resources;\n};\n\nconst CoreContext = createContext<ContextValue | undefined>(undefined);\n\nconst CoreProvider = ({ i18n, loadingContext, resources, children }: CoreProviderProps) => {\n useEffect(() => {\n if (!i18n || !loadingContext || !resources) {\n console.warn(\n `CoreProvider - WARNING core provider is missing:${i18n ? '' : 'i18n'} ${loadingContext ? '' : 'loadingContext'} ${resources ? '' : 'resources'}`\n );\n }\n }, [i18n, loadingContext, resources]);\n\n return (\n <CoreContext.Provider\n value={{\n i18n,\n loadingContext,\n resources\n }}\n >\n {toChildArray(children)}\n </CoreContext.Provider>\n );\n};\n\nconst useCoreContext = (): ContextValue => {\n const context = useContext(CoreContext);\n\n if (context === undefined) {\n throw new Error('\"useCoreContext\" must be used within a CoreProvider');\n }\n\n return context;\n};\n\nexport { CoreProvider, useCoreContext };\n","import { useCoreContext } from './CoreProvider';\nimport { useCallback } from 'preact/hooks';\nimport { GetImageFnType, ImageOptions } from './Resources';\n\nexport type UseImageHookType = (props: ImageOptions) => GetImageFnType;\nfunction useImage(): (props?: ImageOptions) => GetImageFnType {\n const { resources } = useCoreContext();\n return useCallback((props?: ImageOptions) => resources?.getImage(props), []);\n}\n\nexport default useImage;\n","import { ThreeDS2FlowObject } from './types';\n\nexport const THREEDS2_FINGERPRINT = 'threeDS2Fingerprint';\nexport const THREEDS2_FINGERPRINT_ERROR = '3DS2Fingerprint_Error';\nexport const THREEDS2_FINGERPRINT_SUBMIT = 'callSubmit3DS2Fingerprint_Response';\nexport const THREEDS2_CHALLENGE = 'threeDS2Challenge';\nexport const THREEDS2_CHALLENGE_ERROR = '3DS2Challenge_Error';\n\nexport const THREEDS2_ERROR = 'threeDS2Error';\nexport const THREEDS2_FULL = 'threeDS2';\nexport const THREEDS2_NUM = '3DS2';\n\nexport const MISSING_TOKEN_IN_ACTION_MSG = 'Missing \"token\" property from threeDS2 action';\n\nexport const DEFAULT_CHALLENGE_WINDOW_SIZE = '02';\n\nexport const THREEDS_METHOD_TIMEOUT = 10000;\nexport const CHALLENGE_TIMEOUT = 600000;\n\nexport const TIMEOUT = 'timeout';\n\nexport const CHALLENGE_TIMEOUT_REJECT_OBJECT: ThreeDS2FlowObject = {\n result: {\n transStatus: 'U'\n },\n type: 'challengeResult',\n errorCode: TIMEOUT\n};\n\nexport const FAILED_METHOD_STATUS_RESOLVE_OBJECT: ThreeDS2FlowObject = {\n result: {\n threeDSCompInd: 'N'\n },\n type: 'fingerPrintResult'\n};\n\nexport const FAILED_METHOD_STATUS_RESOLVE_OBJECT_TIMEOUT: ThreeDS2FlowObject = {\n result: {\n threeDSCompInd: 'N'\n },\n type: 'fingerPrintResult',\n errorCode: TIMEOUT\n};\n\n// Re. EMV 3-D Specification: EMVCo_3DS_Spec_210_1017.pdf\nexport const CHALLENGE_WINDOW_SIZES = {\n '01': ['250px', '400px'],\n '02': ['390px', '400px'],\n '03': ['500px', '600px'],\n '04': ['600px', '400px'],\n '05': ['100%', '100%']\n};\n","export const isValidHttpUrl = (string, allowHttp = false) => {\n let url;\n try {\n url = new URL(string);\n } catch (_) {\n return false;\n }\n return allowHttp ? url.protocol === 'http:' || url.protocol === 'https:' : url.protocol === 'https:';\n};\n","function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}export{e as getDefaultExportFromCjs};\n//# sourceMappingURL=_commonjsHelpers.js.map\n","var e={exports:{}};export{e as __module};\n//# sourceMappingURL=index2.js.map\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import{getDefaultExportFromCjs as e}from\"./_commonjsHelpers.js\";import{__require as r}from\"../external/classnames/index.js\";var s=e(r());export{s as default};\n//# sourceMappingURL=index.js.map\n","import { h } from 'preact';\nimport './Spinner.scss';\n\ninterface SpinnerProps {\n /**\n * Whether the spinner should be rendered inline\n */\n inline?: boolean;\n\n /**\n * size of the spinner (small/medium/large)\n */\n size?: string;\n}\n\n/**\n * Default Loading Spinner\n * @param props -\n */\nconst Spinner = ({ inline = false, size = 'large' }: SpinnerProps) => (\n <div data-testid=\"spinner\" className={`adyen-checkout__spinner__wrapper ${inline ? 'adyen-checkout__spinner__wrapper--inline' : ''}`}>\n <div className={`adyen-checkout__spinner adyen-checkout__spinner--${size}`} />\n </div>\n);\n\nexport default Spinner;\n","/* eslint-disable */\nexport default function uuidv4(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {\n let r = (Math.random() * 16) | 0,\n v = c == 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n/* eslint-enable */\n","import { JSX } from 'preact';\nimport { useRef, useState, useEffect } from 'preact/hooks';\nimport cx from 'classnames';\nimport './Img.scss';\nimport { h } from 'preact';\nimport { ImgProps } from './types';\n\nexport default function Img(props: ImgProps) {\n const { backgroundUrl = '', className = '', classNameModifiers = [], src = '', alt = '', showOnError = false } = props;\n const [loaded, setLoaded] = useState(false);\n const imageRef = useRef(null);\n\n const handleLoad = () => {\n setLoaded(true);\n };\n\n const handleError = () => {\n setLoaded(showOnError);\n };\n\n const classNames = cx(\n [className],\n 'adyen-checkout__image',\n { 'adyen-checkout__image--loaded': loaded },\n ...classNameModifiers.map(modifier => `adyen-checkout__image--${modifier}`)\n );\n\n useEffect(() => {\n const image = backgroundUrl ? new Image() : imageRef.current;\n image.src = backgroundUrl || src;\n image.onload = handleLoad;\n setLoaded(!!image.complete);\n }, []);\n\n if (backgroundUrl) {\n return <div data-testid=\"background\" style={{ backgroundUrl } as JSX.CSSProperties} {...props} className={classNames} />;\n }\n\n return <img {...props} alt={alt} ref={imageRef} className={classNames} onError={handleError} />;\n}\n","import { h } from 'preact';\nimport { CustomTranslations } from './types';\nimport AdyenCheckoutError from '../core/Errors/AdyenCheckoutError';\n\n/**\n * Returns a locale with the proper format\n *\n * @example\n * formatLocale('En_us'); -> en-US\n * formatLocale('ar') -> ar\n */\nexport function formatLocale(localeParam: string): string {\n const locale = localeParam.replace('_', '-');\n const format = new RegExp('([a-z]{2})([-])([A-Z]{2})');\n\n // If it's already formatted, return the locale\n if (format.test(locale)) {\n return locale;\n }\n\n // If no country code is defined (Ex: 'ar') , then returns 'ar'\n const [languageCode, countryCode] = locale.split('-');\n if (languageCode.length !== 2) {\n throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', `Locale '${localeParam}' does not match the expected format`);\n }\n if (!countryCode) {\n return languageCode.toLowerCase();\n }\n\n // Ensure correct format and join the strings back together\n const fullLocale = [languageCode.toLowerCase(), countryCode.toUpperCase()].join('-');\n if (format.test(fullLocale)) {\n return fullLocale;\n } else {\n throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', `Locale '${localeParam}' does not match the expected format`);\n }\n}\n\n/**\n * Makes sure that if custom translation is defined using not properly formatted locale keys, then it gets formatted correctly\n * Ex: Custom translation defined as { en_US: { ... }} will be adjusted to { 'en-US': { ... }}\n */\nexport function formatCustomTranslations(customTranslations: CustomTranslations = {}): CustomTranslations {\n return Object.keys(customTranslations).reduce((memo, customTranslationLocaleKey) => {\n const locale = formatLocale(customTranslationLocaleKey);\n memo[locale] = customTranslations[customTranslationLocaleKey];\n return memo;\n }, {});\n}\n\nconst replaceTranslationValues = (translation, values) => {\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 = (translations: object, key: string, options: { [key: string]: any } = { values: {}, count: 0 }): string => {\n const keyPlural = `${key}__plural`;\n const keyForCount = count => `${key}__${count}`;\n\n if (Object.prototype.hasOwnProperty.call(translations, keyForCount(options.count))) {\n // Find key__count translation key\n return replaceTranslationValues(translations[keyForCount(options.count)], options.values);\n } else if (Object.prototype.hasOwnProperty.call(translations, keyPlural) && options.count > 1) {\n // Find key__plural translation key, if count greater than 1 (e.g. myTranslation__plural)\n return replaceTranslationValues(translations[keyPlural], options.values);\n } else if (Object.prototype.hasOwnProperty.call(translations, key)) {\n // Find key translation key (e.g. myTranslation)\n return replaceTranslationValues(translations[key], options.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","/**\n * FALLBACK_CONTEXT\n */\nexport const FALLBACK_CONTEXT = 'https://checkoutshopper-live.adyen.com/checkoutshopper/';\n\nexport const GENERIC_OPTIONS = [\n 'amount',\n 'secondaryAmount',\n 'countryCode',\n 'environment',\n '_environmentUrls',\n 'loadingContext',\n 'i18n',\n 'modules',\n 'order',\n 'session',\n 'clientKey',\n 'showPayButton',\n 'redirectFromTopWhenInIframe',\n\n // Events\n 'onPaymentCompleted',\n 'onPaymentFailed',\n 'beforeRedirect',\n 'beforeSubmit',\n 'onSubmit',\n 'onActionHandled',\n 'onAdditionalDetails',\n 'onChange',\n 'onEnterKeyPressed',\n 'onError',\n 'onBalanceCheck',\n 'onOrderCancel',\n 'onOrderRequest',\n 'onOrderUpdated',\n 'onPaymentMethodsRequest'\n];\n\nexport const DEFAULT_HTTP_TIMEOUT = 60000;\n\nexport default {\n FALLBACK_CONTEXT,\n GENERIC_OPTIONS,\n DEFAULT_HTTP_TIMEOUT\n};\n","import { DEFAULT_HTTP_TIMEOUT, FALLBACK_CONTEXT } from '../config';\nimport AdyenCheckoutError from '../Errors/AdyenCheckoutError';\n\nexport interface HttpOptions {\n accept?: string;\n contentType?: string;\n headers?;\n loadingContext?: string;\n method?: string;\n path: string;\n timeout?: number;\n errorLevel?: ErrorLevel;\n errorMessage?: string;\n errorCode?: string;\n}\n\ninterface FetchErrorOptions {\n message?: string;\n level?: ErrorLevel;\n cause?: unknown;\n code?: string;\n}\n\ntype ErrorLevel = 'silent' | 'info' | 'warn' | 'error' | 'fatal';\n\ntype AdyenApiErrorResponse = {\n errorCode: string;\n message: string;\n errorType: string;\n status: number;\n};\n\nfunction isAdyenApiErrorResponse(data: any): data is AdyenApiErrorResponse {\n return data && data.errorCode && data.errorType && data.message && data.status;\n}\n\nexport function http<T>(options: HttpOptions, data?: any): Promise<T> {\n const {\n headers = [],\n errorLevel = 'warn',\n errorCode,\n loadingContext = FALLBACK_CONTEXT,\n method = 'GET',\n path,\n timeout = DEFAULT_HTTP_TIMEOUT\n } = options;\n\n const request: RequestInit = {\n method,\n mode: 'cors',\n cache: 'default',\n credentials: 'same-origin',\n headers: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': method === 'POST' ? 'application/json' : 'text/plain',\n ...headers\n },\n redirect: 'follow',\n referrerPolicy: 'no-referrer-when-downgrade',\n ...(AbortSignal?.timeout && { signal: AbortSignal?.timeout(timeout) }),\n ...(data && { body: JSON.stringify(data) })\n };\n\n const url = `${loadingContext}${path}`;\n\n return (\n fetch(url, request)\n .then(async response => {\n const data = await response.json();\n\n if (response.ok) {\n return data;\n }\n\n if (isAdyenApiErrorResponse(data)) {\n handleFetchError({ message: data.message, level: errorLevel, cause: data, code: errorCode });\n return;\n }\n\n const errorMessage = options.errorMessage || `Service at ${url} is not available`;\n handleFetchError({ message: errorMessage, level: errorLevel, cause: data, code: errorCode });\n return;\n })\n /**\n * Catch block handles Network error, CORS error, or exception throw by the `handleFetchError`\n * inside the `then` block\n */\n .catch((error: unknown) => {\n /**\n * If error is instance of AdyenCheckoutError, which means that it was already\n * handled by the `handleFetchError` on the `then` block, then we just throw it.\n * There is no need to create it again\n */\n if (error instanceof AdyenCheckoutError) {\n throw error;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-base-to-string,@typescript-eslint/restrict-template-expressions\n const errorMessage = options.errorMessage || `Call to ${url} failed. Error= ${error}`;\n handleFetchError({ message: errorMessage, level: errorLevel, cause: error, code: errorCode });\n })\n );\n}\n\nfunction handleFetchError({ message, level, cause, code }: FetchErrorOptions): void {\n switch (level) {\n case 'silent': {\n break;\n }\n case 'info':\n case 'warn':\n case 'error': {\n console[level](message);\n break;\n }\n default:\n throw new AdyenCheckoutError('NETWORK_ERROR', message, { cause, code });\n }\n}\n\nexport function httpGet<T = any>(options: HttpOptions, data?: any): Promise<T> {\n return http<T>({ ...options, method: 'GET' }, data);\n}\n\nexport function httpPost<T = any>(options: HttpOptions, data?: any): Promise<T> {\n return http<T>({ ...options, method: 'POST' }, data);\n}\n","export const DEFAULT_DEBOUNCE_TIME_MS = 300;\n\nexport const debounce = (fn: Function, ms = DEFAULT_DEBOUNCE_TIME_MS) => {\n let timeoutId: ReturnType<typeof setTimeout>;\n return function (this: any, ...args: any[]) {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn.apply(this, args), ms);\n };\n};\n","import { Component, h } from 'preact';\nimport classNames from 'classnames';\nimport Spinner from '../Spinner';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport './Button.scss';\nimport { ButtonProps, ButtonState } from './types';\n\nclass Button extends Component<ButtonProps, ButtonState> {\n public static defaultProps = {\n status: 'default',\n variant: 'primary',\n disabled: false,\n label: '',\n inline: false,\n target: '_self',\n onClick: () => {}\n };\n\n public onClick = e => {\n e.preventDefault();\n\n if (!this.props.disabled) {\n this.props.onClick(e, { complete: this.complete });\n }\n };\n\n public complete = (delay = 1000) => {\n this.setState({ completed: true });\n setTimeout(() => {\n this.setState({ completed: false });\n }, delay);\n };\n\n public onKeyDown = (event: KeyboardEvent) => {\n this.props.onKeyDown?.(event);\n };\n\n render() {\n const { classNameModifiers = [], disabled, href, icon, inline, label, ariaLabel, status, variant, buttonRef }: ButtonProps = this.props;\n const { completed } = this.state;\n const { i18n } = useCoreContext();\n\n const buttonIcon = icon ? <img className=\"adyen-checkout__button__icon\" src={icon} alt=\"\" aria-hidden=\"true\" /> : '';\n\n const modifiers = [\n ...classNameModifiers,\n ...(variant !== 'primary' ? [variant] : []),\n ...(inline ? ['inline'] : []),\n ...(completed ? ['completed'] : []),\n ...(status === 'loading' || status === 'redirect' ? ['loading'] : [])\n ];\n\n const buttonClasses = classNames(['adyen-checkout__button', ...modifiers.map(m => `adyen-checkout__button--${m}`)]);\n\n const buttonStates = {\n loading: (\n <span className=\"adyen-checkout__button__content\">\n <Spinner size=\"medium\" inline />\n <span className={'adyen-checkout__button__text--sr-only'}>{i18n.get('loading')}</span>\n </span>\n ),\n redirect: (\n <span className=\"adyen-checkout__button__content\">\n <Spinner size=\"medium\" inline />\n {i18n.get('payButton.redirecting')}\n </span>\n ),\n default: (\n <span className=\"adyen-checkout__button__content\">\n {buttonIcon}\n <span className=\"adyen-checkout__button__text\">{label}</span>\n </span>\n )\n };\n\n const buttonText = buttonStates[status] || buttonStates.default;\n\n if (href) {\n return (\n <a className={buttonClasses} href={href} disabled={disabled} target={this.props.target} rel={this.props.rel}>\n {buttonText}\n </a>\n );\n }\n\n return (\n <button\n ref={buttonRef}\n className={buttonClasses}\n type=\"button\"\n disabled={disabled}\n onClick={this.onClick}\n onKeyDown={this.onKeyDown}\n aria-label={ariaLabel}\n >\n {buttonText}\n {status !== 'loading' && status !== 'redirect' && this.props.children}\n </button>\n );\n }\n}\n\nexport default Button;\n","import {\n BOLETO_SOCIAL_SECURITY_NUMBER_INVALID,\n CREDITCARD_HOLDER_NAME_INVALID,\n CREDITCARD_TAX_NUMBER_INVALID,\n ERROR_FIELD_REQUIRED,\n ERROR_INVALID_FORMAT_EXPECTS\n} from '../Errors/constants';\n\nexport const ANALYTICS_PATH = 'v3/analytics';\n\nexport const ANALYTICS_INFO_TIMER_INTERVAL = process.env.NODE_ENV === 'development' ? 5000 : 10000;\n\nexport const ANALYTICS_SEARCH_DEBOUNCE_TIME = 3000;\n\nexport const ANALYTICS_EVENT = {\n log: 'log',\n error: 'error',\n info: 'info'\n};\n\nexport const ANALYTICS_ERROR_TYPE = {\n network: 'Network',\n implementation: 'ImplementationError',\n internal: 'Internal',\n apiError: 'ApiError',\n sdkError: 'SdkError',\n thirdParty: 'ThirdParty',\n generic: 'Generic',\n redirect: 'Redirect',\n threeDS2: 'ThreeDS2'\n};\n\nexport const ANALYTICS_ERROR_CODE = {\n redirect: '600'\n};\n\n/**\n * Info Events\n */\nexport enum InfoEventTypes {\n clicked = 'clicked',\n rendered = 'rendered'\n}\n\nexport const ANALYTICS_ACTION_STR = 'action';\nexport const ANALYTICS_SUBMIT_STR = 'submit';\nexport const ANALYTICS_SELECTED_STR = 'selected';\nexport const ANALYTICS_RENDERED_STR = 'rendered';\nexport const ANALYTICS_DISPLAYED_STR = 'displayed';\nexport const ANALYTICS_INPUT_STR = 'input';\n\nexport const ANALYTICS_DOWNLOAD_STR = 'download';\n\nexport const ANALYTICS_VALIDATION_ERROR_STR = 'validationError';\n\nexport const ANALYTICS_FOCUS_STR = 'focus';\nexport const ANALYTICS_UNFOCUS_STR = 'unfocus';\n\nexport const ANALYTICS_CONFIGURED_STR = 'configured';\n\nexport const ANALYTICS_QR_CODE_DOWNLOAD = 'qr_download_button';\n\nexport const ANALYTICS_INSTANT_PAYMENT_BUTTON = 'instant_payment_button';\nexport const ANALYTICS_FEATURED_ISSUER = 'featured_issuer';\nexport const ANALYTICS_LIST = 'list';\nexport const ANALYTICS_LIST_SEARCH = 'list_search';\n\nexport enum Analytics3DS2Errors {\n ACTION_IS_MISSING_PAYMENT_DATA = '700', // Missing 'paymentData' property from threeDS2 action\n ACTION_IS_MISSING_TOKEN = '701', // Missing 'token' property from threeDS2 action\n TOKEN_IS_MISSING_THREEDSMETHODURL = '702', // Decoded token is missing a valid threeDSMethodURL property\n\n /**\n * Decoded token is missing one or more of the following properties:\n * fingerprint: (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)\n * challenge: (acsTransID | messageVersion | threeDSServerTransID)\n */\n TOKEN_IS_MISSING_OTHER_PROPS = '703',\n\n TOKEN_DECODE_OR_PARSING_FAILED = '704', // token decoding or parsing has failed. ('not base64', 'malformed URI sequence' or 'Could not JSON parse token')\n THREEDS2_TIMEOUT = '705', // 3DS2 process has timed out\n\n TOKEN_IS_MISSING_ACSURL = '800', // Decoded token is missing a valid acsURL property\n NO_TRANSSTATUS = '801', // Challenge has resulted in an error (no transStatus could be retrieved by the backend)\n NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED = '802', // callSubmit3DS2Fingerprint has received a response indicating either a \"frictionless\" flow, or a \"refused\" response, but without a details object\n NO_COMPONENT_FOR_ACTION = '803', // callSubmit3DS2Fingerprint cannot find a component to handle the action response\n NO_ACTION_FOR_CHALLENGE = '804', // callSubmit3DS2Fingerprint has received a response indicating a \"challenge\" but without an action object\n CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP = '805' // The challenge process has happened, an object has been returned, parsed & accepted as legit, but the result prop on that object is either missing or doesn't have a transStatus prop\n}\n\nexport enum Analytics3DS2Events {\n FINGERPRINT_DATA_SENT = 'fingerprintDataSentWeb',\n FINGERPRINT_IFRAME_LOADED = 'fingerprintIframeLoaded',\n FINGERPRINT_COMPLETED = 'fingerprintCompleted',\n CHALLENGE_DATA_SENT = 'challengeDataSentWeb',\n CHALLENGE_IFRAME_LOADED = 'challengeIframeLoaded',\n CHALLENGE_COMPLETED = 'challengeCompleted'\n}\n\n/**\n * Function to map errorCodes based on translation keys to the codes expected by the analytics endpoint\n */\nexport const errorCodeMapping: Record<string, string> = {\n [CREDITCARD_HOLDER_NAME_INVALID]: '925',\n [CREDITCARD_TAX_NUMBER_INVALID]: '942',\n //\n [BOLETO_SOCIAL_SECURITY_NUMBER_INVALID]: '926',\n //\n [`${ERROR_FIELD_REQUIRED}.country`]: '930',\n [`${ERROR_FIELD_REQUIRED}.street`]: '931',\n [`${ERROR_FIELD_REQUIRED}.house_number_or_name`]: '932',\n [`${ERROR_FIELD_REQUIRED}.postal_code`]: '933',\n [`${ERROR_FIELD_REQUIRED}.city`]: '935',\n [`${ERROR_FIELD_REQUIRED}.state_or_province`]: '936',\n //\n [`${ERROR_INVALID_FORMAT_EXPECTS}.postal_code`]: '934'\n //\n};\n\nexport const ANALYTICS_EXPRESS_PAGES_ARRAY = ['cart', 'minicart', 'pdp', 'checkout'];\n\nexport const ALLOWED_ANALYTICS_DATA = ['applicationInfo', 'checkoutAttemptId'];\n\nexport const NO_CHECKOUT_ATTEMPT_ID = 'fetch-checkoutAttemptId-failed';\n\nexport const ANALYTIC_LEVEL = {\n all: 'all',\n initial: 'initial'\n};\n","import { FormatterFn } from './types';\n\n// Removes all non-digits\nexport const digitsOnlyFormatter: FormatterFn = (value: string) => {\n return value.replace(/[^0-9]/g, '');\n};\n\nexport const capitalizeFirstLetter = (str: string): string => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n};\n","import { AnalyticsData } from './types';\nimport { errorCodeMapping, ALLOWED_ANALYTICS_DATA } from './constants';\nimport { digitsOnlyFormatter } from '../../utils/Formatters/formatters';\nimport { ERROR_FIELD_REQUIRED, ERROR_INVALID_FORMAT_EXPECTS } from '../Errors/constants';\n\nexport const getUTCTimestamp = () => Date.now();\n\nexport const mapErrorCodesForAnalytics = (errorCode: string, target: string) => {\n // Some of the more generic error codes required combination with target to retrieve a specific code\n if (errorCode === ERROR_FIELD_REQUIRED || errorCode === ERROR_INVALID_FORMAT_EXPECTS) {\n return errorCodeMapping[`${errorCode}.${target}`] ?? errorCode;\n }\n\n let errCode = errorCodeMapping[errorCode] ?? errorCode;\n\n // If errCode isn't now a number - then we just need to remove any non-digits\n // since the correct error code is already contained within the string e.g. securedField related errors\n if (isNaN(Number(errCode))) {\n errCode = digitsOnlyFormatter(errCode);\n }\n\n return errCode;\n};\n\nexport const processAnalyticsData = (analyticsData: AnalyticsData): AnalyticsData => {\n return Object.keys(analyticsData).reduce((acc, prop) => {\n if (ALLOWED_ANALYTICS_DATA.includes(prop)) acc[prop] = analyticsData[prop];\n return acc;\n }, {});\n};\n","import uuid from '../../utils/uuid';\nimport { getUTCTimestamp } from './utils';\n\nexport abstract class AnalyticsEvent {\n public timestamp: string;\n public id: string;\n public component: string;\n\n public abstract getEventCategory(): string;\n\n constructor() {\n this.id = uuid();\n this.timestamp = String(getUTCTimestamp());\n }\n}\n","import { AnalyticsEvent } from './AnalyticsEvent';\nimport { ANALYTICS_EVENT, ANALYTICS_VALIDATION_ERROR_STR } from './constants';\nimport { mapErrorCodesForAnalytics } from './utils';\n\ntype AnalyticsInfoEventObject = {\n type: string;\n target?: string;\n issuer?: string;\n isExpress?: boolean;\n expressPage?: string;\n isStoredPaymentMethod?: boolean;\n brand?: string;\n validationErrorCode?: string;\n validationErrorMessage?: string;\n configData?: Record<string, string | boolean>;\n component?: string;\n};\n\nexport class AnalyticsInfoEvent extends AnalyticsEvent {\n public type: string;\n public target: string;\n public issuer?: string;\n public isExpress?: boolean;\n public expressPage?: string;\n public isStoredPaymentMethod?: boolean;\n public brand?: string;\n public validationErrorCode?: string;\n public validationErrorMessage?: string;\n public configData?: Record<string, string | boolean>;\n\n constructor(analyticsObject: AnalyticsInfoEventObject) {\n super();\n\n this.component = analyticsObject.component;\n\n this.type = analyticsObject.type;\n this.target = analyticsObject.target;\n this.issuer = analyticsObject.issuer;\n this.isExpress = analyticsObject.isExpress;\n this.isStoredPaymentMethod = analyticsObject.isStoredPaymentMethod;\n this.isExpress = analyticsObject.isExpress;\n this.expressPage = analyticsObject.expressPage;\n this.brand = analyticsObject.brand;\n this.validationErrorCode = analyticsObject.validationErrorCode;\n this.validationErrorMessage = analyticsObject.validationErrorMessage;\n this.configData = analyticsObject.configData;\n\n // Some of the more generic validation error codes required combination with target to retrieve a specific code\n if (this.type === ANALYTICS_VALIDATION_ERROR_STR) {\n this.validationErrorCode = mapErrorCodesForAnalytics(this.validationErrorCode, this.target);\n }\n\n return this;\n }\n\n public getEventCategory(): string {\n return ANALYTICS_EVENT.info;\n }\n}\n","import getProp from './getProp';\nimport { BrowserInfo } from '../types/global-types';\n\n/**\n * Collects available frontend browser info and store it in the properties dictated by the EMVCo spec\n * (3DS_Spec_protocolAndCoreFny_v2-1_Oct2017.pdf)\n *\n * @example\n * ```js\n * const browserInfo = collectBrowserInfo();\n * ```\n *\n * @returns An object containing the retrieved browser properties\n */\nexport default function collectBrowserInfo(): BrowserInfo {\n const colorDepth = getProp(window, 'screen.colorDepth') || '';\n const javaEnabled = false;\n const screenHeight = getProp(window, 'screen.height') || ''; // TODO: Shall we set this to null instead?\n const screenWidth = getProp(window, 'screen.width') || ''; // TODO: Shall we set this to null instead?\n const userAgent = getProp(window, 'navigator.userAgent') || '';\n\n const language = getProp(window, 'navigator.language') || 'en';\n const d = new Date();\n const timeZoneOffset = d.getTimezoneOffset();\n\n return {\n acceptHeader: '*/*',\n colorDepth,\n language,\n javaEnabled,\n screenHeight,\n screenWidth,\n userAgent,\n timeZoneOffset\n };\n}\n","import { httpPost } from '../../../../core/Services/http';\nimport { CardBinLookupData, CardBinValueData, CardErrorData } from '../lib/types';\nimport { DEFAULT_CARD_GROUP_TYPES } from '../lib/constants';\nimport { SF_ErrorCodes } from '../../../../core/Errors/constants';\nimport { BinLookupResponse, BinLookupResponseRaw } from '../../../Card/types';\n\nif (process.env.NODE_ENV === 'development') {\n window.mockBinCount = 0; // Set to 0 to turn off mocking, 1 to turn it on\n}\n\nexport default parent => {\n let currentRequestId = null;\n\n return (callbackObj: CardBinValueData) => {\n // Allow way for merchant to disallow binLookup by specifically setting the prop to false\n if (parent.props.doBinLookup === false) {\n if (parent.props.onBinValue) parent.props.onBinValue(callbackObj);\n return;\n }\n\n // Do binLookup when encryptedBin property is present (and only if the merchant is using a clientKey)\n if (callbackObj.encryptedBin && parent.props.clientKey) {\n // Store id of request we're about to make\n currentRequestId = callbackObj.uuid;\n\n void httpPost(\n {\n loadingContext: parent.props.loadingContext,\n path: `v3/bin/binLookup?token=${parent.props.clientKey}`\n },\n {\n type: parent.props.brand,\n supportedBrands: parent.props.brands || DEFAULT_CARD_GROUP_TYPES,\n encryptedBin: callbackObj.encryptedBin,\n requestId: callbackObj.uuid // Pass id of request\n }\n ).then((data: BinLookupResponseRaw) => {\n // If response is the one we were waiting for...\n if (data?.requestId === currentRequestId) {\n if (process.env.NODE_ENV === 'development') {\n // TODO mocking\n if (window.mockBinCount >= 1) {\n switch (window.mockBinCount) {\n case 1:\n console.log('\\n### triggerBinLookUp::mock first response:: ');\n data.brands = [\n {\n brand: 'mc',\n cvcPolicy: 'optional',\n enableLuhnCheck: true,\n // showExpiryDate: true, // deprecated in /binLookup v3\n expiryDatePolicy: 'optional',\n // panLength: 16,\n supported: true\n }\n ];\n // data.issuingCountryCode = 'KR'; // needed to mock korean_local_card\n // increment to alter second response\n window.mockBinCount++;\n\n break;\n case 2:\n console.log('\\n### triggerBinLookUp::mock second response:: ');\n // data.brands = null;\n data.brands = [\n {\n brand: 'maestro',\n cvcPolicy: 'required',\n enableLuhnCheck: true,\n showExpiryDate: true,\n supported: true,\n showSocialSecurityNumber: false\n // panLength: 16\n }\n ];\n break;\n default:\n }\n }\n // TODO end\n }\n\n if (data.brands?.length) {\n const mappedResponse = data.brands.reduce(\n (acc, item) => {\n // All brand strings end up in the detectedBrands array\n acc.detectedBrands.push(item.brand);\n // Also add the paymentMethodVariants (more granular description of the txvariant)\n acc.paymentMethodVariants.push(item.paymentMethodVariant);\n\n // Add supported brand objects to the supportedBrands array\n if (item.supported === true) {\n acc.supportedBrands.push(item);\n return acc;\n }\n\n return acc;\n },\n { supportedBrands: [], detectedBrands: [], paymentMethodVariants: [] }\n );\n\n /**\n * supportedBrands = merchant supports this brand(s); we have detected the card number to be of this brand(s); carry on!\n */\n if (mappedResponse.supportedBrands.length) {\n // ...call processBinLookupResponse with, a simplified, response object if it contains at least one supported brand\n parent.processBinLookupResponse({\n issuingCountryCode: data.issuingCountryCode,\n supportedBrands: mappedResponse.supportedBrands,\n ...(data.showSocialSecurityNumber ? { showSocialSecurityNumber: data.showSocialSecurityNumber } : {})\n } as BinLookupResponse);\n\n // Inform merchant of the result\n parent.onBinLookup({\n type: callbackObj.type,\n detectedBrands: mappedResponse.detectedBrands,\n // supportedBrands contains the subset of this.props.brands that matches the card number that the shopper has typed\n supportedBrands: mappedResponse.supportedBrands.map(item => item.brand),\n paymentMethodVariants: mappedResponse.paymentMethodVariants,\n supportedBrandsRaw: mappedResponse.supportedBrands, // full supportedBrands data (for customCard comp)\n brands: parent.props.brands || DEFAULT_CARD_GROUP_TYPES,\n issuingCountryCode: data.issuingCountryCode\n } as CardBinLookupData);\n\n return;\n }\n\n /**\n * detectedBrands = no brands the merchant supports were found; what we did detect the shopper to be entering was this brand;\n * error!\n */\n if (mappedResponse.detectedBrands.length) {\n const errObj: CardErrorData = {\n type: 'card',\n fieldType: 'encryptedCardNumber',\n error: SF_ErrorCodes.ERROR_MSG_UNSUPPORTED_CARD_ENTERED,\n detectedBrands: mappedResponse.detectedBrands\n };\n parent.handleUnsupportedCard(errObj);\n\n // Inform merchant of the result\n parent.onBinLookup({\n type: callbackObj.type,\n detectedBrands: mappedResponse.detectedBrands,\n supportedBrands: null,\n paymentMethodVariants: mappedResponse.paymentMethodVariants,\n brands: parent.props.brands || DEFAULT_CARD_GROUP_TYPES\n } as CardBinLookupData);\n\n return;\n }\n } else {\n /**\n * BIN not in DB (a failed lookup will just contain a requestId)\n */\n parent.onBinLookup({\n type: callbackObj.type,\n detectedBrands: null,\n supportedBrands: null,\n paymentMethodVariants: null,\n brands: parent.props.brands || DEFAULT_CARD_GROUP_TYPES\n } as CardBinLookupData);\n\n // Reset the UI and let the native, regex branding happen (for the generic card)\n // For a single-branded card we need to pass a boolean to prompt resetting the brand logo to the 'base' type\n parent.processBinLookupResponse({}, true);\n }\n } else {\n if (!data?.requestId) {\n // Some other kind of error on the backend\n parent.props.onError(data || { errorType: 'binLookup', message: 'unknownError' });\n }\n // Else - response with wrong requestId\n }\n });\n } else if (currentRequestId) {\n /**\n * If onBinValue callback is called AND we have been doing binLookup BUT passed object doesn't have an encryptedBin property\n * - then THE NUMBER OF DIGITS IN NUMBER FIELD HAS DROPPED BELOW THRESHOLD for BIN lookup - so reset the UI\n */\n parent.processBinLookupResponse(null, true);\n\n currentRequestId = null; // Ignore any pending responses\n\n // Reset any errors\n const errObj: CardErrorData = {\n type: 'card',\n fieldType: 'encryptedCardNumber',\n error: ''\n };\n parent.handleUnsupportedCard(errObj);\n\n // CustomCard needs this to reset the UI\n parent.onBinLookup({\n isReset: true\n } as CardBinLookupData);\n }\n\n if (parent.props.onBinValue) parent.props.onBinValue(callbackObj);\n };\n};\n","import AdyenCheckoutError from '../core/Errors/AdyenCheckoutError';\n\ninterface IScript {\n load(): Promise<any>;\n remove(): HTMLScriptElement;\n}\n\n/**\n * Creates a script element from a certain source in the passed node selector.\n * If no selector is passed it will add the script element in the body.\n *\n * @example\n * ```\n * const script = new Script('https://example.com/script.js', '.container');\n * script.load().then(doSomething);\n *\n * // To clean up just call the remove method\n * script.remove();\n * ```\n */\nclass Script implements IScript {\n private readonly src: string;\n private readonly node: string;\n private readonly attributes: Partial<HTMLScriptElement>;\n private readonly dataAttributes: Record<string, string | undefined>;\n\n private isScriptLoadCalled = false;\n private script: HTMLScriptElement;\n\n constructor(src, node = 'body', attributes: Partial<HTMLScriptElement> = {}, dataAttributes: Record<string, string | undefined> = {}) {\n this.src = src;\n this.node = node;\n this.attributes = attributes;\n this.dataAttributes = dataAttributes;\n }\n\n public load = (): Promise<void> => {\n if (this.isScriptLoadCalled) {\n if (process.env.NODE_ENV === 'development') console.warn(`[Warning] script.load called more than once for ${this.src}`);\n return;\n }\n\n return new Promise((resolve, reject) => {\n const handleOnLoad = () => {\n this.script.setAttribute('data-script-loaded', 'true');\n resolve();\n };\n\n const handleOnError = (errorEvent: ErrorEvent) => {\n this.remove();\n reject(\n new AdyenCheckoutError('SCRIPT_ERROR', `Unable to load script ${this.src}. Message: ${errorEvent.message}`, {\n cause: errorEvent.error\n })\n );\n };\n\n this.isScriptLoadCalled = true;\n\n const scriptContainer: Element = document.querySelector(this.node);\n this.script = scriptContainer.querySelector(`script[src=\"${this.src}\"]`);\n\n // Script element exists in the browser and is already loaded\n if (this.script && this.script.getAttribute('data-script-loaded')) {\n resolve();\n return;\n } else if (this.script) {\n // Script element exists in the browser, but it is not loaded yet\n // Use-case: Multiple PayPal standalone components being loaded in different parts of the screen.\n this.script.addEventListener('load', handleOnLoad);\n this.script.addEventListener('error', handleOnError);\n return;\n }\n\n // Script element doesn't exist in the browser, so we create it and append to the DOM tree\n this.script = document.createElement('script');\n Object.assign(this.script, this.attributes);\n Object.assign(this.script.dataset, this.dataAttributes);\n\n this.script.src = this.src;\n this.script.async = true;\n\n this.script.addEventListener('load', handleOnLoad);\n this.script.addEventListener('error', handleOnError);\n\n scriptContainer.appendChild(this.script);\n });\n };\n\n public remove = (): HTMLScriptElement => {\n return this.script.parentNode && this.script.parentNode.removeChild(this.script);\n };\n}\n\nexport default Script;\n","import Language from '../../../language';\nimport { PaymentAmountExtended } from '../../../types/global-types';\n\nexport const PAY_BTN_DIVIDER = '/ ';\n\nconst amountLabel = (i18n, amount: PaymentAmountExtended) =>\n !!amount?.value && !!amount?.currency ? i18n.amount(amount.value, amount.currency, { currencyDisplay: amount.currencyDisplay || 'symbol' }) : '';\n\nconst payAmountLabel = (i18n: Language, amount: PaymentAmountExtended) => `${i18n.get('payButton')} ${amountLabel(i18n, amount)}`;\n\nconst secondaryAmountLabel = (i18n: Language, secondaryAmount: PaymentAmountExtended) => {\n const convertedSecondaryAmount =\n secondaryAmount && !!secondaryAmount?.value && !!secondaryAmount?.currency\n ? i18n.amount(secondaryAmount.value, secondaryAmount.currency, { currencyDisplay: secondaryAmount.currencyDisplay || 'symbol' })\n : '';\n\n const divider = convertedSecondaryAmount.length ? PAY_BTN_DIVIDER : '';\n\n return `${divider}${convertedSecondaryAmount}`;\n};\n\nexport { payAmountLabel, amountLabel, secondaryAmountLabel };\n","import { h } from 'preact';\nimport './SecondaryButtonLabel.scss';\n\nconst SecondaryButtonLabel = ({ label }) => {\n return <span className={'checkout-secondary-button__text'}>{label}</span>;\n};\n\nexport default SecondaryButtonLabel;\n","import { h } from 'preact';\nimport Button from '../Button';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { ButtonProps } from '../Button/types';\nimport { payAmountLabel, secondaryAmountLabel } from './utils';\nimport { PaymentAmountExtended } from '../../../types/global-types';\nimport SecondaryButtonLabel from './components/SecondaryButtonLabel';\n\nexport interface PayButtonProps extends ButtonProps {\n /**\n * Class name modifiers will be used as: `adyen-checkout__image--${modifier}`\n */\n classNameModifiers?: string[];\n label?: string;\n amount: PaymentAmountExtended;\n secondaryAmount?: PaymentAmountExtended;\n status?: string;\n disabled?: boolean;\n icon?: string;\n onClick?(): void;\n}\n\nconst PayButton = ({ amount, secondaryAmount, classNameModifiers = [], label, ...props }: PayButtonProps) => {\n const { i18n } = useCoreContext();\n const isZeroAuth = amount && {}.hasOwnProperty.call(amount, 'value') && amount.value === 0;\n const defaultLabel = isZeroAuth ? i18n.get('confirmPreauthorization') : payAmountLabel(i18n, amount);\n\n /**\n * Show the secondaryLabel if:\n * - it's not zero auth, and\n * - we don't have a predefined label (i.e. redirect, qrcode, await based comps...), and\n * - we do have an amount object (merchant might not be passing this in order to not show the amount on the button), and\n * - we have a secondaryAmount object with some properties\n */\n const secondaryLabel =\n !isZeroAuth && !label && amount && secondaryAmount && Object.keys(secondaryAmount).length\n ? secondaryAmountLabel(i18n, secondaryAmount)\n : null;\n\n return (\n <Button\n {...props}\n disabled={props.disabled || props.status === 'loading'}\n classNameModifiers={[...classNameModifiers, 'pay']}\n label={label || defaultLabel}\n >\n {secondaryLabel && <SecondaryButtonLabel label={secondaryLabel} />}\n </Button>\n );\n};\n\nexport default PayButton;\nexport { payAmountLabel };\n","import { Component, h } from 'preact';\nimport classNames from 'classnames';\nimport './Iframe.scss';\n\ninterface IframeProps {\n width?: string;\n height?: string;\n minWidth?: string;\n minHeight?: string;\n border?: string;\n src?: string;\n allow?: string;\n name?: string;\n title?: string;\n classNameModifiers?: string[];\n callback?: (contentWindow) => void;\n}\n\nclass Iframe extends Component<IframeProps> {\n public static defaultProps = {\n width: '0',\n height: '0',\n minWidth: '0',\n minHeight: '0',\n src: null,\n allow: null,\n title: 'components iframe',\n classNameModifiers: []\n };\n\n private iframeEl;\n\n iframeOnLoad() {\n if (this.props.callback && typeof this.props.callback === 'function') {\n this.props.callback(this.iframeEl.contentWindow);\n }\n }\n\n componentDidMount() {\n if (this.iframeEl.addEventListener) {\n this.iframeEl.addEventListener('load', this.iframeOnLoad.bind(this), false);\n } else if (this.iframeEl.attachEvent) {\n // IE fallback\n this.iframeEl.attachEvent('onload', this.iframeOnLoad.bind(this));\n } else {\n this.iframeEl.onload = this.iframeOnLoad.bind(this);\n }\n }\n\n componentWillUnmount() {\n if (this.iframeEl.removeEventListener) {\n this.iframeEl.removeEventListener('load', this.iframeOnLoad.bind(this), false);\n } else if (this.iframeEl.detachEvent) {\n // IE fallback\n this.iframeEl.detachEvent('onload', this.iframeOnLoad.bind(this));\n } else {\n this.iframeEl.onload = null;\n }\n }\n\n render({ name, src, width, height, minWidth, minHeight, allow, title, classNameModifiers }: IframeProps) {\n const validClassNameModifiers = classNameModifiers.filter(m => !!m);\n\n return (\n <iframe\n ref={ref => {\n this.iframeEl = ref;\n }}\n allow={allow}\n className={classNames(\n 'adyen-checkout__iframe',\n `adyen-checkout__iframe--${name}`,\n validClassNameModifiers.length && classNameModifiers.map(m => `adyen-checkout__iframe--${name}-${m}`)\n )}\n name={name}\n src={src}\n width={width}\n height={height}\n frameBorder=\"0\"\n title={title}\n /* eslint-disable react/no-unknown-property */\n referrerpolicy=\"origin\"\n min-width={minWidth}\n min-height={minHeight}\n /* eslint-enable react/no-unknown-property */\n />\n );\n }\n}\n\nexport default Iframe;\n","export enum TxVariants {\n /** internal */\n address = 'address',\n bankTransfer_IBAN = 'bankTransfer_IBAN',\n bankTransfer_BE = 'bankTransfer_BE',\n bankTransfer_NL = 'bankTransfer_NL',\n bankTransfer_PL = 'bankTransfer_PL',\n bankTransfer_FR = 'bankTransfer_FR',\n bankTransfer_CH = 'bankTransfer_CH',\n bankTransfer_IE = 'bankTransfer_IE',\n bankTransfer_GB = 'bankTransfer_GB',\n bankTransfer_DE = 'bankTransfer_DE',\n donation = 'donation',\n personal_details = 'personal_details',\n dropin = 'dropin',\n /** internal */\n\n /** Card */\n bcmc = 'bcmc',\n card = 'card',\n scheme = 'scheme',\n storedCard = 'storedCard',\n customCard = 'customcard',\n /** Card */\n\n /** ThreeDS */\n threeDS2Challenge = 'threeDS2Challenge',\n threeDS2Fingerprint = 'threeDS2Fingerprint',\n threeDS2DeviceFingerprint = 'threeDS2DeviceFingerprint',\n /** ThreeDS */\n\n /** Direct debit */\n ach = 'ach',\n directdebit_GB = 'directdebit_GB',\n sepadirectdebit = 'sepadirectdebit',\n eft_directdebit_CA = 'eft_directdebit_CA',\n /** Direct debit */\n\n /** Open Invoice */\n affirm = 'affirm',\n afterpay = 'afterpay',\n afterpay_default = 'afterpay_default',\n afterpay_b2b = 'afterpay_b2b',\n atome = 'atome',\n facilypay_3x = 'facilypay_3x',\n facilypay_4x = 'facilypay_4x',\n facilypay_6x = 'facilypay_6x',\n facilypay_10x = 'facilypay_10x',\n facilypay_12x = 'facilypay_12x',\n ratepay = 'ratepay',\n ratepay_directdebit = 'ratepay_directdebit',\n /** Open Invoice */\n\n /** Wallets */\n amazonpay = 'amazonpay',\n applepay = 'applepay',\n cashapp = 'cashapp',\n clicktopay = 'clicktopay',\n googlepay = 'googlepay',\n paypal = 'paypal',\n fastlane = 'fastlane',\n paywithgoogle = 'paywithgoogle',\n /** Wallets */\n\n /** Voucher */\n boletobancario = 'boletobancario',\n boletobancario_itau = 'boletobancario_itau',\n boletobancario_santander = 'boletobancario_santander',\n primeiropay_boleto = 'primeiropay_boleto',\n doku = 'doku',\n doku_alfamart = 'doku_alfamart',\n doku_permata_lite_atm = 'doku_permata_lite_atm',\n doku_indomaret = 'doku_indomaret',\n doku_atm_mandiri_va = 'doku_atm_mandiri_va',\n doku_sinarmas_va = 'doku_sinarmas_va',\n doku_mandiri_va = 'doku_mandiri_va',\n doku_cimb_va = 'doku_cimb_va',\n doku_danamon_va = 'doku_danamon_va',\n doku_bri_va = 'doku_bri_va',\n doku_bni_va = 'doku_bni_va',\n doku_bca_va = 'doku_bca_va',\n doku_wallet = 'doku_wallet',\n oxxo = 'oxxo',\n /** Voucher */\n\n /** issuerList */\n billdesk_online = 'billdesk_online',\n billdesk_wallet = 'billdesk_wallet',\n dotpay = 'dotpay',\n eps = 'eps',\n molpay_ebanking_fpx_MY = 'molpay_ebanking_fpx_MY',\n molpay_ebanking_TH = 'molpay_ebanking_TH',\n molpay_ebanking_VN = 'molpay_ebanking_VN',\n onlineBanking_CZ = 'onlineBanking_CZ',\n onlinebanking_IN = 'onlinebanking_IN',\n onlineBanking_PL = 'onlineBanking_PL',\n onlineBanking_SK = 'onlineBanking_SK',\n paybybank = 'paybybank',\n payu_IN_cashcard = 'payu_IN_cashcard',\n payu_IN_nb = 'payu_IN_nb',\n wallet_IN = 'wallet_IN',\n /** issuerList */\n\n /** Dragonpay */\n dragonpay = 'dragonpay',\n dragonpay_ebanking = 'dragonpay_ebanking',\n dragonpay_otc_banking = 'dragonpay_otc_banking',\n dragonpay_otc_non_banking = 'dragonpay_otc_non_banking',\n dragonpay_otc_philippines = 'dragonpay_otc_philippines',\n /** Dragonpay */\n\n /** Econtext */\n econtext = 'econtext',\n econtext_atm = 'econtext_atm',\n econtext_online = 'econtext_online',\n econtext_seven_eleven = 'econtext_seven_eleven',\n econtext_stores = 'econtext_stores',\n /** Econtext */\n\n /** Redirect */\n giropay = 'giropay',\n multibanco = 'multibanco',\n redirect = 'redirect',\n twint = 'twint',\n vipps = 'vipps',\n trustly = 'trustly',\n paybybank_AIS_DD = 'paybybank_AIS_DD',\n riverty = 'riverty',\n paybybank_pix = 'paybybank_pix',\n /** Redirect */\n\n /** Klarna */\n klarna = 'klarna',\n klarna_account = 'klarna_account',\n klarna_paynow = 'klarna_paynow',\n klarna_b2b = 'klarna_b2b',\n /** Klarna */\n\n /** QRLoader */\n bcmc_mobile = 'bcmc_mobile',\n bcmc_mobile_QR = 'bcmc_mobile_QR',\n pix = 'pix',\n swish = 'swish',\n wechatpay = 'wechatpay',\n wechatpayQR = 'wechatpayQR',\n promptpay = 'promptpay',\n paynow = 'paynow',\n duitnow = 'duitnow',\n /** QRLoader */\n\n /** Await */\n blik = 'blik',\n mbway = 'mbway',\n ancv = 'ancv',\n payto = 'payto',\n upi = 'upi', // also QR\n upi_qr = 'upi_qr', // also QR\n upi_collect = 'upi_collect', // also QR\n upi_intent = 'upi_intent', // also QR\n /** Await */\n\n /** Giftcard */\n giftcard = 'giftcard',\n mealVoucher_FR = 'mealVoucher_FR',\n mealVoucher_FR_natixis = 'mealVoucher_FR_natixis',\n mealVoucher_FR_sodexo = 'mealVoucher_FR_sodexo',\n mealVoucher_FR_groupeup = 'mealVoucher_FR_groupeup'\n /** Giftcard */\n}\n","import { ComponentChild, h, render } from 'preact';\nimport getProp from '../../../utils/getProp';\nimport uuid from '../../../utils/uuid';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport { ANALYTICS_RENDERED_STR, NO_CHECKOUT_ATTEMPT_ID } from '../../../core/Analytics/constants';\n\nimport type { ICore } from '../../../core/types';\nimport type { BaseElementProps, IBaseElement } from './types';\nimport type { PaymentData } from '../../../types/global-types';\nimport { AnalyticsInitialEvent } from '../../../core/Analytics/types';\nimport { off, on } from '../../../utils/listenerUtils';\nimport { AnalyticsInfoEvent } from '../../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsEvent } from '../../../core/Analytics/AnalyticsEvent';\n\n/**\n * Verify if the first parameter is instance of Core.\n * We do not use 'instanceof' to avoid importing the Core class directly into this class.\n * @param checkout\n */\nfunction assertIsCoreInstance(checkout: ICore): checkout is ICore {\n if (!checkout) return false;\n const isCoreObject = typeof checkout.initialize === 'function' && typeof checkout.createFromAction === 'function';\n return isCoreObject;\n}\n\nabstract class BaseElement<P extends BaseElementProps> implements IBaseElement {\n public readonly _id = `${this.constructor['type']}-${uuid()}`;\n public readonly core: ICore;\n\n public props: P;\n public state: any = {};\n public _component;\n\n protected _node: HTMLElement = null;\n\n protected static defaultProps = {};\n\n constructor(checkout: ICore, props?: P) {\n const isCoreInstance = assertIsCoreInstance(checkout);\n\n if (!isCoreInstance) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n `Trying to initialise the component '${this.constructor['type']}' without a reference to an instance of AdyenCheckout`\n );\n }\n\n this.core = checkout;\n this.buildElementProps(props);\n\n this.handleKeyPress = this.handleKeyPress.bind(this);\n }\n\n protected buildElementProps(componentProps?: P) {\n this.props = this.formatProps({ ...this.constructor['defaultProps'], ...componentProps });\n }\n\n /**\n * Executed during creation of any payment element.\n * Gives a chance to any paymentMethod to format the props we're receiving.\n */\n protected formatProps(props: P) {\n return props;\n }\n\n /**\n * Executed on the `data` getter.\n * Returns the component data necessary for the /payments request\n */\n protected formatData(): any {\n return {};\n }\n\n /* eslint-disable-next-line */\n protected setUpAnalytics(setUpAnalyticsObj: AnalyticsInitialEvent) {\n return null;\n }\n\n /* eslint-disable-next-line */\n protected submitAnalytics(analyticsObj?: AnalyticsEvent) {\n return null;\n }\n\n /* eslint-disable-next-line */\n protected handleKeyPress(e: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) {\n return null;\n }\n\n protected setState(newState: object): void {\n this.state = { ...this.state, ...newState };\n }\n\n /**\n * Returns the component payment data ready to submit to the Checkout API\n * Note: this does not ensure validity, check isValid first\n */\n public get data(): PaymentData {\n const clientData = getProp(this.props, 'modules.risk.data');\n const checkoutAttemptId = getProp(this.props, 'modules.analytics.getCheckoutAttemptId')?.() ?? NO_CHECKOUT_ATTEMPT_ID; // NOTE: we never expect to see this \"failed\" value, but, just in case...\n const order = this.state.order || this.props.order;\n const componentData = this.formatData();\n\n if (componentData.paymentMethod && checkoutAttemptId) {\n componentData.paymentMethod.checkoutAttemptId = checkoutAttemptId;\n }\n\n return {\n ...(clientData && { riskData: { clientData } }),\n ...(order && { order: { orderData: order.orderData, pspReference: order.pspReference } }),\n ...componentData,\n clientStateDataIndicator: true\n };\n }\n\n /**\n * Method used to make the payment method active\n * (Useful when there are different payment methods available and activating one PM must trigger a specific task)\n */\n public activate(): void {\n return;\n }\n\n public render(): ComponentChild | Error {\n // render() not implemented in the element\n throw new Error('Payment method cannot be rendered.');\n }\n\n /**\n * Mounts an element into the dom\n * @param domNode - Node (or selector) where we will mount the payment element\n * @returns this - the payment element instance we mounted\n */\n public mount(domNode: HTMLElement | string): this {\n const node = typeof domNode === 'string' ? document.querySelector<HTMLElement>(domNode) : domNode;\n\n if (!node) {\n throw new Error('Component could not mount. Root node was not found.');\n }\n\n const setupAnalytics = !this._node;\n\n if (this._node) {\n this.unmount(); // new, if this._node exists then we are \"remounting\" so we first need to unmount if it's not already been done\n }\n\n this._node = node;\n\n // Add listener for key press events, notably 'Enter' key presses\n on(this._node, 'keypress', this.handleKeyPress, false);\n\n this._component = this.render();\n\n render(this._component, node);\n\n // Set up analytics (once, since this._node is currently undefined) now that we have mounted and rendered\n if (setupAnalytics) {\n if (this.props.modules && this.props.modules.analytics) {\n this.setUpAnalytics({\n containerWidth: node && node.offsetWidth,\n component: !this.props.isDropin ? (this.constructor['analyticsType'] ?? this.constructor['type']) : 'dropin',\n flavor: !this.props.isDropin ? 'components' : 'dropin'\n }).then(() => {\n // Once the initial analytics set up call has been made...\n // ...create an analytics event declaring that the component has been rendered\n // (The dropin will do this itself from DropinComponent once the PM list has rendered)\n if (!this.props.isDropin) {\n const event = new AnalyticsInfoEvent({ type: ANALYTICS_RENDERED_STR });\n this.submitAnalytics(event);\n }\n });\n }\n }\n\n return this;\n }\n\n /**\n * Updates props, resets the internal state and remounts the element.\n *\n * @param props - props to update\n * @returns this - the element instance\n */\n public update(props: Partial<P>): this {\n this.props = this.formatProps({ ...this.props, ...props });\n this.state = {};\n\n return this.unmount().mount(this._node); // for new mount fny\n }\n\n /**\n * Unmounts a payment element from the DOM\n */\n public unmount(): this {\n // Remove listener\n off(this._node, 'keypress', this.handleKeyPress);\n\n if (this._node) {\n render(null, this._node);\n }\n\n return this;\n }\n\n /**\n * Unmounts an element and removes it from the parent instance\n * For \"destroy\" type cleanup - when you don't intend to use the component again\n */\n public remove() {\n this.unmount();\n\n if (this.core) {\n this.core.remove(this);\n }\n }\n}\n\nexport default BaseElement;\n","import { UIElementStatus } from './types';\nimport { RawPaymentResponse, PaymentResponseData, Order } from '../../../types/global-types';\nimport { IDropin } from '../../Dropin/types';\n\nconst ALLOWED_PROPERTIES = ['action', 'resultCode', 'sessionData', 'order', 'sessionResult', 'donationToken', 'error'];\n\nexport function sanitizeResponse(response: RawPaymentResponse): PaymentResponseData {\n const removedProperties = [];\n\n const sanitizedObject = Object.keys(response).reduce((acc, cur) => {\n if (!ALLOWED_PROPERTIES.includes(cur)) {\n removedProperties.push(cur);\n } else {\n acc[cur] = response[cur];\n }\n return acc;\n }, {});\n\n if (removedProperties.length) console.warn(`The following properties should not be passed to the client: ${removedProperties.join(', ')}`);\n\n return sanitizedObject as PaymentResponseData;\n}\n\n/**\n * Remove not relevant properties in the final payment result object\n *\n * @param paymentResponse\n */\nexport function cleanupFinalResult(paymentResponse?: PaymentResponseData): void {\n if (!paymentResponse) return;\n\n delete paymentResponse.order;\n delete paymentResponse.action;\n if (!paymentResponse.donationToken || paymentResponse.donationToken.length === 0) {\n delete paymentResponse.donationToken;\n }\n}\n\nexport function resolveFinalResult(result: PaymentResponseData): [status: UIElementStatus, statusProps?: any] {\n switch (result.resultCode) {\n case 'Authorised':\n case 'Received':\n return ['success'];\n case 'Pending':\n return ['success'];\n case 'Cancelled':\n case 'Error':\n case 'Refused':\n return ['error'];\n default:\n }\n}\n\nexport function verifyPaymentDidNotFail(response: PaymentResponseData): Promise<PaymentResponseData> {\n if (['Cancelled', 'Error', 'Refused'].includes(response.resultCode)) {\n return Promise.reject(response);\n }\n\n return Promise.resolve(response);\n}\n\nexport function assertIsDropin(element: any): element is IDropin {\n if (!element) return false;\n\n const isDropin = typeof element.activePaymentMethod === 'object' && typeof element.closeActivePaymentMethod === 'function';\n return isDropin;\n}\n\nexport function getRegulatoryDefaults(countryCode: string, isDropin: boolean): Record<string, any> {\n switch (countryCode) {\n // Finnish regulations state that no payment method can be open by default\n case 'FI':\n return isDropin\n ? {\n openFirstPaymentMethod: false,\n openFirstStoredPaymentMethod: false\n }\n : {};\n default:\n return {};\n }\n}\n\nexport function sanitizeOrder(order: Order) {\n if (!order || !order.orderData || !order.pspReference) return null;\n return {\n orderData: order.orderData,\n pspReference: order.pspReference\n };\n}\n","class CancelError extends Error {\n constructor(message?: string) {\n super(message);\n }\n}\n\nexport default CancelError;\n","import { AnalyticsEvent } from './AnalyticsEvent';\nimport { ANALYTICS_EVENT } from './constants';\n\ntype AnalyticsLogEventObject = {\n type: string;\n message: string;\n subType?: string;\n result?: string;\n component?: string;\n target?: string; // is this ever used?\n};\n\nexport class AnalyticsLogEvent extends AnalyticsEvent {\n public type: string;\n public message?: string;\n public subType?: string;\n public result?: string;\n public target?: string; // is this ever used?\n\n constructor(analyticsObject: AnalyticsLogEventObject) {\n super();\n\n this.type = analyticsObject.type;\n this.message = analyticsObject.message;\n this.subType = analyticsObject.subType;\n this.result = analyticsObject.result;\n this.target = analyticsObject.target;\n this.component = analyticsObject.component;\n\n return this;\n }\n\n public getEventCategory(): string {\n return ANALYTICS_EVENT.log;\n }\n}\n","import { AnalyticsEvent } from './AnalyticsEvent';\nimport { ANALYTICS_EVENT } from './constants';\n\ntype AnalyticsErrorEventObject = {\n code: string;\n errorType: string;\n message?: string;\n component?: string;\n};\n\nexport class AnalyticsErrorEvent extends AnalyticsEvent {\n public code?: string;\n public errorType?: string;\n public message?: string;\n\n constructor(analyticsObject: AnalyticsErrorEventObject) {\n super();\n\n this.code = analyticsObject.code;\n this.errorType = analyticsObject.errorType;\n this.message = analyticsObject.message;\n this.component = analyticsObject.component;\n\n return this;\n }\n\n public getEventCategory(): string {\n return ANALYTICS_EVENT.error;\n }\n}\n","import { h } from 'preact';\nimport BaseElement from '../BaseElement/BaseElement';\nimport PayButton from '../PayButton';\nimport { assertIsDropin, cleanupFinalResult, getRegulatoryDefaults, sanitizeResponse, verifyPaymentDidNotFail } from './utils';\nimport AdyenCheckoutError, { NETWORK_ERROR } from '../../../core/Errors/AdyenCheckoutError';\nimport { hasOwnProperty } from '../../../utils/hasOwnProperty';\nimport { Resources } from '../../../core/Context/Resources';\nimport { ANALYTICS_ERROR_TYPE, ANALYTICS_SUBMIT_STR } from '../../../core/Analytics/constants';\n\nimport { AnalyticsInitialEvent } from '../../../core/Analytics/types';\nimport type { CoreConfiguration, ICore, AdditionalDetailsData } from '../../../core/types';\nimport type { ComponentMethodsRef, PayButtonFunctionProps, UIElementProps, UIElementStatus } from './types';\nimport type { CheckoutSessionDetailsResponse, CheckoutSessionPaymentResponse } from '../../../core/CheckoutSession/types';\nimport type {\n ActionHandledReturnObject,\n CheckoutAdvancedFlowResponse,\n Order,\n PaymentAction,\n PaymentAmount,\n PaymentData,\n PaymentMethod,\n PaymentMethodsResponse,\n PaymentResponseData\n} from '../../../types/global-types';\nimport type { IDropin } from '../../Dropin/types';\nimport type { NewableComponent } from '../../../core/core.registry';\nimport CancelError from '../../../core/Errors/CancelError';\n\nimport './UIElement.scss';\nimport { AnalyticsEvent } from '../../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsLogEvent } from '../../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsErrorEvent } from '../../../core/Analytics/AnalyticsErrorEvent';\n\nexport abstract class UIElement<P extends UIElementProps = UIElementProps> extends BaseElement<P> {\n protected componentRef: any;\n\n protected resources: Resources;\n\n public elementRef: UIElement;\n\n public static type = undefined;\n\n /**\n * Defines all txVariants that the Component supports (in case it support multiple ones besides the 'type' one)\n */\n public static txVariants: string[] = [];\n\n constructor(checkout: ICore, props?: P) {\n super(checkout, props);\n\n this.core.register(this.constructor as NewableComponent);\n\n this.submit = this.submit.bind(this);\n this.setState = this.setState.bind(this);\n this.onComplete = this.onComplete.bind(this);\n this.handleAction = this.handleAction.bind(this);\n this.handleOrder = this.handleOrder.bind(this);\n this.handleAdditionalDetails = this.handleAdditionalDetails.bind(this);\n this.handleResponse = this.handleResponse.bind(this);\n this.setElementStatus = this.setElementStatus.bind(this);\n this.submitAnalytics = this.submitAnalytics.bind(this);\n this.makePaymentsCall = this.makePaymentsCall.bind(this);\n this.makeAdditionalDetailsCall = this.makeAdditionalDetailsCall.bind(this);\n this.submitUsingSessionsFlow = this.submitUsingSessionsFlow.bind(this);\n\n this.elementRef = (props && props.elementRef) || this;\n this.resources = this.props.modules ? this.props.modules.resources : undefined;\n\n this.storeElementRefOnCore(this.props);\n\n this.onEnterKeyPressed = this.onEnterKeyPressed.bind(this);\n this.onActionHandled = this.onActionHandled.bind(this);\n }\n\n protected override buildElementProps(componentProps?: P) {\n const globalCoreProps = this.core.getCorePropsForComponent();\n const isStoredPaymentMethod = !!componentProps?.isStoredPaymentMethod;\n\n const paymentMethodFromResponse = isStoredPaymentMethod ? {} : this.getPaymentMethodFromPaymentMethodsResponse(componentProps?.type);\n\n const finalProps = {\n showPayButton: true,\n ...globalCoreProps,\n ...paymentMethodFromResponse,\n ...componentProps\n };\n\n const isDropin = assertIsDropin(this as unknown as IDropin);\n\n this.props = this.formatProps({\n ...this.constructor['defaultProps'], // component defaults\n ...getRegulatoryDefaults(this.core.options.countryCode, isDropin), // regulatory defaults\n ...finalProps // the rest (inc. merchant defined config)\n });\n }\n\n /**\n * Get the payment method from the paymentMethodsResponse\n *\n * @param type - The type of the payment method to get. (This prop is passed by Drop-in OR Standalone components containing the property 'type' as part of their configuration)\n */\n protected getPaymentMethodFromPaymentMethodsResponse(type?: string): PaymentMethod {\n return this.core.paymentMethodsResponse.find(type || this.constructor['type']);\n }\n\n protected storeElementRefOnCore(props?: P) {\n if (!props?.isDropin) {\n this.core.storeElementReference(this);\n }\n }\n\n public isAvailable(): Promise<void> {\n return Promise.resolve();\n }\n\n public setState(newState: object): void {\n this.state = { ...this.state, ...newState };\n this.onChange();\n }\n\n public showValidation(): this {\n if (this.componentRef && this.componentRef.showValidation) this.componentRef.showValidation();\n return this;\n }\n\n /**\n * elementRef is a ref to the subclass that extends UIElement e.g. Card.tsx\n */\n public setElementStatus(status: UIElementStatus, props?: any): this {\n this.elementRef?.setStatus(status, props);\n return this;\n }\n\n /**\n * componentRef is a ref to the primary component inside that subclass e.g. CardInput.tsx\n */\n public setStatus(status: UIElementStatus, props?): this {\n if (this.componentRef?.setStatus) {\n this.componentRef.setStatus(status, props);\n }\n return this;\n }\n\n protected onChange(): void {\n this.props.onChange?.(\n {\n data: this.data,\n isValid: this.isValid,\n errors: this.state.errors,\n valid: this.state.valid\n },\n this.elementRef\n );\n }\n\n // Only called once, for UIElements (including Dropin), as they are being mounted\n protected setUpAnalytics(setUpAnalyticsObj: AnalyticsInitialEvent) {\n const sessionId = this.props.session?.id;\n\n return this.props.modules.analytics.setUp({\n ...setUpAnalyticsObj,\n ...(sessionId && { sessionId })\n });\n }\n\n /**\n * A function for all UIElements, or BaseElement, to use to create an analytics action for when it's been:\n * - mounted,\n * - a PM has been selected\n * - onSubmit has been called (as a result of the pay button being pressed)\n *\n * In some other cases e.g. 3DS2 components, this function is overridden to allow more specific analytics actions to be created\n */\n\n protected submitAnalytics(analyticsObj: AnalyticsEvent) {\n try {\n analyticsObj.component = this.getComponent(analyticsObj);\n\n this.props.modules.analytics.sendAnalytics(analyticsObj);\n } catch (error) {\n console.warn('Failed to submit the analytics event. Error:', error);\n }\n }\n\n /** Work out what the component's \"type\" is:\n * - first check for a dedicated \"analyticsType\" (currently only applies to custom-cards)\n * - otherwise, distinguish cards from non-cards: cards will use their static type property, everything else will use props.type\n */\n private getComponent({ component }: AnalyticsEvent): string {\n if (component) {\n return component;\n }\n if (this.constructor['analyticsType']) {\n return this.constructor['analyticsType'];\n }\n if (this.constructor['type'] === 'scheme' || this.constructor['type'] === 'bcmc') {\n return this.constructor['type'];\n }\n return this.type;\n }\n\n public submit(): void {\n if (!this.isValid) {\n this.showValidation();\n return;\n }\n\n this.makePaymentsCall()\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.handleResponse)\n .catch((e: PaymentResponseData | Error) => {\n if (e instanceof CancelError) {\n this.setElementStatus('ready');\n return;\n }\n this.handleFailedResult(e as PaymentResponseData);\n });\n }\n\n protected makePaymentsCall(): Promise<CheckoutAdvancedFlowResponse | CheckoutSessionPaymentResponse> {\n this.setElementStatus('loading');\n\n if (this.props.onSubmit) {\n return this.submitUsingAdvancedFlow();\n }\n\n if (this.core.session) {\n const beforeSubmitEvent: Promise<PaymentData> = this.props.beforeSubmit\n ? new Promise((resolve, reject) =>\n this.props.beforeSubmit(this.data, this.elementRef, {\n resolve,\n reject: () => reject(new CancelError('beforeSubmitRejected'))\n })\n )\n : Promise.resolve(this.data);\n\n return beforeSubmitEvent.then(this.submitUsingSessionsFlow);\n }\n\n this.handleError(\n new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n 'It can not perform /payments call. Callback \"onSubmit\" is missing or Checkout session is not available'\n )\n );\n }\n\n private async submitUsingAdvancedFlow(): Promise<CheckoutAdvancedFlowResponse> {\n return new Promise<CheckoutAdvancedFlowResponse>((resolve, reject) => {\n // Call analytics endpoint\n const event = new AnalyticsLogEvent({\n type: ANALYTICS_SUBMIT_STR,\n message: 'Shopper clicked pay'\n });\n this.submitAnalytics(event);\n\n this.props.onSubmit(\n {\n data: this.data,\n isValid: this.isValid\n },\n this.elementRef,\n { resolve, reject }\n );\n });\n }\n\n private async submitUsingSessionsFlow(data: PaymentData): Promise<CheckoutSessionPaymentResponse> {\n const event = new AnalyticsLogEvent({\n type: ANALYTICS_SUBMIT_STR,\n message: 'Shopper clicked pay'\n });\n this.submitAnalytics(event);\n\n try {\n return await this.core.session.submitPayment(data);\n } catch (error: unknown) {\n if (error instanceof AdyenCheckoutError) {\n this.handleError(error);\n } else {\n this.handleError(new AdyenCheckoutError('ERROR', 'Error when making /payments call', { cause: error }));\n }\n\n return Promise.reject(error);\n }\n\n // // Uncomment to simulate failed\n // return {\n // resultCode: 'Refused',\n // sessionData:\n // 'Ab02b4c0!BQABAgBKGgqfEz8uQlU4yCIOWjA8bkEwmbJ7Qt4r+x5IPXREu1rMjwNk5MDoHFNlv+MWvinS6nXIDniXgRzXCdSC4ksw9CNDBAjOa+B88wRoj/rLTieuWh/0leR88qkV24vtIkjsIsbJTDB78Pd8wX8MEDsXhaAdEIyX9E8eqxuQ3bwPbvLs1Dlgo1ZrfkQRzaNiuVM8ejRG0IWE1bGThJzY+sJvZZHvlDMXIlxhZcDoQvsMj/WwE6+nFJxBiC3oRzmvVn3AbkLQGtvwq16UUSfYbPzG9dXypJMtcrZAQYq2g/2+BSibCcmee9AXq/wij11BERrYmjbDt5NkkdUnDVgAB7pdqbnWX0A2sxBKeYtLSP2kxp+5LoU/Wty3fmcVA3VKVkHfgmIihkeL8lY++5hvHjnkzOE4tyx/sheiKS4zqoWE43TD6n8mpFskAzwMHq4G2o6vkXqvaKFEq7y/R2fVrCypenmRhkPASizpM265rKLU+L4E/C+LMHfN0LYKRMCrLr0gI2GAp+1PZLHgh0tCtiJC/zcJJtJs6sHNQxLUN+kxJuELUHOcuL3ivjG+mWteUn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7rvAMzhzJgK62ltN2idqKxLC7WtivCUgejuQUvNreCYBQCaKwTwP02lZsJpGF9yw8gbyuoB+2aB7IZmgIB8GP4qVQ/ht5B9z/FLohK/8cSPV/4i32SNNdcwhV',\n // sessionResult:\n // 'X3XtfGC7!H4sIAAAAAAAA/6tWykxRslJyDjaxNDMyM3E2MXIyNDUys3RU0lHKTS1KzkjMK3FMTs4vzSsBKgtJLS7xhYo6Z6QmZ+eXlgAVFpcklpQWA+WLUtNKi1NTlGoBMEEbz1cAAAA=iMsCaEJ5LcnsqIUtmNxjm8HtfQ8gZW8JewEU3wHz4qg='\n // };\n }\n\n protected onComplete(state): void {\n if (this.props.onComplete) this.props.onComplete(state, this.elementRef);\n }\n\n protected handleError = (error: AdyenCheckoutError): void => {\n /**\n * Set status using elementRef, which:\n * - If Drop-in, will set status for Dropin component, and then it will propagate the new status for the active payment method component\n * - If Component, it will set its own status\n */\n this.setElementStatus('ready');\n\n if (error.name === NETWORK_ERROR && error.options.code) {\n const event = new AnalyticsErrorEvent({\n errorType: ANALYTICS_ERROR_TYPE.apiError,\n code: error.options.code\n });\n\n this.submitAnalytics(event);\n }\n\n if (this.props.onError) {\n this.props.onError(error, this.elementRef);\n }\n };\n\n protected handleAdditionalDetails(state: AdditionalDetailsData): void {\n this.makeAdditionalDetailsCall(state)\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.handleResponse)\n .catch(this.handleFailedResult);\n }\n\n private makeAdditionalDetailsCall(state: AdditionalDetailsData): Promise<CheckoutSessionDetailsResponse | CheckoutAdvancedFlowResponse> {\n if (this.props.onAdditionalDetails) {\n return new Promise<CheckoutAdvancedFlowResponse>((resolve, reject) => {\n this.props.onAdditionalDetails(state, this.elementRef, { resolve, reject });\n });\n }\n\n if (this.core.session) {\n return this.submitAdditionalDetailsUsingSessionsFlow(state.data);\n }\n\n this.handleError(\n new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n 'It can not perform /payments/details call. Callback \"onAdditionalDetails\" is missing or Checkout session is not available'\n )\n );\n }\n\n private async submitAdditionalDetailsUsingSessionsFlow(data: any): Promise<CheckoutSessionDetailsResponse> {\n try {\n return await this.core.session.submitDetails(data);\n } catch (error: unknown) {\n if (error instanceof AdyenCheckoutError) this.handleError(error);\n else this.handleError(new AdyenCheckoutError('ERROR', 'Error when making /details call', { cause: error }));\n\n return Promise.reject(error);\n }\n }\n\n public handleAction(action: PaymentAction, props = {}): UIElement | null {\n if (!action || !action.type) {\n if (hasOwnProperty(action, 'action') && hasOwnProperty(action, 'resultCode')) {\n throw new Error(\n 'handleAction::Invalid Action - the passed action object itself has an \"action\" property and ' +\n 'a \"resultCode\": have you passed in the whole response object by mistake?'\n );\n }\n throw new Error('handleAction::Invalid Action - the passed action object does not have a \"type\" property');\n }\n\n const paymentAction = this.core.createFromAction(action, {\n ...this.elementRef.props,\n ...props,\n onAdditionalDetails: this.handleAdditionalDetails\n });\n\n if (paymentAction) {\n this.unmount();\n return paymentAction.mount(this._node);\n }\n\n return null;\n }\n\n protected onActionHandled(actionHandledObj: ActionHandledReturnObject) {\n this.props?.onActionHandled?.({ originalAction: this.props.originalAction, ...actionHandledObj });\n }\n\n protected handleOrder = (response: PaymentResponseData): void => {\n const { order } = response;\n\n const updateCorePromise = this.core.session ? this.core.update({ order }) : this.handleAdvanceFlowPaymentMethodsUpdate(order);\n\n void updateCorePromise.then(() => {\n this.props.onOrderUpdated?.({ order });\n });\n };\n\n /**\n * Handles when the payment fails. The payment fails when:\n * - adv flow: the merchant rejects the payment due to a critical error\n * - adv flow: the merchant resolves the payment with a failed resultCode\n * - sessions: a network error occurs when making the payment\n * - sessions: the payment fails with a failed resultCode\n *\n * @param result\n */\n protected handleFailedResult = (result?: PaymentResponseData): void => {\n if (assertIsDropin(this.elementRef)) {\n this.elementRef.displayFinalAnimation('error');\n }\n\n cleanupFinalResult(result);\n this.props.onPaymentFailed?.(result, this.elementRef);\n };\n\n protected handleSuccessResult = (result: PaymentResponseData): void => {\n if (assertIsDropin(this.elementRef)) {\n this.elementRef.displayFinalAnimation('success');\n }\n\n cleanupFinalResult(result);\n this.props.onPaymentCompleted?.(result, this.elementRef);\n };\n\n /**\n * Handles a /payments or /payments/details response.\n * The component will handle automatically actions, orders, and final results.\n *\n * Expected to be called after sanitizeResponse has been run on the raw payment response\n *\n * @param response -\n */\n protected handleResponse(response: PaymentResponseData): void {\n if (response.action) {\n this.elementRef.handleAction(response.action);\n return;\n }\n\n if (response.order?.remainingAmount?.value > 0) {\n // we don't want to call elementRef here, use the component handler\n // we do this way so the logic on handlingOrder is associated with payment method\n this.handleOrder(response);\n return;\n }\n\n this.handleSuccessResult(response);\n }\n\n protected handleKeyPress(e: h.JSX.TargetedKeyboardEvent<HTMLInputElement> | KeyboardEvent) {\n if (e.key === 'Enter' || e.code === 'Enter') {\n e.preventDefault(); // Prevent <form> submission if Component is placed inside a form\n\n this.onEnterKeyPressed(document?.activeElement, this);\n }\n }\n\n /**\n * Handle Enter key pressed from a UIElement (called via handleKeyPress)\n * @param obj\n */\n protected onEnterKeyPressed(activeElement: Element, component: UIElement) {\n if (this.props.onEnterKeyPressed) {\n this.props.onEnterKeyPressed(activeElement, component);\n } else {\n (activeElement as HTMLElement).blur();\n this.submit();\n }\n }\n\n /**\n * Call update on parent instance\n * This function exist to make safe access to the protected _parentInstance\n * @param options - CoreOptions\n */\n public updateParent(options: CoreConfiguration = {}): Promise<ICore> {\n return this.elementRef.core.update(options);\n }\n\n public setComponentRef = (ref: ComponentMethodsRef) => {\n this.componentRef = ref;\n };\n\n /**\n * Get the current validation status of the element\n */\n public get isValid(): boolean {\n return false;\n }\n\n /**\n * Get the element icon URL for the current environment\n */\n public get icon(): string {\n const type = this.props.paymentMethodType || this.type;\n return this.props.icon ?? this.resources.getImage()(type);\n }\n\n /**\n * Get the element's displayable name\n */\n public get displayName(): string {\n const paymentMethodFromResponse = this.core.paymentMethodsResponse?.paymentMethods?.find(pm => pm.type === this.type);\n return this.props.name || paymentMethodFromResponse?.name || this.type;\n }\n\n /**\n * Get the element accessible name, used in the aria-label of the button that controls selected payment method\n */\n public get accessibleName(): string {\n return this.displayName;\n }\n\n /**\n * Used to display the second line of a payment method item\n */\n get additionalInfo(): string {\n return null;\n }\n\n /**\n * Return the type of an element\n */\n public get type(): string {\n return this.props.type || this.constructor['type'];\n }\n\n /**\n * Get the payButton component for the current element\n */\n protected payButton = (props: PayButtonFunctionProps) => {\n return <PayButton {...props} amount={this.props.amount} secondaryAmount={this.props.secondaryAmount} onClick={this.submit} />;\n };\n\n /**\n * Used in the Partial Orders flow.\n * When the Order is updated, the merchant can request new payment methods based on the new remaining amount\n *\n * @private\n */\n protected async handleAdvanceFlowPaymentMethodsUpdate(order: Order | null, amount?: PaymentAmount) {\n return new Promise<void | PaymentMethodsResponse>((resolve, reject) => {\n if (!this.props.onPaymentMethodsRequest) {\n return resolve();\n }\n\n this.props.onPaymentMethodsRequest(\n {\n ...(order && {\n order: {\n orderData: order.orderData,\n pspReference: order.pspReference\n }\n }),\n locale: this.core.options.locale\n },\n { resolve, reject }\n );\n })\n .catch(error => {\n this.handleError(\n new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n 'Something failed during payment methods update or onPaymentMethodsRequest was not implemented',\n {\n cause: error\n }\n )\n );\n })\n .then(paymentMethodsResponse => {\n // in the case of the session flow we get order, amount, countryCode and shopperLocale from initialize()\n // apply the same logic here for order and amount\n // in the future it might be worth moving this logic to be performed by the core on update()\n // it would make this more consistent\n return this.core.update({\n ...(paymentMethodsResponse && { paymentMethodsResponse }),\n order,\n amount: order ? order.remainingAmount : amount\n });\n });\n }\n}\n\nexport default UIElement;\n","import { h } from 'preact';\nimport { useState, useEffect, useRef, useMemo } from 'preact/hooks';\nimport Language from '../../../language/Language';\nimport SecuredFieldsProvider from '../../internal/SecuredFields/SFP/SecuredFieldsProvider';\nimport { SFPState } from '../../internal/SecuredFields/SFP/types';\nimport { BinLookupResponse, CardBrandsConfiguration, CardPlaceholders } from '../../Card/types';\nimport SFExtensions from '../../internal/SecuredFields/binLookup/extensions';\nimport { StylesObject } from '../../internal/SecuredFields/lib/types';\nimport { Resources } from '../../../core/Context/Resources';\nimport { SFError } from '../../Card/components/CardInput/types';\nimport { ValidationError } from '../types';\n\ninterface SecuredFieldsProps {\n autoFocus?: boolean;\n brand?: string;\n brands?: string[];\n brandsConfiguration?: CardBrandsConfiguration;\n clientKey?: string;\n countryCode?: string;\n forceCompat?: boolean;\n i18n: Language;\n implementationType?: string;\n keypadFix?: boolean;\n loadingContext?: string;\n legacyInputMode?: boolean;\n minimumExpiryDate?: string;\n onAdditionalSFConfig?: () => {};\n onAdditionalSFRemoved?: () => {};\n onAllValid?: () => {};\n onAutoComplete?: () => {};\n onBinValue?: () => {};\n onBrand?: () => {};\n onConfigSuccess?: () => {};\n onChange: (data) => void;\n handleKeyPress?: (obj: KeyboardEvent) => void;\n onError?: () => {};\n onFieldValid?: () => {};\n onFocus?: (e) => {};\n onLoad?: () => {};\n placeholders?: CardPlaceholders;\n rootNode: HTMLElement;\n resources: Resources;\n showWarnings?: boolean;\n styles?: StylesObject;\n trimTrailingSeparator?: boolean;\n type: string;\n maskSecurityCode?: boolean;\n}\n\nconst defaultProps = {\n onChange: () => {},\n onError: () => {},\n onValidationError: () => {}\n};\n\nfunction CustomCardInput(props: SecuredFieldsProps) {\n const sfp = useRef(null);\n\n const [errors, setErrors] = useState({});\n const [valid, setValid] = useState({});\n const [data, setData] = useState({});\n\n const [isSfpValid, setIsSfpValid] = useState(false);\n\n const [issuingCountryCode, setIssuingCountryCode] = useState(null);\n\n const [dualBrandSelectElements, setDualBrandSelectElements] = useState([]);\n const [selectedBrandValue, setSelectedBrandValue] = useState('');\n\n const handleSecuredFieldsChange = (sfState: SFPState): void => {\n setData({ ...data, ...sfState.data });\n setErrors({ ...errors, ...sfState.errors });\n setValid({ ...valid, ...sfState.valid });\n\n setIsSfpValid(sfState.isSfpValid);\n };\n\n // Farm the handlers for binLookup related functionality out to another 'extensions' file\n const extensions = useMemo(\n () =>\n SFExtensions(\n props,\n { sfp },\n { dualBrandSelectElements, setDualBrandSelectElements, setSelectedBrandValue, issuingCountryCode, setIssuingCountryCode }\n ),\n [dualBrandSelectElements, issuingCountryCode]\n );\n\n /**\n * EXPECTED METHODS ON SecuredFields.this\n */\n this.processBinLookupResponse = (binLookupResponse: BinLookupResponse, isReset: boolean) => {\n extensions.processBinLookup(binLookupResponse, isReset);\n };\n\n this.dualBrandingChangeHandler = extensions.handleDualBrandSelection;\n\n /**\n * EFFECT HOOKS\n */\n useEffect(() => {\n // componentDidMount\n this.setFocusOn = sfp.current.setFocusOn;\n this.updateStyles = sfp.current.updateStyles;\n this.showValidation = sfp.current.showValidation;\n this.handleUnsupportedCard = sfp.current.handleUnsupportedCard;\n\n // componentWillUnmount\n return () => {\n sfp.current.destroy();\n };\n }, []);\n\n /**\n * Main 'componentDidUpdate' handler\n */\n useEffect(() => {\n const sfStateErrorsObj = sfp.current.mapErrorsToValidationRuleResult();\n\n const mappedErrors = { ...errors, ...sfStateErrorsObj }; // maps sfErrors\n\n props.onChange({\n data,\n valid,\n errors: mappedErrors,\n isValid: isSfpValid,\n selectedBrandValue\n });\n\n // Create an array of Validation error objects and send to callback\n if (Object.keys(mappedErrors).length) {\n const validationErrors: ValidationError[] = Object.entries(mappedErrors).map(([fieldType, error]) => {\n const valErr: ValidationError = {\n fieldType,\n ...(error ? (error as SFError) : { error: '', rootNode: this.props.rootNode })\n };\n return valErr;\n });\n this.props.onValidationError?.(validationErrors);\n }\n }, [data, valid, errors, selectedBrandValue]);\n\n /**\n * RENDER\n */\n // prettier-ignore\n return (\n <SecuredFieldsProvider\n ref={sfp}\n {...extractPropsForSFP(props)}\n type={props.brand}\n onChange={handleSecuredFieldsChange}\n render={() => null}\n />\n );\n}\n\nCustomCardInput.defaultProps = defaultProps;\n\nexport default CustomCardInput;\n\nconst extractPropsForSFP = (props: SecuredFieldsProps) => {\n return {\n autoFocus: props.autoFocus,\n brands: props.brands,\n brandsConfiguration: props.brandsConfiguration,\n clientKey: props.clientKey,\n forceCompat: props.forceCompat,\n // countryCode: props.countryCode, // only used for korean cards when koreanAuthenticationRequired is true\n i18n: props.i18n,\n implementationType: props.implementationType,\n keypadFix: props.keypadFix,\n legacyInputMode: props.legacyInputMode,\n loadingContext: props.loadingContext,\n minimumExpiryDate: props.minimumExpiryDate,\n onAdditionalSFConfig: props.onAdditionalSFConfig,\n onAdditionalSFRemoved: props.onAdditionalSFRemoved,\n onAllValid: props.onAllValid,\n onAutoComplete: props.onAutoComplete,\n onBinValue: props.onBinValue,\n onBrand: props.onBrand,\n // onChange // set directly\n onConfigSuccess: props.onConfigSuccess,\n handleKeyPress: props.handleKeyPress,\n onError: props.onError,\n onFieldValid: props.onFieldValid,\n onFocus: props.onFocus,\n onLoad: props.onLoad,\n // render // set directly\n rootNode: props.rootNode,\n showWarnings: props.showWarnings,\n styles: props.styles,\n trimTrailingSeparator: props.trimTrailingSeparator,\n resources: props.resources,\n maskSecurityCode: props.maskSecurityCode,\n placeholders: props.placeholders\n };\n};\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement';\nimport CustomCardInput from './CustomCardInput';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport triggerBinLookUp from '../internal/SecuredFields/binLookup/triggerBinLookUp';\nimport { CardBinLookupData, CardFocusData } from '../internal/SecuredFields/lib/types';\nimport { BrandObject } from '../Card/types';\nimport { getCardImageUrl, fieldTypeToSnakeCase } from '../internal/SecuredFields/utils';\nimport { TxVariants } from '../tx-variants';\nimport { CustomCardConfiguration } from './types';\nimport { ANALYTICS_FOCUS_STR, ANALYTICS_UNFOCUS_STR } from '../../core/Analytics/constants';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\n\nexport class CustomCard extends UIElement<CustomCardConfiguration> {\n public static type = TxVariants.customCard;\n\n public static analyticsType = 'custom-scheme';\n\n protected static defaultProps = {\n onBinLookup: () => {},\n brandsConfiguration: {}\n };\n\n private brand = TxVariants.card;\n\n formatProps(props: CustomCardConfiguration) {\n return {\n ...props,\n type: TxVariants.customCard\n };\n }\n\n /**\n * Formats the component data output\n */\n formatData() {\n const sfBrand = this.state.selectedBrandValue;\n return {\n paymentMethod: {\n type: 'scheme',\n ...this.state.data,\n ...(sfBrand && { brand: sfBrand })\n },\n browserInfo: this.browserInfo,\n origin: !!window && window.location.origin\n };\n }\n\n updateStyles(stylesObj) {\n if (this.componentRef?.updateStyles) this.componentRef.updateStyles(stylesObj);\n return this;\n }\n\n setFocusOn(frame) {\n if (this.componentRef?.setFocusOn) this.componentRef.setFocusOn(frame);\n return this;\n }\n\n processBinLookupResponse(binLookupResponse) {\n if (this.componentRef?.processBinLookupResponse) this.componentRef.processBinLookupResponse(binLookupResponse);\n return this;\n }\n\n dualBrandingChangeHandler(e: Event | string) {\n if (this.componentRef?.dualBrandingChangeHandler) this.componentRef.dualBrandingChangeHandler(e);\n return this;\n }\n\n handleUnsupportedCard(errObj) {\n if (this.componentRef?.handleUnsupportedCard) this.componentRef.handleUnsupportedCard(errObj);\n return this;\n }\n\n onBinLookup(obj: CardBinLookupData) {\n const nuObj = { ...obj };\n nuObj.rootNode = this._node;\n\n if (!nuObj.isReset) {\n // Add brandImage urls, first checking if the merchant has configured their own one for the brand\n nuObj.supportedBrandsRaw = obj.supportedBrandsRaw?.map((item: BrandObject) => {\n item.brandImageUrl = this.props.brandsConfiguration[item.brand]?.icon ?? getCardImageUrl(item.brand, this.resources);\n return item;\n });\n }\n\n this.props.onBinLookup(nuObj);\n }\n\n public onBinValue = triggerBinLookUp(this);\n\n get isValid() {\n return !!this.state.isValid;\n }\n\n get browserInfo() {\n return collectBrowserInfo();\n }\n\n private onFocus = (obj: CardFocusData) => {\n const event = new AnalyticsInfoEvent({\n type: obj.focus === true ? ANALYTICS_FOCUS_STR : ANALYTICS_UNFOCUS_STR,\n target: fieldTypeToSnakeCase(obj.fieldType)\n });\n\n this.submitAnalytics(event);\n\n // Call merchant defined callback\n this.props.onFocus?.(obj);\n };\n\n protected onEnterKeyPressed = (activeElement: Element, component: UIElement) => {\n this.props.onEnterKeyPressed?.(activeElement, component);\n };\n\n render() {\n return (\n <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n <CustomCardInput\n ref={ref => {\n this.componentRef = ref;\n }}\n {...this.props}\n {...this.state}\n handleKeyPress={this.handleKeyPress}\n rootNode={this._node}\n onChange={this.setState}\n onBinValue={this.onBinValue}\n implementationType={'custom'}\n resources={this.resources}\n brand={this.brand}\n onFocus={this.onFocus}\n />\n </CoreProvider>\n );\n }\n}\n\nexport default CustomCard;\n","import { Component, h } from 'preact';\nimport classNames from 'classnames';\n\ninterface ThreeDS2FormProps {\n name: string;\n action: string;\n target: string;\n inputName: string;\n inputValue: string;\n onFormSubmit: (msg: string) => void;\n}\n\nexport default class ThreeDS2Form extends Component<ThreeDS2FormProps> {\n protected formEl;\n\n componentDidMount() {\n this.formEl.submit();\n this.props.onFormSubmit(`${this.props.inputName} sent`);\n }\n\n render({ name, action, target, inputName, inputValue }) {\n return (\n <form\n ref={ref => {\n this.formEl = ref;\n }}\n method=\"POST\"\n className={classNames(['adyen-checkout__threeds2__form', `adyen-checkout__threeds2__form--${name}`])}\n name={name}\n action={action}\n target={target}\n style={{ display: 'none' }}\n >\n <input name={inputName} value={inputValue} />\n </form>\n );\n }\n}\n","/**\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","/**\n * Used to retrieve the origin from a url\n *\n * @remarks\n * Uses a regex to get origin (can't handle localhost origins)\n *\n * @param url - URL\n * @returns The origin of the url\n */\nexport const getOrigin = (url: string): string => {\n const originRegex = /^(?:([A-Za-z]+):)?(\\/{0,3})([0-9.\\-A-Za-z]+)(?::(\\d+))?(?:\\/([^?#]*))?(?:\\?([^#]*))?(?:#(.*))?$/;\n const matches = originRegex.exec(url);\n\n if (!matches) return null;\n\n const [, protocol, separator, host, port] = matches;\n\n if (!protocol || !separator || !host) return null;\n\n return `${protocol}:${separator}${host}${port ? `:${port}` : ''}`;\n};\n\nexport default getOrigin;\n","import { DecodeObject } from '../types/global-types';\n\nexport const NOT_BASE64_ERROR = 'not base64';\nexport const BASE64_MALFORMED_URI_ERROR = 'malformed URI sequence';\n\nconst b64DecodeUnicode = str =>\n /**\n * The \"Unicode Problem\" Since DOMStrings are 16-bit-encoded strings:\n * In most browsers calling window.btoa on a Unicode string will cause\n * a Character Out Of Range exception if a character exceeds the range\n * of a 8-bit ASCII-encoded character.\n * This method solves the problem\n */\n decodeURIComponent(Array.prototype.map.call(window.atob(str), c => `%${`00${c.charCodeAt(0).toString(16)}`.slice(-2)}`).join(''));\n\n/**\n * @internal\n */\nconst base64 = {\n decode: (pData: string): DecodeObject => {\n if (!base64.isBase64(pData)) {\n return {\n success: false,\n error: NOT_BASE64_ERROR\n };\n }\n\n try {\n const data = b64DecodeUnicode(pData);\n return {\n success: true,\n data\n };\n } catch (e) {\n return {\n success: false,\n error: BASE64_MALFORMED_URI_ERROR\n };\n }\n },\n\n encode: (pData: string) => window.btoa(pData),\n\n isBase64: pDataStr => {\n if (!pDataStr) {\n return false;\n }\n\n if (pDataStr.length % 4) {\n return false;\n }\n\n try {\n return window.btoa(window.atob(pDataStr)) === pDataStr;\n } catch (e) {\n return false;\n }\n }\n};\n\nexport default base64;\n","import { CHALLENGE_WINDOW_SIZES, DEFAULT_CHALLENGE_WINDOW_SIZE } from '../constants';\nimport { getOrigin } from '../../../utils/getOrigin';\nimport base64 from '../../../utils/base64';\nimport { ChallengeData, ThreeDS2Token, FingerPrintData, ResultObject, FingerprintResolveData, ChallengeResolveData } from '../types';\nimport { pick } from '../../../utils/commonUtils';\nimport { DecodeObject } from '../../../types/global-types';\nimport { ErrorObject } from '../../../core/Errors/types';\n\n/**\n * Check if we have been passed an ErrorObject because either base64 decoding or JSON.parse failed\n * @param obj -\n */\nexport const isErrorObject = (obj: ErrorObject | ThreeDS2Token): boolean => {\n return 'success' in obj && !obj.success;\n};\n\nexport const decodeAndParseToken = (token: string): ThreeDS2Token | ErrorObject => {\n const decodedToken: DecodeObject = base64.decode(token);\n if (decodedToken.success) {\n try {\n return JSON.parse(decodedToken.data) as ThreeDS2Token;\n } catch (e) {\n return {\n success: false,\n error: 'Could not JSON parse token'\n };\n }\n }\n\n // base64.decode failed - object will contain error msg: 'not base64' or 'malformed URI sequence'\n return decodedToken as ErrorObject;\n};\n\n/**\n * Performs JSON.stringify on passed object & and base64 encodes result\n * @param obj -\n * @returns encoded result\n */\nexport const encodeObject = obj => {\n if (!obj || !Object.keys(obj).length) {\n throw new Error('No (populated) data object to encode');\n }\n return base64.encode(JSON.stringify(obj));\n};\n\n/**\n * Accepts a size string for the challenge window & returns it if it is valid else returns a default value\n * @param sizeStr - the size string to check the validity of\n * @returns a valid size string\n */\nexport const validateChallengeWindowSize = (sizeStr: string): string => {\n const sizeString = sizeStr.length === 1 ? `0${sizeStr}` : sizeStr;\n const hasSize = Object.prototype.hasOwnProperty.call(CHALLENGE_WINDOW_SIZES, sizeString);\n return hasSize ? sizeString : DEFAULT_CHALLENGE_WINDOW_SIZE;\n};\n\n/**\n * Accepts a size string for the challenge window & returns the corresponding array of w/h values\n * @param sizeStr -\n */\nexport const getChallengeWindowSize = (sizeStr: string): string[] => CHALLENGE_WINDOW_SIZES[validateChallengeWindowSize(sizeStr)];\n\n/**\n * prepareChallengeData\n *\n * Requires an object containing the challenge parameters:\n * @param token - challengeToken string received from /submitThreeDS2Fingerprint, /details or /payments call: contains acsTransID, acsURL, messageVersion,\n * threeDSNotificationURL and threeDSServerTransID\n * @param size - one of five possible challenge window sizes\n */\nexport const prepareChallengeData = ({ token, size }): ChallengeData | ErrorObject => {\n const decodedChallengeToken = decodeAndParseToken(token);\n\n if (isErrorObject(decodedChallengeToken)) {\n return decodedChallengeToken as ErrorObject;\n }\n\n const { acsTransID, acsURL, messageVersion, threeDSNotificationURL, threeDSServerTransID } = decodedChallengeToken as ThreeDS2Token;\n const notificationURLOrigin = getOrigin(threeDSNotificationURL);\n\n return {\n acsURL,\n cReqData: {\n acsTransID,\n messageVersion,\n threeDSServerTransID,\n messageType: 'CReq',\n challengeWindowSize: validateChallengeWindowSize(size)\n },\n iframeSizeArr: getChallengeWindowSize(size),\n postMessageDomain: notificationURLOrigin\n } as ChallengeData;\n};\n\n/**\n * prepareFingerPrintData\n *\n * Requires an object containing the fingerprint parameters:\n * @param token - fingerprintToken string received from /payments call: contains threeDSMethodNotificationURL, threeDSMethodUrl and\n * threeDSServerTransID\n * @param notificationURL - the URL that the final notification is expected to be postMessaged from.\n *\n * NOTE: we don't expect merchants to alter the default by passing in a notificationURL of their own via props;\n * and if 3DS2 is being done via createFromAction or handleAction we won't accept it.\n * But if the merchant is using checkout.create('threeDS2DeviceFingerprint') we still support the fact that they might want to set their own\n * notificationURL (aka threeDSMethodNotificationURL)\n */\nexport const prepareFingerPrintData = ({ token, notificationURL }): FingerPrintData | ErrorObject => {\n const decodedFingerPrintToken = decodeAndParseToken(token);\n\n if (isErrorObject(decodedFingerPrintToken)) {\n return decodedFingerPrintToken as ErrorObject;\n }\n\n const { threeDSMethodNotificationURL, threeDSMethodUrl: threeDSMethodURL, threeDSServerTransID } = decodedFingerPrintToken as ThreeDS2Token;\n const receivedNotificationURL = notificationURL || threeDSMethodNotificationURL;\n const notificationURLOrigin = getOrigin(receivedNotificationURL);\n\n return {\n threeDSServerTransID,\n threeDSMethodURL,\n threeDSMethodNotificationURL: receivedNotificationURL,\n postMessageDomain: notificationURLOrigin\n } as FingerPrintData;\n};\n\nexport const createFingerprintResolveData = (dataKey: string, resultObj: ResultObject, paymentData: string): FingerprintResolveData => ({\n data: {\n [dataKey]: encodeObject({ threeDSCompInd: resultObj.threeDSCompInd }),\n paymentData\n }\n});\n\n// Old 3DS2 flow\nexport const createOldFingerprintResolveData = (dataKey: string, resultObj: ResultObject, paymentData: string): any => ({\n data: {\n details: { 'threeds2.fingerprint': encodeObject(resultObj) },\n paymentData\n }\n});\n\nexport const createChallengeResolveData = (dataKey: string, transStatus: string, authorisationToken: string): ChallengeResolveData => ({\n data: {\n details: { [dataKey]: encodeObject({ transStatus, authorisationToken }) }\n }\n});\n\n// Needed for old 3DS2 flow & threeds2InMDFlow\nexport const createOldChallengeResolveData = (dataKey: string, transStatus: string, authorisationToken: string): any => ({\n data: {\n details: { 'threeds2.challengeResult': encodeObject({ transStatus }) },\n paymentData: authorisationToken\n }\n});\n\n/**\n *\n * Takes a string and encodes it as a base64url string\n * (https://en.wikipedia.org/wiki/Base64#URL_applications)\n * (See also https://tools.ietf.org/html/rfc7515)\n *\n * @example\n * ```\n * const jsonStr = JSON.stringify( {name:'john', surname:'smith'} );\n * const base64url = encodeBase64URL(jsonStr);\n * ```\n *\n * @param dataStr - data, as a string, to be encoded\n *\n * @returns base64URL - a base64url encoded string\n */\nexport const encodeBase64URL = (dataStr: string): string => {\n const base64Data = window.btoa(dataStr);\n let base64url = base64Data.split('=')[0]; // Remove any trailing '='s\n\n base64url = base64url.replace(/\\+/g, '-'); // 62nd char of encoding\n base64url = base64url.replace(/\\//g, '_'); // 63rd char of encoding\n\n return base64url;\n};\n\nconst fingerprintFlowPropsDropin = ['elementRef'];\n\n/**\n * Must contain all props needed for the challenge stage since, in the new 3DS2 flow, the fingerprint component will be the \"component\" reference\n * if the /submitThreeDS2Fingerprint response dictates we \"handleAction\" to create a challenge\n */\nconst fingerprintFlowProps = ['createFromAction', 'onAdditionalDetails'];\n\n/**\n * Add props specifically needed for the type of 3DS2 flow: fingerprint or challenge\n *\n * @param actionSubtype - 3DS2 flow type: fingerprint or challenge\n * @param props - object from which to extract particular properties\n */\nexport const get3DS2FlowProps = (actionSubtype, props) => {\n if (actionSubtype === 'fingerprint') {\n // elementRef exists when the fingerprint component is created from the Dropin\n const fingerprintProps = props.elementRef ? fingerprintFlowPropsDropin : fingerprintFlowProps;\n const rtnObj = pick(fingerprintProps).from(props);\n rtnObj.showSpinner = !props.isDropin;\n rtnObj.statusType = 'loading';\n return rtnObj;\n }\n\n // Challenge\n return {\n statusType: 'custom',\n i18n: props.i18n\n };\n};\n","/**\n * Tests if a passed promise settles before a certain amount of time has elapsed\n *\n * @param ms - number of milliseconds the passed promise has to settle\n * @param promise - the passed promise\n * @param timeOutObject - the object that the promiseTimeout will reject with if the passed promise doesn't settle in time\n */\nconst promiseTimeout = (ms: number, promise: Promise<any>, timeOutObject: object) => {\n let timer;\n\n const promiseTimer: Promise<any> = new Promise((resolve, reject): void => {\n // Create a timeout to reject promise if not resolved\n timer = setTimeout((): void => {\n reject(timeOutObject);\n }, ms);\n\n promise\n .then((res): void => {\n clearTimeout(timer);\n resolve(res);\n })\n .catch((err): void => {\n clearTimeout(timer);\n reject(err);\n });\n });\n\n const cancelTimer = (): void => {\n clearTimeout(timer);\n };\n\n return {\n promise: promiseTimer,\n cancel: cancelTimer\n };\n};\n\nexport default promiseTimeout;\n","import { Component, h } from 'preact';\nimport classNames from 'classnames';\nimport Iframe from '../../../internal/IFrame';\nimport Spinner from '../../../internal/Spinner';\nimport ThreeDS2Form from '../Form';\nimport getProcessMessageHandler from '../../../../utils/get-process-message-handler';\nimport { encodeBase64URL } from '../utils';\nimport promiseTimeout from '../../../../utils/promiseTimeout';\nimport { CHALLENGE_TIMEOUT, CHALLENGE_TIMEOUT_REJECT_OBJECT, THREEDS2_NUM } from '../../constants';\nimport { DoChallenge3DS2Props, DoChallenge3DS2State } from './types';\nimport { ThreeDS2FlowObject } from '../../types';\n\nconst iframeName = 'threeDSIframe';\n\nclass DoChallenge3DS2 extends Component<DoChallenge3DS2Props, DoChallenge3DS2State> {\n private processMessageHandler;\n private challengePromise: { cancel: () => void; promise: Promise<any> };\n\n constructor(props) {\n super(props);\n\n /**\n * Create and Base64Url encode a JSON object containing the serverTransactionID & threeDSMethodNotificationURL\n */\n const jsonStr = JSON.stringify(this.props.cReqData);\n const base64URLencodedData = encodeBase64URL(jsonStr);\n this.state = { base64URLencodedData, status: 'init' };\n }\n\n private iframeCallback = () => {\n this.setState({ status: 'iframeLoaded' });\n // On Test - actually calls-back 3 times: once for challenge screen, once again as challenge.html reloads after the challenge is submitted, and once for redirect to threeDSNotificationURL.\n // But for the purposes of calling the merchant defined onActionHandled callback - we only want to do it once\n if (this.state.status === 'init') {\n this.props.onActionHandled?.({ componentType: '3DS2Challenge', actionDescription: `${THREEDS2_NUM} challenge iframe loaded` });\n }\n };\n\n private get3DS2ChallengePromise(): Promise<any> {\n return new Promise((resolve, reject) => {\n /**\n * Listen for postMessage responses from the notification url\n */\n this.processMessageHandler = getProcessMessageHandler(this.props.postMessageDomain, resolve, reject, 'challengeResult');\n\n window.addEventListener('message', this.processMessageHandler);\n });\n }\n\n componentDidMount() {\n // Render challenge\n this.challengePromise = promiseTimeout(CHALLENGE_TIMEOUT, this.get3DS2ChallengePromise(), CHALLENGE_TIMEOUT_REJECT_OBJECT);\n this.challengePromise.promise\n .then((resolveObject: ThreeDS2FlowObject) => {\n window.removeEventListener('message', this.processMessageHandler);\n this.props.onCompleteChallenge(resolveObject);\n })\n /** Catch, for when Challenge times-out */\n .catch((rejectObject: ThreeDS2FlowObject) => {\n window.removeEventListener('message', this.processMessageHandler);\n this.props.onErrorChallenge(rejectObject);\n });\n }\n\n componentWillUnmount() {\n if (this.challengePromise) this.challengePromise.cancel();\n window.removeEventListener('message', this.processMessageHandler);\n }\n\n render({ acsURL, cReqData, iframeSizeArr, onFormSubmit }, { base64URLencodedData, status }) {\n const [width, height] = iframeSizeArr;\n\n return (\n <div\n className={classNames([\n 'adyen-checkout__threeds2__challenge',\n `adyen-checkout__threeds2__challenge--${cReqData.challengeWindowSize}`\n ])}\n >\n {status !== 'iframeLoaded' && <Spinner />}\n\n <Iframe name={iframeName} width={width} height={height} callback={this.iframeCallback} />\n <ThreeDS2Form\n name={'cReqForm'}\n action={acsURL}\n target={iframeName}\n inputName={'creq'}\n inputValue={base64URLencodedData}\n onFormSubmit={onFormSubmit}\n />\n </div>\n );\n }\n}\n\nexport default DoChallenge3DS2;\n","import { Component, h } from 'preact';\nimport DoChallenge3DS2 from './DoChallenge3DS2';\nimport { createChallengeResolveData, prepareChallengeData, createOldChallengeResolveData, isErrorObject } from '../utils';\nimport { PrepareChallenge3DS2Props, PrepareChallenge3DS2State, StatusErrorInfoObject } from './types';\nimport { ChallengeData, ResultObject, ThreeDS2FlowObject, ErrorCodeObject } from '../../types';\nimport '../../ThreeDS2.scss';\nimport Img from '../../../internal/Img';\nimport './challenge.scss';\nimport { hasOwnProperty } from '../../../../utils/hasOwnProperty';\nimport useImage from '../../../../core/Context/useImage';\nimport AdyenCheckoutError, { ERROR } from '../../../../core/Errors/AdyenCheckoutError';\nimport { THREEDS2_CHALLENGE, THREEDS2_CHALLENGE_ERROR, THREEDS2_FULL, THREEDS2_NUM, MISSING_TOKEN_IN_ACTION_MSG } from '../../constants';\nimport { isValidHttpUrl } from '../../../../utils/isValidURL';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors, Analytics3DS2Events } from '../../../../core/Analytics/constants';\nimport { ErrorObject } from '../../../../core/Errors/types';\nimport { AnalyticsLogEvent } from '../../../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsErrorEvent } from '../../../../core/Analytics/AnalyticsErrorEvent';\nimport { AnalyticsEvent } from '../../../../core/Analytics/AnalyticsEvent';\n\nclass PrepareChallenge3DS2 extends Component<PrepareChallenge3DS2Props, PrepareChallenge3DS2State> {\n public static defaultProps = {\n onComplete: () => {},\n onError: () => {},\n isMDFlow: false\n };\n\n constructor(props) {\n super(props);\n\n if (this.props.token) {\n const challengeData: ChallengeData | ErrorObject = prepareChallengeData({\n token: this.props.token,\n size: this.props.challengeWindowSize || this.props.size // TODO confirm that this.props.size is legacy and can be removed\n });\n\n this.state = {\n status: 'init',\n challengeData: challengeData as ChallengeData\n };\n } else {\n // Will be picked up in componentDidMount\n this.state = { challengeData: { success: false, error: MISSING_TOKEN_IN_ACTION_MSG } };\n\n console.debug(`${THREEDS2_CHALLENGE_ERROR}: ${MISSING_TOKEN_IN_ACTION_MSG}`);\n }\n }\n\n public onFormSubmit = (msg: string) => {\n const event = new AnalyticsLogEvent({\n type: THREEDS2_FULL,\n message: msg,\n subType: Analytics3DS2Events.CHALLENGE_DATA_SENT\n });\n\n this.props.onSubmitAnalytics(event);\n };\n\n componentDidMount() {\n const hasChallengeData = !isErrorObject(this.state.challengeData);\n\n if (hasChallengeData) {\n const shouldAllowHttpDomains =\n /** Allow http urls if in development and testing against localhost:8080 */\n (process.env.NODE_ENV === 'development' && process.env.__CLIENT_ENV__?.indexOf('localhost:8080') > -1) ||\n /**\n * Allows the checkoutshopper demo on localhost:8080 to work -\n * requires a configuration in localhost of environment: 'test', _environmentUrls: {api: 'http://localhost:8080/'}\n */\n (this.props.environment === 'test' && this.props._environmentUrls?.api?.includes('http://localhost:8080'));\n\n /**\n * Check the structure of the created challengeData\n */\n const { acsURL } = this.state.challengeData as ChallengeData;\n const hasValidAcsURL = isValidHttpUrl(acsURL, shouldAllowHttpDomains);\n\n // Only render component if we have an acsURL.\n if (!hasValidAcsURL) {\n // Set UI error & call onError callback\n this.setError(\n {\n errorInfo: `${Analytics3DS2Errors.TOKEN_IS_MISSING_ACSURL}: ${this.props.i18n.get('err.gen.9102')}` //\n },\n true\n );\n\n // Send error to analytics endpoint // TODO - check logs to see if this *ever* happens\n const event = new AnalyticsErrorEvent({\n code: Analytics3DS2Errors.TOKEN_IS_MISSING_ACSURL,\n errorType: ANALYTICS_ERROR_TYPE.apiError,\n message: `${THREEDS2_CHALLENGE_ERROR}: Decoded token is missing a valid acsURL property`\n });\n this.props.onSubmitAnalytics(event);\n\n console.debug('### PrepareChallenge3DS2::exiting:: no valid acsURL');\n return;\n }\n\n const { acsTransID, messageVersion, threeDSServerTransID } = (this.state.challengeData as ChallengeData).cReqData;\n\n // Only render component if we have a acsTransID, messageVersion & threeDSServerTransID\n if (!acsTransID || !messageVersion || !threeDSServerTransID) {\n // Set UI error & call onError callback\n this.setError(\n {\n errorInfo: `${Analytics3DS2Errors.TOKEN_IS_MISSING_OTHER_PROPS}: ${this.props.i18n.get('err.gen.9102')}`\n // errorObj: this.state.challengeData // TODO Decide if we want to expose this data\n },\n true\n );\n\n // Send error to analytics endpoint // TODO - check logs to see if this *ever* happens\n const event = new AnalyticsErrorEvent({\n code: Analytics3DS2Errors.TOKEN_IS_MISSING_OTHER_PROPS,\n errorType: ANALYTICS_ERROR_TYPE.apiError,\n message: `${THREEDS2_CHALLENGE_ERROR}: Decoded token is missing one or more of the following properties (acsTransID | messageVersion | threeDSServerTransID)`\n });\n this.props.onSubmitAnalytics(event);\n\n console.debug(\n '### PrepareChallenge3DS2::exiting:: missing one or more of the following properties (acsTransID | messageVersion | threeDSServerTransID)'\n );\n return;\n }\n\n // Proceed to allow component to render\n this.setState({ status: 'performingChallenge' });\n //\n } else {\n const errorMsg: string = (this.state.challengeData as ErrorObject).error;\n\n const errorCode =\n errorMsg.indexOf(MISSING_TOKEN_IN_ACTION_MSG) > -1\n ? Analytics3DS2Errors.ACTION_IS_MISSING_TOKEN\n : Analytics3DS2Errors.TOKEN_DECODE_OR_PARSING_FAILED;\n\n // Set UI error & call onError callback\n this.setError(\n {\n errorInfo:\n errorMsg.indexOf(MISSING_TOKEN_IN_ACTION_MSG) > -1\n ? `${Analytics3DS2Errors.ACTION_IS_MISSING_TOKEN}: ${this.props.i18n.get('err.gen.9102')}`\n : `${Analytics3DS2Errors.TOKEN_DECODE_OR_PARSING_FAILED}: ${this.props.i18n.get('err.gen.9102')}`\n // errorObj: this.state.challengeData // TODO Decide if we want to expose this data\n },\n true\n );\n\n // Send error to analytics endpoint // TODO - check logs to see if the base64 decoding errors *ever* happen\n const event = new AnalyticsErrorEvent({\n code: errorCode,\n errorType: ANALYTICS_ERROR_TYPE.apiError,\n message: `${THREEDS2_CHALLENGE_ERROR}: ${errorMsg}` // can be: 'Missing \"token\" property from threeDS2 action', 'not base64', 'malformed URI sequence' or 'Could not JSON parse token'\n });\n\n this.props.onSubmitAnalytics(event);\n\n console.debug('### PrepareChallenge3DS2::exiting:: no challengeData');\n }\n }\n\n setStatusComplete(resultObj: ResultObject, errorCodeObject: ErrorCodeObject = null) {\n this.setState({ status: 'complete' }, () => {\n /**\n * Create the data in the way that the /details endpoint expects.\n * This is different for the flow triggered by the threeds2InMDFlow process than for the new, v67, 'threeDS2' action\n */\n const resolveDataFunction = this.props.isMDFlow ? createOldChallengeResolveData : createChallengeResolveData;\n const data = resolveDataFunction(this.props.dataKey, resultObj.transStatus, this.props.paymentData);\n\n if (errorCodeObject) {\n console.debug('### PrepareChallenge3DS2::errorCodeObject::', errorCodeObject);\n }\n\n let event: AnalyticsEvent;\n\n /** Are we in an \"error\" i.e. timeout or no transStatus, scenario? If so, submit analytics about it */\n const finalResObject = errorCodeObject ? errorCodeObject : resultObj;\n if (finalResObject.errorCode) {\n const errorTypeAndCode = {\n code: finalResObject.errorCode === 'timeout' ? Analytics3DS2Errors.THREEDS2_TIMEOUT : Analytics3DS2Errors.NO_TRANSSTATUS,\n errorType: finalResObject.errorCode === 'timeout' ? ANALYTICS_ERROR_TYPE.network : ANALYTICS_ERROR_TYPE.apiError\n };\n\n // Challenge process has timed out,\n // or, It's an error reported by the backend 'cos no transStatus could be retrieved // TODO - check logs to see if this *ever* happens\n\n event = new AnalyticsErrorEvent({\n message: (finalResObject as ErrorCodeObject).message,\n ...errorTypeAndCode\n });\n\n // Send error to analytics endpoint\n this.props.onSubmitAnalytics(event);\n }\n\n /** Calculate \"result\" for analytics */\n let result: string;\n\n switch (resultObj?.transStatus) {\n case 'Y':\n result = 'success';\n break;\n case 'N':\n result = 'failed';\n break;\n case 'U':\n result = !errorCodeObject ? 'cancelled' : 'timeout';\n break;\n default:\n }\n if (resultObj?.errorCode) {\n result = 'noTransStatus';\n }\n\n /** Create log object - the process is completed, one way or another */\n\n event = new AnalyticsLogEvent({\n type: THREEDS2_FULL,\n message: `${THREEDS2_NUM} challenge has completed`,\n subType: Analytics3DS2Events.CHALLENGE_COMPLETED,\n result\n });\n\n // Send log to analytics endpoint\n this.props.onSubmitAnalytics(event);\n\n /**\n * Equals call to onAdditionalDetails (except for in 3DS2InMDFlow)\n */\n this.props.onComplete(data);\n });\n }\n\n /**\n * Display error in the UI,\n * and, optionally, decide whether to send any of these errors to the merchant defined onError callback\n *\n * @param errorInfoObj -\n * @param isFatal -\n */\n setError(errorInfoObj: StatusErrorInfoObject, isFatal: boolean) {\n this.setState({ status: 'error', errorInfo: errorInfoObj.errorInfo });\n\n // Decide whether to call this.props.onError\n if (isFatal) {\n this.props.onError(new AdyenCheckoutError(ERROR, errorInfoObj.errorInfo, { cause: errorInfoObj.errorObj }));\n }\n }\n\n render(_, { challengeData }) {\n const getImage = useImage();\n if (this.state.status === 'performingChallenge') {\n return (\n <DoChallenge3DS2\n onCompleteChallenge={(challenge: ThreeDS2FlowObject) => {\n let errorCodeObject: ErrorCodeObject = null;\n\n // Challenge has resulted in an error (no transStatus could be retrieved) - but we still treat this as a valid scenario\n if (hasOwnProperty(challenge.result, 'errorCode') && challenge.result.errorCode.length) {\n // Tell the merchant there's been an error\n errorCodeObject = {\n errorCode: challenge.result.errorCode,\n message: `${THREEDS2_CHALLENGE_ERROR}: ${\n challenge.result.errorDescription ? challenge.result.errorDescription : 'no transStatus could be retrieved'\n }`\n };\n\n /**\n * NOTE: we can now use this.props.isMDFlow to decide if we want to send any of these errors to the onError handler\n * - this is problematic in the regular flow since merchants tend to treat any calls to their onError handler as 'fatal',\n * but in the MDFlow we control what the onError handler does.\n */\n if (this.props.isMDFlow) {\n this.props.onError(\n new AdyenCheckoutError(\n ERROR,\n `${THREEDS2_CHALLENGE_ERROR}: ${\n challenge.result.errorDescription\n ? challenge.result.errorDescription\n : 'no transStatus could be retrieved'\n }`,\n { cause: challenge.result.errorCode }\n )\n );\n }\n }\n\n /**\n * An object has been returned, parsed & accepted as legit (according to the rules in getProcessMessageHandler),\n * but the result prop on that object is missing\n */\n if (!challenge.result) {\n this.setError(\n {\n errorInfo: `${THREEDS2_CHALLENGE_ERROR}: ${this.props.i18n.get('3ds.chal.805', {\n values: { result: '\"result\"' }\n })}`,\n errorObj: challenge as unknown as ErrorObject\n },\n true\n );\n\n // Send error to analytics endpoint\n const event = new AnalyticsErrorEvent({\n code: Analytics3DS2Errors.CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP,\n errorType: ANALYTICS_ERROR_TYPE.apiError,\n message: `${THREEDS2_CHALLENGE_ERROR}: challenge resolved without a \"result\" object`\n });\n\n this.props.onSubmitAnalytics(event);\n\n console.debug('### PrepareChallenge3DS2::exiting:: challenge resolved without a \"result\" object');\n\n return;\n }\n\n // Proceed with call to onAdditionalDetails (except for in 3DS2InMDFlow)\n this.setStatusComplete(challenge.result, errorCodeObject);\n }}\n onErrorChallenge={(challenge: ThreeDS2FlowObject) => {\n /**\n * Called when challenge times-out (which is still a valid scenario)...\n */\n if (hasOwnProperty(challenge, 'errorCode')) {\n const timeoutObject: ErrorCodeObject = {\n errorCode: challenge.errorCode,\n message: `${THREEDS2_CHALLENGE}: ${challenge.errorCode}`\n };\n\n // see comment in onCompleteChallenge code block\n if (this.props.isMDFlow) {\n this.props.onError(\n new AdyenCheckoutError(ERROR, `${THREEDS2_CHALLENGE_ERROR}: '3DS2 challenge timed out'`, {\n cause: challenge.errorCode\n })\n );\n }\n\n this.setStatusComplete(challenge.result, timeoutObject);\n return;\n }\n }}\n {...challengeData}\n onActionHandled={this.props.onActionHandled}\n onFormSubmit={this.onFormSubmit}\n />\n );\n }\n\n if (this.state.status === 'error') {\n return (\n <div className=\"adyen-checkout__threeds2-challenge-error\">\n <Img\n className=\"adyen-checkout__status__icon adyen-checkout__status__icon--error\"\n src={getImage({\n imageFolder: 'components/'\n })('error')}\n alt={''}\n />\n <div className=\"adyen-checkout__status__text\">\n {this.state.errorInfo ? this.state.errorInfo : this.props.i18n.get('error.message.unknown')}\n </div>\n </div>\n );\n }\n\n return null;\n }\n}\n\nexport default PrepareChallenge3DS2;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport PrepareChallenge from './components/Challenge';\nimport { DEFAULT_CHALLENGE_WINDOW_SIZE, THREEDS2_CHALLENGE, THREEDS2_CHALLENGE_ERROR, THREEDS2_FULL } from './constants';\nimport { existy } from '../../utils/commonUtils';\nimport { hasOwnProperty } from '../../utils/hasOwnProperty';\nimport { TxVariants } from '../tx-variants';\nimport { ThreeDS2ChallengeConfiguration } from './types';\nimport AdyenCheckoutError, { API_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors, ANALYTICS_RENDERED_STR, Analytics3DS2Events } from '../../core/Analytics/constants';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { ActionHandledReturnObject } from '../../types/global-types';\nimport { AnalyticsLogEvent } from '../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsErrorEvent } from '../../core/Analytics/AnalyticsErrorEvent';\n\nclass ThreeDS2Challenge extends UIElement<ThreeDS2ChallengeConfiguration> {\n public static type = TxVariants.threeDS2Challenge;\n\n public static defaultProps = {\n dataKey: 'threeDSResult',\n size: DEFAULT_CHALLENGE_WINDOW_SIZE,\n type: THREEDS2_CHALLENGE\n };\n\n protected submitAnalytics = (aObj: AnalyticsEvent) => {\n if (aObj instanceof AnalyticsInfoEvent && aObj.type === ANALYTICS_RENDERED_STR) return; // suppress the rendered event (it will have the same timestamp as the \"creq sent\" event)\n\n super.submitAnalytics(aObj);\n };\n\n protected onActionHandled = (rtnObj: ActionHandledReturnObject) => {\n const event = new AnalyticsLogEvent({\n type: THREEDS2_FULL,\n message: rtnObj.actionDescription,\n subType: Analytics3DS2Events.CHALLENGE_IFRAME_LOADED\n });\n\n this.submitAnalytics(event);\n\n super.onActionHandled(rtnObj);\n };\n\n onComplete(state) {\n /**\n * Equals a call to onAdditionalDetails (as set in actionTypes.ts) for the regular, \"native\" flow.\n * However, if the action to create this component came from the 3DS2InMDFlow process it will instead equal a call to the onComplete callback\n * (as defined in the 3DS2InMDFlow and passed in as a config prop).\n */\n if (state) super.onComplete(state);\n this.unmount(); // re. fixing issue around back to back challenge calls\n }\n\n render() {\n // existy used because threeds2InMDFlow will send empty string for paymentData and we should be allowed to proceed with this\n if (!existy(this.props.paymentData)) {\n /**\n * The presence of props.isMDFlow indicates the action to create this component came from the threeds2InMDFlow process which passes (an empty) paymentsData.\n * The regular, \"native\" flow uses the authorisationToken from the 3DS2 action, which actionTypes.ts assigns to a property called paymentData\n */\n const dataTypeForError = hasOwnProperty(this.props, 'isMDFlow') ? 'paymentData' : 'authorisationToken';\n\n this.props.onError(new AdyenCheckoutError(API_ERROR, `No ${dataTypeForError} received. 3DS2 Challenge cannot proceed`));\n\n const event = new AnalyticsErrorEvent({\n code: Analytics3DS2Errors.ACTION_IS_MISSING_PAYMENT_DATA,\n errorType: ANALYTICS_ERROR_TYPE.apiError,\n message: `${THREEDS2_CHALLENGE_ERROR}: Missing 'paymentData' property from threeDS2 action`\n });\n\n this.submitAnalytics(event);\n\n return null;\n }\n\n return (\n <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n <PrepareChallenge\n {...this.props}\n onComplete={this.onComplete}\n onSubmitAnalytics={this.submitAnalytics}\n isMDFlow={this.props.paymentData.length < 15}\n onActionHandled={this.onActionHandled}\n />\n </CoreProvider>\n );\n }\n}\n\nexport default ThreeDS2Challenge;\n","import { Component, h } from 'preact';\nimport Iframe from '../../../internal/IFrame';\nimport Spinner from '../../../internal/Spinner';\nimport ThreeDS2Form from '../Form';\nimport promiseTimeout from '../../../../utils/promiseTimeout';\nimport getProcessMessageHandler from '../../../../utils/get-process-message-handler';\nimport { THREEDS_METHOD_TIMEOUT, FAILED_METHOD_STATUS_RESOLVE_OBJECT_TIMEOUT, THREEDS2_NUM } from '../../constants';\nimport { encodeBase64URL } from '../utils';\nimport { DoFingerprint3DS2Props, DoFingerprint3DS2State } from './types';\n\nconst iframeName = 'threeDSMethodIframe';\n\n/**\n * Create and Base64URL encode a JSON object containing the serverTransactionID & threeDSMethodNotificationURL.\n * This Base64URL string will be added to the <form> in the ThreeDS2Form component.\n * The ThreeDS2Form component will submit the <form> when it mounts, using the ThreeDS2Iframe as the <form> target.\n * getProcessMessageHandler will listen for the postMessage response from the notificationURL and will settle the\n * promise accordingly causing this component to call the appropriate callback.\n * The callbacks exist in the parent component: ThreeDS2DeviceFingerprint where they ultimately call the onComplete\n * function passed as a prop when checkout.create('threeDS2DeviceFingerprint') is called.\n */\nclass DoFingerprint3DS2 extends Component<DoFingerprint3DS2Props, DoFingerprint3DS2State> {\n private processMessageHandler;\n private fingerPrintPromise: any;\n public static defaultProps = {\n showSpinner: true\n };\n\n constructor(props) {\n super(props);\n\n /**\n * Create and Base64URL encode a JSON object\n */\n const { threeDSServerTransID, threeDSMethodNotificationURL } = this.props;\n\n const jsonStr = JSON.stringify({\n threeDSServerTransID,\n threeDSMethodNotificationURL\n });\n const base64URLencodedData = encodeBase64URL(jsonStr);\n this.state = { base64URLencodedData };\n }\n\n get3DS2MethodPromise() {\n return new Promise((resolve, reject) => {\n /**\n * Listen for postMessage responses from the notification url\n */\n this.processMessageHandler = getProcessMessageHandler(this.props.postMessageDomain, resolve, reject, 'fingerPrintResult');\n\n window.addEventListener('message', this.processMessageHandler);\n });\n }\n\n componentDidMount() {\n // Check 3DS2 Device fingerprint\n this.fingerPrintPromise = promiseTimeout(THREEDS_METHOD_TIMEOUT, this.get3DS2MethodPromise(), FAILED_METHOD_STATUS_RESOLVE_OBJECT_TIMEOUT);\n this.fingerPrintPromise.promise\n .then(resolveObject => {\n window.removeEventListener('message', this.processMessageHandler);\n this.props.onCompleteFingerprint(resolveObject);\n })\n .catch(rejectObject => {\n window.removeEventListener('message', this.processMessageHandler);\n this.props.onErrorFingerprint(rejectObject);\n });\n }\n\n componentWillUnmount() {\n if (this.fingerPrintPromise) this.fingerPrintPromise.cancel();\n window.removeEventListener('message', this.processMessageHandler);\n }\n\n render({ threeDSMethodURL, onActionHandled, onFormSubmit }, { base64URLencodedData }) {\n return (\n <div className=\"adyen-checkout__3ds2-device-fingerprint\">\n {this.props.showSpinner && <Spinner />}\n <div style={{ display: 'none' }}>\n <Iframe\n name={iframeName}\n callback={() => {\n onActionHandled?.({ componentType: '3DS2Fingerprint', actionDescription: `${THREEDS2_NUM} fingerprint iframe loaded` });\n }}\n />\n <ThreeDS2Form\n name={'threeDSMethodForm'}\n action={threeDSMethodURL}\n target={iframeName}\n inputName={'threeDSMethodData'}\n inputValue={base64URLencodedData}\n onFormSubmit={onFormSubmit}\n />\n </div>\n </div>\n );\n }\n}\n\nexport default DoFingerprint3DS2;\n","import { Component, h } from 'preact';\nimport DoFingerprint3DS2 from './DoFingerprint3DS2';\nimport { createFingerprintResolveData, createOldFingerprintResolveData, isErrorObject, prepareFingerPrintData } from '../utils';\nimport { PrepareFingerprint3DS2Props, PrepareFingerprint3DS2State } from './types';\nimport { FingerPrintData, ResultObject, ErrorCodeObject } from '../../types';\nimport { ErrorObject } from '../../../../core/Errors/types';\nimport { isValidHttpUrl } from '../../../../utils/isValidURL';\nimport { THREEDS2_FULL, THREEDS2_FINGERPRINT, THREEDS2_FINGERPRINT_ERROR, THREEDS2_NUM, MISSING_TOKEN_IN_ACTION_MSG, TIMEOUT } from '../../constants';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors, Analytics3DS2Events } from '../../../../core/Analytics/constants';\nimport { AnalyticsLogEvent } from '../../../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsEvent } from '../../../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsErrorEvent } from '../../../../core/Analytics/AnalyticsErrorEvent';\n\nclass PrepareFingerprint3DS2 extends Component<PrepareFingerprint3DS2Props, PrepareFingerprint3DS2State> {\n public static type = 'scheme';\n\n public static defaultProps = {\n onComplete: () => {},\n onError: () => {},\n paymentData: '',\n showSpinner: true,\n isMDFlow: false\n };\n\n constructor(props) {\n super(props);\n\n const { token, notificationURL } = this.props; // See comments on prepareFingerPrintData regarding notificationURL\n\n if (token) {\n const fingerPrintData: FingerPrintData | ErrorObject = prepareFingerPrintData({ token, notificationURL });\n\n this.state = {\n status: 'init',\n fingerPrintData: fingerPrintData as FingerPrintData\n };\n } else {\n // Will be picked up in componentDidMount\n this.state = { fingerPrintData: { success: false, error: MISSING_TOKEN_IN_ACTION_MSG } };\n\n console.debug(`${THREEDS2_FINGERPRINT_ERROR}: ${MISSING_TOKEN_IN_ACTION_MSG}`);\n }\n }\n\n public onFormSubmit = (msg: string) => {\n const event = new AnalyticsLogEvent({\n type: THREEDS2_FULL,\n message: msg,\n subType: Analytics3DS2Events.FINGERPRINT_DATA_SENT\n });\n\n this.props.onSubmitAnalytics(event);\n };\n\n componentDidMount() {\n const hasFingerPrintData = !isErrorObject(this.state.fingerPrintData);\n\n if (hasFingerPrintData) {\n const shouldAllowHttpDomains =\n /** Allow http urls if in development and testing against localhost:8080 */\n (process.env.NODE_ENV === 'development' && process.env.__CLIENT_ENV__?.indexOf('localhost:8080') > -1) ||\n /**\n * Allows the checkoutshopper demo on localhost:8080 to work -\n * requires a configuration in localhost of environment: 'test', _environmentUrls: {api: 'http://localhost:8080/'}\n */\n (this.props.environment === 'test' && this.props._environmentUrls?.api?.includes('http://localhost:8080'));\n\n /**\n * Check the structure of the created fingerPrintData\n */\n const { threeDSMethodURL, threeDSMethodNotificationURL, postMessageDomain, threeDSServerTransID } = this.state\n .fingerPrintData as FingerPrintData;\n\n const hasValid3DSMethodURL = isValidHttpUrl(threeDSMethodURL, shouldAllowHttpDomains);\n\n // Only render component if we have a threeDSMethodURL. Otherwise, exit with threeDSCompInd: 'U'\n if (!hasValid3DSMethodURL) {\n this.setStatusComplete(\n { threeDSCompInd: 'U' },\n {\n errorCode: Analytics3DS2Errors.TOKEN_IS_MISSING_THREEDSMETHODURL,\n message: `${THREEDS2_FINGERPRINT_ERROR}: Decoded token is missing a valid threeDSMethodURL property`\n }\n );\n\n /**\n * NOTE: we can now use this.props.isMDFlow to decide if we want to send any of these errors to the onError handler\n * - this is problematic in the regular flow since merchants tend to treat any calls to their onError handler as 'fatal',\n * but in the MDFlow we control what the onError handler does.\n */\n // if (this.props.isMDFlow) {}\n\n console.debug('### PrepareFingerprint3DS2::exiting:: no valid threeDSMethodURL');\n return;\n }\n\n const hasValid3DSMethodNotificationURL = isValidHttpUrl(threeDSMethodNotificationURL, shouldAllowHttpDomains);\n const hasValidPostMessageDomain = isValidHttpUrl(postMessageDomain, shouldAllowHttpDomains);\n const hasTransServerID = threeDSServerTransID?.length;\n\n if (!hasValid3DSMethodNotificationURL || !hasValidPostMessageDomain || !hasTransServerID) {\n /**\n * NOTE: EMVCo_3DS_CoreSpec_v2.3.1_20220831.pdf states that we should return: threeDSCompInd: 'N'\n * when the fingerprinting process \"Did not run or did not successfully complete\"\n */\n this.setStatusComplete(\n { threeDSCompInd: 'N' },\n {\n errorCode: Analytics3DS2Errors.TOKEN_IS_MISSING_OTHER_PROPS,\n message: `${THREEDS2_FINGERPRINT_ERROR}: Decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)`\n }\n );\n\n console.debug(\n '### PrepareFingerprint3DS2::exiting:: Decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)'\n );\n\n return;\n }\n\n // Proceed to allow component to render\n this.setState({ status: 'retrievingFingerPrint' });\n //\n } else {\n // Only render component if we have fingerPrintData. Otherwise, complete with threeDSCompInd: 'N'\n\n const errorMsg: string = (this.state.fingerPrintData as ErrorObject).error;\n\n const errorCode =\n errorMsg.indexOf(MISSING_TOKEN_IN_ACTION_MSG) > -1\n ? Analytics3DS2Errors.ACTION_IS_MISSING_TOKEN\n : Analytics3DS2Errors.TOKEN_DECODE_OR_PARSING_FAILED;\n\n this.setStatusComplete(\n { threeDSCompInd: 'N' },\n {\n errorCode,\n message: `${THREEDS2_FINGERPRINT_ERROR}: ${errorMsg}` // can be: 'Missing \"token\" property from threeDS2 action', 'not base64', 'malformed URI sequence' or 'Could not JSON parse token'\n }\n );\n\n console.debug('### PrepareFingerprint3DS2:: token does not exist or could not be base64 decoded &/or JSON.parsed');\n }\n }\n\n setStatusComplete(resultObj: ResultObject, errorCodeObject: ErrorCodeObject = null) {\n this.setState({ status: 'complete' }, () => {\n /**\n * Create the data in the way that the /details endpoint expects.\n * This is different for the flow triggered by the threeds2InMDFlow process than for the new, v67, 'threeDS2' action\n */\n const resolveDataFunction = this.props.isMDFlow ? createOldFingerprintResolveData : createFingerprintResolveData;\n const data = resolveDataFunction(this.props.dataKey, resultObj, this.props.paymentData);\n\n let event: AnalyticsEvent;\n\n /** Are we in an error scenario? If so, submit analytics about it */\n const finalResObject = errorCodeObject ? errorCodeObject : resultObj;\n if (finalResObject.errorCode) {\n const errorTypeAndCode = {\n code: finalResObject.errorCode === TIMEOUT ? Analytics3DS2Errors.THREEDS2_TIMEOUT : finalResObject.errorCode,\n errorType: finalResObject.errorCode === TIMEOUT ? ANALYTICS_ERROR_TYPE.network : ANALYTICS_ERROR_TYPE.apiError\n };\n\n /**\n * Timeout or data parsing problems:\n *\n * (threeDSCompInd:\"U\"):\n * - Decoded token is missing a valid threeDSMethodURL property,\n * or, (threeDSCompInd:\"N\"):\n * - Fingerprint process has timed out,\n * also, (threeDSCompInd:\"N\"):\n * - Missing \"token\" property from threeDS2 action\n * - or, decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)\n * - or, token could not be base64 decoded &/or JSON.parsed\n */\n\n event = new AnalyticsErrorEvent({\n message: (finalResObject as ErrorCodeObject).message,\n ...errorTypeAndCode\n });\n\n // Send error to analytics endpoint\n this.props.onSubmitAnalytics(event);\n }\n\n /** Calculate \"result\" for analytics */\n let result: string;\n\n switch (resultObj?.threeDSCompInd) {\n case 'Y':\n result = 'success';\n break;\n case 'N': {\n if (!errorCodeObject) {\n result = 'failed'; // 'failed' is the result returned from the threeDSMethodURL\n } else {\n result = errorCodeObject.errorCode === TIMEOUT ? TIMEOUT : 'failedInternal'; // timed-out; or, 'failed' as a result of internal checks\n }\n break;\n }\n case 'U':\n result = 'noThreeDSMethodURL';\n break;\n default:\n }\n\n /**\n * The fingerprint process is completed, one way or another.\n * The resultObj will be {threeDSCompInd:\"Y\"} in the case of success,\n * else {threeDSCompInd:\"U\"} or {threeDSCompInd:\"N\"} - if we've had some kind of timeout or data parsing problem (as described above)\n */\n\n event = new AnalyticsLogEvent({\n type: THREEDS2_FULL,\n message: `${THREEDS2_NUM} fingerprinting has completed`,\n subType: Analytics3DS2Events.FINGERPRINT_COMPLETED,\n result\n });\n // Send log to analytics endpoint\n this.props.onSubmitAnalytics(event);\n\n /**\n * Equals call to callSubmit3DS2Fingerprint (except for in 3DS2InMDFlow)\n */\n this.props.onComplete(data);\n });\n }\n\n render({ showSpinner }, { status, fingerPrintData }) {\n if (status === 'retrievingFingerPrint') {\n return (\n <DoFingerprint3DS2\n onCompleteFingerprint={fingerprint => {\n this.setStatusComplete(fingerprint.result);\n }}\n onErrorFingerprint={fingerprint => {\n /**\n * Called when fingerprint times-out (which is still a valid scenario)...\n */\n const timeoutObject: ErrorCodeObject = {\n errorCode: fingerprint.errorCode, // 'timeout'\n message: `${THREEDS2_FINGERPRINT}: ${fingerprint.errorCode}`\n };\n\n this.setStatusComplete(fingerprint.result, timeoutObject); // fingerprint.result = threeDSCompInd: 'N'\n }}\n showSpinner={showSpinner}\n {...fingerPrintData}\n onActionHandled={this.props.onActionHandled}\n onFormSubmit={this.onFormSubmit}\n />\n );\n }\n\n return null;\n }\n}\n\nexport default PrepareFingerprint3DS2;\n","export const API_VERSION = 'v1';\n\n// Same error code will be sent to the analytics\nexport const API_ERROR_CODE = {\n makePayments: '620',\n submitPaymentDetails: '621',\n submitThreeDS2Fingerprint: '622',\n createOrder: '623'\n};\n","import { httpPost } from '../../core/Services/http';\nimport { pick } from '../../utils/commonUtils';\nimport { ThreeDS2FingerprintResponse } from './types';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { THREEDS2_FINGERPRINT_SUBMIT } from './constants';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors } from '../../core/Analytics/constants';\nimport { API_ERROR_CODE } from '../../core/Services/sessions/constants';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsErrorEvent } from '../../core/Analytics/AnalyticsErrorEvent';\n\n/**\n * ThreeDS2DeviceFingerprint, onComplete, calls a new, internal, endpoint which\n * behaves like the /details endpoint but doesn't require the same credentials\n */\nexport default function callSubmit3DS2Fingerprint({ data }): void {\n httpPost<ThreeDS2FingerprintResponse>(\n {\n path: `v1/submitThreeDS2Fingerprint?token=${this.props.clientKey}`,\n loadingContext: this.props.loadingContext,\n errorLevel: 'fatal',\n errorCode: API_ERROR_CODE.submitThreeDS2Fingerprint\n },\n {\n ...data\n }\n )\n .then(resData => {\n let event: AnalyticsEvent;\n\n /**\n * Frictionless (no challenge) flow OR \"refused\" flow\n */\n if (resData.type === 'completed') {\n const { details } = resData;\n\n if (!resData.details) {\n console.debug(\n 'Handled Error::callSubmit3DS2Fingerprint::FAILED:: no details object in a response indicating either a \"frictionless\" flow, or a \"refused\" response. resData=',\n resData\n );\n\n event = new AnalyticsErrorEvent({\n code: Analytics3DS2Errors.NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED,\n errorType: ANALYTICS_ERROR_TYPE.apiError,\n message: `${THREEDS2_FINGERPRINT_SUBMIT}: no details object in a response indicating either a \"frictionless\" flow, or a \"refused\" response`\n });\n\n this.submitAnalytics(event);\n\n return;\n }\n\n return this.onComplete({ data: { details } });\n }\n\n /**\n * If we don't have a type: \"completed\", then we expect an action, because we must be in a Challenge or Redirect flow\n */\n if (!resData.action) {\n console.debug(\n 'Handled Error::callSubmit3DS2Fingerprint::FAILED:: no action object in a response indicating a \"challenge\". resData=',\n resData\n );\n\n event = new AnalyticsErrorEvent({\n code: Analytics3DS2Errors.NO_ACTION_FOR_CHALLENGE,\n errorType: ANALYTICS_ERROR_TYPE.apiError,\n message: `${THREEDS2_FINGERPRINT_SUBMIT}: no action object in a response indicating a \"challenge\" flow`\n });\n this.submitAnalytics(event);\n\n return;\n }\n\n // elementRef exists when the fingerprint component is created from the Dropin\n const actionHandler = this.props.elementRef ?? this;\n\n /**\n * We have an action but do we have a way to handle it?\n * TODO - check logs: do we ever *not* have an actionHandler?\n */\n if (!actionHandler) {\n console.debug('Handled Error::callSubmit3DS2Fingerprint::FAILED:: no actionHandler');\n\n event = new AnalyticsErrorEvent({\n code: Analytics3DS2Errors.NO_COMPONENT_FOR_ACTION,\n errorType: ANALYTICS_ERROR_TYPE.sdkError,\n message: `${THREEDS2_FINGERPRINT_SUBMIT}: no component defined to handle the action response`\n });\n\n this.submitAnalytics(event);\n\n return;\n }\n\n /**\n * Challenge flow\n */\n if (resData.action?.type === 'threeDS2') {\n // Ensure challengeWindowSize is propagated if there was a (merchant defined) handleAction call proceeding this one that had it set as an option\n return actionHandler.handleAction(resData.action, pick('challengeWindowSize').from(this.props));\n }\n\n /**\n * Redirect flow (usecase: we thought we could do 3DS2 but it turns out we can't)\n * TODO - check logs: does this ever happen, anymore?\n */\n if (resData.action?.type === 'redirect') {\n return actionHandler.handleAction(resData.action);\n }\n })\n .catch((error: AdyenCheckoutError) => {\n this.handleError(error);\n });\n}\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport PrepareFingerprint from './components/DeviceFingerprint';\nimport callSubmit3DS2Fingerprint from './callSubmit3DS2Fingerprint';\nimport { existy } from '../../utils/commonUtils';\nimport { TxVariants } from '../tx-variants';\nimport { ThreeDS2DeviceFingerprintConfiguration } from './types';\nimport AdyenCheckoutError, { API_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors, ANALYTICS_RENDERED_STR, Analytics3DS2Events } from '../../core/Analytics/constants';\nimport { THREEDS2_FINGERPRINT, THREEDS2_FINGERPRINT_ERROR, THREEDS2_FULL } from './constants';\nimport { ActionHandledReturnObject } from '../../types/global-types';\nimport { AnalyticsLogEvent } from '../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsErrorEvent } from '../../core/Analytics/AnalyticsErrorEvent';\n\nclass ThreeDS2DeviceFingerprint extends UIElement<ThreeDS2DeviceFingerprintConfiguration> {\n public static type = TxVariants.threeDS2Fingerprint;\n\n public static defaultProps = {\n dataKey: 'fingerprintResult',\n type: THREEDS2_FINGERPRINT\n };\n\n private callSubmit3DS2Fingerprint = callSubmit3DS2Fingerprint.bind(this); // New 3DS2 flow\n\n protected submitAnalytics = (aObj: AnalyticsEvent) => {\n if (aObj instanceof AnalyticsInfoEvent && aObj.type === ANALYTICS_RENDERED_STR) return; // suppress the rendered event (it will have the same timestamp as the \"threeDSMethodData sent\" event)\n\n super.submitAnalytics(aObj);\n };\n\n protected onActionHandled = (rtnObj: ActionHandledReturnObject) => {\n const event = new AnalyticsLogEvent({\n type: THREEDS2_FULL,\n message: rtnObj.actionDescription,\n subType: Analytics3DS2Events.FINGERPRINT_IFRAME_LOADED\n });\n\n this.submitAnalytics(event);\n\n super.onActionHandled(rtnObj);\n };\n\n onComplete(state) {\n super.onComplete(state);\n this.unmount(); // re. fixing issue around back to back fingerprinting calls\n }\n\n render() {\n /**\n * In the regular components (aka \"native\") flow we can't proceed because something has gone wrong with the payment if paymentData is missing from the threeDS2 action.\n * In the MDFlow the paymentData is always present (albeit an empty string, which is why we use 'existy' since we should be allowed to proceed with this)\n */\n if (!existy(this.props.paymentData)) {\n this.props.onError(new AdyenCheckoutError(API_ERROR, `No paymentData received. 3DS2 Fingerprint cannot proceed`));\n\n // TODO - check logs to see if this *ever* happens\n const event = new AnalyticsErrorEvent({\n code: Analytics3DS2Errors.ACTION_IS_MISSING_PAYMENT_DATA,\n errorType: ANALYTICS_ERROR_TYPE.apiError,\n message: `${THREEDS2_FINGERPRINT_ERROR}: Missing 'paymentData' property from threeDS2 action`\n });\n\n this.submitAnalytics(event);\n\n return null;\n }\n\n /**\n * this.props.isMDFlow indicates the action to create this component came from the 3DS2InMDFlow process and upon completion should call the\n * passed onComplete callback (as defined in the 3DS2InMDFlow) instead of the /submitThreeDS2Fingerprint endpoint for the regular, \"native\" flow\n */\n return (\n <PrepareFingerprint\n {...this.props}\n onComplete={this.props.isMDFlow ? this.onComplete : this.callSubmit3DS2Fingerprint}\n onSubmitAnalytics={this.submitAnalytics}\n isMDFlow={this.props.paymentData.length < 15}\n onActionHandled={this.onActionHandled}\n />\n );\n }\n}\n\nexport default ThreeDS2DeviceFingerprint;\n","import { h, Fragment } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { useState } from 'preact/hooks';\nimport { PaymentAmount } from '../../../types';\n\n// TODO this should ideally be remove but we need let prop propagate down\n// probably not worth changing this behaviour now\nexport interface RedirectButtonProps {\n label?: string;\n icon?: string;\n payButton: Function;\n onSubmit: Function;\n amount?: PaymentAmount;\n name: string;\n showPayButton: boolean;\n ref?: any;\n}\n\nfunction RedirectButton({ label = null, icon = null, payButton, onSubmit, amount = null, name, showPayButton, ...props }: RedirectButtonProps) {\n const { i18n } = useCoreContext();\n const [status, setStatus] = useState('ready');\n\n this.setStatus = newStatus => {\n setStatus(newStatus);\n };\n\n const payButtonLabel = () => {\n const isZeroAuth = amount && {}.hasOwnProperty.call(amount, 'value') && amount.value === 0;\n if (isZeroAuth) return `${i18n.get('preauthorizeWith')} ${name}`;\n return `${i18n.get('continueTo')} ${name}`;\n };\n\n if (!showPayButton) {\n return;\n }\n\n return (\n <Fragment>\n {payButton({\n ...props,\n status,\n icon,\n classNameModifiers: ['standalone'],\n label: label || payButtonLabel(),\n onClick: onSubmit\n })}\n </Fragment>\n );\n}\n\nexport default RedirectButton;\n","const CURRENCY_DECIMALS = {\n // ZERO_DECIMAL_CURRENCIES\n IDR: 1,\n JPY: 1,\n KRW: 1,\n VND: 1,\n BYR: 1,\n CVE: 1,\n DJF: 1,\n GHC: 1,\n GNF: 1,\n KMF: 1,\n PYG: 1,\n RWF: 1,\n UGX: 1,\n VUV: 1,\n XAF: 1,\n XOF: 1,\n XPF: 1,\n\n // ONE_DECIMAL_CURRENCIES\n MRO: 10,\n\n // THREE_DECIMAL_CURRENCIES\n BHD: 1000,\n IQD: 1000,\n JOD: 1000,\n KWD: 1000,\n OMR: 1000,\n LYD: 1000,\n TND: 1000\n};\n\nexport default CURRENCY_DECIMALS;\n","/** Work around solution until chromium bug is fixed https://bugs.chromium.org/p/chromium/issues/detail?id=1381996\n * We need to hardcode minimumFractionDigits for the following currencies in order to force them to have 2 decimal places and\n * not be rounded up to a major unit\n */\nexport const currencyMinorUnitsConfig = {\n RSD: { minimumFractionDigits: 2 },\n AFN: { minimumFractionDigits: 2 },\n ALL: { minimumFractionDigits: 2 },\n IRR: { minimumFractionDigits: 2 },\n LAK: { minimumFractionDigits: 2 },\n LBP: { minimumFractionDigits: 2 },\n MMK: { minimumFractionDigits: 2 },\n SOS: { minimumFractionDigits: 2 },\n SYP: { minimumFractionDigits: 2 },\n YER: { minimumFractionDigits: 2 },\n IQD: { minimumFractionDigits: 3 }\n};\n","import CURRENCY_CODES from './constants/currency-codes';\nimport CURRENCY_DECIMALS from './constants/currency-decimals';\nimport { currencyMinorUnitsConfig } from './constants/currency-minor-units';\n\n/**\n * @internal\n * @param currencyCode -\n * Get divider amount\n */\nexport const getDivider = (currencyCode: string): number => CURRENCY_DECIMALS[currencyCode] || 100;\n\n/**\n * @internal\n * @param currencyCode -\n * Returns whether a CURRENCY CODE is valid\n */\nexport const isValidCurrencyCode = (currencyCode: string): boolean => !!CURRENCY_CODES[currencyCode];\n\n/**\n * @internal\n */\nexport const getCurrencyCode = (currencyCode: string): string => (isValidCurrencyCode(currencyCode) ? CURRENCY_CODES[currencyCode] : false);\n\n/**\n * @internal\n */\nexport const getDecimalAmount = (amount: number | string, currencyCode: string): number => {\n const divider = getDivider(currencyCode);\n return parseInt(String(amount), 10) / divider;\n};\n\n/**\n * @internal\n */\nexport const getLocalisedAmount = (amount: number, locale: string, currencyCode: string, options = {}): string => {\n const stringAmount = amount.toString(); // Changing amount to string to avoid 0-value from returning false\n\n const decimalAmount = getDecimalAmount(stringAmount, currencyCode);\n const formattedLocale = locale.replace('_', '-');\n\n const modifiedOptions = currencyMinorUnitsConfig[currencyCode] ? { ...options, ...currencyMinorUnitsConfig[currencyCode] } : options;\n const localeOptions = {\n style: 'currency',\n currency: currencyCode,\n currencyDisplay: 'symbol',\n ...modifiedOptions\n };\n\n try {\n return decimalAmount.toLocaleString(formattedLocale, localeOptions);\n } catch (e) {\n return stringAmount;\n }\n};\n\n/**\n * @internal\n */\nexport const getLocalisedPercentage = (percent = 0, locale: string): string => {\n const decimalPercent = percent / 100 / 100;\n const localeOptions: Intl.NumberFormatOptions = {\n style: 'percent',\n maximumFractionDigits: 2\n };\n\n try {\n return decimalPercent.toLocaleString(locale, localeOptions);\n } catch (e) {\n return null;\n }\n};\n","import { h } from 'preact';\nimport type { ApplePayButtonStyle, ApplePayButtonType } from '../types';\nimport './ApplePayButton.scss';\n\ninterface ApplePayButtonProps {\n buttonStyle: ApplePayButtonStyle;\n buttonType: ApplePayButtonType;\n buttonLocale: string;\n onClick(): void;\n}\n\nconst ApplePayButton = ({ buttonStyle, buttonType, buttonLocale, onClick }: ApplePayButtonProps) => {\n return <apple-pay-button data-testid=\"apple-pay-button\" buttonstyle={buttonStyle} type={buttonType} locale={buttonLocale} onclick={onClick} />;\n};\n\nexport default ApplePayButton;\n","import { ApplePayPaymentAuthorizationResult } from '../types';\n\nexport interface ApplePayServiceOptions {\n version: number;\n onValidateMerchant: (resolve, reject, url) => void;\n onError: (error?: unknown) => void;\n onCancel?: (event: ApplePayJS.Event) => void;\n onPaymentMethodSelected?: (resolve, reject, event: ApplePayJS.ApplePayPaymentMethodSelectedEvent) => void;\n onShippingMethodSelected?: (resolve, reject, event: ApplePayJS.ApplePayShippingMethodSelectedEvent) => void;\n onShippingContactSelected?: (resolve, reject, event: ApplePayJS.ApplePayShippingContactSelectedEvent) => void;\n onPaymentAuthorized: (\n resolve: (result: ApplePayPaymentAuthorizationResult) => void,\n reject: (result: ApplePayPaymentAuthorizationResult) => void,\n event: ApplePayJS.ApplePayPaymentAuthorizedEvent\n ) => void;\n}\n\nclass ApplePayService {\n private session: ApplePaySession;\n private readonly options: ApplePayServiceOptions;\n\n constructor(paymentRequest: ApplePayJS.ApplePayPaymentRequest, options: ApplePayServiceOptions) {\n this.options = options;\n\n this.session = new ApplePaySession(options.version, paymentRequest);\n this.session.onvalidatemerchant = event => {\n void this.onvalidatemerchant(event, options.onValidateMerchant);\n };\n this.session.onpaymentauthorized = event => {\n void this.onpaymentauthorized(event, options.onPaymentAuthorized);\n };\n\n this.session.oncancel = event => {\n this.oncancel(event, options.onCancel);\n };\n\n if (typeof options.onPaymentMethodSelected === 'function') {\n this.session.onpaymentmethodselected = event => {\n void this.onpaymentmethodselected(event, options.onPaymentMethodSelected);\n };\n }\n\n if (typeof options.onShippingContactSelected === 'function') {\n this.session.onshippingcontactselected = event => {\n void this.onshippingcontactselected(event, options.onShippingContactSelected);\n };\n }\n\n if (typeof options.onShippingMethodSelected === 'function') {\n this.session.onshippingmethodselected = event => {\n void this.onshippingmethodselected(event, options.onShippingMethodSelected);\n };\n }\n }\n\n /**\n * Begins the merchant validation process.\n * When this method is called, the payment sheet is presented and the merchant validation process is initiated.\n * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778001-begin}\n */\n begin() {\n return this.session.begin();\n }\n\n /**\n * An event handler that is called when the payment sheet is displayed.\n * Use this attribute to request and return a merchant session.\n * @param event - An ApplePayValidateMerchantEvent object (contains validationURL)\n * @param onValidateMerchant - A promise implemented by the merchant that will resolve with the merchantSession\n * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_js_api/providing_merchant_validation}\n */\n onvalidatemerchant(event: ApplePayJS.ApplePayValidateMerchantEvent, onValidateMerchant) {\n return new Promise((resolve, reject) => onValidateMerchant(resolve, reject, event.validationURL))\n .then(response => {\n this.session.completeMerchantValidation(response);\n })\n .catch(error => {\n console.error(error);\n this.session.abort();\n this.options.onError(error);\n });\n }\n\n /**\n * An event handler that is called when the user has authorized the Apple Pay payment with Touch ID, Face ID, or passcode.\n * The onpaymentauthorized function must complete the payment and respond by calling completePayment before the 30 second timeout.\n *\n * @param event - The event parameter contains the payment (ApplePayPayment) attribute.\n * @param onPaymentAuthorized - A promise that will complete the payment when resolved. Use this promise to process the payment.\n * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778020-onpaymentauthorized}\n */\n onpaymentauthorized(\n event: ApplePayJS.ApplePayPaymentAuthorizedEvent,\n onPaymentAuthorized: ApplePayServiceOptions['onPaymentAuthorized']\n ): Promise<void> {\n return new Promise((resolve, reject) => onPaymentAuthorized(resolve, reject, event))\n .then((result: ApplePayPaymentAuthorizationResult) => {\n this.session.completePayment(result);\n })\n .catch((result: ApplePayPaymentAuthorizationResult) => {\n this.session.completePayment(result);\n });\n }\n\n /**\n * An event handler that is called when a new payment method is selected.\n * The onpaymentmethodselected function must resolve before the 30 second timeout\n *\n * @param event - The event parameter contains the payment (ApplePayPayment) attribute.\n * @param onPaymentMethodSelected - A promise that will complete the payment when resolved. Use this promise to process the payment.\n * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778013-onpaymentmethodselected}\n */\n onpaymentmethodselected(event: ApplePayJS.ApplePayPaymentMethodSelectedEvent, onPaymentMethodSelected) {\n return new Promise((resolve, reject) => onPaymentMethodSelected(resolve, reject, event))\n .then((paymentMethodUpdate: ApplePayJS.ApplePayPaymentMethodUpdate) => {\n this.session.completePaymentMethodSelection(paymentMethodUpdate);\n })\n .catch((paymentMethodUpdate: ApplePayJS.ApplePayPaymentMethodUpdate) => {\n this.session.completePaymentMethodSelection(paymentMethodUpdate);\n });\n }\n\n /**\n * An event handler that is called when a new payment method is selected.\n * The onpaymentmethodselected function must resolve before the 30 second timeout\n * @param event - The event parameter contains the shippingContact attribute.\n * @param onShippingContactSelected - A promise that will complete the selection of a shipping contact with an update.\n * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778009-onshippingcontactselected}\n */\n onshippingcontactselected(event: ApplePayJS.ApplePayShippingContactSelectedEvent, onShippingContactSelected) {\n return new Promise((resolve, reject) => onShippingContactSelected(resolve, reject, event))\n .then((shippingContactUpdate: ApplePayJS.ApplePayShippingContactUpdate) => {\n this.session.completeShippingContactSelection(shippingContactUpdate);\n })\n .catch((shippingContactUpdate: ApplePayJS.ApplePayShippingContactUpdate) => {\n this.session.completeShippingContactSelection(shippingContactUpdate);\n });\n }\n\n /**\n * An event handler that is called when a new payment method is selected.\n * The onpaymentmethodselected function must resolve before the 30 second timeout\n * @param event - The event parameter contains the shippingMethod attribute.\n * @param onShippingMethodSelected - A promise that will complete the selection of a shipping method with an update.\n * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778009-onshippingcontactselected}\n */\n onshippingmethodselected(event: ApplePayJS.ApplePayShippingMethodSelectedEvent, onShippingMethodSelected) {\n return new Promise((resolve, reject) => onShippingMethodSelected(resolve, reject, event))\n .then((shippingMethodUpdate: ApplePayJS.ApplePayShippingMethodUpdate) => {\n this.session.completeShippingMethodSelection(shippingMethodUpdate);\n })\n .catch((shippingMethodUpdate: ApplePayJS.ApplePayShippingMethodUpdate) => {\n this.session.completeShippingMethodSelection(shippingMethodUpdate);\n });\n }\n\n /**\n * An event handler that is automatically called when the payment UI is dismissed.\n * This function can be called even after an onpaymentauthorized event has been dispatched.\n * @param event -\n * @param onCancel -\n * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778029-oncancel}\n */\n oncancel(event: ApplePayJS.Event, onCancel): void {\n onCancel(event);\n }\n}\n\nexport default ApplePayService;\n","import { ApplePayConfiguration } from './types';\n\nconst defaultProps: ApplePayConfiguration = {\n isExpress: false,\n amount: { currency: 'USD', value: 0 },\n totalPriceStatus: 'final',\n initiative: 'web',\n merchantCapabilities: ['supports3DS'],\n supportedNetworks: ['amex', 'discover', 'masterCard', 'visa'],\n buttonType: 'plain',\n buttonColor: 'black',\n onClick: resolve => resolve()\n};\n\nexport default defaultProps;\n","import { getDecimalAmount } from '../../../utils/amount-util';\nimport { PaymentAmount } from '../../../types/global-types';\n\nconst formatAmount = (amount: PaymentAmount) => String(getDecimalAmount(amount.value, amount.currency));\n\nexport const preparePaymentRequest = (paymentRequest): ApplePayJS.ApplePayPaymentRequest => {\n const { countryCode, companyName, amount, ...props } = paymentRequest;\n const formattedAmount = formatAmount(amount);\n\n if (!countryCode) {\n console.warn('Apple Pay - Make sure to set the countryCode in the AdyenCheckout configuration or in the Checkout Session creation');\n }\n\n return {\n countryCode,\n currencyCode: amount.currency,\n\n total: {\n label: props.totalPriceLabel,\n amount: formattedAmount,\n type: props.totalPriceStatus\n },\n\n lineItems: props.lineItems,\n shippingContactEditingMode: props.shippingContactEditingMode,\n shippingMethods: props.shippingMethods,\n shippingType: props.shippingType,\n\n recurringPaymentRequest: props.recurringPaymentRequest,\n\n merchantCapabilities: props.merchantCapabilities,\n supportedCountries: props.supportedCountries,\n supportedNetworks: props.supportedNetworks,\n\n requiredShippingContactFields: props.requiredShippingContactFields,\n requiredBillingContactFields: props.requiredBillingContactFields,\n\n billingContact: props.billingContact,\n shippingContact: props.shippingContact,\n\n applicationData: props.applicationData\n };\n};\n\nexport default preparePaymentRequest;\n","export function resolveSupportedVersion(latestVersion: number): number | null {\n try {\n for (let v = latestVersion; v > 0; v--) {\n if (ApplePaySession?.supportsVersion(v)) {\n return v;\n }\n }\n } catch (error) {\n console.warn(error);\n }\n return null;\n}\n","import { AddressData } from '../../../types/global-types';\n\n/**\n * This function formats Apple Pay contact format to Adyen address format\n *\n * Setting 'houseNumberOrName' to ZZ won't affect the AVS check, and it will make the algorithm take the\n * house number from the 'street' property.\n */\nexport function formatApplePayContactToAdyenAddressFormat(\n paymentContact: ApplePayJS.ApplePayPaymentContact,\n isDeliveryAddress?: boolean\n): AddressData | undefined {\n if (!paymentContact) {\n return;\n }\n\n return {\n city: paymentContact.locality,\n country: paymentContact.countryCode,\n houseNumberOrName: 'ZZ',\n postalCode: paymentContact.postalCode,\n street: paymentContact.addressLines?.join(' ').trim(),\n ...(paymentContact.administrativeArea && { stateOrProvince: paymentContact.administrativeArea }),\n ...(isDeliveryAddress && {\n firstName: paymentContact.givenName,\n lastName: paymentContact.familyName\n })\n };\n}\n","export function mapBrands(brands) {\n const brandMapping = {\n mc: 'masterCard',\n amex: 'amex',\n visa: 'visa',\n elodebit: 'elo',\n elo: 'elo',\n interac: 'interac',\n discover: 'discover',\n jcb: 'jcb',\n electron: 'electron',\n maestro: 'maestro',\n girocard: 'girocard',\n cartebancaire: 'cartesBancaires',\n eftpos_australia: 'eftpos'\n };\n\n return brands.reduce((accumulator, item) => {\n if (!!brandMapping[item] && !accumulator.includes(brandMapping[item])) {\n accumulator.push(brandMapping[item]);\n }\n return accumulator;\n }, []);\n}\n","import Script from '../../../utils/Script';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\n\nexport const APPLE_PAY_SDK_URL = 'https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js';\n\nclass ApplePaySdkLoader {\n private sdkLoadingPromise: Promise<void>;\n\n public async load(): Promise<ApplePaySession> {\n try {\n const scriptElement = new Script(APPLE_PAY_SDK_URL, 'body', { crossOrigin: 'anonymous' });\n this.sdkLoadingPromise = scriptElement.load();\n await this.sdkLoadingPromise;\n return window?.ApplePaySession;\n } catch (error) {\n throw new AdyenCheckoutError('SCRIPT_ERROR', 'ApplePaySDK failed to load', { cause: error });\n }\n }\n\n public isSdkLoaded(): Promise<void> {\n if (this.sdkLoadingPromise === undefined) {\n return Promise.reject();\n }\n\n return this.sdkLoadingPromise;\n }\n}\n\nexport default ApplePaySdkLoader;\n","/**\n * Returns true if the Checkout is hosted within an iframe, false otherwise.\n */\nconst detectInIframe = () => {\n if (typeof window !== 'undefined') {\n try {\n return window.self !== window.top;\n } catch (e) {\n // In some cross-origin scenarios, accessing window.top might throw an error.\n // In such cases, it is likely in an iframe.\n return true;\n }\n } else {\n // SSR\n return false;\n }\n};\n\nexport { detectInIframe };\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport ApplePayButton from './components/ApplePayButton';\nimport ApplePayService from './services/ApplePayService';\nimport base64 from '../../utils/base64';\nimport defaultProps from './defaultProps';\nimport { httpPost } from '../../core/Services/http';\nimport { preparePaymentRequest } from './utils/payment-request';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { DecodeObject } from '../../types/global-types';\nimport { TxVariants } from '../tx-variants';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport {\n ANALYTICS_EXPRESS_PAGES_ARRAY,\n ANALYTICS_INSTANT_PAYMENT_BUTTON,\n ANALYTICS_RENDERED_STR,\n ANALYTICS_SELECTED_STR\n} from '../../core/Analytics/constants';\nimport { resolveSupportedVersion } from './utils/resolve-supported-version';\nimport { formatApplePayContactToAdyenAddressFormat } from './utils/format-applepay-contact-to-adyen-format';\nimport { mapBrands } from './utils/map-adyen-brands-to-applepay-brands';\nimport ApplePaySdkLoader from './services/ApplePaySdkLoader';\nimport { detectInIframe } from '../../utils/detectInIframe';\nimport type { ApplePayConfiguration, ApplePayElementData, ApplePayPaymentOrderDetails, ApplePaySessionRequest } from './types';\nimport type { ICore } from '../../core/types';\nimport type { PaymentResponseData, RawPaymentResponse } from '../../types/global-types';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\n\nconst LATEST_APPLE_PAY_VERSION = 14;\n\nclass ApplePayElement extends UIElement<ApplePayConfiguration> {\n public static type = TxVariants.applepay;\n\n protected static defaultProps = defaultProps;\n\n private sdkLoader: ApplePaySdkLoader;\n private applePayVersionNumber: number = undefined;\n\n constructor(checkout: ICore, props?: ApplePayConfiguration) {\n super(checkout, props);\n\n const { isExpress, onShippingContactSelected, onShippingMethodSelected } = this.props;\n\n if (isExpress === false && (onShippingContactSelected || onShippingMethodSelected)) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n 'ApplePay - You must set \"isExpress\" flag to \"true\" in order to use \"onShippingContactSelected\" and/or \"onShippingMethodSelected\" callbacks'\n );\n }\n\n this.startSession = this.startSession.bind(this);\n this.submit = this.submit.bind(this);\n this.validateMerchant = this.validateMerchant.bind(this);\n this.collectOrderTrackingDetailsIfNeeded = this.collectOrderTrackingDetailsIfNeeded.bind(this);\n this.handleAuthorization = this.handleAuthorization.bind(this);\n this.defineApplePayVersionNumber = this.defineApplePayVersionNumber.bind(this);\n this.configureApplePayWebOptions = this.configureApplePayWebOptions.bind(this);\n\n this.sdkLoader = new ApplePaySdkLoader();\n\n void this.sdkLoader\n .load()\n .then(this.defineApplePayVersionNumber)\n .then(this.configureApplePayWebOptions)\n .catch(error => {\n this.handleError(error);\n });\n }\n\n /**\n * Formats the component props\n */\n protected override formatProps(props: ApplePayConfiguration): ApplePayConfiguration {\n // @ts-ignore TODO: Fix brands prop\n const supportedNetworks = props.brands?.length ? mapBrands(props.brands) : props.supportedNetworks;\n\n return {\n ...props,\n configuration: props.configuration,\n supportedNetworks,\n buttonLocale: props.buttonLocale ?? props.i18n?.locale,\n totalPriceLabel: props.totalPriceLabel || props.configuration?.merchantName,\n renderApplePayCodeAs: props.renderApplePayCodeAs ?? (detectInIframe() ? 'window' : 'modal')\n };\n }\n\n /**\n * Formats the component data output\n */\n protected override formatData(): ApplePayElementData {\n const { applePayToken, billingAddress, deliveryAddress } = this.state;\n const { isExpress } = this.props;\n\n return {\n paymentMethod: {\n type: ApplePayElement.type,\n applePayToken,\n ...(isExpress && { subtype: 'express' })\n },\n ...(billingAddress && { billingAddress }),\n ...(deliveryAddress && { deliveryAddress })\n };\n }\n\n protected submitAnalytics(analyticsObj: AnalyticsEvent) {\n // Analytics will need to know about this.props.isExpress & this.props.expressPage\n if (analyticsObj instanceof AnalyticsInfoEvent && analyticsObj.type === ANALYTICS_RENDERED_STR) {\n const { isExpress, expressPage } = this.props;\n const hasExpressPage = expressPage && ANALYTICS_EXPRESS_PAGES_ARRAY.includes(expressPage);\n\n if (typeof isExpress === 'boolean') {\n analyticsObj.isExpress = isExpress;\n }\n\n if (isExpress === true && hasExpressPage) {\n analyticsObj.expressPage = expressPage; // We only care about the expressPage value if isExpress is true\n }\n }\n\n super.submitAnalytics(analyticsObj);\n }\n\n public override submit = (): void => {\n // Analytics\n if (this.props.isInstantPayment) {\n const event = new AnalyticsInfoEvent({\n type: ANALYTICS_SELECTED_STR,\n target: ANALYTICS_INSTANT_PAYMENT_BUTTON\n });\n this.submitAnalytics(event);\n }\n void this.startSession();\n };\n\n public get isValid(): boolean {\n return true;\n }\n\n /**\n * This API is only intended for upstreaming or defaulting to Apple Pay, all other scenarios should continue to\n * use canMakePayments(). For Safari browsers, this API will indicate whether there is a card available to make\n * payments. For third-party browsers a new status of paymentCredentialStatusUnknown will be returned. This does\n * not mean there are no cards available, it means the status cannot be determined and as such defaulting\n * and upstreaming should still be considered.\n *\n * {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/4440085-applepaycapabilities}\n * @param merchantIdentifier\n */\n public async applePayCapabilities(merchantIdentifier?: string): Promise<ApplePayJS.PaymentCredentialStatusResponse> {\n const identifier = merchantIdentifier || this.props.configuration.merchantId;\n\n try {\n await this.sdkLoader.isSdkLoaded();\n return await ApplePaySession?.applePayCapabilities(identifier);\n } catch (error) {\n throw new AdyenCheckoutError('ERROR', 'Apple Pay: Error when requesting applePayCapabilities()', { cause: error });\n }\n }\n\n /**\n * Determines if Apple Pay component can be displayed or not\n */\n public override async isAvailable(): Promise<void> {\n if (window.location.protocol !== 'https:') {\n return Promise.reject(new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'Trying to start an Apple Pay session from an insecure document'));\n }\n\n try {\n await this.sdkLoader.isSdkLoaded();\n\n if (ApplePaySession?.canMakePayments()) {\n return Promise.resolve();\n }\n\n return Promise.reject(new AdyenCheckoutError('ERROR', 'Apple Pay is not available on this device'));\n } catch (error) {\n return Promise.reject(new AdyenCheckoutError('ERROR', 'Apple Pay SDK failed to load', { cause: error }));\n }\n }\n\n /**\n * Sets the Apple Pay version available for the shopper.\n * This code needs to be executed once the Apple Pay SDK is fully loaded\n * @private\n */\n private defineApplePayVersionNumber() {\n if (window.location.protocol !== 'https:') return;\n this.applePayVersionNumber = this.props.version || resolveSupportedVersion(LATEST_APPLE_PAY_VERSION);\n }\n\n /**\n * Sets the configuration/callbacks that pertain to the Apple Pay code overlay/modal.\n * @private\n */\n private configureApplePayWebOptions() {\n if (window.ApplePayWebOptions) {\n const { renderApplePayCodeAs, onApplePayCodeClose } = this.props;\n\n window.ApplePayWebOptions.set({\n renderApplePayCodeAs,\n ...(onApplePayCodeClose && { onApplePayCodeClose })\n });\n }\n }\n\n private startSession() {\n const { onValidateMerchant, onPaymentMethodSelected, onShippingMethodSelected, onShippingContactSelected } = this.props;\n\n const paymentRequest = preparePaymentRequest({\n companyName: this.props.configuration.merchantName,\n countryCode: this.core.options.countryCode,\n ...this.props\n });\n\n const session = new ApplePayService(paymentRequest, {\n version: this.applePayVersionNumber,\n onError: (error: unknown) => {\n this.handleError(\n new AdyenCheckoutError('ERROR', 'ApplePay - Something went wrong on ApplePayService', {\n cause: error\n })\n );\n },\n onCancel: event => {\n this.handleError(new AdyenCheckoutError('CANCEL', 'ApplePay UI dismissed', { cause: event }));\n },\n onPaymentMethodSelected,\n onShippingMethodSelected,\n onShippingContactSelected,\n onValidateMerchant: onValidateMerchant || this.validateMerchant,\n onPaymentAuthorized: (resolve, reject, event) => {\n const billingAddress = formatApplePayContactToAdyenAddressFormat(event.payment.billingContact);\n const deliveryAddress = formatApplePayContactToAdyenAddressFormat(event.payment.shippingContact, true);\n\n this.setState({\n applePayToken: btoa(JSON.stringify(event.payment.token.paymentData)),\n authorizedEvent: event,\n ...(billingAddress && { billingAddress }),\n ...(deliveryAddress && { deliveryAddress })\n });\n\n this.handleAuthorization()\n .then(this.makePaymentsCall)\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.collectOrderTrackingDetailsIfNeeded)\n .then(({ paymentResponse, orderDetails }) => {\n resolve({\n status: ApplePaySession.STATUS_SUCCESS,\n ...(orderDetails && { orderDetails })\n });\n return paymentResponse;\n })\n .then(paymentResponse => {\n this.handleResponse(paymentResponse);\n })\n .catch((paymentResponse?: RawPaymentResponse) => {\n const errors = paymentResponse?.error?.applePayError;\n\n reject({\n status: ApplePaySession.STATUS_FAILURE,\n errors: errors ? (Array.isArray(errors) ? errors : [errors]) : undefined\n });\n\n const responseWithError: RawPaymentResponse = {\n ...paymentResponse,\n error: {\n applePayError: errors\n }\n };\n\n this.handleFailedResult(responseWithError);\n });\n }\n });\n\n return new Promise((resolve, reject) => this.props.onClick(resolve, reject))\n .then(() => {\n session.begin();\n })\n .catch(() => ({\n // Swallow exception triggered by onClick reject\n }));\n }\n\n /**\n * Call the 'onAuthorized' callback if available.\n * Must be resolved/reject for the payment flow to continue\n *\n * @private\n */\n private async handleAuthorization(): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n if (!this.props.onAuthorized) {\n resolve();\n }\n\n const { authorizedEvent, billingAddress, deliveryAddress } = this.state;\n\n this.props.onAuthorized(\n {\n authorizedEvent,\n ...(billingAddress && { billingAddress }),\n ...(deliveryAddress && { deliveryAddress })\n },\n { resolve, reject }\n );\n }).catch((error?: ApplePayJS.ApplePayError) => {\n // Format error in a way that the 'catch' of the 'onPaymentAuthorize' block accepts it\n const data = { error: { applePayError: error } };\n return Promise.reject(data);\n });\n }\n\n /**\n * Verify if the 'onOrderTrackingRequest' is provided. If so, triggers the callback expecting an\n * Apple Pay order details back\n *\n * @private\n */\n private async collectOrderTrackingDetailsIfNeeded(\n paymentResponse: PaymentResponseData\n ): Promise<{ orderDetails?: ApplePayPaymentOrderDetails; paymentResponse: PaymentResponseData }> {\n return new Promise<ApplePayPaymentOrderDetails | void>((resolve, reject) => {\n if (!this.props.onOrderTrackingRequest) {\n return resolve();\n }\n\n this.props.onOrderTrackingRequest(resolve, reject);\n })\n .then(orderDetails => {\n return {\n paymentResponse,\n ...(orderDetails && { orderDetails })\n };\n })\n .catch(() => {\n return { paymentResponse };\n });\n }\n\n private async validateMerchant(resolve, reject) {\n const { hostname: domainName } = window.location;\n const { clientKey, configuration, loadingContext, initiative } = this.props;\n const { merchantName, merchantId } = configuration;\n const path = `v1/applePay/sessions?clientKey=${clientKey}`;\n const options = { loadingContext, path };\n const request: ApplePaySessionRequest = {\n displayName: merchantName,\n domainName,\n initiative,\n merchantIdentifier: merchantId\n };\n\n try {\n const response = await httpPost(options, request);\n const decodedData: DecodeObject = base64.decode(response.data);\n if (!decodedData.success) {\n reject('Could not decode Apple Pay session');\n } else {\n const session = JSON.parse(decodedData.data);\n resolve(session);\n }\n } catch (e) {\n reject('Could not get Apple Pay session');\n }\n }\n\n render() {\n if (!this.props.showPayButton) {\n return null;\n }\n\n return (\n <ApplePayButton\n buttonStyle={this.props.buttonColor}\n buttonType={this.props.buttonType}\n buttonLocale={this.props.buttonLocale}\n onClick={this.submit}\n />\n );\n }\n}\n\nexport default ApplePayElement;\n","export default {\n API_VERSION: 2,\n API_VERSION_MINOR: 0,\n GATEWAY: 'adyen',\n URL: 'https://pay.google.com/gp/p/js/pay.js'\n};\n","import { getDecimalAmount } from '../../utils/amount-util';\nimport config from './config';\nimport { GooglePaymentDataRequest, GooglePayConfiguration } from './types';\n\n/**\n * Configure your site's support for payment methods supported by the Google Pay API.\n *\n * @see {@link https://developers.google.com/pay/api/web/reference/object#IsReadyToPayRequest|isReadyToPayRequest}\n * @returns Google Pay API version, payment methods supported by the site\n */\nexport function isReadyToPayRequest({\n allowedAuthMethods,\n allowedCardNetworks,\n existingPaymentMethodRequired = false\n}: Pick<\n GooglePayConfiguration,\n 'allowedAuthMethods' | 'allowedCardNetworks' | 'existingPaymentMethodRequired'\n>): google.payments.api.IsReadyToPayRequest {\n return {\n apiVersion: config.API_VERSION,\n apiVersionMinor: config.API_VERSION_MINOR,\n allowedPaymentMethods: [\n {\n type: 'CARD',\n parameters: {\n allowedAuthMethods,\n allowedCardNetworks\n },\n tokenizationSpecification: {\n type: 'PAYMENT_GATEWAY',\n parameters: {}\n }\n }\n ],\n existingPaymentMethodRequired\n };\n}\n\n/**\n * Provide Google Pay API with a payment amount, currency, and amount status\n *\n * @see {@link https://developers.google.com/pay/api/web/reference/object#TransactionInfo|TransactionInfo}\n * @returns transaction info, suitable for use as transactionInfo property of PaymentDataRequest\n */\nexport function getTransactionInfo({\n amount,\n countryCode = 'US',\n totalPriceStatus = 'FINAL',\n ...props\n}: GooglePayConfiguration): google.payments.api.TransactionInfo {\n const formattedPrice = String(getDecimalAmount(amount.value, amount.currency));\n\n return {\n countryCode,\n currencyCode: amount.currency,\n totalPrice: formattedPrice,\n totalPriceStatus: totalPriceStatus,\n ...props.transactionInfo\n };\n}\n\nexport function initiatePaymentRequest({ configuration, ...props }: GooglePayConfiguration, countryCode: string): GooglePaymentDataRequest {\n return {\n apiVersion: config.API_VERSION,\n apiVersionMinor: config.API_VERSION_MINOR,\n transactionInfo: getTransactionInfo({ countryCode, ...props }),\n merchantInfo: {\n merchantId: configuration.merchantId,\n merchantName: configuration.merchantName,\n ...(configuration.merchantOrigin ? { merchantOrigin: configuration.merchantOrigin } : {}),\n ...(configuration.authJwt ? { authJwt: configuration.authJwt } : {})\n },\n allowedPaymentMethods: [\n {\n type: 'CARD',\n tokenizationSpecification: {\n type: 'PAYMENT_GATEWAY',\n parameters: {\n gateway: config.GATEWAY,\n gatewayMerchantId: configuration.gatewayMerchantId\n }\n },\n parameters: {\n allowedAuthMethods: props.allowedAuthMethods,\n allowedCardNetworks: props.allowedCardNetworks,\n assuranceDetailsRequired: props.assuranceDetailsRequired,\n allowPrepaidCards: props.allowPrepaidCards,\n allowCreditCards: props.allowCreditCards,\n billingAddressRequired: props.billingAddressRequired,\n billingAddressParameters: props.billingAddressParameters\n }\n }\n ],\n emailRequired: props.emailRequired,\n shippingAddressRequired: props.shippingAddressRequired,\n shippingAddressParameters: props.shippingAddressParameters,\n shippingOptionRequired: props.shippingOptionRequired,\n shippingOptionParameters: props.shippingOptionParameters,\n callbackIntents: props.callbackIntents\n };\n}\n","import { AddressData } from '../../types/global-types';\n\n/**\n *\n */\nexport function resolveEnvironment(env = 'TEST'): google.payments.api.Environment {\n const environment = env.toLowerCase();\n switch (environment) {\n case 'production':\n case 'live':\n case 'live-au':\n case 'live-apse':\n case 'live-us':\n case 'live-in':\n return 'PRODUCTION';\n default:\n return 'TEST';\n }\n}\n\n/**\n * This function formats Google Pay contact format to Adyen address format\n *\n * Setting 'houseNumberOrName' to ZZ won't affect the AVS check, and it will make the algorithm take the\n * house number from the 'street' property.\n */\nexport function formatGooglePayContactToAdyenAddressFormat(\n paymentContact?: Partial<google.payments.api.Address>,\n isDeliveryAddress?: boolean\n): AddressData | undefined {\n if (!paymentContact) {\n return;\n }\n\n return {\n postalCode: paymentContact.postalCode,\n country: paymentContact.countryCode,\n street: [paymentContact.address1, paymentContact.address2, paymentContact.address3].join(' ').trim(),\n houseNumberOrName: 'ZZ',\n city: paymentContact.locality || '',\n ...(paymentContact.administrativeArea && { stateOrProvince: paymentContact.administrativeArea }),\n ...(isDeliveryAddress && {\n firstName: paymentContact.name\n })\n };\n}\n\nconst supportedLocales = [\n 'en',\n 'ar',\n 'bg',\n 'ca',\n 'cs',\n 'da',\n 'de',\n 'el',\n 'es',\n 'et',\n 'fi',\n 'fr',\n 'hr',\n 'id',\n 'it',\n 'ja',\n 'ko',\n 'ms',\n 'nl',\n 'no',\n 'pl',\n 'pt',\n 'ru',\n 'sk',\n 'sl',\n 'sr',\n 'sv',\n 'th',\n 'tr',\n 'uk',\n 'zh'\n];\n\nexport function getGooglePayLocale(locale = '') {\n const twoLetterLocale = locale.toLowerCase().substring(0, 2);\n return supportedLocales.includes(twoLetterLocale) ? twoLetterLocale : null;\n}\n","import { isReadyToPayRequest, initiatePaymentRequest } from './requests';\nimport { resolveEnvironment } from './utils';\nimport Script from '../../utils/Script';\nimport config from './config';\nimport type { GooglePayConfiguration } from './types';\n\nclass GooglePayService {\n public readonly paymentsClient: Promise<google.payments.api.PaymentsClient>;\n\n constructor(environment: string, paymentDataCallbacks: google.payments.api.PaymentDataCallbacks) {\n const googlePayEnvironment = resolveEnvironment(environment);\n\n this.paymentsClient = this.getGooglePaymentsClient({\n environment: googlePayEnvironment,\n paymentDataCallbacks\n });\n }\n\n /**\n * Initialize a Google Pay API client\n *\n * @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}\n * @returns Google Pay API client\n */\n async getGooglePaymentsClient(paymentOptions: google.payments.api.PaymentOptions): Promise<google.payments.api.PaymentsClient> {\n if (!window.google?.payments) {\n const script = new Script(config.URL);\n await script.load();\n }\n\n return new google.payments.api.PaymentsClient(paymentOptions);\n }\n\n /**\n * Determine a shopper's ability to return a form of payment from the Google Pay API.\n * @see {@link https://developers.google.com/pay/api/web/reference/client#isReadyToPay|isReadyToPay}\n */\n isReadyToPay(props): Promise<google.payments.api.IsReadyToPayResponse> {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (!this.paymentsClient) return Promise.reject(new Error('Google Pay is not available'));\n\n return this.paymentsClient.then(client => client.isReadyToPay(isReadyToPayRequest(props)));\n }\n\n prefetchPaymentData(props: GooglePayConfiguration, countryCode: string): void {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (!this.paymentsClient) throw new Error('Google Pay is not available');\n\n const paymentDataRequest = initiatePaymentRequest(props, countryCode);\n void this.paymentsClient.then(client => client.prefetchPaymentData(paymentDataRequest));\n }\n\n /**\n * Show Google Pay payment sheet when Google Pay payment button is clicked\n * @returns paymentData response from Google Pay API after user approves payment\n * @see {@link https://developers.google.com/pay/api/web/reference/object#PaymentData|PaymentData object reference}\n */\n initiatePayment(props: GooglePayConfiguration, countryCode: string): Promise<google.payments.api.PaymentData> {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (!this.paymentsClient) throw new Error('Google Pay is not available');\n\n const paymentDataRequest = initiatePaymentRequest(props, countryCode);\n return this.paymentsClient.then(client => client.loadPaymentData(paymentDataRequest));\n }\n}\n\nexport default GooglePayService;\n","import { h } from 'preact';\nimport { useEffect, useRef } from 'preact/hooks';\nimport './GooglePayButton.scss';\n\ninterface GooglePayButtonProps {\n buttonColor: google.payments.api.ButtonColor;\n buttonType: google.payments.api.ButtonType;\n buttonSizeMode: google.payments.api.ButtonSizeMode;\n buttonLocale: string;\n buttonRadius?: number;\n buttonRootNode?: HTMLDocument | ShadowRoot;\n paymentsClient: Promise<google.payments.api.PaymentsClient>;\n onClick: (e: Event) => void;\n}\n\nconst GooglePayButton = (props: GooglePayButtonProps) => {\n const googlePayWrapperRef = useRef<HTMLDivElement | undefined>(undefined);\n\n useEffect(() => {\n const { onClick, buttonRadius, buttonColor, buttonType, buttonLocale, buttonSizeMode, buttonRootNode, paymentsClient } = props;\n\n void paymentsClient\n .then(client =>\n client.createButton({\n onClick,\n buttonType,\n buttonColor,\n buttonLocale,\n buttonSizeMode,\n buttonRootNode,\n ...(buttonRadius !== undefined && { buttonRadius })\n })\n )\n .then(googlePayButton => {\n if (googlePayWrapperRef.current) {\n googlePayWrapperRef.current.appendChild(googlePayButton);\n }\n });\n }, [props.buttonColor, props.buttonType, props.buttonLocale, props.buttonSizeMode, props.buttonRootNode, props.paymentsClient]);\n\n return <div data-testid=\"googlepay-button-container\" className={'adyen-checkout__paywithgoogle'} ref={googlePayWrapperRef} />;\n};\n\nexport default GooglePayButton;\n","import { GooglePayConfiguration } from './types';\n\nconst defaultProps: GooglePayConfiguration = {\n isExpress: false,\n\n // isReadyToPayRequest\n existingPaymentMethodRequired: false,\n\n // ButtonOptions\n // https://developers.google.com/pay/api/web/reference/object#ButtonOptions\n buttonColor: 'default',\n buttonType: 'buy',\n buttonSizeMode: 'fill',\n\n // PaymentDataRequest\n configuration: {\n // Adyen's merchant account\n gatewayMerchantId: '', // E.g TestMerchant\n\n // https://developers.google.com/pay/api/web/reference/object#MerchantInfo\n merchantId: '', // E.g 039484839309\n merchantName: '' // E.g Example Merchant,\n },\n\n // Payment\n amount: {\n value: 0,\n currency: 'USD'\n },\n\n totalPriceStatus: 'FINAL',\n\n // Callbacks\n onClick: resolve => resolve(),\n\n // CardParameters\n // https://developers.google.com/pay/api/web/reference/object#CardParameters\n allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'] as google.payments.api.CardAuthMethod[],\n allowedCardNetworks: ['AMEX', 'DISCOVER', 'JCB', 'MASTERCARD', 'VISA'] as google.payments.api.CardNetwork[],\n allowCreditCards: true, // Set to false if you don't support credit cards.\n allowPrepaidCards: true, // Set to false if you don't support prepaid cards.\n billingAddressRequired: false, // A billing address should only be requested if it's required to process the transaction.\n billingAddressParameters: undefined, // The expected fields returned if billingAddressRequired is set to true.\n assuranceDetailsRequired: false, // https://developers.google.com/pay/api/web/reference/response-objects#assurance-details-specifications\n\n emailRequired: false,\n shippingAddressRequired: false,\n shippingAddressParameters: undefined, // https://developers.google.com/pay/api/web/reference/object#ShippingAddressParameters\n shippingOptionRequired: false,\n shippingOptionParameters: undefined,\n callbackIntents: []\n};\n\nexport default defaultProps;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport GooglePayService from './GooglePayService';\nimport GooglePayButton from './components/GooglePayButton';\nimport defaultProps from './defaultProps';\nimport { formatGooglePayContactToAdyenAddressFormat, getGooglePayLocale } from './utils';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { TxVariants } from '../tx-variants';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport {\n ANALYTICS_EXPRESS_PAGES_ARRAY,\n ANALYTICS_INSTANT_PAYMENT_BUTTON,\n ANALYTICS_RENDERED_STR,\n ANALYTICS_SELECTED_STR\n} from '../../core/Analytics/constants';\n\nimport type { AddressData, BrowserInfo, PaymentMethod, PaymentResponseData, RawPaymentResponse } from '../../types/global-types';\nimport type { GooglePayConfiguration } from './types';\nimport type { ICore } from '../../core/types';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\n\nclass GooglePay extends UIElement<GooglePayConfiguration> {\n public static type = TxVariants.googlepay;\n public static txVariants = [TxVariants.googlepay, TxVariants.paywithgoogle];\n public static defaultProps = defaultProps;\n\n protected readonly googlePay;\n\n constructor(checkout: ICore, props?: GooglePayConfiguration) {\n super(checkout, props);\n this.handleAuthorization = this.handleAuthorization.bind(this);\n this.showGooglePayPaymentSheet = this.showGooglePayPaymentSheet.bind(this);\n\n const { isExpress, paymentDataCallbacks } = this.props;\n\n if (isExpress === false && paymentDataCallbacks?.onPaymentDataChanged) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n 'GooglePay - You must set \"isExpress\" flag to \"true\" in order to use \"onPaymentDataChanged\" callback'\n );\n }\n\n if (!this.props.configuration.merchantId) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n 'GooglePay - Missing merchantId. Please ensure that it is correctly configured in your customer area.'\n );\n }\n\n this.googlePay = new GooglePayService(this.props.environment, {\n ...(isExpress && paymentDataCallbacks?.onPaymentDataChanged && { onPaymentDataChanged: paymentDataCallbacks.onPaymentDataChanged }),\n onPaymentAuthorized: this.onPaymentAuthorized\n });\n }\n\n /**\n * Google Pay requires custom logic due to supporting two Tx variants that lead to the same payment method.\n * If the merchant creates a standalone Google Pay component, we need to verify if the payment method is available using both tx variants\n *\n * @param type\n * @returns\n */\n protected override getPaymentMethodFromPaymentMethodsResponse(type?: string): PaymentMethod {\n return (\n this.core.paymentMethodsResponse.find(type || this.constructor['type']) || this.core.paymentMethodsResponse.find(TxVariants.paywithgoogle)\n );\n }\n\n protected override formatProps(props): GooglePayConfiguration {\n const buttonSizeMode = props.buttonSizeMode ?? (props.isDropin ? 'fill' : 'static');\n const buttonLocale = getGooglePayLocale(props.buttonLocale ?? props.i18n?.locale);\n\n const callbackIntents: google.payments.api.CallbackIntent[] = [...props.callbackIntents, 'PAYMENT_AUTHORIZATION'];\n\n return {\n ...props,\n configuration: props.configuration,\n buttonSizeMode,\n buttonLocale,\n callbackIntents\n };\n }\n\n /**\n * Formats the component data output\n */\n protected override formatData() {\n const { googlePayCardNetwork, googlePayToken, billingAddress, deliveryAddress } = this.state;\n const { isExpress } = this.props;\n\n return {\n paymentMethod: {\n type: this.type,\n googlePayCardNetwork,\n googlePayToken,\n ...(isExpress && { subtype: 'express' })\n },\n browserInfo: this.browserInfo,\n origin: !!window && window.location.origin,\n ...(billingAddress && { billingAddress }),\n ...(deliveryAddress && { deliveryAddress })\n };\n }\n\n protected submitAnalytics(analyticsObj: AnalyticsEvent) {\n // Analytics will need to know about this.props.isExpress & this.props.expressPage\n if (analyticsObj instanceof AnalyticsInfoEvent && analyticsObj.type === ANALYTICS_RENDERED_STR) {\n const { isExpress, expressPage } = this.props;\n const hasExpressPage = expressPage && ANALYTICS_EXPRESS_PAGES_ARRAY.includes(expressPage);\n\n if (typeof isExpress === 'boolean') {\n analyticsObj.isExpress = isExpress;\n }\n\n if (isExpress === true && hasExpressPage) {\n analyticsObj.expressPage = expressPage; // We only care about the expressPage value if isExpress is true\n }\n }\n\n super.submitAnalytics(analyticsObj);\n }\n\n /**\n * Displays the Google Pay payment sheet overlay\n */\n private showGooglePayPaymentSheet() {\n this.googlePay.initiatePayment(this.props, this.core.options.countryCode).catch((error: google.payments.api.PaymentsError) => {\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n this.handleError(new AdyenCheckoutError(error.statusCode === 'CANCELED' ? 'CANCEL' : 'ERROR', error.toString(), { cause: error }));\n });\n }\n\n public override submit = () => {\n if (this.props.isInstantPayment) {\n const event = new AnalyticsInfoEvent({\n type: ANALYTICS_SELECTED_STR,\n target: ANALYTICS_INSTANT_PAYMENT_BUTTON\n });\n\n this.submitAnalytics(event);\n }\n\n new Promise<void>((resolve, reject) => this.props.onClick(resolve, reject)).then(this.showGooglePayPaymentSheet).catch(() => {\n // Swallow exception triggered by onClick reject\n });\n };\n\n /**\n * Method called when the payment is authorized in the payment sheet\n *\n * @see https://developers.google.com/pay/api/web/reference/client#onPaymentAuthorized\n **/\n private onPaymentAuthorized = async (paymentData: google.payments.api.PaymentData): Promise<google.payments.api.PaymentAuthorizationResult> => {\n const billingAddress: AddressData = formatGooglePayContactToAdyenAddressFormat(paymentData.paymentMethodData.info.billingAddress);\n const deliveryAddress: AddressData = formatGooglePayContactToAdyenAddressFormat(paymentData.shippingAddress, true);\n\n this.setState({\n authorizedEvent: paymentData,\n googlePayToken: paymentData.paymentMethodData.tokenizationData.token,\n googlePayCardNetwork: paymentData.paymentMethodData.info.cardNetwork,\n ...(billingAddress && { billingAddress }),\n ...(deliveryAddress && { deliveryAddress })\n });\n\n return new Promise<google.payments.api.PaymentAuthorizationResult>(resolve => {\n this.handleAuthorization()\n .then(this.makePaymentsCall)\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then((paymentResponse: PaymentResponseData) => {\n resolve({ transactionState: 'SUCCESS' });\n return paymentResponse;\n })\n .then(paymentResponse => {\n this.handleResponse(paymentResponse);\n })\n .catch((paymentResponse?: RawPaymentResponse) => {\n this.setElementStatus('ready');\n\n const googlePayError = paymentResponse?.error?.googlePayError;\n const fallbackMessage = this.props.i18n.get('error.subtitle.payment');\n\n const error: google.payments.api.PaymentDataError =\n typeof googlePayError === 'string' || undefined\n ? {\n intent: 'PAYMENT_AUTHORIZATION',\n reason: 'OTHER_ERROR',\n message: (googlePayError as string) || fallbackMessage\n }\n : {\n intent: googlePayError?.intent || 'PAYMENT_AUTHORIZATION',\n reason: googlePayError?.reason || 'OTHER_ERROR',\n message: googlePayError?.message || fallbackMessage\n };\n\n resolve({\n transactionState: 'ERROR',\n error\n });\n\n const responseWithError = {\n ...paymentResponse,\n error: {\n googlePayError: error\n }\n };\n\n this.handleFailedResult(responseWithError);\n });\n });\n };\n\n /**\n * Call the 'onAuthorized' callback if available.\n * Must be resolved/reject for the payment flow to continue\n */\n private async handleAuthorization(): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n if (!this.props.onAuthorized) {\n resolve();\n }\n\n const { authorizedEvent, billingAddress, deliveryAddress } = this.state;\n\n this.props.onAuthorized(\n {\n authorizedEvent,\n ...(billingAddress && { billingAddress }),\n ...(deliveryAddress && { deliveryAddress })\n },\n { resolve, reject }\n );\n }).catch((error?: google.payments.api.PaymentDataError | string) => {\n // Format error in a way that the 'catch' of the 'onPaymentAuthorize' block accepts it\n const data = { error: { googlePayError: error } };\n return Promise.reject(data);\n });\n }\n\n public get isValid(): boolean {\n return true;\n }\n\n /**\n * Determine a shopper's ability to return a form of payment from the Google Pay API.\n */\n public override async isAvailable(): Promise<void> {\n return this.isReadyToPay()\n .then(response => {\n if (!response.result) {\n throw new AdyenCheckoutError('ERROR', 'GooglePay is not available');\n }\n\n if (response.paymentMethodPresent === false) {\n throw new AdyenCheckoutError('ERROR', 'GooglePay - No paymentMethodPresent');\n }\n\n return Promise.resolve();\n })\n .catch(error => {\n return Promise.reject(error);\n });\n }\n\n /**\n * Determine a shopper's ability to return a form of payment from the Google Pay API.\n */\n public isReadyToPay = (): Promise<google.payments.api.IsReadyToPayResponse> => {\n return this.googlePay.isReadyToPay(this.props);\n };\n\n /**\n * Use this method to prefetch a PaymentDataRequest configuration to improve loadPaymentData execution time on later user interaction. No value is returned.\n */\n public prefetch = (): void => {\n return this.googlePay.prefetchPaymentData(this.props, this.core.options.countryCode);\n };\n\n get browserInfo(): BrowserInfo {\n return collectBrowserInfo();\n }\n\n get icon(): string {\n return this.props.icon ?? this.resources.getImage()('googlepay');\n }\n\n render() {\n if (this.props.showPayButton) {\n return (\n <GooglePayButton\n buttonColor={this.props.buttonColor}\n buttonType={this.props.buttonType}\n buttonSizeMode={this.props.buttonSizeMode}\n buttonLocale={this.props.buttonLocale}\n buttonRootNode={this.props.buttonRootNode}\n buttonRadius={this.props.buttonRadius}\n paymentsClient={this.googlePay.paymentsClient}\n onClick={this.submit}\n />\n );\n }\n\n return null;\n }\n}\n\nexport default GooglePay;\n","/**\n * Returns true if the page is being run in an iframe with the same origin as the parent.\n * In this scenario, if the merchant has set redirectFromTopWhenInIframe: true, then we can perform the redirect on the top level, parent, window;\n * rather than on the iframe's window\n */\nexport default () => {\n try {\n if (window.parent.location.href) {\n return window.location !== window.parent.location; // iframe check: locations will differ if we're in an iframe\n }\n } catch (e) {\n return false; // we cannot access window.parent.location.href - so consider us \"not to be in an iframe\" for the purpose of Redirects\n }\n};\n","import { Component, h } from 'preact';\nimport detectInIframeInSameOrigin from '../../../../utils/detectInIframeInSameOrigin';\nimport { ActionHandledReturnObject } from '../../../../types/global-types';\n\ninterface RedirectShopperProps {\n beforeRedirect: (resolve, reject, url) => Promise<void>;\n url: string;\n method: 'GET' | 'POST';\n data?: any;\n redirectFromTopWhenInIframe?: boolean;\n paymentMethodType?: string;\n onActionHandled?: (rtnObj: ActionHandledReturnObject) => void;\n onRedirectError?: () => void;\n}\n\nclass RedirectShopper extends Component<RedirectShopperProps> {\n private postForm;\n public static defaultProps = {\n beforeRedirect: resolve => resolve(),\n onRedirectError: () => {},\n method: 'GET'\n };\n\n componentDidMount() {\n const doRedirect = () => {\n // call callback\n this.props.onActionHandled?.({\n componentType: this.props.paymentMethodType,\n actionDescription: 'performing-redirect'\n });\n\n // perform redirect\n if (this.postForm) {\n this.postForm.submit();\n } else {\n if (this.props.redirectFromTopWhenInIframe && detectInIframeInSameOrigin()) {\n // if in an iframe and the config prop allows it - try to redirect from the top level window\n window.top.location.assign?.(this.props.url);\n } else {\n window.location.assign(this.props.url);\n }\n }\n };\n\n const dispatchEvent = new Promise(\n (resolve, reject) =>\n void this.props.beforeRedirect(resolve, reject, {\n url: this.props.url,\n method: this.props.method,\n ...(this.props.data ? { data: this.props.data } : {})\n })\n );\n\n dispatchEvent.then(doRedirect).catch(() => {\n this.props.onRedirectError();\n });\n }\n\n render({ url, method, data = {} }) {\n if (method === 'POST') {\n return (\n <form\n method=\"post\"\n data-testid=\"redirect-shopper-form\"\n action={url}\n style={{ display: 'none' }}\n ref={ref => {\n this.postForm = ref;\n }}\n {...(this.props.redirectFromTopWhenInIframe && detectInIframeInSameOrigin() && { target: '_top' })}\n >\n {Object.keys(data).map(key => (\n <input type=\"hidden\" name={key} key={key} value={data[key]} />\n ))}\n </form>\n );\n }\n\n return null;\n }\n}\n\nexport default RedirectShopper;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport RedirectShopper from './components/RedirectShopper';\nimport RedirectButton from '../internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport { RedirectConfiguration } from './types';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport { ANALYTICS_ERROR_CODE, ANALYTICS_ERROR_TYPE } from '../../core/Analytics/constants';\nimport { AnalyticsErrorEvent } from '../../core/Analytics/AnalyticsErrorEvent';\n\nclass RedirectElement extends UIElement<RedirectConfiguration> {\n public static type = TxVariants.redirect;\n\n public static defaultProps = {\n type: RedirectElement.type\n };\n\n formatData() {\n return {\n paymentMethod: {\n type: this.type\n },\n browserInfo: this.browserInfo\n };\n }\n\n private handleRedirectError = () => {\n const event = new AnalyticsErrorEvent({\n component: this.props.paymentMethodType,\n errorType: ANALYTICS_ERROR_TYPE.redirect,\n code: ANALYTICS_ERROR_CODE.redirect\n });\n super.submitAnalytics(event);\n };\n\n get isValid() {\n return true;\n }\n\n get browserInfo() {\n return collectBrowserInfo();\n }\n\n render() {\n if (this.props.url && this.props.method) {\n return (\n <RedirectShopper\n url={this.props.url}\n {...this.props}\n onActionHandled={this.onActionHandled}\n onRedirectError={this.handleRedirectError}\n />\n );\n }\n\n if (this.props.showPayButton) {\n return (\n <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n <RedirectButton\n {...this.props}\n showPayButton={this.props.showPayButton}\n name={this.displayName}\n onSubmit={this.submit}\n payButton={this.payButton}\n ref={ref => {\n this.componentRef = ref;\n }}\n />\n </CoreProvider>\n );\n }\n\n return null;\n }\n}\n\nexport default RedirectElement;\n","const API_ENVIRONMENTS = {\n test: 'https://checkoutshopper-test.adyen.com/checkoutshopper/',\n live: 'https://checkoutshopper-live.adyen.com/checkoutshopper/',\n 'live-us': 'https://checkoutshopper-live-us.adyen.com/checkoutshopper/',\n 'live-au': 'https://checkoutshopper-live-au.adyen.com/checkoutshopper/',\n 'live-apse': 'https://checkoutshopper-live-apse.adyen.com/checkoutshopper/',\n 'live-in': 'https://checkoutshopper-live-in.adyen.com/checkoutshopper/',\n fallback: 'https://checkoutshopper-live.adyen.com/checkoutshopper/'\n};\n\nconst CDN_ENVIRONMENTS = {\n test: 'https://checkoutshopper-test.cdn.adyen.com/checkoutshopper/',\n live: 'https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/',\n 'live-us': 'https://checkoutshopper-live-us.cdn.adyen.com/checkoutshopper/',\n 'live-au': 'https://checkoutshopper-live-au.cdn.adyen.com/checkoutshopper/',\n 'live-apse': 'https://checkoutshopper-live-apse.cdn.adyen.com/checkoutshopper/',\n 'live-in': 'https://checkoutshopper-live-in.cdn.adyen.com/checkoutshopper/',\n fallback: 'https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/'\n};\n\nconst ANALYTICS_ENVIRONMENTS = {\n test: 'https://checkoutanalytics-test.adyen.com/checkoutanalytics/',\n live: 'https://checkoutanalytics-live.adyen.com/checkoutanalytics/',\n 'live-us': 'https://checkoutanalytics-live-us.adyen.com/checkoutanalytics/',\n 'live-au': 'https://checkoutanalytics-live-au.adyen.com/checkoutanalytics/',\n 'live-apse': 'https://checkoutanalytics-live-apse.adyen.com/checkoutanalytics/',\n 'live-in': 'https://checkoutanalytics-live-in.adyen.com/checkoutanalytics/',\n fallback: 'https://checkoutanalytics-live.adyen.com/checkoutanalytics/'\n};\n\nexport { API_ENVIRONMENTS, CDN_ENVIRONMENTS, ANALYTICS_ENVIRONMENTS };\n","import { ANALYTICS_ENVIRONMENTS, API_ENVIRONMENTS, CDN_ENVIRONMENTS } from './constants';\nimport type { CoreConfiguration } from '../types';\n\nexport const getUrlFromMap = (env: CoreConfiguration['environment'], environmentMap: Record<string, string>, environmentUrl?: string): string => {\n if (environmentUrl) {\n return environmentUrl;\n }\n return environmentMap[env?.toLowerCase()] || environmentMap.fallback;\n};\n\nexport const resolveEnvironments = (environment: CoreConfiguration['environment'], environmentsUrls?: CoreConfiguration['_environmentUrls']) => {\n const apiUrl = getUrlFromMap(environment, API_ENVIRONMENTS, environmentsUrls?.api);\n const analyticsUrl = getUrlFromMap(environment, ANALYTICS_ENVIRONMENTS, environmentsUrls?.analytics);\n const cdnImagesUrl = getUrlFromMap(environment, CDN_ENVIRONMENTS, environmentsUrls?.cdn?.images);\n const cdnTranslationsUrl =\n process.env.NODE_ENV === 'development' ? '/' : getUrlFromMap(environment, CDN_ENVIRONMENTS, environmentsUrls?.cdn?.translations);\n\n return {\n apiUrl,\n analyticsUrl,\n cdnImagesUrl,\n cdnTranslationsUrl\n };\n};\n","import { GENERIC_OPTIONS } from './config';\nimport type { CoreConfiguration } from './types';\n\n/**\n * Filter properties in a global configuration object from an allow list (GENERIC_OPTIONS)\n * @param globalOptions -\n * @returns any\n */\nexport function processGlobalOptions(globalOptions) {\n return Object.keys(globalOptions).reduce((r, e) => {\n if (GENERIC_OPTIONS.includes(e)) r[e] = globalOptions[e];\n return r;\n }, {});\n}\n\n/**\n * Validates that there is no unknown property as part of the CoreConfiguration.\n * The validator makes sure to throw a lint error in case a property is added to CoreConfiguration, but it is not added here\n *\n * @param props - AdyenCheckout props\n */\nexport function assertConfigurationPropertiesAreValid(propsSetByMerchant: CoreConfiguration): void {\n /** Helper that creates a function that validates the array contain ALL CoreConfiguration properties in it */\n function createConfigurationKeysValidator<T>() {\n const arrayOfAll =\n <T>() =>\n <U extends T[]>(array: U & ([T] extends [U[number]] ? unknown : 'Invalid')) =>\n array;\n const arrayWithAllKeys = arrayOfAll<T>();\n return arrayWithAllKeys;\n }\n\n const validator = createConfigurationKeysValidator<keyof CoreConfiguration>();\n const possibleFields = validator([\n 'session',\n 'environment',\n '_environmentUrls',\n 'showPayButton',\n 'clientKey',\n 'locale',\n 'translations',\n 'paymentMethodsResponse',\n 'amount',\n 'secondaryAmount',\n 'countryCode',\n 'allowPaymentMethods',\n 'removePaymentMethods',\n 'srConfig',\n 'analytics',\n 'risk',\n 'order',\n 'exposeLibraryMetadata',\n 'beforeRedirect',\n 'beforeSubmit',\n 'onPaymentCompleted',\n 'onPaymentFailed',\n 'onSubmit',\n 'onAdditionalDetails',\n 'onActionHandled',\n 'onChange',\n 'onError',\n 'onBalanceCheck',\n 'onOrderRequest',\n 'onPaymentMethodsRequest',\n 'onOrderCancel',\n 'onOrderUpdated',\n 'loadingContext',\n 'onEnterKeyPressed',\n 'afterAdditionalDetails'\n ]);\n\n Object.keys(propsSetByMerchant).forEach((prop: keyof CoreConfiguration) => {\n if (!possibleFields.includes(prop)) {\n console.warn(\n `AdyenCheckout - Configuration property \"${prop}\" is not a valid AdyenCheckout property. If it is a payment method configuration, make sure to pass it directly to the Component. If you are using Drop-in, make sure to pass it to \"paymentMethodsConfiguration\" object`\n );\n }\n });\n}\n\n/**\n * TODO: Check if this is correct place\n * Type guard for enums, helpful to make sure strings keep enum value\n * Comes from this: https://github.com/microsoft/TypeScript/issues/30611#issuecomment-570773496\n * @param enumVariable\n */\nexport function createEnumChecker<T extends string, TEnumValue extends string>(enumVariable: { [key in T]: TEnumValue }) {\n const enumValues = Object.values(enumVariable);\n return (value: string): value is TEnumValue => enumValues.includes(value);\n}\n","import { getTranslation } from './utils';\nimport { getLocalisedAmount } from '../utils/amount-util';\nimport AdyenCheckoutError from '../core/Errors/AdyenCheckoutError';\nimport type { CustomTranslations, LanguageOptions, Translations } from './types';\n\nexport class Language {\n public readonly locale: string;\n public readonly languageCode: string;\n\n private readonly translations: Translations;\n private readonly customTranslations: CustomTranslations;\n\n public readonly timeFormatOptions: Intl.DateTimeFormatOptions = {\n hour: 'numeric',\n minute: 'numeric'\n };\n public readonly timeAndDateFormatOptions: Intl.DateTimeFormatOptions = {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n ...this.timeFormatOptions\n };\n public readonly timeAndDateFormatter: Intl.DateTimeFormat;\n\n constructor(props: LanguageOptions) {\n const { locale, translations, customTranslations } = props;\n\n if (!locale) {\n throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'Language: \"locale\" property is not defined');\n }\n\n this.locale = locale;\n this.languageCode = this.locale.split('-')[0];\n this.customTranslations = customTranslations || {};\n\n this.timeAndDateFormatter = Intl.DateTimeFormat(this.locale, this.timeAndDateFormatOptions);\n\n this.translations = {\n ...translations,\n ...(!!this.customTranslations[this.locale] && this.customTranslations[this.locale])\n };\n }\n\n /**\n * Returns a translated string from a key in the current {@link Language.locale}\n * @param key - Translation key\n * @param options - Translation options\n * @returns Translated string\n */\n public get(key: string, options?): string {\n const translation = getTranslation(this.translations, key, options);\n if (translation !== null) {\n return translation;\n }\n\n return key;\n }\n\n /**\n * Returns a localized string for an amount\n * @param amount - Amount to be converted\n * @param currencyCode - Currency code of the amount\n * @param options - Options for String.prototype.toLocaleString\n */\n public amount(amount: number, currencyCode: string, options?: object): string {\n return getLocalisedAmount(amount, this.locale, currencyCode, options);\n }\n\n /**\n * Returns a localized string for a date\n * @param date - Date to be localized\n * @param options - Options for {@link Date.toLocaleDateString}\n */\n public date(date: string, options: object = {}) {\n if (date === undefined) return '';\n const dateOptions: Intl.DateTimeFormatOptions = { year: 'numeric', month: '2-digit', day: '2-digit', ...options };\n return new Date(date).toLocaleDateString(this.locale, dateOptions);\n }\n\n /**\n * Returns a localized string for a date and time\n * @param date - Date to be localized\n */\n public dateTime(date: string) {\n if (date === undefined) return '';\n return this.timeAndDateFormatter.format(new Date(date));\n }\n}\n\nexport default Language;\n","export const RISK_DATA_VERSION = '1.0.0';\nexport const DF_VERSION = '1.0.0';\n\nexport const DEVICE_FINGERPRINT = 'deviceFingerprint';\nexport const DF_TIMEOUT = 20000;\n\nexport const FAILED_DFP_RESOLVE_OBJECT_TIMEOUT = {\n result: {\n type: DEVICE_FINGERPRINT,\n value: 'df-timedOut'\n },\n errorCode: 'timeout'\n};\n\nexport const ERRORS = {\n TIME_OUT: 'timeout',\n WRONG_ORIGIN: 'wrongOrigin',\n WRONG_DATA_TYPE: 'wrongDataType',\n MISSING_PROPERTY: 'missingProperty',\n UNKNOWN: 'unknownError'\n};\n\nexport const ERROR_MESSAGES = {\n timeout: 'iframe loading timed out',\n wrongOrigin: 'Result did not come from the expected origin',\n wrongDataType: 'Result data was not of the expected type',\n missingProperty: 'Result data did not contain the expected properties',\n unknownError: 'An unknown error occurred'\n};\n","import { Component, h } from 'preact';\nimport Iframe from '../../../../components/internal/IFrame';\nimport promiseTimeout from '../../../../utils/promiseTimeout';\nimport { DEVICE_FINGERPRINT, DF_TIMEOUT, FAILED_DFP_RESOLVE_OBJECT_TIMEOUT } from '../../constants';\nimport getProcessMessageHandler from '../../../../utils/get-process-message-handler';\nimport { getOrigin } from '../../../../utils/getOrigin';\nimport { GetDeviceFingerprintProps } from './types';\n\nconst iframeName = 'dfIframe';\nconst allowProperties = 'geolocation; microphone; camera;';\n\nclass GetDeviceFingerprint extends Component<GetDeviceFingerprintProps> {\n public postMessageDomain;\n public processMessageHandler;\n public deviceFingerPrintPromise;\n\n constructor(props) {\n super(props);\n\n this.postMessageDomain = getOrigin(this.props.loadingContext) || this.props.loadingContext;\n }\n\n getDfpPromise(): Promise<any> {\n return new Promise((resolve, reject) => {\n /**\n * Listen for postMessage responses from the notification url\n */\n this.processMessageHandler = getProcessMessageHandler(this.postMessageDomain, resolve, reject, DEVICE_FINGERPRINT);\n\n window.addEventListener('message', this.processMessageHandler);\n });\n }\n\n componentDidMount() {\n // Get device fingerprint\n this.deviceFingerPrintPromise = promiseTimeout(DF_TIMEOUT, this.getDfpPromise(), FAILED_DFP_RESOLVE_OBJECT_TIMEOUT);\n this.deviceFingerPrintPromise.promise\n .then(resolveObject => {\n this.props.onCompleteFingerprint(resolveObject);\n window.removeEventListener('message', this.processMessageHandler);\n })\n .catch(rejectObject => {\n this.props.onErrorFingerprint(rejectObject);\n window.removeEventListener('message', this.processMessageHandler);\n });\n }\n\n render({ dfpURL }) {\n return (\n <div className=\"adyen-checkout-risk__device-fingerprint\">\n <Iframe name={iframeName} src={dfpURL} allow={allowProperties} title=\"devicefingerprinting iframe\" />\n </div>\n );\n }\n}\n\nexport default GetDeviceFingerprint;\n","import { ERRORS, ERROR_MESSAGES, DEVICE_FINGERPRINT } from '../../constants';\n\nconst handleErrorCode = errorCode => ({\n errorCode,\n message: ERROR_MESSAGES[errorCode] || ERROR_MESSAGES[ERRORS.UNKNOWN],\n type: DEVICE_FINGERPRINT\n});\n\nexport default handleErrorCode;\n","import { Component, h } from 'preact';\nimport GetDeviceFingerprint from './GetDeviceFingerprint';\nimport handleErrorCode from './utils';\nimport { DF_VERSION } from '../../constants';\nimport { DeviceFingerprintProps, DeviceFingerprintState } from './types';\n\nclass DeviceFingerprint extends Component<DeviceFingerprintProps, DeviceFingerprintState> {\n constructor(props) {\n super(props);\n\n if (props.clientKey) {\n this.state = {\n status: 'retrievingFingerPrint',\n dfpURL: `${this.props.loadingContext}assets/html/${props.clientKey}/dfp.${DF_VERSION}.html`\n };\n }\n }\n\n public static defaultProps = {\n onComplete: () => {},\n onError: () => {}\n };\n\n setStatusComplete(fingerprintResult) {\n this.setState({ status: 'complete' }, () => {\n this.props.onComplete(fingerprintResult);\n });\n }\n\n render({ loadingContext }, { dfpURL }) {\n if (this.state.status === 'retrievingFingerPrint') {\n return (\n <div className=\"adyen-checkout-risk__device-fingerprint--wrapper\" style={{ position: 'absolute', width: 0, height: 0 }}>\n <GetDeviceFingerprint\n loadingContext={loadingContext}\n dfpURL={dfpURL}\n onCompleteFingerprint={fingerprintResult => {\n this.setStatusComplete(fingerprintResult);\n }}\n onErrorFingerprint={fingerprintError => {\n this.props.onError(handleErrorCode(fingerprintError.errorCode));\n this.setStatusComplete(fingerprintError.result);\n }}\n />\n </div>\n );\n }\n\n return null;\n }\n}\n\nexport default DeviceFingerprint;\n","import { h } from 'preact';\nimport BaseElement from '../../components/internal/BaseElement/BaseElement';\nimport DeviceFingerprint from './components/DeviceFingerprint';\nimport base64 from '../../utils/base64';\nimport { RISK_DATA_VERSION, DEVICE_FINGERPRINT } from './constants';\nimport { BaseElementProps } from '../../components/internal/BaseElement/types';\nimport type { ICore } from '../types';\n\nexport interface RiskModuleOptions {\n enabled: boolean;\n onComplete?: (data) => void;\n onError?: (error) => void;\n node?: string;\n}\n\ninterface RiskModuleProps extends BaseElementProps {\n risk: RiskModuleOptions;\n loadingContext: string;\n}\n\nexport type RiskData = string | boolean;\n\nexport default class RiskElement extends BaseElement<RiskModuleProps> {\n public static type = 'risk';\n public static defaultProps = {\n risk: {\n enabled: true,\n onComplete: () => {},\n onError: () => {},\n node: 'body'\n }\n };\n\n private nodeRiskContainer = null;\n\n constructor(checkout: ICore, props?) {\n super(checkout, props);\n\n // Populate state with null values\n const riskElements = {\n [DEVICE_FINGERPRINT]: null\n };\n\n this.setState({ data: riskElements });\n\n if (this.props.risk.enabled === true) {\n if (document.querySelector(this.props.risk.node)) {\n this.nodeRiskContainer = document.createElement('div');\n document.querySelector(this.props.risk.node).appendChild(this.nodeRiskContainer);\n this.mount(this.nodeRiskContainer);\n } else {\n this.onError({ message: 'RiskModule node was not found' });\n }\n }\n }\n\n formatProps(props) {\n return {\n ...props,\n risk: {\n ...RiskElement.defaultProps.risk,\n ...props.risk\n }\n };\n }\n\n public onComplete = result => {\n const data = { ...this.state.data, [result.type]: result.value, persistentCookie: result.persistentCookie, components: result.components };\n this.setState({ data, isValid: true });\n this.props.risk.onComplete(this.data);\n this.cleanUp();\n };\n\n public onError = error => {\n this.props.risk.onError(error);\n this.cleanUp();\n };\n\n get isValid() {\n return this.state.isValid;\n }\n\n get data(): any {\n if (this.isValid) {\n const dataObj = { version: RISK_DATA_VERSION, ...this.state.data };\n return base64.encode(JSON.stringify(dataObj));\n }\n\n return false;\n }\n\n public get enabled() {\n return this.props.risk.enabled;\n }\n\n public cleanUp = () => {\n if (this.nodeRiskContainer && this.nodeRiskContainer.parentNode) this.nodeRiskContainer.parentNode.removeChild(this.nodeRiskContainer);\n };\n\n componentWillUnmount() {\n this.cleanUp();\n }\n\n render() {\n return <DeviceFingerprint {...this.props} loadingContext={this.props.loadingContext} onComplete={this.onComplete} onError={this.onError} />;\n }\n}\n","export function filterAllowedPaymentMethods(pm) {\n return !this.length || this.indexOf(pm.type) > -1;\n}\n\nexport function filterRemovedPaymentMethods(pm) {\n return !this.length || this.indexOf(pm.type) < 0;\n}\n\nexport function filterEcomStoredPaymentMethods(pm) {\n return !!pm && !!pm.supportedShopperInteractions && pm.supportedShopperInteractions.includes('Ecommerce');\n}\n\nconst supportedStoredPaymentMethods = [\n 'scheme',\n 'blik',\n 'twint',\n 'ach',\n 'cashapp',\n 'paybybank_AIS_DD',\n 'payto',\n 'paybybank_pix',\n 'eft_directdebit_CA'\n];\n\nexport function filterSupportedStoredPaymentMethods(pm) {\n return !!pm && !!pm.type && supportedStoredPaymentMethods.includes(pm.type);\n}\n","import { PaymentMethod, PaymentMethodsResponse, StoredPaymentMethod } from '../../../types/global-types';\nimport {\n filterAllowedPaymentMethods,\n filterEcomStoredPaymentMethods,\n filterRemovedPaymentMethods,\n filterSupportedStoredPaymentMethods\n} from './filters';\n\nconst processStoredPaymentMethod = (pm): StoredPaymentMethod => ({\n ...pm,\n storedPaymentMethodId: pm.id,\n isStoredPaymentMethod: true\n});\n\nexport const processPaymentMethods = (paymentMethods: PaymentMethod[], { allowPaymentMethods = [], removePaymentMethods = [] }): PaymentMethod[] => {\n if (!paymentMethods) return [];\n\n return paymentMethods.filter(filterAllowedPaymentMethods, allowPaymentMethods).filter(filterRemovedPaymentMethods, removePaymentMethods);\n};\n\nexport const processStoredPaymentMethods = (\n storedPaymentMethods: StoredPaymentMethod[],\n { allowPaymentMethods = [], removePaymentMethods = [] }\n): StoredPaymentMethod[] => {\n if (!storedPaymentMethods) return [];\n\n return storedPaymentMethods\n .filter(filterSupportedStoredPaymentMethods) // only display supported stored payment methods\n .filter(filterAllowedPaymentMethods, allowPaymentMethods)\n .filter(filterRemovedPaymentMethods, removePaymentMethods)\n .filter(filterEcomStoredPaymentMethods) // Only accept Ecommerce shopper interactions\n .map(processStoredPaymentMethod);\n};\n\nexport const checkPaymentMethodsResponse = (paymentMethodsResponse: PaymentMethodsResponse) => {\n if (typeof paymentMethodsResponse === 'string') {\n throw new Error(\n 'paymentMethodsResponse was provided but of an incorrect type (should be an object but a string was provided).' +\n 'Try JSON.parse(\"{...}\") your paymentMethodsResponse.'\n );\n }\n\n if (paymentMethodsResponse instanceof Array) {\n throw new Error(\n 'paymentMethodsResponse was provided but of an incorrect type (should be an object but an array was provided).' +\n 'Please check you are passing the whole response.'\n );\n }\n\n if (paymentMethodsResponse && !paymentMethodsResponse?.paymentMethods?.length && !paymentMethodsResponse?.storedPaymentMethods?.length) {\n console.warn('paymentMethodsResponse was provided but no payment methods were found.');\n }\n};\n","import { PaymentMethod, PaymentMethodsResponse, StoredPaymentMethod } from '../../../types/global-types';\nimport { checkPaymentMethodsResponse, processPaymentMethods, processStoredPaymentMethods } from './utils';\n\nclass PaymentMethods {\n public paymentMethods: PaymentMethod[] = [];\n public storedPaymentMethods: StoredPaymentMethod[] = [];\n\n constructor(response: PaymentMethodsResponse, options = {}) {\n checkPaymentMethodsResponse(response);\n\n this.paymentMethods = response ? processPaymentMethods(response.paymentMethods, options) : [];\n this.storedPaymentMethods = response ? processStoredPaymentMethods(response.storedPaymentMethods, options) : [];\n }\n\n private mapCreatedComponentType(pmType: string): string {\n // Components created as 'card' need to be matched with paymentMethod response objects with type 'scheme'\n return pmType === 'card' ? 'scheme' : pmType;\n }\n\n has(paymentMethod: string): boolean {\n return Boolean(this.paymentMethods.find(pm => pm.type === this.mapCreatedComponentType(paymentMethod)));\n }\n\n find(paymentMethod: string): PaymentMethod {\n return this.paymentMethods.find(pm => pm.type === this.mapCreatedComponentType(paymentMethod));\n }\n}\n\nexport default PaymentMethods;\n","import { get3DS2FlowProps } from '../../../components/ThreeDS2/components/utils';\nimport uuid from '../../../utils/uuid';\nimport UIElement from '../../../components/internal/UIElement';\nimport type { PaymentAction } from '../../../types/global-types';\nimport type { IRegistry } from '../../core.registry';\nimport type { ICore } from '../../types';\n\nconst createComponent = (core: ICore, registry: IRegistry, componentType, props): UIElement => {\n const Element = registry.getComponent(componentType);\n\n if (!Element) {\n throw Error(`Action Element of type ${componentType} not found in the registry`);\n }\n\n return new Element(core, { ...props, id: `${componentType}-${uuid()}` });\n};\n\nconst getActionHandler = statusType => {\n return (core: ICore, registry: IRegistry, action: PaymentAction, props) => {\n const config = {\n ...props,\n ...action,\n onComplete: props.onAdditionalDetails,\n onError: props.onError,\n statusType,\n originalAction: action\n };\n\n return createComponent(core, registry, action.paymentMethodType, config);\n };\n};\n\nconst actionTypes = {\n redirect: (core: ICore, registry, action: PaymentAction, props) => {\n const config = {\n ...props,\n ...action,\n statusType: 'redirect',\n originalAction: action\n };\n\n return createComponent(core, registry, 'redirect', config);\n },\n\n threeDS2: (core: ICore, registry, action: PaymentAction, props) => {\n const componentType = action.subtype === 'fingerprint' ? 'threeDS2DeviceFingerprint' : 'threeDS2Challenge';\n\n /**\n * NOTE: the isMDFlow prop comes from the options object, added within the MDFlow when it calls createFromAction(action, options) to initiate a 3DS2 component\n * It replaces the useOriginalFlow config prop that the MDFlow used to pass when directly initiating the threeDS2Fingerprint or threeDS2Challenge components\n */\n const paymentData = action.subtype === 'fingerprint' || props.isMDFlow ? action.paymentData : action.authorisationToken;\n\n const config = {\n // Props common to both flows\n core: core,\n token: action.token,\n paymentData,\n onActionHandled: props.onActionHandled,\n onComplete: props.isMDFlow ? props.onComplete : props.onAdditionalDetails,\n onError: props.onError,\n isDropin: !!props.isDropin,\n loadingContext: props.loadingContext,\n clientKey: props.clientKey,\n paymentMethodType: props.paymentMethodType,\n challengeWindowSize: props.challengeWindowSize, // always pass challengeWindowSize in case it's been set directly in the handleAction config object\n isMDFlow: props.isMDFlow,\n modules: {\n analytics: props.modules?.analytics,\n resources: props.modules?.resources\n },\n\n // Props unique to a particular flow\n ...get3DS2FlowProps(action.subtype, props)\n };\n\n return createComponent(core, registry, componentType, config);\n },\n\n voucher: getActionHandler('custom'),\n qrCode: getActionHandler('custom'),\n await: getActionHandler('custom'),\n bankTransfer: getActionHandler('custom'),\n sdk: getActionHandler('custom')\n} as const;\n\nexport default actionTypes;\n","import actionTypes from './actionTypes';\nimport type { PaymentAction } from '../../../types/global-types';\nimport type { IRegistry } from '../../core.registry';\nimport type { ICore } from '../../types';\nimport UIElement from '../../../components/internal/UIElement';\n\nexport function getComponentForAction(core: ICore, registry: IRegistry, action: PaymentAction, props = {}): UIElement {\n const nextAction = actionTypes[action.type];\n\n if (nextAction && typeof nextAction === 'function') {\n return nextAction(core, registry, action, props);\n }\n\n throw new Error('Invalid Action');\n}\n\nexport default getComponentForAction;\n","class NonPersistentStorage {\n private storage;\n\n constructor() {\n this.storage = {};\n }\n\n get length() {\n return Object.keys(this.storage).length;\n }\n\n key(index) {\n return Object.keys(this.storage)[index];\n }\n getItem(keyName) {\n return this.storage[keyName] || null;\n }\n setItem(keyName, keyValue) {\n return (this.storage[keyName] = keyValue);\n }\n removeItem(keyName) {\n delete this.storage[keyName];\n }\n clear() {\n this.storage = {};\n }\n}\n\nclass Storage<T> {\n private readonly prefix = 'adyen-checkout__';\n private readonly key: string;\n private storage: globalThis.Storage | NonPersistentStorage;\n\n constructor(key: string, storageType: 'sessionStorage' | 'localStorage') {\n try {\n this.storage = storageType ? window[storageType] : window.localStorage;\n if (!this.storage) {\n throw new Error('storage does not exist');\n }\n } catch (e) {\n this.storage = new NonPersistentStorage();\n }\n this.key = this.prefix + key;\n }\n\n public get(): T {\n try {\n return JSON.parse(this.storage.getItem(this.key));\n } catch (err) {\n return null;\n }\n }\n\n public set(value: T) {\n this.storage.setItem(this.key, JSON.stringify(value));\n }\n\n public remove() {\n this.storage.removeItem(this.key);\n }\n\n public clear() {\n this.storage.clear();\n }\n\n public keyByIndex(index) {\n return this.storage.key(index);\n }\n\n get length() {\n return this.storage.length;\n }\n}\n\nexport default Storage;\n","import { httpPost } from '../http';\nimport Storage from '../../../utils/Storage';\nimport { CheckoutAttemptIdSession, CollectIdEvent, CollectIdProps, TelemetryEvent } from './types';\n\nexport const FAILURE_MSG =\n 'WARNING: Failed to retrieve \"checkoutAttemptId\". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.';\n\n/**\n * If the checkout attempt ID was stored more than fifteen minutes ago, then we should request a new ID.\n * More here: COWEB-1099\n */\nfunction confirmSessionDurationIsMaxFifteenMinutes(checkoutAttemptIdSession: CheckoutAttemptIdSession): boolean {\n if (!checkoutAttemptIdSession?.id) return false;\n\n const fifteenMinInMs = 1000 * 60 * 15;\n const fifteenMinAgoTimestamp = Date.now() - fifteenMinInMs;\n return checkoutAttemptIdSession.timestamp > fifteenMinAgoTimestamp;\n}\n\n/**\n * Send an event to Adyen with some basic telemetry info and receive a checkoutAttemptId in response\n * @param config - object containing values needed to calculate the url for the request; and also some that need to be serialized and included in the body of request\n * @returns a function returning a promise containing the response of the call (an object containing a checkoutAttemptId property)\n */\n// const collectId = ({ analyticsContext, clientKey, locale, amount }: CollectIdProps) => { // TODO - amount will be supported in the future\nconst collectId = ({ analyticsContext, clientKey, locale, analyticsPath, bundleType }: CollectIdProps) => {\n let promise;\n\n const options = {\n errorLevel: 'fatal' as const, // ensure our catch block is called\n loadingContext: analyticsContext,\n path: `${analyticsPath}?clientKey=${clientKey}`\n };\n\n return (event: CollectIdEvent): Promise<string> => {\n const telemetryEvent: TelemetryEvent = {\n // amount, // TODO will be supported in the future\n version: process.env.VERSION,\n // The data team want both platform & channel properties:\n channel: 'Web',\n platform: 'Web',\n buildType: bundleType,\n locale,\n referrer: window.location.href,\n screenWidth: window.screen.width,\n ...event\n };\n\n if (promise) return promise; // Prevents multiple standalone components on the same page from making multiple calls to collect a checkoutAttemptId\n if (!clientKey) return Promise.reject('no-client-key');\n\n const storage = new Storage<CheckoutAttemptIdSession>('checkout-attempt-id', 'sessionStorage');\n const checkoutAttemptIdSession = storage.get();\n\n // In some cases, e.g. where the merchant has redirected the shopper and then returned them to checkout, we still have a valid checkoutAttemptId\n // so there is no need for the re-initialised Checkout to generate another one\n if (confirmSessionDurationIsMaxFifteenMinutes(checkoutAttemptIdSession)) {\n return Promise.resolve(checkoutAttemptIdSession.id);\n }\n\n promise = httpPost(options, telemetryEvent)\n .then(conversion => {\n if (conversion?.checkoutAttemptId) {\n storage.set({ id: conversion.checkoutAttemptId, timestamp: Date.now() });\n return conversion.checkoutAttemptId;\n }\n return undefined;\n })\n .catch(() => {\n return Promise.reject(FAILURE_MSG);\n });\n\n return promise;\n };\n};\n\nexport default collectId;\n","import { HttpOptions, httpPost } from '../Services/http';\nimport { AnalyticsObject, EventQueueProps } from './types';\n\ninterface CAActions {\n channel: 'Web';\n platform: 'Web';\n info: AnalyticsObject[];\n errors: AnalyticsObject[];\n logs: AnalyticsObject[];\n}\n\nexport interface EventsQueueModule {\n add: (t: string, o: AnalyticsObject) => void;\n run: (id: string) => Promise<any>;\n getQueue: () => CAActions;\n}\n\nconst EventsQueue = ({ analyticsContext, clientKey, analyticsPath }: EventQueueProps): EventsQueueModule => {\n const caActions: CAActions = {\n channel: 'Web',\n platform: 'Web',\n info: [],\n errors: [],\n logs: []\n };\n\n const runQueue = (checkoutAttemptId: string): Promise<any> => {\n if (!caActions.info.length && !caActions.logs.length && !caActions.errors.length) {\n return Promise.resolve(null);\n }\n\n const options: HttpOptions = {\n errorLevel: 'silent' as const,\n loadingContext: analyticsContext,\n path: `${analyticsPath}/${checkoutAttemptId}?clientKey=${clientKey}`\n };\n\n return httpPost(options, caActions)\n .then(() => {\n // Succeed, silently\n return undefined;\n })\n .catch(() => {\n // Caught, silently, at http level. We do not expect this catch block to ever fire, but... just in case...\n console.debug('### EventsQueue:::: send has failed');\n });\n };\n\n return {\n add: (type, actionObj) => {\n caActions[type].push(actionObj);\n },\n\n run: (checkoutAttemptId: string) => {\n const promise = runQueue(checkoutAttemptId);\n\n caActions.info = [];\n caActions.errors = [];\n caActions.logs = [];\n\n return promise;\n },\n\n // Expose getter for testing purposes\n getQueue: () => caActions\n };\n};\n\nexport default EventsQueue;\n","import CollectId from '../Services/analytics/collect-id';\nimport EventsQueue, { EventsQueueModule } from './EventsQueue';\nimport { AnalyticsEventCategory, AnalyticsInitialEvent, AnalyticsObject, AnalyticsProps } from './types';\nimport { ANALYTIC_LEVEL, ANALYTICS_INFO_TIMER_INTERVAL, ANALYTICS_PATH, ANALYTICS_EVENT } from './constants';\nimport { debounce } from '../../utils/debounce';\nimport { AnalyticsModule } from '../../types/global-types';\nimport { processAnalyticsData } from './utils';\nimport { AnalyticsEvent } from './AnalyticsEvent';\n\nlet capturedCheckoutAttemptId = null;\nlet sendEventsTimerId = null;\n\nconst Analytics = ({ locale, clientKey, analytics, amount, analyticsContext, bundleType }: AnalyticsProps): AnalyticsModule => {\n const defaultProps = {\n enabled: true,\n checkoutAttemptId: null,\n analyticsData: {}\n };\n\n const props = { ...defaultProps, ...analytics };\n\n const collectId = CollectId({ analyticsContext, clientKey, locale, amount, analyticsPath: ANALYTICS_PATH, bundleType });\n const eventsQueue: EventsQueueModule = EventsQueue({ analyticsContext, clientKey, analyticsPath: ANALYTICS_PATH });\n\n const sendAnalyticsEvents = () => {\n if (capturedCheckoutAttemptId) {\n return eventsQueue.run(capturedCheckoutAttemptId);\n }\n return Promise.resolve(null);\n };\n\n const addAnalyticsEvent = (eventCat: AnalyticsEventCategory, obj: AnalyticsObject) => {\n const arrayName = eventCat === ANALYTICS_EVENT.info ? eventCat : `${eventCat}s`;\n eventsQueue.add(`${arrayName}`, obj);\n\n /**\n * The logic is:\n * - info events are stored until a log or error comes along,\n * but, if after a set time, no other analytics event (log or error) has come along then we send the info events anyway\n */\n if (eventCat === ANALYTICS_EVENT.info) {\n clearTimeout(sendEventsTimerId);\n sendEventsTimerId = setTimeout(() => void sendAnalyticsEvents(), ANALYTICS_INFO_TIMER_INTERVAL);\n }\n\n /**\n * The logic is:\n * - errors and logs get sent straightaway\n * ...but... tests with the 3DS2 process show that many logs can happen almost at the same time (or you can have an error followed immediately by a log),\n * so instead of making several sequential api calls we see if we can \"batch\" them using debounce\n */\n if (eventCat === ANALYTICS_EVENT.log || eventCat === ANALYTICS_EVENT.error) {\n clearTimeout(sendEventsTimerId); // clear any timer that might be about to dispatch the info events array\n\n debounce(sendAnalyticsEvents)();\n }\n };\n\n return {\n /**\n * Make \"setup\" call, to pass containerWidth, buildType, channel etc, and receive a checkoutAttemptId in return\n * @param initialEvent -\n */\n setUp: async (initialEvent: AnalyticsInitialEvent) => {\n const { payload, enabled } = props; // TODO what is payload, is it ever used?\n const level = enabled ? ANALYTIC_LEVEL.all : ANALYTIC_LEVEL.initial;\n const analyticsData = processAnalyticsData(props.analyticsData);\n if (!capturedCheckoutAttemptId) {\n try {\n capturedCheckoutAttemptId = await collectId({\n ...initialEvent,\n ...(payload && { ...payload }),\n ...(Object.keys(analyticsData).length && { ...analyticsData }),\n ...{ level }\n });\n } catch (e: any) {\n console.warn(`Fetching checkoutAttemptId failed.${e ? ` Error=${e}` : ''}`);\n }\n }\n },\n\n getCheckoutAttemptId: (): string => capturedCheckoutAttemptId,\n\n // Expose getter for testing purposes\n getEventsQueue: () => eventsQueue,\n\n getEnabled: () => props.enabled,\n\n sendAnalytics: (analyticsObj: AnalyticsEvent): boolean => {\n if (!props.enabled) return false;\n\n const eventCategory: AnalyticsEventCategory = analyticsObj.getEventCategory();\n\n addAnalyticsEvent(eventCategory, analyticsObj);\n\n return true;\n }\n } as AnalyticsModule;\n};\n\nexport default Analytics;\n","import { httpPost } from '../http';\nimport Session from '../../CheckoutSession';\nimport { CheckoutSessionPaymentResponse } from '../../CheckoutSession/types';\nimport { API_ERROR_CODE, API_VERSION } from './constants';\n\n/**\n */\nfunction makePayment(paymentRequest, session: Session): Promise<CheckoutSessionPaymentResponse> {\n const path = `${API_VERSION}/sessions/${session.id}/payments?clientKey=${session.clientKey}`;\n const data = {\n sessionData: session.data,\n ...paymentRequest\n };\n\n return httpPost({ loadingContext: session.loadingContext, path, errorLevel: 'fatal', errorCode: API_ERROR_CODE.makePayments }, data);\n}\n\nexport default makePayment;\n","import { httpPost } from '../http';\nimport Session from '../../CheckoutSession';\nimport { API_ERROR_CODE, API_VERSION } from './constants';\nimport { CheckoutSessionDetailsResponse } from '../../CheckoutSession/types';\n\n/**\n */\nfunction submitDetails(details, session: Session): Promise<CheckoutSessionDetailsResponse> {\n const path = `${API_VERSION}/sessions/${session.id}/paymentDetails?clientKey=${session.clientKey}`;\n const data = {\n ...(session.data && { sessionData: session.data }),\n ...details\n };\n\n return httpPost({ loadingContext: session.loadingContext, path, errorLevel: 'fatal', errorCode: API_ERROR_CODE.submitPaymentDetails }, data);\n}\n\nexport default submitDetails;\n","import { httpPost } from '../http';\nimport Session from '../../CheckoutSession';\nimport { CheckoutSessionSetupResponse, SetupSessionOptions } from '../../CheckoutSession/types';\nimport { API_VERSION } from './constants';\n\nfunction setupSession(session: Session, options: SetupSessionOptions): Promise<CheckoutSessionSetupResponse> {\n const path = `${API_VERSION}/sessions/${session.id}/setup?clientKey=${session.clientKey}`;\n const data = {\n browserInfo: options.browserInfo,\n sessionData: session.data,\n ...(options.order\n ? {\n order: { orderData: options.order.orderData, pspReference: options.order.pspReference }\n }\n : {})\n };\n\n return httpPost<CheckoutSessionSetupResponse>(\n {\n loadingContext: session.loadingContext,\n path,\n errorLevel: 'fatal'\n },\n data\n );\n}\n\nexport default setupSession;\n","import { httpPost } from '../http';\nimport Session from '../../CheckoutSession';\nimport { CheckoutSessionBalanceResponse } from '../../CheckoutSession/types';\nimport { API_VERSION } from './constants';\n\n/**\n */\nfunction checkBalance(paymentRequest, session: Session): Promise<CheckoutSessionBalanceResponse> {\n const path = `${API_VERSION}/sessions/${session.id}/paymentMethodBalance?clientKey=${session.clientKey}`;\n const data = {\n sessionData: session.data,\n ...paymentRequest\n };\n\n return httpPost({ loadingContext: session.loadingContext, path, errorLevel: 'fatal' }, data);\n}\n\nexport default checkBalance;\n","import { httpPost } from '../http';\nimport Session from '../../CheckoutSession';\nimport { CheckoutSessionOrdersResponse } from '../../CheckoutSession/types';\nimport { API_ERROR_CODE, API_VERSION } from './constants';\n\n/**\n */\nfunction createOrder(session: Session): Promise<CheckoutSessionOrdersResponse> {\n const path = `${API_VERSION}/sessions/${session.id}/orders?clientKey=${session.clientKey}`;\n const data = {\n sessionData: session.data\n };\n\n return httpPost({ loadingContext: session.loadingContext, path, errorLevel: 'fatal', errorCode: API_ERROR_CODE.createOrder }, data);\n}\n\nexport default createOrder;\n","import { CheckoutSession } from './types';\nimport AdyenCheckoutError from '../Errors/AdyenCheckoutError';\n\nexport function sanitizeSession(session): Partial<CheckoutSession> {\n if (!session || !session.id) {\n throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'Invalid session');\n }\n\n const { shopperLocale, shopperEmail, telephoneNumber, id } = session;\n\n return {\n id,\n ...(session.sessionData ? { sessionData: session.sessionData } : {}),\n ...(shopperLocale && { shopperLocale }),\n ...(shopperEmail && { shopperEmail }),\n ...(telephoneNumber && { telephoneNumber })\n };\n}\n","import { httpPost } from '../http';\nimport Session from '../../CheckoutSession';\nimport { CheckoutSessionOrdersResponse } from '../../CheckoutSession/types';\nimport { API_VERSION } from './constants';\nimport { Order } from '../../../types/global-types';\n\n/**\n */\nfunction cancelOrder(order: Order, session: Session): Promise<CheckoutSessionOrdersResponse> {\n const path = `${API_VERSION}/sessions/${session.id}/orders/cancel?clientKey=${session.clientKey}`;\n\n const data = {\n sessionData: session.data,\n order: order\n };\n\n return httpPost({ loadingContext: session.loadingContext, path, errorLevel: 'fatal' }, data);\n}\n\nexport default cancelOrder;\n","import makePayment from '../Services/sessions/make-payment';\nimport submitDetails from '../Services/sessions/submit-details';\nimport setupSession from '../Services/sessions/setup-session';\nimport checkBalance from '../Services/sessions/check-balance';\nimport Storage from '../../utils/Storage';\nimport createOrder from '../Services/sessions/create-order';\nimport { sanitizeSession } from './utils';\nimport {\n CheckoutSession,\n CheckoutSessionBalanceResponse,\n CheckoutSessionDetailsResponse,\n CheckoutSessionOrdersResponse,\n CheckoutSessionPaymentResponse,\n CheckoutSessionSetupResponse,\n SessionConfiguration,\n SetupSessionOptions\n} from './types';\nimport cancelOrder from '../Services/sessions/cancel-order';\nimport { onOrderCancelData } from '../../components/Dropin/types';\nimport type { AdditionalDetailsData } from '../types';\nimport collectBrowserInfo from '../../utils/browserInfo';\n\nclass Session {\n private readonly session: CheckoutSession;\n private readonly storage: Storage<CheckoutSession>;\n public readonly clientKey: string;\n public readonly loadingContext: string;\n public configuration: SessionConfiguration;\n\n constructor(rawSession: Partial<CheckoutSession>, clientKey: string, loadingContext: string) {\n const session = sanitizeSession(rawSession) as CheckoutSession;\n\n if (!clientKey) throw new Error('No clientKey available');\n if (!loadingContext) throw new Error('No loadingContext available');\n\n this.storage = new Storage('session', 'localStorage');\n this.clientKey = clientKey;\n this.loadingContext = loadingContext;\n this.session = session;\n\n if (!this.session.sessionData) {\n this.session = this.getStoredSession();\n } else {\n this.storeSession();\n }\n }\n\n get shopperLocale() {\n return this.session.shopperLocale;\n }\n\n get id() {\n return this.session.id;\n }\n\n get data() {\n return this.session.sessionData;\n }\n\n /**\n * Updates the session.data with the latest data blob\n */\n private updateSessionData(latestData: string): void {\n this.session.sessionData = latestData;\n this.storeSession();\n }\n\n /**\n * Fetches data from a session\n */\n setupSession(options: SetupSessionOptions): Promise<CheckoutSessionSetupResponse> {\n const mergedOptions = { ...options, browserInfo: collectBrowserInfo() };\n return setupSession(this, mergedOptions).then(response => {\n if (response.configuration) {\n this.configuration = { ...response.configuration };\n }\n\n if (response.sessionData) {\n this.updateSessionData(response.sessionData);\n }\n\n return response;\n });\n }\n\n /**\n * Submits a session payment\n */\n submitPayment(data): Promise<CheckoutSessionPaymentResponse> {\n return makePayment(data, this).then(response => {\n if (response.sessionData) {\n this.updateSessionData(response.sessionData);\n }\n\n return response;\n });\n }\n\n /**\n * Submits session payment additional details\n */\n submitDetails(data: AdditionalDetailsData['data']): Promise<CheckoutSessionDetailsResponse> {\n return submitDetails(data, this).then(response => {\n if (response.sessionData) {\n this.updateSessionData(response.sessionData);\n }\n\n return response;\n });\n }\n\n /**\n * Checks the balance for a payment method\n */\n checkBalance(data): Promise<CheckoutSessionBalanceResponse> {\n return checkBalance(data, this).then(response => {\n if (response.sessionData) {\n this.updateSessionData(response.sessionData);\n }\n\n return response;\n });\n }\n\n /**\n * Creates an order for the current session\n */\n createOrder(): Promise<CheckoutSessionOrdersResponse> {\n return createOrder(this).then(response => {\n if (response.sessionData) {\n this.updateSessionData(response.sessionData);\n }\n\n return response;\n });\n }\n\n /**\n * Cancels an order for the current session\n */\n cancelOrder(data: onOrderCancelData): Promise<CheckoutSessionOrdersResponse> {\n return cancelOrder(data.order, this).then(response => {\n if (response.sessionData) {\n this.updateSessionData(response.sessionData);\n }\n\n return response;\n });\n }\n\n /**\n * Gets the stored session but only if the current id and the stored id match\n */\n getStoredSession(): CheckoutSession {\n const storedSession = this.storage.get();\n return this.id === storedSession?.id ? storedSession : this.session;\n }\n\n /**\n * Stores the session\n */\n storeSession(): void {\n this.storage.set({ id: this.session.id, sessionData: this.session.sessionData });\n }\n\n /**\n * Clears the stored session\n */\n removeStoredSession(): void {\n this.storage.remove();\n }\n}\n\nexport default Session;\n","import AdyenCheckoutError from '../Errors/AdyenCheckoutError';\n\nexport interface ImageOptions {\n extension?: string;\n imageFolder?: string;\n resourceContext?: string;\n name?: string;\n parentFolder?: string;\n size?: string;\n subFolder?: string;\n svgOptions?: string;\n type?: string;\n}\n\nexport type GetImageFnType = (name) => string;\n\nexport class Resources {\n private readonly resourceContext: string;\n\n constructor(cdnContext: string) {\n if (!cdnContext) {\n throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'Resources module: \"environmentsUrls.cdn\" is not a valid URL');\n }\n this.resourceContext = cdnContext;\n }\n\n private returnImage = ({\n name,\n resourceContext,\n imageFolder = '',\n parentFolder = '',\n extension,\n size = '',\n subFolder = ''\n }: ImageOptions): string => `${resourceContext}images/${imageFolder}${subFolder}${parentFolder}${name}${size}.${extension}`;\n\n private getImageUrl =\n ({ resourceContext, extension = 'svg', ...options }: ImageOptions): GetImageFnType =>\n (name: string): string => {\n const imageOptions: ImageOptions = {\n extension,\n resourceContext,\n imageFolder: 'logos/',\n parentFolder: '',\n name,\n ...options\n };\n\n return this.returnImage(imageOptions);\n };\n\n public getImage(props = {} as ImageOptions) {\n return this.getImageUrl({ ...props, resourceContext: this.resourceContext });\n }\n}\n","import { h, Fragment } from 'preact';\nimport { useRef, useState } from 'preact/hooks';\nimport { SRMessagesProps } from './types';\n\n// An interface for the members exposed by SRMessages to its parent\nexport interface SRMessagesRef {\n setMessages?: (who: string[]) => void;\n}\n\nexport function SRMessages({ setComponentRef }: SRMessagesProps) {\n const messagesRef = useRef<SRMessagesRef>({});\n // Just call once to create the object by which we expose the members expected by the parent comp\n if (!Object.keys(messagesRef.current).length) {\n setComponentRef?.(messagesRef.current);\n }\n\n const [messages, setMessages] = useState(null);\n\n // Expose method expected by parent\n messagesRef.current.setMessages = (msgs: string[]) => {\n setMessages(msgs);\n };\n\n return messages ? (\n <Fragment>\n {messages.map(msg => {\n return (\n <div key={msg} className=\"adyen-checkout-sr-panel__msg\" {...(process.env.NODE_ENV !== 'production' && { 'data-testid': msg })}>\n {msg}\n </div>\n );\n })}\n </Fragment>\n ) : null;\n}\n","import { h } from 'preact';\nimport './SRPanel.scss';\nimport { AriaAttributes, SRPanelProps } from './types';\nimport BaseElement from '../../components/internal/BaseElement/BaseElement';\nimport { SRMessages, SRMessagesRef } from './SRMessages';\nimport type { ICore } from '../types';\n\n/**\n * A panel meant to hold messages that will be read out by ScreenReaders on an aria-live=\"polite\" basis\n * Expects a string or string array of message to add to the panel to be read out\n * For testing purposes can be made visible\n */\nexport class SRPanel extends BaseElement<SRPanelProps> {\n public static type = 'srPanel';\n\n public static defaultProps: Partial<SRPanelProps> = {\n enabled: true,\n node: 'body',\n showPanel: false,\n id: 'ariaLiveSRPanel',\n ariaAttributes: {\n 'aria-relevant': 'all',\n 'aria-live': 'polite',\n 'aria-atomic': 'true'\n }\n };\n\n private readonly srPanelContainer = null;\n\n private readonly id;\n private readonly showPanel;\n private readonly _enabled: boolean;\n private readonly _moveFocus: boolean;\n\n private componentRef: SRMessagesRef;\n\n constructor(checkout: ICore, props?: SRPanelProps) {\n super(checkout, props);\n\n this.id = this.props.id;\n this.showPanel = process.env.NODE_ENV !== 'production' ? this.props.showPanel : false;\n this._enabled = false;\n this._moveFocus = this.props.moveFocus ?? true;\n\n if (this.props.enabled) {\n this._enabled = true;\n\n const panelParent = document.querySelector(this.props.node);\n\n if (panelParent) {\n const preExistingSRPanel = document.getElementById(this.id);\n if (preExistingSRPanel) {\n panelParent.removeChild(preExistingSRPanel);\n }\n\n this.srPanelContainer = document.createElement('div');\n this.srPanelContainer.className = 'sr-panel-holder';\n this.srPanelContainer.id = this.id;\n\n panelParent.appendChild(this.srPanelContainer);\n\n this.mount(this.srPanelContainer);\n } else {\n throw new Error('Component could not mount. Root node was not found.');\n }\n }\n }\n\n public setComponentRef = ref => {\n this.componentRef = ref;\n };\n\n public get enabled() {\n return this._enabled;\n }\n\n public get moveFocus() {\n return this._moveFocus;\n }\n\n public setAriaProps(ariaAttributes: AriaAttributes): void {\n const firstPanel = document.querySelector('[class^=\"adyen-checkout-sr-panel\"]');\n for (const [key, value] of Object.entries(ariaAttributes)) {\n firstPanel.setAttribute(key, value);\n }\n this.props = { ...this.props, ariaAttributes: { ...this.props.ariaAttributes, ...ariaAttributes } };\n }\n\n // A method we can expose to allow comps to set messages in this panel\n public setMessages = (messages: string[] | string): void => {\n if (!this.props.enabled) return;\n\n let panelMessages = null;\n if (messages) {\n // Ensure panelMessages is an array\n panelMessages = Array.isArray(messages) ? messages : [messages];\n }\n\n this.componentRef.setMessages(panelMessages);\n };\n\n render() {\n if (!this.props.enabled) return null;\n return (\n <div\n className={this.showPanel ? 'adyen-checkout-sr-panel' : 'adyen-checkout-sr-panel--sr-only'}\n role={'log'}\n {...this.props.ariaAttributes}\n {...(process.env.NODE_ENV !== 'production' && { 'data-testid': this.id })}\n >\n <SRMessages setComponentRef={this.setComponentRef} />\n </div>\n );\n }\n}\n","import UIElement from '../components/internal/UIElement/UIElement';\nimport ThreeDS2Challenge from '../components/ThreeDS2/ThreeDS2Challenge';\nimport ThreeDS2DeviceFingerprint from '../components/ThreeDS2/ThreeDS2DeviceFingerprint';\nimport Redirect from '../components/Redirect';\nimport { TxVariants } from '../components/tx-variants';\nimport type { ICore } from './types';\n\nfunction assertClassHasType(Class: any): Class is typeof UIElement {\n const hasValidType = typeof Class.type === 'string' && !!Class.type;\n return hasValidType;\n}\n\nexport type NewableComponent = new (checkout: ICore, props?) => UIElement;\n\nexport interface IRegistry {\n add(...items: NewableComponent[]): void;\n getComponent(type: string): NewableComponent | undefined;\n}\n\nconst defaultComponents = {\n [TxVariants.redirect]: Redirect,\n [TxVariants.threeDS2Challenge]: ThreeDS2Challenge,\n [TxVariants.threeDS2DeviceFingerprint]: ThreeDS2DeviceFingerprint\n};\n\nclass Registry implements IRegistry {\n public componentsMap: Record<string, NewableComponent> = defaultComponents;\n\n public supportedTxVariants: Set<string> = new Set(Object.values(TxVariants));\n\n public add(...items: NewableComponent[]) {\n this.componentsMap = {\n ...this.componentsMap,\n ...this.createComponentsMap(items)\n };\n }\n\n public getComponent(type: string): NewableComponent | undefined {\n const Component = this.componentsMap[type];\n if (Component) {\n return Component;\n }\n\n if (this.supportedTxVariants.has(type)) {\n return;\n }\n\n return Redirect;\n }\n\n public createComponentsMap(components: NewableComponent[]) {\n const componentsMap = components.reduce((memo, component) => {\n const isValid = assertClassHasType(component);\n\n if (!isValid) {\n console.error('CoreRegistry: Attempt to register Class failed. The Class is not a valid UIElement');\n return memo;\n }\n if (component.type === 'dropin') {\n return memo;\n }\n\n const supportedTxVariants = [component.type, ...component.txVariants].filter(txVariant => txVariant);\n\n supportedTxVariants.forEach(txVariant => {\n memo = {\n ...memo,\n [txVariant]: component\n };\n });\n\n return memo;\n }, {});\n\n return componentsMap;\n }\n}\n\nexport default new Registry();\n","export const DEFAULT_LOCALE = 'en-US';\n","import { httpGet } from './http';\nimport type { Translations } from '../../language/types';\n\nexport default async function getTranslations(cdnTranslationsUrl: string, adyenWebVersion: string, locale: string): Promise<Translations> {\n try {\n return await httpGet({\n loadingContext: cdnTranslationsUrl,\n errorLevel: 'fatal',\n errorMessage: `Translations: Failed to fetch translations for locale \"${locale}\"`,\n path: `sdk/${adyenWebVersion}/translations/${locale}.json`\n });\n } catch (error) {\n return await httpGet({\n loadingContext: cdnTranslationsUrl,\n errorLevel: 'fatal',\n errorMessage: `Translations: Couldn't fetch translation for locale \"${locale}\" nor the fallback translation \"en-US\"`,\n path: `sdk/${adyenWebVersion}/translations/en-US.json`\n });\n }\n}\n","import type { CoreConfiguration } from './types';\n\nconst defaultProps: CoreConfiguration = {\n exposeLibraryMetadata: true,\n showPayButton: true\n};\n\nexport { defaultProps };\n","import Language from '../language';\nimport UIElement from '../components/internal/UIElement/UIElement';\nimport RiskModule from './RiskModule';\nimport PaymentMethods from './ProcessResponse/PaymentMethods';\nimport getComponentForAction from './ProcessResponse/PaymentAction';\nimport Analytics from './Analytics';\nimport { assertConfigurationPropertiesAreValid, processGlobalOptions } from './utils';\nimport Session from './CheckoutSession';\nimport { hasOwnProperty } from '../utils/hasOwnProperty';\nimport { Resources } from './Context/Resources';\nimport { SRPanel } from './Errors/SRPanel';\nimport registry, { NewableComponent } from './core.registry';\nimport { cleanupFinalResult, sanitizeResponse, verifyPaymentDidNotFail } from '../components/internal/UIElement/utils';\nimport AdyenCheckoutError, { IMPLEMENTATION_ERROR } from './Errors/AdyenCheckoutError';\nimport { ANALYTICS_ACTION_STR } from './Analytics/constants';\nimport { THREEDS2_FULL } from '../components/ThreeDS2/constants';\nimport { DEFAULT_LOCALE } from '../language/constants';\nimport getTranslations from './Services/get-translations';\nimport { defaultProps } from './core.defaultProps';\nimport { formatCustomTranslations, formatLocale } from '../language/utils';\nimport { resolveEnvironments } from './Environment';\n\nimport type { AnalyticsModule, PaymentAction, PaymentResponseData } from '../types/global-types';\nimport type { CoreConfiguration, ICore, AdditionalDetailsData } from './types';\nimport type { Translations } from '../language/types';\nimport type { UIElementProps } from '../components/internal/UIElement/types';\nimport { AnalyticsLogEvent } from './Analytics/AnalyticsLogEvent';\nimport CancelError from './Errors/CancelError';\n\nclass Core implements ICore {\n public session?: Session;\n public paymentMethodsResponse: PaymentMethods;\n public modules: Readonly<{\n risk: RiskModule;\n analytics: AnalyticsModule;\n resources: Resources;\n i18n: Language;\n srPanel: SRPanel;\n }>;\n public options: CoreConfiguration;\n\n public analyticsContext: string;\n public loadingContext: string;\n public cdnImagesUrl: string;\n public cdnTranslationsUrl: string;\n\n private components: UIElement[] = [];\n\n public static readonly metadata = {\n version: process.env.VERSION,\n bundleType: process.env.BUNDLE_TYPE\n };\n\n public static registry = registry;\n\n public static setBundleType(type: string): void {\n Core.metadata.bundleType = type;\n }\n\n public static register(...items: NewableComponent[]) {\n registry.add(...items);\n }\n\n /**\n * Used internally by the PaymentMethod components to auto-register themselves\n * @internal\n */\n public register(...items: NewableComponent[]) {\n registry.add(...items);\n }\n\n public getComponent(txVariant: string) {\n return registry.getComponent(txVariant);\n }\n\n constructor(props: CoreConfiguration) {\n assertConfigurationPropertiesAreValid(props);\n\n this.createFromAction = this.createFromAction.bind(this);\n\n this.setOptions({ ...defaultProps, ...props });\n\n const { apiUrl, analyticsUrl, cdnImagesUrl, cdnTranslationsUrl } = resolveEnvironments(\n this.options.environment,\n this.options._environmentUrls\n );\n\n this.loadingContext = apiUrl;\n this.analyticsContext = analyticsUrl;\n this.cdnImagesUrl = cdnImagesUrl;\n this.cdnTranslationsUrl = cdnTranslationsUrl;\n\n this.session = this.options.session && new Session(this.options.session, this.options.clientKey, this.loadingContext);\n\n const clientKeyType = this.options.clientKey?.substring(0, 4);\n if ((clientKeyType === 'test' || clientKeyType === 'live') && !this.loadingContext.includes(clientKeyType)) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n `Error: you are using a ${clientKeyType} clientKey against the ${this.options._environmentUrls?.api || this.options.environment} environment`\n );\n }\n if (clientKeyType === 'pub.') {\n console.debug(\n `The value you are passing as your \"clientKey\" looks like an originKey (${this.options.clientKey?.substring(0, 12)}..). Although this is supported it is not the recommended way to integrate. To generate a clientKey, see the documentation (https://docs.adyen.com/development-resources/client-side-authentication/migrate-from-origin-key-to-client-key/) for more details.`\n );\n }\n\n if (this.options.exposeLibraryMetadata) {\n window['AdyenWebMetadata'] = Core.metadata;\n }\n }\n\n public async initialize(): Promise<this> {\n await this.initializeCore();\n this.validateCoreConfiguration();\n await this.createCoreModules();\n return this;\n }\n\n private async initializeCore(): Promise<this> {\n if (this.session) {\n return this.session\n .setupSession(this.options)\n .then(sessionResponse => {\n const { amount, shopperLocale, countryCode, paymentMethods, ...rest } = sessionResponse;\n\n this.setOptions({\n ...rest,\n amount: this.options.order ? this.options.order.remainingAmount : amount,\n locale: this.options.locale || shopperLocale,\n countryCode: this.options.countryCode || countryCode\n });\n\n this.createPaymentMethodsList(paymentMethods);\n\n return this;\n })\n .catch(error => {\n if (this.options.onError) this.options.onError(error);\n return Promise.reject(error);\n });\n }\n\n this.createPaymentMethodsList();\n return Promise.resolve(this);\n }\n\n private async fetchLocaleTranslations(): Promise<Translations> {\n try {\n return await getTranslations(this.cdnTranslationsUrl, Core.metadata.version, this.options.locale);\n } catch (error: unknown) {\n if (error instanceof AdyenCheckoutError) this.options.onError?.(error);\n else this.options.onError?.(new AdyenCheckoutError('ERROR', 'Failed to fetch translation', { cause: error }));\n }\n }\n\n private validateCoreConfiguration(): void {\n // @ts-ignore This property does not exist, although merchants might be using when migrating from v5 to v6\n if (this.options.paymentMethodsConfiguration) {\n console.warn('WARNING: \"paymentMethodsConfiguration\" is supported only by Drop-in.');\n }\n\n if (!this.options.countryCode) {\n throw new AdyenCheckoutError(IMPLEMENTATION_ERROR, 'You must specify a countryCode when initializing checkout.');\n }\n\n if (!this.options.locale) {\n this.setOptions({ locale: DEFAULT_LOCALE });\n }\n\n this.options.locale = formatLocale(this.options.locale);\n this.options.translations = formatCustomTranslations(this.options.translations);\n }\n\n /**\n * Method used when handling redirects. It submits details using 'onAdditionalDetails' or the Sessions flow if available.\n *\n * @public\n * @see {https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Components&version=5.55.1#handle-the-redirect}\n * @param details - Details object containing the redirectResult\n */\n public submitDetails(details: AdditionalDetailsData['data']): void {\n let promise = null;\n\n if (this.options.onAdditionalDetails) {\n promise = new Promise((resolve, reject) => {\n this.options.onAdditionalDetails({ data: details }, undefined, { resolve, reject });\n });\n }\n\n if (this.session) {\n promise = this.session.submitDetails(details).catch(error => {\n this.options.onError?.(error);\n return Promise.reject(error);\n });\n }\n\n if (!promise) {\n this.options.onError?.(\n new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n 'It can not submit the details. The callback \"onAdditionalDetails\" or the Session is not setup correctly.'\n )\n );\n return;\n }\n\n promise\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then(this.afterAdditionalDetails)\n .then((response: PaymentResponseData) => {\n cleanupFinalResult(response);\n this.options.onPaymentCompleted?.(response);\n })\n .catch((e: PaymentResponseData | Error) => {\n if (e instanceof CancelError) {\n return;\n }\n\n cleanupFinalResult(e as PaymentResponseData);\n this.options.onPaymentFailed?.(e as PaymentResponseData);\n });\n }\n\n private readonly afterAdditionalDetails = (response: PaymentResponseData): Promise<PaymentResponseData | Error> => {\n /**\n * After the user is redirected back, a request to `/details` or `/paymentDetails` will be made.\n * Typically, the response will not include an action object, except for the case of `paybybank_pix` payment method.\n * In terms of `paybybank_pix`, the action UIElement will be created and passed to the `afterAdditionalDetails` callback, allowing it to be mounted on the page.\n */\n if (this.options.afterAdditionalDetails && response?.action) {\n const actionEle = this.createFromAction(response.action);\n this.options.afterAdditionalDetails(actionEle);\n return Promise.reject(new CancelError('Handled by afterAdditionalDetails'));\n }\n return Promise.resolve(response);\n };\n\n /**\n * Instantiates a new element component ready to be mounted from an action object\n *\n * @param action - action defining the component with the component data\n * @param options - options that will be merged to the global Checkout props\n * @returns new UIElement\n */\n public createFromAction(action: PaymentAction, options = {}): UIElement {\n if (!action || !action.type) {\n if (hasOwnProperty(action, 'action') && hasOwnProperty(action, 'resultCode')) {\n throw new Error(\n 'createFromAction::Invalid Action - the passed action object itself has an \"action\" property and ' +\n 'a \"resultCode\": have you passed in the whole response object by mistake?'\n );\n }\n throw new Error('createFromAction::Invalid Action - the passed action object does not have a \"type\" property');\n }\n\n if (action.type) {\n // 'threeDS2' OR 'qrCode', 'voucher', 'redirect', 'await', 'bankTransfer`\n const component = action.type === THREEDS2_FULL ? `${action.type}${action.subtype}` : action.paymentMethodType;\n\n const event = new AnalyticsLogEvent({\n type: ANALYTICS_ACTION_STR,\n subType: action.type,\n message: `${component} action was handled by the SDK`,\n component\n });\n this.modules.analytics.sendAnalytics(event);\n\n const props = {\n ...this.getCorePropsForComponent(),\n ...options\n };\n\n return getComponentForAction(this, registry, action, props);\n }\n\n return this.handleCreateError();\n }\n\n /**\n * Updates global configurations, resets the internal state and remounts each element.\n *\n * @param options - props to update\n * @returns this - the element instance\n */\n public update = (options: Partial<CoreConfiguration> = {}): Promise<this> => {\n this.setOptions(options);\n\n return this.initialize().then(() => {\n this.components.forEach(component => {\n // We update only with the new options that have been received\n const newProps: Partial<UIElementProps> = {\n ...options,\n ...(this.session && { session: this.session })\n };\n component.update(newProps);\n });\n return this;\n });\n };\n\n /**\n * Remove the reference of a component\n * @param component - reference to the component to be removed\n * @returns this - the element instance\n * // TODO: Do we need this?\n */\n public remove = (component): this => {\n this.components = this.components.filter(c => c._id !== component._id);\n component.unmount();\n\n return this;\n };\n\n /**\n * @internal\n * Create or update the config object passed when AdyenCheckout is initialised (environment, clientKey, etc...)\n */\n private setOptions = (options: CoreConfiguration): void => {\n this.options = {\n ...this.options,\n ...options,\n locale: options?.locale || this.options?.locale\n };\n };\n\n /**\n * @internal\n * @returns props for a new UIElement\n */\n public getCorePropsForComponent(): any {\n const globalOptions = processGlobalOptions(this.options);\n\n return {\n ...globalOptions,\n core: this,\n i18n: this.modules.i18n,\n modules: this.modules,\n session: this.session,\n loadingContext: this.loadingContext,\n cdnContext: this.cdnImagesUrl,\n createFromAction: this.createFromAction\n };\n }\n\n public storeElementReference(element: UIElement) {\n if (element) {\n this.components.push(element);\n }\n }\n\n /**\n * @internal\n */\n private handleCreateError(paymentMethod?): never {\n const paymentMethodName = paymentMethod?.name ?? 'The passed payment method';\n const errorMessage = paymentMethod\n ? `${paymentMethodName} is not a valid Checkout Component. What was passed as a txVariant was: ${JSON.stringify(\n paymentMethod\n )}. Check if this payment method is configured in the Backoffice or if the txVariant is a valid one`\n : 'No Payment Method component was passed';\n\n throw new Error(errorMessage);\n }\n\n private createPaymentMethodsList(paymentMethodsResponse?: PaymentMethods): void {\n this.paymentMethodsResponse = new PaymentMethods(this.options.paymentMethodsResponse || paymentMethodsResponse, this.options);\n }\n\n private async createCoreModules(): Promise<void> {\n if (this.modules) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('Core: Core modules are already created.');\n }\n return;\n }\n\n const translations = await this.fetchLocaleTranslations();\n\n this.modules = Object.freeze({\n risk: new RiskModule(this, { ...this.options, loadingContext: this.loadingContext }),\n analytics: Analytics({\n loadingContext: this.loadingContext,\n analyticsContext: this.analyticsContext,\n clientKey: this.options.clientKey,\n locale: this.options.locale,\n analytics: this.options.analytics,\n amount: this.options.amount,\n bundleType: Core.metadata.bundleType\n }),\n resources: new Resources(this.cdnImagesUrl),\n i18n: new Language({\n locale: this.options.locale,\n translations,\n customTranslations: this.options.translations\n }),\n srPanel: new SRPanel(this, { ...this.options.srConfig })\n });\n }\n}\n\nexport default Core;\n","import Core from './core';\nimport { UIElement } from '../types';\nimport type { CoreConfiguration, ICore } from './types';\n\nasync function AdyenCheckout(props: CoreConfiguration): Promise<Core> {\n const checkout = new Core(props);\n return await checkout.initialize();\n}\n\nAdyenCheckout.register = (...items: (new (checkout: ICore, props) => UIElement)[]) => {\n Core.register(...items);\n};\n\n/**\n * Function used by the 'auto' package to insert its bundle type information in the Core.\n * We can't inject its bundle type when bundling with Rollup (as done with the other bundle types), since 'auto' uses ES-LEGACY bundle type under the hood.\n */\nAdyenCheckout.setBundleType = (type: string) => {\n Core.setBundleType(type);\n};\n\nexport { AdyenCheckout, Core };\n","export const translations = {\r\n \"en-US\": {\r\n \"cards.title\": \"Card payment\",\r\n \"cards.cardNumber\": \"Card number\",\r\n \"cards.expiryDate\": \"Expiry date\",\r\n \"cards.securityCode3Digits\": \"Security code\",\r\n \"cards.securityCode3DigitsOptional\": \"Security code (optional)\",\r\n \"cards.securityCode3DigitsInfo\": \"3-digit on the back of the card\",\r\n \"cards.securityCode4DigitsInfo\": \"4-digit on the back of the card\",\r\n \"cards.storePaymentMethod\": \"Store payment information\",\r\n \"googlePay.title\": \"Google Pay\",\r\n \"applePay.title\": \"Apple Pay\",\r\n \"stored-cards.expiryDate\": \"Expiry date\",\r\n \"stored-cards.securityCode3Digits\": \"Security code\",\r\n \"stored-cards.securityCode3DigitsOptional\": \"Security code (optional)\",\r\n \"stored-cards.securityCode3DigitsInfo\": \"3-digit on the back of the card\",\r\n \"stored-cards.securityCode4DigitsInfo\": \"4-digit on the back of the card\",\r\n \"stored-cards.removeStoredCard\": \"Remove\",\r\n \"stored-cards.removeStoredCardQuestion\": \"Remove stored payment method?\",\r\n \"stored-cards.removeStoredCardQuestionYesRemove\": \"Yes, remove\",\r\n \"stored-cards.removeStoredCardQuestionCancel\": \"Cancel\",\r\n\r\n \"success.paymentAuthorized\": \"Payment authorized\",\r\n\r\n \"error.unknownError\": \"Unknown error occurred\",\r\n \"error.failedToInitializeStraumurWebComponent\": \"Failed to initialize Straumur Web component\",\r\n \"error.failedToInitializePaymentMethods\": \"Failed to initialize payment methods\",\r\n \"error.failedToSubmitPayment\": \"Failed to submit payment\",\r\n \"error.paymentFailed\": \"Payment failed\",\r\n \"error.paymentUnsuccessful\": \"Payment unsuccessful\",\r\n \"error.failedToSubmitPaymentDetails\": \"Failed to submit payment details\",\r\n \"error.paymentDetailsFailed\": \"Payment details failed\",\r\n \"error.googlePayNotAvailable\": \"Google Pay not available\",\r\n \"error.applePayNotAvailable\": \"Apple Pay not available\",\r\n \"error.failedToSubmitRemoveStoredPaymentCard\": \"Failed to remove stored payment card\",\r\n \"error.failedToRemoveStoredPaymentCard\": \"Stored payment card was not removed\",\r\n },\r\n \"is-IS\": {\r\n \"cards.title\": \"Greiða með korti\",\r\n \"cards.cardNumber\": \"Kortanúmer\",\r\n \"cards.expiryDate\": \"Gildisdagur\",\r\n \"cards.securityCode3Digits\": \"Öryggiskóði\",\r\n \"cards.securityCode3DigitsOptional\": \"Öryggiskóði (valkvætt)\",\r\n \"cards.securityCode3DigitsInfo\": \"3 tölustafir aftan á kortinu\",\r\n \"cards.securityCode4DigitsInfo\": \"4 tölustafir aftan á kortinu\",\r\n \"cards.storePaymentMethod\": \"Vista greiðsluupplýsingar\",\r\n \"googlePay.title\": \"Google Pay\",\r\n \"applePay.title\": \"Apple Pay\",\r\n \"stored-cards.expiryDate\": \"Gildisdagur\",\r\n \"stored-cards.securityCode3Digits\": \"Öryggiskóði\",\r\n \"stored-cards.securityCode3DigitsOptional\": \"Öryggiskóði (valkvætt)\",\r\n \"stored-cards.securityCode3DigitsInfo\": \"3 tölustafir aftan á kortinu\",\r\n \"stored-cards.securityCode4DigitsInfo\": \"4 tölustafir aftan á kortinu\",\r\n \"stored-cards.removeStoredCard\": \"Fjarlægja\",\r\n \"stored-cards.removeStoredCardQuestion\": \"Fjarlægja geymdan greiðslumáta?\",\r\n \"stored-cards.removeStoredCardQuestionYesRemove\": \"Já, fjarlægja\",\r\n \"stored-cards.removeStoredCardQuestionCancel\": \"Hætta við\",\r\n\r\n \"success.paymentAuthorized\": \"Greiðsla samþykkt\",\r\n\r\n \"error.unknownError\": \"Óþekkt villa kom upp\",\r\n \"error.failedToInitializeStraumurWebComponent\": \"Mistókst að sækja Straumur Web hluta\",\r\n \"error.failedToInitializePaymentMethods\": \"Mistókst að sækja greiðslumáta\",\r\n \"error.failedToSubmitPayment\": \"Mistókst að senda greiðslu\",\r\n \"error.paymentFailed\": \"Greiðsla mistókst\",\r\n \"error.paymentUnsuccessful\": \"Greiðsla ekki tekin\",\r\n \"error.failedToSubmitPaymentDetails\": \"Mistókst að senda greiðsluupplýsingar\",\r\n \"error.paymentDetailsFailed\": \"Mistókst að sækja greiðsluupplýsingar\",\r\n \"error.googlePayNotAvailable\": \"Google Pay ekki í boði\",\r\n \"error.applePayNotAvailable\": \"Apple Pay ekki í boði\",\r\n \"error.failedToSubmitRemoveStoredPaymentCard\": \"Mistókst að fjarlægja geymdan greiðslumáta\",\r\n \"error.failedToRemoveStoredPaymentCard\": \"Geymdur greiðslumáti var ekki fjarlægður\",\r\n },\r\n};\r\n\r\nexport type Language = keyof typeof translations;\r\nexport type TranslationKey = keyof (typeof translations)[\"en-US\"] | keyof (typeof translations)[\"is-IS\"];\r\n","import { Language, TranslationKey, translations } from \"./translations\";\r\n\r\nexport default function i18n(language: Language, key: TranslationKey) {\r\n return translations[language][key] || key;\r\n}\r\n","import styleInject from '#style-inject';styleInject(\".straumur__tooltip__content{position:absolute;z-index:50;padding:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);right:40%;top:100%;width:max-content;color:var(--straumur__color-white);background-color:var(--straumur__color-primary);box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}\\n\")","import { h, FunctionalComponent, ComponentChildren } from \"preact\";\r\nimport \"./tooltip.css\";\r\nimport { useRef, useState } from \"preact/hooks\";\r\n\r\ninterface TooltipProps {\r\n children: ComponentChildren;\r\n content: ComponentChildren;\r\n}\r\n\r\nexport const Tooltip: FunctionalComponent<TooltipProps> = ({ children, content }): h.JSX.Element | null => {\r\n const [isVisible, setIsVisible] = useState(false);\r\n const triggerRef = useRef<HTMLDivElement>(null);\r\n\r\n const handleMouseEnter = () => {\r\n setIsVisible(true);\r\n };\r\n\r\n const handleMouseLeave = () => {\r\n setIsVisible(false);\r\n };\r\n\r\n return (\r\n <div style={{ position: \"relative\" }}>\r\n <div ref={triggerRef} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>\r\n {children}\r\n </div>\r\n {isVisible && triggerRef && <div className=\"straumur__tooltip__content\">{content}</div>}\r\n </div>\r\n );\r\n};\r\n","import { h } from \"preact\";\r\n\r\nconst CardIcon = () => (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"40\"\r\n height=\"26\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n >\r\n <path d=\"M24 11H0V7H24V11Z\" fill=\"#002649\" />\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M21.3333 3C22.8042 3 24 4.19375 24 5.66667V7H0V5.66667C0 4.19375 1.19375 3 2.66667 3H21.3333ZM24 19C24 20.4708 22.8042 21.6667 21.3333 21.6667H2.66667C1.19375 21.6667 0 20.4708 0 19V11H24V19ZM4.66667 16.3333C4.3 16.3333 4 16.6333 4 17C4 17.3667 4.3 17.6667 4.66667 17.6667H7.33333C7.7 17.6667 8 17.3667 8 17C8 16.6333 7.7 16.3333 7.33333 16.3333H4.66667ZM10 17.6667H15.3333C15.7 17.6667 16 17.3667 16 17C16 16.6333 15.7 16.3333 15.3333 16.3333H10C9.63333 16.3333 9.33333 16.6333 9.33333 17C9.33333 17.3667 9.63333 17.6667 10 17.6667Z\"\r\n fill=\"#002649\"\r\n />\r\n </svg>\r\n);\r\n\r\nexport default CardIcon;\r\n","import { h } from \"preact\";\r\n\r\nconst InfoIcon = () => (\r\n <svg width=\"21\" height=\"20\" viewBox=\"0 0 21 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g clip-path=\"url(#clip0_10626_39119)\">\r\n <path\r\n d=\"M10.6641 7.5C11.3543 7.5 11.9141 6.94023 11.9141 6.25C11.9141 5.55977 11.3543 5 10.6641 5C9.97383 5 9.41406 5.55859 9.41406 6.25C9.41406 6.94141 9.97266 7.5 10.6641 7.5ZM12.2266 13.125H11.6016V9.6875C11.6016 9.17188 11.1836 8.75 10.6641 8.75H9.41406C8.89844 8.75 8.47656 9.17188 8.47656 9.6875C8.47656 10.2031 8.89844 10.625 9.41406 10.625H9.72656V13.125H9.10156C8.58594 13.125 8.16406 13.5469 8.16406 14.0625C8.16406 14.5781 8.58594 15 9.10156 15H12.2266C12.7441 15 13.1641 14.5801 13.1641 14.0625C13.1641 13.5449 12.7461 13.125 12.2266 13.125Z\"\r\n fill=\"#002649\"\r\n />\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M10.6641 0C5.14062 0 0.664062 4.47656 0.664062 10C0.664062 15.5234 5.14062 20 10.6641 20C16.1875 20 20.6641 15.5234 20.6641 10C20.6641 4.47656 16.1875 0 10.6641 0ZM10.6641 5C11.3543 5 11.9141 5.55977 11.9141 6.25C11.9141 6.94023 11.3543 7.5 10.6641 7.5C9.97383 7.5 9.41406 6.94141 9.41406 6.25C9.41406 5.55859 9.97266 5 10.6641 5ZM12.2266 15H9.10156C8.58594 15 8.16406 14.582 8.16406 14.0625C8.16406 13.543 8.58398 13.125 9.10156 13.125H9.72656V10.625H9.41406C8.89648 10.625 8.47656 10.2051 8.47656 9.6875C8.47656 9.16992 8.89844 8.75 9.41406 8.75H10.6641C11.1816 8.75 11.6016 9.16992 11.6016 9.6875V13.125H12.2266C12.7441 13.125 13.1641 13.5449 13.1641 14.0625C13.1641 14.5801 12.7461 15 12.2266 15Z\"\r\n fill=\"#002649\"\r\n />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_10626_39119\">\r\n <rect width=\"20\" height=\"20\" fill=\"white\" transform=\"translate(0.664062)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n);\r\n\r\nexport default InfoIcon;\r\n","import { h } from \"preact\";\r\n\r\ninterface MasterCardIconProps {\r\n opacity?: number;\r\n}\r\n\r\nconst MasterCardIcon = ({ opacity = 1 }: MasterCardIconProps) => (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"40\"\r\n height=\"26\"\r\n viewBox=\"0 0 40 26\"\r\n opacity={opacity}\r\n >\r\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\r\n <path fill=\"#F06022\" d=\"M16.13 19.29h7.74V6.7h-7.74v12.58z\" />\r\n <path\r\n fill=\"#EA1D25\"\r\n d=\"M16.93 13A7.93 7.93 0 0 1 20 6.71a8.02 8.02 0 0 0-10.65.65 7.96 7.96 0 0 0 0 11.28 8.02 8.02 0 0 0 10.65.65A8.02 8.02 0 0 1 16.93 13\"\r\n />\r\n <path\r\n fill=\"#F79D1D\"\r\n d=\"M33 13c0 2.12-.84 4.15-2.34 5.65a8.1 8.1 0 0 1-10.66.64A8.05 8.05 0 0 0 23.07 13 7.96 7.96 0 0 0 20 6.71a8.02 8.02 0 0 1 10.66.64A7.93 7.93 0 0 1 33 13\"\r\n />\r\n </svg>\r\n);\r\n\r\nexport default MasterCardIcon;\r\n","import { h } from \"preact\";\r\n\r\ninterface VisaIconProps {\r\n opacity?: number;\r\n}\r\n\r\nconst VisaIcon = ({ opacity = 1 }: VisaIconProps) => (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"40\"\r\n height=\"26\"\r\n fill=\"none\"\r\n viewBox=\"0 0 40 26\"\r\n opacity={opacity}\r\n >\r\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\r\n <path\r\n fill=\"#1434CB\"\r\n d=\"m15.9 7.7-4.43 10.6h-2.9l-2.2-8.47c-.13-.52-.25-.71-.65-.93C5.05 8.55 3.96 8.2 3 8l.07-.32h4.67c.6 0 1.13.4 1.27 1.09l1.15 6.14 2.86-7.23h2.89Zm11.39 7.15c0-2.8-3.88-2.96-3.85-4.21 0-.38.37-.79 1.16-.9a5.2 5.2 0 0 1 2.71.48l.48-2.25a7.4 7.4 0 0 0-2.57-.47c-2.71 0-4.62 1.44-4.64 3.51-.02 1.53 1.36 2.38 2.4 2.9 1.08.51 1.44.85 1.43 1.31 0 .71-.85 1.03-1.64 1.04-1.39.02-2.19-.37-2.82-.67l-.5 2.33c.64.29 1.82.55 3.05.56 2.89 0 4.78-1.42 4.79-3.63Zm7.17 3.46H37L34.78 7.7h-2.34c-.53 0-.98.3-1.17.78l-4.12 9.84h2.88l.57-1.58h3.53l.33 1.58Zm-3.07-3.76 1.45-3.99.83 4H31.4ZM19.83 7.7l-2.27 10.62h-2.74L17.09 7.7h2.74Z\"\r\n />\r\n </svg>\r\n);\r\n\r\nexport default VisaIcon;\r\n","import { h } from \"preact\";\r\n\r\ninterface MaestroIconProps {\r\n opacity?: number;\r\n}\r\n\r\nconst MaestroIcon = ({ opacity = 1 }: MaestroIconProps) => (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"40\"\r\n height=\"26\"\r\n fill=\"none\"\r\n viewBox=\"0 0 40 26\"\r\n opacity={opacity}\r\n >\r\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\r\n <path fill=\"#7773B4\" d=\"M16.13 19.29h7.74V6.7h-7.74v12.58z\" />\r\n <path\r\n fill=\"#EA1D25\"\r\n d=\"M16.93 13A7.93 7.93 0 0 1 20 6.71a8.02 8.02 0 0 0-10.65.65 7.96 7.96 0 0 0 0 11.28 8.02 8.02 0 0 0 10.65.65A8.02 8.02 0 0 1 16.93 13\"\r\n />\r\n <path\r\n fill=\"#139FDA\"\r\n d=\"M33 13c0 2.12-.84 4.15-2.34 5.65a8.1 8.1 0 0 1-10.66.64A8.05 8.05 0 0 0 23.07 13 7.96 7.96 0 0 0 20 6.71a8.02 8.02 0 0 1 10.66.64A7.93 7.93 0 0 1 33 13\"\r\n />\r\n </svg>\r\n);\r\n\r\nexport default MaestroIcon;\r\n","import { h } from \"preact\";\r\n\r\ninterface AmexIconProps {\r\n opacity?: number;\r\n}\r\n\r\nconst AmexIcon = ({ opacity = 1 }: AmexIconProps) => (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 40 26\"\r\n width=\"40\"\r\n height=\"26\"\r\n opacity={opacity}\r\n >\r\n <path fill=\"#016FD0\" d=\"M0 26h40V0H0v26z\" />\r\n <path\r\n fill=\"#fff\"\r\n fill-rule=\"evenodd\"\r\n d=\"M30.69 13.63v1.64h-4.17v1.14h4.07v1.64h-4.07v1.12h4.17v1.66l3.38-3.6-3.38-3.6zm-1.1-6.14-1.4-3.19h-4l-4.1 9.32h3.33v8.27l10.28.01 1.61-1.8 1.63 1.8H40v-2.63l-1.92-2.06L40 15.16v-2.59l-1.93.01V7.6l-1.81 4.98H34.5l-1.86-5v5h-4.2l-.6-1.46h-3.3l-.6 1.46h-2.22l3.23-7.27V5.3h2.55l3.19 7.21V5.3l3.1.01 1.6 4.47 1.62-4.48H40v-1h-3.77l-.85 2.39-.85-2.39h-4.94v3.19zm-5.06 6.11v7.27h6.16v-.01h2.54l2.1-2.32 2.12 2.32H40v-.1l-3.34-3.53L40 13.65v-.05h-2.52l-2.1 2.3-2.08-2.3h-8.77zm.7-4.11.96-2.31.97 2.31h-1.93z\"\r\n />\r\n </svg>\r\n);\r\n\r\nexport default AmexIcon;\r\n","import { h } from \"preact\";\r\n\r\ninterface JcbIconProps {\r\n opacity?: number;\r\n}\r\n\r\nconst JcbIcon = ({ opacity = 1 }: JcbIconProps) => (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"40\"\r\n height=\"26\"\r\n fill=\"none\"\r\n viewBox=\"0 0 40 26\"\r\n opacity={opacity}\r\n >\r\n <g clip-path=\"url(#a)\">\r\n <path fill=\"#fff\" d=\"M0 0h40v26H0V0Z\" />\r\n <path\r\n fill=\"#fff\"\r\n d=\"M36.6 20.66a5.22 5.22 0 0 1-5.22 5.22H3V5.22A5.22 5.22 0 0 1 8.22 0H36.6v20.66Z\"\r\n />\r\n <path\r\n fill=\"url(#b)\"\r\n d=\"M27.36 15.36h2.15l.27-.02a.96.96 0 0 0 .76-.96 1 1 0 0 0-.76-.97c-.06-.02-.19-.02-.27-.02h-2.15v1.97Z\"\r\n />\r\n <path\r\n fill=\"url(#c)\"\r\n d=\"M29.27 1.75a3.74 3.74 0 0 0-3.74 3.73v3.89h5.28c.12 0 .26 0 .37.02 1.19.06 2.07.67 2.07 1.74 0 .84-.6 1.56-1.7 1.7v.05c1.2.08 2.13.76 2.13 1.8 0 1.13-1.03 1.87-2.38 1.87h-5.8v7.6H31a3.74 3.74 0 0 0 3.73-3.74V1.75h-5.46Z\"\r\n />\r\n <path\r\n fill=\"url(#d)\"\r\n d=\"M30.27 11.38c0-.5-.35-.82-.76-.89l-.2-.02h-1.95v1.81h1.95c.06 0 .18 0 .2-.02a.87.87 0 0 0 .76-.88Z\"\r\n />\r\n <path\r\n fill=\"url(#e)\"\r\n d=\"M8.6 1.75a3.74 3.74 0 0 0-3.73 3.73v9.22a7.4 7.4 0 0 0 3.22.85c1.3 0 2-.78 2-1.85V9.34h3.2v4.34c0 1.68-1.05 3.06-4.6 3.06-2.16 0-3.84-.47-3.84-.47v7.86h5.48a3.74 3.74 0 0 0 3.74-3.74V1.75H8.6Z\"\r\n />\r\n <path\r\n fill=\"url(#f)\"\r\n d=\"M18.94 1.75a3.74 3.74 0 0 0-3.74 3.73v4.9c.94-.8 2.59-1.32 5.24-1.2 1.41.06 2.93.45 2.93.45v1.58a7.1 7.1 0 0 0-2.83-.82c-2.01-.14-3.23.84-3.23 2.57 0 1.74 1.22 2.73 3.23 2.57a7.46 7.46 0 0 0 2.83-.82v1.58s-1.5.39-2.93.45c-2.65.12-4.3-.4-5.24-1.2v8.63h5.48a3.74 3.74 0 0 0 3.74-3.74V1.75h-5.48Z\"\r\n />\r\n </g>\r\n <defs>\r\n <linearGradient\r\n id=\"b\"\r\n x1=\"25.52\"\r\n x2=\"34.75\"\r\n y1=\"14.38\"\r\n y2=\"14.38\"\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop offset=\"0\" stop-color=\"#007940\" />\r\n <stop offset=\".23\" stop-color=\"#00873F\" />\r\n <stop offset=\".74\" stop-color=\"#40A737\" />\r\n <stop offset=\"1\" stop-color=\"#5CB531\" />\r\n </linearGradient>\r\n <linearGradient\r\n id=\"c\"\r\n x1=\"25.52\"\r\n x2=\"34.75\"\r\n y1=\"12.94\"\r\n y2=\"12.94\"\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop offset=\"0\" stop-color=\"#007940\" />\r\n <stop offset=\".23\" stop-color=\"#00873F\" />\r\n <stop offset=\".74\" stop-color=\"#40A737\" />\r\n <stop offset=\"1\" stop-color=\"#5CB531\" />\r\n </linearGradient>\r\n <linearGradient\r\n id=\"d\"\r\n x1=\"25.52\"\r\n x2=\"34.75\"\r\n y1=\"11.37\"\r\n y2=\"11.37\"\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop offset=\"0\" stop-color=\"#007940\" />\r\n <stop offset=\".23\" stop-color=\"#00873F\" />\r\n <stop offset=\".74\" stop-color=\"#40A737\" />\r\n <stop offset=\"1\" stop-color=\"#5CB531\" />\r\n </linearGradient>\r\n <linearGradient\r\n id=\"e\"\r\n x1=\"4.86\"\r\n x2=\"14.24\"\r\n y1=\"12.94\"\r\n y2=\"12.94\"\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop offset=\"0\" stop-color=\"#1F286F\" />\r\n <stop offset=\".48\" stop-color=\"#004E94\" />\r\n <stop offset=\".83\" stop-color=\"#0066B1\" />\r\n <stop offset=\"1\" stop-color=\"#006FBC\" />\r\n </linearGradient>\r\n <linearGradient\r\n id=\"f\"\r\n x1=\"15.15\"\r\n x2=\"24.25\"\r\n y1=\"12.94\"\r\n y2=\"12.94\"\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop offset=\"0\" stop-color=\"#6C2C2F\" />\r\n <stop offset=\".17\" stop-color=\"#882730\" />\r\n <stop offset=\".57\" stop-color=\"#BE1833\" />\r\n <stop offset=\".86\" stop-color=\"#DC0436\" />\r\n <stop offset=\"1\" stop-color=\"#E60039\" />\r\n </linearGradient>\r\n <clipPath id=\"a\">\r\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n);\r\n\r\nexport default JcbIcon;\r\n","import { h } from \"preact\";\r\n\r\ninterface DinersIconProps {\r\n opacity?: number;\r\n}\r\n\r\nconst DinersIcon = ({ opacity = 1 }: DinersIconProps) => (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 40 26\"\r\n width=\"40\"\r\n height=\"26\"\r\n opacity={opacity}\r\n >\r\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\r\n <g fill=\"#1a1918\">\r\n <path d=\"M5.96 15.58c0-.56-.3-.52-.58-.53v-.16H7.2a2.28 2.28 0 0 1 2.5 2.2c0 .61-.36 2.17-2.57 2.17H5.38v-.16c.38-.04.56-.05.58-.48zm.61 2.94c0 .49.35.54.65.54a1.75 1.75 0 0 0 1.8-1.95 1.88 1.88 0 0 0-1.96-2.02c-.26 0-.37.02-.49.02zm3.36.58h.12c.17 0 .3 0 .3-.2v-1.7c0-.28-.1-.32-.33-.44v-.1l.67-.23a.22.22 0 0 1 .11-.03c.03 0 .05.04.05.09v2.4c0 .21.13.21.3.21h.11v.16H9.93zm.67-3.67a.3.3 0 0 1 0-.61.3.3 0 0 1 .3.3.31.31 0 0 1-.3.31zm1.26 1.8c0-.23-.07-.3-.36-.41v-.12a8.44 8.44 0 0 0 .82-.3c.02 0 .04.01.04.06v.4a1.83 1.83 0 0 1 1.08-.46c.53 0 .72.39.72.88v1.61c0 .21.14.21.31.21h.12v.16h-1.34v-.16h.11c.18 0 .3 0 .3-.2v-1.63c0-.36-.22-.53-.57-.53a1.66 1.66 0 0 0-.73.3v1.85c0 .21.14.21.31.21h.12v.16h-1.34v-.16h.1c.18 0 .3 0 .3-.2v-1.67m3.21.3a1.55 1.55 0 0 0 0 .37 1.05 1.05 0 0 0 .92 1.08 1.2 1.2 0 0 0 .85-.42l.08.09a1.47 1.47 0 0 1-1.15.7 1.26 1.26 0 0 1-1.2-1.36c0-1.23.83-1.6 1.27-1.6a1 1 0 0 1 1.05 1 .74.74 0 0 1 0 .1l-.06.04zm1.11-.2c.16 0 .18-.08.18-.16a.53.53 0 0 0-.55-.57c-.38 0-.64.28-.72.73zm.86 1.77h.17c.17 0 .3 0 .3-.2v-1.77c0-.2-.23-.23-.33-.28v-.1c.46-.19.7-.35.77-.35.03 0 .05.02.05.08v.56H18c.16-.24.42-.64.8-.64a.34.34 0 0 1 .36.33.3.3 0 0 1-.3.32c-.19 0-.19-.15-.4-.15a.53.53 0 0 0-.46.52v1.47c0 .21.12.21.3.21h.35v.16h-.88a26 26 0 0 0-.74 0zm2.41-.7a.83.83 0 0 0 .78.76.44.44 0 0 0 .51-.45c0-.74-1.36-.5-1.36-1.5a.86.86 0 0 1 .97-.81 1.64 1.64 0 0 1 .71.18l.04.64h-.14a.64.64 0 0 0-.68-.62.44.44 0 0 0-.49.41c0 .74 1.45.51 1.45 1.5 0 .4-.33.85-1.07.85a1.64 1.64 0 0 1-.77-.22l-.07-.72.12-.03m7.44-2.37h-.15A1.2 1.2 0 0 0 25.39 15a1.79 1.79 0 0 0-1.77 2 2.04 2.04 0 0 0 1.87 2.17 1.27 1.27 0 0 0 1.25-1.09l.15.04-.15.91a3.5 3.5 0 0 1-1.38.34A2.23 2.23 0 0 1 22.97 17a2.3 2.3 0 0 1 2.37-2.2 4.5 4.5 0 0 1 1.48.33l.06.9m.22 3.07h.13c.17 0 .3 0 .3-.2v-3.5c0-.4-.1-.42-.34-.49v-.1a3.96 3.96 0 0 0 .65-.27.66.66 0 0 1 .14-.07c.03 0 .05.04.05.1v4.32c0 .21.13.21.3.21h.12v.16H27.1zm4.02-.18c0 .11.07.12.18.12h.25v.12a6.33 6.33 0 0 0-.9.2l-.03-.02v-.5a1.69 1.69 0 0 1-1.11.52.68.68 0 0 1-.69-.75v-1.6c0-.17-.02-.32-.37-.35v-.12l.8-.05c.07 0 .07.05.07.18v1.62c0 .19 0 .73.55.73a1.4 1.4 0 0 0 .75-.38v-1.7c0-.12-.3-.18-.52-.25v-.11c.56-.04.91-.09.97-.09.05 0 .05.05.05.11zm1.25-2.07a1.58 1.58 0 0 1 .93-.45 1.22 1.22 0 0 1 1.16 1.31 1.58 1.58 0 0 1-1.5 1.65 1.84 1.84 0 0 1-.86-.22l-.19.14-.13-.07a7.37 7.37 0 0 0 .09-1.11v-2.7c0-.4-.1-.42-.33-.49v-.1a3.93 3.93 0 0 0 .64-.27.67.67 0 0 1 .14-.07c.04 0 .05.04.05.1zm0 1.7a.67.67 0 0 0 .64.64c.67 0 .95-.65.95-1.21a1.2 1.2 0 0 0-1-1.24.96.96 0 0 0-.6.3v1.51zM5.38 22.91h.04c.13 0 .26-.02.26-.2v-1.78c0-.18-.13-.2-.26-.2h-.04v-.1l.5.01.54-.01v.1h-.05c-.12 0-.25.02-.25.2v1.79c0 .17.13.19.25.19h.05v.1L5.88 23l-.5.01z\" />\r\n <path d=\"M6.42 23.03 5.88 23l-.5.02h-.02v-.14h.06c.13 0 .24 0 .24-.17v-1.8c0-.16-.11-.17-.24-.17h-.06v-.13h1.07v.13h-.06c-.13 0-.24.01-.24.18v1.79c0 .16.11.17.24.17h.06v.14zM6.4 23v-.08h-.03c-.12 0-.27-.02-.27-.2v-1.8c0-.18.15-.2.27-.2h.03v-.07h-1v.07h.03c.13 0 .27.02.27.2v1.8c0 .18-.14.2-.27.2H5.4V23l.49-.02.52.02zm2.35-.66h.01v-1.29a.28.28 0 0 0-.3-.32H8.4v-.1l.48.01.42-.01v.1h-.06c-.14 0-.3.03-.3.44v1.55a2.27 2.27 0 0 0 .02.34h-.13L7.07 21.1v1.41c0 .3.06.4.32.4h.06v.1L7 23l-.47.01v-.1h.05c.24 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.4.01.3-.01 1.51 1.71\" />\r\n <path d=\"M8.95 23.08h-.14l-1.73-1.94v1.37c0 .3.05.38.3.38h.08v.14h-.01L7 23l-.47.02h-.01v-.14h.06c.23 0 .3-.14.3-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.72l1.5 1.69v-1.26c0-.27-.19-.3-.29-.3h-.09v-.13h.94v.13h-.07c-.14 0-.28.01-.28.42v1.55a2.27 2.27 0 0 0 .02.34v.02zm-.13-.03h.11a2.3 2.3 0 0 1-.01-.33v-1.55c0-.41.17-.45.31-.45h.04v-.07H8.4v.07h.06a.3.3 0 0 1 .32.33v1.3h-.02v.01l-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .32.32v1.44c0 .27-.07.44-.32.45h-.03V23l.45-.02.42.02v-.07H7.4c-.27 0-.34-.12-.34-.42v-1.44l1.77 1.98zm-.07-.71.01-.01v.01zm0 0v-.01zM9.8 20.8c-.26 0-.27.06-.32.31h-.1l.04-.29a2.04 2.04 0 0 0 .02-.29h.08c.03.1.11.1.2.1h1.76c.1 0 .18 0 .18-.1h.09l-.04.28v.28l-.11.04c0-.13-.02-.33-.25-.33h-.56v1.82c0 .26.12.29.28.29h.07v.1l-.56-.01-.57.01v-.1h.06c.19 0 .28-.02.28-.29V20.8z\" />\r\n <path d=\"m11.14 23.03-.56-.02-.57.02h-.02v-.14h.08c.19 0 .26 0 .27-.27v-1.8H9.8v-.03h.57v1.83c0 .28-.11.3-.3.3h-.05V23l.56-.02.54.02v-.07h-.05c-.16 0-.3-.05-.3-.31v-1.83h.58c.23 0 .26.2.26.32l.08-.03a3.96 3.96 0 0 1 .04-.53h-.05c-.02.1-.11.1-.2.1H9.71c-.08 0-.17 0-.2-.1h-.06a2.04 2.04 0 0 1-.02.27c0 .1-.02.19-.04.28h.08c.04-.24.07-.32.33-.31v.03c-.26 0-.25.04-.3.3h-.14v-.01l.04-.3a1.93 1.93 0 0 0 .02-.28v-.01h.11c.03.1.09.1.18.1h1.77c.1 0 .16 0 .17-.1v-.01h.02l.1.02-.01.01-.04.28v.28h-.01l-.12.05v-.02c-.01-.13-.03-.31-.24-.31h-.55v1.8c0 .25.11.27.27.27h.08v.14zm.71-.12h.05c.12 0 .25-.02.25-.2v-1.78c0-.18-.13-.2-.25-.2h-.05v-.1l.85.01.87-.01.01.52-.1.03c-.02-.22-.06-.4-.42-.4h-.47v.9h.4c.2 0 .25-.12.27-.3h.1v.78l-.1.02c-.02-.2-.03-.33-.26-.33h-.4v.79c0 .22.19.22.4.22.41 0 .6-.03.7-.41l.1.02a7.7 7.7 0 0 0-.12.54l-.92-.01-.9.01v-.1\" />\r\n <path d=\"m13.68 23.03-.92-.02-.9.02h-.02v-.14h.06c.13 0 .24 0 .24-.17v-1.8c0-.16-.11-.17-.24-.17h-.06v-.13h1.75v.01a4.18 4.18 0 0 0 0 .52v.01l-.13.04v-.02c-.02-.22-.05-.38-.4-.38h-.46v.86h.4c.2 0 .23-.1.25-.29v-.01h.13v.01a8.08 8.08 0 0 0 0 .8h-.01l-.12.03v-.02c-.02-.2-.03-.32-.25-.32h-.4v.78c0 .2.18.2.4.2.42 0 .58-.02.68-.4v-.01h.02l.1.03v.01a7.8 7.8 0 0 0-.11.54v.02zm-.02-.03.11-.52-.06-.02c-.1.39-.3.42-.7.42-.22 0-.43 0-.44-.24v-.8H13c.24-.01.26.13.28.33l.07-.02a7.25 7.25 0 0 1 0-.76h-.07c-.02.18-.08.3-.29.3h-.42v-.92h.5c.35 0 .4.18.42.4l.07-.03a5.76 5.76 0 0 1 0-.5l-.86.02-.83-.01v.07h.03c.12 0 .27.02.27.2v1.8c0 .18-.15.2-.27.2h-.03V23l.89-.02zm.59-2c0-.26-.14-.27-.24-.27h-.06v-.1l.53.01.54-.01c.43 0 .81.12.81.6a.64.64 0 0 1-.47.6l.58.87a.38.38 0 0 0 .33.21v.1l-.33-.01-.32.01a9.45 9.45 0 0 1-.7-1.1h-.23v.73c0 .26.12.27.28.27h.06v.1l-.59-.01-.5.01v-.1h.07c.13 0 .24-.06.24-.18v-1.74zm.44.78h.16c.34 0 .53-.13.53-.53a.47.47 0 0 0-.5-.5 1.65 1.65 0 0 0-.2.02v1.01z\" />\r\n <path d=\"m16.27 23.03-.33-.02c-.1 0-.21.02-.33.01a9.54 9.54 0 0 1-.7-1.1h-.2v.72c0 .25.1.25.26.25h.07v.14h-.01l-.59-.02-.5.02v-.14H14c.12 0 .22-.05.23-.16v-1.74c0-.24-.13-.24-.23-.24h-.08v-.13h1.09c.43 0 .83.11.83.61a.65.65 0 0 1-.47.6l.57.87a.37.37 0 0 0 .32.2h.02v.13zm-1.58-1.14h.23a10.55 10.55 0 0 0 .7 1.1h.64v-.07a.39.39 0 0 1-.33-.2l-.6-.9h.02a.63.63 0 0 0 .47-.59c0-.47-.37-.58-.8-.58h-1.06v.07h.05c.1 0 .26.02.26.27v1.74c0 .13-.13.2-.26.2h-.05V23l.48-.02.57.02v-.07h-.04c-.16 0-.3-.02-.3-.3v-.74zm0-.1h-.02v-1.04h.01a1.63 1.63 0 0 1 .2-.01.48.48 0 0 1 .51.51c0 .4-.2.55-.54.55zm.16-.02c.34 0 .51-.12.51-.52a.45.45 0 0 0-.48-.48 1.33 1.33 0 0 0-.18.01v.99zm3.73.57h.01v-1.29a.28.28 0 0 0-.3-.32h-.07v-.1l.48.01.42-.01v.1h-.06c-.14 0-.3.03-.3.44v1.55a2.27 2.27 0 0 0 .02.34h-.13L16.9 21.1v1.41c0 .3.06.4.32.4h.06v.1l-.44-.01-.47.01v-.1h.05c.24 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.4.01.3-.01z\" />\r\n <path d=\"M18.78 23.08h-.14l-1.73-1.94v1.37c0 .3.05.38.3.38h.08v.14h-.01l-.44-.02-.47.02h-.01v-.14h.06c.23 0 .3-.14.3-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.71l1.5 1.69v-1.26c0-.27-.18-.3-.28-.3h-.09v-.13h.93v.13h-.07c-.14 0-.28.01-.28.42v1.55a2.15 2.15 0 0 0 .02.34v.02zm-.13-.03h.11a2.34 2.34 0 0 1-.01-.33v-1.55c0-.41.17-.45.31-.45h.04v-.07h-.87v.07h.06a.3.3 0 0 1 .32.33v1.3h-.02v.01l-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .32.32v1.44c0 .27-.07.44-.32.45h-.03V23l.45-.02.42.02v-.07h-.04c-.27 0-.34-.12-.34-.42v-1.44zm-.07-.71.01-.01v.01zm0 0v-.01zm1.08.18a1.38 1.38 0 0 0-.07.27c0 .1.14.12.25.12h.04v.1a7.72 7.72 0 0 0-.78 0v-.1h.02a.3.3 0 0 0 .3-.22l.54-1.57a2.87 2.87 0 0 0 .13-.42 1.73 1.73 0 0 0 .3-.15.08.08 0 0 1 .04 0 .02.02 0 0 1 .02 0l.03.1.63 1.78.12.34a.22.22 0 0 0 .23.14h.02v.1a9.66 9.66 0 0 0-.98 0v-.1h.03c.08 0 .22-.01.22-.1a1.1 1.1 0 0 0-.07-.25l-.14-.4h-.77l-.1.36zm.5-1.5-.32.96h.63l-.31-.97z\" />\r\n <path d=\"M21.48 23.03 21 23l-.51.02h-.02v-.14h.05c.08 0 .2-.01.2-.08a1.1 1.1 0 0 0-.07-.24l-.13-.39h-.75l-.1.35a1.41 1.41 0 0 0-.08.26c0 .08.13.1.24.1h.06v.14h-.02l-.41-.02-.37.02h-.01v-.14h.03a.3.3 0 0 0 .28-.2l.55-1.57a4.05 4.05 0 0 0 .13-.44 1.75 1.75 0 0 0 .31-.14.09.09 0 0 1 .03-.01.04.04 0 0 1 .04.02l.03.09.63 1.78c.04.12.08.25.13.35a.2.2 0 0 0 .2.12h.04v.14h-.01zM20.5 23l.5-.02.45.02v-.07a.23.23 0 0 1-.24-.15c-.05-.1-.09-.23-.13-.35l-.62-1.78-.03-.09h-.02a.08.08 0 0 0-.01 0 1.26 1.26 0 0 1-.3.14 2.83 2.83 0 0 1-.13.43l-.55 1.56a.32.32 0 0 1-.3.24h-.01V23l.35-.02.4.02v-.07h-.03c-.1 0-.26-.02-.27-.14a1.35 1.35 0 0 1 .08-.27h.01-.01l.11-.36h.8l.13.4a1.04 1.04 0 0 1 .07.25c0 .1-.15.11-.23.12h-.02zm-.7-1 .33-1h.03l.32 1zm.05-.04h.6l-.3-.91zm.28-.94h.01zm1.5-.22c-.26 0-.27.06-.32.31h-.1l.04-.29a2.1 2.1 0 0 0 .02-.29h.08c.03.1.11.1.2.1h1.76c.1 0 .18 0 .19-.1h.08l-.04.28v.28l-.1.04c-.02-.13-.03-.33-.26-.33h-.56v1.82c0 .26.12.29.28.29h.07v.1L22.4 23l-.57.01v-.1h.06c.19 0 .29-.02.29-.29V20.8h-.56\" />\r\n <path d=\"M22.97 23.03 22.4 23l-.57.02h-.02v-.14h.08c.19 0 .27 0 .27-.27v-1.8h-.54v-.03h.57v1.83c0 .28-.11.3-.3.3h-.05V23l.56-.02.54.02v-.07h-.05c-.16 0-.3-.05-.3-.31v-1.83h.58c.23 0 .26.2.26.32l.08-.03v-.27l.04-.26h-.05c-.02.1-.11.1-.2.1h-1.77c-.08 0-.17 0-.2-.1h-.06a2 2 0 0 1-.02.27c0 .1-.02.19-.04.28h.08c.04-.24.07-.32.33-.31v.03c-.26 0-.25.04-.3.3h-.14v-.01l.04-.29a1.98 1.98 0 0 0 .02-.29v-.01h.11c.03.1.1.1.18.1h1.77c.1 0 .17 0 .17-.1v-.01h.02l.1.02v.01l-.05.28v.28h-.01l-.12.05v-.02c-.01-.13-.03-.31-.24-.31h-.54v1.8c0 .25.1.27.26.27h.08v.14h-.01m.74-.12h.05c.12 0 .25-.02.25-.2v-1.78c0-.18-.13-.2-.25-.2h-.05v-.1l.5.01.54-.01v.1h-.05c-.12 0-.25.02-.25.2v1.79c0 .17.13.19.25.19h.05v.1L24.2 23l-.5.01z\" />\r\n <path d=\"M24.74 23.03 24.2 23l-.5.02h-.01v-.14h.06c.12 0 .24 0 .24-.17v-1.8c0-.16-.12-.17-.24-.17h-.06v-.13h1.07v.13h-.07c-.12 0-.23.01-.23.18v1.79c0 .16.1.17.23.17h.07v.14zm-.01-.03v-.07h-.04c-.12 0-.26-.03-.26-.21v-1.8c0-.18.14-.2.26-.2h.04v-.07H23.7v.07h.04c.12 0 .27.02.27.2v1.8c0 .18-.15.2-.27.2h-.03V23l.48-.02.53.02zm1.37-2.42a1.2 1.2 0 0 1 1.3 1.18 1.25 1.25 0 0 1-1.28 1.3 1.2 1.2 0 0 1-1.28-1.22 1.24 1.24 0 0 1 1.26-1.26m.05 2.33c.66 0 .78-.58.78-1.08s-.27-1.1-.84-1.1c-.6 0-.77.53-.77.99 0 .6.28 1.2.83 1.2\" />\r\n <path d=\"M24.83 21.84a1.26 1.26 0 0 1 1.27-1.28v.03a1.23 1.23 0 0 0-1.24 1.25 1.19 1.19 0 0 0 1.26 1.2 1.24 1.24 0 0 0 1.27-1.28 1.18 1.18 0 0 0-1.3-1.17v-.03a1.21 1.21 0 0 1 1.33 1.2 1.27 1.27 0 0 1-1.3 1.32 1.22 1.22 0 0 1-1.3-1.24m.48-.12c0-.46.18-1 .8-1 .57 0 .84.61.84 1.11s-.12 1.1-.79 1.1v-.03c.65 0 .76-.57.76-1.07s-.26-1.08-.82-1.09c-.58 0-.75.52-.76.98 0 .6.28 1.18.82 1.18v.03c-.56 0-.84-.6-.85-1.21m4.4.62v-1.29a.28.28 0 0 0-.3-.32h-.07v-.1l.48.01.42-.01v.1h-.05c-.15 0-.3.03-.3.44v1.55a2.2 2.2 0 0 0 .01.34h-.12L28 21.1v1.41c0 .3.06.4.32.4h.06v.1l-.44-.01-.46.01v-.1h.05c.23 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.39.01.3-.01 1.52 1.71\" />\r\n <path d=\"M29.9 23.08h-.15l-1.72-1.94v1.37c0 .3.05.38.3.38h.07v.14h-.01l-.44-.02-.46.02h-.02v-.14h.07c.22 0 .28-.14.29-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.72l1.5 1.69v-1.26c0-.27-.18-.3-.28-.3h-.1v-.13h.94v.13h-.06c-.14 0-.29.01-.3.42v1.55a2.26 2.26 0 0 0 .03.34v.02zm-.13-.03h.1a2.42 2.42 0 0 1-.01-.33v-1.55c0-.41.17-.45.32-.45h.03v-.07h-.86v.07h.06a.3.3 0 0 1 .3.33v1.3l-.01.01-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .33.32v1.44c0 .27-.08.44-.32.45h-.04V23l.45-.02.43.02v-.07h-.05c-.27 0-.33-.12-.33-.42v-1.44zm-.07-.71v-.01zm-.01 0v-.01zm1.09.18a1.43 1.43 0 0 0-.08.27c0 .1.14.12.26.12h.03v.1a7.71 7.71 0 0 0-.78 0v-.1h.02a.3.3 0 0 0 .3-.22l.55-1.57a2.79 2.79 0 0 0 .12-.42 1.75 1.75 0 0 0 .31-.15.07.07 0 0 1 .03 0 .02.02 0 0 1 .02 0l.03.1.63 1.78c.04.11.08.24.13.34a.22.22 0 0 0 .22.14h.02v.1a9.66 9.66 0 0 0-.98 0v-.1h.04c.08 0 .2-.01.2-.1a1.1 1.1 0 0 0-.06-.25l-.13-.4h-.78zm.5-1.5h-.01l-.32.96h.64l-.32-.97z\" />\r\n <path d=\"m32.59 23.03-.47-.02-.5.02h-.02v-.14h.05c.08 0 .2-.01.2-.08a1.06 1.06 0 0 0-.07-.24l-.13-.39h-.76l-.1.35a1.44 1.44 0 0 0-.07.26c0 .08.12.1.24.1H31v.14h-.02l-.4-.02-.38.02h-.01v-.14h.03a.3.3 0 0 0 .29-.2l.54-1.57a4.27 4.27 0 0 0 .14-.44 1.85 1.85 0 0 0 .3-.14.08.08 0 0 1 .04 0 .04.04 0 0 1 .04.01l.03.09.62 1.78c.04.12.08.25.13.35a.2.2 0 0 0 .2.12h.04v.14h-.01zm-.97-.03.5-.02.46.02v-.08h-.01a.23.23 0 0 1-.24-.14l-.12-.35-.63-1.78a3.61 3.61 0 0 1-.03-.09h-.01a.06.06 0 0 0-.02 0 1.3 1.3 0 0 1-.3.14 2.94 2.94 0 0 1-.13.43l-.55 1.56a.32.32 0 0 1-.3.24h-.01V23l.35-.02.4.02v-.07h-.02c-.11 0-.27-.02-.27-.14a1.42 1.42 0 0 1 .07-.27h.02-.02l.11-.36h.8l.13.4a1.07 1.07 0 0 1 .07.25c0 .1-.15.11-.22.12h-.03zm-.7-1 .34-1h.02l.33 1zm.05-.04h.6l-.3-.91zm2.48.72c0 .13.1.18.2.19a2.47 2.47 0 0 0 .45 0 .48.48 0 0 0 .33-.2.78.78 0 0 0 .1-.24h.1l-.12.58-.9-.01-.9.01v-.1h.05c.12 0 .25-.02.25-.23v-1.75c0-.18-.13-.2-.25-.2h-.05v-.1l.54.01.51-.01v.1h-.08c-.13 0-.23 0-.23.19z\" />\r\n <path d=\"m34.5 23.03-.9-.02-.9.02v-.14h.06c.12 0 .24 0 .24-.2v-1.76c0-.17-.12-.18-.24-.18h-.07v-.13h1.09v.13h-.1c-.13 0-.21 0-.22.17v1.76c0 .13.09.16.2.17l.18.01a2.46 2.46 0 0 0 .26-.01.48.48 0 0 0 .32-.18.77.77 0 0 0 .1-.24v-.01h.13v.02l-.13.58zm0-.03.11-.55h-.07a.77.77 0 0 1-.1.24.5.5 0 0 1-.34.19 2.6 2.6 0 0 1-.26.01h-.19c-.11-.02-.22-.07-.22-.21v-1.76c0-.2.12-.2.25-.2h.07v-.07h-1.03v.07h.04c.12 0 .27.02.27.2v1.76c0 .22-.15.24-.27.24h-.04V23l.89-.02.88.02zm.1-2.47a.36.36 0 1 1-.37.36.35.35 0 0 1 .36-.36zm0 .66a.3.3 0 1 0-.3-.3.29.29 0 0 0 .3.3zm-.19-.1v-.02c.05-.01.05 0 .05-.04v-.26c0-.04 0-.05-.05-.05v-.02h.19c.06 0 .12.03.12.1a.11.11 0 0 1-.09.1l.06.09a.38.38 0 0 0 .08.08v.01h-.07c-.03 0-.06-.07-.13-.16h-.04v.12c0 .02.01.02.06.03v.01zm.12-.2h.05c.04 0 .06-.03.06-.09s-.03-.08-.07-.08h-.04z\" />\r\n </g>\r\n <path\r\n fill=\"#fff\"\r\n d=\"M13.33 8.58a5.77 5.77 0 1 1 5.76 5.78 5.77 5.77 0 0 1-5.76-5.78\"\r\n />\r\n <path\r\n fill=\"#154a78\"\r\n d=\"M22.58 8.47a3.48 3.48 0 0 0-2.23-3.24v6.48a3.48 3.48 0 0 0 2.23-3.24zm-4.7 3.24V5.23a3.47 3.47 0 0 0 0 6.48zM19.1 3a5.48 5.48 0 1 0 5.47 5.48A5.47 5.47 0 0 0 19.11 3zm0 11.48a5.99 5.99 0 0 1-6.03-5.94A5.9 5.9 0 0 1 19.1 2.5h1.55a6.1 6.1 0 0 1 6.24 6.03 6.22 6.22 0 0 1-6.24 5.94z\"\r\n />\r\n </svg>\r\n);\r\n\r\nexport default DinersIcon;\r\n","import { h } from \"preact\";\r\n\r\ninterface DiscoverIconProps {\r\n opacity?: number;\r\n}\r\n\r\nconst DiscoverIcon = ({ opacity = 1 }: DiscoverIconProps) => (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"40\"\r\n height=\"26\"\r\n fill=\"none\"\r\n viewBox=\"0 0 40 26\"\r\n opacity={opacity}\r\n >\r\n <path fill=\"#fff\" d=\"M0 0h40v26H0z\" />\r\n <g clip-path=\"url(#a)\">\r\n <g clip-path=\"url(#b)\">\r\n <path\r\n fill=\"#000\"\r\n d=\"M3.5 19.56a1.6 1.6 0 0 1 1.54-1.6h.06a1.52 1.52 0 0 1 1.42.77l-.43.25a1.02 1.02 0 0 0-.99-.59 1.13 1.13 0 0 0-1.14 1.11v.03a1.05 1.05 0 0 0 .99 1.14h.1a.94.94 0 0 0 1.04-.83H5.01v-.43h1.51v1.66h-.46v-.49l.03-.12a1.08 1.08 0 0 1-1.08.64 1.49 1.49 0 0 1-1.51-1.48v-.06Zm3.58-1.79h.46v3.33h-.46v-3.33Zm.92 2.2a1.2 1.2 0 1 1 .74 1.11A1.19 1.19 0 0 1 8 19.96Zm1.91 0a.74.74 0 1 0-1.48.06.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm1.36.8v.33h-.46v-3.36h.46v1.4a.98.98 0 0 1 .77-.38 1.19 1.19 0 0 1 0 2.38.9.9 0 0 1-.77-.37Zm1.48-.8a.75.75 0 1 0-1.5-.04v.03a.76.76 0 1 0 1.5 0Zm.8.55c0-.46.28-.65.9-.74.43-.06.58-.1.58-.25s-.12-.37-.46-.37a.54.54 0 0 0-.58.43l-.44-.18a1.01 1.01 0 0 1 1.02-.65c.59 0 .96.3.96.86v1.48h-.43v-.33a.75.75 0 0 1-.74.4c-.5 0-.8-.28-.8-.65Zm1.33.06a.5.5 0 0 0 .19-.4v-.19c0 .1-.16.13-.5.16-.4.06-.55.15-.55.34 0 .15.15.28.37.28.18 0 .35-.07.49-.19Zm1.14-2.8h.46v3.32h-.46v-3.33Zm2.04.24h.5l1.53 2.34v-2.34h.47v3.12h-.47l-1.57-2.41v2.4h-.46v-3.11Zm2.96 1.94a1.18 1.18 0 0 1 1.17-1.2h.03a1.14 1.14 0 0 1 1.17 1.11v.25h-1.94a.77.77 0 0 0 .96.58c.2-.05.37-.17.49-.34l.37.22a1.18 1.18 0 0 1-1.05.56 1.15 1.15 0 0 1-1.2-1.11v-.07Zm.46-.21h1.45a.67.67 0 0 0-.7-.56.7.7 0 0 0-.75.56Zm2.56.61v-1.14h-.46v-.4h.46v-.5l.46-.3v.8h.62v.4h-.65v1.14c0 .25.13.37.31.37.12 0 .24-.03.34-.09v.43a.82.82 0 0 1-.37.1c-.46 0-.71-.25-.71-.8Zm1.36-1.54h.46l.52 1.67.62-1.67h.43l.62 1.67.55-1.67h.47l-.8 2.28h-.44l-.61-1.66-.65 1.7h-.46l-.71-2.32Zm3.88 1.14a1.2 1.2 0 1 1 .74 1.12 1.19 1.19 0 0 1-.74-1.12Zm1.92 0a.74.74 0 1 0-1.48.07.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm.89-1.14h.46v.4a.72.72 0 0 1 .65-.4h.19v.46h-.28c-.37 0-.56.16-.56.6v1.22h-.46v-2.28Zm2.59 1.24-.4.43v.58h-.46v-3.3h.46V20l1.08-1.17h.55l-.89.96.92 1.32h-.52l-.74-1.04ZM5.2 10.16H3.72v5.18H5.2c.66.03 1.32-.18 1.85-.59a2.56 2.56 0 0 0 .92-1.97c0-1.54-1.14-2.62-2.77-2.62Zm1.2 3.88c-.3.28-.74.4-1.39.4h-.28v-3.39h.28a1.88 1.88 0 0 1 1.39.43 1.73 1.73 0 0 1 .55 1.3c0 .48-.2.93-.55 1.26Zm2.03-3.88h1.02v5.18H8.43v-5.18Zm3.49 2c-.62-.22-.77-.37-.77-.65 0-.34.3-.58.74-.58a.97.97 0 0 1 .8.43l.53-.68a2.32 2.32 0 0 0-1.52-.59 1.52 1.52 0 0 0-1.6 1.42v.06c0 .71.34 1.08 1.26 1.42.25.08.49.18.71.31a.64.64 0 0 1 .31.53.75.75 0 0 1-.74.74h-.03a1.29 1.29 0 0 1-1.1-.68l-.66.61a2 2 0 0 0 1.8 1 1.68 1.68 0 0 0 1.78-1.7c-.03-.87-.37-1.24-1.51-1.64Zm1.82.59a2.66 2.66 0 0 0 2.65 2.68h.06c.44 0 .88-.1 1.27-.3v-1.18a1.54 1.54 0 0 1-1.2.55 1.69 1.69 0 0 1-1.73-1.63v-.15a1.72 1.72 0 0 1 1.66-1.8h.03a1.64 1.64 0 0 1 1.27.6v-1.15c-.38-.2-.8-.31-1.23-.3a2.69 2.69 0 0 0-2.78 2.68Zm11.97.9-1.4-3.5h-1.07l2.19 5.31h.52l2.25-5.3h-1.1l-1.4 3.48Zm2.96 1.69h2.83v-.87h-1.85v-1.41h1.8v-.87h-1.8v-1.14h1.85v-.9h-2.83v5.19Zm6.84-3.64c0-.96-.68-1.51-1.82-1.51h-1.48v5.18h1.02v-2.1h.12l1.4 2.07h1.23l-1.64-2.2a1.36 1.36 0 0 0 1.17-1.44Zm-2.03.86h-.31V11h.3c.62 0 .96.28.96.77.03.52-.3.8-.95.8Zm2.84-2.13c0-.09-.07-.15-.19-.15h-.15v.46h.12v-.15l.12.18h.13l-.13-.21c.06 0 .1-.06.1-.13Zm-.19.07-.03-.13h.03c.06 0 .1.03.1.06-.04.07-.07.07-.1.07Z\"\r\n />\r\n </g>\r\n <path\r\n fill=\"#000\"\r\n d=\"M36.16 10.13a.4.4 0 0 0-.4.4.4.4 0 1 0 .8 0 .4.4 0 0 0-.4-.4Zm0 .74a.32.32 0 0 1-.34-.31.32.32 0 0 1 .65-.03.34.34 0 0 1-.3.34Z\"\r\n />\r\n <path\r\n fill=\"url(#c)\"\r\n d=\"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z\"\r\n />\r\n <path\r\n fill=\"url(#d)\"\r\n d=\"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z\"\r\n />\r\n <mask\r\n id=\"e\"\r\n width=\"6\"\r\n height=\"6\"\r\n x=\"18\"\r\n y=\"10\"\r\n maskUnits=\"userSpaceOnUse\"\r\n style=\"mask-type:luminance\"\r\n >\r\n <path\r\n fill=\"#fff\"\r\n d=\"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z\"\r\n />\r\n </mask>\r\n <g mask=\"url(#e)\">\r\n <path\r\n fill=\"url(#f)\"\r\n d=\"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z\"\r\n />\r\n </g>\r\n </g>\r\n <g clip-path=\"url(#g)\">\r\n <g clip-path=\"url(#h)\">\r\n <path\r\n fill=\"#000\"\r\n d=\"M3.5 19.56a1.6 1.6 0 0 1 1.54-1.6h.06a1.52 1.52 0 0 1 1.42.77l-.43.25a1.02 1.02 0 0 0-.99-.59 1.13 1.13 0 0 0-1.14 1.11v.03a1.05 1.05 0 0 0 .99 1.14h.1a.94.94 0 0 0 1.04-.83H5.01v-.43h1.51v1.66h-.46v-.49l.03-.12a1.08 1.08 0 0 1-1.08.64 1.49 1.49 0 0 1-1.51-1.48v-.06Zm3.58-1.79h.46v3.33h-.46v-3.33Zm.92 2.2a1.2 1.2 0 1 1 .74 1.11A1.19 1.19 0 0 1 8 19.96Zm1.91 0a.74.74 0 1 0-1.48.06.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm1.36.8v.33h-.46v-3.36h.46v1.4a.98.98 0 0 1 .77-.38 1.19 1.19 0 0 1 0 2.38.9.9 0 0 1-.77-.37Zm1.48-.8a.75.75 0 1 0-1.5-.04v.03a.76.76 0 1 0 1.5 0Zm.8.55c0-.46.28-.65.9-.74.43-.06.58-.1.58-.25s-.12-.37-.46-.37a.54.54 0 0 0-.58.43l-.44-.18a1.01 1.01 0 0 1 1.02-.65c.59 0 .96.3.96.86v1.48h-.43v-.33a.75.75 0 0 1-.74.4c-.5 0-.8-.28-.8-.65Zm1.33.06a.5.5 0 0 0 .19-.4v-.19c0 .1-.16.13-.5.16-.4.06-.55.15-.55.34 0 .15.15.28.37.28.18 0 .35-.07.49-.19Zm1.14-2.8h.46v3.32h-.46v-3.33Zm2.04.24h.5l1.53 2.34v-2.34h.47v3.12h-.47l-1.57-2.41v2.4h-.46v-3.11Zm2.96 1.94a1.18 1.18 0 0 1 1.17-1.2h.03a1.14 1.14 0 0 1 1.17 1.11v.25h-1.94a.77.77 0 0 0 .96.58c.2-.05.37-.17.49-.34l.37.22a1.18 1.18 0 0 1-1.05.56 1.15 1.15 0 0 1-1.2-1.11v-.07Zm.46-.21h1.45a.67.67 0 0 0-.7-.56.7.7 0 0 0-.75.56Zm2.56.61v-1.14h-.46v-.4h.46v-.5l.46-.3v.8h.62v.4h-.65v1.14c0 .25.13.37.31.37.12 0 .24-.03.34-.09v.43a.82.82 0 0 1-.37.1c-.46 0-.71-.25-.71-.8Zm1.36-1.54h.46l.52 1.67.62-1.67h.43l.62 1.67.55-1.67h.47l-.8 2.28h-.44l-.61-1.66-.65 1.7h-.46l-.71-2.32Zm3.88 1.14a1.2 1.2 0 1 1 .74 1.12 1.19 1.19 0 0 1-.74-1.12Zm1.92 0a.74.74 0 1 0-1.48.07.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm.89-1.14h.46v.4a.72.72 0 0 1 .65-.4h.19v.46h-.28c-.37 0-.56.16-.56.6v1.22h-.46v-2.28Zm2.59 1.24-.4.43v.58h-.46v-3.3h.46V20l1.08-1.17h.55l-.89.96.92 1.32h-.52l-.74-1.04ZM5.2 10.16H3.72v5.18H5.2c.66.03 1.32-.18 1.85-.59a2.56 2.56 0 0 0 .92-1.97c0-1.54-1.14-2.62-2.77-2.62Zm1.2 3.88c-.3.28-.74.4-1.39.4h-.28v-3.39h.28a1.88 1.88 0 0 1 1.39.43 1.73 1.73 0 0 1 .55 1.3c0 .48-.2.93-.55 1.26Zm2.03-3.88h1.02v5.18H8.43v-5.18Zm3.49 2c-.62-.22-.77-.37-.77-.65 0-.34.3-.58.74-.58a.97.97 0 0 1 .8.43l.53-.68a2.32 2.32 0 0 0-1.52-.59 1.52 1.52 0 0 0-1.6 1.42v.06c0 .71.34 1.08 1.26 1.42.25.08.49.18.71.31a.64.64 0 0 1 .31.53.75.75 0 0 1-.74.74h-.03a1.29 1.29 0 0 1-1.1-.68l-.66.61a2 2 0 0 0 1.8 1 1.68 1.68 0 0 0 1.78-1.7c-.03-.87-.37-1.24-1.51-1.64Zm1.82.59a2.66 2.66 0 0 0 2.65 2.68h.06c.44 0 .88-.1 1.27-.3v-1.18a1.54 1.54 0 0 1-1.2.55 1.69 1.69 0 0 1-1.73-1.63v-.15a1.72 1.72 0 0 1 1.66-1.8h.03a1.64 1.64 0 0 1 1.27.6v-1.15c-.38-.2-.8-.31-1.23-.3a2.69 2.69 0 0 0-2.78 2.68Zm11.97.9-1.4-3.5h-1.07l2.19 5.31h.52l2.25-5.3h-1.1l-1.4 3.48Zm2.96 1.69h2.83v-.87h-1.85v-1.41h1.8v-.87h-1.8v-1.14h1.85v-.9h-2.83v5.19Zm6.84-3.64c0-.96-.68-1.51-1.82-1.51h-1.48v5.18h1.02v-2.1h.12l1.4 2.07h1.23l-1.64-2.2a1.36 1.36 0 0 0 1.17-1.44Zm-2.03.86h-.31V11h.3c.62 0 .96.28.96.77.03.52-.3.8-.95.8Zm2.84-2.13c0-.09-.07-.15-.19-.15h-.15v.46h.12v-.15l.12.18h.13l-.13-.21c.06 0 .1-.06.1-.13Zm-.19.07-.03-.13h.03c.06 0 .1.03.1.06-.04.07-.07.07-.1.07Z\"\r\n />\r\n </g>\r\n <path\r\n fill=\"#000\"\r\n d=\"M36.16 10.13a.4.4 0 0 0-.4.4.4.4 0 1 0 .8 0 .4.4 0 0 0-.4-.4Zm0 .74a.32.32 0 0 1-.34-.31.32.32 0 0 1 .65-.03.34.34 0 0 1-.3.34Z\"\r\n />\r\n <path\r\n fill=\"url(#i)\"\r\n d=\"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z\"\r\n />\r\n <path\r\n fill=\"url(#j)\"\r\n d=\"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z\"\r\n />\r\n <mask\r\n id=\"k\"\r\n width=\"6\"\r\n height=\"6\"\r\n x=\"18\"\r\n y=\"10\"\r\n maskUnits=\"userSpaceOnUse\"\r\n style=\"mask-type:luminance\"\r\n >\r\n <path\r\n fill=\"#fff\"\r\n d=\"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z\"\r\n />\r\n </mask>\r\n <g mask=\"url(#k)\">\r\n <path\r\n fill=\"url(#l)\"\r\n d=\"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z\"\r\n />\r\n </g>\r\n </g>\r\n <defs>\r\n <linearGradient\r\n id=\"c\"\r\n x1=\"22.25\"\r\n x2=\"19.35\"\r\n y1=\"15.06\"\r\n y2=\"10.42\"\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop offset=\"0\" stop-color=\"#F59F00\" />\r\n <stop offset=\".19\" stop-color=\"#F49B00\" />\r\n <stop offset=\".37\" stop-color=\"#F29101\" />\r\n <stop offset=\".5\" stop-color=\"#F08302\" />\r\n <stop offset=\".6\" stop-color=\"#EE7905\" />\r\n <stop offset=\".76\" stop-color=\"#EC7008\" />\r\n <stop offset=\"1\" stop-color=\"#EC6D09\" />\r\n </linearGradient>\r\n <linearGradient\r\n id=\"d\"\r\n x1=\"22.25\"\r\n x2=\"19.35\"\r\n y1=\"15.06\"\r\n y2=\"10.42\"\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop offset=\"0\" stop-color=\"#F3941E\" stop-opacity=\"0\" />\r\n <stop offset=\".04\" stop-color=\"#F48C1C\" stop-opacity=\".08\" />\r\n <stop offset=\".2\" stop-color=\"#F77314\" stop-opacity=\".32\" />\r\n <stop offset=\".35\" stop-color=\"#F95D0E\" stop-opacity=\".53\" />\r\n <stop offset=\".5\" stop-color=\"#FB4B09\" stop-opacity=\".7\" />\r\n <stop offset=\".64\" stop-color=\"#FD3D05\" stop-opacity=\".83\" />\r\n <stop offset=\".77\" stop-color=\"#FE3302\" stop-opacity=\".92\" />\r\n <stop offset=\".9\" stop-color=\"#FF2D01\" stop-opacity=\".98\" />\r\n <stop offset=\"1\" stop-color=\"#FF2B00\" />\r\n </linearGradient>\r\n <radialGradient\r\n id=\"f\"\r\n cx=\"0\"\r\n cy=\"0\"\r\n r=\"1\"\r\n gradientTransform=\"rotate(4.24 -167.26 291.02) scale(3.3208)\"\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop offset=\"0\" stop-color=\"#F3941E\" stop-opacity=\"0\" />\r\n <stop offset=\".45\" stop-color=\"#EA8D1D\" stop-opacity=\".05\" />\r\n <stop offset=\".66\" stop-color=\"#CA7618\" stop-opacity=\".2\" />\r\n <stop offset=\".83\" stop-color=\"#924D10\" stop-opacity=\".48\" />\r\n <stop offset=\".96\" stop-color=\"#441304\" stop-opacity=\".87\" />\r\n <stop offset=\".99\" stop-color=\"#2F0401\" stop-opacity=\".97\" />\r\n </radialGradient>\r\n <linearGradient\r\n id=\"i\"\r\n x1=\"22.25\"\r\n x2=\"19.35\"\r\n y1=\"15.06\"\r\n y2=\"10.42\"\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop offset=\"0\" stop-color=\"#F59F00\" />\r\n <stop offset=\".19\" stop-color=\"#F49B00\" />\r\n <stop offset=\".37\" stop-color=\"#F29101\" />\r\n <stop offset=\".5\" stop-color=\"#F08302\" />\r\n <stop offset=\".6\" stop-color=\"#EE7905\" />\r\n <stop offset=\".76\" stop-color=\"#EC7008\" />\r\n <stop offset=\"1\" stop-color=\"#EC6D09\" />\r\n </linearGradient>\r\n <linearGradient\r\n id=\"j\"\r\n x1=\"22.25\"\r\n x2=\"19.35\"\r\n y1=\"15.06\"\r\n y2=\"10.42\"\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop offset=\"0\" stop-color=\"#F3941E\" stop-opacity=\"0\" />\r\n <stop offset=\".04\" stop-color=\"#F48C1C\" stop-opacity=\".08\" />\r\n <stop offset=\".2\" stop-color=\"#F77314\" stop-opacity=\".32\" />\r\n <stop offset=\".35\" stop-color=\"#F95D0E\" stop-opacity=\".53\" />\r\n <stop offset=\".5\" stop-color=\"#FB4B09\" stop-opacity=\".7\" />\r\n <stop offset=\".64\" stop-color=\"#FD3D05\" stop-opacity=\".83\" />\r\n <stop offset=\".77\" stop-color=\"#FE3302\" stop-opacity=\".92\" />\r\n <stop offset=\".9\" stop-color=\"#FF2D01\" stop-opacity=\".98\" />\r\n <stop offset=\"1\" stop-color=\"#FF2B00\" />\r\n </linearGradient>\r\n <radialGradient\r\n id=\"l\"\r\n cx=\"0\"\r\n cy=\"0\"\r\n r=\"1\"\r\n gradientTransform=\"rotate(4.24 -167.26 291.02) scale(3.3208)\"\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop offset=\"0\" stop-color=\"#F3941E\" stop-opacity=\"0\" />\r\n <stop offset=\".45\" stop-color=\"#EA8D1D\" stop-opacity=\".05\" />\r\n <stop offset=\".66\" stop-color=\"#CA7618\" stop-opacity=\".2\" />\r\n <stop offset=\".83\" stop-color=\"#924D10\" stop-opacity=\".48\" />\r\n <stop offset=\".96\" stop-color=\"#441304\" stop-opacity=\".87\" />\r\n <stop offset=\".99\" stop-color=\"#2F0401\" stop-opacity=\".97\" />\r\n </radialGradient>\r\n <clipPath id=\"a\">\r\n <path fill=\"#fff\" d=\"M0 0h33v5.55H0z\" transform=\"translate(3.5 10)\" />\r\n </clipPath>\r\n <clipPath id=\"b\">\r\n <path fill=\"#fff\" d=\"M0 0h33v5.86H0z\" transform=\"translate(3.5 10)\" />\r\n </clipPath>\r\n <clipPath id=\"g\">\r\n <path fill=\"#fff\" d=\"M0 0h33v5.55H0z\" transform=\"translate(3.5 10)\" />\r\n </clipPath>\r\n <clipPath id=\"h\">\r\n <path fill=\"#fff\" d=\"M0 0h33v5.86H0z\" transform=\"translate(3.5 10)\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n);\r\n\r\nexport default DiscoverIcon;\r\n","import { h } from \"preact\";\r\n\r\ninterface CupIconProps {\r\n opacity?: number;\r\n}\r\n\r\nconst CupIcon = ({ opacity = 1 }: CupIconProps) => (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 40 26\"\r\n width=\"40\"\r\n height=\"26\"\r\n opacity={opacity}\r\n >\r\n <rect width=\"45.3\" height=\"27\" x=\"-3.3\" y=\"-.79\" fill=\"#fff\" rx=\"2.82\" />\r\n <path\r\n fill=\"#01798a\"\r\n d=\"M27.27-.79a4.06 4.06 0 0 0-3.6 2.8l-4.96 23.42a2.14 2.14 0 0 0 2 2.8h18.35a2.81 2.81 0 0 0 2.8-2.82V1.15A2.25 2.25 0 0 0 40-.8\"\r\n />\r\n <rect\r\n width=\"20.38\"\r\n height=\"29.02\"\r\n x=\"-4\"\r\n y=\"-.79\"\r\n fill=\"#dc1f2b\"\r\n rx=\"2.82\"\r\n />\r\n <path\r\n fill=\"#1a4580\"\r\n d=\"M24.37 2.02a3.98 3.98 0 0 1 3.48-2.8H14.18a3.97 3.97 0 0 0-3.5 2.8l-4.85 23.4a2.13 2.13 0 0 0 1.94 2.81h13.7a2.13 2.13 0 0 1-1.94-2.8z\"\r\n />\r\n <path\r\n fill=\"#fff\"\r\n d=\"M16.63 15.04h.18a.32.32 0 0 0 .32-.17l.46-.7h1.24l-.26.47h1.49l-.2.7H18.1a.82.82 0 0 1-.75.44h-.92zm-.2 1h3.25l-.21.77h-1.3l-.2.74h1.27l-.21.77h-1.27l-.3 1.09c-.07.18.02.26.29.24h1.03l-.19.71H16.6q-.57 0-.39-.65l.38-1.4h-.81l.2-.76h.82l.2-.74h-.78l.2-.76zm5.19-1.87-.06.45a2.37 2.37 0 0 1 1.18-.47h2.05l-.78 2.88q-.1.5-.84.5h-2.34l-.54 2.01c-.03.11.01.17.13.17h.46l-.17.62h-1.17q-.67 0-.56-.4l1.54-5.76zm1.74.81h-1.84l-.22.78a1.52 1.52 0 0 1 .82-.23h1.1zm-.67 1.8c.14.02.22-.03.22-.16l.12-.4h-1.84l-.16.57zm-1.24.93h1.06l-.02.47h.29c.14 0 .2-.05.2-.14l.1-.3h.87l-.11.44a.76.76 0 0 1-.8.57h-.56v.8c-.01.12.1.18.33.18h.53l-.17.63H21.9c-.36.02-.53-.15-.53-.52zM8.6 10.34a2.62 2.62 0 0 1-1 1.64 3.24 3.24 0 0 1-1.98.58 2.16 2.16 0 0 1-1.68-.59 1.54 1.54 0 0 1-.37-1.06 2.86 2.86 0 0 1 .06-.57l.87-4.2h1.3l-.85 4.15a1.35 1.35 0 0 0-.04.32.82.82 0 0 0 .16.52.89.89 0 0 0 .75.3 1.56 1.56 0 0 0 1-.3 1.37 1.37 0 0 0 .5-.84l.84-4.15h1.3zm5.47-1.65h1.02l-.8 3.74h-1.02zm.32-1.37h1.03l-.2.91H14.2l.19-.9M16 12.15a1.39 1.39 0 0 1-.41-1.05 2.45 2.45 0 0 1 .01-.25l.04-.27a2.55 2.55 0 0 1 .78-1.45 2.07 2.07 0 0 1 1.43-.54 1.5 1.5 0 0 1 1.1.39 1.4 1.4 0 0 1 .4 1.06 2.59 2.59 0 0 1-.02.26l-.05.28a2.48 2.48 0 0 1-.77 1.42 2.08 2.08 0 0 1-1.43.53 1.5 1.5 0 0 1-1.09-.38m1.95-.74a1.84 1.84 0 0 0 .38-.9.58.58 0 0 0 .03-.19 1.74 1.74 0 0 0 .01-.17.76.76 0 0 0-.17-.54.64.64 0 0 0-.5-.2.89.89 0 0 0-.7.3 1.9 1.9 0 0 0-.38.92l-.03.18a1.36 1.36 0 0 0-.01.17.75.75 0 0 0 .17.54.64.64 0 0 0 .5.18.9.9 0 0 0 .7-.3m8.02 3.67.25-.87h1.24l-.05.32a3.1 3.1 0 0 1 1.09-.32h1.54l-.25.87h-.24l-1.16 4.12h.24l-.23.82h-.24l-.1.36h-1.2l.1-.36h-2.38l.23-.82h.24l1.16-4.12zm1.34 0L27 16.2a5.13 5.13 0 0 1 1-.27c.1-.4.24-.85.24-.85zm-.46 1.64-.32 1.17a3.44 3.44 0 0 1 1.01-.33l.24-.84zm.23 2.48.24-.84h-.93l-.24.84zm3.01-5.05h1.17l.05.44c0 .11.06.16.2.16h.2l-.2.74h-.87c-.32.02-.5-.1-.5-.38zm-.34 1.59h3.79l-.23.79h-1.2l-.2.74h1.2l-.23.79h-1.34l-.3.46h.65l.16.93c.01.09.1.13.23.13h.2l-.2.77h-.73c-.37.02-.57-.1-.58-.38l-.18-.85-.6.9a.65.65 0 0 1-.65.36h-1.1l.22-.77h.34a.46.46 0 0 0 .36-.19l.94-1.36h-1.2l.22-.8h1.3l.21-.73h-1.3l.22-.8zM9.8 8.69h.92l-.1.54.12-.16a1.43 1.43 0 0 1 1.1-.48 1 1 0 0 1 .83.34 1.15 1.15 0 0 1 .14.95l-.5 2.56h-.95l.46-2.32a.74.74 0 0 0-.04-.53.44.44 0 0 0-.4-.17.88.88 0 0 0-.62.23 1.14 1.14 0 0 0-.34.63L10 12.44h-.94zm10.55 0h.92l-.1.54.13-.16a1.43 1.43 0 0 1 1.08-.48.99.99 0 0 1 .85.34 1.14 1.14 0 0 1 .13.95l-.5 2.56h-.95l.46-2.32a.75.75 0 0 0-.04-.53.45.45 0 0 0-.4-.17.89.89 0 0 0-.62.23 1.12 1.12 0 0 0-.33.63l-.43 2.16h-.94zm4.55-2.33h2.67a1.8 1.8 0 0 1 1.19.35 1.25 1.25 0 0 1 .4 1v.02a3.77 3.77 0 0 1-.06.59 2.38 2.38 0 0 1-.81 1.4 2.29 2.29 0 0 1-1.5.52h-1.44l-.44 2.2h-1.24zm.67 2.82h1.19a1.14 1.14 0 0 0 .73-.21 1.14 1.14 0 0 0 .36-.67l.03-.15v-.13a.52.52 0 0 0-.22-.47 1.35 1.35 0 0 0-.72-.15h-1zm9.15 3.98a5.91 5.91 0 0 1-.98 1.56 1.99 1.99 0 0 1-1.7.71l.08-.64c.89-.27 1.36-1.51 1.64-2.06l-.33-4.03.68-.01h.58l.06 2.53 1.07-2.53h1.09zM31.68 9l-.43.3a1.35 1.35 0 0 0-1.66-.21c-1.08.5-1.98 4.4 1 3.11l.17.2 1.17.04.77-3.54zm-.66 1.92c-.2.56-.61.94-.94.83-.33-.1-.45-.64-.26-1.2.19-.57.61-.94.94-.83.33.1.45.64.26 1.2\"\r\n />\r\n </svg>\r\n);\r\n\r\nexport default CupIcon;\r\n","import { useEffect, useState } from \"preact/hooks\";\r\n\r\n/**\r\n * Hook to listen for a CSS media query.\r\n * @param query - The media query string (e.g., '(min-width: 768px)')\r\n * @returns true if the query matches\r\n */\r\nexport function useMediaQuery(query: string): boolean {\r\n const getMatch = () => window.matchMedia(query).matches;\r\n\r\n const [matches, setMatches] = useState(getMatch);\r\n\r\n useEffect(() => {\r\n const mediaQueryList = window.matchMedia(query);\r\n const listener = (event: MediaQueryListEvent) => setMatches(event.matches);\r\n\r\n // Initial match check\r\n setMatches(mediaQueryList.matches);\r\n\r\n // Listen for changes\r\n mediaQueryList.addEventListener(\"change\", listener);\r\n\r\n return () => {\r\n mediaQueryList.removeEventListener(\"change\", listener);\r\n };\r\n }, [query]);\r\n\r\n return matches;\r\n}\r\n","import { Fragment, h } from \"preact\";\r\nimport MasterCardIcon from \"../assets/icons/mastercard\";\r\nimport VisaIcon from \"../assets/icons/visa\";\r\nimport MaestroIcon from \"../assets/icons/maestro\";\r\nimport AmexIcon from \"../assets/icons/amex\";\r\nimport JcbIcon from \"../assets/icons/jcb\";\r\nimport DinersIcon from \"../assets/icons/diners\";\r\nimport DiscoverIcon from \"../assets/icons/discover\";\r\nimport CupIcon from \"../assets/icons/cup\";\r\nimport { Tooltip } from \"../components/tooltip/tooltip\";\r\nimport { useMediaQuery } from \"./custom-hooks/use-media-query\";\r\n\r\ninterface BrandIcon {\r\n brand: string;\r\n brandFullName: string;\r\n}\r\n\r\nexport interface BrandHidden {\r\n brand: string;\r\n}\r\n\r\ninterface RenderBrandIconsProps {\r\n brands: BrandIcon[];\r\n brandHidden?: BrandHidden[];\r\n limit?: number;\r\n}\r\n\r\nexport function RenderBrandIcons({ brands, brandHidden = [], limit = 3 }: RenderBrandIconsProps): h.JSX.Element {\r\n const isWidth380 = useMediaQuery(\"(max-width: 380px)\");\r\n const isWidth335 = useMediaQuery(\"(max-width: 335px)\");\r\n const widthLimit = isWidth335 ? 1 : isWidth380 ? 2 : limit;\r\n\r\n const brandToShow = brands.filter((brand) => {\r\n const { brand: brandName } = brand;\r\n const hidden = brandHidden.some((x) => x.brand === brandName);\r\n\r\n return !hidden;\r\n });\r\n\r\n return (\r\n <Fragment>\r\n {brandToShow.map(({ brand }, index) => {\r\n if (index >= Math.min(limit, widthLimit)) {\r\n if (index === Math.min(limit, widthLimit)) {\r\n return (\r\n <Tooltip\r\n content={\r\n <span style={{ display: \"flex\", gap: \"4px\", overflow: \"visible\" }}>\r\n {brandToShow.slice(Math.min(limit, widthLimit)).map(({ brand }) => (\r\n <RenderBrandIcon key={brand} brand={brand} />\r\n ))}\r\n </span>\r\n }\r\n >\r\n <span key={brand} className=\"straumur__render-brand-icons__overflow\">\r\n +{brandToShow.length - Math.min(limit, widthLimit)}\r\n </span>\r\n </Tooltip>\r\n );\r\n }\r\n return null;\r\n }\r\n\r\n return <RenderBrandIcon key={brand} brand={brand} />;\r\n })}\r\n </Fragment>\r\n );\r\n}\r\n\r\nconst RenderBrandIcon = ({ brand }: { brand: string }): h.JSX.Element => {\r\n switch (brand) {\r\n case \"visa\":\r\n return <VisaIcon />;\r\n case \"mc\":\r\n return <MasterCardIcon />;\r\n case \"maestro\":\r\n return <MaestroIcon />;\r\n case \"amex\":\r\n return <AmexIcon />;\r\n case \"jcb\":\r\n return <JcbIcon />;\r\n case \"diners\":\r\n return <DinersIcon />;\r\n case \"discover\":\r\n return <DiscoverIcon />;\r\n case \"cup\":\r\n return <CupIcon />;\r\n default:\r\n return <span>{brand}</span>;\r\n }\r\n};\r\n","import { h } from \"preact\";\r\n\r\nconst LoaderIcon = () => (\r\n <svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"#002649\">\r\n <g fill=\"none\" fill-rule=\"evenodd\">\r\n <g transform=\"translate(2 2)\" stroke-width=\"4\">\r\n <circle stroke-opacity=\".3\" cx=\"18\" cy=\"18\" r=\"18\" />\r\n <path d=\"M36 18c0-9.94-8.06-18-18-18\">\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"rotate\"\r\n from=\"0 18 18\"\r\n to=\"360 18 18\"\r\n dur=\"1s\"\r\n repeatCount=\"indefinite\"\r\n />\r\n </path>\r\n </g>\r\n </g>\r\n </svg>\r\n);\r\n\r\nexport default LoaderIcon;\r\n","import { h } from \"preact\";\r\n\r\nconst CheckmarkIcon = () => (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"13\" viewBox=\"0 0 16 13\" fill=\"none\">\r\n <path d=\"M2 7L6 11L14 2\" stroke=\"#002649\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n);\r\n\r\nexport default CheckmarkIcon;\r\n","import { Fragment, h } from \"preact\";\r\nimport { useRef, useState, useEffect } from \"preact/hooks\";\r\nimport \"./card-component.css\";\r\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\r\nimport {\r\n AdditionalDetailsActions,\r\n AdditionalDetailsData,\r\n AdyenCheckout,\r\n AdyenCheckoutError,\r\n CustomCard,\r\n ICore,\r\n PaymentCompletedData,\r\n PaymentFailedData,\r\n SubmitActions,\r\n SubmitData,\r\n UIElement,\r\n UIElementProps,\r\n} from \"@adyen/adyen-web\";\r\nimport i18n from \"../../localizations/i18n\";\r\nimport { Tooltip } from \"../../components/tooltip/tooltip\";\r\nimport CardIcon from \"../../assets/icons/card\";\r\nimport InfoIcon from \"../../assets/icons/info\";\r\nimport { BrandHidden, RenderBrandIcons } from \"../../utils/renderBrandIcons\";\r\nimport { CardComponentProps, CardFormError, CardFormErrorField } from \"./models\";\r\nimport LoaderIcon from \"../../assets/icons/loader\";\r\nimport CheckmarkIcon from \"../../assets/icons/checkmark\";\r\nimport { ICreateDetailsBody, ICreatePaymentBody } from \"../../adapter/models\";\r\nimport { createDetailsRequest, createPaymentRequest } from \"../../adapter/straumur-adapter\";\r\n\r\nfunction CardComponent({ configuration, paymentMethods }: CardComponentProps): h.JSX.Element | null {\r\n const cardElementRef = useRef<HTMLDivElement>(null);\r\n const adyenCardRef = useRef<ICore>();\r\n const customCardRef = useRef<CustomCard>();\r\n const [payButtonDisabled, setPayButtonDisabled] = useState<boolean>(true);\r\n const [securityCodePolicy, setSecurityCodePolicy] = useState<\"hidden\" | \"optional\" | \"required\">(\"required\");\r\n const [storePaymentMethod, setStorePaymentMethod] = useState(false);\r\n const storePaymentMethodRef = useRef(false);\r\n const [brandHidden, setBrandHidden] = useState<BrandHidden[]>([]);\r\n const [formErrors, setFormErrors] = useState<CardFormError>({\r\n encryptedCardNumber: { visible: false },\r\n encryptedExpiryDate: { visible: false },\r\n encryptedSecurityCode: { visible: false },\r\n });\r\n\r\n const hasCardPaymentMethod = paymentMethods.paymentMethods.paymentMethods?.some((x) => x.type === \"scheme\");\r\n\r\n const {\r\n activePaymentMethod,\r\n setActivePaymentMethod,\r\n isPaymentMethodInitialized,\r\n updatePaymentMethodInitialization,\r\n handleSuccess,\r\n handleError,\r\n setThreeDSecureActive,\r\n threeDSecureActive,\r\n } = usePaymentMethodGroup();\r\n\r\n if (!hasCardPaymentMethod || (activePaymentMethod !== \"card\" && threeDSecureActive)) {\r\n // if threeDSecureActive for some other payment method, do not show card form\r\n return null;\r\n }\r\n\r\n const schemeBrands = paymentMethods.paymentMethods.paymentMethods!.find((x) => x.type === \"scheme\")!.brands!;\r\n\r\n const initializeAdyenComponent = async () => {\r\n adyenCardRef.current = await AdyenCheckout({\r\n clientKey: paymentMethods.clientKey,\r\n environment: configuration.environment,\r\n amount: {\r\n value: paymentMethods.minorUnitsAmount,\r\n currency: paymentMethods.currency,\r\n },\r\n locale: configuration.locale,\r\n countryCode: \"IS\",\r\n paymentMethodsResponse: paymentMethods.paymentMethods,\r\n onSubmit: handleOnSubmit,\r\n onAdditionalDetails: handleOnSubmitAdditionalData,\r\n onError: handleOnError,\r\n onPaymentCompleted: handlePaymentCompleted,\r\n onPaymentFailed: handlePaymentFailed,\r\n });\r\n\r\n customCardRef.current = new CustomCard(adyenCardRef.current, {\r\n placeholders: configuration.placeholders,\r\n challengeWindowSize: \"05\", // looks like not working\r\n brands: schemeBrands,\r\n onBrand: (event) => {\r\n setSecurityCodePolicy(event.cvcPolicy);\r\n if (event.brand === \"card\") {\r\n setBrandHidden([]);\r\n return;\r\n }\r\n\r\n setBrandHidden(\r\n schemeBrands\r\n .filter((x) => x !== event.brand)\r\n .map((x) => {\r\n return {\r\n brand: x,\r\n };\r\n })\r\n );\r\n },\r\n onConfigSuccess() {\r\n updatePaymentMethodInitialization(\"card\", true);\r\n },\r\n onValidationError: (event) => {\r\n const defaultErrors: CardFormError = {\r\n encryptedCardNumber: { visible: false, message: undefined },\r\n encryptedExpiryDate: { visible: false, message: undefined },\r\n encryptedSecurityCode: { visible: false, message: undefined },\r\n };\r\n\r\n event\r\n .filter((x) => x.error)\r\n .forEach((x) => {\r\n defaultErrors[x.fieldType as CardFormErrorField].visible = true;\r\n defaultErrors[x.fieldType as CardFormErrorField].message = x.errorI18n;\r\n });\r\n\r\n setFormErrors(defaultErrors);\r\n },\r\n onAllValid: (event) => {\r\n setPayButtonDisabled(!event.allValid);\r\n },\r\n });\r\n\r\n if (cardElementRef.current) {\r\n customCardRef.current.mount(cardElementRef.current);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (activePaymentMethod === \"card\" && !isPaymentMethodInitialized.card) {\r\n initializeAdyenComponent();\r\n }\r\n }, [configuration, activePaymentMethod]);\r\n\r\n useEffect(() => {\r\n if (customCardRef.current && isPaymentMethodInitialized.card) {\r\n // Most of the time we will change configuration only to update locale, and that's not possible through .update() -> https://github.com/Adyen/adyen-web/issues/2407\r\n // So we need to reinitialize the component.\r\n initializeAdyenComponent();\r\n setFormErrors({\r\n encryptedCardNumber: { visible: false, message: undefined },\r\n encryptedExpiryDate: { visible: false, message: undefined },\r\n encryptedSecurityCode: { visible: false, message: undefined },\r\n });\r\n }\r\n }, [configuration]);\r\n\r\n const handleBoxChange = () => {\r\n setActivePaymentMethod(\"card\");\r\n };\r\n\r\n if (paymentMethods.paymentMethods?.paymentMethods?.length === 0) {\r\n return null;\r\n }\r\n\r\n const brands = schemeBrands.map((x) => {\r\n return { brand: x, brandFullName: x };\r\n });\r\n\r\n function handleStorePaymentMethodChange(event: h.JSX.TargetedEvent<HTMLInputElement, Event>) {\r\n setStorePaymentMethod(event.currentTarget.checked);\r\n }\r\n\r\n function handleOnError(_: AdyenCheckoutError, __?: UIElement<UIElementProps> | undefined): void {\r\n handleError(\"error.unknownError\");\r\n }\r\n\r\n useEffect(() => {\r\n storePaymentMethodRef.current = storePaymentMethod;\r\n }, [storePaymentMethod]);\r\n\r\n async function handleOnSubmit(state: SubmitData, _: UIElement<UIElementProps>, actions: SubmitActions) {\r\n const data: ICreatePaymentBody = {\r\n ...state.data,\r\n storePaymentMethod: storePaymentMethodRef.current,\r\n sessionId: configuration.sessionId,\r\n };\r\n\r\n const fetchResponse = await createPaymentRequest(configuration.environment, data);\r\n\r\n // We will always get 200 OK unless there is an error in our server code.\r\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\r\n if (!fetchResponse.ok) {\r\n actions.reject();\r\n handleError(\"error.failedToSubmitPayment\");\r\n return;\r\n }\r\n\r\n const response = await fetchResponse.json();\r\n\r\n // ResultCode should never be empty.\r\n if (!response.resultCode) {\r\n actions.reject();\r\n handleError(\"error.paymentFailed\");\r\n return;\r\n }\r\n\r\n const { resultCode, action } = response;\r\n\r\n if (resultCode === \"ChallengeShopper\" || resultCode === \"IdentifyShopper\") {\r\n setThreeDSecureActive(true);\r\n }\r\n\r\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\r\n // You must call this, even if the result of the payment is unsuccessful.\r\n actions.resolve({ resultCode, action });\r\n }\r\n\r\n async function handleOnSubmitAdditionalData(\r\n state: AdditionalDetailsData,\r\n _: UIElement<UIElementProps>,\r\n actions: AdditionalDetailsActions\r\n ) {\r\n const data: ICreateDetailsBody = {\r\n ...state.data,\r\n sessionId: configuration.sessionId,\r\n };\r\n\r\n const fetchResponse = await createDetailsRequest(configuration.environment, data);\r\n\r\n // We will always get 200 OK unless there is an error in our server code.\r\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\r\n if (!fetchResponse.ok) {\r\n actions.reject();\r\n handleError(\"error.failedToSubmitPaymentDetails\");\r\n return;\r\n }\r\n\r\n const response = await fetchResponse.json();\r\n\r\n // ResultCode should always be either Authorised or Refused or IdentifyShopper. Never empty.\r\n if (!response.resultCode) {\r\n actions.reject();\r\n handleError(\"error.paymentDetailsFailed\");\r\n return;\r\n }\r\n\r\n const { resultCode, action } = response;\r\n\r\n actions.resolve({ resultCode, action });\r\n }\r\n\r\n function handlePaymentCompleted(data: PaymentCompletedData, _?: UIElement<UIElementProps> | undefined): void {\r\n if (data.resultCode === \"Authorised\") {\r\n handleSuccess(\"success.paymentAuthorized\");\r\n } else {\r\n handleError(\"error.paymentUnsuccessful\");\r\n }\r\n configuration.onPaymentCompleted?.();\r\n }\r\n\r\n function handlePaymentFailed(data?: PaymentFailedData | undefined, _?: UIElement<UIElementProps> | undefined): void {\r\n if (data) {\r\n if (data.resultCode === \"Authorised\") {\r\n handleSuccess(\"success.paymentAuthorized\");\r\n } else {\r\n handleError(\"error.paymentUnsuccessful\");\r\n }\r\n }\r\n configuration.onPaymentFailed?.();\r\n }\r\n\r\n function handleSubmitClick() {\r\n if (!customCardRef.current) return;\r\n\r\n customCardRef.current!.submit();\r\n }\r\n\r\n return (\r\n <label className=\"straumur__card-component\">\r\n <input\r\n type=\"radio\"\r\n className=\"straumur__card-component__radio-selector\"\r\n checked={activePaymentMethod === \"card\"}\r\n onChange={handleBoxChange}\r\n />\r\n <span className=\"straumur__card-component__content\">\r\n <span className=\"straumur__card-component--circle\"></span>\r\n <CardIcon />\r\n <span className=\"straumur__card-component--text\">{i18n(configuration.locale, \"cards.title\")}</span>\r\n <span className=\"straumur__card-component--brands\">\r\n <RenderBrandIcons brands={brands} brandHidden={brandHidden} />\r\n </span>\r\n </span>\r\n <div\r\n className=\"straumur__card-component__expandable\"\r\n ref={cardElementRef}\r\n style={{\r\n height: threeDSecureActive ? \"600px\" : \"auto\",\r\n minWidth: threeDSecureActive ? \"350px\" : \"auto\",\r\n }}\r\n >\r\n {!isPaymentMethodInitialized.card && (\r\n <div className=\"straumur__card-component__loading-text\">\r\n <LoaderIcon />\r\n </div>\r\n )}\r\n\r\n <div\r\n className=\"straumur__card-component__form\"\r\n style={{\r\n opacity: isPaymentMethodInitialized.card && !threeDSecureActive ? 1 : 0,\r\n position: isPaymentMethodInitialized.card && !threeDSecureActive ? \"relative\" : \"absolute\",\r\n transition: \"opacity 0.3s ease-in-out\",\r\n }}\r\n >\r\n <div className=\"straumur__card-component__form--wrapper\">\r\n <label\r\n className={`${\"straumur__card-component__form--wrapper--label\"} ${\r\n formErrors.encryptedCardNumber.visible ? \"straumur__card-component__form--wrapper--label--error\" : \"\"\r\n }`}\r\n >\r\n {i18n(configuration.locale, \"cards.cardNumber\")}\r\n </label>\r\n <span\r\n className={`${\"straumur__card-component__form--wrapper--input\"} ${\r\n formErrors.encryptedCardNumber.visible ? \"straumur__card-component__form--wrapper--input--error\" : \"\"\r\n }`}\r\n data-cse=\"encryptedCardNumber\"\r\n />\r\n {formErrors.encryptedCardNumber.visible && (\r\n <span className=\"straumur__card-component__form--wrapper--error\">\r\n {formErrors.encryptedCardNumber.message}\r\n </span>\r\n )}\r\n </div>\r\n <div className=\"straumur__card-component__form--field-wrapper\">\r\n <div className=\"straumur__card-component__form--wrapper\">\r\n <label\r\n className={`${\"straumur__card-component__form--wrapper--label\"} ${\r\n formErrors.encryptedExpiryDate.visible ? \"straumur__card-component__form--wrapper--label--error\" : \"\"\r\n }`}\r\n >\r\n {i18n(configuration.locale, \"cards.expiryDate\")}\r\n </label>\r\n <span\r\n className={`${\"straumur__card-component__form--wrapper--input\"} ${\r\n formErrors.encryptedExpiryDate.visible ? \"straumur__card-component__form--wrapper--input--error\" : \"\"\r\n }`}\r\n data-cse=\"encryptedExpiryDate\"\r\n />\r\n {formErrors.encryptedExpiryDate.visible && (\r\n <span className=\"straumur__card-component__form--wrapper--error\">\r\n {formErrors.encryptedExpiryDate.message}\r\n </span>\r\n )}\r\n </div>\r\n\r\n <div className=\"straumur__card-component__form--wrapper\">\r\n {(securityCodePolicy === \"optional\" || securityCodePolicy === \"required\") && (\r\n <Fragment>\r\n <label\r\n className={`${\"straumur__card-component__form--wrapper--label\"} ${\r\n formErrors.encryptedSecurityCode.visible\r\n ? \"straumur__card-component__form--wrapper--label--error\"\r\n : \"\"\r\n }`}\r\n >\r\n {securityCodePolicy === \"optional\"\r\n ? i18n(configuration.locale, \"cards.securityCode3DigitsOptional\")\r\n : i18n(configuration.locale, \"cards.securityCode3Digits\")}\r\n </label>\r\n <span\r\n className={`${\"straumur__card-component__form--wrapper--input\"} ${\r\n formErrors.encryptedSecurityCode.visible\r\n ? \"straumur__card-component__form--wrapper--input--error\"\r\n : \"\"\r\n }`}\r\n data-cse=\"encryptedSecurityCode\"\r\n />\r\n {formErrors.encryptedSecurityCode.visible && (\r\n <span className=\"straumur__card-component__form--wrapper--error\">\r\n {formErrors.encryptedSecurityCode.message}\r\n </span>\r\n )}\r\n <div className=\"straumur__card-component__form--wrapper--label--info\">\r\n <Tooltip content={<span>{i18n(configuration.locale, \"cards.securityCode3DigitsInfo\")}</span>}>\r\n <InfoIcon />\r\n </Tooltip>\r\n </div>\r\n </Fragment>\r\n )}\r\n </div>\r\n </div>\r\n\r\n {paymentMethods.enableStoreDetails === \"AskForConsent\" && (\r\n <label className=\"straumur__card-component__form--wrapper--label-checkbox\">\r\n <div\r\n className={`${\"straumur__card-component__form--wrapper--label-checkbox--checkmark\"} ${\r\n storePaymentMethod\r\n ? \"straumur__card-component__form--wrapper--label-checkbox--checkmark--checked\"\r\n : \"\"\r\n }`}\r\n >\r\n <div\r\n className={`${\"straumur__card-component__form--wrapper--label-checkbox--checkmark--icon\"} ${\r\n storePaymentMethod\r\n ? \"straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked\"\r\n : \"\"\r\n }`}\r\n >\r\n <CheckmarkIcon />\r\n </div>\r\n </div>\r\n <input\r\n type=\"checkbox\"\r\n className=\"straumur__card-component__form--wrapper--label-checkbox--checkbox\"\r\n checked={storePaymentMethod}\r\n onChange={handleStorePaymentMethodChange}\r\n />\r\n {i18n(configuration.locale, \"cards.storePaymentMethod\")}\r\n </label>\r\n )}\r\n\r\n <button\r\n className=\"straumur__card-component__submit-button\"\r\n disabled={payButtonDisabled}\r\n onClick={handleSubmitClick}\r\n >\r\n {paymentMethods.formattedAmount}\r\n </button>\r\n </div>\r\n </div>\r\n </label>\r\n );\r\n}\r\n\r\nexport default CardComponent;\r\n","import styleInject from '#style-inject';styleInject(\".straumur__google-pay-component{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__google-pay-component__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__google-pay-component__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__google-pay-component__radio-selector:checked+.straumur__google-pay-component__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__google-pay-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__google-pay-component__content:hover .straumur__google-pay-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__google-pay-component--circle:after{content:\\\"\\\";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__google-pay-component__radio-selector:checked+.straumur__google-pay-component__content .straumur__google-pay-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__google-pay-component__radio-selector:checked+.straumur__google-pay-component__content .straumur__google-pay-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__google-pay-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__google-pay-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__google-pay-component__radio-selector:checked~.straumur__google-pay-component__expandable{max-height:600px;opacity:1}.straumur__google-pay-component__expandable p{margin:0;color:#213547;font-size:.9rem}\\n\")","import { h } from \"preact\";\r\n\r\nconst GooglePayIcon = () => (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"40\"\r\n height=\"26\"\r\n fill=\"none\"\r\n viewBox=\"0 0 40 26\"\r\n >\r\n <path\r\n fill=\"#fff\"\r\n d=\"M29.13 2.41H10.87C5.17 2.41.5 7.18.5 13.01a10.5 10.5 0 0 0 10.37 10.58h18.26c5.7 0 10.37-4.76 10.37-10.59 0-5.82-4.67-10.59-10.37-10.59Z\"\r\n />\r\n <path\r\n fill=\"#3C4043\"\r\n d=\"M29.13 3.27c1.28 0 2.52.26 3.7.77a9.6 9.6 0 0 1 5.08 5.19 9.78 9.78 0 0 1 0 7.55 9.83 9.83 0 0 1-5.08 5.18 9.26 9.26 0 0 1-3.7.77H10.87a9.24 9.24 0 0 1-3.7-.77 9.6 9.6 0 0 1-5.08-5.18 9.78 9.78 0 0 1 0-7.55 9.83 9.83 0 0 1 5.08-5.19 9.24 9.24 0 0 1 3.7-.77h18.26Zm0-.86H10.87C5.17 2.41.5 7.18.5 13.01a10.5 10.5 0 0 0 10.37 10.58h18.26c5.7 0 10.37-4.76 10.37-10.59 0-5.82-4.67-10.59-10.37-10.59Z\"\r\n />\r\n <path\r\n fill=\"#3C4043\"\r\n d=\"M19.1 13.75v3.2h-1v-7.9h2.64c.67 0 1.24.23 1.7.68.49.46.72 1.01.72 1.67a2.2 2.2 0 0 1-.71 1.68c-.46.45-1.03.67-1.7.67H19.1Zm0-3.73v2.76h1.66c.4 0 .73-.14.99-.4.26-.28.4-.6.4-.98 0-.36-.14-.68-.4-.95a1.28 1.28 0 0 0-.99-.42H19.1Zm6.67 1.35c.73 0 1.31.2 1.74.6.42.4.64.95.64 1.65v3.34h-.95v-.76h-.04a1.9 1.9 0 0 1-1.65.93 2.1 2.1 0 0 1-1.46-.53c-.4-.35-.6-.8-.6-1.32 0-.56.21-1 .63-1.34.41-.33.97-.5 1.66-.5.59 0 1.07.12 1.45.34v-.23c0-.36-.13-.65-.4-.9a1.4 1.4 0 0 0-.97-.37c-.56 0-1 .24-1.32.72l-.88-.56a2.42 2.42 0 0 1 2.15-1.07Zm-1.29 3.92c0 .27.11.5.33.67.22.17.48.26.78.26.42 0 .79-.16 1.12-.48.32-.31.49-.68.49-1.11a2.02 2.02 0 0 0-1.3-.38c-.4 0-.74.1-1.01.3a.9.9 0 0 0-.4.74Zm9.08-3.75-3.32 7.8h-1.02l1.23-2.73-2.19-5.07h1.09l1.57 3.89h.02l1.54-3.89h1.08Z\"\r\n />\r\n <path\r\n fill=\"#4285F4\"\r\n d=\"M15.14 13.1c0-.32-.03-.64-.09-.95h-4.17v1.75h2.4a2.1 2.1 0 0 1-.89 1.4v1.14h1.43a4.49 4.49 0 0 0 1.32-3.33Z\"\r\n />\r\n <path\r\n fill=\"#34A853\"\r\n d=\"M12.4 15.3a2.66 2.66 0 0 1-4-1.44H6.9v1.18a4.43 4.43 0 0 0 6.91 1.4l-1.43-1.13Z\"\r\n />\r\n <path\r\n fill=\"#FABB05\"\r\n d=\"M8.25 13c0-.3.05-.59.14-.86v-1.17H6.9a4.59 4.59 0 0 0 0 4.07l1.48-1.17a2.79 2.79 0 0 1-.14-.86Z\"\r\n />\r\n <path\r\n fill=\"#E94235\"\r\n d=\"M10.88 10.27c.66 0 1.24.23 1.7.68l1.27-1.3a4.22 4.22 0 0 0-2.97-1.18 4.44 4.44 0 0 0-3.97 2.5l1.48 1.17a2.66 2.66 0 0 1 2.5-1.87Z\"\r\n />\r\n </svg>\r\n);\r\n\r\nexport default GooglePayIcon;\r\n","export type PaymentMethod = \"card\" | \"storedcard\" | \"googlepay\" | \"applepay\";\r\n\r\nexport const NETWORK_ERROR = \"NETWORK_ERROR\";\r\nexport const CANCEL = \"CANCEL\";\r\nexport const IMPLEMENTATION_ERROR = \"IMPLEMENTATION_ERROR\";\r\nexport const API_ERROR = \"API_ERROR\";\r\nexport const ERROR = \"ERROR\";\r\nexport const SCRIPT_ERROR = \"SCRIPT_ERROR\";\r\nexport const SDK_ERROR = \"SDK_ERROR\";\r\n","import { h } from \"preact\";\r\nimport { useEffect, useRef } from \"preact/hooks\";\r\nimport \"./google-pay-component.css\";\r\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\r\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\r\nimport { SuccessResponse } from \"../../services/models\";\r\nimport {\r\n AdditionalDetailsActions,\r\n AdditionalDetailsData,\r\n AdyenCheckout,\r\n AdyenCheckoutError,\r\n GooglePay,\r\n GooglePayConfiguration,\r\n ICore,\r\n PaymentCompletedData,\r\n PaymentFailedData,\r\n SubmitActions,\r\n SubmitData,\r\n UIElement,\r\n UIElementProps,\r\n} from \"@adyen/adyen-web\";\r\nimport i18n from \"../../localizations/i18n\";\r\nimport GooglePayIcon from \"../../assets/icons/googlepay\";\r\nimport { ICreateDetailsBody, ICreatePaymentBody } from \"../../adapter/models\";\r\nimport { createDetailsRequest, createPaymentRequest } from \"../../adapter/straumur-adapter\";\r\nimport { CANCEL } from \"../../models/constants\";\r\n\r\ninterface GooglePayComponentProps {\r\n configuration: StraumurCheckoutConfiguration;\r\n paymentMethods: SuccessResponse;\r\n}\r\n\r\nfunction GooglePayComponent({ configuration, paymentMethods }: GooglePayComponentProps): h.JSX.Element | null {\r\n const googlePayElementRef = useRef<HTMLDivElement>(null);\r\n const adyenCardRef = useRef<ICore>();\r\n const googlePayRef = useRef<GooglePay>();\r\n const {\r\n activePaymentMethod,\r\n setActivePaymentMethod,\r\n isPaymentMethodInitialized,\r\n updatePaymentMethodInitialization,\r\n handleSuccess,\r\n handleError,\r\n setThreeDSecureActive,\r\n threeDSecureActive,\r\n } = usePaymentMethodGroup();\r\n\r\n const initializeAdyenComponent = async () => {\r\n adyenCardRef.current = await AdyenCheckout({\r\n clientKey: paymentMethods.clientKey,\r\n environment: configuration.environment,\r\n locale: paymentMethods.locale,\r\n countryCode: \"IS\",\r\n amount: {\r\n value: paymentMethods.minorUnitsAmount,\r\n currency: paymentMethods.currency,\r\n },\r\n onError: handleOnError,\r\n onAdditionalDetails: handleOnSubmitAdditionalData,\r\n onPaymentCompleted: handlePaymentCompleted,\r\n onPaymentFailed: handlePaymentFailed,\r\n });\r\n\r\n const gpayConfig = paymentMethods.paymentMethods.paymentMethods!.find((x) => x.type === \"googlepay\")!\r\n .configuration! as { gatewayMerchantId: string; merchantId: string };\r\n\r\n const googlePayConfiguration: GooglePayConfiguration = {\r\n amount: {\r\n value: paymentMethods.minorUnitsAmount,\r\n currency: paymentMethods.currency,\r\n },\r\n\r\n countryCode: \"IS\",\r\n environment: configuration.environment,\r\n onSubmit: handleOnSubmit,\r\n configuration: {\r\n ...gpayConfig,\r\n merchantName: paymentMethods.merchantName,\r\n },\r\n };\r\n\r\n googlePayRef.current = new GooglePay(adyenCardRef.current, googlePayConfiguration);\r\n\r\n googlePayRef.current\r\n .isAvailable()\r\n .then(() => {\r\n googlePayRef.current!.mount(googlePayElementRef.current!);\r\n updatePaymentMethodInitialization(\"googlepay\", true);\r\n })\r\n .catch(() => {\r\n handleError(\"error.googlePayNotAvailable\");\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (activePaymentMethod === \"googlepay\" && !isPaymentMethodInitialized.googlepay) {\r\n initializeAdyenComponent();\r\n }\r\n }, [configuration, activePaymentMethod]);\r\n\r\n useEffect(() => {\r\n if (googlePayRef.current && isPaymentMethodInitialized.googlepay) {\r\n // Most of the time we will change configuration only to update locale, and that's not possible through .update() -> https://github.com/Adyen/adyen-web/issues/2407\r\n // So we need to reinitialize the component.\r\n initializeAdyenComponent();\r\n }\r\n }, [configuration]);\r\n\r\n const handleBoxChange = () => {\r\n setActivePaymentMethod(\"googlepay\");\r\n };\r\n\r\n function handleOnError(data: AdyenCheckoutError, __?: UIElement<UIElementProps> | undefined): void {\r\n if (data.name !== CANCEL) {\r\n handleError(\"error.unknownError\");\r\n }\r\n }\r\n\r\n async function handleOnSubmit(state: SubmitData, _: UIElement<UIElementProps>, actions: SubmitActions) {\r\n const data: ICreatePaymentBody = {\r\n ...state.data,\r\n sessionId: configuration.sessionId,\r\n };\r\n\r\n const fetchResponse = await createPaymentRequest(configuration.environment, data);\r\n\r\n // We will always get 200 OK unless there is an error in our server code.\r\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\r\n if (!fetchResponse.ok) {\r\n actions.reject();\r\n handleError(\"error.failedToSubmitPayment\");\r\n return;\r\n }\r\n\r\n const response = await fetchResponse.json();\r\n\r\n // ResultCode should never be empty.\r\n if (!response.resultCode) {\r\n actions.reject();\r\n handleError(\"error.paymentFailed\");\r\n return;\r\n }\r\n\r\n const { resultCode, action } = response;\r\n\r\n if (resultCode === \"ChallengeShopper\" || resultCode === \"IdentifyShopper\") {\r\n setThreeDSecureActive(true);\r\n }\r\n\r\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\r\n // You must call this, even if the result of the payment is unsuccessful.\r\n actions.resolve({ resultCode, action });\r\n }\r\n\r\n async function handleOnSubmitAdditionalData(\r\n state: AdditionalDetailsData,\r\n _: UIElement<UIElementProps>,\r\n actions: AdditionalDetailsActions\r\n ) {\r\n const data: ICreateDetailsBody = {\r\n ...state.data,\r\n sessionId: configuration.sessionId,\r\n };\r\n\r\n const fetchResponse = await createDetailsRequest(configuration.environment, data);\r\n\r\n // We will always get 200 OK unless there is an error in our server code.\r\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\r\n if (!fetchResponse.ok) {\r\n actions.reject();\r\n handleError(\"error.failedToSubmitPaymentDetails\");\r\n return;\r\n }\r\n\r\n const response = await fetchResponse.json();\r\n\r\n // ResultCode should always be either Authorised or Refused or IdentifyShopper. Never empty.\r\n if (!response.resultCode) {\r\n actions.reject();\r\n handleError(\"error.paymentDetailsFailed\");\r\n return;\r\n }\r\n\r\n const { resultCode, action } = response;\r\n\r\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\r\n // You must call this, even if the result of the payment is unsuccessful.\r\n actions.resolve({ resultCode, action });\r\n }\r\n\r\n function handlePaymentCompleted(data: PaymentCompletedData, _?: UIElement<UIElementProps> | undefined): void {\r\n if (data.resultCode === \"Authorised\") {\r\n handleSuccess(\"success.paymentAuthorized\");\r\n } else {\r\n handleError(\"error.paymentUnsuccessful\");\r\n }\r\n configuration.onPaymentCompleted?.();\r\n }\r\n\r\n function handlePaymentFailed(data?: PaymentFailedData | undefined, _?: UIElement<UIElementProps> | undefined): void {\r\n if (data) {\r\n if (data.resultCode === \"Authorised\") {\r\n handleSuccess(\"success.paymentAuthorized\");\r\n } else {\r\n handleError(\"error.paymentUnsuccessful\");\r\n }\r\n }\r\n configuration.onPaymentFailed?.();\r\n }\r\n\r\n const hasGooglePay = paymentMethods.paymentMethods!.paymentMethods?.some((x) => x.type === \"googlepay\");\r\n\r\n if (!hasGooglePay) {\r\n return null;\r\n }\r\n\r\n if (activePaymentMethod !== \"googlepay\" && threeDSecureActive) {\r\n // if threeDSecureActive for some other payment method, do not show google pay\r\n return null;\r\n }\r\n\r\n return (\r\n <label className=\"straumur__google-pay-component\">\r\n <input\r\n type=\"radio\"\r\n className=\"straumur__google-pay-component__radio-selector\"\r\n checked={activePaymentMethod === \"googlepay\"}\r\n onChange={handleBoxChange}\r\n />\r\n <span className=\"straumur__google-pay-component__content\">\r\n <span className=\"straumur__google-pay-component--circle\"></span>\r\n <GooglePayIcon />\r\n <span className=\"straumur__google-pay-component--text\">{i18n(configuration.locale, \"googlePay.title\")}</span>\r\n </span>\r\n <div className=\"straumur__google-pay-component__expandable\">\r\n <div\r\n ref={googlePayElementRef}\r\n style={{\r\n height: threeDSecureActive ? \"600px\" : \"auto\",\r\n minWidth: threeDSecureActive ? \"350px\" : \"auto\",\r\n }}\r\n ></div>\r\n </div>\r\n </label>\r\n );\r\n}\r\n\r\nexport default GooglePayComponent;\r\n","import styleInject from '#style-inject';styleInject(\".straumur__apple-pay-component{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__apple-pay-component__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__apple-pay-component__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__apple-pay-component__radio-selector:checked+.straumur__apple-pay-component__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__apple-pay-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__apple-pay-component__content:hover .straumur__apple-pay-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__apple-pay-component--circle:after{content:\\\"\\\";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__apple-pay-component__radio-selector:checked+.straumur__apple-pay-component__content .straumur__apple-pay-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__apple-pay-component__radio-selector:checked+.straumur__apple-pay-component__content .straumur__apple-pay-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__apple-pay-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__apple-pay-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__apple-pay-component__radio-selector:checked~.straumur__apple-pay-component__expandable{max-height:600px;opacity:1}.straumur__apple-pay-component__expandable p{margin:0;color:#213547;font-size:.9rem}\\n\")","import { h } from \"preact\";\r\n\r\nconst ApplePayIcon = () => (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"26\" fill=\"none\" viewBox=\"0 0 40 26\">\r\n <path\r\n fill=\"#000\"\r\n d=\"M36.42 0H3.58a69.25 69.25 0 0 0-.75 0c-.25.01-.5.03-.76.07a2.51 2.51 0 0 0-1.32.7A2.43 2.43 0 0 0 .07 2.1 5.14 5.14 0 0 0 0 3.22v19.91c.01.25.03.51.07.76a2.6 2.6 0 0 0 .68 1.35 2.39 2.39 0 0 0 1.32.69 4.98 4.98 0 0 0 1.1.07h34a5 5 0 0 0 .76-.07 2.5 2.5 0 0 0 1.32-.7 2.44 2.44 0 0 0 .68-1.34 5.13 5.13 0 0 0 .07-1.11V2.87a6.5 6.5 0 0 0-.07-.76 2.58 2.58 0 0 0-.68-1.35 2.4 2.4 0 0 0-1.32-.69 4.96 4.96 0 0 0-1.1-.07h-.41Z\"\r\n />\r\n <path\r\n fill=\"#fff\"\r\n d=\"M36.42.87h.73c.2 0 .42.02.62.06a1.67 1.67 0 0 1 .88.44 1.58 1.58 0 0 1 .44.89 4.38 4.38 0 0 1 .06.97v19.55a14.67 14.67 0 0 1-.06.96 1.7 1.7 0 0 1-.44.89 1.54 1.54 0 0 1-.87.44 4.27 4.27 0 0 1-.96.06H2.85a3.7 3.7 0 0 1-.63-.06 1.66 1.66 0 0 1-.87-.45 1.56 1.56 0 0 1-.44-.88 4.35 4.35 0 0 1-.06-.97V2.9c.01-.2.02-.42.06-.63.03-.18.08-.34.16-.49A1.56 1.56 0 0 1 2.22.93a4.2 4.2 0 0 1 .96-.06h33.24\"\r\n />\r\n <path\r\n fill=\"#000\"\r\n d=\"M10.92 8.61c.34-.43.57-1 .51-1.59a2.21 2.21 0 0 0-1.99 2.3c.56.04 1.12-.3 1.48-.7Zm.51.81c-.82-.05-1.52.46-1.9.46-.4 0-1-.43-1.64-.42-.84 0-1.62.48-2.05 1.24-.88 1.52-.23 3.76.62 5 .42.6.92 1.27 1.58 1.25.62-.02.86-.4 1.62-.4.75 0 .97.4 1.63.39.69-.01 1.11-.61 1.53-1.22.47-.7.67-1.37.68-1.4-.01-.02-1.32-.52-1.33-2.02-.01-1.26 1.03-1.85 1.07-1.9a2.34 2.34 0 0 0-1.81-.98Zm7.11-1.7a2.87 2.87 0 0 1 3.02 3c0 1.8-1.27 3.03-3.06 3.03h-1.97v3.12h-1.42V7.72h3.43Zm-2 4.83h1.62c1.24 0 1.94-.66 1.94-1.82 0-1.15-.7-1.81-1.93-1.81h-1.64v3.63Zm5.39 2.43c0-1.17.9-1.89 2.48-1.98l1.83-.1v-.52c0-.74-.5-1.18-1.34-1.18-.8 0-1.3.38-1.41.97h-1.3c.08-1.2 1.1-2.09 2.76-2.09 1.62 0 2.65.86 2.65 2.2v4.6h-1.31v-1.1h-.04a2.38 2.38 0 0 1-2.1 1.2c-1.3 0-2.22-.8-2.22-2Zm4.3-.6v-.53l-1.64.1c-.82.06-1.28.42-1.28.99 0 .58.48.96 1.22.96.96 0 1.7-.66 1.7-1.52Zm2.61 4.95v-1.11c.1.03.33.03.44.03.64 0 .98-.27 1.19-.96l.12-.4-2.41-6.69h1.48l1.7 5.43h.02l1.69-5.43h1.44l-2.5 7.02c-.57 1.62-1.23 2.14-2.61 2.14a5.3 5.3 0 0 1-.56-.03Z\"\r\n />\r\n </svg>\r\n);\r\n\r\nexport default ApplePayIcon;\r\n","import { h } from \"preact\";\r\nimport { useEffect, useRef } from \"preact/hooks\";\r\nimport \"./apple-pay-component.css\";\r\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\r\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\r\nimport { SuccessResponse } from \"../../services/models\";\r\nimport {\r\n AdditionalDetailsActions,\r\n AdditionalDetailsData,\r\n AdyenCheckout,\r\n AdyenCheckoutError,\r\n ApplePay,\r\n ApplePayConfiguration,\r\n ICore,\r\n PaymentCompletedData,\r\n PaymentFailedData,\r\n SubmitActions,\r\n SubmitData,\r\n UIElement,\r\n UIElementProps,\r\n} from \"@adyen/adyen-web\";\r\nimport i18n from \"../../localizations/i18n\";\r\nimport ApplePayIcon from \"../../assets/icons/applepay\";\r\nimport { ICreateDetailsBody, ICreatePaymentBody } from \"../../adapter/models\";\r\nimport { createDetailsRequest, createPaymentRequest } from \"../../adapter/straumur-adapter\";\r\nimport { CANCEL } from \"../../models/constants\";\r\n\r\ninterface ApplePayComponentProps {\r\n configuration: StraumurCheckoutConfiguration;\r\n paymentMethods: SuccessResponse;\r\n}\r\n\r\nfunction ApplePayComponent({ configuration, paymentMethods }: ApplePayComponentProps): h.JSX.Element | null {\r\n const applePayElementRef = useRef<HTMLDivElement>(null);\r\n const adyenCardRef = useRef<ICore>();\r\n const applePayRef = useRef<ApplePay>();\r\n const {\r\n activePaymentMethod,\r\n setActivePaymentMethod,\r\n isPaymentMethodInitialized,\r\n updatePaymentMethodInitialization,\r\n handleSuccess,\r\n handleError,\r\n setThreeDSecureActive,\r\n threeDSecureActive,\r\n } = usePaymentMethodGroup();\r\n\r\n const initializeAdyenComponent = async () => {\r\n adyenCardRef.current = await AdyenCheckout({\r\n clientKey: paymentMethods.clientKey,\r\n environment: configuration.environment,\r\n locale: paymentMethods.locale,\r\n countryCode: \"IS\",\r\n amount: {\r\n value: paymentMethods.minorUnitsAmount,\r\n currency: paymentMethods.currency,\r\n },\r\n onError: handleOnError,\r\n onAdditionalDetails: handleOnSubmitAdditionalData,\r\n onPaymentCompleted: handlePaymentCompleted,\r\n onPaymentFailed: handlePaymentFailed,\r\n });\r\n\r\n const apayConfig = paymentMethods.paymentMethods.paymentMethods!.find((x) => x.type === \"applepay\")!\r\n .configuration! as { gatewayMerchantId: string; merchantId: string };\r\n\r\n const applePayConfiguration: ApplePayConfiguration = {\r\n amount: {\r\n value: paymentMethods.minorUnitsAmount,\r\n currency: paymentMethods.currency,\r\n },\r\n\r\n environment: configuration.environment,\r\n onSubmit: handleOnSubmit,\r\n configuration: {\r\n ...apayConfig,\r\n merchantName: paymentMethods.merchantName,\r\n },\r\n };\r\n\r\n applePayRef.current = new ApplePay(adyenCardRef.current, applePayConfiguration);\r\n\r\n applePayRef.current\r\n .isAvailable()\r\n .then(() => {\r\n applePayRef.current!.mount(applePayElementRef.current!);\r\n updatePaymentMethodInitialization(\"applepay\", true);\r\n })\r\n .catch(() => {\r\n handleError(\"error.applePayNotAvailable\");\r\n });\r\n };\r\n\r\n useEffect(() => {\r\n if (activePaymentMethod === \"applepay\" && !isPaymentMethodInitialized.applepay) {\r\n initializeAdyenComponent();\r\n }\r\n }, [configuration, activePaymentMethod]);\r\n\r\n useEffect(() => {\r\n if (applePayRef.current && isPaymentMethodInitialized.applepay) {\r\n // Most of the time we will change configuration only to update locale, and that's not possible through .update() -> https://github.com/Adyen/adyen-web/issues/2407\r\n // So we need to reinitialize the component.\r\n initializeAdyenComponent();\r\n }\r\n }, [configuration]);\r\n\r\n const handleBoxChange = () => {\r\n setActivePaymentMethod(\"applepay\");\r\n };\r\n\r\n function handleOnError(data: AdyenCheckoutError, _?: UIElement<UIElementProps> | undefined): void {\r\n if (data.name !== CANCEL) {\r\n handleError(\"error.unknownError\");\r\n }\r\n }\r\n\r\n async function handleOnSubmit(state: SubmitData, _: UIElement<UIElementProps>, actions: SubmitActions) {\r\n const data: ICreatePaymentBody = {\r\n ...state.data,\r\n sessionId: configuration.sessionId,\r\n };\r\n\r\n const fetchResponse = await createPaymentRequest(configuration.environment, data);\r\n\r\n // We will always get 200 OK unless there is an error in our server code.\r\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\r\n if (!fetchResponse.ok) {\r\n actions.reject();\r\n handleError(\"error.failedToSubmitPayment\");\r\n return;\r\n }\r\n\r\n const response = await fetchResponse.json();\r\n\r\n // ResultCode should never be empty.\r\n if (!response.resultCode) {\r\n actions.reject();\r\n handleError(\"error.paymentFailed\");\r\n return;\r\n }\r\n\r\n const { resultCode, action } = response;\r\n\r\n if (resultCode === \"ChallengeShopper\" || resultCode === \"IdentifyShopper\") {\r\n setThreeDSecureActive(true);\r\n }\r\n\r\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\r\n // You must call this, even if the result of the payment is unsuccessful.\r\n actions.resolve({ resultCode, action });\r\n }\r\n\r\n async function handleOnSubmitAdditionalData(\r\n state: AdditionalDetailsData,\r\n _: UIElement<UIElementProps>,\r\n actions: AdditionalDetailsActions\r\n ) {\r\n const data: ICreateDetailsBody = {\r\n ...state.data,\r\n sessionId: configuration.sessionId,\r\n };\r\n\r\n const fetchResponse = await createDetailsRequest(configuration.environment, data);\r\n\r\n // We will always get 200 OK unless there is an error in our server code.\r\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\r\n if (!fetchResponse.ok) {\r\n actions.reject();\r\n handleError(\"error.failedToSubmitPaymentDetails\");\r\n return;\r\n }\r\n\r\n const response = await fetchResponse.json();\r\n\r\n // ResultCode should always be either Authorised or Refused or IdentifyShopper. Never empty.\r\n if (!response.resultCode) {\r\n actions.reject();\r\n handleError(\"error.paymentDetailsFailed\");\r\n return;\r\n }\r\n\r\n const { resultCode, action } = response;\r\n\r\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\r\n // You must call this, even if the result of the payment is unsuccessful.\r\n actions.resolve({ resultCode, action });\r\n }\r\n\r\n function handlePaymentCompleted(data: PaymentCompletedData, _?: UIElement<UIElementProps> | undefined): void {\r\n if (data.resultCode === \"Authorised\") {\r\n handleSuccess(\"success.paymentAuthorized\");\r\n } else {\r\n handleError(\"error.paymentUnsuccessful\");\r\n }\r\n configuration.onPaymentCompleted?.();\r\n }\r\n\r\n function handlePaymentFailed(data?: PaymentFailedData | undefined, _?: UIElement<UIElementProps> | undefined): void {\r\n if (data) {\r\n if (data.resultCode === \"Authorised\") {\r\n handleSuccess(\"success.paymentAuthorized\");\r\n } else {\r\n handleError(\"error.paymentUnsuccessful\");\r\n }\r\n }\r\n configuration.onPaymentFailed?.();\r\n }\r\n\r\n const hasApplePay = paymentMethods.paymentMethods!.paymentMethods?.some((x) => x.type === \"applepay\");\r\n\r\n if (!hasApplePay) {\r\n return null;\r\n }\r\n\r\n if (activePaymentMethod !== \"applepay\" && threeDSecureActive) {\r\n // if threeDSecureActive for some other payment method, do not show apple pay\r\n return null;\r\n }\r\n\r\n return (\r\n <label className=\"straumur__apple-pay-component\">\r\n <input\r\n type=\"radio\"\r\n className=\"straumur__apple-pay-component__radio-selector\"\r\n checked={activePaymentMethod === \"applepay\"}\r\n onChange={handleBoxChange}\r\n />\r\n <span className=\"straumur__apple-pay-component__content\">\r\n <span className=\"straumur__apple-pay-component--circle\"></span>\r\n <ApplePayIcon />\r\n <span className=\"straumur__apple-pay-component--text\">{i18n(configuration.locale, \"applePay.title\")}</span>\r\n </span>\r\n <div className=\"straumur__apple-pay-component__expandable\">\r\n <div\r\n ref={applePayElementRef}\r\n style={{\r\n height: threeDSecureActive ? \"600px\" : \"auto\",\r\n minWidth: threeDSecureActive ? \"350px\" : \"auto\",\r\n }}\r\n ></div>\r\n </div>\r\n </label>\r\n );\r\n}\r\n\r\nexport default ApplePayComponent;\r\n","import styleInject from '#style-inject';styleInject(\".straumur__stored-card-component{position:relative;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg);cursor:pointer}.straumur__stored-card-component:has(.straumur__stored-card-component__radio-selector:checked){cursor:default}.straumur__stored-card-component__radio-selector{position:absolute;opacity:0}.straumur__stored-card-component__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__stored-card-component__radio-selector:checked+.straumur__stored-card-component__content{padding-bottom:var(--straumur__space-xxlg);cursor:default}.straumur__stored-card-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__stored-card-component__content:hover .straumur__stored-card-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__stored-card-component--circle:after{content:\\\"\\\";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__stored-card-component__radio-selector:checked+.straumur__stored-card-component__content .straumur__stored-card-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__stored-card-component__radio-selector:checked+.straumur__stored-card-component__content .straumur__stored-card-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__stored-card-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__stored-card-component--brands{display:flex;margin-left:auto;align-items:center;gap:var(--straumur__space-xxs)}.straumur__stored-card-component--brands>svg{transition:all .2s ease}.straumur__stored-card-component__remove-stored-card-button{margin-left:auto}.straumur__stored-card-component__remove-stored-card-button--text{color:#d03e00;text-decoration:none;background:none;border:none;cursor:pointer;transition:all .2s ease}.straumur__stored-card-component__remove-stored-card-button--text:disabled{cursor:not-allowed;color:#72889d}.straumur__stored-card-component__confirm-remove-stored-card{background-color:#fff7db;border-radius:var(--straumur__border-radius-s);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__stored-card-component__confirm-remove-stored-card--expanded{padding:var(--straumur__space-xxlg);max-height:600px;opacity:1}.straumur__stored-card-component__confirm-remove-stored-card--header{display:flex;align-items:center;gap:var(--straumur__space-lg);color:#262b31;padding-bottom:var(--straumur__space-xxlg)}.straumur__stored-card-component__confirm-remove-stored-card--actions{display:flex;gap:var(--straumur__space-lg);justify-content:end}.straumur__stored-card-component__confirm-remove-stored-card--actions--button{color:#775d00;background:none;border:none;cursor:pointer;text-decoration:none;font-weight:700}.straumur__stored-card-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__stored-card-component__loading-text{display:flex;justify-content:center}.straumur__stored-card-component__radio-selector:checked~.straumur__stored-card-component__expandable{max-height:600px;opacity:1}.straumur__stored-card-component__form{display:flex;padding-top:var(--straumur__space-xxlg);flex-direction:column;gap:var(--straumur__space-5xlg)}.straumur__stored-card-component__form--wrapper{display:flex;flex-direction:column;justify-items:start;position:relative;width:100%}.straumur__stored-card-component__form--wrapper--error{color:var(--straumur__color-red-beta);font-size:12px}.straumur__stored-card-component__form--wrapper--label{transform:translate(10px) translateY(-50%);z-index:1;background:linear-gradient(to top,var(--straumur__color-secondary-gamma) 53%,var(--straumur__color-transparent) 50%);position:absolute;font-weight:500;font-size:14px;padding:0 var(--straumur__space-xxs)}.straumur__stored-card-component__form--wrapper--label--readonly{background:linear-gradient(to top,var(--straumur__color-gray-epsilon) 53%,var(--straumur__color-transparent) 50%)}.straumur__stored-card-component__form--wrapper--label--error{color:var(--straumur__color-red-beta);background:linear-gradient(to top,var(--straumur__color-red-gamma) 53%,var(--straumur__color-transparent) 50%);font-size:13px;font-weight:500}.straumur__stored-card-component__form--wrapper--label--info{position:absolute;top:33%;right:var(--straumur__space-md)}.straumur__stored-card-component__form--wrapper--input{background:var(--straumur__color-secondary-gamma);color:#00112c;display:flex;align-items:center;border:1px solid var(--straumur__color-transparent);border-radius:var(--straumur__border-radius-s);font-size:1rem;height:48px;outline:none;padding-left:var(--straumur__space-lg);transition:border .2s ease-out,box-shadow .2s ease-out;position:relative}.straumur__stored-card-component__form--wrapper--input--readonly{background-color:var(--straumur__color-gray-epsilon)}.straumur__stored-card-component__form--wrapper--input:hover{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__stored-card-component__form--wrapper--input--readonly:hover{border:1px solid var(--straumur__color-transparent)}.straumur__stored-card-component__form--wrapper--input--error{background:var(--straumur__color-red-gamma);border:1px solid var(--straumur__color-red-beta)}.straumur__stored-card-component__form--wrapper--input--error:hover{border:1px solid var(--straumur__color-red-beta)}.straumur__stored-card-component__form--field-wrapper{display:flex;width:100%;gap:var(--straumur__space-5xlg)}.straumur__stored-card-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-white);cursor:pointer;font-size:1rem;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__stored-card-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid #dbdee2}.straumur__stored-card-component__submit-button:disabled{background:#72889d;border:1px solid #dbdee2;cursor:not-allowed}\\n\")","import { h } from \"preact\";\r\n\r\nconst WarningIcon = () => (\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g clip-path=\"url(#clip0_10650_34968)\">\r\n <path\r\n d=\"M12.0011 15C12.6245 15 13.1261 14.4984 13.1261 13.875V7.875C13.1261 7.25391 12.6222 6.75 12.0433 6.75C11.4644 6.75 10.8761 7.25625 10.8761 7.875V13.875C10.8761 14.4984 11.3823 15 12.0011 15ZM12.0011 16.5516C11.1873 16.5516 10.5273 17.2116 10.5273 18.0253C10.5292 18.8391 11.1855 19.5 12.0011 19.5C12.8167 19.5 13.4748 18.84 13.4748 18.0262C13.473 17.2125 12.8167 16.5516 12.0011 16.5516Z\"\r\n fill=\"#DFAE00\"\r\n />\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M23.7312 19.5469L13.7328 2.48438C12.9673 1.17188 11.0356 1.17188 10.2649 2.48438L0.271188 19.5469C-0.49803 20.8547 0.460048 22.5 2.00181 22.5H21.9987C23.5343 22.5 24.4953 20.8594 23.7312 19.5469ZM10.8734 7.875C10.8734 7.25391 11.3773 6.75 11.9984 6.75C12.6195 6.75 13.1234 7.25625 13.1234 7.875V13.875C13.1234 14.4961 12.6195 15 12.0406 15C11.4617 15 10.8734 14.4984 10.8734 13.875V7.875ZM11.9984 19.5C11.1846 19.5 10.5246 18.84 10.5246 18.0262C10.5246 17.2125 11.1842 16.5525 11.9984 16.5525C12.8126 16.5525 13.4721 17.2125 13.4721 18.0262C13.4703 18.8391 12.814 19.5 11.9984 19.5Z\"\r\n fill=\"#DFAE00\"\r\n />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_10650_34968\">\r\n <rect width=\"24\" height=\"24\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n);\r\n\r\nexport default WarningIcon;\r\n","import { Fragment, h } from \"preact\";\r\nimport { useEffect, useRef, useState } from \"preact/hooks\";\r\nimport \"./stored-card-component.css\";\r\nimport i18n from \"../../localizations/i18n\";\r\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\r\nimport { Tooltip } from \"../../components/tooltip/tooltip\";\r\nimport InfoIcon from \"../../assets/icons/info\";\r\nimport {\r\n AdditionalDetailsActions,\r\n AdditionalDetailsData,\r\n AdyenCheckout,\r\n AdyenCheckoutError,\r\n CustomCard,\r\n ICore,\r\n PaymentCompletedData,\r\n PaymentFailedData,\r\n SubmitActions,\r\n SubmitData,\r\n UIElement,\r\n UIElementProps,\r\n} from \"@adyen/adyen-web\";\r\nimport { RenderBrandIcons } from \"../../utils/renderBrandIcons\";\r\nimport LoaderIcon from \"../../assets/icons/loader\";\r\nimport { StoredCardComponentProps, StoredCardFormError, StoredCardFormErrorField } from \"./models\";\r\nimport WarningIcon from \"../../assets/icons/warning\";\r\nimport { ICreateDetailsBody, ICreatePaymentBody, IPostDisableTokenBody } from \"../../adapter/models\";\r\nimport { createDetailsRequest, createPaymentRequest, postDisableTokenRequest } from \"../../adapter/straumur-adapter\";\r\n\r\nfunction StoredCardComponent({\r\n configuration,\r\n paymentMethods,\r\n storedPaymentMethod,\r\n onStoredCardRemoved,\r\n}: StoredCardComponentProps): h.JSX.Element {\r\n const storedCardElementRef = useRef<HTMLDivElement>(null);\r\n const adyenCardRef = useRef<ICore>();\r\n const customCardRef = useRef<CustomCard>();\r\n const [payButtonDisabled, setPayButtonDisabled] = useState<boolean>(true);\r\n const [securityCodePolicy, setSecurityCodePolicy] = useState<\"hidden\" | \"optional\" | \"required\">(\"required\");\r\n const [askConfirmRemoveStoredCard, setAskConfirmRemoveStoredCard] = useState<boolean>(false);\r\n const [formErrors, setFormErrors] = useState<StoredCardFormError>({\r\n encryptedSecurityCode: { visible: false },\r\n });\r\n const {\r\n activePaymentMethod,\r\n setActivePaymentMethod,\r\n activeStoredPaymentMethodId,\r\n setActiveStoredPaymentMethodId,\r\n isStoredCardInitialized,\r\n updateStoredCardInitialization,\r\n handleSuccess,\r\n handleError,\r\n setThreeDSecureActive,\r\n threeDSecureActive,\r\n } = usePaymentMethodGroup();\r\n\r\n const initializeAdyenComponent = async () => {\r\n adyenCardRef.current = await AdyenCheckout({\r\n clientKey: paymentMethods.clientKey,\r\n environment: configuration.environment,\r\n locale: configuration.locale,\r\n countryCode: \"IS\",\r\n amount: {\r\n value: paymentMethods.minorUnitsAmount,\r\n currency: paymentMethods.currency,\r\n },\r\n paymentMethodsResponse: paymentMethods.paymentMethods,\r\n onError: handleOnError,\r\n\r\n onPaymentCompleted: handlePaymentCompleted,\r\n onPaymentFailed: handlePaymentFailed,\r\n });\r\n\r\n customCardRef.current = new CustomCard(adyenCardRef.current, {\r\n brands: [storedPaymentMethod.brand!],\r\n onSubmit: handleOnSubmit,\r\n onAdditionalDetails: handleOnSubmitAdditionalData,\r\n onConfigSuccess() {\r\n updateStoredCardInitialization(storedPaymentMethod.id, true);\r\n },\r\n onBrand: (event) => {\r\n setSecurityCodePolicy(event.cvcPolicy);\r\n },\r\n onValidationError: (event) => {\r\n const defaultErrors: StoredCardFormError = {\r\n encryptedSecurityCode: { visible: false, message: undefined },\r\n };\r\n\r\n event\r\n .filter((x) => x.error)\r\n .forEach((x) => {\r\n defaultErrors[x.fieldType as StoredCardFormErrorField].visible = true;\r\n defaultErrors[x.fieldType as StoredCardFormErrorField].message = x.errorI18n;\r\n });\r\n\r\n setFormErrors(defaultErrors);\r\n },\r\n onAllValid: (event) => {\r\n setPayButtonDisabled(!event.allValid);\r\n },\r\n placeholders: configuration.placeholders,\r\n challengeWindowSize: \"05\", // looks like not working\r\n });\r\n\r\n if (storedCardElementRef.current) {\r\n customCardRef.current.mount(storedCardElementRef.current);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (\r\n activePaymentMethod === \"storedcard\" &&\r\n activeStoredPaymentMethodId === storedPaymentMethod.id &&\r\n !isStoredCardInitialized[activeStoredPaymentMethodId!]\r\n ) {\r\n initializeAdyenComponent();\r\n }\r\n }, [configuration, activePaymentMethod, activeStoredPaymentMethodId]);\r\n\r\n useEffect(() => {\r\n if (customCardRef.current && isStoredCardInitialized[activeStoredPaymentMethodId!]) {\r\n // Most of the time we will change configuration only to update locale, and that's not possible through .update() -> https://github.com/Adyen/adyen-web/issues/2407\r\n // So we need to reinitialize the component.\r\n initializeAdyenComponent();\r\n setFormErrors({ encryptedSecurityCode: { visible: false, message: undefined } });\r\n }\r\n }, [configuration]);\r\n\r\n useEffect(() => {\r\n setAskConfirmRemoveStoredCard(false);\r\n }, [activePaymentMethod, activeStoredPaymentMethodId]);\r\n\r\n function handleBoxChange() {\r\n setActivePaymentMethod(\"storedcard\");\r\n setActiveStoredPaymentMethodId(storedPaymentMethod.id);\r\n }\r\n\r\n function handleAskToConfirmRemoveCard() {\r\n setAskConfirmRemoveStoredCard(true);\r\n }\r\n\r\n function handleCancelRemoveStoredCard() {\r\n setAskConfirmRemoveStoredCard(false);\r\n }\r\n\r\n async function handleConfirmRemoveStoredCard() {\r\n const data: IPostDisableTokenBody = {\r\n storedPaymentMethodId: storedPaymentMethod.id,\r\n sessionId: configuration.sessionId,\r\n };\r\n\r\n const fetchResponse = await postDisableTokenRequest(configuration.environment, data);\r\n\r\n if (!fetchResponse.ok) {\r\n handleError(\"error.failedToSubmitRemoveStoredPaymentCard\");\r\n return;\r\n }\r\n\r\n const disableTokenResponse = await fetchResponse.json();\r\n\r\n if (!disableTokenResponse.success) {\r\n handleError(\"error.failedToRemoveStoredPaymentCard\");\r\n return;\r\n }\r\n\r\n onStoredCardRemoved(storedPaymentMethod.id);\r\n }\r\n\r\n function handleOnError(_: AdyenCheckoutError, __?: UIElement<UIElementProps> | undefined) {\r\n handleError(\"error.unknownError\");\r\n }\r\n\r\n async function handleOnSubmit(state: SubmitData, _: UIElement<UIElementProps>, actions: SubmitActions) {\r\n const data: ICreatePaymentBody = {\r\n ...state.data,\r\n sessionId: configuration.sessionId,\r\n paymentMethod: {\r\n ...state.data.paymentMethod,\r\n storedPaymentMethodId: storedPaymentMethod.id,\r\n },\r\n };\r\n\r\n const fetchResponse = await createPaymentRequest(configuration.environment, data);\r\n\r\n // We will always get 200 OK unless there is an error in our server code.\r\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\r\n if (!fetchResponse.ok) {\r\n actions.reject();\r\n handleError(\"error.failedToSubmitPayment\");\r\n return;\r\n }\r\n\r\n const response = await fetchResponse.json();\r\n\r\n // ResultCode should never be empty.\r\n if (!response.resultCode) {\r\n actions.reject();\r\n handleError(\"error.paymentFailed\");\r\n return;\r\n }\r\n\r\n const { resultCode, action } = response;\r\n\r\n if (resultCode === \"ChallengeShopper\" || resultCode === \"IdentifyShopper\") {\r\n setThreeDSecureActive(true);\r\n }\r\n\r\n // If the /payments request from your server is successful, you must call this to resolve whichever of the listed objects are available.\r\n // You must call this, even if the result of the payment is unsuccessful.\r\n actions.resolve({ resultCode, action });\r\n }\r\n\r\n async function handleOnSubmitAdditionalData(\r\n state: AdditionalDetailsData,\r\n _: UIElement<UIElementProps>,\r\n actions: AdditionalDetailsActions\r\n ) {\r\n const data: ICreateDetailsBody = {\r\n ...state.data,\r\n sessionId: configuration.sessionId,\r\n };\r\n\r\n const fetchResponse = await createDetailsRequest(configuration.environment, data);\r\n\r\n // We will always get 200 OK unless there is an error in our server code.\r\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\r\n if (!fetchResponse.ok) {\r\n actions.reject();\r\n // const errorResponse = await fetchResponse.json();\r\n handleError(\"error.failedToSubmitPaymentDetails\");\r\n return;\r\n }\r\n\r\n const response = await fetchResponse.json();\r\n\r\n // ResultCode should never be empty.\r\n if (!response.resultCode) {\r\n actions.reject();\r\n handleError(\"error.paymentDetailsFailed\");\r\n return;\r\n }\r\n\r\n const { resultCode, action } = response;\r\n\r\n actions.resolve({ resultCode, action });\r\n }\r\n\r\n function handlePaymentCompleted(data: PaymentCompletedData, _?: UIElement<UIElementProps> | undefined): void {\r\n if (data.resultCode === \"Authorised\") {\r\n handleSuccess(\"success.paymentAuthorized\");\r\n } else {\r\n handleError(\"error.paymentUnsuccessful\");\r\n }\r\n configuration.onPaymentCompleted?.();\r\n }\r\n\r\n function handlePaymentFailed(data?: PaymentFailedData | undefined, _?: UIElement<UIElementProps> | undefined): void {\r\n if (data) {\r\n if (data.resultCode === \"Authorised\") {\r\n handleSuccess(\"success.paymentAuthorized\");\r\n } else {\r\n handleError(\"error.paymentUnsuccessful\");\r\n }\r\n }\r\n configuration.onPaymentFailed?.();\r\n }\r\n\r\n function handleSubmitClick() {\r\n if (!customCardRef.current) return;\r\n\r\n customCardRef.current!.submit();\r\n }\r\n\r\n return (\r\n <label className=\"straumur__stored-card-component\">\r\n <input\r\n type=\"radio\"\r\n className=\"straumur__stored-card-component__radio-selector\"\r\n checked={activePaymentMethod === \"storedcard\" && activeStoredPaymentMethodId === storedPaymentMethod.id}\r\n onChange={handleBoxChange}\r\n />\r\n <span className=\"straumur__stored-card-component__content\">\r\n <span className=\"straumur__stored-card-component--circle\"></span>\r\n <RenderBrandIcons\r\n brands={[\r\n {\r\n brand: storedPaymentMethod.brand!,\r\n brandFullName: storedPaymentMethod.name,\r\n },\r\n ]}\r\n />\r\n <span className=\"straumur__stored-card-component--text\">•••• {storedPaymentMethod.lastFour}</span>\r\n {activePaymentMethod === \"storedcard\" &&\r\n activeStoredPaymentMethodId === storedPaymentMethod.id &&\r\n isStoredCardInitialized[storedPaymentMethod.id] && (\r\n <div className=\"straumur__stored-card-component__remove-stored-card-button\">\r\n <button\r\n onClick={handleAskToConfirmRemoveCard}\r\n className=\"straumur__stored-card-component__remove-stored-card-button--text\"\r\n disabled={askConfirmRemoveStoredCard}\r\n >\r\n {i18n(configuration.locale, \"stored-cards.removeStoredCard\")}\r\n </button>\r\n </div>\r\n )}\r\n </span>\r\n <div\r\n className={`${\"straumur__stored-card-component__confirm-remove-stored-card\"} ${\r\n askConfirmRemoveStoredCard ? \"straumur__stored-card-component__confirm-remove-stored-card--expanded\" : \"\"\r\n }`}\r\n >\r\n <div className=\"straumur__stored-card-component__confirm-remove-stored-card--header\">\r\n <WarningIcon />\r\n <span className=\"straumur__stored-card-component__confirm-remove-stored-card--header--title\">\r\n {i18n(configuration.locale, \"stored-cards.removeStoredCardQuestion\")}\r\n </span>\r\n </div>\r\n <div className=\"straumur__stored-card-component__confirm-remove-stored-card--actions\">\r\n <button\r\n className=\"straumur__stored-card-component__confirm-remove-stored-card--actions--button\"\r\n onClick={handleConfirmRemoveStoredCard}\r\n >\r\n {i18n(configuration.locale, \"stored-cards.removeStoredCardQuestionYesRemove\")}\r\n </button>\r\n <button\r\n className=\"straumur__stored-card-component__confirm-remove-stored-card--actions--button\"\r\n onClick={handleCancelRemoveStoredCard}\r\n >\r\n {i18n(configuration.locale, \"stored-cards.removeStoredCardQuestionCancel\")}\r\n </button>\r\n </div>\r\n </div>\r\n <div\r\n className=\"straumur__stored-card-component__expandable\"\r\n ref={storedCardElementRef}\r\n style={{\r\n height: threeDSecureActive ? \"600px\" : \"auto\",\r\n minWidth: threeDSecureActive ? \"350px\" : \"auto\",\r\n }}\r\n >\r\n {!isStoredCardInitialized[storedPaymentMethod.id] && (\r\n <div className=\"straumur__stored-card-component__loading-text\">\r\n <LoaderIcon />\r\n </div>\r\n )}\r\n\r\n <div\r\n className=\"straumur__stored-card-component__form\"\r\n style={{\r\n opacity: isStoredCardInitialized[storedPaymentMethod.id] ? 1 : 0,\r\n position: isStoredCardInitialized[storedPaymentMethod.id] ? \"relative\" : \"absolute\",\r\n transition: \"opacity 0.3s ease-in-out\",\r\n }}\r\n >\r\n <div className=\"straumur__stored-card-component__form--field-wrapper\">\r\n <div className=\"straumur__stored-card-component__form--wrapper\">\r\n <label className=\"straumur__stored-card-component__form--wrapper--label straumur__stored-card-component__form--wrapper--label--readonly\">\r\n {i18n(configuration.locale, \"stored-cards.expiryDate\")}\r\n </label>\r\n <span className=\"straumur__stored-card-component__form--wrapper--input straumur__stored-card-component__form--wrapper--input--readonly\">\r\n {storedPaymentMethod.expiryMonth}/{storedPaymentMethod.expiryYear}\r\n </span>\r\n </div>\r\n\r\n <div className=\"straumur__stored-card-component__form--wrapper\">\r\n {(securityCodePolicy === \"optional\" || securityCodePolicy === \"required\") && (\r\n <Fragment>\r\n <label\r\n className={`${\"straumur__stored-card-component__form--wrapper--label\"} ${\r\n formErrors.encryptedSecurityCode.visible\r\n ? \"straumur__stored-card-component__form--wrapper--label--error\"\r\n : \"\"\r\n }`}\r\n >\r\n {securityCodePolicy === \"optional\"\r\n ? i18n(configuration.locale, \"stored-cards.securityCode3DigitsOptional\")\r\n : i18n(configuration.locale, \"stored-cards.securityCode3Digits\")}\r\n </label>\r\n <span\r\n className={`${\"straumur__stored-card-component__form--wrapper--input\"} ${\r\n formErrors.encryptedSecurityCode.visible\r\n ? \"straumur__stored-card-component__form--wrapper--input--error\"\r\n : \"\"\r\n }`}\r\n data-cse=\"encryptedSecurityCode\"\r\n >\r\n <div className=\"straumur__stored-card-component__form--wrapper--label--info\">\r\n <Tooltip content={i18n(configuration.locale, \"stored-cards.securityCode3DigitsInfo\")}>\r\n <InfoIcon />\r\n </Tooltip>\r\n </div>\r\n </span>\r\n </Fragment>\r\n )}\r\n {formErrors.encryptedSecurityCode.visible && (\r\n <span className=\"straumur__stored-card-component__form--wrapper--error\">\r\n {formErrors.encryptedSecurityCode.message}\r\n </span>\r\n )}\r\n </div>\r\n </div>\r\n\r\n <button\r\n className=\"straumur__stored-card-component__submit-button\"\r\n disabled={payButtonDisabled}\r\n onClick={handleSubmitClick}\r\n >\r\n {paymentMethods.formattedAmount}\r\n </button>\r\n </div>\r\n </div>\r\n </label>\r\n );\r\n}\r\n\r\nexport default StoredCardComponent;\r\n","import { Fragment, h } from \"preact\";\r\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\r\nimport { StoredPaymentMethod, SuccessResponse } from \"../../services/models\";\r\nimport StoredCardComponent from \"./stored-card-component\";\r\nimport { useState } from \"preact/hooks\";\r\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\r\n\r\ninterface StoredCardContainerComponentProps {\r\n configuration: StraumurCheckoutConfiguration;\r\n paymentMethods: SuccessResponse;\r\n}\r\n\r\nfunction StoredCardContainerComponent({\r\n configuration,\r\n paymentMethods,\r\n}: StoredCardContainerComponentProps): h.JSX.Element | null {\r\n const [storedPaymentMethods, setStoredPaymentMethods] = useState<StoredPaymentMethod[]>(\r\n paymentMethods.paymentMethods.storedPaymentMethods ?? []\r\n );\r\n const { activePaymentMethod, threeDSecureActive } = usePaymentMethodGroup();\r\n\r\n if (\r\n !storedPaymentMethods ||\r\n storedPaymentMethods?.length === 0 ||\r\n (activePaymentMethod !== \"storedcard\" && threeDSecureActive) // if threeDSecureActive for some other payment method, do not show stored cards\r\n ) {\r\n return null;\r\n }\r\n\r\n function handleStoredCardRemoved(storedPaymentMethodId: string): void {\r\n setStoredPaymentMethods((prevStoredPaymentMethods) =>\r\n prevStoredPaymentMethods.filter((storedPaymentMethod) => storedPaymentMethod.id !== storedPaymentMethodId)\r\n );\r\n }\r\n\r\n return (\r\n <Fragment>\r\n {storedPaymentMethods?.map((storedPaymentMethod) => (\r\n <StoredCardComponent\r\n key={storedPaymentMethod.id}\r\n configuration={configuration}\r\n storedPaymentMethod={storedPaymentMethod}\r\n paymentMethods={paymentMethods}\r\n onStoredCardRemoved={handleStoredCardRemoved}\r\n />\r\n ))}\r\n </Fragment>\r\n );\r\n}\r\n\r\nexport default StoredCardContainerComponent;\r\n","import styleInject from '#style-inject';styleInject(\".straumur__payment-method-group{display:flex;flex-direction:column;gap:var(--straumur__space-xxlg);width:100%}\\n\")","import { h, ComponentChildren } from \"preact\";\r\nimport { PaymentMethodGroupContext } from \"./payment-method-group-context\";\r\nimport \"./payment-method-group.css\";\r\nimport { PaymentMethod } from \"../../models/constants\";\r\n\r\ninterface PaymentMethodGroupProps {\r\n children: ComponentChildren;\r\n initialValue: PaymentMethod | null;\r\n}\r\n\r\nfunction PaymentMethodGroup({ children, initialValue }: PaymentMethodGroupProps): h.JSX.Element | null {\r\n return (\r\n <PaymentMethodGroupContext initialValue={initialValue}>\r\n <div className=\"straumur__payment-method-group\">{children}</div>\r\n </PaymentMethodGroupContext>\r\n );\r\n}\r\n\r\nexport default PaymentMethodGroup;\r\n","import styleInject from '#style-inject';styleInject(\".straumur__result-component{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:300px;background-color:var(--straumur__color-white);border-radius:16px}\\n\")","import { h } from \"preact\";\r\n\r\nconst SuccessIcon = () => (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"120\" height=\"120\" viewBox=\"0 0 120 120\">\r\n <circle\r\n cx=\"60\"\r\n cy=\"60\"\r\n r=\"50\"\r\n fill=\"none\"\r\n stroke=\"#5b8206\"\r\n stroke-width=\"5\"\r\n stroke-dasharray=\"314\"\r\n stroke-dashoffset=\"314\"\r\n >\r\n <animate attributeName=\"stroke-dashoffset\" from=\"314\" to=\"0\" dur=\"1s\" fill=\"freeze\" />\r\n </circle>\r\n\r\n <g transform=\"translate(60,60)\">\r\n <path\r\n d=\"M-25 5 L-5 25 L25 -15\"\r\n fill=\"none\"\r\n stroke=\"#5b8206\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-dasharray=\"100\"\r\n stroke-dashoffset=\"100\"\r\n >\r\n <animate attributeName=\"stroke-dashoffset\" from=\"100\" to=\"0\" dur=\"0.5s\" begin=\"1s\" fill=\"freeze\" />\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"scale\"\r\n from=\"1 1\"\r\n to=\"1.2 1.2\"\r\n begin=\"1.5s\"\r\n dur=\"0.2s\"\r\n fill=\"freeze\"\r\n additive=\"sum\"\r\n />\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"scale\"\r\n from=\"1.2 1.2\"\r\n to=\"1 1\"\r\n begin=\"1.7s\"\r\n dur=\"0.2s\"\r\n fill=\"freeze\"\r\n additive=\"sum\"\r\n />\r\n </path>\r\n </g>\r\n </svg>\r\n);\r\n\r\nexport default SuccessIcon;\r\n","import { h } from \"preact\";\r\n\r\nconst FailureIcon = () => (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"120\" height=\"120\" viewBox=\"0 0 120 120\">\r\n <circle\r\n cx=\"60\"\r\n cy=\"60\"\r\n r=\"50\"\r\n fill=\"none\"\r\n stroke=\"#d03e00\"\r\n stroke-width=\"5\"\r\n stroke-dasharray=\"314\"\r\n stroke-dashoffset=\"314\"\r\n >\r\n <animate attributeName=\"stroke-dashoffset\" from=\"314\" to=\"0\" dur=\"1s\" fill=\"freeze\" />\r\n </circle>\r\n\r\n <g transform=\"translate(60,60)\">\r\n <g id=\"crossGroup\">\r\n <line\r\n x1=\"-20\"\r\n y1=\"-20\"\r\n x2=\"20\"\r\n y2=\"20\"\r\n stroke=\"#d03e00\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n stroke-dasharray=\"57\"\r\n stroke-dashoffset=\"57\"\r\n >\r\n <animate attributeName=\"stroke-dashoffset\" from=\"57\" to=\"0\" dur=\"0.3s\" begin=\"1s\" fill=\"freeze\" />\r\n </line>\r\n\r\n <line\r\n x1=\"20\"\r\n y1=\"-20\"\r\n x2=\"-20\"\r\n y2=\"20\"\r\n stroke=\"#d03e00\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n stroke-dasharray=\"57\"\r\n stroke-dashoffset=\"57\"\r\n >\r\n <animate attributeName=\"stroke-dashoffset\" from=\"57\" to=\"0\" dur=\"0.3s\" begin=\"1.3s\" fill=\"freeze\" />\r\n </line>\r\n </g>\r\n </g>\r\n </svg>\r\n);\r\n\r\nexport default FailureIcon;\r\n","import { Fragment, h } from \"preact\";\r\nimport \"./result-component.css\";\r\nimport SuccessIcon from \"../../assets/icons/success\";\r\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\r\nimport FailureIcon from \"../../assets/icons/failure\";\r\nimport i18n from \"../../localizations/i18n\";\r\nimport { StraumurCheckoutConfiguration } from \"../../models/models\";\r\n\r\ninterface ResultComponentProps {\r\n configuration: StraumurCheckoutConfiguration;\r\n}\r\n\r\nfunction ResultComponent({ configuration }: ResultComponentProps): h.JSX.Element | null {\r\n const { error, success } = usePaymentMethodGroup();\r\n\r\n if (!error && !success) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div className=\"straumur__result-component\">\r\n {error && (\r\n <Fragment>\r\n <FailureIcon />\r\n <p className=\"straumur__result-component__error--message\">{i18n(configuration.locale, error)}</p>\r\n </Fragment>\r\n )}\r\n\r\n {success && (\r\n <Fragment>\r\n <SuccessIcon />\r\n <p className=\"straumur__result-component__success--message\">{i18n(configuration.locale, success)}</p>\r\n </Fragment>\r\n )}\r\n </div>\r\n );\r\n}\r\n\r\nexport default ResultComponent;\r\n","import { Fragment, h } from \"preact\";\r\nimport { usePaymentMethodGroup } from \"../../components/payment-method-group/payment-method-group-context\";\r\n\r\ninterface PaymentMethodsWrapperProps {\r\n children: h.JSX.Element[];\r\n}\r\n\r\nfunction PaymentMethodsWrapper({ children }: PaymentMethodsWrapperProps): h.JSX.Element | null {\r\n const { error, success } = usePaymentMethodGroup();\r\n\r\n if (error || success) {\r\n return null;\r\n }\r\n\r\n return <Fragment>{children}</Fragment>;\r\n}\r\n\r\nexport default PaymentMethodsWrapper;\r\n","import { h } from \"preact\";\r\nimport { StraumurCheckoutConfiguration } from \"../models/models\";\r\nimport { SuccessResponse } from \"../services/models\";\r\nimport CardComponent from \"./card/card-component\";\r\nimport GooglePayComponent from \"./google-pay/google-pay-component\";\r\nimport ApplePayComponent from \"./apple-pay/apple-pay-component\";\r\nimport StoredCardContainerComponent from \"./stored-card/stored-card-container-component\";\r\nimport PaymentMethodGroup from \"../components/payment-method-group/payment-method-group\";\r\nimport ResultComponent from \"./result-component/result-component\";\r\nimport PaymentMethodsWrapper from \"./payment-methods-wrapper/payment-methods-wrapper\";\r\n\r\ninterface StraumurCheckoutContainerProps {\r\n configuration: StraumurCheckoutConfiguration;\r\n paymentMethods: SuccessResponse;\r\n}\r\n\r\nfunction StraumurCheckoutContainer({ configuration, paymentMethods }: StraumurCheckoutContainerProps): h.JSX.Element {\r\n return (\r\n <PaymentMethodGroup initialValue={null}>\r\n <PaymentMethodsWrapper>\r\n <StoredCardContainerComponent configuration={configuration} paymentMethods={paymentMethods} />\r\n <CardComponent configuration={configuration} paymentMethods={paymentMethods} />\r\n <GooglePayComponent configuration={configuration} paymentMethods={paymentMethods} />\r\n <ApplePayComponent configuration={configuration} paymentMethods={paymentMethods} />\r\n </PaymentMethodsWrapper>\r\n\r\n <ResultComponent configuration={configuration} />\r\n </PaymentMethodGroup>\r\n );\r\n}\r\n\r\nexport default StraumurCheckoutContainer;\r\n","import { h, render } from \"preact\";\r\nimport \"@adyen/adyen-web/styles/adyen.css\";\r\nimport \"./styles/main.css\";\r\nimport { StraumurCheckoutConfiguration, StraumurWebConfiguration } from \"./models/models\";\r\nimport { setupPaymentMethods } from \"./services/straumur-service\";\r\nimport { Language, TranslationKey } from \"./localizations/translations\";\r\nimport StraumurCheckoutContainer from \"./features/straumur-checkout-container\";\r\nimport { SuccessResponse } from \"./services/models\";\r\nimport FailureIcon from \"./assets/icons/failure\";\r\nimport i18n from \"./localizations/i18n\";\r\nimport LoaderIcon from \"./assets/icons/loader\";\r\nimport {\r\n AdyenCheckout,\r\n AdditionalDetailsData,\r\n UIElement,\r\n UIElementProps,\r\n AdditionalDetailsActions,\r\n} from \"@adyen/adyen-web\";\r\nimport { ICreateDetailsBody } from \"./adapter/models\";\r\nimport { createDetailsRequest } from \"./adapter/straumur-adapter\";\r\nimport SuccessIcon from \"./assets/icons/success\";\r\n\r\nclass StraumurCheckout {\r\n private configuration: StraumurCheckoutConfiguration;\r\n private paymentMethods: SuccessResponse | null = null;\r\n private mountElement: HTMLElement | null = null;\r\n\r\n constructor(config: StraumurWebConfiguration) {\r\n this.configuration = { ...config, locale: determineLocale(config.locale) };\r\n\r\n function determineLocale(locale: \"is\" | \"en\" | undefined): Language {\r\n switch (locale) {\r\n case \"is\":\r\n return \"is-IS\";\r\n case \"en\":\r\n return \"en-US\";\r\n default:\r\n return \"is-IS\";\r\n }\r\n }\r\n }\r\n\r\n async mount(selector: HTMLElement | string): Promise<void> {\r\n try {\r\n this.mountElement = typeof selector === \"string\" ? document.querySelector(selector) : selector;\r\n\r\n if (!this.mountElement) {\r\n this.handleError(\"error.failedToInitializeStraumurWebComponent\");\r\n return;\r\n }\r\n\r\n render(\r\n <RootComponent>\r\n <div className=\"straumur__component\">\r\n <LoaderIcon />\r\n </div>\r\n </RootComponent>,\r\n this.mountElement\r\n );\r\n\r\n const response = await setupPaymentMethods(this.configuration.environment, this.configuration.sessionId);\r\n\r\n if (response.resultCode === \"Error\") {\r\n this.handleError(response.error);\r\n return;\r\n }\r\n\r\n this.paymentMethods = response;\r\n\r\n this.configuration.locale = this.configuration.locale || this.paymentMethods.locale;\r\n\r\n this.renderComponent();\r\n } catch (error) {}\r\n }\r\n\r\n private renderComponent(): void {\r\n if (!this.mountElement) return;\r\n\r\n render(\r\n <RootComponent>\r\n <StraumurCheckoutContainer configuration={this.configuration} paymentMethods={this.paymentMethods!} />\r\n </RootComponent>,\r\n this.mountElement\r\n );\r\n }\r\n\r\n updateConfig(newConfig: Partial<StraumurCheckoutConfiguration>): void {\r\n this.configuration = {\r\n ...this.configuration,\r\n ...newConfig,\r\n };\r\n\r\n // Re-render the component with new config\r\n if (this.mountElement) {\r\n this.renderComponent();\r\n }\r\n }\r\n\r\n handleSuccess(message: TranslationKey) {\r\n render(\r\n <RootComponent>\r\n <div className=\"straumur__component\">\r\n <SuccessIcon />\r\n <p>{i18n(this.configuration.locale, message)}</p>\r\n </div>\r\n </RootComponent>,\r\n this.mountElement!\r\n );\r\n }\r\n\r\n async submitDetails(redirectResult: string) {\r\n const response = await setupPaymentMethods(this.configuration.environment, this.configuration.sessionId);\r\n\r\n if (response.resultCode === \"Error\") {\r\n this.handleError(response.error);\r\n return;\r\n }\r\n\r\n const checkout = await AdyenCheckout({\r\n environment: this.configuration.environment,\r\n clientKey: response.clientKey,\r\n paymentMethodsResponse: response.paymentMethods,\r\n countryCode: \"IS\",\r\n onAdditionalDetails: this.handleOnSubmitAdditionalData,\r\n });\r\n\r\n checkout.submitDetails({\r\n details: {\r\n redirectResult,\r\n },\r\n });\r\n }\r\n\r\n private async handleOnSubmitAdditionalData(\r\n state: AdditionalDetailsData,\r\n _: UIElement<UIElementProps>,\r\n actions: AdditionalDetailsActions\r\n ) {\r\n const data: ICreateDetailsBody = {\r\n ...state.data,\r\n sessionId: this.configuration.sessionId,\r\n };\r\n\r\n const fetchResponse = await createDetailsRequest(this.configuration.environment, data);\r\n\r\n // We will always get 200 OK unless there is an error in our server code.\r\n // Payment unsuccessful still returns 200 OK, but with resultCode Refused.\r\n if (!fetchResponse.ok) {\r\n actions.reject();\r\n this.handleError(\"error.failedToSubmitPaymentDetails\");\r\n return;\r\n }\r\n\r\n const response = await fetchResponse.json();\r\n\r\n // ResultCode should always be either Authorised or Refused or IdentifyShopper. Never empty.\r\n if (!response.resultCode) {\r\n actions.reject();\r\n this.handleError(\"error.paymentDetailsFailed\");\r\n return;\r\n }\r\n\r\n const { resultCode, action } = response;\r\n\r\n actions.resolve({ resultCode, action });\r\n\r\n if (resultCode === \"Authorised\") {\r\n this.handleSuccess(\"success.paymentAuthorized\");\r\n } else {\r\n this.handleError(\"error.paymentUnsuccessful\");\r\n }\r\n }\r\n\r\n setLanguage(locale: Language): void {\r\n this.updateConfig({\r\n locale: locale,\r\n });\r\n }\r\n\r\n destroy(): void {\r\n // Clean up resources\r\n if (this.mountElement) {\r\n render(null, this.mountElement);\r\n this.mountElement = null;\r\n }\r\n }\r\n\r\n handleError(message: TranslationKey) {\r\n render(\r\n <RootComponent>\r\n <div className=\"straumur__component\">\r\n <FailureIcon />\r\n <p>{i18n(this.configuration.locale, message)}</p>\r\n </div>\r\n </RootComponent>,\r\n this.mountElement!\r\n );\r\n }\r\n}\r\n\r\nexport default StraumurCheckout;\r\n\r\nfunction RootComponent({ children }: { children: h.JSX.Element }) {\r\n return <div className=\"straumur__root-component\">{children}</div>;\r\n}\r\n"],"mappings":"6cAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,sBAAAE,KCCO,IC0BMC,GChBPC,ECPFC,GA2FSC,GCmFTC,GAWAC,GAEEC,GA0BAC,GC1MAC,GAaFC,GAkJEC,GACAC,GC5KKC,GNeEC,GAAgC,CAAG,EACnCC,GAAY,CAAA,EACZC,GACZ,oECnBYC,GAAUC,MAAMD,QAStB,SAASE,GAAOC,EAAKC,EAAAA,CAE3B,QAASR,KAAKQ,EAAOD,EAAIP,CAAAA,EAAKQ,EAAMR,CAAAA,EACpC,OAA6BO,CAC9B,CAQgB,SAAAE,GAAWC,EAAAA,CACtBA,GAAQA,EAAKC,YAAYD,EAAKC,WAAWC,YAAYF,CAAAA,CAC1D,CEVgB,SAAAG,EAAcC,EAAMN,EAAOO,EAAAA,CAC1C,IACCC,EACAC,EACAjB,EAHGkB,EAAkB,CAAA,EAItB,IAAKlB,KAAKQ,EACLR,GAAK,MAAOgB,EAAMR,EAAMR,CAAAA,EACnBA,GAAK,MA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AK,aAAe,KAExB,CAEA,YAAYQ,EAAyB,CACnCR,GACEC,EAACC,GAAA,KACCD,EAAC,OAAI,UAAU,uBACbA,EAACmB,GAAA,IAAY,EACbnB,EAAC,SAAGS,EAAK,KAAK,cAAc,OAAQF,CAAO,CAAE,CAC/C,CACF,EACA,KAAK,YACP,CACF,CACF,EAEOa,GAAQ1B,GAEf,SAASO,GAAc,CAAE,SAAAoB,CAAS,EAAgC,CAChE,OAAOrB,EAAC,OAAI,UAAU,4BAA4BqB,CAAS,CAC7D","names":["index_exports","__export","straumur_checkout_default","slice","options","vnodeId","isValidElement","rerenderQueue","prevDebounce","defer","depthSort","CAPTURE_REGEX","eventClock","eventProxy","eventProxyCapture","i","EMPTY_OBJ","EMPTY_ARR","IS_NON_DIMENSIONAL","isArray","Array","assign","obj","props","removeNode","node","parentNode","removeChild","createElement","type","children","key","ref","normalizedProps","arguments","length","call","defaultProps","undefined","createVNode","original","vnode","__k","__","__b","__e","__c","constructor","__v","__i","__u","Fragment","props","children","BaseComponent","context","this","getDomSibling","vnode","childIndex","__","__i","sibling","__k","length","__e","type","updateParentDomPointers","i","child","__c","base","enqueueRender","c","__d","rerenderQueue","push","process","__r","prevDebounce","options","debounceRendering","defer","component","newVNode","oldVNode","oldDom","commitQueue","refQueue","l","sort","depthSort","shift","__v","__P","assign","diff","__n","namespaceURI","__u","commitRoot","diffChildren","parentDom","renderResult","newParentVNode","oldParentVNode","globalContext","namespace","excessDomChildren","isHydrating","childVNode","newDom","firstChildDom","result","oldChildren","EMPTY_ARR","newChildrenLength","constructNewChildrenArray","EMPTY_OBJ","ref","applyRef","insert","nextSibling","skewedIndex","matchingIndex","oldChildrenLength","remainingOldChildren","skew","Array","constructor","String","createVNode","isArray","undefined","__b","key","findMatchingIndex","unmount","parentVNode","contains","insertBefore","nodeType","findMatchingIndex","childVNode","oldChildren","skewedIndex","remainingOldChildren","x","y","key","type","oldVNode","__u","length","setStyle","style","value","setProperty","IS_NON_DIMENSIONAL","test","dom","name","oldValue","namespace","useCapture","o","cssText","replace","CAPTURE_REGEX","toLowerCase","slice","l","_attached","eventClock","addEventListener","eventProxyCapture","eventProxy","removeEventListener","e","removeAttribute","setAttribute","createEventProxy","this","eventHandler","_dispatched","options","event","diff","parentDom","newVNode","globalContext","excessDomChildren","commitQueue","oldDom","isHydrating","refQueue","tmp","c","isNew","oldProps","oldState","snapshot","clearProcessingException","newProps","isClassComponent","provider","componentContext","i","renderHook","count","renderResult","newType","constructor","undefined","__e","__b","outer","props","prototype","render","contextType","__c","__","__E","BaseComponent","doRender","sub","state","context","__n","__d","__h","_sb","__s","getDerivedStateFromProps","assign","__v","componentWillMount","componentDidMount","push","componentWillReceiveProps","shouldComponentUpdate","__k","some","vnode","componentWillUpdate","componentDidUpdate","__P","__r","getChildContext","getSnapshotBeforeUpdate","Fragment","cloneNode","children","diffChildren","isArray","base","then","MODE_HYDRATE","nodeType","nextSibling","indexOf","removeNode","diffElementNodes","diffed","commitRoot","root","applyRef","cb","call","node","map","newHtml","oldHtml","newChildren","inputValue","checked","localName","document","createTextNode","createElementNS","is","__m","data","childNodes","EMPTY_OBJ","attributes","__html","innerHTML","content","getDomSibling","ref","hasRefUnmount","current","unmount","parentVNode","skipRemove","r","componentWillUnmount","replaceNode","documentElement","createElement","namespaceURI","firstChild","createContext","defaultValue","Context","props","subs","ctx","this","getChildContext","Set","__c","componentWillUnmount","shouldComponentUpdate","_props","value","forEach","c","__e","enqueueRender","sub","add","old","delete","call","children","i","__","Provider","__l","Consumer","contextValue","contextType","slice","EMPTY_ARR","options","error","vnode","oldVNode","errorInfo","component","ctor","handled","constructor","getDerivedStateFromError","setState","__d","componentDidCatch","__E","e","vnodeId","isValidElement","undefined","BaseComponent","prototype","update","callback","s","__s","state","assign","__v","_sb","push","forceUpdate","__h","render","Fragment","rerenderQueue","defer","Promise","then","bind","resolve","setTimeout","depthSort","a","b","__b","process","__r","CAPTURE_REGEX","eventClock","eventProxy","createEventProxy","eventProxyCapture","styleInject","css","insertAt","head","style","styleInject","styleInject","getEnv","env","getBaseUrl","environment","env","getPaymentMethods","body","createPaymentRequest","createDetailsRequest","postDisableTokenRequest","setupPaymentMethods","environment","sessionId","fetchResponse","getPaymentMethods","contentType","errorMessage","currentIndex","currentComponent","previousComponent","prevRaf","currentHook","afterPaintEffects","options","_options","oldBeforeDiff","__b","oldBeforeRender","__r","oldAfterDiff","diffed","oldCommit","__c","oldBeforeUnmount","unmount","oldRoot","__","getHookState","index","type","__h","hooks","__H","length","push","useState","initialState","useReducer","invokeOrReturn","reducer","init","hookState","_reducer","action","currentValue","__N","nextValue","setState","__f","updateHookState","p","s","c","stateHooks","filter","x","every","prevScu","call","this","shouldUpdate","props","forEach","hookItem","shouldComponentUpdate","prevCWU","componentWillUpdate","__e","tmp","useEffect","callback","args","state","__s","argsChanged","_pendingArgs","useRef","initialValue","currentHook","useMemo","current","useMemo","factory","args","state","getHookState","currentIndex","argsChanged","__H","__","__h","useContext","context","provider","currentComponent","__c","state","getHookState","currentIndex","c","__","sub","props","value","flushAfterPaintEffects","component","afterPaintEffects","shift","__P","__H","__h","forEach","invokeCleanup","invokeEffect","e","options","__e","__v","__b","vnode","currentComponent","oldBeforeDiff","__","parentDom","__k","__m","oldRoot","__r","oldBeforeRender","currentIndex","hooks","__c","previousComponent","hookItem","__N","_pendingArgs","diffed","oldAfterDiff","c","length","push","prevRaf","requestAnimationFrame","afterNextFrame","commitQueue","some","filter","cb","oldCommit","unmount","oldBeforeUnmount","hasErrored","s","HAS_RAF","callback","raf","done","clearTimeout","timeout","cancelAnimationFrame","setTimeout","hook","comp","cleanup","argsChanged","oldArgs","newArgs","arg","index","invokeOrReturn","f","styleInject","PaymentMethodContext","K","defaultIsInitialized","PaymentMethodGroupContext","children","initialValue","activePaymentMethod","setActivePaymentMethod","d","activeStoredPaymentMethodId","setActiveStoredPaymentMethodId","threeDSecureActive","setThreeDSecureActive","isPaymentMethodInitialized","setIsPaymentMethodInitialized","isStoredCardInitialized","setIsStoredCardInitialized","success","setSuccess","error","setError","updatePaymentMethodInitialization","paymentMethod","isInitialized","prevState","updateStoredCardInitialization","storedPaymentMethod","handleError","handleSuccess","_","usePaymentMethodGroup","context","x","n","l","u","i","o","r","f","e","c","s","a","h","p","v","y","Array","isArray","d","w","parentNode","removeChild","_","t","arguments","length","children","call","defaultProps","g","type","props","key","ref","__k","__","__b","__e","__d","__c","constructor","__v","__i","__u","vnode","k","b","this","context","x","C","base","M","push","P","__r","debounceRendering","sort","shift","__P","O","__n","namespaceURI","j","S","$","N","contains","I","nextSibling","String","L","V","insertBefore","nodeType","H","some","T","setProperty","test","A","style","cssText","replace","toLowerCase","slice","addEventListener","removeEventListener","removeAttribute","setAttribute","F","event","m","prototype","render","contextType","value","__E","q","sub","state","__h","_sb","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","forEach","componentWillUpdate","componentDidUpdate","getChildContext","getSnapshotBeforeUpdate","indexOf","z","diffed","localName","document","createTextNode","createElementNS","is","data","childNodes","attributes","name","__html","innerHTML","current","unmount","componentWillUnmount","B","firstChild","G","n","l","u","__c","a","__","Consumer","children","Provider","t","this","getChildContext","componentWillUnmount","shouldComponentUpdate","props","value","some","__e","M","sub","push","splice","indexOf","call","contextType","p","slice","i","o","r","constructor","getDerivedStateFromError","setState","__d","componentDidCatch","__E","b","prototype","__s","state","d","__v","_sb","forceUpdate","__h","render","k","Promise","then","bind","resolve","setTimeout","f","__b","P","__r","e","c","F","s","t","r","u","i","o","f","c","n","e","__b","a","__r","v","diffed","l","__c","m","unmount","s","__","d","__h","__H","length","push","h","p","D","__N","setState","filter","every","call","this","forEach","props","shouldComponentUpdate","componentWillUpdate","__e","y","__s","C","A","n","o","T","current","r","u","d","t","C","__H","__","__h","q","x","context","__c","i","c","sub","props","value","j","f","shift","__P","forEach","z","B","__e","__v","__b","e","__k","__m","s","__r","a","__N","diffed","v","length","push","requestAnimationFrame","w","some","filter","l","unmount","m","k","clearTimeout","cancelAnimationFrame","setTimeout","D","ENCRYPTED","ENCRYPTED_CARD_NUMBER","ENCRYPTED_EXPIRY_DATE","ENCRYPTED_EXPIRY_MONTH","ENCRYPTED_EXPIRY_YEAR","ENCRYPTED_SECURITY_CODE","ENCRYPTED_PWD_FIELD","ENCRYPTED_SECURITY_CODE_3_DIGITS","ENCRYPTED_SECURITY_CODE_4_DIGITS","GIFT_CARD","SF_VERSION","DEFAULT_CARD_GROUP_TYPES","NON_CREDIT_CARD_TYPE_SECURED_FIELDS","CREDIT_CARD_SF_FIELDS","ALL_SECURED_FIELDS","DEDICATED_CARD_COMPONENTS","REQUIRED","OPTIONAL","HIDDEN","CVC_POLICY_REQUIRED","CVC_POLICY_OPTIONAL","CVC_POLICY_HIDDEN","DATE_POLICY_REQUIRED","DATE_POLICY_OPTIONAL","DATE_POLICY_HIDDEN","DATA_ENCRYPTED_FIELD_ATTR","DATA_INFO","DATA_UID","BRAND_ICON_UI_EXCLUSION_LIST","SF_FIELDS_MAP","ENCRYPTED_CARD_NUMBER","ENCRYPTED_EXPIRY_DATE","ENCRYPTED_SECURITY_CODE","ENCRYPTED_EXPIRY_MONTH","ENCRYPTED_EXPIRY_YEAR","ENCRYPTED_PWD_FIELD","ENCRYPTED_SECURITY_CODE_3_DIGITS","ENCRYPTED_SECURITY_CODE_4_DIGITS","SF_CONFIG_TIMEOUT","getProp","object","path","split","reduce","xs","x","ERROR_FIELD_REQUIRED","ERROR_INVALID_FORMAT_EXPECTS","CREDITCARD_HOLDER_NAME_INVALID","CREDITCARD_TAX_NUMBER_INVALID","BOLETO_SOCIAL_SECURITY_NUMBER_INVALID","ErrorCodePrefixes","SF_ErrorCodes","EMPTY_FIELD_ERROR_MESSAGES","ENCRYPTED_CARD_NUMBER","ENCRYPTED_EXPIRY_DATE","ENCRYPTED_EXPIRY_MONTH","ENCRYPTED_EXPIRY_YEAR","ENCRYPTED_SECURITY_CODE","ENCRYPTED_PWD_FIELD","getFields","rootNode","Array","prototype","slice","call","querySelectorAll","map","f","getAttribute","validFieldsReducer","acc","cur","ENCRYPTED_EXPIRY_DATE","ENCRYPTED_EXPIRY_MONTH","ENCRYPTED_EXPIRY_YEAR","getErrorReducer","numDateFields","state","field","val","valid","fieldNames","isFieldOfType","fieldIsValid","reduce","fieldName","errors","policyType","ENCRYPTED_SECURITY_CODE","policyOptional","CVC_POLICY_OPTIONAL","DATE_POLICY_OPTIONAL","policyHidden","CVC_POLICY_HIDDEN","DATE_POLICY_HIDDEN","includes","push","getErrorObject","fieldType","error","getProp","EMPTY_FIELD_ERROR_MESSAGES","type","AbstractCSF","setupObj","_define_property","this","callbacks","config","props","state","validateForm","handleBrandFromBinLookup","callbacksHandler","configHandler","createCardSecuredFields","createNonCardSecuredFields","createSecuredFields","destroySecuredFields","handleIOSTouchEvents","destroyTouchendListener","destroyTouchstartListener","handleBinValue","handleEncryption","handleFocus","handleIframeConfigFeedback","handleValidation","handleSFShiftTab","handleShiftTab","isConfigured","postMessageToAllIframes","processAutoComplete","processBrand","sendBrandToCardSF","sendExpiryDatePolicyToSF","setFocusOnFrame","setupSecuredField","touchendListener","touchstartListener","hasGenuineTouchEvents","encryptedAttrName","hasRedundantCVCField","isSingleBrandedCard","securityCode","objToString","Object","prototype","toString","isArray","prop","call","existy","x","truthy","isObjectLike","value","falsy","Number","isNaN","length","keys","pick","args","myArgs","isArray","from","obj","map","k","reduce","res","o","reject","Object","keys","filter","includes","getCardGroupTypes","cardGroupTypes","isArray","length","DEFAULT_CARD_GROUP_TYPES","error","window","console","bind","info","log","warn","handleConfig","props","this","config","cardGroupTypes","getCardGroupTypes","loadingContext","logger","str","charAt","length","isCreditCardType","NON_CREDIT_CARD_TYPE_SECURED_FIELDS","includes","type","iframeUIConfig","autoFocus","showWarnings","trimTrailingSeparator","keypadFix","legacyInputMode","minimumExpiryDate","sfLogAtStart","window","_b$dl","sfBundleType","d","btoa","location","origin","bundleType","forceCompat","TextEncoder","iframeSrc","clientKey","SF_VERSION","noop","configureCallbacks","callbacksObj","this","callbacks","onLoad","onConfigSuccess","onFieldValid","onAllValid","onBrand","onError","onFocus","onBinValue","onAutoComplete","onAdditionalSFConfig","onAdditionalSFRemoved","onTouchstartIOS","onKeyPressed","makeCallbackObj","fieldType","encryptedFieldName","uuid","isValid","txVariant","rootNode","uid","valid","type","makeCallbackObjectsValidation","isExpiryDateField","ENCRYPTED_EXPIRY_DATE","callbackObjectsArr","sepExpiryDateNames","i","encryptedType","totalFields","callbackObj","push","makeCallbackObjectsEncryption","encryptedObjArr","encryptedObj","encryptedBlob","length","blob","hasOwnProperty","obj","prop","Object","prototype","call","processErrors","pFeedbackObj","securedField","type","rootNode","callbackFn","hasOwnProperty","field","dataObj","fieldType","error","isError","hasError","errorType","handleValidation","pFeedbackObj","callbackObjectsArr","fieldType","this","state","type","hasOwnProperty","existy","cvcPolicy","securedFields","ENCRYPTED_SECURITY_CODE","processErrors","props","rootNode","callbacks","onError","isEncrypted","makeCallbackObjectsValidation","txVariant","ENCRYPTED_CARD_NUMBER","endDigits","i","len","length","onFieldValid","validateForm","processBrand","postMessageToIframe","pDataObj","pIframeObj","pLoadingContext","dataObjStr","JSON","stringify","postMessage","getIframeContentWin","csfState","fieldType","securedFields","iframeContentWindow","handleEncryption","pFeedbackObj","fieldType","i","len","this","config","autoFocus","type","ENCRYPTED_EXPIRY_YEAR","setFocusOnFrame","ENCRYPTED_SECURITY_CODE","ENCRYPTED_EXPIRY_MONTH","encryptedObjArr","state","securedFields","isEncrypted","processErrors","error","props","rootNode","callbacks","onError","callbackObjectsArr","makeCallbackObjectsEncryption","txVariant","hasOwnProperty","dataObj","code","blob","numKey","postMessageToIframe","getIframeContentWin","loadingContext","ENCRYPTED_CARD_NUMBER","truthy","endDigits","issuerBin","ENCRYPTED_EXPIRY_DATE","expiryDate","length","onFieldValid","validateForm","select","root","selector","array","querySelectorAll","slice","call","selectOne","querySelector","getAttribute","node","attribute","removeAllChildren","firstChild","removeChild","shortestPermittedCardLength","CardType","cards","push","cardType","startingRules","permittedLengths","pattern","securityCode","cvcPolicy","expiryDatePolicy","detectCard","pCardNumber","pAvailableCards","matchedCards","i","len","filter","card","includes","hasOwnProperty","match","length","longestRule","reduce","a","b","String","__NO_BRAND","detectCardLength","pCard","pUnformattedVal","maxLength","shortenedNewValue","lengthDiff","reachedValidLength","unformattedVal","maxPermittedLength","substring","forEach","pItem","div","Math","floor","toLowerCase","getShortestPermittedCardLength","permittedLengthsArray","concat","min","apply","getCardByBrand","pBrand","isGenericCardType","type","Error","allCards","createIframe","src","title","policy","iframeEl","document","createElement","setAttribute","classList","add","trim","length","noIframeElContent","createTextNode","appendChild","on","node","event","callback","useCapture","addEventListener","off","removeEventListener","originCheckPassed","event","pLoadingContext","pShowWarnings","origin","isCheckoutUrl","indexOf","adyenDomain","substring","lastCharIndex","length","charAt","logger","data","isWebpackPostMsg","type","isChromeVoxPostMsg","generateRandomNumber","window","crypto","Math","random","ranNum","Uint32Array","getRandomValues","objectsDeepEqual","x","y","xType","Object","keys","length","every","key","partial","args","myArgs","fn","shift","args2","apply","this","concat","AbstractSecuredField","constructor","_define_property","sfConfig","this","loadingContext","holderEl","iframeRef","loadToConfigTimeout","_isValid","_iframeContentWindow","_numKey","_isEncrypted","_hasError","_errorType","_cvcPolicy","_expiryDatePolicy","_iframeOnLoadListener","_postMessageListener","onIframeLoadedCallback","onConfigCallback","onEncryptionCallback","onValidationCallback","onFocusCallback","onBinValueCallback","onTouchstartCallback","onShiftTabCallback","onAutoCompleteCallback","onKeyPressedCallback","getTranslatedErrors","i18n","errorCodeIdentifier","Object","values","SF_ErrorCodes","reduce","acc","value","includes","get","addErrorTranslationsToObject","originalObj","fieldType","nuObj","fieldTypeToErrorCodeIdentifier","error","getErrorMessageFromCode","errorCode","codeMap","errMsg","key","entries","toLowerCase","replace","ENCRYPTED_CARD_NUMBER","ErrorCodePrefixes","CC_NUM","ENCRYPTED_EXPIRY_DATE","CC_DAT","ENCRYPTED_EXPIRY_MONTH","CC_MTH","ENCRYPTED_EXPIRY_YEAR","CC_YR","ENCRYPTED_SECURITY_CODE","CC_CVC","ENCRYPTED_PWD_FIELD","KCP_PWD","addContextTranslationsToObject","originalObj","i18n","txVariant","fieldType","nuObj","contextualTexts","GIFT_CARD","ENCRYPTED_SECURITY_CODE","ENCRYPTED_SECURITY_CODE_3_DIGITS","get","ENCRYPTED_SECURITY_CODE_4_DIGITS","translationKey","SF_FIELDS_MAP","translation","Object","keys","length","processAriaConfig","txVariant","fieldType","i18n","showContextuaElement","type","includes","iframeTitle","get","label","SF_FIELDS_MAP","lang","locale","enhancedAriaFieldConfigObj","addErrorTranslationsToObject","addContextTranslationsToObject","processPlaceholders","txVariant","fieldType","placeholders","GIFT_CARD","SF_FIELDS_MAP","ENCRYPTED_SECURITY_CODE","ENCRYPTED_SECURITY_CODE_3_DIGITS","securityCodeThreeDigits","ENCRYPTED_SECURITY_CODE_4_DIGITS","securityCodeFourDigits","SecuredField","AbstractSecuredField","init","i18n","iframeSrc","placeholders","showContextualElement","processedAriaConfig","processAriaConfig","this","sfConfig","txVariant","fieldType","iframeUIConfig","ariaConfig","processPlaceholders","iframeConfig","src","title","iframeTitle","policy","iframeEl","createIframe","holderEl","appendChild","iframe","selectOne","iframeContentWindow","contentWindow","iframeOnLoadListener","iframeOnLoadListenerFn","on","iframeRef","postMessageListener","postMessageListenerFn","window","configObj","numKey","_b$dl","console","log","postMessageToIframe","loadingContext","onIframeLoadedCallback","event","originCheckPassed","showWarnings","feedbackObj","JSON","parse","data","e","isWebpackPostMsg","logger","isChromeVoxPostMsg","hasOwnProperty","action","isValid","onEncryptionCallback","onConfigCallback","onFocusCallback","onBinValueCallback","onTouchstartCallback","onShiftTabCallback","onAutoCompleteCallback","onKeyPressedCallback","onValidationCallback","destroy","off","removeAllChildren","isOptionalOrHidden","ENCRYPTED_EXPIRY_DATE","ENCRYPTED_EXPIRY_MONTH","ENCRYPTED_EXPIRY_YEAR","expiryDatePolicy","DATE_POLICY_HIDDEN","DATE_POLICY_OPTIONAL","hasError","ENCRYPTED_SECURITY_CODE","cvcPolicy","CVC_POLICY_HIDDEN","CVC_POLICY_OPTIONAL","onIframeLoaded","callbackFn","onEncryption","onValidation","onConfig","onFocus","onBinValue","onTouchstart","onShiftTab","onAutoComplete","onKeyPressed","errorType","_errorType","value","_hasError","_isValid","_cvcPolicy","_expiryDatePolicy","_iframeContentWindow","isEncrypted","_isEncrypted","_numKey","_iframeOnLoadListener","bind","_postMessageListener","constructor","pSetupObj","super","configVarsFromSetUpObj","reject","from","generateRandomNumber","NETWORK_ERROR","CANCEL","IMPLEMENTATION_ERROR","API_ERROR","ERROR","SCRIPT_ERROR","SDK_ERROR","AdyenCheckoutError","Error","constructor","type","message","options","super","_define_property","cause","this","name","errorTypes","createSecuredFields","this","encryptedAttrName","DATA_ENCRYPTED_FIELD_ATTR","securedFields","select","props","rootNode","filter","field","fieldType","getAttribute","isValidType","ALL_SECURED_FIELDS","includes","console","warn","cvcPolicy","CVC_POLICY_REQUIRED","expiryDatePolicy","DATE_POLICY_REQUIRED","config","isCreditCardType","isSingleBrandedCard","securityCode","createCardSecuredFields","length","createNonCardSecuredFields","async","i","securedField","setupSecuredField","catch","e","window","_b$dl","log","type","state","cardGroupTypes","card","cardType","getCardByBrand","existy","callbackObj","brand","cvcText","setTimeout","callbacks","onBrand","pItem","Promise","resolve","reject","ENCRYPTED_EXPIRY_YEAR","hasSeparateDateFields","sfInitObj","extraFieldData","DATA_INFO","uid","DATA_UID","holderEl","txVariant","iframeUIConfig","sfLogAtStart","trimTrailingSeparator","iframeSrc","loadingContext","showWarnings","legacyInputMode","minimumExpiryDate","maskSecurityCode","exposeExpiryDate","disableIOSArrowKeys","shouldDisableIOSArrowKeys","implementationType","showContextualElement","placeholders","sf","SecuredField","i18n","onIframeLoaded","iframeCount","numIframes","destroySecuredFields","AdyenCheckoutError","loadToConfigTimeout","failReason","SF_CONFIG_TIMEOUT","originalNumIframes","iframesLoaded","onLoad","onConfig","pFeedbackObj","handleIframeConfigFeedback","clearTimeout","onFocus","handleFocus","onBinValue","handleBinValue","onTouchstart","hasGenuineTouchEvents","onTouchstartIOS","postMessageToAllIframes","fieldClick","onShiftTab","handleSFShiftTab","onEncryption","handleEncryption","onValidation","handleValidation","onAutoComplete","processAutoComplete","onKeyPressed","numKey","rest","__IS_IE","navigator","ua","userAgent","msie","indexOf","parseInt","substring","rv","edge","isIE","__IS_IOS","test","__IS_FIREFOX","handleIOSTouchEvents","touchendListener","e","targetEl","target","HTMLInputElement","HTMLTextAreaElement","val","value","caretPos","pNode","selectionStart","adjFlag","length","setSelectionRange","focus","setTimeout","this","config","keypadFix","rootNode","props","nuInput","document","createElement","style","width","height","opacity","fontSize","appendChild","removeChild","destroyTouchendListener","state","registerFieldForIos","postMessageToAllIframes","fieldType","fieldClick","touchstartListener","hasGenuineTouchEvents","HTMLSpanElement","checkoutTouchEvent","name","getAttribute","callbacks","onTouchstartIOS","handleTouchend","bodyEl","selectOne","cursor","on","ua","__IS_IOS","off","destroyTouchstartListener","getPreviousTabbableNonSFElement","passedFieldType","rootNode","getPrevious","matchEl","allPotentialTabEls","Array","prototype","slice","call","select","document","actualTabEls","forEach","potentialTabEl","tabIndex","getAttribute","isValidTabEl","parseInt","bounds","getBoundingClientRect","hasDimensions","width","height","push","matchElIndex","arr","testFn","n","length","tabEl","contains","selectOne","focusExternalField","pAdditionalField","focus","blur","shiftTabCreditCard","fieldType","rootNode","hasSeparateDateFields","numIframes","additionalField","fieldToFocus","ENCRYPTED_CARD_NUMBER","getPreviousTabbableNonSFElement","ENCRYPTED_EXPIRY_DATE","ENCRYPTED_EXPIRY_MONTH","ENCRYPTED_EXPIRY_YEAR","ENCRYPTED_SECURITY_CODE","shiftTabGiftCard","fieldType","rootNode","additionalField","fieldToFocus","ENCRYPTED_CARD_NUMBER","getPreviousTabbableNonSFElement","ENCRYPTED_SECURITY_CODE","shiftTabKCP","fieldType","rootNode","hasSeparateDateFields","additionalField","fieldToFocus","ENCRYPTED_CARD_NUMBER","getPreviousTabbableNonSFElement","ENCRYPTED_EXPIRY_DATE","ENCRYPTED_EXPIRY_MONTH","ENCRYPTED_EXPIRY_YEAR","ENCRYPTED_SECURITY_CODE","ENCRYPTED_PWD_FIELD","handleTab","handleShiftTab","fieldType","shiftTabObj","this","state","type","shiftTabGiftCard","props","rootNode","isKCP","shiftTabKCP","hasSeparateDateFields","shiftTabCreditCard","numIframes","fieldToFocus","additionalField","setFocusOnFrame","focusExternalField","handleSFShiftTab","ua","__IS_FIREFOX","__IS_IE","sendBrandToCardSF","brandObj","hasOwnProperty","this","state","securedFields","ENCRYPTED_CARD_NUMBER","dataObj","txVariant","type","fieldType","numKey","postMessageToIframe","getIframeContentWin","config","loadingContext","sendExpiryDatePolicyToSF","expiryDateObj","ENCRYPTED_EXPIRY_MONTH","ENCRYPTED_EXPIRY_YEAR","ENCRYPTED_EXPIRY_DATE","forEach","key","handleBrandFromBinLookup","binLookupResponse","resetObj","isGenericCard","Object","keys","length","brand","expiryDatePolicy","DATE_POLICY_REQUIRED","processBrand","binBrandObj","supportedBrands","passedBrand","showExpiryDate","DATE_POLICY_HIDDEN","cvcPolicy","cvcText","showSocialSecurityNumber","cardObj","enableLuhnCheck","panLength","isDualBrandSelection","ENCRYPTED_SECURITY_CODE","validateForm","setFocusOnFrame","csfState","csfConfig","pFieldType","doLog","hasOwnProperty","securedFields","focusData","txVariant","type","fieldType","focus","numKey","postMessageToIframe","getIframeContentWin","loadingContext","postMessageToAllIframes","csfState","csfConfig","pDataObj","objKeys","Object","keys","length","securedFields","forEach","pFieldType","dataObj","txVariant","type","fieldType","numKey","pKey","postMessageToIframe","getIframeContentWin","loadingContext","processBrand","csfState","csfConfig","csfProps","csfCallbacks","pFeedbackObj","fieldType","ENCRYPTED_CARD_NUMBER","newBrandObj","brand","cvcPolicy","expiryDatePolicy","showSocialSecurityNumber","newBrand","pBrand","storedBrand","objectsDeepEqual","treatAsGenericCard","type","hasOwnProperty","securedFields","ENCRYPTED_SECURITY_CODE","dataObj","txVariant","numKey","postMessageToIframe","getIframeContentWin","loadingContext","brandInfoObj","pick","from","callbackObj","rootNode","onBrand","processAutoComplete","csfState","csfConfig","csfCallbacks","pFeedbackObj","name","feedbackObj","numKey","ACFeedbackObj","onAutoComplete","dateValArr","value","replace","split","length","acMonthVal","year","isNaN","parseInt","acYearVal","slice","acDateVal","hasOwnProperty","securedFields","ENCRYPTED_EXPIRY_DATE","dataObj","txVariant","type","fieldType","autoComplete","postMessageToIframe","getIframeContentWin","loadingContext","ENCRYPTED_EXPIRY_MONTH","ENCRYPTED_EXPIRY_YEAR","setTimeout","handleFocus","csfState","csfProps","csfCallbacks","handleIOSTouchEvents","pFeedbackObj","feedbackObj","numKey","rootNode","type","focusString","fieldType","focus","currentFocusObject","ua","__IS_IOS","registerFieldForIos","callbackObj","onFocus","handleIframeConfigFeedback","csfState","csfCallbacks","isConfigured","pFeedbackObj","iframeConfigCount","window","_b$dl","console","log","fieldType","callbackObj","additionalIframeConfigured","type","onAdditionalSFConfig","originalNumIframes","isConfigured","csfState","csfConfig","csfProps","csfCallbacks","validateForm","callbackObj","iframesConfigured","type","rootNode","onConfigSuccess","numIframes","isCreditCardType","logger","card","cardType","getCardByBrand","cvcPolicy","CVC_POLICY_REQUIRED","validateForm","csfState","csfProps","csfCallbacks","isValid","pSecuredFields","securedFieldKeys","Object","keys","i","len","length","securedFields","validityHasChanged","allValid","callbackObj","type","rootNode","onAllValid","handleBinValue","csfState","csfCallbacks","pFeedbackObj","binValue","encryptedBin","uuid","callbacksObj","type","onBinValue","destroySecuredFields","this","postMessageToAllIframes","destroy","Object","keys","state","securedFields","forEach","pFieldType","sf","destroyTouchendListener","destroyTouchstartListener","notConfiguredWarning","str","logger","CSF","AbstractCSF","init","this","configHandler","props","callbacksHandler","callbacks","numIframes","createSecuredFields","state","originalNumIframes","isKCP","ua","__IS_IOS","shouldDisableIOSArrowKeys","hasGenuineTouchEvents","on","document","touchstartListener","createReturnObject","updateStyles","pStyleObject","isConfigured","postMessageToAllIframes","styleObject","setFocusOnFrame","pFieldType","isValidated","code","hasOwnProperty","securedFields","hasError","errorType","dataObj","txVariant","type","fieldType","externalValidation","numKey","postMessageToIframe","getIframeContentWin","config","loadingContext","hasUnsupportedCard","unsupportedCard","destroy","destroySecuredFields","brandsFromBinLookup","binLookupResponse","resetObj","isCreditCardType","handleBrandFromBinLookup","addSecuredField","securedField","selectOne","rootNode","setupSecuredField","removeSecuredField","iframeCount","callbackObj","additionalIframeRemoved","onAdditionalSFRemoved","setKCPStatus","sfIsOptionalOrHidden","isOptionalOrHidden","constructor","setupObj","super","brand","cvcPolicy","allValid","iframeConfigCount","hasSeparateDateFields","currentFocusObject","registerFieldForIos","thisObj","csfState","csfConfig","csfProps","csfCallbacks","handleConfig","configureCallbacks","validateForm","partial","handleIframeConfigFeedback","processBrand","handleValidation","handleEncryption","createNonCardSecuredFields","createCardSecuredFields","handleIOSTouchEvents","handleTouchend","bind","touchendListener","destroyTouchendListener","destroyTouchstartListener","handleFocus","handleSFShiftTab","handleTab","handleShiftTab","processAutoComplete","handleBinValue","sendBrandToCardSF","sendExpiryDatePolicyToSF","initCSF","pSetupObj","Error","setupObj","isGenericCardType","cardType","type","e","hasOwnProperty","logger","falsy","clientKey","rootNode","findRootNode","CSF","createReturnObject","pRootNode","selectOne","document","camelCaseToSnakeCase","camelCaseString","replace","toLowerCase","getCardImageUrl","brand","resources","type","imageOptions","extension","getImage","fieldTypeToSnakeCase","fieldType","str","camelCaseToSnakeCase","ALL_SECURED_FIELDS","includes","substring","ENCRYPTED","length","fieldIsInError","fieldType","policy","numCharsObj","errorsObj","OPTIONAL","HIDDEN","handlers","handleFocus","cbObj","this","numCharsInField","numChars","props","onFocus","handleOnAllValid","status","state","detectedUnsupportedBrands","setState","isSfpValid","allValid","onChange","event","onAllValid","handleOnAutoComplete","autoCompleteName","value","onAutoComplete","handleOnFieldValid","fieldObj","ENCRYPTED_CARD_NUMBER","prevState","data","encryptedFieldName","blob","valid","errors","onFieldValid","handleOnLoad","clearTimeout","csfLoadFailTimeout","onLoad","csfConfigFailTimeout","setTimeout","onError","AdyenCheckoutError","csfConfigFailTimeoutMS","handleOnConfigSuccess","onConfigSuccess","handleOnBrand","cardInfo","cvcFieldInError","ENCRYPTED_SECURITY_CODE","cvcPolicy","dateFieldInError","numDateFields","ENCRYPTED_EXPIRY_DATE","expiryDatePolicy","monthFieldInError","ENCRYPTED_EXPIRY_MONTH","yearFieldInError","ENCRYPTED_EXPIRY_YEAR","brand","CVC_POLICY_REQUIRED","showSocialSecurityNumber","existy","DATE_POLICY_REQUIRED","brandImageUrl","brandsConfiguration","icon","getCardImageUrl","resources","onBrand","handleOnError","hasUnsupportedCard","errorCode","error","undefined","handleOnNoDataRequired","handleOnTouchstartIOS","disableIOSArrowKeys","handleKeyPressed","obj","action","kb","KeyboardEvent","bubbles","cancelable","key","code","handleKeyPress","defaultProps","type","keypadFix","rootNode","loadingContext","brands","showWarnings","autoFocus","trimTrailingSeparator","onChange","onLoad","onConfigSuccess","onAllValid","onFieldValid","onBrand","onError","onBinValue","onFocus","onAutoComplete","handleKeyPress","styles","SecuredFieldsProvider","Component","componentDidMount","this","props","rootNode","setRootNode","fields","getFields","valid","reduce","validFieldsReducer","setState","forEach","field","numCharsInField","numDateFields","filter","f","match","length","destroy","initializeCSF","handleOnNoDataRequired","componentDidUpdate","checkForKCPFields","onStateUpdate","state","componentWillUnmount","csf","clearTimeout","csfLoadFailTimeout","csfConfigFailTimeout","root","loadingContext","csfSetupObj","type","clientKey","cardGroupTypes","brands","autoFocus","trimTrailingSeparator","keypadFix","showWarnings","iframeUIConfig","sfStyles","styles","i18n","callbacks","onLoad","handleOnLoad","onConfigSuccess","handleOnConfigSuccess","onFieldValid","handleOnFieldValid","onAllValid","handleOnAllValid","onBrand","handleOnBrand","onError","handleOnError","onFocus","handleFocus","onBinValue","onAutoComplete","handleOnAutoComplete","onAdditionalSFConfig","onAdditionalSFRemoved","onTouchstartIOS","handleOnTouchstartIOS","onKeyPressed","handleKeyPressed","isKCP","hasKoreanFields","legacyInputMode","minimumExpiryDate","implementationType","forceCompat","maskSecurityCode","exposeExpiryDate","shouldDisableIOSArrowKeys","disableIOSArrowKeys","placeholders","showContextualElement","initCSF","setTimeout","status","AdyenCheckoutError","csfLoadFailTimeoutMS","needsKoreanFields","koreanAuthenticationRequired","issuingCountryCode","countryCode","setRemovedFieldState","prevState","data","ENCRYPTED_PWD_FIELD","undefined","errors","onChange","removeSecuredField","setKCPStatus","setAddedFieldState","isSfpValid","addSecuredField","getChildContext","handleUnsupportedCard","errObj","hasUnsupportedCard","error","detectedUnsupportedBrands","detectedBrands","ENCRYPTED_CARD_NUMBER","setFocusOn","frame","setFocusOnFrame","updateStyles","stylesObj","sfIsOptionalOrHidden","fieldType","showValidation","Object","keys","getErrorReducer","errorObj","getErrorObject","isValidated","mapErrorsToValidationRuleResult","acc","fieldName","errorCode","isValid","errorMessage","getErrorMessageFromCode","SF_ErrorCodes","errorI18n","get","processBinLookupResponse","binLookupResponse","resetObject","toLowerCase","hasBrandedResetObj","brand","mustResetDedicatedBrand","DEDICATED_CARD_COMPONENTS","includes","brandsFromBinLookup","render","constructor","super","_define_property","csfConfigFailTimeoutMS","input","stateObj","cvcPolicy","CVC_POLICY_REQUIRED","expiryDatePolicy","DATE_POLICY_REQUIRED","handlers","bind","defaultProps","createCardVariantSwitcher","brandObjArr","leadBrand","subBrand","dualBrandSelectElements","id","brand","brandObject","selectedBrandValue","containsExcludedBrand","brandsArr","excludedBrands","reduce","acc","brandObj","includes","brand","cloneBrandsArr","map","item","removeExcludedBrand","mainBrand1","mainBrand2","clonedBrands","reverse","length","extensions","props","refs","states","hasPanLengthRef","type","cvcPolicy","sfp","dualBrandSelectElements","setDualBrandSelectElements","setSelectedBrandValue","issuingCountryCode","setIssuingCountryCode","processBinLookup","binLookupResponse","isReset","issuingCode","toLowerCase","Object","keys","brandToReset","current","processBinLookupResponse","supportedBrands","hasExcludedBrand","BRAND_ICON_UI_EXCLUSION_LIST","switcherObj","createCardVariantSwitcher","selectedBrandValue","leadBrand","panLength","handleDualBrandSelection","e","value","Event","target","getAttribute","brandObjArr","brandObject","push","isDualBrandSelection","CoreContext","createContext","undefined","CoreProvider","i18n","loadingContext","resources","children","useEffect","console","warn","h","Provider","value","toChildArray","useCoreContext","context","useContext","Error","useImage","resources","useCoreContext","useCallback","props","getImage","THREEDS2_FINGERPRINT","THREEDS2_FINGERPRINT_ERROR","THREEDS2_FINGERPRINT_SUBMIT","THREEDS2_CHALLENGE","THREEDS2_CHALLENGE_ERROR","THREEDS2_FULL","THREEDS2_NUM","MISSING_TOKEN_IN_ACTION_MSG","DEFAULT_CHALLENGE_WINDOW_SIZE","TIMEOUT","CHALLENGE_TIMEOUT_REJECT_OBJECT","result","transStatus","type","errorCode","FAILED_METHOD_STATUS_RESOLVE_OBJECT_TIMEOUT","threeDSCompInd","CHALLENGE_WINDOW_SIZES","isValidHttpUrl","string","allowHttp","url","URL","_","protocol","e","e","hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","appendClass","parseValue","Array","isArray","apply","toString","Object","prototype","includes","key","call","value","newClass","module","exports","default","window","e","n","s","e","n","Spinner","inline","size","h","div","data-testid","className","uuidv4","replace","c","r","Math","random","toString","Img","props","backgroundUrl","className","classNameModifiers","src","alt","showOnError","loaded","setLoaded","useState","imageRef","useRef","handleLoad","classNames","cx","map","modifier","useEffect","image","Image","current","onload","complete","h","div","data-testid","style","img","ref","onError","formatLocale","localeParam","locale","replace","format","RegExp","test","languageCode","countryCode","split","length","AdyenCheckoutError","toLowerCase","fullLocale","toUpperCase","join","formatCustomTranslations","customTranslations","Object","keys","reduce","memo","customTranslationLocaleKey","replaceTranslationValues","translation","values","_","k","getTranslation","translations","key","options","count","keyPlural","keyForCount","prototype","hasOwnProperty","call","FALLBACK_CONTEXT","GENERIC_OPTIONS","http","options","data","headers","errorLevel","errorCode","loadingContext","FALLBACK_CONTEXT","method","path","timeout","DEFAULT_HTTP_TIMEOUT","request","mode","cache","credentials","Accept","redirect","referrerPolicy","AbortSignal","signal","body","JSON","stringify","url","fetch","then","async","response","json","ok","errorType","message","status","handleFetchError","level","cause","code","errorMessage","catch","error","AdyenCheckoutError","console","httpGet","httpPost","debounce","fn","ms","timeoutId","args","clearTimeout","setTimeout","apply","this","Button","Component","render","classNameModifiers","disabled","href","icon","inline","label","ariaLabel","status","variant","buttonRef","this","props","completed","state","i18n","useCoreContext","buttonIcon","h","img","className","src","alt","aria-hidden","modifiers","buttonClasses","classNames","map","m","buttonStates","loading","span","Spinner","size","get","redirect","default","buttonText","a","target","rel","button","ref","type","onClick","onKeyDown","aria-label","children","super","args","_define_property","e","preventDefault","complete","delay","setState","setTimeout","event","defaultProps","ANALYTICS_PATH","ANALYTICS_INFO_TIMER_INTERVAL","ANALYTICS_EVENT","log","error","info","ANALYTICS_ERROR_TYPE","network","apiError","sdkError","redirect","ANALYTICS_ERROR_CODE","InfoEventTypes","ANALYTICS_ACTION_STR","ANALYTICS_SUBMIT_STR","ANALYTICS_SELECTED_STR","ANALYTICS_RENDERED_STR","ANALYTICS_VALIDATION_ERROR_STR","ANALYTICS_FOCUS_STR","ANALYTICS_UNFOCUS_STR","ANALYTICS_INSTANT_PAYMENT_BUTTON","Analytics3DS2Errors","e","Analytics3DS2Events","errorCodeMapping","CREDITCARD_HOLDER_NAME_INVALID","CREDITCARD_TAX_NUMBER_INVALID","BOLETO_SOCIAL_SECURITY_NUMBER_INVALID","ERROR_FIELD_REQUIRED","ERROR_INVALID_FORMAT_EXPECTS","ANALYTICS_EXPRESS_PAGES_ARRAY","ALLOWED_ANALYTICS_DATA","NO_CHECKOUT_ATTEMPT_ID","ANALYTIC_LEVEL","all","initial","digitsOnlyFormatter","value","replace","getUTCTimestamp","Date","now","mapErrorCodesForAnalytics","errorCode","target","ERROR_FIELD_REQUIRED","ERROR_INVALID_FORMAT_EXPECTS","errorCodeMapping","errCode","isNaN","Number","digitsOnlyFormatter","processAnalyticsData","analyticsData","Object","keys","reduce","acc","prop","ALLOWED_ANALYTICS_DATA","includes","AnalyticsEvent","constructor","_define_property","this","timestamp","id","component","uuid","String","getUTCTimestamp","AnalyticsInfoEvent","AnalyticsEvent","getEventCategory","ANALYTICS_EVENT","info","constructor","analyticsObject","super","_define_property","type","target","this","issuer","isExpress","expressPage","isStoredPaymentMethod","brand","validationErrorCode","validationErrorMessage","configData","component","ANALYTICS_VALIDATION_ERROR_STR","mapErrorCodesForAnalytics","collectBrowserInfo","colorDepth","getProp","window","screenHeight","screenWidth","userAgent","acceptHeader","language","javaEnabled","timeZoneOffset","Date","getTimezoneOffset","parent","currentRequestId","callbackObj","props","doBinLookup","encryptedBin","clientKey","uuid","httpPost","loadingContext","path","type","brand","supportedBrands","brands","DEFAULT_CARD_GROUP_TYPES","requestId","then","data","length","mappedResponse","reduce","acc","item","detectedBrands","push","paymentMethodVariants","paymentMethodVariant","supported","processBinLookupResponse","issuingCountryCode","showSocialSecurityNumber","onBinLookup","map","supportedBrandsRaw","errObj","fieldType","error","SF_ErrorCodes","ERROR_MSG_UNSUPPORTED_CARD_ENTERED","handleUnsupportedCard","onError","errorType","message","isReset","onBinValue","Script","constructor","src","node","attributes","dataAttributes","_define_property","this","isScriptLoadCalled","script","load","Promise","resolve","reject","handleOnLoad","setAttribute","handleOnError","errorEvent","remove","AdyenCheckoutError","message","cause","error","scriptContainer","document","querySelector","getAttribute","addEventListener","createElement","Object","assign","dataset","async","appendChild","parentNode","removeChild","amountLabel","i18n","amount","value","currency","currencyDisplay","payAmountLabel","get","secondaryAmountLabel","secondaryAmount","convertedSecondaryAmount","length","SecondaryButtonLabel","label","h","span","className","PayButton","amount","secondaryAmount","classNameModifiers","label","props","i18n","useCoreContext","isZeroAuth","hasOwnProperty","call","value","defaultLabel","get","payAmountLabel","secondaryLabel","Object","keys","length","secondaryAmountLabel","h","Button","disabled","status","SecondaryButtonLabel","Iframe","Component","iframeOnLoad","this","props","callback","iframeEl","contentWindow","componentDidMount","addEventListener","bind","attachEvent","onload","componentWillUnmount","removeEventListener","detachEvent","render","name","src","width","height","minWidth","minHeight","allow","title","classNameModifiers","validClassNameModifiers","filter","m","h","iframe","ref","className","classNames","length","map","frameBorder","referrerpolicy","min-width","min-height","super","args","_define_property","defaultProps","TxVariants","a","BaseElement","buildElementProps","componentProps","this","props","formatProps","constructor","formatData","setUpAnalytics","setUpAnalyticsObj","submitAnalytics","analyticsObj","handleKeyPress","e","setState","newState","state","data","clientData","getProp","checkoutAttemptId","NO_CHECKOUT_ATTEMPT_ID","order","componentData","paymentMethod","riskData","orderData","pspReference","clientStateDataIndicator","activate","render","Error","mount","domNode","node","document","querySelector","setupAnalytics","_node","unmount","on","_component","modules","analytics","containerWidth","offsetWidth","component","isDropin","flavor","then","event","AnalyticsInfoEvent","type","ANALYTICS_RENDERED_STR","update","off","remove","core","checkout","_define_property","_id","uuid","initialize","createFromAction","AdyenCheckoutError","bind","defaultProps","ALLOWED_PROPERTIES","sanitizeResponse","response","removedProperties","sanitizedObject","Object","keys","reduce","acc","cur","includes","push","length","console","warn","join","cleanupFinalResult","paymentResponse","order","action","donationToken","verifyPaymentDidNotFail","resultCode","Promise","reject","resolve","assertIsDropin","element","activePaymentMethod","closeActivePaymentMethod","getRegulatoryDefaults","countryCode","isDropin","openFirstPaymentMethod","openFirstStoredPaymentMethod","CancelError","Error","constructor","message","super","AnalyticsLogEvent","AnalyticsEvent","getEventCategory","ANALYTICS_EVENT","log","constructor","analyticsObject","super","_define_property","type","message","this","subType","result","target","component","AnalyticsErrorEvent","AnalyticsEvent","getEventCategory","ANALYTICS_EVENT","error","constructor","analyticsObject","super","_define_property","code","errorType","message","this","component","UIElement","BaseElement","buildElementProps","componentProps","finalProps","showPayButton","this","core","getCorePropsForComponent","isStoredPaymentMethod","getPaymentMethodFromPaymentMethodsResponse","type","isDropin","assertIsDropin","props","formatProps","constructor","getRegulatoryDefaults","options","countryCode","paymentMethodsResponse","find","storeElementRefOnCore","storeElementReference","isAvailable","Promise","resolve","setState","newState","state","onChange","showValidation","componentRef","status","elementRef","setStatus","data","isValid","errors","valid","setUpAnalytics","setUpAnalyticsObj","sessionId","session","id","modules","analytics","setUp","submitAnalytics","analyticsObj","component","getComponent","sendAnalytics","error","console","warn","submit","makePaymentsCall","then","sanitizeResponse","verifyPaymentDidNotFail","handleResponse","catch","e","CancelError","setElementStatus","handleFailedResult","onSubmit","submitUsingAdvancedFlow","beforeSubmit","reject","submitUsingSessionsFlow","handleError","AdyenCheckoutError","event","AnalyticsLogEvent","ANALYTICS_SUBMIT_STR","message","submitPayment","cause","onComplete","handleAdditionalDetails","makeAdditionalDetailsCall","onAdditionalDetails","submitAdditionalDetailsUsingSessionsFlow","submitDetails","handleAction","action","hasOwnProperty","Error","paymentAction","createFromAction","unmount","mount","_node","onActionHandled","actionHandledObj","originalAction","response","order","remainingAmount","value","handleOrder","handleSuccessResult","handleKeyPress","key","code","preventDefault","onEnterKeyPressed","document","activeElement","blur","update","icon","paymentMethodType","resources","getImage","displayName","paymentMethodFromResponse","paymentMethods","pm","name","accessibleName","additionalInfo","amount","onPaymentMethodsRequest","orderData","pspReference","locale","checkout","super","_define_property","NETWORK_ERROR","AnalyticsErrorEvent","errorType","ANALYTICS_ERROR_TYPE","apiError","onError","handleAdvanceFlowPaymentMethodsUpdate","onOrderUpdated","result","displayFinalAnimation","cleanupFinalResult","onPaymentFailed","onPaymentCompleted","setComponentRef","ref","payButton","h","PayButton","secondaryAmount","onClick","register","bind","undefined","txVariants","CustomCardInput","props","sfp","useRef","errors","setErrors","useState","valid","setValid","data","setData","isSfpValid","setIsSfpValid","issuingCountryCode","setIssuingCountryCode","dualBrandSelectElements","setDualBrandSelectElements","selectedBrandValue","setSelectedBrandValue","extensions","useMemo","SFExtensions","this","processBinLookupResponse","binLookupResponse","isReset","processBinLookup","dualBrandingChangeHandler","handleDualBrandSelection","useEffect","setFocusOn","current","updateStyles","showValidation","handleUnsupportedCard","destroy","sfStateErrorsObj","mapErrorsToValidationRuleResult","mappedErrors","onChange","isValid","Object","keys","length","validationErrors","entries","map","fieldType","error","rootNode","onValidationError","h","SecuredFieldsProvider","ref","extractPropsForSFP","type","brand","sfState","render","defaultProps","onError","autoFocus","brands","brandsConfiguration","clientKey","forceCompat","i18n","implementationType","keypadFix","legacyInputMode","loadingContext","minimumExpiryDate","onAdditionalSFConfig","onAdditionalSFRemoved","onAllValid","onAutoComplete","onBinValue","onBrand","onConfigSuccess","handleKeyPress","onFieldValid","onFocus","onLoad","showWarnings","styles","trimTrailingSeparator","resources","maskSecurityCode","placeholders","CustomCard","UIElement","formatProps","props","type","TxVariants","customCard","formatData","sfBrand","this","state","selectedBrandValue","paymentMethod","data","brand","browserInfo","origin","window","location","updateStyles","stylesObj","componentRef","setFocusOn","frame","processBinLookupResponse","binLookupResponse","dualBrandingChangeHandler","e","handleUnsupportedCard","errObj","onBinLookup","obj","nuObj","rootNode","_node","isReset","supportedBrandsRaw","map","item","brandImageUrl","brandsConfiguration","icon","getCardImageUrl","resources","isValid","collectBrowserInfo","render","h","CoreProvider","i18n","loadingContext","CustomCardInput","ref","handleKeyPress","onChange","setState","onBinValue","implementationType","onFocus","super","args","_define_property","card","triggerBinLookUp","event","AnalyticsInfoEvent","focus","ANALYTICS_FOCUS_STR","ANALYTICS_UNFOCUS_STR","target","fieldTypeToSnakeCase","fieldType","submitAnalytics","onEnterKeyPressed","activeElement","component","analyticsType","defaultProps","ThreeDS2Form","Component","componentDidMount","this","formEl","submit","props","onFormSubmit","inputName","render","name","action","target","inputValue","h","form","ref","method","className","classNames","style","display","input","value","t","super","args","getProcessMessageHandler","domain","resolve","reject","expectedType","event","parseErrorObj","origin","originalEvent","data","length","feedbackObj","JSON","parse","hasOwnProperty","type","e","comment","extraInfo","eventDataRaw","console","debug","getOrigin","url","matches","exec","protocol","separator","host","port","NOT_BASE64_ERROR","BASE64_MALFORMED_URI_ERROR","base64","decode","pData","isBase64","success","error","data","str","decodeURIComponent","Array","prototype","map","call","window","atob","c","charCodeAt","toString","slice","join","e","encode","btoa","pDataStr","length","isErrorObject","obj","success","decodeAndParseToken","token","decodedToken","base64","decode","JSON","parse","data","e","error","encodeObject","Object","keys","length","Error","encode","stringify","validateChallengeWindowSize","sizeStr","sizeString","prototype","hasOwnProperty","call","CHALLENGE_WINDOW_SIZES","DEFAULT_CHALLENGE_WINDOW_SIZE","getChallengeWindowSize","prepareChallengeData","size","decodedChallengeToken","acsTransID","acsURL","messageVersion","threeDSNotificationURL","threeDSServerTransID","notificationURLOrigin","getOrigin","cReqData","messageType","challengeWindowSize","iframeSizeArr","postMessageDomain","prepareFingerPrintData","notificationURL","decodedFingerPrintToken","threeDSMethodNotificationURL","threeDSMethodUrl","threeDSMethodURL","receivedNotificationURL","createFingerprintResolveData","dataKey","resultObj","paymentData","threeDSCompInd","createOldFingerprintResolveData","details","createChallengeResolveData","transStatus","authorisationToken","createOldChallengeResolveData","encodeBase64URL","dataStr","base64url","window","btoa","split","replace","fingerprintFlowPropsDropin","fingerprintFlowProps","get3DS2FlowProps","actionSubtype","props","fingerprintProps","elementRef","rtnObj","pick","from","showSpinner","isDropin","statusType","i18n","promiseTimeout","ms","promise","timeOutObject","timer","Promise","resolve","reject","setTimeout","then","res","clearTimeout","catch","err","cancel","iframeName","DoChallenge3DS2","Component","get3DS2ChallengePromise","Promise","resolve","reject","this","processMessageHandler","getProcessMessageHandler","props","postMessageDomain","window","addEventListener","componentDidMount","challengePromise","promiseTimeout","CHALLENGE_TIMEOUT","CHALLENGE_TIMEOUT_REJECT_OBJECT","promise","then","resolveObject","removeEventListener","onCompleteChallenge","catch","rejectObject","onErrorChallenge","componentWillUnmount","cancel","render","acsURL","cReqData","iframeSizeArr","onFormSubmit","base64URLencodedData","status","width","height","h","div","className","classNames","challengeWindowSize","Spinner","Iframe","name","callback","iframeCallback","ThreeDS2Form","action","target","inputName","inputValue","constructor","super","_define_property","setState","state","onActionHandled","componentType","actionDescription","THREEDS2_NUM","jsonStr","JSON","stringify","encodeBase64URL","PrepareChallenge3DS2","Component","componentDidMount","isErrorObject","this","state","challengeData","errorMsg","error","errorCode","indexOf","MISSING_TOKEN_IN_ACTION_MSG","Analytics3DS2Errors","ACTION_IS_MISSING_TOKEN","TOKEN_DECODE_OR_PARSING_FAILED","setError","errorInfo","props","i18n","get","event","AnalyticsErrorEvent","code","errorType","ANALYTICS_ERROR_TYPE","apiError","message","THREEDS2_CHALLENGE_ERROR","onSubmitAnalytics","console","debug","shouldAllowHttpDomains","environment","_environmentUrls","api","includes","acsURL","isValidHttpUrl","TOKEN_IS_MISSING_ACSURL","acsTransID","messageVersion","threeDSServerTransID","cReqData","TOKEN_IS_MISSING_OTHER_PROPS","setState","status","setStatusComplete","resultObj","errorCodeObject","data","isMDFlow","createOldChallengeResolveData","createChallengeResolveData","dataKey","transStatus","paymentData","finalResObject","errorTypeAndCode","THREEDS2_TIMEOUT","NO_TRANSSTATUS","network","result","AnalyticsLogEvent","type","THREEDS2_FULL","THREEDS2_NUM","subType","Analytics3DS2Events","CHALLENGE_COMPLETED","onComplete","errorInfoObj","isFatal","onError","AdyenCheckoutError","ERROR","cause","errorObj","render","_","getImage","useImage","h","DoChallenge3DS2","onCompleteChallenge","challenge","hasOwnProperty","length","errorDescription","values","CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP","onErrorChallenge","timeoutObject","THREEDS2_CHALLENGE","onActionHandled","onFormSubmit","div","className","Img","src","imageFolder","alt","constructor","super","_define_property","msg","CHALLENGE_DATA_SENT","token","prepareChallengeData","size","challengeWindowSize","success","defaultProps","ThreeDS2Challenge","UIElement","onComplete","state","super","this","unmount","render","existy","props","paymentData","dataTypeForError","hasOwnProperty","onError","AdyenCheckoutError","API_ERROR","event","AnalyticsErrorEvent","code","Analytics3DS2Errors","ACTION_IS_MISSING_PAYMENT_DATA","errorType","ANALYTICS_ERROR_TYPE","apiError","message","THREEDS2_CHALLENGE_ERROR","submitAnalytics","h","CoreProvider","i18n","loadingContext","resources","PrepareChallenge","onSubmitAnalytics","isMDFlow","length","onActionHandled","t","args","_define_property","aObj","AnalyticsInfoEvent","type","ANALYTICS_RENDERED_STR","rtnObj","AnalyticsLogEvent","THREEDS2_FULL","actionDescription","subType","Analytics3DS2Events","CHALLENGE_IFRAME_LOADED","TxVariants","threeDS2Challenge","defaultProps","dataKey","size","DEFAULT_CHALLENGE_WINDOW_SIZE","THREEDS2_CHALLENGE","iframeName","DoFingerprint3DS2","Component","get3DS2MethodPromise","Promise","resolve","reject","this","processMessageHandler","getProcessMessageHandler","props","postMessageDomain","window","addEventListener","componentDidMount","fingerPrintPromise","promiseTimeout","THREEDS_METHOD_TIMEOUT","FAILED_METHOD_STATUS_RESOLVE_OBJECT_TIMEOUT","promise","then","resolveObject","removeEventListener","onCompleteFingerprint","catch","rejectObject","onErrorFingerprint","componentWillUnmount","cancel","render","threeDSMethodURL","onActionHandled","onFormSubmit","base64URLencodedData","h","div","className","showSpinner","Spinner","style","display","Iframe","name","callback","componentType","actionDescription","THREEDS2_NUM","ThreeDS2Form","action","target","inputName","inputValue","constructor","super","_define_property","threeDSServerTransID","threeDSMethodNotificationURL","jsonStr","JSON","stringify","encodeBase64URL","state","defaultProps","PrepareFingerprint3DS2","Component","componentDidMount","isErrorObject","this","state","fingerPrintData","errorMsg","error","errorCode","indexOf","MISSING_TOKEN_IN_ACTION_MSG","Analytics3DS2Errors","ACTION_IS_MISSING_TOKEN","TOKEN_DECODE_OR_PARSING_FAILED","setStatusComplete","threeDSCompInd","message","THREEDS2_FINGERPRINT_ERROR","console","debug","shouldAllowHttpDomains","props","environment","_environmentUrls","api","includes","threeDSMethodURL","threeDSMethodNotificationURL","postMessageDomain","threeDSServerTransID","isValidHttpUrl","TOKEN_IS_MISSING_THREEDSMETHODURL","hasValid3DSMethodNotificationURL","hasValidPostMessageDomain","hasTransServerID","length","TOKEN_IS_MISSING_OTHER_PROPS","setState","status","resultObj","errorCodeObject","data","isMDFlow","createOldFingerprintResolveData","createFingerprintResolveData","dataKey","paymentData","event","finalResObject","errorTypeAndCode","code","TIMEOUT","THREEDS2_TIMEOUT","errorType","ANALYTICS_ERROR_TYPE","network","apiError","AnalyticsErrorEvent","onSubmitAnalytics","result","AnalyticsLogEvent","type","THREEDS2_FULL","THREEDS2_NUM","subType","Analytics3DS2Events","FINGERPRINT_COMPLETED","onComplete","render","showSpinner","h","DoFingerprint3DS2","onCompleteFingerprint","fingerprint","onErrorFingerprint","timeoutObject","THREEDS2_FINGERPRINT","onActionHandled","onFormSubmit","constructor","super","_define_property","msg","FINGERPRINT_DATA_SENT","token","notificationURL","prepareFingerPrintData","success","defaultProps","onError","API_VERSION","API_ERROR_CODE","makePayments","submitPaymentDetails","submitThreeDS2Fingerprint","createOrder","callSubmit3DS2Fingerprint","data","httpPost","path","this","props","clientKey","loadingContext","errorLevel","errorCode","API_ERROR_CODE","submitThreeDS2Fingerprint","then","resData","event","type","details","onComplete","console","debug","AnalyticsErrorEvent","code","Analytics3DS2Errors","NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED","errorType","ANALYTICS_ERROR_TYPE","apiError","message","THREEDS2_FINGERPRINT_SUBMIT","submitAnalytics","action","NO_ACTION_FOR_CHALLENGE","actionHandler","elementRef","handleAction","pick","from","NO_COMPONENT_FOR_ACTION","sdkError","catch","error","handleError","ThreeDS2DeviceFingerprint","UIElement","onComplete","state","super","this","unmount","render","existy","props","paymentData","onError","AdyenCheckoutError","API_ERROR","event","AnalyticsErrorEvent","code","Analytics3DS2Errors","ACTION_IS_MISSING_PAYMENT_DATA","errorType","ANALYTICS_ERROR_TYPE","apiError","message","THREEDS2_FINGERPRINT_ERROR","submitAnalytics","h","PrepareFingerprint","isMDFlow","callSubmit3DS2Fingerprint","onSubmitAnalytics","length","onActionHandled","t","args","_define_property","bind","aObj","AnalyticsInfoEvent","type","ANALYTICS_RENDERED_STR","rtnObj","AnalyticsLogEvent","THREEDS2_FULL","actionDescription","subType","Analytics3DS2Events","FINGERPRINT_IFRAME_LOADED","TxVariants","threeDS2Fingerprint","defaultProps","dataKey","THREEDS2_FINGERPRINT","RedirectButton","label","icon","payButton","onSubmit","amount","name","showPayButton","props","i18n","useCoreContext","status","setStatus","useState","this","newStatus","h","Fragment","classNameModifiers","hasOwnProperty","call","value","get","onClick","CURRENCY_DECIMALS","IDR","JPY","KRW","VND","BYR","CVE","DJF","GHC","GNF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","MRO","BHD","IQD","JOD","KWD","OMR","LYD","TND","currencyMinorUnitsConfig","RSD","minimumFractionDigits","AFN","ALL","IRR","LAK","LBP","MMK","SOS","SYP","YER","IQD","getDivider","currencyCode","CURRENCY_DECIMALS","getDecimalAmount","amount","divider","parseInt","String","getLocalisedAmount","locale","options","stringAmount","toString","decimalAmount","formattedLocale","replace","localeOptions","style","currency","currencyDisplay","currencyMinorUnitsConfig","toLocaleString","e","ApplePayButton","buttonStyle","buttonType","buttonLocale","onClick","h","apple-pay-button","data-testid","buttonstyle","type","locale","onclick","ApplePayService","begin","this","session","onvalidatemerchant","event","onValidateMerchant","Promise","resolve","reject","validationURL","then","response","completeMerchantValidation","catch","error","console","abort","options","onError","onpaymentauthorized","onPaymentAuthorized","result","completePayment","onpaymentmethodselected","onPaymentMethodSelected","paymentMethodUpdate","completePaymentMethodSelection","onshippingcontactselected","onShippingContactSelected","shippingContactUpdate","completeShippingContactSelection","onshippingmethodselected","onShippingMethodSelected","shippingMethodUpdate","completeShippingMethodSelection","oncancel","onCancel","constructor","paymentRequest","_define_property","ApplePaySession","version","defaultProps","isExpress","amount","currency","value","totalPriceStatus","initiative","merchantCapabilities","supportedNetworks","buttonType","buttonColor","onClick","resolve","preparePaymentRequest","paymentRequest","countryCode","companyName","amount","props","formattedAmount","String","getDecimalAmount","value","currency","console","warn","currencyCode","total","label","totalPriceLabel","type","totalPriceStatus","lineItems","shippingContactEditingMode","shippingMethods","shippingType","recurringPaymentRequest","merchantCapabilities","supportedCountries","supportedNetworks","requiredShippingContactFields","requiredBillingContactFields","billingContact","shippingContact","applicationData","resolveSupportedVersion","latestVersion","v","ApplePaySession","supportsVersion","error","console","warn","formatApplePayContactToAdyenAddressFormat","paymentContact","isDeliveryAddress","city","locality","country","countryCode","houseNumberOrName","postalCode","street","addressLines","join","trim","administrativeArea","stateOrProvince","firstName","givenName","lastName","familyName","mapBrands","brands","brandMapping","mc","amex","visa","elodebit","elo","interac","discover","jcb","electron","maestro","girocard","cartebancaire","eftpos_australia","reduce","accumulator","item","includes","push","APPLE_PAY_SDK_URL","ApplePaySdkLoader","load","scriptElement","Script","crossOrigin","this","sdkLoadingPromise","window","ApplePaySession","error","AdyenCheckoutError","cause","isSdkLoaded","Promise","reject","o","s","e","detectInIframe","window","self","top","e","ApplePayElement","UIElement","formatProps","props","supportedNetworks","brands","length","mapBrands","configuration","buttonLocale","i18n","locale","totalPriceLabel","merchantName","renderApplePayCodeAs","detectInIframe","formatData","applePayToken","billingAddress","deliveryAddress","this","state","isExpress","paymentMethod","type","subtype","submitAnalytics","analyticsObj","AnalyticsInfoEvent","ANALYTICS_RENDERED_STR","expressPage","hasExpressPage","ANALYTICS_EXPRESS_PAGES_ARRAY","includes","super","isValid","merchantIdentifier","identifier","merchantId","sdkLoader","isSdkLoaded","ApplePaySession","applePayCapabilities","error","AdyenCheckoutError","cause","isAvailable","window","location","protocol","Promise","reject","canMakePayments","resolve","defineApplePayVersionNumber","applePayVersionNumber","version","resolveSupportedVersion","configureApplePayWebOptions","ApplePayWebOptions","onApplePayCodeClose","set","startSession","onValidateMerchant","onPaymentMethodSelected","onShippingMethodSelected","onShippingContactSelected","paymentRequest","preparePaymentRequest","companyName","countryCode","core","options","session","ApplePayService","onError","handleError","onCancel","event","validateMerchant","onPaymentAuthorized","formatApplePayContactToAdyenAddressFormat","payment","billingContact","shippingContact","setState","btoa","JSON","stringify","token","paymentData","authorizedEvent","handleAuthorization","then","makePaymentsCall","sanitizeResponse","verifyPaymentDidNotFail","collectOrderTrackingDetailsIfNeeded","paymentResponse","orderDetails","status","STATUS_SUCCESS","handleResponse","catch","errors","applePayError","STATUS_FAILURE","Array","isArray","undefined","responseWithError","handleFailedResult","onClick","begin","onAuthorized","data","onOrderTrackingRequest","hostname","domainName","clientKey","loadingContext","initiative","path","request","displayName","response","httpPost","decodedData","base64","decode","success","parse","e","render","showPayButton","h","ApplePayButton","buttonStyle","buttonColor","buttonType","submit","constructor","checkout","_define_property","isInstantPayment","ANALYTICS_SELECTED_STR","target","ANALYTICS_INSTANT_PAYMENT_BUTTON","bind","ApplePaySdkLoader","load","TxVariants","applepay","defaultProps","config","API_VERSION","API_VERSION_MINOR","GATEWAY","URL","isReadyToPayRequest","allowedAuthMethods","allowedCardNetworks","existingPaymentMethodRequired","apiVersion","config","API_VERSION","apiVersionMinor","API_VERSION_MINOR","allowedPaymentMethods","type","parameters","tokenizationSpecification","getTransactionInfo","amount","countryCode","totalPriceStatus","props","formattedPrice","String","getDecimalAmount","value","currency","currencyCode","totalPrice","transactionInfo","initiatePaymentRequest","configuration","merchantInfo","merchantId","merchantName","merchantOrigin","authJwt","gateway","GATEWAY","gatewayMerchantId","assuranceDetailsRequired","allowPrepaidCards","allowCreditCards","billingAddressRequired","billingAddressParameters","emailRequired","shippingAddressRequired","shippingAddressParameters","shippingOptionRequired","shippingOptionParameters","callbackIntents","resolveEnvironment","env","toLowerCase","formatGooglePayContactToAdyenAddressFormat","paymentContact","isDeliveryAddress","postalCode","country","countryCode","street","address1","address2","address3","join","trim","houseNumberOrName","city","locality","administrativeArea","stateOrProvince","firstName","name","supportedLocales","getGooglePayLocale","locale","twoLetterLocale","substring","includes","GooglePayService","paymentOptions","window","google","payments","URL","Script","config","load","api","PaymentsClient","isReadyToPay","props","this","paymentsClient","then","client","isReadyToPayRequest","Promise","reject","Error","prefetchPaymentData","countryCode","paymentDataRequest","initiatePaymentRequest","initiatePayment","loadPaymentData","constructor","environment","paymentDataCallbacks","i","googlePayEnvironment","resolveEnvironment","getGooglePaymentsClient","GooglePayButton","props","googlePayWrapperRef","useRef","undefined","useEffect","onClick","buttonRadius","buttonColor","buttonType","buttonLocale","buttonSizeMode","buttonRootNode","paymentsClient","then","client","createButton","googlePayButton","current","appendChild","h","div","data-testid","className","ref","defaultProps","isExpress","existingPaymentMethodRequired","buttonColor","buttonType","buttonSizeMode","configuration","gatewayMerchantId","merchantId","merchantName","amount","value","currency","totalPriceStatus","onClick","resolve","allowedAuthMethods","allowedCardNetworks","allowCreditCards","allowPrepaidCards","billingAddressRequired","billingAddressParameters","assuranceDetailsRequired","emailRequired","shippingAddressRequired","shippingAddressParameters","shippingOptionRequired","shippingOptionParameters","callbackIntents","GooglePay","UIElement","getPaymentMethodFromPaymentMethodsResponse","type","this","core","paymentMethodsResponse","find","constructor","TxVariants","paywithgoogle","formatProps","props","buttonSizeMode","isDropin","buttonLocale","getGooglePayLocale","i18n","locale","callbackIntents","configuration","formatData","googlePayCardNetwork","googlePayToken","billingAddress","deliveryAddress","state","isExpress","paymentMethod","subtype","browserInfo","origin","window","location","submitAnalytics","analyticsObj","AnalyticsInfoEvent","ANALYTICS_RENDERED_STR","expressPage","hasExpressPage","ANALYTICS_EXPRESS_PAGES_ARRAY","includes","super","showGooglePayPaymentSheet","googlePay","initiatePayment","options","countryCode","catch","error","handleError","AdyenCheckoutError","statusCode","toString","cause","handleAuthorization","Promise","resolve","reject","onAuthorized","authorizedEvent","data","googlePayError","isValid","isAvailable","isReadyToPay","then","response","result","paymentMethodPresent","collectBrowserInfo","icon","resources","getImage","render","showPayButton","h","GooglePayButton","buttonColor","buttonType","buttonRootNode","buttonRadius","paymentsClient","onClick","submit","checkout","_define_property","isInstantPayment","event","ANALYTICS_SELECTED_STR","target","ANALYTICS_INSTANT_PAYMENT_BUTTON","onPaymentAuthorized","async","paymentData","formatGooglePayContactToAdyenAddressFormat","paymentMethodData","info","shippingAddress","setState","tokenizationData","token","cardNetwork","makePaymentsCall","sanitizeResponse","verifyPaymentDidNotFail","paymentResponse","transactionState","handleResponse","setElementStatus","fallbackMessage","get","intent","reason","message","responseWithError","handleFailedResult","prefetch","prefetchPaymentData","bind","paymentDataCallbacks","onPaymentDataChanged","merchantId","GooglePayService","environment","googlepay","txVariants","defaultProps","detectInIframeInSameOrigin","window","parent","location","href","e","RedirectShopper","Component","componentDidMount","Promise","resolve","reject","this","props","beforeRedirect","url","method","data","then","onActionHandled","componentType","paymentMethodType","actionDescription","postForm","submit","redirectFromTopWhenInIframe","detectInIframeInSameOrigin","window","top","location","assign","catch","onRedirectError","render","h","form","data-testid","action","style","display","ref","target","Object","keys","map","key","input","type","name","value","super","args","_define_property","defaultProps","RedirectElement","UIElement","formatData","paymentMethod","type","this","browserInfo","isValid","collectBrowserInfo","render","props","url","method","h","RedirectShopper","onActionHandled","onRedirectError","handleRedirectError","showPayButton","CoreProvider","i18n","loadingContext","resources","RedirectButton","name","displayName","onSubmit","submit","payButton","ref","componentRef","t","super","args","_define_property","event","AnalyticsErrorEvent","component","paymentMethodType","errorType","ANALYTICS_ERROR_TYPE","redirect","code","ANALYTICS_ERROR_CODE","submitAnalytics","TxVariants","defaultProps","API_ENVIRONMENTS","test","live","fallback","CDN_ENVIRONMENTS","ANALYTICS_ENVIRONMENTS","getUrlFromMap","env","environmentMap","environmentUrl","toLowerCase","fallback","resolveEnvironments","environment","environmentsUrls","apiUrl","API_ENVIRONMENTS","api","analyticsUrl","ANALYTICS_ENVIRONMENTS","analytics","cdnImagesUrl","CDN_ENVIRONMENTS","cdn","images","cdnTranslationsUrl","translations","processGlobalOptions","globalOptions","Object","keys","reduce","r","e","GENERIC_OPTIONS","includes","assertConfigurationPropertiesAreValid","propsSetByMerchant","possibleFields","array","forEach","prop","console","warn","Language","key","options","translation","getTranslation","this","translations","amount","currencyCode","getLocalisedAmount","locale","date","dateOptions","year","month","day","Date","toLocaleDateString","dateTime","timeAndDateFormatter","format","constructor","props","_define_property","languageCode","customTranslations","timeFormatOptions","hour","minute","timeAndDateFormatOptions","AdyenCheckoutError","split","Intl","DateTimeFormat","RISK_DATA_VERSION","DF_VERSION","DEVICE_FINGERPRINT","FAILED_DFP_RESOLVE_OBJECT_TIMEOUT","result","type","DEVICE_FINGERPRINT","value","errorCode","ERRORS","UNKNOWN","ERROR_MESSAGES","timeout","wrongOrigin","wrongDataType","missingProperty","unknownError","GetDeviceFingerprint","Component","getDfpPromise","Promise","resolve","reject","this","processMessageHandler","getProcessMessageHandler","postMessageDomain","DEVICE_FINGERPRINT","window","addEventListener","componentDidMount","deviceFingerPrintPromise","promiseTimeout","DF_TIMEOUT","FAILED_DFP_RESOLVE_OBJECT_TIMEOUT","promise","then","resolveObject","props","onCompleteFingerprint","removeEventListener","catch","rejectObject","onErrorFingerprint","render","dfpURL","h","div","className","Iframe","name","src","allow","title","constructor","super","_define_property","getOrigin","loadingContext","handleErrorCode","errorCode","message","ERROR_MESSAGES","ERRORS","UNKNOWN","type","DEVICE_FINGERPRINT","DeviceFingerprint","Component","setStatusComplete","fingerprintResult","this","setState","status","props","onComplete","render","loadingContext","dfpURL","state","h","div","className","style","position","width","height","GetDeviceFingerprint","onCompleteFingerprint","onErrorFingerprint","fingerprintError","onError","handleErrorCode","errorCode","result","constructor","super","clientKey","DF_VERSION","n","p","a","defaultProps","RiskElement","BaseElement","formatProps","props","risk","defaultProps","isValid","this","state","data","dataObj","version","RISK_DATA_VERSION","base64","encode","JSON","stringify","enabled","componentWillUnmount","cleanUp","render","h","DeviceFingerprint","loadingContext","onComplete","onError","constructor","checkout","super","_define_property","nodeRiskContainer","result","type","value","persistentCookie","components","setState","error","parentNode","removeChild","riskElements","DEVICE_FINGERPRINT","document","querySelector","node","createElement","appendChild","mount","message","filterAllowedPaymentMethods","pm","this","length","indexOf","type","filterRemovedPaymentMethods","filterEcomStoredPaymentMethods","supportedShopperInteractions","includes","supportedStoredPaymentMethods","filterSupportedStoredPaymentMethods","processStoredPaymentMethod","pm","storedPaymentMethodId","id","isStoredPaymentMethod","processPaymentMethods","paymentMethods","allowPaymentMethods","removePaymentMethods","filter","filterAllowedPaymentMethods","filterRemovedPaymentMethods","processStoredPaymentMethods","storedPaymentMethods","filterSupportedStoredPaymentMethods","filterEcomStoredPaymentMethods","map","checkPaymentMethodsResponse","paymentMethodsResponse","Error","Array","length","console","warn","PaymentMethods","mapCreatedComponentType","pmType","has","paymentMethod","Boolean","this","paymentMethods","find","pm","type","constructor","response","options","_define_property","storedPaymentMethods","checkPaymentMethodsResponse","processPaymentMethods","processStoredPaymentMethods","createComponent","core","registry","componentType","props","Element","getComponent","Error","id","uuid","getActionHandler","statusType","action","config","onComplete","onAdditionalDetails","onError","originalAction","paymentMethodType","actionTypes","redirect","threeDS2","subtype","paymentData","isMDFlow","authorisationToken","token","onActionHandled","isDropin","loadingContext","clientKey","challengeWindowSize","modules","analytics","resources","get3DS2FlowProps","voucher","qrCode","await","bankTransfer","sdk","getComponentForAction","core","registry","action","props","nextAction","actionTypes","type","Error","NonPersistentStorage","length","Object","keys","this","storage","key","index","getItem","keyName","setItem","keyValue","removeItem","clear","constructor","_define_property","Storage","get","JSON","parse","err","set","value","stringify","remove","keyByIndex","storageType","prefix","window","localStorage","Error","e","FAILURE_MSG","collectId","analyticsContext","clientKey","locale","analyticsPath","bundleType","promise","options","errorLevel","loadingContext","path","event","telemetryEvent","version","channel","platform","buildType","referrer","window","location","href","screenWidth","screen","width","Promise","reject","storage","Storage","checkoutAttemptIdSession","get","id","fifteenMinAgoTimestamp","Date","now","timestamp","resolve","httpPost","then","conversion","checkoutAttemptId","set","undefined","catch","EventsQueue","analyticsContext","clientKey","analyticsPath","caActions","channel","platform","info","errors","logs","add","type","actionObj","push","run","checkoutAttemptId","promise","length","httpPost","errorLevel","loadingContext","path","then","undefined","catch","console","debug","Promise","resolve","getQueue","capturedCheckoutAttemptId","sendEventsTimerId","Analytics","locale","clientKey","analytics","amount","analyticsContext","bundleType","props","enabled","checkoutAttemptId","analyticsData","collectId","CollectId","analyticsPath","ANALYTICS_PATH","eventsQueue","EventsQueue","sendAnalyticsEvents","run","Promise","resolve","setUp","async","initialEvent","payload","level","ANALYTIC_LEVEL","all","initial","processAnalyticsData","Object","keys","length","e","console","warn","getCheckoutAttemptId","getEventsQueue","getEnabled","sendAnalytics","analyticsObj","eventCat","obj","arrayName","ANALYTICS_EVENT","info","add","clearTimeout","setTimeout","ANALYTICS_INFO_TIMER_INTERVAL","log","error","debounce","getEventCategory","makePayment","paymentRequest","session","path","API_VERSION","id","clientKey","data","sessionData","httpPost","loadingContext","errorLevel","errorCode","API_ERROR_CODE","makePayments","submitDetails","details","session","path","API_VERSION","id","clientKey","data","sessionData","httpPost","loadingContext","errorLevel","errorCode","API_ERROR_CODE","submitPaymentDetails","setupSession","session","options","path","API_VERSION","id","clientKey","data","browserInfo","sessionData","order","orderData","pspReference","httpPost","loadingContext","errorLevel","checkBalance","paymentRequest","session","path","API_VERSION","id","clientKey","data","sessionData","httpPost","loadingContext","errorLevel","createOrder","session","path","API_VERSION","id","clientKey","data","sessionData","httpPost","loadingContext","errorLevel","errorCode","API_ERROR_CODE","sanitizeSession","session","id","AdyenCheckoutError","shopperLocale","shopperEmail","telephoneNumber","sessionData","cancelOrder","order","session","path","API_VERSION","id","clientKey","data","sessionData","httpPost","loadingContext","errorLevel","Session","shopperLocale","this","session","id","data","sessionData","updateSessionData","latestData","storeSession","setupSession","options","mergedOptions","browserInfo","collectBrowserInfo","then","response","configuration","submitPayment","makePayment","submitDetails","checkBalance","createOrder","cancelOrder","order","getStoredSession","storedSession","storage","get","set","removeStoredSession","remove","constructor","rawSession","clientKey","loadingContext","_define_property","sanitizeSession","Error","Storage","Resources","getImage","props","this","getImageUrl","resourceContext","constructor","cdnContext","_define_property","returnImage","name","imageFolder","parentFolder","extension","size","subFolder","options","imageOptions","AdyenCheckoutError","SRMessages","setComponentRef","messagesRef","useRef","Object","keys","current","length","messages","setMessages","useState","msgs","h","Fragment","map","msg","div","key","className","SRPanel","BaseElement","enabled","this","_enabled","moveFocus","_moveFocus","setAriaProps","ariaAttributes","firstPanel","document","querySelector","key","value","Object","entries","setAttribute","props","render","h","div","className","showPanel","role","SRMessages","setComponentRef","constructor","checkout","super","_define_property","srPanelContainer","id","componentRef","ref","setMessages","messages","panelMessages","Array","isArray","panelParent","node","Error","preExistingSRPanel","getElementById","removeChild","createElement","appendChild","mount","type","defaultProps","defaultComponents","TxVariants","redirect","Redirect","threeDS2Challenge","ThreeDS2Challenge","threeDS2DeviceFingerprint","ThreeDS2DeviceFingerprint","registry","add","items","this","componentsMap","createComponentsMap","getComponent","type","supportedTxVariants","has","components","reduce","memo","component","Class","txVariants","filter","txVariant","forEach","console","error","_define_property","Set","Object","values","DEFAULT_LOCALE","async","getTranslations","cdnTranslationsUrl","adyenWebVersion","locale","httpGet","loadingContext","errorLevel","errorMessage","path","error","defaultProps","exposeLibraryMetadata","showPayButton","Core","type","metadata","bundleType","items","registry","add","getComponent","txVariant","initialize","this","initializeCore","validateCoreConfiguration","createCoreModules","session","setupSession","options","then","sessionResponse","amount","shopperLocale","countryCode","paymentMethods","rest","setOptions","order","remainingAmount","locale","createPaymentMethodsList","catch","error","onError","Promise","reject","resolve","fetchLocaleTranslations","getTranslations","cdnTranslationsUrl","version","AdyenCheckoutError","cause","paymentMethodsConfiguration","console","warn","IMPLEMENTATION_ERROR","DEFAULT_LOCALE","formatLocale","translations","formatCustomTranslations","submitDetails","details","promise","onAdditionalDetails","data","sanitizeResponse","verifyPaymentDidNotFail","afterAdditionalDetails","response","cleanupFinalResult","onPaymentCompleted","e","CancelError","onPaymentFailed","action","hasOwnProperty","Error","component","THREEDS2_FULL","subtype","paymentMethodType","event","AnalyticsLogEvent","ANALYTICS_ACTION_STR","subType","message","modules","analytics","sendAnalytics","props","getCorePropsForComponent","getComponentForAction","handleCreateError","processGlobalOptions","core","i18n","loadingContext","cdnContext","cdnImagesUrl","createFromAction","storeElementReference","element","components","push","paymentMethod","errorMessage","name","JSON","stringify","paymentMethodsResponse","PaymentMethods","Object","freeze","risk","RiskModule","Analytics","analyticsContext","clientKey","resources","Resources","Language","customTranslations","srPanel","SRPanel","srConfig","constructor","_define_property","actionEle","update","forEach","newProps","remove","filter","c","_id","unmount","assertConfigurationPropertiesAreValid","bind","defaultProps","apiUrl","analyticsUrl","resolveEnvironments","environment","_environmentUrls","Session","clientKeyType","substring","includes","api","debug","exposeLibraryMetadata","window","async","AdyenCheckout","props","Core","initialize","register","items","setBundleType","type","translations","i18n","language","key","translations","styleInject","Tooltip","children","content","isVisible","setIsVisible","d","triggerRef","A","_","CardIcon","_","card_default","InfoIcon","_","info_default","MasterCardIcon","opacity","_","mastercard_default","VisaIcon","opacity","_","visa_default","MaestroIcon","opacity","_","maestro_default","AmexIcon","opacity","_","amex_default","JcbIcon","opacity","_","jcb_default","DinersIcon","opacity","_","diners_default","DiscoverIcon","opacity","_","discover_default","CupIcon","opacity","_","cup_default","useMediaQuery","query","getMatch","matches","setMatches","d","y","mediaQueryList","listener","event","RenderBrandIcons","brands","brandHidden","limit","isWidth380","useMediaQuery","widthLimit","brandToShow","brand","brandName","x","_","k","index","Tooltip","RenderBrandIcon","visa_default","mastercard_default","maestro_default","amex_default","jcb_default","diners_default","discover_default","cup_default","LoaderIcon","_","loader_default","CheckmarkIcon","_","checkmark_default","CardComponent","configuration","paymentMethods","cardElementRef","A","adyenCardRef","customCardRef","payButtonDisabled","setPayButtonDisabled","d","securityCodePolicy","setSecurityCodePolicy","storePaymentMethod","setStorePaymentMethod","storePaymentMethodRef","brandHidden","setBrandHidden","formErrors","setFormErrors","hasCardPaymentMethod","x","activePaymentMethod","setActivePaymentMethod","isPaymentMethodInitialized","updatePaymentMethodInitialization","handleSuccess","handleError","setThreeDSecureActive","threeDSecureActive","usePaymentMethodGroup","schemeBrands","initializeAdyenComponent","t","handleOnSubmit","handleOnSubmitAdditionalData","handleOnError","handlePaymentCompleted","handlePaymentFailed","m","event","defaultErrors","y","handleBoxChange","brands","handleStorePaymentMethodChange","_","__","state","actions","data","fetchResponse","createPaymentRequest","response","resultCode","action","createDetailsRequest","handleSubmitClick","card_default","i18n","RenderBrandIcons","loader_default","k","Tooltip","info_default","checkmark_default","card_component_default","styleInject","GooglePayIcon","_","googlepay_default","CANCEL","GooglePayComponent","configuration","paymentMethods","googlePayElementRef","A","adyenCardRef","googlePayRef","activePaymentMethod","setActivePaymentMethod","isPaymentMethodInitialized","updatePaymentMethodInitialization","handleSuccess","handleError","setThreeDSecureActive","threeDSecureActive","usePaymentMethodGroup","initializeAdyenComponent","t","handleOnError","handleOnSubmitAdditionalData","handlePaymentCompleted","handlePaymentFailed","gpayConfig","x","googlePayConfiguration","handleOnSubmit","b","y","handleBoxChange","data","__","CANCEL","state","_","actions","fetchResponse","createPaymentRequest","response","resultCode","action","createDetailsRequest","googlepay_default","i18n","google_pay_component_default","styleInject","ApplePayIcon","_","applepay_default","ApplePayComponent","configuration","paymentMethods","applePayElementRef","A","adyenCardRef","applePayRef","activePaymentMethod","setActivePaymentMethod","isPaymentMethodInitialized","updatePaymentMethodInitialization","handleSuccess","handleError","setThreeDSecureActive","threeDSecureActive","usePaymentMethodGroup","initializeAdyenComponent","t","handleOnError","handleOnSubmitAdditionalData","handlePaymentCompleted","handlePaymentFailed","apayConfig","x","applePayConfiguration","handleOnSubmit","E","y","handleBoxChange","data","_","CANCEL","state","actions","fetchResponse","createPaymentRequest","response","resultCode","action","createDetailsRequest","applepay_default","i18n","apple_pay_component_default","styleInject","WarningIcon","_","warning_default","StoredCardComponent","configuration","paymentMethods","storedPaymentMethod","onStoredCardRemoved","storedCardElementRef","A","adyenCardRef","customCardRef","payButtonDisabled","setPayButtonDisabled","d","securityCodePolicy","setSecurityCodePolicy","askConfirmRemoveStoredCard","setAskConfirmRemoveStoredCard","formErrors","setFormErrors","activePaymentMethod","setActivePaymentMethod","activeStoredPaymentMethodId","setActiveStoredPaymentMethodId","isStoredCardInitialized","updateStoredCardInitialization","handleSuccess","handleError","setThreeDSecureActive","threeDSecureActive","usePaymentMethodGroup","initializeAdyenComponent","t","handleOnError","handlePaymentCompleted","handlePaymentFailed","m","handleOnSubmit","handleOnSubmitAdditionalData","event","defaultErrors","x","y","handleBoxChange","handleAskToConfirmRemoveCard","handleCancelRemoveStoredCard","handleConfirmRemoveStoredCard","data","fetchResponse","postDisableTokenRequest","_","__","state","actions","createPaymentRequest","response","resultCode","action","createDetailsRequest","handleSubmitClick","RenderBrandIcons","i18n","warning_default","loader_default","k","Tooltip","info_default","stored_card_component_default","StoredCardContainerComponent","configuration","paymentMethods","storedPaymentMethods","setStoredPaymentMethods","d","activePaymentMethod","threeDSecureActive","usePaymentMethodGroup","handleStoredCardRemoved","storedPaymentMethodId","prevStoredPaymentMethods","storedPaymentMethod","_","k","stored_card_component_default","stored_card_container_component_default","styleInject","PaymentMethodGroup","children","initialValue","_","PaymentMethodGroupContext","payment_method_group_default","styleInject","SuccessIcon","_","success_default","FailureIcon","_","failure_default","ResultComponent","configuration","error","success","usePaymentMethodGroup","_","k","failure_default","i18n","success_default","result_component_default","PaymentMethodsWrapper","children","error","success","usePaymentMethodGroup","_","k","payment_methods_wrapper_default","StraumurCheckoutContainer","configuration","paymentMethods","_","payment_method_group_default","payment_methods_wrapper_default","stored_card_container_component_default","card_component_default","google_pay_component_default","apple_pay_component_default","result_component_default","straumur_checkout_container_default","StraumurCheckout","config","determineLocale","locale","selector","E","_","RootComponent","loader_default","response","setupPaymentMethods","straumur_checkout_container_default","newConfig","message","success_default","i18n","redirectResult","t","state","actions","data","fetchResponse","createDetailsRequest","resultCode","action","failure_default","straumur_checkout_default","children"]}
|