Changeset 3710292
- Timestamp:
- 09/23/2026 11:22:45 PM (4 weeks ago)
- Location:
- woocommerce-mercadopago/trunk
- Files:
-
- 56 edited
-
assets/css/checkouts/mp-plugins-components.min.css (modified) (1 diff)
-
assets/js/checkouts/custom/entities/card-form.min.js (modified) (1 diff)
-
assets/js/checkouts/custom/mp-custom-checkout.min.js (modified) (1 diff)
-
assets/js/checkouts/custom/mp-custom-elements.min.js (modified) (1 diff)
-
assets/js/checkouts/custom/mp-custom-page.min.js (modified) (1 diff)
-
assets/js/checkouts/mp-plugins-components.min.js (modified) (1 diff)
-
assets/js/checkouts/super-token/adapters/platform/CoreMonitorMetricsAdapter.ts (modified) (14 diffs)
-
assets/js/checkouts/super-token/adapters/platform/MelidataAdapter.ts (modified) (4 diffs)
-
assets/js/checkouts/super-token/adapters/platform/SdkReadinessWatcher.ts (modified) (10 diffs)
-
assets/js/checkouts/super-token/adapters/platform/VariantConfigAdapter.ts (modified) (8 diffs)
-
assets/js/checkouts/super-token/adapters/platform/constants.ts (modified) (1 diff)
-
assets/js/checkouts/super-token/adapters/runtime/SuperTokenPaymentMethods.ts (modified) (60 diffs)
-
assets/js/checkouts/super-token/adapters/runtime/SuperTokenTriggerHandler.ts (modified) (3 diffs)
-
assets/js/checkouts/super-token/adapters/session/LegacyRenderSession.ts (modified) (4 diffs)
-
assets/js/checkouts/super-token/adapters/validation/checkoutValidationResolver.ts (modified) (4 diffs)
-
assets/js/checkouts/super-token/adapters/view/shared/consumerCreditsRow.ts (modified) (1 diff)
-
assets/js/checkouts/super-token/adapters/view/shared/typedRow.ts (modified) (1 diff)
-
assets/js/checkouts/super-token/adapters/view/v2.1/SavedCardsView.ts (modified) (3 diffs)
-
assets/js/checkouts/super-token/adapters/view/v2/SavedCardsView.ts (modified) (1 diff)
-
assets/js/checkouts/super-token/bootstrap.ts (modified) (1 diff)
-
assets/js/checkouts/super-token/composition/initializationResilience.ts (modified) (2 diffs)
-
assets/js/checkouts/super-token/composition/runtimeComposition.ts (modified) (8 diffs)
-
assets/js/checkouts/super-token/core/checkoutSession/ErrorClassification.ts (modified) (3 diffs)
-
assets/js/checkouts/super-token/core/paymentMethods/BasePaymentMethodWithInstallments.ts (modified) (2 diffs)
-
assets/js/checkouts/super-token/ports/VariantViewPort.ts (modified) (2 diffs)
-
i18n/languages/woocommerce-mercadopago-es.mo (modified) ( previous)
-
i18n/languages/woocommerce-mercadopago-es.po (modified) (2 diffs)
-
i18n/languages/woocommerce-mercadopago-es_MX.mo (modified) ( previous)
-
i18n/languages/woocommerce-mercadopago-es_MX.po (modified) (2 diffs)
-
i18n/languages/woocommerce-mercadopago-pt.mo (modified) ( previous)
-
i18n/languages/woocommerce-mercadopago-pt.po (modified) (2 diffs)
-
i18n/languages/woocommerce-mercadopago.pot (modified) (8 diffs)
-
readme.txt (modified) (2 diffs)
-
src/Funnel/Funnel.php (modified) (8 diffs)
-
src/Funnel/UpdateSellerFunnelBase.php (modified) (1 diff)
-
src/Gateways/CustomGateway.php (modified) (14 diffs)
-
src/Helpers/AutomaticPaymentsClient.php (modified) (2 diffs)
-
src/Helpers/SubscriptionsHelper.php (modified) (2 diffs)
-
src/Notification/CoreNotification.php (modified) (3 diffs)
-
src/Order/OrderMetadata.php (modified) (1 diff)
-
src/Refund/RefundHandler.php (modified) (1 diff)
-
src/Translations/StoreTranslations.php (modified) (2 diffs)
-
src/WoocommerceMercadoPago.php (modified) (2 diffs)
-
templates/public/checkouts/custom-checkout.php (modified) (14 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (2 diffs)
-
vendor/composer/autoload_static.php (modified) (3 diffs)
-
vendor/composer/installed.json (modified) (3 diffs)
-
vendor/composer/installed.php (modified) (1 diff)
-
vendor/mp-plugins/php-sdk/CHANGELOG.md (modified) (1 diff)
-
vendor/mp-plugins/php-sdk/composer.json (modified) (1 diff)
-
vendor/mp-plugins/php-sdk/composer.lock (modified) (2 diffs)
-
vendor/mp-plugins/php-sdk/src/Entity/Identification/CreateSellerFunnelBase.php (modified) (2 diffs)
-
vendor/mp-plugins/php-sdk/src/Entity/Identification/UpdateSellerFunnelBase.php (modified) (2 diffs)
-
vendor/mp-plugins/php-sdk/src/HttpClient/Requester/CurlRequester.php (modified) (1 diff)
-
woocommerce-mercadopago.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-mercadopago/trunk/assets/css/checkouts/mp-plugins-components.min.css
r3582079 r3710292 1 :root{--mp-font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;--mp-font-size-base:14px;--mp-font-size-input:16px;--mp-line-height-base:16px;--mp-line-height-input:20px;--mp-color-white:#fff;--mp-color-black:#000;--mp-color-red:red;--mp-color-error:#f23d4f;--mp-color-focus:#7f54b3;--mp-color-border:rgba(0,0,0,.25);--mp-border-radius:6px;--mp-border-radius-lg:8px;--mp-input-height:48px;--mp-icon-size:32px;--andes-white:#fff;--andes-gray-250:rgba(0,0,0,.25);--andes-gray-900:rgba(0,0,0,.9)}.mp-checkout-container a,.mp-checkout-container abbr,.mp-checkout-container acronym,.mp-checkout-container address,.mp-checkout-container applet,.mp-checkout-container article,.mp-checkout-container aside,.mp-checkout-container audio,.mp-checkout-container b,.mp-checkout-container big,.mp-checkout-container blockquote,.mp-checkout-container br,.mp-checkout-container button,.mp-checkout-container canvas,.mp-checkout-container caption,.mp-checkout-container center,.mp-checkout-container circle,.mp-checkout-container cite,.mp-checkout-container code,.mp-checkout-container dd,.mp-checkout-container del,.mp-checkout-container details,.mp-checkout-container dfn,.mp-checkout-container div,.mp-checkout-container dl,.mp-checkout-container dt,.mp-checkout-container em,.mp-checkout-container embed,.mp-checkout-container fieldset,.mp-checkout-container figcaption,.mp-checkout-container figure,.mp-checkout-container footer,.mp-checkout-container form,.mp-checkout-container h1,.mp-checkout-container h2,.mp-checkout-container h3,.mp-checkout-container h4,.mp-checkout-container h5,.mp-checkout-container h6,.mp-checkout-container header,.mp-checkout-container hgroup,.mp-checkout-container hr,.mp-checkout-container i,.mp-checkout-container iframe,.mp-checkout-container img,.mp-checkout-container input,.mp-checkout-container ins,.mp-checkout-container kbd,.mp-checkout-container label,.mp-checkout-container legend,.mp-checkout-container li,.mp-checkout-container li input,.mp-checkout-container mark,.mp-checkout-container menu,.mp-checkout-container nav,.mp-checkout-container object,.mp-checkout-container ol,.mp-checkout-container option,.mp-checkout-container output,.mp-checkout-container p,.mp-checkout-container path,.mp-checkout-container pre,.mp-checkout-container q,.mp-checkout-container ruby,.mp-checkout-container s,.mp-checkout-container samp,.mp-checkout-container section,.mp-checkout-container select,.mp-checkout-container small,.mp-checkout-container span,.mp-checkout-container strike,.mp-checkout-container strong,.mp-checkout-container sub,.mp-checkout-container summary,.mp-checkout-container sup,.mp-checkout-container svg,.mp-checkout-container table,.mp-checkout-container tbody,.mp-checkout-container td,.mp-checkout-container tfoot,.mp-checkout-container th,.mp-checkout-container thead,.mp-checkout-container time,.mp-checkout-container tr,.mp-checkout-container tt,.mp-checkout-container u,.mp-checkout-container ul,.mp-checkout-container var,.mp-checkout-container video{border:0!important;font-family:var(--mp-font-family)!important;font-size:var(--mp-font-size-base)!important;font-style:normal!important;line-height:var(--mp-line-height-base)!important;margin:0!important;padding:0!important;vertical-align:baseline!important;width:auto!important}.mp- vertical-line{border-left:1px solid var(--mp-color-border)!important;height:36px!important;width:1px!important}.alert-message{color:var(--mp-color-red);font-weight:700!important}.row-image-select{align-content:center;align-items:center;display:flex!important;flex-direction:row;height:18px;justify-content:space-between;width:100%}.wp-block-woocommerce-checkout .row-image-select img{height:var(--mp-icon-size)!important;max-height:var(--mp-icon-size)!important;max-width:var(--mp-icon-size)!important;order:2;padding:0;width:var(--mp-icon-size)!important}.payment_method_woo-mercado-pago-basic,.payment_method_woo-mercado-pago-credits,.payment_method_woo-mercado-pago-custom,.payment_method_woo-mercado-pago-pix,.payment_method_woo-mercado-pago-pse,.payment_method_woo-mercado-pago-ticket,.payment_method_woo-mercado-pago-yape{label img{margin:-2px 0 0 .5em;position:relative;vertical-align:middle}.row-image-select img,label img{height:var(--mp-icon-size)!important;max-height:var(--mp-icon-size)!important;max-width:var(--mp-icon-size)!important;order:2;padding:0;width:var(--mp-icon-size)!important}}.mp-checkout-container .mp-checkout-andes-input,.mp-checkout-container .mp-checkout-andes-input-error{background:var(--mp-color-white)!important;border:1px solid var(--mp-color-border)!important;border-radius:var(--mp-border-radius)!important;color:var(--mp-color-black)!important;flex-grow:0;flex-shrink:0;font-family:var(--mp-font-family)!important;font-size:var(--mp-font-size-input)!important;font-weight:400!important;height:var(--mp-input-height)!important;line-height:var(--mp-line-height-input)!important;margin:0!important;max-width:100%!important;outline:0!important;padding:0 14px!important}.mp-checkout-container .mp-checkout-andes-input:focus{border-color:var(--mp-color-focus)!important}.mp-checkout-container .mp-checkout-andes-input-error{border-color:var(--mp-color-error)!important}.mp-checkout-container .mp-checkout-andes-input-error:focus{border:2px solid var(--mp-color-border)}.mp-checkout-container .mp-privacy-policy-footer,.mp-checkout-container .mp-privacy-policy-footer *{font-family:var(--primary-font-family)!important;font-size:12px!important;font-weight:400!important;line-height:15px!important}.mp-checkout-container .mp-privacy-policy-footer{align-items:center;color:var(--andes-text-color-primary);display:flex;justify-content:center;text-align:center}.mp-checkout-container .mp-privacy-policy-footer a{color:var(--andes-accent-color)!important;text-decoration:none!important}.mp-display-none{display:none!important}.mp-hidden{margin:0!important;opacity:0!important;padding:0!important;pointer-events:none!important;visibility:hidden!important;z-index:-1!important}.mp-checkout-container .mp-alert-details-card{background:rgb(0 0 0/4%)!important;border-left:4px solid #f23d4f!important;border-radius:6px!important;display:flex!important;flex-direction:column!important;padding:16px!important}.mp-checkout-container .mp-alert-details-card-content{align-items:baseline!important;display:flex!important;flex-direction:row!important;justify-content:flex-start!important}.mp-checkout-container .mp-alert-details-card-content-left{margin-right:8px!important}.mp-checkout-container .mp-alert-details-card-content-right{margin-left:8px!important}.mp-checkout-container .mp-alert-details-badge{align-items:center!important;background:#f23d4f!important;border-radius:50%!important;color:#fff!important;display:flex!important;flex-direction:row!important;height:16px!important;justify-content:center!important;width:16px!important}.mp-checkout-container .mp-alert-details-title{color:rgba(0,0,0,.9)!important;font-weight:700!important;padding:0!important}.mp-checkout-container .mp-alert-details-description,.mp-checkout-container .mp-alert-details-title{font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;line-height:120%!important;margin-block-end:0!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important}.mp-checkout-container .mp-alert-details-description{color:#000!important;font-weight:400!important;margin-top:4px!important}.mp-checkout-container .mp-alert-details-retry-button{background-color:#3483fa!important;border:1px solid #3483fa!important;border-radius:4px!important;color:#fff!important;cursor:pointer!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:32px!important;margin-top:16px!important;outline:0!important;padding:0 12px!important;transition:all .3s ease-in-out!important}.mp-checkout-container .mp-alert-details-retry-button:hover{background-color:#2968c8!important;border:1px solid #2968c8!important}.mp-checkout-container .mp-andes-notice-card{background:rgb(0 0 0/4%)!important;border-left-style:solid!important;border-left-width:4px!important;border-radius:6px!important;display:flex!important;flex-direction:column!important;padding:16px 16px 16px 12px!important}.mp-checkout-container .mp-andes-notice-card.warning{border-left-color:var(--andes-warning-color)!important}.mp-checkout-container .mp-andes-notice-card.error{border-left-color:var(--andes-error-color)!important}.mp-checkout-container .mp-andes-notice-card-content{align-items:baseline!important;display:flex!important;flex-direction:row!important;gap:16px!important;justify-content:flex-start!important}.mp-checkout-container .mp-andes-notice-badge{align-items:center!important;border-radius:12px!important;color:#fff!important;display:flex!important;flex-direction:row!important;font-family:var(--primary-font-family)!important;font-size:small!important;height:16px!important;justify-content:center!important;min-width:16px!important;width:16px!important}.mp-checkout-container .mp-andes-notice-badge.warning{background:var(--andes-warning-color)!important}.mp-checkout-container .mp-andes-notice-badge.error{background:var(--andes-error-color)!important;font-size:x-small!important}.mp-checkout-container .mp-andes-notice-description{color:var(--andes-text-color-primary)!important;color:var(--Text-andes-text-color-primary,rgba(0,0,0,.9));font-family:var(--primary-font-family)!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important}:root{--primary-font-family:"Proxima Nova",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;--mp-font-inter:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;--andes-error-red:#cc1818;--woocommerce-primary:#7f54b3}.mp-checkout-container .mp-input-document .mp-input{align-items:center!important;background:#fff!important;border:1px solid rgba(0,0,0,.25)!important;border-radius:6px!important;box-sizing:border-box!important;display:flex!important;height:48px!important;width:100%!important}.mp-checkout-container .mp-input-document .mp-input.mp-focus{border:2px solid var(--woocommerce-primary)!important}.mp-checkout-container .mp-input-document .mp-input.mp-error{border:1px solid var(--andes-error-red)!important}.mp-checkout-container .mp-input-document .mp-input.mp-error-2px{border:2px solid var(--andes-error-red)!important}.mp-checkout-container #mp-doc-div input-label div.mp-input-label.mp-label-error,.mp-checkout-container .mp-checkout-custom-card-row input-label div.mp-input-label.mp-label-error{color:var(--andes-error-red)!important}.mp-checkout-container .mp-input-document .mp-input .mp-document-select{background:#fff!important;border:0!important;color:#000!important;cursor:pointer!important;flex-shrink:0!important;font-family:var(--mp-font-inter)!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;height:20px!important;letter-spacing:0!important;line-height:20px!important;margin:0 8px 0 12px!important;min-height:20px!important;min-width:fit-content!important;outline:none!important;padding:0!important}.mp-checkout-container .mp-input-document .mp-input .mp-vertical-line{border-left:1px solid rgba(0,0,0,.25)!important;height:36px!important;width:1px!important}.mp-checkout-container .mp-input-document .mp-input .mp-document{background:#fff!important;border:0!important;border-radius:8px!important;box-shadow:none!important;color:#000!important;flex-grow:1!important;font-family:var(--mp-font-inter)!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;height:20px!important;line-height:20px!important;min-height:38px!important;min-width:0!important;outline:none!important;padding:0 14px!important}.mp-checkout-container .mp-input-document .mp-input-document-helper{color:var(--andes-error-red)!important;display:flex!important;font-family:var(--mp-font-inter)!important;font-size:13px!important;height:18px!important;left:calc(50% - 154.5px)!important;line-height:18px!important;margin-top:5px!important;position:static!important;top:0!important;width:327px!important}.mp-checkout-container .mp-input-document .mp-input-document-helper .mp-input-document-helper-icon{align-items:center!important;background:var(--andes-error-red)!important;border-radius:12px!important;color:#fff!important;display:flex!important;height:15px!important;justify-content:center!important;left:0!important;margin:1px 5px!important;top:3px!important;width:15px!important}#payment .mp-checkout-container .mp-document-select,.mp-document-select{appearance:auto;cursor:pointer!important;letter-spacing:0!important;margin:0 8px!important;width:25%!important}.mp-checkout-container .mp-document-select,.mp-checkout-container .mp-input-document{background:var(--mp-color-white)!important;border:0!important;color:var(--mp-color-black)!important;font-family:var(--mp-font-inter)!important;font-size:var(--mp-font-size-base)!important;font-style:normal!important;font-weight:400!important;line-height:var(--mp-line-height-input)!important;outline:0!important}.mp-checkout-container .mp-input-document{border-radius:var(--mp-border-radius-lg)!important;box-shadow:none!important;margin-bottom:24px!important;width:100%!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-field{width:100%!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-field .mp-yape-input{align-items:center!important;background:#fff!important;border:1px solid rgba(0,0,0,.25)!important;border-radius:8px!important;box-sizing:border-box!important;display:flex!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;gap:8px!important;line-height:20px!important;max-height:48px;max-width:276px;padding:14px 24px 14px 12px!important;width:100%!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-field .mp-yape-input.mp-input-field-focus{border:1px solid var(--andes-accent-color)!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-field .mp-yape-input.mp-input-field-error{border:1px solid #f23d4f!important}:root{--andes-font-style:"Proxima Nova",-apple-system,"Helvetica Neue",Helvetica,"Roboto",Arial,sans-serif}.mp-checkout-container .mp-helper{align-items:center!important;display:none;margin:4px 6px 0!important}.mp-checkout-container .mp-helper .mp-helper-message{font-family:var(--mp-font-inter)!important;font-size:13px!important;line-height:18px!important;text-align:left!important}.mp-checkout-container .mp-helper .mp-helper-message.error{color:var(--andes-error-red)!important;font-weight:600!important;padding-top:4px 6px 0!important}.mp-checkout-container .mp-helper .mp-helper-message.info,.mp-checkout-container .mp-helper .mp-helper-message.message{color:var(--andes-gray-550)!important;font-weight:400!important}.mp-checkout-container .mp-helper .mp-helper-icon{display:flex!important;height:12px!important;margin-right:6px!important;width:12px!important}.mp-checkout-container .mp-helper .helper .mp-helper-icon{display:none}.mp-checkout-container .mp-input-label{color:var(--andes-gray-900)!important;font-family:var(--mp-font-inter)!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important;padding-bottom:4px!important;padding-left:6px!important;width:100%!important}.mp-checkout-container .mp-input-label b{padding-left:4px!important}.mp-checkout-container .mp-input-radio-container{display:flex;position:relative!important}.mp-checkout-container .mp-input-radio-radio:checked,.mp-checkout-container .mp-input-radio-radio:not(:checked){opacity:0!important}.mp-checkout-container .mp-input-radio-radio:checked+.mp-input-radio-label,.mp-checkout-container .mp-input-radio-radio:not(:checked)+.mp-input-radio-label{color:#666!important;cursor:pointer!important;display:inline-block;line-height:20px!important}.mp-checkout-container .mp-input-radio-radio:checked+.mp-input-radio-label:before,.mp-checkout-container .mp-input-radio-radio:not(:checked)+.mp-input-radio-label:before{background:#fff!important;border:2px solid rgba(0,0,0,.25)!important;border-radius:100%!important;box-sizing:border-box!important;content:""!important;height:16px!important;left:0!important;position:absolute!important;top:0!important;width:16px!important}.mp-checkout-container .mp-input-radio-radio:checked+.mp-input-radio-label:before{border:2px solid #7f54b3!important}.mp-checkout-container .mp-input-radio-radio:checked+.mp-input-radio-label:after,.mp-checkout-container .mp-input-radio-radio:not(:checked)+.mp-input-radio-label:after{background:#7f54b3!important;border-radius:100%!important;box-sizing:border-box!important;content:""!important;height:8px!important;left:4px!important;position:absolute!important;top:4px!important;width:8px!important}.mp-checkout-container .mp-input-radio-radio:not(:checked)+.mp-input-radio-label:after{opacity:0!important}.mp-checkout-container .mp-input-radio-radio:checked+.mp-input-radio-label:after{opacity:1!important}.mp-checkout-container .mp-input-select-input{align-items:center!important;background:#fff!important;border-radius:8px!important;display:flex!important;height:48px!important}.mp-checkout-container .mp-input-select-select{background:var(--andes-white)!important;border:1px solid var(--andes-gray-250)!important;border-radius:6px!important;color:var(--andes-gray-900)!important;font-family:var(--mp-font-inter)!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;height:48px!important;line-height:20px!important;outline:0!important;padding:14px 12px!important;text-align:left!important;width:100%!important}.mp-checkout-container .mp-input-table-container{align-items:center!important;display:flex!important;flex-direction:column!important;justify-content:center!important;width:100%!important}.mp-checkout-container .mp-input-table-list{border:1px solid rgba(0,0,0,.25)!important;border-radius:6px!important;display:flex!important;flex-direction:column!important;list-style-type:none!important;margin-left:0!important;width:100%!important}.mp-checkout-container .mp-input-table-item{cursor:pointer!important;margin:0 16px!important;padding:0 4px 0 0!important}.mp-checkout-container .mp-input-table-item:not(:first-child){border-top:1px solid rgba(0,0,0,.1)!important}.mp-checkout-container .mp-input-table-label{align-items:center!important;cursor:pointer!important;display:flex!important;justify-content:space-between!important;padding:16px 0!important;width:100%!important}.mp-checkout-container .mp-input-table-option{align-items:center!important;display:flex!important;justify-content:flex-start!important}.mp-checkout-container .mp-input-table-row-text{color:rgba(0,0,0,.9)!important}.mp-checkout-container .mp-input-table-row-text,.mp-checkout-container .mp-input-table-row-text-image{font-family:var(--primary-font-family)!important;font-size:16px!important;font-style:normal!important;font-weight:700!important;line-height:20px!important;padding-left:16px!important}.mp-checkout-container .mp-input-table-row-text-image{align-items:center!important;color:#000000e5!important;display:flex!important;flex-direction:row-reverse!important}.mp-checkout-container .mp-input-table-row-obs{color:rgba(0,0,0,.55)!important;text-align:right!important}.mp-checkout-container .mp-input-table-row-obs,.mp-checkout-container .mp-input-table-row-obs-highlight{font-family:var(--primary-font-family)!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important}.mp-checkout-container .mp-input-table-row-obs-highlight{color:#00a650!important}.mp-checkout-container .mp-input-table-container-link{align-items:center!important;display:flex!important;justify-content:center!important;padding:16px 0 24px!important}.mp-checkout-container .mp-input-table-link{color:var(--andes-accent-color)!important;cursor:pointer!important;font-family:var(--primary-font-family)!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;line-height:16px!important;text-decoration:none!important}.mp-checkout-container .mp-input-table-link:hover{color:#7249a5!important;transition:all .3ms!important}.mp-checkout-container .mp-input-table-bank-interest-container{align-items:center!important;display:flex!important;justify-content:flex-start!important;width:100%!important}.mp-checkout-container .mp-input-table-bank-interest-text{color:#737373!important;font-family:var(--primary-font-family)!important;font-size:13px!important;font-weight:400!important;margin:0!important;margin-block-end:0!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important;max-width:100%!important;padding:8px 0 0 4px!important;word-break:break-word!important}.mp-checkout-container .mp-input-with-tooltip-label{color:#000000e5;display:block;font-family:Proxima Nova,-apple-system,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif!important;font-size:14px;font-weight:400;margin-bottom:6px;margin-left:6px}.mp-checkout-container .mp-input-with-tooltip-input-container{align-items:center;background:#fff;border:1px solid #bfbfbf;border-radius:.375em;display:flex;font-family:Proxima Nova,-apple-system,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif!important;height:48px;position:relative;width:100%}.mp-checkout-container .mp-input-with-tooltip-input-container:focus-within{border-color:#1976d2}.mp-checkout-container .mp-input-with-tooltip-input{background:transparent;border:none;color:#222;flex:1;font-family:inherit;font-family:Proxima Nova,-apple-system,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif!important;font-size:16px;height:100%;margin:14px 12px;outline:none;outline:none!important;width:100%}.mp-checkout-container .mp-input-with-tooltip-input::placeholder{color:#737373!important}.mp-checkout-container .mp-input-with-tooltip-input::placeholder{color:#b0b0b0;font-size:16px;opacity:1}.mp-checkout-container .mp-input-with-tooltip-tooltip-icon{align-items:center;background:#fff;border:1px solid #3483fa;border-radius:50%;box-sizing:border-box;color:#3483fa!important;cursor:pointer;display:flex;font-family:sans-serif!important;font-size:16px;font-weight:500!important;height:18px;justify-content:center;margin-right:12px;outline:none;padding:9px;position:relative;user-select:none;width:18px;z-index:2}.mp-checkout-container .mp-input-with-tooltip-tooltip-icon:focus{box-shadow:0 0 0 2px #90caf9}.mp-checkout-container .mp-input-with-tooltip-tooltip-content{background:#fff;border:1px solid #e0e0e0;border-radius:1rem;box-shadow:0 2px 8px 0 rgba(60,60,60,.15);color:#222;display:none;font-weight:400;padding:15px;pointer-events:none;position:absolute;user-select:none;z-index:10}.mp-checkout-container .mp-input-with-tooltip-tooltip-content.show{display:block}.mp-checkout-container .mp-input-with-tooltip-tooltip-right{left:100%;min-width:220px;position:absolute;top:50%;transform:translateY(-50%) translateX(1.2rem)}.mp-checkout-container .mp-input-with-tooltip-tooltip-right:before{border-bottom:10px solid transparent;border-right:13px solid #fff;border-top:10px solid transparent;content:"";height:0;left:-12px;position:absolute;top:50%;transform:translateY(-50%);width:0;z-index:2}.mp-checkout-container .mp-input-with-tooltip-tooltip-right:after{border-bottom:12px solid transparent;border-right:16px solid rgba(60,60,60,.12);border-top:12px solid transparent;content:"";filter:blur(2px);height:0;left:-15px;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%) translateX(-2px);width:0;z-index:1}.mp-checkout-container .mp-input-with-tooltip-tooltip-left{left:0;min-width:220px;position:absolute;top:50%;transform:translateX(-110%) translateY(-50%)}.mp-checkout-container .mp-input-with-tooltip-tooltip-left:before{border-bottom:10px solid transparent;border-left:13px solid #fff;border-top:10px solid transparent;content:"";height:0;left:99%;position:absolute;top:50%;transform:translateY(-50%);width:0;z-index:2}.mp-checkout-container .mp-input-with-tooltip-tooltip-left:after{border-bottom:12px solid transparent;border-left:16px solid rgba(60,60,60,.12);border-top:12px solid transparent;content:"";filter:blur(2px);height:0;left:99%;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%) translateX(2px);width:0;z-index:1}.mp-checkout-container .mp-input-with-tooltip-tooltip-top{bottom:100%;left:50%;min-width:220px;position:absolute;transform:translateX(-50%) translateY(-1.2rem)}.mp-checkout-container .mp-input-with-tooltip-tooltip-top:before{border-left:10px solid transparent;border-right:10px solid transparent;border-top:13px solid #fff;bottom:-11px;content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.mp-checkout-container .mp-input-with-tooltip-tooltip-top:after{border-left:12px solid transparent;border-right:12px solid transparent;border-top:16px solid rgba(60,60,60,.12);bottom:-15px;content:"";filter:blur(2px);height:0;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%) translateY(2px);width:0;z-index:1}.mp-checkout-container .mp-input-with-tooltip-tooltip-bottom{left:50%;min-width:220px;position:absolute;top:100%;transform:translateX(-50%) translateY(1.2rem)}.mp-checkout-container .mp-input-with-tooltip-tooltip-bottom:before{border-left:10px solid transparent;border-right:10px solid transparent;border-top:13px solid #fff;content:"";height:0;left:50%;position:absolute;top:-10px;transform:translateX(-50%) rotate(180deg);width:0;z-index:2}.mp-checkout-container .mp-input-with-tooltip-tooltip-bottom:after{border-left:12px solid transparent;border-right:12px solid transparent;border-top:16px solid rgba(60,60,60,.12);content:"";filter:blur(2px);height:0;left:50%;pointer-events:none;position:absolute;top:-13px;transform:translateX(-50%) translateY(-2px) rotate(180deg);width:0;z-index:1}.mp-checkout-container .mp-input-with-tooltip-helper-error{align-items:center;color:#e53935;font-family:Proxima Nova,-apple-system,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif!important;font-size:13px;font-weight:500;gap:6px;margin-left:6px;margin-top:4px}.mp-checkout-container .mp-input-with-tooltip-input-container.error{border-color:#e53935!important}.mp-checkout-container .mp-input-with-tooltip-label.error{color:#e53935!important}.mp-checkout-container .mp-payment-method-logo-container,.mp-checkout-container .mp-payment-method-logo-slider-container{align-items:center!important;background:#fff!important;border:1px solid #e5e5e5!important;border-radius:4px!important;box-sizing:border-box!important;display:flex;height:24px!important;justify-content:center!important;padding:4px!important;width:36px!important}.mp-checkout-container .mp-payment-method-logo-image{float:none!important;font-size:10px!important;height:auto!important;margin:0!important;max-height:100%!important;max-width:100%!important;overflow:hidden!important;position:inherit!important;text-overflow:ellipsis!important;width:auto!important}.mp-checkout-container .mp-payment-methods-container{display:flex;flex-direction:column!important;height:100%!important;width:100%!important}.mp-checkout-container .mp-payment-methods-container p{padding:0!important}.mp-checkout-container .mp-payment-methods-header{align-items:center!important;display:flex;height:100%!important;justify-content:flex-start!important;padding:0 4px 16px!important;width:100%!important}.mp-checkout-container .mp-payment-methods-title{align-items:center!important;color:rgba(0,0,0,.55)!important;display:flex;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important;margin-block-end:0!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important}.mp-checkout-container .mp-payment-methods-badge{align-items:center!important;background:#00a650!important;border-bottom-right-radius:8px!important;display:flex;justify-content:center!important;margin-left:10px!important;padding:6px 8px 4px!important}.mp-checkout-container .mp-payment-methods-badge-text{align-items:center!important;color:#fff!important;display:flex;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:11px!important;font-style:normal!important;font-weight:700!important;line-height:11px!important;text-align:center!important;text-transform:uppercase!important}.mp-checkout-container .mp-payment-method-type-container{display:flex;flex-direction:column!important;height:100%!important;width:100%!important}.mp-checkout-container .mp-payment-methods-content{align-items:center!important;display:flex;flex-wrap:wrap!important;height:100%!important;justify-content:flex-start!important;padding-bottom:16px!important;width:100%!important}.mp-checkout-container .mp-payment-methods-content payment-method-logo{padding:0 4px 8px!important}.mp-checkout-container .mp-payment-methods-link{box-shadow:none!important;color:#7f54b3!important;cursor:pointer!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important;text-decoration:none!important;vertical-align:middle!important}.mp-checkout-container .mp-payment-methods-link:hover{color:rgba(0,0,0,.55)!important}.mp-checkout-container #mp-checkout-pix-root.mp-checkout-pix-container .mp-pix-template-container{align-items:center!important;background-color:#fff!important;display:flex!important;flex-direction:column!important;justify-content:center!important;text-align:center!important}.mp-checkout-container #mp-checkout-pix-root.mp-checkout-pix-container .mp-pix-template-image{float:none!important;font-size:10px!important;height:auto!important;margin:0!important;max-height:100%!important;max-width:240px!important;overflow:hidden!important;padding-bottom:42px!important;position:inherit!important;text-overflow:ellipsis!important;width:100%!important}.mp-checkout-container #mp-checkout-pix-root.mp-checkout-pix-container .mp-pix-template-title{font-size:16px!important;font-weight:700!important;padding-bottom:16px!important}.mp-checkout-container #mp-checkout-pix-root.mp-checkout-pix-container .mp-pix-template-subtitle,.mp-checkout-container #mp-checkout-pix-root.mp-checkout-pix-container .mp-pix-template-title{color:rgba(0,0,0,.9)!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-style:normal!important;line-height:18px!important;margin-block-end:0!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important}.mp-checkout-container #mp-checkout-pix-root.mp-checkout-pix-container .mp-pix-template-subtitle{font-size:14px!important;font-weight:400!important}.mp-checkout-container .mp-terms-and-conditions-link,.mp-checkout-container .mp-terms-and-conditions-text{color:rgba(0,0,0,.55)!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important;padding-right:4px!important}.mp-checkout-container .mp-terms-and-conditions-link{color:var(--andes-accent-color)!important;text-decoration:none!important}.mp-checkout-container .mp-terms-and-conditions-link:hover{color:#3483fa!important;transition:all .3ms!important}.mp-checkout-container .mp-test-mode-container{padding:0 0 25px!important}.mp-checkout-container .mp-checkout-pse-test-mode{padding-bottom:24px!important}.mp-checkout-container .mp-test-mode-card{background:rgb(0 0 0/4%)!important;border-left:4px solid #f73!important;border-radius:6px!important;display:flex!important;flex-direction:column!important;padding:16px!important}.mp-checkout-container .mp-test-mode-badge{align-items:center!important;background:#f73!important;border-radius:12px!important;color:#fff!important;display:flex!important;flex-direction:row!important;height:16px!important;justify-content:center!important;margin-right:16px!important;min-width:16px!important;width:16px!important}.mp-checkout-container .mp-test-mode-title{color:rgba(0,0,0,.9)!important;font-weight:700!important;margin-left:16px!important;padding:0!important}.mp-checkout-container .mp-test-mode-description,.mp-checkout-container .mp-test-mode-title{font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;line-height:120%!important;margin-block-end:0!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important}.mp-checkout-container .mp-test-mode-description{color:#000!important;font-weight:400!important;padding-left:32px!important;padding-top:4px!important}.mp-checkout-container .mp-test-mode-card-content{align-items:baseline!important;display:flex!important;flex-direction:row!important;justify-content:flex-start!important}.mp-checkout-container .mp-test-mode-link{color:#7f54b3!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:16px!important;text-decoration:none!important}.mp-checkout-container .mp-test-mode-link:hover{color:#7249a5!important;transition:all .3ms!important}.payment_method_woo-mercado-pago-credits>label>img{height:32px!important;width:32px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-credits-terms-and-conditions{align-items:center!important;display:flex!important;justify-content:center!important;padding-top:16px!important;text-align:center!important}#mp-checkout-credits-root.mp-checkout-credits-container{background-color:#fff!important;display:flex!important;flex-direction:column!important;justify-content:center!important;padding:24px 16px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-test-mode-card{margin-bottom:24px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-credits-content{background-color:#fff!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-credits-test-mode{padding:0 0 25px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-credits-checkout-benefits{padding:40px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-container{display:flex;flex-direction:column!important;font-family:var(--primary-font-family)!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-container p{padding:0!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-title{color:#1a1a1a!important;font-size:18px!important;font-style:normal!important;font-weight:600!important;line-height:24px!important;margin-block-end:32px!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important;text-align:left!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list{display:flex;flex-direction:column!important;gap:16px!important;line-height:18px!important;list-style-type:none!important;margin-block-end:0!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important;padding-inline-start:0!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-item{align-items:center!important;display:flex;font-size:14px!important;font-weight:600;justify-content:flex-start!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-item span{color:rgba(0,0,0,.55)!important;font-weight:400}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-item>span>b{font-size:14px!important;font-weight:600}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-count-list-item{color:var(--andes-accent-color)!important;font-weight:600!important;line-height:0!important;margin-right:8px!important;text-align:center!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-container{align-items:center;background-color:#f5f5f5!important;display:flex;flex-direction:column;padding:16px 40px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-container p{color:var(--andes-text-color-secondary)!important;font-family:var(--primary-font-family)!important;font-size:12px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-title-container{align-items:center!important;display:flex!important;gap:12px!important;justify-content:left!important;margin-bottom:8px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-mp-logo-image{margin:0!important;width:20px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-title{font-weight:600!important;margin:0!important;size:12px!important;color:rgba(0,0,0,.55)!important;line-height:15px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-description{font-weight:400!important;margin:0!important;size:12px!important;color:rgba(0,0,0,.55)!important;line-height:16px!important}@media (max-width:768px){#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-container{background-color:#f5f5f5!important;font-family:var(--primary-font-family)!important;padding:16px 20px!important}}@media (max-width:400px){#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-container{background-color:#f5f5f5!important;font-family:var(--primary-font-family)!important;padding:16px 20px!important}}@media only screen and (max-width:768px){#mp-checkout-credits-root.mp-checkout-credits-container .mp-credits-checkout-benefits{padding:40px 20px!important}}.wc-block-components-radio-control-accordion-content{padding:2px!important}#top #payment #mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form .payment_box.payment_method_woo-mercado-pago-custom{padding:0!important;width:100%!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-row.mp-checkout-custom-dual-column-row{flex-direction:row!important;padding-bottom:0!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form #mp-doc-div.mp-checkout-custom-input-document{padding:0!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-checkout-custom-issuers-container.mp-checkout-custom-issuers-container{display:block;padding:0 0 32px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-checkout-custom-installments-card #mp-checkout-custom-issuers-container.mp-checkout-custom-issuers-container-display-none{display:none;padding:0 0 32px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-checkout-custom-installments-card.mp-checkout-custom-installments-display-none{display:none;margin-top:8px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__expirationDate-container.mp-checkout-custom-left-card-input{margin-right:16px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-card-holder-div input.mp-checkout-custom-card-input.mp-card-holder-name{box-sizing:border-box!important;margin:0!important;padding-left:14px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-card-holder-div input.mp-checkout-custom-card-input.mp-card-holder-name.mp-focus{border:2px solid var(--woocommerce-primary)!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-card-holder-div input.mp-checkout-custom-card-input.mp-card-holder-name.mp-error-2px{border:2px solid var(--andes-error-red)!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-card-holder-div input.mp-card-holder-name.mp-error{border:1px solid var(--andes-error-red)!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-card-holder-div input.mp-checkout-custom-card-input.mp-card-holder-name::placeholder{color:var(--andes-text-color-secondary,rgba(0,0,0,.55))!important;opacity:1!important}#mp-checkout-custom-root .mp-checkout-custom-container{background-color:#fff!important;display:flex;flex-direction:column!important;justify-content:center!important;padding:20px 24px 40px!important}#mp-checkout-custom-root .mp-checkout-custom-container .mp-test-mode-card{margin-bottom:24px!important}#mp-checkout-custom-root .mp-checkout-custom-container #mp-custom-checkout-form-container iframe{max-width:100%!important}#mp-checkout-custom-root .mp-checkout-custom-container .mp-wallet-button-container-wrapper{align-items:center;display:flex;flex-direction:column;justify-content:center;margin-bottom:24px!important;width:auto!important}#mp-checkout-custom-root .mp-wallet-button-container-wrapper .mp-wallet-button-container{align-items:center;border:1px solid rgba(0,0,0,.1)!important;border-radius:6px!important;box-sizing:border-box!important;display:flex;flex-direction:column!important;gap:20px!important;height:auto!important;margin-bottom:32px!important;max-width:416px!important;padding:24px 16px!important;width:100%!important}#mp-checkout-custom-root .mp-wallet-button-container-wrapper .mp-wallet-button-title{align-items:center!important;color:rgba(0,0,0,.9)!important;display:flex!important;flex-direction:column!important}#mp-checkout-custom-root .mp-wallet-button-container-wrapper .mp-wallet-button-container .mp-wallet-button-title span{color:#000000e6!important;font-family:var(--primary-font-family)!important;font-size:18px!important;font-style:normal!important;font-weight:600!important;line-height:24px!important;text-align:center}#mp-checkout-custom-root .mp-wallet-button-container-wrapper .mp-wallet-button-button{display:flex;justify-content:center;width:100%!important}#mp-checkout-custom-root .mp-wallet-button-container-wrapper .mp-wallet-button-container .mp-wallet-button-button button#mp-wallet-button:hover{background-color:#fbd100}#mp-checkout-custom-root .mp-wallet-button-container-wrapper .mp-wallet-button-container .mp-wallet-button-button button#mp-wallet-button:focus{box-shadow:0 0 0 2px #fff,0 0 0 3px #2968c8,0 0 0 5px rgba(65,137,230,.3);outline:none!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form{display:flex!important;flex-direction:column!important;gap:32px!important;justify-content:flex-start!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form .mp-checkout-custom-card-row{display:flex;flex-direction:column;justify-content:space-between}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container{display:flex;flex-direction:column;margin:0!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-installments-tax-info{background-color:transparent!important;color:var(--andes-text-color-secondary,rgba(0,0,0,.55))!important;font-family:var(--primary-font-family)!important;font-size:13px!important;font-style:normal!important;font-weight:600!important;line-height:18px!important;margin-top:4px!important;padding-left:6px!important}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container .mp-custom-checkout-select-input,#mp-checkout-custom-root #mp-checkout-custom-issuers-container .mp-custom-checkout-select-input{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;background:var(--andes-white)!important;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' fill='none' viewBox='0 0 13 8'%3E%3Cpath fill='rgba(0,0,0,0.9)' d='m1.702.756 4.796 4.796 4.8-4.801.849.848-5.65 5.65L.855 1.605z'/%3E%3C/svg%3E")!important;background-position:right 12px center!important;background-repeat:no-repeat!important;border:1px solid var(--andes-gray-250)!important;border-radius:6px!important;box-shadow:unset!important;color:rgba(0,0,0,.55)!important;font-family:var(--mp-font-inter)!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;height:48px!important;line-height:20px!important;margin:0!important;outline:0!important;padding:12px 40px 12px 12px!important;text-align:left!important;visibility:visible!important;width:100%!important}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container .mp-custom-checkout-select-input:has(option:not([disabled]):checked),#mp-checkout-custom-root #mp-checkout-custom-issuers-container .mp-custom-checkout-select-input:has(option:not([disabled]):checked){color:var(--andes-gray-900)!important}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container .mp-custom-checkout-select-input option,#mp-checkout-custom-root #mp-checkout-custom-issuers-container .mp-custom-checkout-select-input option{color:var(--andes-gray-900)!important}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container .mp-input-label.mp-label-error{color:var(--andes-error-red)!important}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container .mp-custom-checkout-select-input.mp-error{border:1px solid var(--andes-error-red)!important}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container .mp-custom-checkout-select-input.mp-error-2px{border:2px solid var(--andes-error-red)!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form .mp-checkout-custom-card-column{display:flex;flex-direction:column;justify-content:center;width:50%!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form input-helper #mp-card-holder-name-helper-info{color:var(--andes-text-color-secondary,rgba(0,0,0,.55));font-size:13px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form .mp-checkout-custom-card-input{background:var(--andes-white)!important;border:1px solid var(--andes-gray-250)!important;border-radius:6px!important;color:var(--andes-gray-900)!important;font-family:var(--mp-font-inter)!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;height:48px!important;line-height:20px!important;outline:0!important;padding:0!important;text-align:left!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__cardNumber-container{position:relative!important;width:100%!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__cardNumber-container,#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__expirationDate-container,#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__securityCode-container{&.mp-checkout-custom-card-form-focus{border:2px solid var(--woocommerce-primary)!important}&.mp-error{border:1px solid var(--andes-error-red)!important}&.mp-error.mp-checkout-custom-card-form-focus{border:2px solid var(--andes-error-red)!important}}input-label:has(+#form-checkout__cardNumber-container.mp-error) .mp-input-label,input-label:has(+#form-checkout__expirationDate-container.mp-error) .mp-input-label,input-label:has(+.mp-checkout-custom-security-code-container #form-checkout__securityCode-container.mp-error) .mp-input-label{color:var(--andes-error-red)!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__cardNumber-container.mp-card-icon-detected{box-sizing:border-box!important;padding-right:36px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__cardNumber-container.mp-card-icon-detected:before{align-items:center!important;background-image:var(--card-brand-icon)!important;background-position:50%!important;background-repeat:no-repeat!important;background-size:32px 24px!important;border:1px solid var(--andes-gray-100-solid)!important;border-radius:4px!important;box-sizing:border-box!important;content:""!important;display:flex!important;height:32px!important;justify-content:center!important;pointer-events:none!important;position:absolute!important;right:8px!important;top:50%!important;transform:translateY(-50%)!important;width:32px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__cardNumber-container .mp-checkout-custom-card-input::placeholder{color:var(--andes-text-color-secondary)!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__cardNumber-container .mp-checkout-custom-card-input:focus::placeholder{opacity:1!important;transition:none!important}:has(>.mp-checkout-custom-load){padding:0!important}.mp-checkout-custom-load{align-items:center;background-color:#f9f9f9!important;display:flex;height:288px!important;justify-content:center;opacity:1;padding:16px;visibility:visible}.mp-checkout-custom-load:not(.mp-display-none){max-height:1000px!important;opacity:1!important;position:relative!important;visibility:visible!important}.mp-checkout-custom-load.mp-hidden{opacity:0!important;pointer-events:none!important;transition:opacity .5s ease-out,visibility .5s ease-out!important;visibility:hidden!important}.spinner-card-form{animation:rotate 3s linear infinite;height:48px!important;width:48px!important}.spinner-card-form .spinner-path{stroke:var(--andes-accent-color)!important;stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}@keyframes rotate{to{transform:rotate(1turn)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}#mp-loading-container-3ds .mp-spinner-3ds{animation:spin 2s linear infinite;border:4px solid rgba(0,0,255,.1);border-radius:50%;border-top:4px solid var(--andes-accent-color);height:40px;margin:auto;width:40px}#mp-3ds-modal-container.mp-3ds-modal{align-items:center;background-color:rgba(0,0,0,.7);display:none;display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%;z-index:9999}#mp-3ds-modal-content{align-items:center;background-color:#fff;border-radius:6px;justify-content:center;padding:48px;width:800px}#mp-3ds-modal-content>div{align-items:center;flex-direction:column;justify-content:center;width:100%}#mp-3ds-modal-close{cursor:pointer;float:right}#mp-loading-container-3ds{display:flex;flex-direction:column;gap:12px;height:274px;margin:auto;position:relative;width:704px}#mp-loading-container-3ds .mp-loading-text-3ds{font-family:Proxima Nova,sans-serif;font-size:24px;font-weight:600;padding-top:24px;text-align:center}#mp-loading-container-3ds .mp-loading-text-3ds>p{margin-bottom:12px}#mp-3ds-frame{border:none;display:block;margin:auto;min-height:500px;min-width:600px}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}#mp-3ds-modal-container .mp-card-info{align-items:center;display:-webkit-inline-box;justify-content:center;margin-bottom:8px}#mp-3ds-modal-container .mp-alert-color-success{background:var(--andes-accent-color);border-radius:6px 0 0 6px;width:6px}#mp-3ds-modal-container .mp-icon-badge-info{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0ibm9uZSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IiMzNDgzRkEiIHJ4PSI4Ii8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTcuODg1IDUuNDQyYS44Ni44NiAwIDEgMCAwLTEuNzIxLjg2Ljg2IDAgMCAwIDAgMS43Mk0xMC4yNiAxMS4xNDV2MUg1LjgwNHYtMUg3LjI3VjcuNDI3aC0xLjExdi0xSDguNzN2NC43MTh6Ii8+PC9zdmc+) 100% 50% no-repeat transparent;background-size:18px;height:18px;margin:0 12px 0 10px;min-block-size:-webkit-fill-available;width:24px}#mp-3ds-modal-container .mp-card-body-3ds{align-items:center;background:rgba(0,0,0,.04);border-radius:0 6px 6px 0;display:flex;height:30px;justify-content:flex-start;padding:5px 0;width:100%}#mp-3ds-modal-container .mp-text-subtitle{font-family:Proxima Nova,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:18px;vertical-align:middle}#mp-modal-3ds-title{font-family:Proxima Nova,sans-serif;font-style:normal;font-weight:600;margin-bottom:8px;text-align:left}#content-load-3ds{align-self:stretch;display:flex;flex-direction:column;flex-shrink:0;gap:12px;width:704px}#mp-loading-container-3ds .mp-normal-text-3ds{text-align:center}@media screen and (max-width:670px){#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-row.mp-checkout-custom-dual-column-row{flex-direction:column!important;gap:32px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form .mp-checkout-custom-card-column{width:100%!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__expirationDate-container.mp-checkout-custom-left-card-input{margin-right:0!important}}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container{position:relative!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container .mp-checkout-custom-security-code-input{background:#fff!important;border:1px solid #bfbfbf!important;border-radius:6px!important;color:#222!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;height:48px!important;line-height:20px!important;outline:0!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container .mp-checkout-custom-security-code-tooltip{align-items:center!important;background:var(--andes-white)!important;border:2px solid var(--andes-text-color-secondary)!important;border-radius:50%!important;box-sizing:border-box!important;color:var(--andes-text-color-secondary)!important;cursor:pointer!important;display:flex!important;font-size:16px!important;font-weight:500!important;height:20px!important;justify-content:center!important;outline:none!important;position:absolute!important;right:12px!important;top:50%!important;transform:translateY(-50%)!important;user-select:none!important;width:20px!important;z-index:500!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container .mp-checkout-custom-security-code-tooltip:hover:after{align-items:flex-start!important;background:var(--andes-gray-900-solid)!important;border:none!important;border-radius:6px!important;box-shadow:0 2px 8px 0 rgba(60,60,60,.15)!important;color:#fff!important;content:attr(data-tooltip)!important;display:flex!important;font-family:var(--mp-font-inter)!important;font-size:14px!important;font-weight:400!important;justify-content:flex-start!important;line-height:17px!important;margin-top:12px!important;min-height:68px!important;padding:16px!important;pointer-events:none!important;position:absolute!important;right:0!important;text-align:left!important;top:100%!important;user-select:none!important;white-space:normal!important;width:312px!important;z-index:10!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container .mp-checkout-custom-security-code-tooltip:hover:before{border:4px solid transparent!important;border-bottom:4px solid var(--andes-gray-900-solid)!important;content:""!important;margin-top:4px!important;position:absolute!important;right:8px!important;top:100%!important;z-index:11!important}#mp-checkout-custom-root .mp-checkout-custom-container .mp-checkout-custom-card-flags{display:flex!important;flex-wrap:wrap!important;gap:8px!important;justify-content:flex-start!important;margin-bottom:32px!important}@media screen and (max-width:767px){#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container .mp-checkout-custom-security-code-tooltip:hover:after{right:-50px!important;text-align:left!important;white-space:normal!important;width:200px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container .mp-checkout-custom-security-code-tooltip:hover:before{right:8px!important}}#mp-checkout-pix-root.mp-checkout-pix-container{background-color:#fff!important;display:flex;flex-direction:column!important;justify-content:center!important;padding:24px 16px!important}#mp-checkout-pix-root.mp-checkout-pix-container .mp-checkout-pix-test-mode{padding-bottom:32px!important}#mp-checkout-pix-root.mp-checkout-pix-container .mp-checkout-pix-terms-and-conditions{align-items:center!important;display:flex;justify-content:center!important;padding-top:42px!important;text-align:center!important}#mp-checkout-pro-label img{height:32px;max-height:32px;width:32px}#mp-checkout-pro-root.mp-checkout-pro-container img{margin:0!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-test-mode-card{margin-bottom:24px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content{background:#fff;padding:24px 16px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits-title{color:rgba(0,0,0,.9);font-size:18px!important;font-weight:600!important;line-height:22px!important;text-align:center}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits{display:flex;gap:24px;justify-content:center;padding:32px 0!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits .mp-checkout-pro-benefit{display:flex;flex:1}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits .mp-checkout-pro-benefit img.mp-checkout-pro-benefit-icon{height:16px!important;margin-right:8px!important;width:16px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits .mp-checkout-pro-benefit .mp-checkout-pro-benefit-description,#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits .mp-checkout-pro-benefit .mp-checkout-pro-benefit-description b{color:rgba(0,0,0,.55);font-size:14px!important;line-height:18px!important;text-align:left}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits .mp-checkout-pro-benefit .mp-checkout-pro-benefit-description{font-weight:400!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits .mp-checkout-pro-benefit .mp-checkout-pro-benefit-description b{font-weight:600!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-payment-methods{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;padding-bottom:40px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-payment-methods img.mp-checkout-pro-payment-method-icon{border-radius:4px;box-shadow:inset 0 0 0 1px #e5e5e5!important;height:24px!important;padding:0 4px!important;width:24px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-redirect{align-items:center;background:#f5f5f5;display:flex;flex-direction:column;gap:8px;padding:16px 40px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-redirect .mp-checkout-pro-redirect-title{align-items:center;color:rgba(0,0,0,.55);display:flex;font-size:12px!important;font-weight:600!important;line-height:15px!important;text-transform:none}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-redirect img.mp-checkout-pro-redirect-icon{margin-right:8px!important;width:20px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-redirect .mp-checkout-pro-redirect-description{color:rgba(0,0,0,.55);font-size:12px!important;font-weight:400!important;line-height:15px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-terms-and-conditions{align-items:center!important;display:flex!important;justify-content:center!important;padding-top:16px!important;text-align:center!important}@media only screen and (max-width:768px){#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content{padding:24px 20px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits-title{text-align:left}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits{flex-direction:column}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-redirect{align-items:start;padding:16px 20px!important}}#mp-checkout-pse-root.mp-checkout-pse-container .mp-checkout-pse-terms-and-conditions{align-items:center!important;display:flex!important;justify-content:center!important;padding-top:16px!important;text-align:center!important}#mp-checkout-pse-root.mp-checkout-pse-container{background-color:#fff!important;display:flex;flex-direction:column!important;padding:24px 16px!important}#mp-checkout-pse-root.mp-checkout-pse-container .mp-checkout-pse-content .mp-checkout-pse-text{color:rgba(0,0,0,.9)!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;font-style:normal!important;font-weight:700!important;line-height:20px!important;padding-bottom:25px!important;padding-left:0!important}#mp-checkout-pse-root.mp-checkout-pse-container .mp-checkout-pse-content .mp-checkout-pse-test-mode,#mp-checkout-pse-root.mp-checkout-pse-container .mp-input-select-container{padding-bottom:24px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container{align-items:center!important;background-color:#fff!important;display:flex;flex-direction:column!important;padding:24px 16px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container.mp-checkout-ticket-single{padding-top:0!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-test-mode-card{margin-bottom:24px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content{width:100%!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-test-mode{padding:0 0 25px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-text{color:rgba(0,0,0,.9)!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;font-style:normal!important;font-weight:700!important;line-height:20px!important;padding-bottom:25px!important;padding-left:0!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-terms-and-conditions{align-items:center!important;display:flex;justify-content:center!important;padding-top:32px!important;text-align:center!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-billing-text{color:rgba(0,0,0,.9)!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;font-style:normal!important;font-weight:700!important;line-height:18px!important;padding-bottom:20px!important;padding-left:0!important;padding-top:25px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-billing-checkbox{align-items:center!important;display:flex!important;gap:12px!important;height:40px!important;padding-bottom:15px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-billing-checkbox input{margin:0!important;padding:0!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-billing-checkbox p{color:#000;font-size:14px!important;font-weight:400!important;line-height:18px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-row{display:flex!important;gap:24px!important;justify-content:space-between!important;overflow:hidden;padding-bottom:32px!important;width:100%!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-address-container{container-name:mp-checkout-ticket-address-container!important;container-type:inline-size!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-column{box-sizing:border-box;display:flex!important;flex-direction:column!important;overflow:hidden;width:100%!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-column label{color:#000!important;font-size:14px!important;font-weight:400!important;line-height:18px!important;margin:0!important;padding:0 0 4px 6px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number{align-content:center!important;align-items:center!important;background:#fff!important;border:1px solid rgba(0,0,0,.25)!important;border-radius:6px!important;box-sizing:border-box;display:flex!important;gap:12px!important;height:48px!important;line-height:20px!important;outline:0!important;padding:0 14px!important;vertical-align:middle!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number-disabled{background:#0000000a!important;border:1px solid rgba(0,0,0,.25);border-radius:6px!important;border-style:dashed!important;color:#000!important;flex-grow:0;flex-shrink:0;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;font-weight:400!important;height:48px!important;line-height:20px!important;margin:0!important;max-width:100%!important;outline:0!important;padding:0 14px!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number-focused{border-color:#7f54b3!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number-focused-error{border-color:#f23d4f!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number-focused-error-on-focus{border:2px solid!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number input{border:none!important;color:#000!important;flex:1 1 auto!important;float:none!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;font-weight:400!important;min-width:0!important;width:100%!important;z-index:1!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number input:disabled{opacity:0!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number input:focus{border:none!important;outline:none!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox{align-items:center!important;display:flex!important;flex:0 0 auto!important;float:none!important;gap:8px!important;justify-content:flex-end!important;width:auto!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox p{color:#000!important;font-size:14px!important;font-weight:400!important;height:19px!important;line-height:18px!important;margin:0!important;padding:0!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox input{border:0!important;margin:0!important;width:auto!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-input-document{margin-bottom:32px!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number.mp-checkout-andes-input-error{border-color:var(--mp-color-error)!important}@media screen and (max-width:524px){#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-row{display:flex!important;flex-wrap:wrap!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number{align-items:center!important;flex-wrap:nowrap!important;height:48px!important;padding:8px 14px!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number input{flex:1 1 auto!important;width:auto!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox{flex:0 0 auto!important;justify-content:flex-end!important;width:auto!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox p{white-space:nowrap!important}}@media screen and (max-width:480px){#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number{gap:8px!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox{flex-wrap:nowrap!important;max-width:45%!important}.mp-checkout-ticket-billing-number-toggle-checkbox p{text-overflow:ellipsis!important;white-space:nowrap!important}}@container mp-checkout-ticket-address-container (max-width: 300px){#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-row{flex-direction:column!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox{flex-direction:column-reverse!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number{padding-right:2px!important}}#mp-checkout-yape-root.mp-checkout-yape-container{align-items:center!important;background-color:#fff!important;display:flex!important;flex-direction:column!important;padding:24px!important}#mp-checkout-yape-root.mp-checkout-yape-container>.mp-checkout-yape-content{box-sizing:border-box!important;padding:12px!important;width:100%!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-test-mode{margin-bottom:24px!important;padding:0 0 5px!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-inputs{align-items:baseline;display:flex;flex-wrap:wrap;gap:20px;margin-bottom:24px!important;margin-top:24px;max-width:inherit}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-inputs input-field{width:100%!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-terms-and-conditions{align-items:center!important;display:flex;justify-content:center!important;padding:24px 12px 0!important;text-align:center!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-title-container{display:flex;flex-direction:column;gap:6px;margin-bottom:24px!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-title{color:#000!important;font-size:18px!important;font-weight:600!important;line-height:22px!important;margin-bottom:8px}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-subtitle,#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-title{font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;margin-top:0;text-align:left!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-subtitle{color:rgba(0,0,0,.55)!important;font-size:14px!important;font-weight:400!important;line-height:18px!important;margin-bottom:0}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-inputs{container-name:yape-inputs;container-type:inline-size;--mp-yape-code-gap:8px}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-inputs .mp-yape-input-container{display:grid!important;gap:var(--mp-yape-code-gap,8px)!important;grid-auto-flow:row;grid-template-columns:repeat(3,38px);width:100%!important}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container.mp-yape-code-columns-3{grid-template-columns:repeat(3,38px)}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container.mp-yape-code-columns-6{grid-template-columns:repeat(3,38px) 0 repeat(3,38px)}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container.mp-yape-code-columns-6 .mp-yape-code-input:nth-child(3){grid-column:3}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container.mp-yape-code-columns-6 .mp-yape-code-input:nth-child(4){grid-column:5}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container.mp-yape-code-columns-6 .mp-yape-code-input:nth-child(5){grid-column:6}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container.mp-yape-code-columns-6 .mp-yape-code-input:nth-child(6){grid-column:7}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container input.mp-yape-code-input{background:#fff!important;flex:0 0 auto;margin:0!important;min-width:0;padding:0!important;width:38px!important}@media screen and (max-width:480px){.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-inputs .mp-yape-input-container{display:grid!important;gap:var(--mp-yape-code-gap,8px)!important;grid-auto-flow:row;grid-template-columns:repeat(3,38px);width:100%!important}}1 :root{--mp-font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;--mp-font-size-base:14px;--mp-font-size-input:16px;--mp-line-height-base:16px;--mp-line-height-input:20px;--mp-color-white:#fff;--mp-color-black:#000;--mp-color-red:red;--mp-color-error:#f23d4f;--mp-color-focus:#7f54b3;--mp-color-border:rgba(0,0,0,.25);--mp-border-radius:6px;--mp-border-radius-lg:8px;--mp-input-height:48px;--mp-icon-size:32px;--andes-white:#fff;--andes-gray-250:rgba(0,0,0,.25);--andes-gray-900:rgba(0,0,0,.9)}.mp-checkout-container a,.mp-checkout-container abbr,.mp-checkout-container acronym,.mp-checkout-container address,.mp-checkout-container applet,.mp-checkout-container article,.mp-checkout-container aside,.mp-checkout-container audio,.mp-checkout-container b,.mp-checkout-container big,.mp-checkout-container blockquote,.mp-checkout-container br,.mp-checkout-container button,.mp-checkout-container canvas,.mp-checkout-container caption,.mp-checkout-container center,.mp-checkout-container circle,.mp-checkout-container cite,.mp-checkout-container code,.mp-checkout-container dd,.mp-checkout-container del,.mp-checkout-container details,.mp-checkout-container dfn,.mp-checkout-container div,.mp-checkout-container dl,.mp-checkout-container dt,.mp-checkout-container em,.mp-checkout-container embed,.mp-checkout-container fieldset,.mp-checkout-container figcaption,.mp-checkout-container figure,.mp-checkout-container footer,.mp-checkout-container form,.mp-checkout-container h1,.mp-checkout-container h2,.mp-checkout-container h3,.mp-checkout-container h4,.mp-checkout-container h5,.mp-checkout-container h6,.mp-checkout-container header,.mp-checkout-container hgroup,.mp-checkout-container hr,.mp-checkout-container i,.mp-checkout-container iframe,.mp-checkout-container img,.mp-checkout-container input,.mp-checkout-container ins,.mp-checkout-container kbd,.mp-checkout-container label,.mp-checkout-container legend,.mp-checkout-container li,.mp-checkout-container li input,.mp-checkout-container mark,.mp-checkout-container menu,.mp-checkout-container nav,.mp-checkout-container object,.mp-checkout-container ol,.mp-checkout-container option,.mp-checkout-container output,.mp-checkout-container p,.mp-checkout-container path,.mp-checkout-container pre,.mp-checkout-container q,.mp-checkout-container ruby,.mp-checkout-container s,.mp-checkout-container samp,.mp-checkout-container section,.mp-checkout-container select,.mp-checkout-container small,.mp-checkout-container span,.mp-checkout-container strike,.mp-checkout-container strong,.mp-checkout-container sub,.mp-checkout-container summary,.mp-checkout-container sup,.mp-checkout-container svg,.mp-checkout-container table,.mp-checkout-container tbody,.mp-checkout-container td,.mp-checkout-container tfoot,.mp-checkout-container th,.mp-checkout-container thead,.mp-checkout-container time,.mp-checkout-container tr,.mp-checkout-container tt,.mp-checkout-container u,.mp-checkout-container ul,.mp-checkout-container var,.mp-checkout-container video{border:0!important;font-family:var(--mp-font-family)!important;font-size:var(--mp-font-size-base)!important;font-style:normal!important;line-height:var(--mp-line-height-base)!important;margin:0!important;padding:0!important;vertical-align:baseline!important;width:auto!important}.mp-checkout-container .mp-sr-only{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border:0!important;white-space:nowrap!important}.mp-vertical-line{border-left:1px solid var(--mp-color-border)!important;height:36px!important;width:1px!important}.alert-message{color:var(--mp-color-red);font-weight:700!important}.row-image-select{align-content:center;align-items:center;display:flex!important;flex-direction:row;height:18px;justify-content:space-between;width:100%}.wp-block-woocommerce-checkout .row-image-select img{height:var(--mp-icon-size)!important;max-height:var(--mp-icon-size)!important;max-width:var(--mp-icon-size)!important;order:2;padding:0;width:var(--mp-icon-size)!important}.payment_method_woo-mercado-pago-basic,.payment_method_woo-mercado-pago-credits,.payment_method_woo-mercado-pago-custom,.payment_method_woo-mercado-pago-pix,.payment_method_woo-mercado-pago-pse,.payment_method_woo-mercado-pago-ticket,.payment_method_woo-mercado-pago-yape{label img{margin:-2px 0 0 .5em;position:relative;vertical-align:middle}.row-image-select img,label img{height:var(--mp-icon-size)!important;max-height:var(--mp-icon-size)!important;max-width:var(--mp-icon-size)!important;order:2;padding:0;width:var(--mp-icon-size)!important}}.mp-checkout-container .mp-checkout-andes-input,.mp-checkout-container .mp-checkout-andes-input-error{background:var(--mp-color-white)!important;border:1px solid var(--mp-color-border)!important;border-radius:var(--mp-border-radius)!important;color:var(--mp-color-black)!important;flex-grow:0;flex-shrink:0;font-family:var(--mp-font-family)!important;font-size:var(--mp-font-size-input)!important;font-weight:400!important;height:var(--mp-input-height)!important;line-height:var(--mp-line-height-input)!important;margin:0!important;max-width:100%!important;outline:0!important;padding:0 14px!important}.mp-checkout-container .mp-checkout-andes-input:focus{border-color:var(--mp-color-focus)!important}.mp-checkout-container .mp-checkout-andes-input-error{border-color:var(--mp-color-error)!important}.mp-checkout-container .mp-checkout-andes-input-error:focus{border:2px solid var(--mp-color-border)}.mp-checkout-container .mp-privacy-policy-footer,.mp-checkout-container .mp-privacy-policy-footer *{font-family:var(--primary-font-family)!important;font-size:12px!important;font-weight:400!important;line-height:15px!important}.mp-checkout-container .mp-privacy-policy-footer{align-items:center;color:var(--andes-text-color-primary);display:flex;justify-content:center;text-align:center}.mp-checkout-container .mp-privacy-policy-footer a{color:var(--andes-accent-color)!important;text-decoration:none!important}.mp-display-none{display:none!important}.mp-hidden{margin:0!important;opacity:0!important;padding:0!important;pointer-events:none!important;visibility:hidden!important;z-index:-1!important}.mp-checkout-container .mp-alert-details-card{background:rgb(0 0 0/4%)!important;border-left:4px solid #f23d4f!important;border-radius:6px!important;display:flex!important;flex-direction:column!important;padding:16px!important}.mp-checkout-container .mp-alert-details-card-content{align-items:baseline!important;display:flex!important;flex-direction:row!important;justify-content:flex-start!important}.mp-checkout-container .mp-alert-details-card-content-left{margin-right:8px!important}.mp-checkout-container .mp-alert-details-card-content-right{margin-left:8px!important}.mp-checkout-container .mp-alert-details-badge{align-items:center!important;background:#f23d4f!important;border-radius:50%!important;color:#fff!important;display:flex!important;flex-direction:row!important;height:16px!important;justify-content:center!important;width:16px!important}.mp-checkout-container .mp-alert-details-title{color:rgba(0,0,0,.9)!important;font-weight:700!important;padding:0!important}.mp-checkout-container .mp-alert-details-description,.mp-checkout-container .mp-alert-details-title{font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;line-height:120%!important;margin-block-end:0!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important}.mp-checkout-container .mp-alert-details-description{color:#000!important;font-weight:400!important;margin-top:4px!important}.mp-checkout-container .mp-alert-details-retry-button{background-color:#3483fa!important;border:1px solid #3483fa!important;border-radius:4px!important;color:#fff!important;cursor:pointer!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:32px!important;margin-top:16px!important;outline:0!important;padding:0 12px!important;transition:all .3s ease-in-out!important}.mp-checkout-container .mp-alert-details-retry-button:hover{background-color:#2968c8!important;border:1px solid #2968c8!important}.mp-checkout-container .mp-andes-notice-card{background:rgb(0 0 0/4%)!important;border-left-style:solid!important;border-left-width:4px!important;border-radius:6px!important;display:flex!important;flex-direction:column!important;padding:16px 16px 16px 12px!important}.mp-checkout-container .mp-andes-notice-card.warning{border-left-color:var(--andes-warning-color)!important}.mp-checkout-container .mp-andes-notice-card.error{border-left-color:var(--andes-error-color)!important}.mp-checkout-container .mp-andes-notice-card-content{align-items:baseline!important;display:flex!important;flex-direction:row!important;gap:16px!important;justify-content:flex-start!important}.mp-checkout-container .mp-andes-notice-badge{align-items:center!important;border-radius:12px!important;color:#fff!important;display:flex!important;flex-direction:row!important;font-family:var(--primary-font-family)!important;font-size:small!important;height:16px!important;justify-content:center!important;min-width:16px!important;width:16px!important}.mp-checkout-container .mp-andes-notice-badge.warning{background:var(--andes-warning-color)!important}.mp-checkout-container .mp-andes-notice-badge.error{background:var(--andes-error-color)!important;font-size:x-small!important}.mp-checkout-container .mp-andes-notice-description{color:var(--andes-text-color-primary)!important;color:var(--Text-andes-text-color-primary,rgba(0,0,0,.9));font-family:var(--primary-font-family)!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important}:root{--primary-font-family:"Proxima Nova",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;--mp-font-inter:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;--andes-error-red:#cc1818;--woocommerce-primary:#7f54b3}.mp-checkout-container .mp-input-document .mp-input{align-items:center!important;background:#fff!important;border:1px solid rgba(0,0,0,.25)!important;border-radius:6px!important;box-sizing:border-box!important;display:flex!important;height:48px!important;width:100%!important}.mp-checkout-container .mp-input-document .mp-input.mp-focus{border:2px solid var(--woocommerce-primary)!important}.mp-checkout-container .mp-input-document .mp-input.mp-error{border:1px solid var(--andes-error-red)!important}.mp-checkout-container .mp-input-document .mp-input.mp-error-2px{border:2px solid var(--andes-error-red)!important}.mp-checkout-container #mp-doc-div input-label .mp-input-label.mp-label-error,.mp-checkout-container .mp-checkout-custom-card-row input-label .mp-input-label.mp-label-error{color:var(--andes-error-red)!important}.mp-checkout-container .mp-input-document .mp-input .mp-document-select{background:#fff!important;border:0!important;color:#000!important;cursor:pointer!important;flex-shrink:0!important;font-family:var(--mp-font-inter)!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;height:20px!important;letter-spacing:0!important;line-height:20px!important;margin:0 8px 0 12px!important;min-height:20px!important;min-width:fit-content!important;outline:none!important;padding:0!important}.mp-checkout-container .mp-input-document .mp-input .mp-vertical-line{border-left:1px solid rgba(0,0,0,.25)!important;height:36px!important;width:1px!important}.mp-checkout-container .mp-input-document .mp-input .mp-document{background:#fff!important;border:0!important;border-radius:8px!important;box-shadow:none!important;color:#000!important;flex-grow:1!important;font-family:var(--mp-font-inter)!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;height:20px!important;line-height:20px!important;min-height:38px!important;min-width:0!important;outline:none!important;padding:0 14px!important}.mp-checkout-container .mp-input-document .mp-input .mp-document::placeholder{color:var(--andes-text-color-secondary,rgba(0,0,0,.55))!important;opacity:1!important}.mp-checkout-container .mp-input-document .mp-input-document-helper{color:var(--andes-error-red)!important;display:flex!important;font-family:var(--mp-font-inter)!important;font-size:13px!important;height:18px!important;left:calc(50% - 154.5px)!important;line-height:18px!important;margin-top:5px!important;position:static!important;top:0!important;width:327px!important}.mp-checkout-container .mp-input-document .mp-input-document-helper .mp-input-document-helper-icon{align-items:center!important;background:var(--andes-error-red)!important;border-radius:12px!important;color:#fff!important;display:flex!important;height:15px!important;justify-content:center!important;left:0!important;margin:1px 5px!important;top:3px!important;width:15px!important}#payment .mp-checkout-container .mp-document-select,.mp-document-select{appearance:auto;cursor:pointer!important;letter-spacing:0!important;margin:0 8px!important;width:25%!important}.mp-checkout-container .mp-document-select,.mp-checkout-container .mp-input-document{background:var(--mp-color-white)!important;border:0!important;color:var(--mp-color-black)!important;font-family:var(--mp-font-inter)!important;font-size:var(--mp-font-size-base)!important;font-style:normal!important;font-weight:400!important;line-height:var(--mp-line-height-input)!important;outline:0!important}.mp-checkout-container .mp-input-document{border-radius:var(--mp-border-radius-lg)!important;box-shadow:none!important;margin-bottom:24px!important;width:100%!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-field{width:100%!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-field .mp-yape-input{align-items:center!important;background:#fff!important;border:1px solid rgba(0,0,0,.25)!important;border-radius:8px!important;box-sizing:border-box!important;display:flex!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;gap:8px!important;line-height:20px!important;max-height:48px;max-width:276px;padding:14px 24px 14px 12px!important;width:100%!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-field .mp-yape-input.mp-input-field-focus{border:1px solid var(--andes-accent-color)!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-field .mp-yape-input.mp-input-field-error{border:1px solid #f23d4f!important}:root{--andes-font-style:"Proxima Nova",-apple-system,"Helvetica Neue",Helvetica,"Roboto",Arial,sans-serif}.mp-checkout-container .mp-helper{align-items:center!important;display:none;margin:4px 6px 0!important}.mp-checkout-container .mp-helper .mp-helper-message{font-family:var(--mp-font-inter)!important;font-size:13px!important;line-height:18px!important;text-align:left!important}.mp-checkout-container .mp-helper .mp-helper-message.error{color:var(--andes-error-red)!important;font-weight:600!important;padding-top:4px 6px 0!important}.mp-checkout-container .mp-helper .mp-helper-message.info,.mp-checkout-container .mp-helper .mp-helper-message.message{color:var(--andes-gray-550)!important;font-weight:400!important}.mp-checkout-container .mp-helper .mp-helper-icon{display:flex!important;height:12px!important;margin-right:6px!important;width:12px!important}.mp-checkout-container .mp-helper .helper .mp-helper-icon{display:none}.mp-checkout-container .mp-input-label{color:var(--andes-gray-900)!important;display:block!important;font-family:var(--mp-font-inter)!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important;padding-bottom:4px!important;padding-left:6px!important;width:100%!important}.mp-checkout-container .mp-input-label b{padding-left:4px!important}.mp-checkout-container .mp-input-radio-container{display:flex;position:relative!important}.mp-checkout-container .mp-input-radio-radio:checked,.mp-checkout-container .mp-input-radio-radio:not(:checked){opacity:0!important}.mp-checkout-container .mp-input-radio-radio:checked+.mp-input-radio-label,.mp-checkout-container .mp-input-radio-radio:not(:checked)+.mp-input-radio-label{color:#666!important;cursor:pointer!important;display:inline-block;line-height:20px!important}.mp-checkout-container .mp-input-radio-radio:checked+.mp-input-radio-label:before,.mp-checkout-container .mp-input-radio-radio:not(:checked)+.mp-input-radio-label:before{background:#fff!important;border:2px solid rgba(0,0,0,.25)!important;border-radius:100%!important;box-sizing:border-box!important;content:""!important;height:16px!important;left:0!important;position:absolute!important;top:0!important;width:16px!important}.mp-checkout-container .mp-input-radio-radio:checked+.mp-input-radio-label:before{border:2px solid #7f54b3!important}.mp-checkout-container .mp-input-radio-radio:checked+.mp-input-radio-label:after,.mp-checkout-container .mp-input-radio-radio:not(:checked)+.mp-input-radio-label:after{background:#7f54b3!important;border-radius:100%!important;box-sizing:border-box!important;content:""!important;height:8px!important;left:4px!important;position:absolute!important;top:4px!important;width:8px!important}.mp-checkout-container .mp-input-radio-radio:not(:checked)+.mp-input-radio-label:after{opacity:0!important}.mp-checkout-container .mp-input-radio-radio:checked+.mp-input-radio-label:after{opacity:1!important}.mp-checkout-container .mp-input-select-input{align-items:center!important;background:#fff!important;border-radius:8px!important;display:flex!important;height:48px!important}.mp-checkout-container .mp-input-select-select{background:var(--andes-white)!important;border:1px solid var(--andes-gray-250)!important;border-radius:6px!important;color:var(--andes-gray-900)!important;font-family:var(--mp-font-inter)!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;height:48px!important;line-height:20px!important;outline:0!important;padding:14px 12px!important;text-align:left!important;width:100%!important}.mp-checkout-container .mp-input-table-container{align-items:center!important;display:flex!important;flex-direction:column!important;justify-content:center!important;width:100%!important}.mp-checkout-container .mp-input-table-list{border:1px solid rgba(0,0,0,.25)!important;border-radius:6px!important;display:flex!important;flex-direction:column!important;list-style-type:none!important;margin-left:0!important;width:100%!important}.mp-checkout-container .mp-input-table-item{cursor:pointer!important;margin:0 16px!important;padding:0 4px 0 0!important}.mp-checkout-container .mp-input-table-item:not(:first-child){border-top:1px solid rgba(0,0,0,.1)!important}.mp-checkout-container .mp-input-table-label{align-items:center!important;cursor:pointer!important;display:flex!important;justify-content:space-between!important;padding:16px 0!important;width:100%!important}.mp-checkout-container .mp-input-table-option{align-items:center!important;display:flex!important;justify-content:flex-start!important}.mp-checkout-container .mp-input-table-row-text{color:rgba(0,0,0,.9)!important}.mp-checkout-container .mp-input-table-row-text,.mp-checkout-container .mp-input-table-row-text-image{font-family:var(--primary-font-family)!important;font-size:16px!important;font-style:normal!important;font-weight:700!important;line-height:20px!important;padding-left:16px!important}.mp-checkout-container .mp-input-table-row-text-image{align-items:center!important;color:#000000e5!important;display:flex!important;flex-direction:row-reverse!important}.mp-checkout-container .mp-input-table-row-obs{color:rgba(0,0,0,.55)!important;text-align:right!important}.mp-checkout-container .mp-input-table-row-obs,.mp-checkout-container .mp-input-table-row-obs-highlight{font-family:var(--primary-font-family)!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important}.mp-checkout-container .mp-input-table-row-obs-highlight{color:#00a650!important}.mp-checkout-container .mp-input-table-container-link{align-items:center!important;display:flex!important;justify-content:center!important;padding:16px 0 24px!important}.mp-checkout-container .mp-input-table-link{color:var(--andes-accent-color)!important;cursor:pointer!important;font-family:var(--primary-font-family)!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;line-height:16px!important;text-decoration:none!important}.mp-checkout-container .mp-input-table-link:hover{color:#7249a5!important;transition:all .3ms!important}.mp-checkout-container .mp-input-table-bank-interest-container{align-items:center!important;display:flex!important;justify-content:flex-start!important;width:100%!important}.mp-checkout-container .mp-input-table-bank-interest-text{color:#737373!important;font-family:var(--primary-font-family)!important;font-size:13px!important;font-weight:400!important;margin:0!important;margin-block-end:0!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important;max-width:100%!important;padding:8px 0 0 4px!important;word-break:break-word!important}.mp-checkout-container .mp-input-with-tooltip-label{color:#000000e5;display:block;font-family:Proxima Nova,-apple-system,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif!important;font-size:14px;font-weight:400;margin-bottom:6px;margin-left:6px}.mp-checkout-container .mp-input-with-tooltip-input-container{align-items:center;background:#fff;border:1px solid #bfbfbf;border-radius:.375em;display:flex;font-family:Proxima Nova,-apple-system,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif!important;height:48px;position:relative;width:100%}.mp-checkout-container .mp-input-with-tooltip-input-container:focus-within{border-color:#1976d2}.mp-checkout-container .mp-input-with-tooltip-input{background:transparent;border:none;color:#222;flex:1;font-family:inherit;font-family:Proxima Nova,-apple-system,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif!important;font-size:16px;height:100%;margin:14px 12px;outline:none;outline:none!important;width:100%}.mp-checkout-container .mp-input-with-tooltip-input::placeholder{color:#737373!important}.mp-checkout-container .mp-input-with-tooltip-input::placeholder{color:#b0b0b0;font-size:16px;opacity:1}.mp-checkout-container .mp-input-with-tooltip-tooltip-icon{align-items:center;background:#fff;border:1px solid #3483fa;border-radius:50%;box-sizing:border-box;color:#3483fa!important;cursor:pointer;display:flex;font-family:sans-serif!important;font-size:16px;font-weight:500!important;height:18px;justify-content:center;margin-right:12px;outline:none;padding:9px;position:relative;user-select:none;width:18px;z-index:2}.mp-checkout-container .mp-input-with-tooltip-tooltip-icon:focus{box-shadow:0 0 0 2px #90caf9}.mp-checkout-container .mp-input-with-tooltip-tooltip-content{background:#fff;border:1px solid #e0e0e0;border-radius:1rem;box-shadow:0 2px 8px 0 rgba(60,60,60,.15);color:#222;display:none;font-weight:400;padding:15px;pointer-events:none;position:absolute;user-select:none;z-index:10}.mp-checkout-container .mp-input-with-tooltip-tooltip-content.show{display:block}.mp-checkout-container .mp-input-with-tooltip-tooltip-right{left:100%;min-width:220px;position:absolute;top:50%;transform:translateY(-50%) translateX(1.2rem)}.mp-checkout-container .mp-input-with-tooltip-tooltip-right:before{border-bottom:10px solid transparent;border-right:13px solid #fff;border-top:10px solid transparent;content:"";height:0;left:-12px;position:absolute;top:50%;transform:translateY(-50%);width:0;z-index:2}.mp-checkout-container .mp-input-with-tooltip-tooltip-right:after{border-bottom:12px solid transparent;border-right:16px solid rgba(60,60,60,.12);border-top:12px solid transparent;content:"";filter:blur(2px);height:0;left:-15px;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%) translateX(-2px);width:0;z-index:1}.mp-checkout-container .mp-input-with-tooltip-tooltip-left{left:0;min-width:220px;position:absolute;top:50%;transform:translateX(-110%) translateY(-50%)}.mp-checkout-container .mp-input-with-tooltip-tooltip-left:before{border-bottom:10px solid transparent;border-left:13px solid #fff;border-top:10px solid transparent;content:"";height:0;left:99%;position:absolute;top:50%;transform:translateY(-50%);width:0;z-index:2}.mp-checkout-container .mp-input-with-tooltip-tooltip-left:after{border-bottom:12px solid transparent;border-left:16px solid rgba(60,60,60,.12);border-top:12px solid transparent;content:"";filter:blur(2px);height:0;left:99%;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%) translateX(2px);width:0;z-index:1}.mp-checkout-container .mp-input-with-tooltip-tooltip-top{bottom:100%;left:50%;min-width:220px;position:absolute;transform:translateX(-50%) translateY(-1.2rem)}.mp-checkout-container .mp-input-with-tooltip-tooltip-top:before{border-left:10px solid transparent;border-right:10px solid transparent;border-top:13px solid #fff;bottom:-11px;content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.mp-checkout-container .mp-input-with-tooltip-tooltip-top:after{border-left:12px solid transparent;border-right:12px solid transparent;border-top:16px solid rgba(60,60,60,.12);bottom:-15px;content:"";filter:blur(2px);height:0;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%) translateY(2px);width:0;z-index:1}.mp-checkout-container .mp-input-with-tooltip-tooltip-bottom{left:50%;min-width:220px;position:absolute;top:100%;transform:translateX(-50%) translateY(1.2rem)}.mp-checkout-container .mp-input-with-tooltip-tooltip-bottom:before{border-left:10px solid transparent;border-right:10px solid transparent;border-top:13px solid #fff;content:"";height:0;left:50%;position:absolute;top:-10px;transform:translateX(-50%) rotate(180deg);width:0;z-index:2}.mp-checkout-container .mp-input-with-tooltip-tooltip-bottom:after{border-left:12px solid transparent;border-right:12px solid transparent;border-top:16px solid rgba(60,60,60,.12);content:"";filter:blur(2px);height:0;left:50%;pointer-events:none;position:absolute;top:-13px;transform:translateX(-50%) translateY(-2px) rotate(180deg);width:0;z-index:1}.mp-checkout-container .mp-input-with-tooltip-helper-error{align-items:center;color:#e53935;font-family:Proxima Nova,-apple-system,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif!important;font-size:13px;font-weight:500;gap:6px;margin-left:6px;margin-top:4px}.mp-checkout-container .mp-input-with-tooltip-input-container.error{border-color:#e53935!important}.mp-checkout-container .mp-input-with-tooltip-label.error{color:#e53935!important}.mp-checkout-container .mp-payment-method-logo-container,.mp-checkout-container .mp-payment-method-logo-slider-container{align-items:center!important;background:#fff!important;border:1px solid #e5e5e5!important;border-radius:4px!important;box-sizing:border-box!important;display:flex;height:24px!important;justify-content:center!important;padding:4px!important;width:36px!important}.mp-checkout-container .mp-payment-method-logo-image{float:none!important;font-size:10px!important;height:auto!important;margin:0!important;max-height:100%!important;max-width:100%!important;overflow:hidden!important;position:inherit!important;text-overflow:ellipsis!important;width:auto!important}.mp-checkout-container .mp-payment-methods-container{display:flex;flex-direction:column!important;height:100%!important;width:100%!important}.mp-checkout-container .mp-payment-methods-container p{padding:0!important}.mp-checkout-container .mp-payment-methods-header{align-items:center!important;display:flex;height:100%!important;justify-content:flex-start!important;padding:0 4px 16px!important;width:100%!important}.mp-checkout-container .mp-payment-methods-title{align-items:center!important;color:rgba(0,0,0,.55)!important;display:flex;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important;margin-block-end:0!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important}.mp-checkout-container .mp-payment-methods-badge{align-items:center!important;background:#00a650!important;border-bottom-right-radius:8px!important;display:flex;justify-content:center!important;margin-left:10px!important;padding:6px 8px 4px!important}.mp-checkout-container .mp-payment-methods-badge-text{align-items:center!important;color:#fff!important;display:flex;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:11px!important;font-style:normal!important;font-weight:700!important;line-height:11px!important;text-align:center!important;text-transform:uppercase!important}.mp-checkout-container .mp-payment-method-type-container{display:flex;flex-direction:column!important;height:100%!important;width:100%!important}.mp-checkout-container .mp-payment-methods-content{align-items:center!important;display:flex;flex-wrap:wrap!important;height:100%!important;justify-content:flex-start!important;padding-bottom:16px!important;width:100%!important}.mp-checkout-container .mp-payment-methods-content payment-method-logo{padding:0 4px 8px!important}.mp-checkout-container .mp-payment-methods-link{box-shadow:none!important;color:#7f54b3!important;cursor:pointer!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important;text-decoration:none!important;vertical-align:middle!important}.mp-checkout-container .mp-payment-methods-link:hover{color:rgba(0,0,0,.55)!important}.mp-checkout-container #mp-checkout-pix-root.mp-checkout-pix-container .mp-pix-template-container{align-items:center!important;background-color:#fff!important;display:flex!important;flex-direction:column!important;justify-content:center!important;text-align:center!important}.mp-checkout-container #mp-checkout-pix-root.mp-checkout-pix-container .mp-pix-template-image{float:none!important;font-size:10px!important;height:auto!important;margin:0!important;max-height:100%!important;max-width:240px!important;overflow:hidden!important;padding-bottom:42px!important;position:inherit!important;text-overflow:ellipsis!important;width:100%!important}.mp-checkout-container #mp-checkout-pix-root.mp-checkout-pix-container .mp-pix-template-title{font-size:16px!important;font-weight:700!important;padding-bottom:16px!important}.mp-checkout-container #mp-checkout-pix-root.mp-checkout-pix-container .mp-pix-template-subtitle,.mp-checkout-container #mp-checkout-pix-root.mp-checkout-pix-container .mp-pix-template-title{color:rgba(0,0,0,.9)!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-style:normal!important;line-height:18px!important;margin-block-end:0!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important}.mp-checkout-container #mp-checkout-pix-root.mp-checkout-pix-container .mp-pix-template-subtitle{font-size:14px!important;font-weight:400!important}.mp-checkout-container .mp-terms-and-conditions-link,.mp-checkout-container .mp-terms-and-conditions-text{color:rgba(0,0,0,.55)!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important;padding-right:4px!important}.mp-checkout-container .mp-terms-and-conditions-link{color:var(--andes-accent-color)!important;text-decoration:none!important}.mp-checkout-container .mp-terms-and-conditions-link:hover{color:#3483fa!important;transition:all .3ms!important}.mp-checkout-container .mp-test-mode-container{padding:0 0 25px!important}.mp-checkout-container .mp-checkout-pse-test-mode{padding-bottom:24px!important}.mp-checkout-container .mp-test-mode-card{background:rgb(0 0 0/4%)!important;border-left:4px solid #f73!important;border-radius:6px!important;display:flex!important;flex-direction:column!important;padding:16px!important}.mp-checkout-container .mp-test-mode-badge{align-items:center!important;background:#f73!important;border-radius:12px!important;color:#fff!important;display:flex!important;flex-direction:row!important;height:16px!important;justify-content:center!important;margin-right:16px!important;min-width:16px!important;width:16px!important}.mp-checkout-container .mp-test-mode-title{color:rgba(0,0,0,.9)!important;font-weight:700!important;margin-left:16px!important;padding:0!important}.mp-checkout-container .mp-test-mode-description,.mp-checkout-container .mp-test-mode-title{font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;line-height:120%!important;margin-block-end:0!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important}.mp-checkout-container .mp-test-mode-description{color:#000!important;font-weight:400!important;padding-left:32px!important;padding-top:4px!important}.mp-checkout-container .mp-test-mode-card-content{align-items:baseline!important;display:flex!important;flex-direction:row!important;justify-content:flex-start!important}.mp-checkout-container .mp-test-mode-link{color:#7f54b3!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:14px!important;font-style:normal!important;font-weight:400!important;line-height:16px!important;text-decoration:none!important}.mp-checkout-container .mp-test-mode-link:hover{color:#7249a5!important;transition:all .3ms!important}.payment_method_woo-mercado-pago-credits>label>img{height:32px!important;width:32px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-credits-terms-and-conditions{align-items:center!important;display:flex!important;justify-content:center!important;padding-top:16px!important;text-align:center!important}#mp-checkout-credits-root.mp-checkout-credits-container{background-color:#fff!important;display:flex!important;flex-direction:column!important;justify-content:center!important;padding:24px 16px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-test-mode-card{margin-bottom:24px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-credits-content{background-color:#fff!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-credits-test-mode{padding:0 0 25px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-credits-checkout-benefits{padding:40px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-container{display:flex;flex-direction:column!important;font-family:var(--primary-font-family)!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-container p{padding:0!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-title{color:#1a1a1a!important;font-size:18px!important;font-style:normal!important;font-weight:600!important;line-height:24px!important;margin-block-end:32px!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important;text-align:left!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list{display:flex;flex-direction:column!important;gap:16px!important;line-height:18px!important;list-style-type:none!important;margin-block-end:0!important;margin-block-start:0!important;margin-inline-end:0!important;margin-inline-start:0!important;padding-inline-start:0!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-item{align-items:center!important;display:flex;font-size:14px!important;font-weight:600;justify-content:flex-start!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-item span{color:rgba(0,0,0,.55)!important;font-weight:400}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-item>span>b{font-size:14px!important;font-weight:600}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-benefits-list-count-list-item{color:var(--andes-accent-color)!important;font-weight:600!important;line-height:0!important;margin-right:8px!important;text-align:center!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-container{align-items:center;background-color:#f5f5f5!important;display:flex;flex-direction:column;padding:16px 40px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-container p{color:var(--andes-text-color-secondary)!important;font-family:var(--primary-font-family)!important;font-size:12px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-title-container{align-items:center!important;display:flex!important;gap:12px!important;justify-content:left!important;margin-bottom:8px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-mp-logo-image{margin:0!important;width:20px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-title{font-weight:600!important;margin:0!important;size:12px!important;color:rgba(0,0,0,.55)!important;line-height:15px!important}#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-description{font-weight:400!important;margin:0!important;size:12px!important;color:rgba(0,0,0,.55)!important;line-height:16px!important}@media (max-width:768px){#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-container{background-color:#f5f5f5!important;font-family:var(--primary-font-family)!important;padding:16px 20px!important}}@media (max-width:400px){#mp-checkout-credits-root.mp-checkout-credits-container .mp-checkout-redirect-v3-container{background-color:#f5f5f5!important;font-family:var(--primary-font-family)!important;padding:16px 20px!important}}@media only screen and (max-width:768px){#mp-checkout-credits-root.mp-checkout-credits-container .mp-credits-checkout-benefits{padding:40px 20px!important}}.wc-block-components-radio-control-accordion-content{padding:2px!important}#top #payment #mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form .payment_box.payment_method_woo-mercado-pago-custom{padding:0!important;width:100%!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-row.mp-checkout-custom-dual-column-row{flex-direction:row!important;padding-bottom:0!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form #mp-doc-div.mp-checkout-custom-input-document{padding:0!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form #mp-doc-div .mp-input-document{margin-bottom:0!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-checkout-custom-issuers-container.mp-checkout-custom-issuers-container{display:block;padding:0 0 32px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-checkout-custom-installments-card #mp-checkout-custom-issuers-container.mp-checkout-custom-issuers-container-display-none{display:none;padding:0 0 32px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-checkout-custom-installments-card.mp-checkout-custom-installments-display-none{display:none;margin-top:32px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__expirationDate-container.mp-checkout-custom-left-card-input{margin-right:16px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-card-holder-div input.mp-checkout-custom-card-input.mp-card-holder-name{box-sizing:border-box!important;margin:0!important;padding-left:14px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-card-holder-div input.mp-checkout-custom-card-input.mp-card-holder-name.mp-focus{border:2px solid var(--woocommerce-primary)!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-card-holder-div input.mp-checkout-custom-card-input.mp-card-holder-name.mp-error-2px{border:2px solid var(--andes-error-red)!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-card-holder-div input.mp-card-holder-name.mp-error{border:1px solid var(--andes-error-red)!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #mp-card-holder-div input.mp-checkout-custom-card-input.mp-card-holder-name::placeholder{color:var(--andes-text-color-secondary,rgba(0,0,0,.55))!important;opacity:1!important}#mp-checkout-custom-root .mp-checkout-custom-container{background-color:#fff!important;display:flex;flex-direction:column!important;justify-content:center!important;padding:20px 24px 40px!important}#mp-checkout-custom-root .mp-checkout-custom-container .mp-test-mode-card{margin-bottom:24px!important}#mp-checkout-custom-root .mp-checkout-custom-container #mp-custom-checkout-form-container iframe{max-width:100%!important}#mp-checkout-custom-root .mp-checkout-custom-container .mp-wallet-button-container-wrapper{align-items:center;display:flex;flex-direction:column;justify-content:center;margin-bottom:24px!important;width:auto!important}#mp-checkout-custom-root .mp-wallet-button-container-wrapper .mp-wallet-button-container{align-items:center;border:1px solid rgba(0,0,0,.1)!important;border-radius:6px!important;box-sizing:border-box!important;display:flex;flex-direction:column!important;gap:20px!important;height:auto!important;margin-bottom:32px!important;max-width:416px!important;padding:24px 16px!important;width:100%!important}#mp-checkout-custom-root .mp-wallet-button-container-wrapper .mp-wallet-button-title{align-items:center!important;color:rgba(0,0,0,.9)!important;display:flex!important;flex-direction:column!important}#mp-checkout-custom-root .mp-wallet-button-container-wrapper .mp-wallet-button-container .mp-wallet-button-title span{color:#000000e6!important;font-family:var(--primary-font-family)!important;font-size:18px!important;font-style:normal!important;font-weight:600!important;line-height:24px!important;text-align:center}#mp-checkout-custom-root .mp-wallet-button-container-wrapper .mp-wallet-button-button{display:flex;justify-content:center;width:100%!important}#mp-checkout-custom-root .mp-wallet-button-container-wrapper .mp-wallet-button-container .mp-wallet-button-button button#mp-wallet-button:hover{background-color:#fbd100}#mp-checkout-custom-root .mp-wallet-button-container-wrapper .mp-wallet-button-container .mp-wallet-button-button button#mp-wallet-button:focus{box-shadow:0 0 0 2px #fff,0 0 0 3px #2968c8,0 0 0 5px rgba(65,137,230,.3);outline:none!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form{display:flex!important;flex-direction:column!important;gap:32px!important;justify-content:flex-start!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form .mp-checkout-custom-card-row{display:flex;flex-direction:column;justify-content:space-between}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container{display:flex;flex-direction:column;margin:0!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-installments-tax-info{background-color:transparent!important;font-style:normal!important;font-weight:600!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-installments-bank-interest-hint,#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-installments-tax-info{color:var(--andes-text-color-secondary,rgba(0,0,0,.55))!important;font-family:var(--primary-font-family)!important;font-size:13px!important;line-height:18px!important;margin-top:4px!important;padding-left:6px!important}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container .mp-custom-checkout-select-input,#mp-checkout-custom-root #mp-checkout-custom-issuers-container .mp-custom-checkout-select-input{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;background:var(--andes-white)!important;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' fill='none' viewBox='0 0 13 8'%3E%3Cpath fill='rgba(0,0,0,0.9)' d='m1.702.756 4.796 4.796 4.8-4.801.849.848-5.65 5.65L.855 1.605z'/%3E%3C/svg%3E")!important;background-position:right 12px center!important;background-repeat:no-repeat!important;border:1px solid var(--andes-gray-250)!important;border-radius:6px!important;box-shadow:unset!important;color:rgba(0,0,0,.55)!important;font-family:var(--mp-font-inter)!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;height:48px!important;line-height:20px!important;margin:0!important;outline:0!important;padding:12px 40px 12px 12px!important;text-align:left!important;visibility:visible!important;width:100%!important}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container .mp-custom-checkout-select-input:has(option:not([disabled]):checked),#mp-checkout-custom-root #mp-checkout-custom-issuers-container .mp-custom-checkout-select-input:has(option:not([disabled]):checked){color:var(--andes-gray-900)!important}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container .mp-custom-checkout-select-input option,#mp-checkout-custom-root #mp-checkout-custom-issuers-container .mp-custom-checkout-select-input option{color:var(--andes-gray-900)!important}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container .mp-custom-checkout-select-input:focus-visible,#mp-checkout-custom-root #mp-checkout-custom-issuers-container .mp-custom-checkout-select-input:focus-visible{border:2px solid var(--woocommerce-primary)!important}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container .mp-input-label.mp-label-error{color:var(--andes-error-red)!important}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container .mp-custom-checkout-select-input.mp-error{border:1px solid var(--andes-error-red)!important}#mp-checkout-custom-root #mp-checkout-custom-installments-card .mp-checkout-custom-installments-select-container .mp-custom-checkout-select-input.mp-error-2px{border:2px solid var(--andes-error-red)!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form .mp-checkout-custom-card-column{display:flex;flex-direction:column;justify-content:flex-start;width:50%!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form input-helper #mp-card-holder-name-helper-info{color:var(--andes-text-color-secondary,rgba(0,0,0,.55));font-size:13px!important;font-style:normal!important;font-weight:400!important;line-height:18px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form .mp-checkout-custom-card-input{background:var(--andes-white)!important;border:1px solid var(--andes-gray-250)!important;border-radius:6px!important;color:var(--andes-gray-900)!important;font-family:var(--mp-font-inter)!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;height:48px!important;line-height:20px!important;outline:0!important;padding:0!important;text-align:left!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__cardNumber-container{position:relative!important;width:100%!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__cardNumber-container,#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__expirationDate-container,#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__securityCode-container{&.mp-checkout-custom-card-form-focus{border:2px solid var(--woocommerce-primary)!important}&.mp-error{border:1px solid var(--andes-error-red)!important}&.mp-error.mp-checkout-custom-card-form-focus{border:2px solid var(--andes-error-red)!important}}input-label:has(+#form-checkout__cardNumber-container.mp-error) .mp-input-label,input-label:has(+#form-checkout__expirationDate-container.mp-error) .mp-input-label,input-label:has(+.mp-checkout-custom-security-code-container #form-checkout__securityCode-container.mp-error) .mp-input-label{color:var(--andes-error-red)!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__cardNumber-container.mp-card-icon-detected{box-sizing:border-box!important;padding-right:36px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__cardNumber-container.mp-card-icon-detected:before{align-items:center!important;background-image:var(--card-brand-icon)!important;background-position:50%!important;background-repeat:no-repeat!important;background-size:32px 24px!important;border:1px solid var(--andes-gray-100-solid)!important;border-radius:4px!important;box-sizing:border-box!important;content:""!important;display:flex!important;height:32px!important;justify-content:center!important;pointer-events:none!important;position:absolute!important;right:8px!important;top:50%!important;transform:translateY(-50%)!important;width:32px!important}:has(>.mp-checkout-custom-load){padding:0!important}.mp-checkout-custom-load{align-items:center;background-color:#f9f9f9!important;display:flex;height:288px!important;justify-content:center;opacity:1;padding:16px;visibility:visible}.mp-checkout-custom-load:not(.mp-display-none){max-height:1000px!important;opacity:1!important;position:relative!important;visibility:visible!important}.mp-checkout-custom-load.mp-hidden{opacity:0!important;pointer-events:none!important;transition:opacity .5s ease-out,visibility .5s ease-out!important;visibility:hidden!important}.spinner-card-form{animation:rotate 3s linear infinite;height:48px!important;width:48px!important}.spinner-card-form .spinner-path{stroke:var(--andes-accent-color)!important;stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}@keyframes rotate{to{transform:rotate(1turn)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}#mp-loading-container-3ds .mp-spinner-3ds{animation:spin 2s linear infinite;border:4px solid rgba(0,0,255,.1);border-radius:50%;border-top:4px solid var(--andes-accent-color);height:40px;margin:auto;width:40px}#mp-3ds-modal-container.mp-3ds-modal{align-items:center;background-color:rgba(0,0,0,.7);display:none;display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%;z-index:9999}#mp-3ds-modal-content{align-items:center;background-color:#fff;border-radius:6px;justify-content:center;padding:48px;width:800px}#mp-3ds-modal-content>div{align-items:center;flex-direction:column;justify-content:center;width:100%}#mp-3ds-modal-close{cursor:pointer;float:right}#mp-loading-container-3ds{display:flex;flex-direction:column;gap:12px;height:274px;margin:auto;position:relative;width:704px}#mp-loading-container-3ds .mp-loading-text-3ds{font-family:Proxima Nova,sans-serif;font-size:24px;font-weight:600;padding-top:24px;text-align:center}#mp-loading-container-3ds .mp-loading-text-3ds>p{margin-bottom:12px}#mp-3ds-frame{border:none;display:block;margin:auto;min-height:500px;min-width:600px}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}#mp-3ds-modal-container .mp-card-info{align-items:center;display:-webkit-inline-box;justify-content:center;margin-bottom:8px}#mp-3ds-modal-container .mp-alert-color-success{background:var(--andes-accent-color);border-radius:6px 0 0 6px;width:6px}#mp-3ds-modal-container .mp-icon-badge-info{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0ibm9uZSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IiMzNDgzRkEiIHJ4PSI4Ii8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTcuODg1IDUuNDQyYS44Ni44NiAwIDEgMCAwLTEuNzIxLjg2Ljg2IDAgMCAwIDAgMS43Mk0xMC4yNiAxMS4xNDV2MUg1LjgwNHYtMUg3LjI3VjcuNDI3aC0xLjExdi0xSDguNzN2NC43MTh6Ii8+PC9zdmc+) 100% 50% no-repeat transparent;background-size:18px;height:18px;margin:0 12px 0 10px;min-block-size:-webkit-fill-available;width:24px}#mp-3ds-modal-container .mp-card-body-3ds{align-items:center;background:rgba(0,0,0,.04);border-radius:0 6px 6px 0;display:flex;height:30px;justify-content:flex-start;padding:5px 0;width:100%}#mp-3ds-modal-container .mp-text-subtitle{font-family:Proxima Nova,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:18px;vertical-align:middle}#mp-modal-3ds-title{font-family:Proxima Nova,sans-serif;font-style:normal;font-weight:600;margin-bottom:8px;text-align:left}#content-load-3ds{align-self:stretch;display:flex;flex-direction:column;flex-shrink:0;gap:12px;width:704px}#mp-loading-container-3ds .mp-normal-text-3ds{text-align:center}@media screen and (max-width:670px){#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-row.mp-checkout-custom-dual-column-row{flex-direction:column!important;gap:32px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-form .mp-checkout-custom-card-column{width:100%!important}#mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__expirationDate-container.mp-checkout-custom-left-card-input{margin-right:0!important}}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container{position:relative!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container .mp-checkout-custom-security-code-input{background:#fff!important;border:1px solid #bfbfbf!important;border-radius:6px!important;color:#222!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;font-style:normal!important;font-weight:400!important;height:48px!important;line-height:20px!important;outline:0!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container .mp-checkout-custom-security-code-tooltip{align-items:center!important;background:var(--andes-white)!important;border:2px solid var(--andes-text-color-secondary)!important;border-radius:50%!important;box-sizing:border-box!important;color:var(--andes-text-color-secondary)!important;cursor:pointer!important;display:flex!important;font-size:16px!important;font-weight:500!important;height:20px!important;justify-content:center!important;outline:none!important;position:absolute!important;right:12px!important;top:50%!important;transform:translateY(-50%)!important;user-select:none!important;width:20px!important;z-index:500!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container .mp-checkout-custom-security-code-tooltip:hover:after{align-items:flex-start!important;background:var(--andes-gray-900-solid)!important;border:none!important;border-radius:6px!important;box-shadow:0 2px 8px 0 rgba(60,60,60,.15)!important;color:#fff!important;content:attr(data-tooltip)!important;display:flex!important;font-family:var(--mp-font-inter)!important;font-size:14px!important;font-weight:400!important;justify-content:flex-start!important;line-height:17px!important;margin-top:12px!important;min-height:68px!important;padding:16px!important;pointer-events:none!important;position:absolute!important;right:0!important;text-align:left!important;top:100%!important;user-select:none!important;white-space:normal!important;width:312px!important;z-index:10!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container .mp-checkout-custom-security-code-tooltip:hover:before{border:4px solid transparent!important;border-bottom:4px solid var(--andes-gray-900-solid)!important;content:""!important;margin-top:4px!important;position:absolute!important;right:8px!important;top:100%!important;z-index:11!important}#mp-checkout-custom-root .mp-checkout-custom-container .mp-checkout-custom-card-flags{margin-bottom:32px!important}#mp-checkout-custom-root .mp-checkout-custom-container .mp-checkout-custom-card-flags-list{display:flex!important;flex-wrap:wrap!important;gap:8px!important;justify-content:flex-start!important;list-style:none!important}@media screen and (max-width:767px){#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container .mp-checkout-custom-security-code-tooltip:hover:after{right:-50px!important;text-align:left!important;white-space:normal!important;width:200px!important}#mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-column .mp-checkout-custom-security-code-container .mp-checkout-custom-security-code-tooltip:hover:before{right:8px!important}}#mp-checkout-pix-root.mp-checkout-pix-container{background-color:#fff!important;display:flex;flex-direction:column!important;justify-content:center!important;padding:24px 16px!important}#mp-checkout-pix-root.mp-checkout-pix-container .mp-checkout-pix-test-mode{padding-bottom:32px!important}#mp-checkout-pix-root.mp-checkout-pix-container .mp-checkout-pix-terms-and-conditions{align-items:center!important;display:flex;justify-content:center!important;padding-top:42px!important;text-align:center!important}#mp-checkout-pro-label img{height:32px;max-height:32px;width:32px}#mp-checkout-pro-root.mp-checkout-pro-container img{margin:0!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-test-mode-card{margin-bottom:24px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content{background:#fff;padding:24px 16px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits-title{color:rgba(0,0,0,.9);font-size:18px!important;font-weight:600!important;line-height:22px!important;text-align:center}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits{display:flex;gap:24px;justify-content:center;padding:32px 0!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits .mp-checkout-pro-benefit{display:flex;flex:1}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits .mp-checkout-pro-benefit img.mp-checkout-pro-benefit-icon{height:16px!important;margin-right:8px!important;width:16px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits .mp-checkout-pro-benefit .mp-checkout-pro-benefit-description,#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits .mp-checkout-pro-benefit .mp-checkout-pro-benefit-description b{color:rgba(0,0,0,.55);font-size:14px!important;line-height:18px!important;text-align:left}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits .mp-checkout-pro-benefit .mp-checkout-pro-benefit-description{font-weight:400!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits .mp-checkout-pro-benefit .mp-checkout-pro-benefit-description b{font-weight:600!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-payment-methods{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;padding-bottom:40px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-payment-methods img.mp-checkout-pro-payment-method-icon{border-radius:4px;box-shadow:inset 0 0 0 1px #e5e5e5!important;height:24px!important;padding:0 4px!important;width:24px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-redirect{align-items:center;background:#f5f5f5;display:flex;flex-direction:column;gap:8px;padding:16px 40px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-redirect .mp-checkout-pro-redirect-title{align-items:center;color:rgba(0,0,0,.55);display:flex;font-size:12px!important;font-weight:600!important;line-height:15px!important;text-transform:none}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-redirect img.mp-checkout-pro-redirect-icon{margin-right:8px!important;width:20px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-redirect .mp-checkout-pro-redirect-description{color:rgba(0,0,0,.55);font-size:12px!important;font-weight:400!important;line-height:15px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-terms-and-conditions{align-items:center!important;display:flex!important;justify-content:center!important;padding-top:16px!important;text-align:center!important}@media only screen and (max-width:768px){#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content{padding:24px 20px!important}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits-title{text-align:left}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-benefits{flex-direction:column}#mp-checkout-pro-root.mp-checkout-pro-container .mp-checkout-pro-content .mp-checkout-pro-redirect{align-items:start;padding:16px 20px!important}}#mp-checkout-pse-root.mp-checkout-pse-container .mp-checkout-pse-terms-and-conditions{align-items:center!important;display:flex!important;justify-content:center!important;padding-top:16px!important;text-align:center!important}#mp-checkout-pse-root.mp-checkout-pse-container{background-color:#fff!important;display:flex;flex-direction:column!important;padding:24px 16px!important}#mp-checkout-pse-root.mp-checkout-pse-container .mp-checkout-pse-content .mp-checkout-pse-text{color:rgba(0,0,0,.9)!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;font-style:normal!important;font-weight:700!important;line-height:20px!important;padding-bottom:25px!important;padding-left:0!important}#mp-checkout-pse-root.mp-checkout-pse-container .mp-checkout-pse-content .mp-checkout-pse-test-mode,#mp-checkout-pse-root.mp-checkout-pse-container .mp-input-select-container{padding-bottom:24px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container{align-items:center!important;background-color:#fff!important;display:flex;flex-direction:column!important;padding:24px 16px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container.mp-checkout-ticket-single{padding-top:0!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-test-mode-card{margin-bottom:24px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content{width:100%!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-test-mode{padding:0 0 25px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-text{color:rgba(0,0,0,.9)!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;font-style:normal!important;font-weight:700!important;line-height:20px!important;padding-bottom:25px!important;padding-left:0!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-terms-and-conditions{align-items:center!important;display:flex;justify-content:center!important;padding-top:32px!important;text-align:center!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-billing-text{color:rgba(0,0,0,.9)!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;font-style:normal!important;font-weight:700!important;line-height:18px!important;padding-bottom:20px!important;padding-left:0!important;padding-top:25px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-billing-checkbox{align-items:center!important;display:flex!important;gap:12px!important;height:40px!important;padding-bottom:15px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-billing-checkbox input{margin:0!important;padding:0!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-billing-checkbox p{color:#000;font-size:14px!important;font-weight:400!important;line-height:18px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-row{display:flex!important;gap:24px!important;justify-content:space-between!important;overflow:hidden;padding-bottom:32px!important;width:100%!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-address-container{container-name:mp-checkout-ticket-address-container!important;container-type:inline-size!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-column{box-sizing:border-box;display:flex!important;flex-direction:column!important;overflow:hidden;width:100%!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-column label{color:#000!important;font-size:14px!important;font-weight:400!important;line-height:18px!important;margin:0!important;padding:0 0 4px 6px!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number{align-content:center!important;align-items:center!important;background:#fff!important;border:1px solid rgba(0,0,0,.25)!important;border-radius:6px!important;box-sizing:border-box;display:flex!important;gap:12px!important;height:48px!important;line-height:20px!important;outline:0!important;padding:0 14px!important;vertical-align:middle!important}#mp-checkout-ticket-root.mp-checkout-ticket-container .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number-disabled{background:#0000000a!important;border:1px solid rgba(0,0,0,.25);border-radius:6px!important;border-style:dashed!important;color:#000!important;flex-grow:0;flex-shrink:0;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;font-weight:400!important;height:48px!important;line-height:20px!important;margin:0!important;max-width:100%!important;outline:0!important;padding:0 14px!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number-focused{border-color:#7f54b3!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number-focused-error{border-color:#f23d4f!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number-focused-error-on-focus{border:2px solid!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number input{border:none!important;color:#000!important;flex:1 1 auto!important;float:none!important;font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;font-size:16px!important;font-weight:400!important;min-width:0!important;width:100%!important;z-index:1!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number input:disabled{opacity:0!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number input:focus{border:none!important;outline:none!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox{align-items:center!important;display:flex!important;flex:0 0 auto!important;float:none!important;gap:8px!important;justify-content:flex-end!important;width:auto!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox p{color:#000!important;font-size:14px!important;font-weight:400!important;height:19px!important;line-height:18px!important;margin:0!important;padding:0!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox input{border:0!important;margin:0!important;width:auto!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-input-document{margin-bottom:32px!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number.mp-checkout-andes-input-error{border-color:var(--mp-color-error)!important}@media screen and (max-width:524px){#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-row{display:flex!important;flex-wrap:wrap!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number{align-items:center!important;flex-wrap:nowrap!important;height:48px!important;padding:8px 14px!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number input{flex:1 1 auto!important;width:auto!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox{flex:0 0 auto!important;justify-content:flex-end!important;width:auto!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox p{white-space:nowrap!important}}@media screen and (max-width:480px){#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number{gap:8px!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox{flex-wrap:nowrap!important;max-width:45%!important}.mp-checkout-ticket-billing-number-toggle-checkbox p{text-overflow:ellipsis!important;white-space:nowrap!important}}@container mp-checkout-ticket-address-container (max-width: 300px){#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-row{flex-direction:column!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-number-toggle-checkbox{flex-direction:column-reverse!important}#mp-checkout-ticket-root .mp-checkout-ticket-content .mp-checkout-ticket-address-container .mp-checkout-ticket-billing-input-number{padding-right:2px!important}}#mp-checkout-yape-root.mp-checkout-yape-container{align-items:center!important;background-color:#fff!important;display:flex!important;flex-direction:column!important;padding:24px!important}#mp-checkout-yape-root.mp-checkout-yape-container>.mp-checkout-yape-content{box-sizing:border-box!important;padding:12px!important;width:100%!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-test-mode{margin-bottom:24px!important;padding:0 0 5px!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-inputs{align-items:baseline;display:flex;flex-wrap:wrap;gap:20px;margin-bottom:24px!important;margin-top:24px;max-width:inherit}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-inputs input-field{width:100%!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-terms-and-conditions{align-items:center!important;display:flex;justify-content:center!important;padding:24px 12px 0!important;text-align:center!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-title-container{display:flex;flex-direction:column;gap:6px;margin-bottom:24px!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-title{color:#000!important;font-size:18px!important;font-weight:600!important;line-height:22px!important;margin-bottom:8px}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-subtitle,#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-title{font-family:Proxima Nova,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif!important;margin-top:0;text-align:left!important}#mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-subtitle{color:rgba(0,0,0,.55)!important;font-size:14px!important;font-weight:400!important;line-height:18px!important;margin-bottom:0}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-inputs{container-name:yape-inputs;container-type:inline-size;--mp-yape-code-gap:8px}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-inputs .mp-yape-input-container{display:grid!important;gap:var(--mp-yape-code-gap,8px)!important;grid-auto-flow:row;grid-template-columns:repeat(3,38px);width:100%!important}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container.mp-yape-code-columns-3{grid-template-columns:repeat(3,38px)}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container.mp-yape-code-columns-6{grid-template-columns:repeat(3,38px) 0 repeat(3,38px)}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container.mp-yape-code-columns-6 .mp-yape-code-input:nth-child(3){grid-column:3}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container.mp-yape-code-columns-6 .mp-yape-code-input:nth-child(4){grid-column:5}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container.mp-yape-code-columns-6 .mp-yape-code-input:nth-child(5){grid-column:6}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container.mp-yape-code-columns-6 .mp-yape-code-input:nth-child(6){grid-column:7}.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container input.mp-yape-code-input{background:#fff!important;flex:0 0 auto;margin:0!important;min-width:0;padding:0!important;width:38px!important}@media screen and (max-width:480px){.payment_box.payment_method_woo-mercado-pago-yape #mp-checkout-yape-root.mp-checkout-yape-container .mp-checkout-yape-inputs .mp-yape-input-container{display:grid!important;gap:var(--mp-yape-code-gap,8px)!important;grid-auto-flow:row;grid-template-columns:repeat(3,38px);width:100%!important}} -
woocommerce-mercadopago/trunk/assets/js/checkouts/custom/entities/card-form.min.js
r3651027 r3710292 1 class MPCardForm{TIMEOUT_TO_WAIT_INIT_CARD_FORM=1e4;constructor(){this.form=null,this.formMounted=!1,this.mpFormId="checkout",this.amount=null,this.onReadyDebounce=null,this.fields=null,this.initCardFormTimeoutReference=null,this.isLoading=!1,this.dispatcherMissingReported=!1,this.hasFiredCheckoutOpenedEvent=!1,this.hasReportedAmountTrackingDropped=!1,this.lastTrackedAmount=null,this.cardBinIsValid=!0,this.cardNumberValidity=null,this.cardNumberValidityMessage=null,this.cardBinInvalidMessage=null,this.lastVerdictBin=null,this.currentBin=null,this.sendMelidataTimeToLoadMetric()}async initCardForm(e=this.getAmount()){if(this.amount=e,this.cardNumberFilledValidator=!1,this. dispatchCheckoutAmountEvent(e),!window.mpSdkInstance){const e=new MercadoPago(wc_mercadopago_custom_checkout_params.public_key,{locale:wc_mercadopago_custom_checkout_params.locale});window.mpSdkInstance=e,document.dispatchEvent(new CustomEvent("mp_sdk_instance_ready"))}return new Promise(((t,r)=>{this.createTimeoutToWaitInitCardForm(r),this.form=window.mpSdkInstance.cardForm({amount:e,iframe:!0,form:this.getCardFormConfig(),callbacks:this.getCardFormCallbacks(t,r)})})).then((()=>{this.clearTimeoutToWaitInitCardForm(),this.sendMetric("MP_CARDFORM_SUCCESS","Security fields loaded","mp_custom_checkout_security_fields_client"),CheckoutPage.verifyCardholderNameOnFocus(),CheckoutPage.clearDocumentLabelErrorOnInput()})).catch((e=>{this.clearTimeoutToWaitInitCardForm();const t=this.handleCardFormErrors(e);this.sendMetric("MP_CARDFORM_ERROR",t,"mp_custom_checkout_security_fields_client"),console.error("Mercado Pago cardForm error: ",t)}))}createTimeoutToWaitInitCardForm(e=()=>{}){this.initCardFormTimeoutReference=setTimeout((()=>{this.removeLoadSpinner(),e(new Error(MPCardFormErrorCodes.INIT_CARD_FORM_TIMEOUT))}),this.TIMEOUT_TO_WAIT_INIT_CARD_FORM)}clearTimeoutToWaitInitCardForm(){clearTimeout(this.initCardFormTimeoutReference)}getCardFormConfig(){const e={fontSize:"16px",height:"48px",padding:"14px",textAlign:"left",fontFamily:"Inter ",fontWeight:"400",placeholderColor:" #0000008C"},t={src:"https://fonts.googleapis.com/css2?family=Inter"};return{id:this.mpFormId,cardNumber:{id:"form-checkout__cardNumber-container",placeholder:"1234 1234 1234 1234",style:e,customFonts:[t],enableLuhnValidation:!0},cardholderName:{id:"form-checkout__cardholderName",placeholder:wc_mercadopago_custom_checkout_params.placeholders.cardholderName},cardExpirationDate:{id:"form-checkout__expirationDate-container",placeholder:wc_mercadopago_custom_checkout_params.placeholders.cardExpirationDate,mode:"short",style:e,customFonts:[t]},securityCode:{id:"form-checkout__securityCode-container",placeholder:wc_mercadopago_custom_card_form_params.security_code_placeholder_text_3_digits,style:e,customFonts:[t]},identificationType:{id:"form-checkout__identificationType"},identificationNumber:{id:"form-checkout__identificationNumber"},issuer:{id:"form-checkout__issuer",placeholder:wc_mercadopago_custom_checkout_params.placeholders.issuer},installments:{id:"form-checkout__installments",placeholder:wc_mercadopago_custom_checkout_params.placeholders.installments}}}getCardFormCallbacks(e,t){return{onReady:t=>{this.fields=t,this.cardBinIsValid=!0,this.cardNumberValidity=null,this.cardNumberValidityMessage=null,this.cardBinInvalidMessage=null,this.lastVerdictBin=null,this.currentBin=null,this.setupSecureFieldsStylesAndAddListeners(),e()},onFormMounted:t=>{this.formMounted=!0,document.dispatchEvent(new CustomEvent("mp_card_form_mounted")),e(),t&&this.sendMetric("MP_CARDFORM_MOUNT_ERROR",t?.message||"unknown","mp_custom_checkout_security_fields_client")},onFormUnmounted:t=>{this.formMounted=!1,CheckoutPage.clearInputs(),e(),t&&this.sendMetric("MP_CARDFORM_UNMOUNT_ERROR",t?.message||"unknown","mp_custom_checkout_security_fields_client")},onInstallmentsReceived:(e,t)=>{if(e){const t=wc_mercadopago_custom_checkout_params.error_messages;return this.addErrorAlert(t.installments[e.message]??t.default),void console.warn("Installments handling error: ",e)}CheckoutPage.setChangeEventOnInstallments(t)},onCardTokenReceived:e=>{e&&console.error("Token handling error: ",e)},onBinChange:e=>{const t="string"==typeof e?e:e&&e.bin||"";this.currentBin=t,t&&t!==this.lastVerdictBin&&(this.cardBinIsValid=!0,this.cardBinInvalidMessage=null,CheckoutPage.setDisplayOfError("fcCardNumberContainer","remove","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","none"),"super_token"!==document.querySelector("#mp_checkout_type")?.value&&CheckoutPage.setValueOn("paymentMethodId",""))},onPaymentMethodsReceived:(e,t)=>{if(this.lastVerdictBin=this.currentBin,e){console.error("Payment methods handling error: ",e),this.cardBinIsValid=!1;const t=e?.message?.includes(MPCardFormErrorCodes.NO_PAYMENT_METHODS_FOUND)||e?.toString?.().includes(MPCardFormErrorCodes.NO_PAYMENT_METHODS_FOUND);this.cardBinInvalidMessage=(e?.message||"").replace("MercadoPago.js - ","")||"unknown error message",CheckoutPage.clearCardState();const r=CheckoutPage.getHelperMessage("cardNumber");return r&&(r.innerHTML=t?wc_mercadopago_custom_checkout_params.input_helper_message?.cardNumber?.invalid_value??wc_mercadopago_custom_checkout_params.input_helper_message?.cardNumber?.invalid_length??"":wc_mercadopago_custom_checkout_params.input_helper_message?.cardNumber?.invalid_length??""),CheckoutPage.setDisplayOfError("fcCardNumberContainer","add","mp-error"),void CheckoutPage.setDisplayOfInputHelper("mp-card-number","flex")}try{if(t){this.cardBinIsValid=!0,CheckoutPage.clearInputs();const e=t[0];CheckoutPage.setValueOn("paymentMethodId",e.id),CheckoutPage.setCvvConfig(e.settings[0].security_code),CheckoutPage.setImageCard(e.secure_thumbnail||e.thumbnail);const r=CheckoutPage.loadAdditionalInfo(e.additional_info_needed);CheckoutPage.additionalInfoHandler(r),CheckoutPage.setDisplayOfError("fcCardNumberContainer","remove","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","none"),CheckoutPage.setDisplayOfError("mpCardholderNameInputLabel","remove","mp-label-error"),CheckoutPage.setDisplayOfError("mpDocumentInputLabel","remove","mp-label-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-holder-name","none"),CheckoutPage.setDisplayOfInputHelperInfo("mp-card-holder-name","flex"),CheckoutPage.shouldEnableInstallmentsComponent(e.payment_type_id)}else this.cardBinIsValid=!1,CheckoutPage.clearCardState(),CheckoutPage.setDisplayOfError("fcCardNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","flex")}catch(e){if(e)return void console.error("Payment methods handling error: ",e);this.cardBinIsValid=!1,CheckoutPage.setDisplayOfError("fcCardNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","flex")}},onSubmit:e=>{e.preventDefault()},onValidityChange:(e,t)=>{if("cardNumber"===t){if(this.cardNumberFilledValidator=!0,e&&!e[0])return"function"==typeof sendMetric&&sendMetric("MP_CUSTOM_CHECKOUT_CARD_VALIDATION_BLOCKED","unexpected_error_format","mp_custom_card_validation",{reason:"unexpected_error_format"}),this.cardNumberValidity=null,void(this.cardNumberValidityMessage=null);this.cardNumberValidity=e?e[0].code:null,this.cardNumberValidityMessage=e?e[0].message:null}if(e){let r=CheckoutPage.getHelperMessage(t),a=wc_mercadopago_custom_checkout_params.input_helper_message[t][e[0].code];if(r&&(r.innerHTML=a||wc_mercadopago_custom_checkout_params.input_helper_message[t].invalid_length),"cardNumber"===t){if("invalid_type"===e[0].code){const e="super_token"===document.querySelector("#mp_checkout_type")?.value;CheckoutPage.setBackground("fcCardNumberContainer","no-repeat #fff"),CheckoutPage.removeAdditionFields(!e),CheckoutPage.clearInputs()}CheckoutPage.cardholderNameHasError()||CheckoutPage.setDisplayOfInputHelperInfo("mp-card-holder-name","flex")}let o=CheckoutPage.findContainerField(t);return CheckoutPage.setDisplayOfError(o,"add","mp-error"),"cardholderName"===t&&CheckoutPage.verifyCardholderName(),CheckoutPage.setDisplayOfInputHelper(CheckoutPage.inputHelperName(t),"flex")}if("cardholderName"===t&&!CheckoutPage.verifyCardholderName())return;if("cardNumber"===t&&!this.cardBinIsValid)return;let r=CheckoutPage.findContainerField(t);return CheckoutPage.setDisplayOfError(r,"removed","mp-error"),CheckoutPage.setDisplayOfInputHelper(CheckoutPage.inputHelperName(t),"none")},onError:e=>{CheckoutPage.verifyCardholderName(),e.forEach((e=>(this.removeBlockOverlay(),e.message.includes(MPCardFormErrorCodes.TIMED_OUT)?t(e):e.message.includes("cardNumber")?(CheckoutPage.setDisplayOfError("fcCardNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","flex")):e.message.includes("cardholderName")?(CheckoutPage.setDisplayOfError("fcCardholderName","add","mp-error"),CheckoutPage.setDisplayOfInputHelperInfo("mp-card-holder-name","none"),CheckoutPage.setDisplayOfError("mpCardholderNameInputLabel","add","mp-label-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-holder-name","flex")):e.message.includes("expirationMonth")||e.message.includes("expirationYear")?(CheckoutPage.setDisplayOfError("fcCardExpirationDateContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-expiration-date","flex")):e.message.includes("securityCode")?(e.message.includes(MPCardFormErrorCodes.SECURITY_CODE_INVALID_NUMBER)||e.message.includes(MPCardFormErrorCodes.SECURITY_CODE_INVALID_LENGTH)?CheckoutPage.setDisplayOfInputHelperMessage("mp-security-code",wc_mercadopago_custom_checkout_params.input_helper_message.securityCode.invalid_length):CheckoutPage.setDisplayOfInputHelperMessage("mp-security-code",wc_mercadopago_custom_checkout_params.input_helper_message.securityCode.invalid_type),CheckoutPage.setDisplayOfError("fcSecurityNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-security-code","flex")):e.message.includes("identificationNumber")?(CheckoutPage.setDisplayOfError("fcIdentificationNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-doc-number","flex")):t(e))))}}}scrollToCardForm(){const e=document.querySelector("#mp-checkout-custom-root.mp-checkout-container");e&&e.scrollIntoView({behavior:"smooth"})}getCardValidationReason(){const e=CARD_VALIDATION_REASON_BY_CODE[this.cardNumberValidity];return e||(!1===this.cardBinIsValid?"invalid_bin":this.cardNumberValidity||"empty_field")}getCardValidationDetail(){return this.cardNumberValidity?this.cardNumberValidityMessage?`${this.cardNumberValidity}:${this.cardNumberValidityMessage}`:this.cardNumberValidity:!1===this.cardBinIsValid?this.cardBinInvalidMessage||"invalid_bin":""}getAmount(){const e=document.getElementById("mp-amount");if(!e)return this.amount;const t=parseFloat(e.value.replace(",","."));return String(t)}formatTrackingAmount(e=""){const t=String(e??"").replace(/[^\d.,]/g,"");if(!t)return null;const r=t.lastIndexOf(",")>t.lastIndexOf("."),a=t.replace(/[.,]/g,(e=>r?","===e?".":"":"."===e?".":"")),o=parseFloat(a);return isNaN(o)?null:o.toFixed(2)}reportAmountTrackingDroppedOnce(e,t){this.hasReportedAmountTrackingDropped||(this.hasReportedAmountTrackingDropped=!0,this.sendMetric("true",`melidataReady rejected on ${e}: ${t?.message||"unknown error"}`,"mp_checkout_amount_tracking_dropped"))}emitWhenMelidataReady(e,t){const r=window.melidataReady;r&&"function"==typeof r.then?r.then((()=>document.dispatchEvent(new CustomEvent(e,{detail:t})))).catch((t=>this.reportAmountTrackingDroppedOnce(e,t))):this.reportAmountTrackingDroppedOnce(e,new Error("melidataReady is not a Promise"))}dispatchCheckoutAmountEvent(e){const t=this.formatTrackingAmount(e),r=this.lastTrackedAmount;this.hasFiredCheckoutOpenedEvent?r&&r!==t&&(this.lastTrackedAmount=t,this.emitWhenMelidataReady("mp_amount_changed",{amount:t,oldAmount:r})):(this.hasFiredCheckoutOpenedEvent=!0,this.lastTrackedAmount=t,this.emitWhenMelidataReady("mp_checkout_opened",{amount:t}))}handleCardFormErrors(e){if(e.length){const t=[];return e.forEach((e=>{t.push(e.description||e.message)})),t.join(",")}return e.description||e.message}sendMetric(e,t,r){"function"==typeof window.sendMetric&&window.sendMetric(e,t,r)}isClassicCheckout(){return!!document.querySelector(".payment_method_woo-mercado-pago-custom")}startLoadingOnClassicCheckout(){jQuery("form.checkout")?.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}stopLoadingOnClassicCheckout(){jQuery("form.checkout")?.unblock()}getMelidataReadyPromise(){return window.melidataReady?window.melidataReady:Promise.reject(new Error("melidataReady is undefined"))}createLoadSpinner(){if(this.isLoading)return;const e=document.querySelector("#mp-checkout-custom-root.mp-checkout-container"),t=document.querySelector(".mp-checkout-custom-load");this.isLoading=!0,e?.classList.add("mp-hidden"),e?.classList.add("mp-display-none"),t?.classList.remove("mp-hidden"),t?.classList.remove("mp-display-none");const r=Date.now(),a=!!window.melidata;this.getMelidataReadyPromise().then((()=>{if(!a){const e=Math.round((Date.now()-r)/10)/100;sendMetric(e,"time in seconds waiting for melidata client at loading start","mp_custom_checkout_melidata_load_start_delay")}document.dispatchEvent(new CustomEvent("mp_super_token_loading_start",{detail:{dateNowInMilliseconds:r}}))})).catch((e=>{sendMetric("MP_MELIDATA_CLIENT_UNDEFINED",`Loading started but melidata client failed to load: ${e?.message||"unknown error"}`,"mp_custom_checkout_melidata_client_undefined")}))}removeLoadSpinner(){const e=document.querySelector(".mp-checkout-custom-load"),t=e&&"none"!==window.getComputedStyle(e).display;if(!this.isLoading&&!t)return;const r=document.querySelector("#mp-checkout-custom-root.mp-checkout-container"),a=document.querySelector(".mp-checkout-custom-load");this.isLoading=!1;window.mpSuperTokenTriggerHandler?window.mpSuperTokenTriggerHandler.isSuperTokenPaymentMethodsLoaded()&&a?.classList.add("mp-hidden"):"function"==typeof sendMetric&&sendMetric("MP_SUPER_TOKEN_TRIGGER_HANDLER_MISSING","removeLoadSpinner","mp_cardform_trigger_handler_missing"),setTimeout((()=>{a?.classList.add("mp-hidden"),a?.classList.add("mp-display-none"),r?.classList.remove("mp-hidden"),r?.classList.remove("mp-display-none")}),800);const o=Date.now(),i=!!window.melidata;this.getMelidataReadyPromise().then((()=>{if(!i){const e=Math.round((Date.now()-o)/10)/100;sendMetric(e,"time in seconds waiting for melidata client at loading end","mp_custom_checkout_melidata_load_end_delay")}document.dispatchEvent(new CustomEvent("mp_super_token_loading_end",{detail:{dateNowInMilliseconds:o}}))})).catch((e=>{sendMetric("MP_MELIDATA_CLIENT_UNDEFINED",`Loading ended but melidata client failed to load: ${e?.message||"unknown error"}`,"mp_custom_checkout_melidata_client_undefined")}))}removeBlockOverlay(){jQuery("form#order_review").length>0&&jQuery(".blockOverlay").css("display","none")}addErrorAlert(e){this.removeElementsByClass("woocommerce-NoticeGroup-checkout"),jQuery(window.mpCheckoutForm).prepend(`\n <div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">\n <ul class="woocommerce-error" role="alert">\n <li>${e}<li>\n </ul>\n </div>\n `),window.scrollTo(0,0)}removeElementsByClass(e){const t=document.getElementsByClassName(e);for(;t.length>0;)t[0].parentNode.removeChild(t[0])}setupSecureFieldsStylesAndAddListeners(){if(!this.fields)return;"undefined"!=typeof MPCheckoutFieldsDispatcher||"function"!=typeof sendMetric||this.dispatcherMissingReported||(sendMetric("MP_CHECKOUT_FIELDS_DISPATCHER_MISSING","setupSecureFieldsStylesAndAddListeners","mp_checkout_init_error"),this.dispatcherMissingReported=!0);const e=[{field:this.fields.cardNumber,fieldName:"cardNumber",containerId:"form-checkout__cardNumber-container",focusEventName:"card_number_focused",blurEventName:"card_number_filled",validator:()=>this.cardNumberFilledValidator},{field:this.fields.expirationDate,containerId:"form-checkout__expirationDate-container"},{field:this.fields.securityCode,containerId:"form-checkout__securityCode-container"}];for(const t of e)t.field&&"function"==typeof t.field.on&&(t.field.on("focus",(()=>{this.addOrRemoveCssClass(t.containerId,"mp-checkout-custom-card-form-focus","add"),t.focusEventName&&"undefined"!=typeof MPCheckoutFieldsDispatcher&&MPCheckoutFieldsDispatcher.addEventListenerDispatcher(null,"focus",t.focusEventName,{onlyDispatch:!0})})),t.field.on("blur",(()=>{let e=!1;this.addOrRemoveCssClass(t.containerId,"mp-checkout-custom-card-form-focus"),t.validator&&(e="function"==typeof t.validator?t.validator():t.validator),t.blurEventName&&e&&"undefined"!=typeof MPCheckoutFieldsDispatcher&&(MPCheckoutFieldsDispatcher.addEventListenerDispatcher(null,"blur",t.blurEventName,{onlyDispatch:!0}),t.fieldName&&this.updateFieldValidator(t.fieldName))})))}addOrRemoveCssClass(e,t,r="remove"){const a=document.getElementById(e);a?.classList["add"===r?"add":"remove"](t)}updateFieldValidator(e){"cardNumber"===e&&(this.cardNumberFilledValidator=!1)}sendMelidataTimeToLoadMetric(){const e=Date.now(),t=setInterval((()=>{if(window.melidata){clearInterval(t);const r=Date.now();sendMetric((r-e)/1e3,"time in seconds to load melidata client","mp_custom_checkout_melidata_time_to_load")}}),100);setTimeout((()=>{clearInterval(t)}),2e4)}}1 class MPCardForm{TIMEOUT_TO_WAIT_INIT_CARD_FORM=1e4;constructor(){this.form=null,this.formMounted=!1,this.mpFormId="checkout",this.amount=null,this.onReadyDebounce=null,this.fields=null,this.initCardFormTimeoutReference=null,this.isLoading=!1,this.dispatcherMissingReported=!1,this.hasFiredCheckoutOpenedEvent=!1,this.hasReportedAmountTrackingDropped=!1,this.lastTrackedAmount=null,this.cardBinIsValid=!0,this.cardNumberValidity=null,this.cardNumberValidityMessage=null,this.cardBinInvalidMessage=null,this.lastVerdictBin=null,this.currentBin=null,this.sendMelidataTimeToLoadMetric()}async initCardForm(e=this.getAmount()){if(this.amount=e,this.cardNumberFilledValidator=!1,this.stabilizeZeroDollarInitialCitInstallments(),this.dispatchCheckoutAmountEvent(e),!window.mpSdkInstance){const e=new MercadoPago(wc_mercadopago_custom_checkout_params.public_key,{locale:wc_mercadopago_custom_checkout_params.locale});window.mpSdkInstance=e,document.dispatchEvent(new CustomEvent("mp_sdk_instance_ready"))}return new Promise(((t,r)=>{this.createTimeoutToWaitInitCardForm(r),this.form=window.mpSdkInstance.cardForm({amount:e,iframe:!0,form:this.getCardFormConfig(),callbacks:this.getCardFormCallbacks(t,r)})})).then((()=>{this.clearTimeoutToWaitInitCardForm(),this.sendMetric("MP_CARDFORM_SUCCESS","Security fields loaded","mp_custom_checkout_security_fields_client"),CheckoutPage.verifyCardholderNameOnFocus(),CheckoutPage.clearDocumentLabelErrorOnInput(),CheckoutPage.setSecureFieldInstructions()})).catch((e=>{this.clearTimeoutToWaitInitCardForm();const t=this.handleCardFormErrors(e);this.sendMetric("MP_CARDFORM_ERROR",t,"mp_custom_checkout_security_fields_client"),console.error("Mercado Pago cardForm error: ",t)}))}createTimeoutToWaitInitCardForm(e=()=>{}){this.initCardFormTimeoutReference=setTimeout((()=>{this.removeLoadSpinner(),e(new Error(MPCardFormErrorCodes.INIT_CARD_FORM_TIMEOUT))}),this.TIMEOUT_TO_WAIT_INIT_CARD_FORM)}clearTimeoutToWaitInitCardForm(){clearTimeout(this.initCardFormTimeoutReference)}getCardFormConfig(){const e={fontSize:"16px",height:"48px",padding:"14px",textAlign:"left",fontFamily:"Inter ",fontWeight:"400",placeholderColor:"#0000008C"},t={src:"https://fonts.googleapis.com/css2?family=Inter"};return{id:this.mpFormId,cardNumber:{id:"form-checkout__cardNumber-container",placeholder:"1234 1234 1234 1234",style:e,customFonts:[t],enableLuhnValidation:!0},cardholderName:{id:"form-checkout__cardholderName",placeholder:wc_mercadopago_custom_checkout_params.placeholders.cardholderName},cardExpirationDate:{id:"form-checkout__expirationDate-container",placeholder:wc_mercadopago_custom_checkout_params.placeholders.cardExpirationDate,mode:"short",style:e,customFonts:[t]},securityCode:{id:"form-checkout__securityCode-container",placeholder:wc_mercadopago_custom_card_form_params.security_code_placeholder_text_3_digits,style:e,customFonts:[t]},identificationType:{id:"form-checkout__identificationType"},identificationNumber:{id:"form-checkout__identificationNumber"},issuer:{id:"form-checkout__issuer",placeholder:wc_mercadopago_custom_checkout_params.placeholders.issuer},installments:{id:"form-checkout__installments",placeholder:wc_mercadopago_custom_checkout_params.placeholders.installments}}}getCardFormCallbacks(e,t){return{onReady:t=>{this.fields=t,this.cardBinIsValid=!0,this.cardNumberValidity=null,this.cardNumberValidityMessage=null,this.cardBinInvalidMessage=null,this.lastVerdictBin=null,this.currentBin=null,this.setupSecureFieldsStylesAndAddListeners(),e()},onFormMounted:t=>{this.formMounted=!0,document.dispatchEvent(new CustomEvent("mp_card_form_mounted")),e(),t&&this.sendMetric("MP_CARDFORM_MOUNT_ERROR",t?.message||"unknown","mp_custom_checkout_security_fields_client")},onFormUnmounted:t=>{this.formMounted=!1,CheckoutPage.clearInputs(),this.stabilizeZeroDollarInitialCitInstallments(),e(),t&&this.sendMetric("MP_CARDFORM_UNMOUNT_ERROR",t?.message||"unknown","mp_custom_checkout_security_fields_client")},onInstallmentsReceived:(e,t)=>{if(this.isZeroDollarInitialCitContext()&&(!e||e?.message?.includes("payer_costs")))this.stabilizeZeroDollarInitialCitInstallments();else{if(e){const t=wc_mercadopago_custom_checkout_params.error_messages;return this.addErrorAlert(t.installments[e.message]??t.default),void console.warn("Installments handling error: ",e)}CheckoutPage.setChangeEventOnInstallments(t)}},onCardTokenReceived:e=>{e&&console.error("Token handling error: ",e)},onBinChange:e=>{const t="string"==typeof e?e:e&&e.bin||"";this.currentBin=t,t&&t!==this.lastVerdictBin&&(this.cardBinIsValid=!0,this.cardBinInvalidMessage=null,CheckoutPage.setDisplayOfError("fcCardNumberContainer","remove","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","none"),"super_token"!==document.querySelector("#mp_checkout_type")?.value&&CheckoutPage.setValueOn("paymentMethodId",""))},onPaymentMethodsReceived:(e,t)=>{if(this.lastVerdictBin=this.currentBin,e){console.error("Payment methods handling error: ",e),this.cardBinIsValid=!1;const t=e?.message?.includes(MPCardFormErrorCodes.NO_PAYMENT_METHODS_FOUND)||e?.toString?.().includes(MPCardFormErrorCodes.NO_PAYMENT_METHODS_FOUND);this.cardBinInvalidMessage=(e?.message||"").replace("MercadoPago.js - ","")||"unknown error message",CheckoutPage.clearCardState(),this.stabilizeZeroDollarInitialCitInstallments();const r=CheckoutPage.getHelperMessage("cardNumber");return r&&(r.innerHTML=t?wc_mercadopago_custom_checkout_params.input_helper_message?.cardNumber?.invalid_value??wc_mercadopago_custom_checkout_params.input_helper_message?.cardNumber?.invalid_length??"":wc_mercadopago_custom_checkout_params.input_helper_message?.cardNumber?.invalid_length??""),CheckoutPage.setDisplayOfError("fcCardNumberContainer","add","mp-error"),void CheckoutPage.setDisplayOfInputHelper("mp-card-number","flex")}try{if(t){this.cardBinIsValid=!0,CheckoutPage.clearInputs();const e=t[0];CheckoutPage.setValueOn("paymentMethodId",e.id),CheckoutPage.setCvvConfig(e.settings[0].security_code),CheckoutPage.setImageCard(e.secure_thumbnail||e.thumbnail,e.name),CheckoutPage.setSecureFieldInstructions(e.settings[0].card_number?.length,e.settings[0].security_code?.length);const r=CheckoutPage.loadAdditionalInfo(e.additional_info_needed);CheckoutPage.additionalInfoHandler(r),CheckoutPage.setDisplayOfError("fcCardNumberContainer","remove","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","none"),CheckoutPage.setDisplayOfError("mpCardholderNameInputLabel","remove","mp-label-error"),CheckoutPage.setDisplayOfError("mpDocumentInputLabel","remove","mp-label-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-holder-name","none"),CheckoutPage.setDisplayOfInputHelperInfo("mp-card-holder-name","flex"),CheckoutPage.shouldEnableInstallmentsComponent(e.payment_type_id),this.stabilizeZeroDollarInitialCitInstallments()}else this.cardBinIsValid=!1,CheckoutPage.clearCardState(),this.stabilizeZeroDollarInitialCitInstallments(),CheckoutPage.setDisplayOfError("fcCardNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","flex")}catch(e){if(e)return void console.error("Payment methods handling error: ",e);this.cardBinIsValid=!1,CheckoutPage.setDisplayOfError("fcCardNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","flex")}},onSubmit:e=>{e.preventDefault()},onValidityChange:(e,t)=>{if("cardNumber"===t){if(this.cardNumberFilledValidator=!0,e&&!e[0])return"function"==typeof sendMetric&&sendMetric("MP_CUSTOM_CHECKOUT_CARD_VALIDATION_BLOCKED","unexpected_error_format","mp_custom_card_validation",{reason:"unexpected_error_format"}),this.cardNumberValidity=null,void(this.cardNumberValidityMessage=null);this.cardNumberValidity=e?e[0].code:null,this.cardNumberValidityMessage=e?e[0].message:null}if(e){let r=CheckoutPage.getHelperMessage(t),a=wc_mercadopago_custom_checkout_params.input_helper_message[t][e[0].code];if(r&&(r.innerHTML=a||wc_mercadopago_custom_checkout_params.input_helper_message[t].invalid_length),"cardNumber"===t){if("invalid_type"===e[0].code){const e="super_token"===document.querySelector("#mp_checkout_type")?.value;CheckoutPage.setBackground("fcCardNumberContainer","no-repeat #fff"),CheckoutPage.removeAdditionFields(!e),CheckoutPage.clearInputs(),this.stabilizeZeroDollarInitialCitInstallments()}CheckoutPage.cardholderNameHasError()||CheckoutPage.setDisplayOfInputHelperInfo("mp-card-holder-name","flex")}let o=CheckoutPage.findContainerField(t);return CheckoutPage.setDisplayOfError(o,"add","mp-error"),"cardholderName"===t&&CheckoutPage.verifyCardholderName(),CheckoutPage.setDisplayOfInputHelper(CheckoutPage.inputHelperName(t),"flex")}if("cardholderName"===t&&!CheckoutPage.verifyCardholderName())return;if("cardNumber"===t&&!this.cardBinIsValid)return;let r=CheckoutPage.findContainerField(t);return CheckoutPage.setDisplayOfError(r,"removed","mp-error"),CheckoutPage.setDisplayOfInputHelper(CheckoutPage.inputHelperName(t),"none")},onError:e=>{this.isZeroDollarInitialCitContext()&&e.length>0&&e.every((e=>e?.message?.includes("payer_costs")))||CheckoutPage.verifyCardholderName(),e.forEach((e=>(this.removeBlockOverlay(),e.message.includes(MPCardFormErrorCodes.TIMED_OUT)?t(e):e.message.includes("cardNumber")?(CheckoutPage.setDisplayOfError("fcCardNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","flex")):e.message.includes("cardholderName")?(CheckoutPage.setDisplayOfError("fcCardholderName","add","mp-error"),CheckoutPage.setDisplayOfInputHelperInfo("mp-card-holder-name","none"),CheckoutPage.setDisplayOfError("mpCardholderNameInputLabel","add","mp-label-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-holder-name","flex")):e.message.includes("expirationMonth")||e.message.includes("expirationYear")?(CheckoutPage.setDisplayOfError("fcCardExpirationDateContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-expiration-date","flex")):e.message.includes("securityCode")?(e.message.includes(MPCardFormErrorCodes.SECURITY_CODE_INVALID_NUMBER)||e.message.includes(MPCardFormErrorCodes.SECURITY_CODE_INVALID_LENGTH)?CheckoutPage.setDisplayOfInputHelperMessage("mp-security-code",wc_mercadopago_custom_checkout_params.input_helper_message.securityCode.invalid_length):CheckoutPage.setDisplayOfInputHelperMessage("mp-security-code",wc_mercadopago_custom_checkout_params.input_helper_message.securityCode.invalid_type),CheckoutPage.setDisplayOfError("fcSecurityNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-security-code","flex")):e.message.includes("identificationNumber")?(CheckoutPage.setDisplayOfError("fcIdentificationNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-doc-number","flex")):t(e))))}}}scrollToCardForm(){const e=document.querySelector("#mp-checkout-custom-root.mp-checkout-container");e&&e.scrollIntoView({behavior:"smooth"})}getCardValidationReason(){const e=CARD_VALIDATION_REASON_BY_CODE[this.cardNumberValidity];return e||(!1===this.cardBinIsValid?"invalid_bin":this.cardNumberValidity||"empty_field")}getCardValidationDetail(){return this.cardNumberValidity?this.cardNumberValidityMessage?`${this.cardNumberValidity}:${this.cardNumberValidityMessage}`:this.cardNumberValidity:!1===this.cardBinIsValid?this.cardBinInvalidMessage||"invalid_bin":""}getAmount(){const e=document.getElementById("mp-amount");if(!e)return this.amount;const t=parseFloat(e.value.replace(",","."));return String(t)}isZeroDollarInitialCitContext(){const e=document.getElementById("mp-amount"),t=document.querySelector("#mp_checkout_type")?.value,r=this.amount;if("custom"!==t||"true"!==e?.dataset.mpCitInitialContext||"string"!=typeof r&&"number"!=typeof r||"string"==typeof r&&""===r.trim())return!1;const a=Number(r);return Number.isFinite(a)&&0===a}stabilizeZeroDollarInitialCitInstallments(){return!!this.isZeroDollarInitialCitContext()&&(CheckoutPage.setZeroDollarInitialCitInstallmentsState(),!0)}formatTrackingAmount(e=""){const t=String(e??"").replace(/[^\d.,]/g,"");if(!t)return null;const r=t.lastIndexOf(",")>t.lastIndexOf("."),a=t.replace(/[.,]/g,(e=>r?","===e?".":"":"."===e?".":"")),o=parseFloat(a);return isNaN(o)?null:o.toFixed(2)}reportAmountTrackingDroppedOnce(e,t){this.hasReportedAmountTrackingDropped||(this.hasReportedAmountTrackingDropped=!0,this.sendMetric("true",`melidataReady rejected on ${e}: ${t?.message||"unknown error"}`,"mp_checkout_amount_tracking_dropped"))}emitWhenMelidataReady(e,t){const r=window.melidataReady;r&&"function"==typeof r.then?r.then((()=>document.dispatchEvent(new CustomEvent(e,{detail:t})))).catch((t=>this.reportAmountTrackingDroppedOnce(e,t))):this.reportAmountTrackingDroppedOnce(e,new Error("melidataReady is not a Promise"))}dispatchCheckoutAmountEvent(e){const t=this.formatTrackingAmount(e),r=this.lastTrackedAmount;this.hasFiredCheckoutOpenedEvent?r&&r!==t&&(this.lastTrackedAmount=t,this.emitWhenMelidataReady("mp_amount_changed",{amount:t,oldAmount:r})):(this.hasFiredCheckoutOpenedEvent=!0,this.lastTrackedAmount=t,this.emitWhenMelidataReady("mp_checkout_opened",{amount:t}))}handleCardFormErrors(e){if(e.length){const t=[];return e.forEach((e=>{t.push(e.description||e.message)})),t.join(",")}return e.description||e.message}sendMetric(e,t,r){"function"==typeof window.sendMetric&&window.sendMetric(e,t,r)}isClassicCheckout(){return!!document.querySelector(".payment_method_woo-mercado-pago-custom")}startLoadingOnClassicCheckout(){jQuery("form.checkout")?.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}stopLoadingOnClassicCheckout(){jQuery("form.checkout")?.unblock()}getMelidataReadyPromise(){return window.melidataReady?window.melidataReady:Promise.reject(new Error("melidataReady is undefined"))}createLoadSpinner(){if(this.isLoading)return;const e=document.querySelector("#mp-checkout-custom-root.mp-checkout-container"),t=document.querySelector(".mp-checkout-custom-load");this.isLoading=!0,e?.classList.add("mp-hidden"),e?.classList.add("mp-display-none"),t?.classList.remove("mp-hidden"),t?.classList.remove("mp-display-none");const r=Date.now(),a=!!window.melidata;this.getMelidataReadyPromise().then((()=>{if(!a){const e=Math.round((Date.now()-r)/10)/100;sendMetric(e,"time in seconds waiting for melidata client at loading start","mp_custom_checkout_melidata_load_start_delay")}document.dispatchEvent(new CustomEvent("mp_super_token_loading_start",{detail:{dateNowInMilliseconds:r}}))})).catch((e=>{sendMetric("MP_MELIDATA_CLIENT_UNDEFINED",`Loading started but melidata client failed to load: ${e?.message||"unknown error"}`,"mp_custom_checkout_melidata_client_undefined")}))}removeLoadSpinner(){const e=document.querySelector(".mp-checkout-custom-load"),t=e&&"none"!==window.getComputedStyle(e).display;if(!this.isLoading&&!t)return;const r=document.querySelector("#mp-checkout-custom-root.mp-checkout-container"),a=document.querySelector(".mp-checkout-custom-load");this.isLoading=!1;window.mpSuperTokenTriggerHandler?window.mpSuperTokenTriggerHandler.isSuperTokenPaymentMethodsLoaded()&&a?.classList.add("mp-hidden"):"function"==typeof sendMetric&&sendMetric("MP_SUPER_TOKEN_TRIGGER_HANDLER_MISSING","removeLoadSpinner","mp_cardform_trigger_handler_missing"),setTimeout((()=>{a?.classList.add("mp-hidden"),a?.classList.add("mp-display-none"),r?.classList.remove("mp-hidden"),r?.classList.remove("mp-display-none")}),800);const o=Date.now(),i=!!window.melidata;this.getMelidataReadyPromise().then((()=>{if(!i){const e=Math.round((Date.now()-o)/10)/100;sendMetric(e,"time in seconds waiting for melidata client at loading end","mp_custom_checkout_melidata_load_end_delay")}document.dispatchEvent(new CustomEvent("mp_super_token_loading_end",{detail:{dateNowInMilliseconds:o}}))})).catch((e=>{sendMetric("MP_MELIDATA_CLIENT_UNDEFINED",`Loading ended but melidata client failed to load: ${e?.message||"unknown error"}`,"mp_custom_checkout_melidata_client_undefined")}))}removeBlockOverlay(){jQuery("form#order_review").length>0&&jQuery(".blockOverlay").css("display","none")}addErrorAlert(e){this.removeElementsByClass("woocommerce-NoticeGroup-checkout"),jQuery(window.mpCheckoutForm).prepend(`\n <div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">\n <ul class="woocommerce-error" role="alert">\n <li>${e}<li>\n </ul>\n </div>\n `),window.scrollTo(0,0)}removeElementsByClass(e){const t=document.getElementsByClassName(e);for(;t.length>0;)t[0].parentNode.removeChild(t[0])}setupSecureFieldsStylesAndAddListeners(){if(!this.fields)return;"undefined"!=typeof MPCheckoutFieldsDispatcher||"function"!=typeof sendMetric||this.dispatcherMissingReported||(sendMetric("MP_CHECKOUT_FIELDS_DISPATCHER_MISSING","setupSecureFieldsStylesAndAddListeners","mp_checkout_init_error"),this.dispatcherMissingReported=!0);const e=[{field:this.fields.cardNumber,fieldName:"cardNumber",containerId:"form-checkout__cardNumber-container",focusEventName:"card_number_focused",blurEventName:"card_number_filled",validator:()=>this.cardNumberFilledValidator},{field:this.fields.expirationDate,containerId:"form-checkout__expirationDate-container"},{field:this.fields.securityCode,containerId:"form-checkout__securityCode-container"}];for(const t of e)t.field&&"function"==typeof t.field.on&&(t.field.on("focus",(()=>{this.addOrRemoveCssClass(t.containerId,"mp-checkout-custom-card-form-focus","add"),t.focusEventName&&"undefined"!=typeof MPCheckoutFieldsDispatcher&&MPCheckoutFieldsDispatcher.addEventListenerDispatcher(null,"focus",t.focusEventName,{onlyDispatch:!0})})),t.field.on("blur",(()=>{let e=!1;this.addOrRemoveCssClass(t.containerId,"mp-checkout-custom-card-form-focus"),t.validator&&(e="function"==typeof t.validator?t.validator():t.validator),t.blurEventName&&e&&"undefined"!=typeof MPCheckoutFieldsDispatcher&&(MPCheckoutFieldsDispatcher.addEventListenerDispatcher(null,"blur",t.blurEventName,{onlyDispatch:!0}),t.fieldName&&this.updateFieldValidator(t.fieldName))})))}addOrRemoveCssClass(e,t,r="remove"){const a=document.getElementById(e);a?.classList["add"===r?"add":"remove"](t)}updateFieldValidator(e){"cardNumber"===e&&(this.cardNumberFilledValidator=!1)}sendMelidataTimeToLoadMetric(){const e=Date.now(),t=setInterval((()=>{if(window.melidata){clearInterval(t);const r=Date.now();sendMetric((r-e)/1e3,"time in seconds to load melidata client","mp_custom_checkout_melidata_time_to_load")}}),100);setTimeout((()=>{clearInterval(t)}),2e4)}} -
woocommerce-mercadopago/trunk/assets/js/checkouts/custom/mp-custom-checkout.min.js
r3442500 r3710292 1 class MPCustomCheckoutHandler{static FORM_SELECTORS={CLASSIC:"form[name=checkout]",BLOCKS:".wc-block-components-form.wc-block-checkout__form",ORDER_REVIEW:"form#order_review"};static FORM_IDS={CLASSIC_CHECKOUT:"checkout",BLOCKS_CHECKOUT:"blocks_checkout_form",PAY_FOR_ORDER:"order_review"};constructor(e,t,o){this.cardForm=e,this.threeDSHandler=t,this.eventHandler=o,this.init()}async init(){await this.setupFormConfiguration(),this.eventHandler.triggeredPaymentMethodSelectedEvent||jQuery("body").trigger("payment_method_selected"),this.eventHandler.bindEvents()}async setupFormConfiguration(){try{const e=await this.getFormConfig();e.element&&(e.element.id=e.formId),this.syncFormIds(e.formId)}catch(e){console.error("Failed to configure checkout form:",e)}}getFormConfig(){return new Promise(((e,t)=>{let o=0;const r=()=>{o++;const n=document.querySelector(MPCustomCheckoutHandler.FORM_SELECTORS.CLASSIC),c=document.querySelector(MPCustomCheckoutHandler.FORM_SELECTORS.BLOCKS),m=document.querySelector(MPCustomCheckoutHandler.FORM_SELECTORS.ORDER_REVIEW);n?e({element:n,formId:MPCustomCheckoutHandler.FORM_IDS.CLASSIC_CHECKOUT}):c?e({element:c,formId:MPCustomCheckoutHandler.FORM_IDS.BLOCKS_CHECKOUT}):m?e({element:m,formId:MPCustomCheckoutHandler.FORM_IDS.PAY_FOR_ORDER}):o>=10?t(new Error("No checkout form found after 10 attempts")):setTimeout(r,500)};r()}))}syncFormIds(e){this.eventHandler.mpFormId=e,this.cardForm.mpFormId=e}}document.addEventListener("DOMContentLoaded",(function(){const e=new MPCardForm,t=new MPThreeDSHandler,o=new MPEventHandler(e,t),r=new MPCustomCheckoutHandler(e,t,o);window.mpCustomCheckoutHandler=r,window.mpEventHandler=o}));1 function isCustomCheckoutPage(){const e=document.body?.classList;return e?.contains("woocommerce-checkout")||e?.contains("woocommerce-order-pay")||e?.contains("woocommerce-add-payment-method")}class MPCustomCheckoutHandler{static FORM_SELECTORS={CLASSIC:"form[name=checkout]",BLOCKS:".wc-block-components-form.wc-block-checkout__form",ORDER_REVIEW:"form#order_review"};static FORM_IDS={CLASSIC_CHECKOUT:"checkout",BLOCKS_CHECKOUT:"blocks_checkout_form",PAY_FOR_ORDER:"order_review"};static FORM_DISCOVERY_TIMEOUT_MS=3e4;static FORM_DISCOVERY_RETRY_INTERVAL_MS=500;static hasDependencies(){return"function"==typeof MPCardForm&&"function"==typeof MPThreeDSHandler&&"function"==typeof MPEventHandler&&"object"==typeof CheckoutPage&&"object"==typeof CheckoutElements&&this.hasSdkDependency()}static hasSdkDependency(){return"function"==typeof window.mpSdkInstance?.cardForm||"function"==typeof MercadoPago}static waitForDependencies(){return this.hasDependencies()?Promise.resolve(!0):new Promise((e=>{let t=0;const o=()=>{this.hasDependencies()?e(!0):(t+=this.FORM_DISCOVERY_RETRY_INTERVAL_MS,t>=this.FORM_DISCOVERY_TIMEOUT_MS?e(!1):setTimeout(o,this.FORM_DISCOVERY_RETRY_INTERVAL_MS))};o()}))}static reportInitializationFailure(e){"function"==typeof window.sendMetric&&window.sendMetric(e,"custom_checkout_initialization","mp_custom_checkout_initialization_error")}constructor(e,t,o){this.cardForm=e,this.threeDSHandler=t,this.eventHandler=o,this.init()}async init(){if(!this.isCheckoutPage())return;if(!await this.setupFormConfiguration())return;if(!await this.waitForJQuery())return MPCustomCheckoutHandler.reportInitializationFailure("jquery_timeout"),void console.error("Mercado Pago checkout dependencies did not become available in time.");this.eventHandler.triggeredPaymentMethodSelectedEvent||jQuery("body").trigger("payment_method_selected"),this.eventHandler.bindEvents()}async setupFormConfiguration(){try{const e=await this.getFormConfig();return e.element&&(e.element.id=e.formId),this.syncFormIds(e.formId),!0}catch(e){return MPCustomCheckoutHandler.reportInitializationFailure("form_discovery_timeout"),console.error("Mercado Pago checkout form was not rendered in time."),!1}}getFormConfig(){const e=this.findFormConfig();return e?Promise.resolve(e):new Promise(((e,t)=>{let o,n,i;const r=()=>{o&&o.disconnect(),clearTimeout(n),clearTimeout(i)},c=()=>{const t=this.findFormConfig();return!!t&&(r(),e(t),!0)},s=()=>{c()||(n=setTimeout(s,MPCustomCheckoutHandler.FORM_DISCOVERY_RETRY_INTERVAL_MS))};if(i=setTimeout((()=>{r(),t(new Error("Checkout form discovery timed out."))}),MPCustomCheckoutHandler.FORM_DISCOVERY_TIMEOUT_MS),"undefined"!=typeof MutationObserver)return o=new MutationObserver(c),o.observe(document.documentElement,{childList:!0,subtree:!0}),void c();s()}))}isCheckoutPage(){return isCustomCheckoutPage()}findFormConfig(){const e=document.querySelector(MPCustomCheckoutHandler.FORM_SELECTORS.CLASSIC),t=document.querySelector(MPCustomCheckoutHandler.FORM_SELECTORS.BLOCKS),o=document.querySelector(MPCustomCheckoutHandler.FORM_SELECTORS.ORDER_REVIEW);return e?{element:e,formId:MPCustomCheckoutHandler.FORM_IDS.CLASSIC_CHECKOUT}:t?{element:t,formId:MPCustomCheckoutHandler.FORM_IDS.BLOCKS_CHECKOUT}:o?{element:o,formId:MPCustomCheckoutHandler.FORM_IDS.PAY_FOR_ORDER}:null}waitForJQuery(){return"function"==typeof jQuery?Promise.resolve(!0):new Promise((e=>{let t=0;const o=()=>{"function"!=typeof jQuery?(t+=MPCustomCheckoutHandler.FORM_DISCOVERY_RETRY_INTERVAL_MS,t>=MPCustomCheckoutHandler.FORM_DISCOVERY_TIMEOUT_MS?e(!1):setTimeout(o,MPCustomCheckoutHandler.FORM_DISCOVERY_RETRY_INTERVAL_MS)):e(!0)};o()}))}syncFormIds(e){this.eventHandler.mpFormId=e,this.cardForm.mpFormId=e}}async function initializeCustomCheckout(){if(isCustomCheckoutPage()&&!window.mpCustomCheckoutHandler&&!window.mpCustomCheckoutInitializationInProgress){window.mpCustomCheckoutInitializationInProgress=!0;try{if(!await MPCustomCheckoutHandler.waitForDependencies())return MPCustomCheckoutHandler.reportInitializationFailure("dependencies_timeout"),void console.error("Mercado Pago checkout dependencies did not become available in time.");const e=new MPCardForm,t=new MPThreeDSHandler,o=new MPEventHandler(e,t),n=new MPCustomCheckoutHandler(e,t,o);window.mpCustomCheckoutHandler=n,window.mpEventHandler=o}finally{window.mpCustomCheckoutInitializationInProgress=!1}}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",initializeCustomCheckout,{once:!0}):initializeCustomCheckout(); -
woocommerce-mercadopago/trunk/assets/js/checkouts/custom/mp-custom-elements.min.js
r3442500 r3710292 1 const CheckoutElements={cardTokenId:"#cardTokenId",cardInstallments:"#cardInstallments",fcCardholderName:"#form-checkout__cardholderName",fcCardNumberContainer:"#form-checkout__cardNumber-container",fcCardExpirationDateContainer:"#form-checkout__expirationDate-container",fcIdentificationNumber:"#form-checkout__identificationNumber",fcIdentificationNumber Container:"#form-checkout__identificationNumber-container",fcInputTableContainer:"#mp-checkout-custom-installments-container",fcSecurityNumberContainer:"#form-checkout__securityCode-container",mpCardNumber:"mp-card-number",mpCardholderName:"mp-card-holder-name",mpDocumentContainer:"#mp-doc-div",mpExpirationDate:"mp-expiration-date",mpInstallmentsCard:"#mp-checkout-custom-installments-card",mpInstallmentsContainer:"#mp-checkout-custom-installments-container",mpInstallments:"#mp-checkout-custom-installments",mpIssuerContainer:"#mp-checkout-custom-issuers-container",mpSecurityCode:"mp-security-code",mpIdentificationNumber:"mp-doc-number",mpSecurityCodeInfo:"#mp-security-code-info",paymentMethodId:"#paymentMethodId",customContent:".mp-checkout-custom-container",mpCardholderNameInputLabel:"#mp-card-holder-div .mp-input-label",mpDocumentInputLabel:"#mp-doc-div input-label div.mp-input-label",mpCardHolderNameHelper:"#mp-card-holder-div #mp-card-holder-name-helper",mpCardHolderNameHelperInfo:"#mp-card-holder-div #mp-card-holder-name-helper-info"};1 const CheckoutElements={cardTokenId:"#cardTokenId",cardInstallments:"#cardInstallments",fcCardholderName:"#form-checkout__cardholderName",fcCardNumberContainer:"#form-checkout__cardNumber-container",fcCardExpirationDateContainer:"#form-checkout__expirationDate-container",fcIdentificationNumber:"#form-checkout__identificationNumber",fcIdentificationNumberInput:".mp-checkout-custom-container input.mp-document",mpDocumentComponent:".mp-checkout-custom-container input-document",fcIdentificationNumberContainer:"#form-checkout__identificationNumber-container",fcInputTableContainer:"#mp-checkout-custom-installments-container",fcSecurityNumberContainer:"#form-checkout__securityCode-container",mpCardNumber:"mp-card-number",mpCardholderName:"mp-card-holder-name",mpDocumentContainer:"#mp-doc-div",mpExpirationDate:"mp-expiration-date",mpInstallmentsCard:"#mp-checkout-custom-installments-card",mpInstallmentsContainer:"#mp-checkout-custom-installments-container",mpInstallments:"#mp-checkout-custom-installments",mpIssuerContainer:"#mp-checkout-custom-issuers-container",mpSecurityCode:"mp-security-code",mpIdentificationNumber:"mp-doc-number",mpSecurityCodeInfo:"#mp-security-code-info",paymentMethodId:"#paymentMethodId",customContent:".mp-checkout-custom-container",mpCardholderNameInputLabel:"#mp-card-holder-div .mp-input-label",mpDocumentInputLabel:"#mp-doc-div input-label .mp-input-label",mpCardHolderNameHelper:"#mp-card-holder-div #mp-card-holder-name-helper",mpCardHolderNameHelperInfo:"#mp-card-holder-div #mp-card-holder-name-helper-info",mpDetectedCardAnnouncement:"#mp-detected-card-announcement"}; -
woocommerce-mercadopago/trunk/assets/js/checkouts/custom/mp-custom-page.min.js
r3651027 r3710292 1 const CheckoutPage={installmentsEnabled:!1,INSTALLMENTS_SELECT_PLACHOLDER_TEXT:wc_mercadopago_custom_page_params.installments_select_placeholder_text,TAX_TYPES:{cft:{key:"CFT_",label:"CFTEA",bold:!0},tna:{key:"TNA_",label:"TNA",bold:!1},tea:{key:"TEA_",label:"TEA",bold:!1}}, setElementDisplay(e,t){const r=document.querySelector(CheckoutElements[e]);r&&(r.style.display=t)},setText(e,t){const r=document.querySelector(CheckoutElements[e]);r&&(r.innerHTML=t)},setValueOn(e,t){const r=document.querySelector(CheckoutElements[e]);r&&(r.value=t)},setBackground(e,t){const r=document.querySelector(CheckoutElements[e]);r&&r.style.setProperty("background",t,"important")},setImageCard(e){const t=document.querySelector(CheckoutElements.fcCardNumberContainer);t&&(t.style.setProperty("--card-brand-icon",`url(${e})`,"important"),t.classList.add("mp-card-icon-detected"))},findContainerField(e){let t="cardholderName"===e?`#form-checkout__${e}`:`#form-checkout__${e}-container`;return Object.keys(CheckoutElements).find((e=>CheckoutElements[e]===t))},setDisplayOfError(e,t,r,n="customContent"){const s=document.querySelector(CheckoutElements[n]);if(!s)return;const o=s.querySelector(CheckoutElements[e]);o&&("add"===t?o.classList.add(`${r}`):o.classList.remove(`${r}`))},getInputHelperElement(e,t,r="customContent"){const n=document.querySelector(CheckoutElements[r]);if(n)return n.querySelector(`input-helper[input-id=${e}-${t}]`)},setDisplayOfInputHelperInfo(e,t,r="customContent"){let n=this.getInputHelperElement(e,"helper-info",r);n&&(n.childNodes[1].style.display=t)},setDisplayOfInputHelper(e,t,r="customContent"){let n=this.getInputHelperElement(e,"helper",r);if(n){n.querySelector("div").style.display=t}},setDisplayOfInputHelperMessage(e,t,r="customContent"){let n=this.getInputHelperElement(e,"helper",r);if(n){n.querySelector("div").childNodes[1].innerHTML=t}},setCvvConfig(e){this.setCvvHint(e.length),this.changeCvvPlaceHolder(e.length)},changeCvvPlaceHolder(e){3===e?window.mpCustomCheckoutHandler.cardForm.form.update("securityCode",{placeholder:wc_mercadopago_custom_page_params.security_code_placeholder_text_3_digits}):window.mpCustomCheckoutHandler.cardForm.form.update("securityCode",{placeholder:wc_mercadopago_custom_page_params.security_code_placeholder_text_4_digits})},setCvvHint(e){3===e?document.querySelector(CheckoutElements.mpSecurityCodeInfo).setAttribute("data-tooltip",wc_mercadopago_custom_page_params.security_code_tooltip_text_3_digits):document.querySelector(CheckoutElements.mpSecurityCodeInfo).setAttribute("data-tooltip",wc_mercadopago_custom_page_params.security_code_tooltip_text_4_digits)},additionalInfoHandler(e){e.cardholder_name?this.setElementDisplay("fcCardholderName","block"):this.setElementDisplay("fcCardholderName","none"),e.issuer?this.setElementDisplay("mpIssuerContainer","block"):this.setElementDisplay("mpIssuerContainer","none"),e.cardholder_identification_type&&e.cardholder_identification_number?this.setElementDisplay("mpDocumentContainer","block"):this.setElementDisplay("mpDocumentContainer","none")},getCountry:()=>wc_mercadopago_custom_checkout_params.site_id,formatCurrency(e){let t=new Intl.NumberFormat(wc_mercadopago_custom_checkout_params.intl,{currency:wc_mercadopago_custom_checkout_params.currency_code,style:"currency",currencyDisplay:"narrowSymbol"}).format(e);return"MLM"===this.getCountry()&&(t=t.replace(/^(\D+)/,"$1 ")),t},inputHelperName:e=>({cardNumber:CheckoutElements.mpCardNumber,cardholderName:CheckoutElements.mpCardholderName,expirationDate:CheckoutElements.mpExpirationDate,securityCode:CheckoutElements.mpSecurityCode,identificationNumber:CheckoutElements.mpIdentificationNumber}[e]),removeAdditionFields(e=!0){this.setElementDisplay("mpDocumentContainer","none"),this.setElementDisplay("mpInstallmentsCard","none"),this.setElementDisplay("mpIssuerContainer","none"),e&&this.setValueOn("cardInstallments","")},getHelperMessage(e){let t="input-helper[input-id="+this.inputHelperName(e)+"-helper]",r=document.querySelector(t),n=r?.querySelector("div[class=mp-helper]");return n?.childNodes[1]??null},verifyDocument(){let e=document.querySelector(CheckoutElements.fcIdentificationNumber),t=document.querySelector(CheckoutElements.mpDocumentContainer);return"none"===t.style.display||""===t.style.display||"-1"!==e.value&&""!==e.value&&"flex"!==document.querySelector("input-helper[input-id=mp-doc-number-helper]").querySelector("div").style.display},loadAdditionalInfo(e){const t={issuer:!1,cardholder_name:!1,cardholder_identification_type:!1,cardholder_identification_number:!1};for(let r=0;r<e.length;r++)"issuer_id"===e[r]&&(t.issuer=!0),"cardholder_name"===e[r]&&(t.cardholder_name=!0),"cardholder_identification_type"===e[r]&&(t.cardholder_identification_type=!0),"cardholder_identification_number"===e[r]&&(t.cardholder_identification_number=!0);return t},clearInstallmentsComponent(){const e=document.querySelector(CheckoutElements.mpInstallmentsContainer);e?.classList?.remove(CheckoutElements.mpInstallmentsContainer),e?.firstElementChild&&e?.removeChild(e?.firstElementChild)},showInstallmentsComponent(e){const t=document.querySelector(CheckoutElements.mpInstallmentsContainer);t.classList.add(CheckoutElements.mpInstallmentsContainer),t.appendChild(e)},shouldEnableInstallmentsComponent(e){if("debit_card"===e)return this.clearInstallmentsComponent(),void(this.installmentsEnabled=!1);this.installmentsEnabled=!0},hideErrors(){const e=document.querySelector(".mp-checkout-custom-container");if(!e)return;const t=e.querySelectorAll("input-helper");t&&t.forEach((e=>{e.querySelector("div").style.display="none"}))},clearCardState(){const e="super_token"===document.querySelector("#mp_checkout_type")?.value;e||this.setValueOn("paymentMethodId",""),this.setValueOn("fcCardholderName",""),this.setBackground("fcCardNumberContainer","no-repeat #fff");const t=document.querySelector(CheckoutElements.fcCardNumberContainer);t&&t.classList.remove("mp-card-icon-detected"),this.setInstallmentsErrorState(!1),this.clearInstallmentsComponent(),this.removeAdditionFields(!e)},clearInputs(){this.hideErrors(),this.clearCardState();document.querySelector(CheckoutElements.fcCardNumberContainer)&&(this.setValueOn("fcCardNumberContainer",""),this.setDisplayOfError("fcCardNumberContainer","removed","mp-error")),this.setDisplayOfError("fcCardholderName","removed","mp-error"),this.setValueOn("fcCardExpirationDateContainer",""),this.setDisplayOfError("fcCardExpirationDateContainer","removed","mp-error"),this.setValueOn("fcSecurityNumberContainer",""),this.setDisplayOfError("fcSecurityNumberContainer","removed","mp-error"),this.setValueOn("fcIdentificationNumber",""),this.setElementDisplay("mpDocumentContainer","none"),this.setDisplayOfError("fcIdentificationNumberContainer","removed","mp-error"),this.setDisplayOfError("mpCardholderNameInputLabel","removed","mp-label-error"),this.setDisplayOfInputHelper("mp-card-holder-name","none"),this.setDisplayOfError("mpCardholderNameInputLabel","removed","mp-label-error-2x");const e=document.querySelector("input[data-cy=input-document]");e&&(e.value="")},needsBankInterestDisclaimer(){const e=this.getCountry();return"MLC"===e.toUpperCase()||"MCO"===e.toUpperCase()||"MPE"===e.toUpperCase()},getInstallments(e){const t=[];if(!e||!Array.isArray(e.payer_costs))return t;return("MCO"===this.getCountry()?e.payer_costs.slice(0,Math.min(6,e.payer_costs.length)):e.payer_costs).forEach((e=>{const r=e.installments,n=this.formatCurrency(e.installment_amount),s=0!==e.installment_rate,o=e?.installment_rate_collector,l=Array.isArray(o)&&o.includes("THIRD_PARTY"),a=this.formatCurrency(e.total_amount);let i=`${r.toString()}x `;1==r?i+=a:s?i+=`${n} (${a})`:this.needsBankInterestDisclaimer()&&l&&!s?i+=`${n} (${a})*`:i+=`${n} ${wc_mercadopago_custom_checkout_params.input_helper_message.installments.interest_free_option_text}`;const c={value:r.toString(),title:i};if("MLA"===this.getCountry()&&e.labels){const t=this.parseTaxInfo(e.labels);t&&(c.taxInfo=t)}t.push(c)})),t},parseTaxInfo(e){if(!e||!Array.isArray(e))return null;const t={cft:null,tna:null,tea:null},r=e=>{if(!e)return null;const t=e.replace("%","").trim();return/^\d+([,.]\d+)?$/.test(t)?t:null};return e.forEach((e=>{if("string"!=typeof e)return;e.split("|").forEach((e=>{if(e.includes("CFT_")){const n=e.split("CFT_");if(n.length>1&&n[1]){const e=r(n[1]);e&&(t.cft=e)}}else if(e.includes("TEA_")){const n=e.split("TEA_");if(n.length>1&&n[1]){const e=r(n[1]);e&&(t.tea=e)}}else if(e.includes("TNA_")){const n=e.split("TNA_");if(n.length>1&&n[1]){const e=r(n[1]);e&&(t.tna=e)}}}))})),t},verifyCardholderName(){const e=document.querySelector(CheckoutElements.fcCardholderName);if(!e)return!0;const t=e.value.trim(),r=t.length>2&&!/[^a-zA-ZÀ-ÿ0-9 ]/.test(t);return this.updateCardholderNameState(e,r),r},updateCardholderNameState(e,t){const r=document.querySelector(CheckoutElements.mpCardHolderNameHelper),n=document.querySelector(CheckoutElements.mpCardholderNameInputLabel),s=document.querySelector(CheckoutElements.mpCardHolderNameHelperInfo);t?(this.toggleErrorBorder(e),n?.classList.remove("mp-label-error"),r&&(r.style.display="none"),document.activeElement===e&&(e.classList.add("mp-focus"),s.style.display="flex")):(e.classList.remove("mp-focus"),r&&(r.style.display="flex",s.style.display="none"),n&&(n.classList.add("mp-label-error"),s.style.display="none"),this.toggleErrorBorder(e,document.activeElement===e))},verifyCardholderNameOnFocus(){const e=document.querySelector(CheckoutElements.fcCardholderName),t=document.querySelector(CheckoutElements.mpCardHolderNameHelper),r=document.querySelector(CheckoutElements.mpCardholderNameInputLabel),n=document.querySelector(CheckoutElements.mpCardHolderNameHelperInfo);e&&(e.addEventListener("focus",(()=>{e.classList.contains("mp-error")||e.classList.contains("mp-error-2px")?e.classList.contains("mp-error")&&(this.toggleErrorBorder(e,!0),n.style.display="none"):(e.classList.add("mp-focus"),n.style.display="flex")})),e.addEventListener("blur",(()=>{const s=e.classList.contains("mp-error-2px");e.classList.remove("mp-focus"),this.toggleErrorBorder(e),t&&(t.style.display="none"),r?.classList.remove("mp-label-error"),n.style.display="flex",(""!==e.value.trim()||s)&&this.verifyCardholderName()})),e.addEventListener("input",(()=>{""!==e.value.trim()?this.verifyCardholderName():this.updateCardholderNameState(e,!0)})))},clearDocumentLabelErrorOnInput(){const e=document.querySelector(CheckoutElements.mpDocumentContainer);e&&!e.dataset.mpDocLabelClearBound&&(e.dataset.mpDocLabelClearBound="true",e.addEventListener("input",(e=>{e.target?.matches?.('[data-cy="input-document"]')&&""!==e.target.value.trim()&&this.setDisplayOfError("mpDocumentInputLabel","remove","mp-label-error")})))},addDefaultOptionOnInstallmentsSelect(e){const t=document.createElement("option");t.value="",t.disabled=!0,t.selected=!0,t.innerHTML=this.INSTALLMENTS_SELECT_PLACHOLDER_TEXT,e.insertBefore(t,e.firstChild)},setChangeEventOnInstallments(e){this.clearInstallmentsComponent();const t=document.getElementById("form-checkout__installments");if(t){if(this.installmentsItemsData=e||[],this.addDefaultOptionOnInstallmentsSelect(t),!this.installmentsEnabled)return CheckoutPage.setValueOn("cardInstallments","1"),void(t.value="1");this.replaceInstallmentsOptions(t,e),this.renderBankInterestDisclaimer(e),t.addEventListener("change",(e=>{const r=e.target.value;r&&(CheckoutPage.setValueOn("cardInstallments",r),t.value=r,this.updateTaxInfoForSelect(r,"mp-installments-tax-info"),this.setInstallmentsErrorState(!1))})),t.addEventListener("focus",(()=>{t.classList.contains("mp-error")&&this.toggleErrorBorder(t,!0)})),t.addEventListener("blur",(()=>{this.installmentsWasSelected()?this.setInstallmentsErrorState(!1):this.setInstallmentsErrorState(!0)})),this.setElementDisplay("mpInstallmentsCard","block")}},replaceInstallmentsOptions(e,t){const r=this.getInstallments(t);r.length&&(Array.from(e.querySelectorAll("option")).filter((e=>!e.disabled)).forEach((e=>e.remove())),r.forEach((({value:t,title:r})=>{const n=document.createElement("option");n.value=t,n.textContent=r,e.appendChild(n)})))},hasThirdPartyInterestFreeInstallment:e=>!(!e||!Array.isArray(e.payer_costs))&&e.payer_costs.some((e=>{const t=e?.installment_rate_collector;return Array.isArray(t)&&t.includes("THIRD_PARTY")&&0===e?.installment_rate})),renderBankInterestDisclaimer(e){const t=document.getElementById("mp-installments-bank-interest-hint");if(t&&t.remove(),!this.needsBankInterestDisclaimer())return;if(!this.hasThirdPartyInterestFreeInstallment(e))return;const r=wc_mercadopago_custom_checkout_params?.input_helper_message?.installments?.bank_interest_hint_text;if(!r)return;const n=document.querySelector(".mp-checkout-custom-installments-select-container");if(!n)return;const s=document.createElement("div");s.id="mp-installments-bank-interest-hint",s.className="mp-installments-bank-interest-hint",s.textContent=`*${r}`;const o=document.getElementById("mp-installments-tax-info");o?n.insertBefore(s,o):n.appendChild(s)},installmentsWasSelected(){const e=document.getElementById("form-checkout__installments");return!!e?.value},cardNumberHasError(){const e=document.querySelector(CheckoutElements.fcCardNumberContainer);return!!e&&(e.classList.contains("mp-error")||e.classList.contains("mp-error-2px"))},cardholderNameHasError(){const e=document.querySelector(CheckoutElements.fcCardholderName);return!!e&&(e.classList.contains("mp-error")||e.classList.contains("mp-error-2px"))},scrollToCheckoutCustomContainer(){const e=document.querySelector(".mp-checkout-custom-container");e&&e.scrollIntoView({behavior:"smooth"})},toggleErrorBorder(e,t){e.classList.remove("mp-error","mp-error-2px"),!0===t?e.classList.add("mp-error-2px"):!1===t&&e.classList.add("mp-error")},setInstallmentsErrorState(e){const t=document.getElementById("form-checkout__installments"),r=document.querySelector(".mp-checkout-custom-installments-select-container .mp-input-label"),n=document.querySelector("#mp-installments-error");if(t&&r&&n)if(e){const e=document.activeElement===t;n.style.display="flex",r.classList.add("mp-label-error"),this.toggleErrorBorder(t,e)}else n.style.display="none",this.toggleErrorBorder(t),r.classList.remove("mp-label-error")},emitGateBlockedMetric(e,t,r,n){if("function"!=typeof sendMetric)return;const s=`MP_CUSTOM_CHECKOUT_${e}_VALIDATION_BLOCKED`;n?sendMetric(s,r,t,{reason:n}):sendMetric(s,r,t)},deferBlockOverlayRemoval(e){Promise.resolve().then((()=>e?.removeBlockOverlay()))},syncInstallmentsFromSelect(){const e=document.getElementById("form-checkout__installments"),t=document.querySelector(CheckoutElements.cardInstallments);e?.value&&t&&(t.value=e.value)},runPreSubmitGates(e){if(this.cardNumberHasError()){const t="function"==typeof e?.getCardValidationReason?e.getCardValidationReason():"invalid_length",r="function"==typeof e?.getCardValidationDetail?e.getCardValidationDetail():"";return this.emitGateBlockedMetric("CARD","mp_custom_card_validation",t,r),this.setDisplayOfError("fcCardNumberContainer","add","mp-error"),this.setDisplayOfInputHelper("mp-card-number","flex"),e?.scrollToCardForm(),e?.removeLoadSpinner(),this.deferBlockOverlayRemoval(e),{passed:!1,gate:"card",reason:t}}if(this.syncInstallmentsFromSelect(),!this.installmentsWasSelected())return this.emitGateBlockedMetric("INSTALLMENTS","mp_custom_installments_validation","not_selected"),this.setInstallmentsErrorState(!0),this.scrollToCheckoutCustomContainer(),e?.removeLoadSpinner(),this.deferBlockOverlayRemoval(e),{passed:!1,gate:"installments",reason:"not_selected"};const t=document.querySelectorAll(CheckoutElements.fcIdentificationNumberContainer),r=Array.from(t).some((e=>e.classList.contains("mp-error")||e.classList.contains("mp-error-2px")));if(!this.verifyDocument()||r){const t=document.querySelector(CheckoutElements.fcIdentificationNumber),r=t?.value&&"-1"!==t.value?"invalid_format":"empty_field";return this.emitGateBlockedMetric("DOCUMENT","mp_custom_document_validation",r),this.setDisplayOfError("fcIdentificationNumberContainer","add","mp-error"),this.setDisplayOfError("mpDocumentInputLabel","add","mp-label-error"),this.setDisplayOfInputHelper("mp-doc-number","flex"),document.querySelector(CheckoutElements.mpDocumentContainer)?.scrollIntoView({behavior:"smooth"}),e?.removeLoadSpinner(),this.deferBlockOverlayRemoval(e),{passed:!1,gate:"document",reason:r}}return{passed:!0}},updateTaxInfoForSelect(e,t,r){const n=r||this.installmentsItemsData?.payer_costs,s=document.getElementById(t);if(!s)return;if("MLA"!==this.getCountry()||parseInt(e,10)<2)return void(s.style.display="none");const o=n?.find((t=>`${t.installments}`==`${e}`)),l=this.parseTaxInfo(o?.labels),a=this.formatTaxDisplay(l);s.style.display=a?"block":"none",a&&(s.innerHTML=a)},parseTaxInfo(e){if(!Array.isArray(e))return{};const t=e=>{const t=e?.replace("%","").trim();return/^\d+([,.]\d+)?$/.test(t)?t:null};return e.filter((e=>"string"==typeof e)).flatMap((e=>e.split("|"))).reduce(((e,r)=>{for(const[n,{key:s}]of Object.entries(this.TAX_TYPES))if(r.includes(s)){const o=t(r.split(s)[1]);o&&(e[n]=o)}return e}),{})},formatTaxDisplay(e){if(!e)return null;const t=Object.entries(this.TAX_TYPES).filter((([t])=>e[t])).map((([t,{label:r,bold:n}])=>{const s=`${r}: ${e[t]}%`;return n?`<b>${s}</b>`:s}));return t.length?`${t.join(" - ")}. Tasa fija.`:null}};1 const CheckoutPage={installmentsEnabled:!1,INSTALLMENTS_SELECT_PLACHOLDER_TEXT:wc_mercadopago_custom_page_params.installments_select_placeholder_text,TAX_TYPES:{cft:{key:"CFT_",label:"CFTEA",bold:!0},tna:{key:"TNA_",label:"TNA",bold:!1},tea:{key:"TEA_",label:"TEA",bold:!1}},A11Y_ERROR_TARGETS:{fcCardholderName:{control:"fcCardholderName",describedBy:"mp-card-holder-name-helper",describedByDefault:"mp-card-holder-name-helper-info",describedByAlways:"mp-card-holder-name-example"},fcIdentificationNumberContainer:{control:"fcIdentificationNumberInput"},fcCardNumberContainer:{sdkField:"cardNumber",describedBy:"mp-card-number-helper"},fcCardExpirationDateContainer:{sdkField:"cardExpirationDate",describedBy:"mp-expiration-date-helper"},fcSecurityNumberContainer:{sdkField:"securityCode",describedBy:"mp-security-code-helper"}},setElementDisplay(e,t){const r=document.querySelector(CheckoutElements[e]);r&&(r.style.display=t)},setText(e,t){const r=document.querySelector(CheckoutElements[e]);r&&(r.innerHTML=t)},setValueOn(e,t){const r=document.querySelector(CheckoutElements[e]);r&&(r.value=t)},setBackground(e,t){const r=document.querySelector(CheckoutElements[e]);r&&r.style.setProperty("background",t,"important")},setImageCard(e,t){const r=document.querySelector(CheckoutElements.fcCardNumberContainer);r&&(r.style.setProperty("--card-brand-icon",`url(${e})`,"important"),r.classList.add("mp-card-icon-detected"),this.announceDetectedCard(t))},announceDetectedCard(e){const t=document.querySelector(CheckoutElements.mpDetectedCardAnnouncement);if(!t)return;const r=wc_mercadopago_custom_page_params.detected_card_label;t.textContent=e?`${r} ${e}`:""},SECURE_FIELD_INSTRUCTIONS:{fcCardNumberContainer:{param:"card_number_instruction",defaultDigits:16},fcCardExpirationDateContainer:{param:"card_expiration_instruction"},fcSecurityNumberContainer:{param:"security_code_instruction",defaultDigits:3}},setSecureFieldInstruction(e,t){const r=this.SECURE_FIELD_INSTRUCTIONS[e];if(!r)return;const n=document.querySelector(CheckoutElements[e]),s=n?.querySelector("iframe");if(!s)return;const o=wc_mercadopago_custom_page_params[r.param];if(!o)return;const a=t||r.defaultDigits;s.title=a?o.replace("{digits}",a):o},setSecureFieldInstructions(e,t){this.setSecureFieldInstruction("fcCardNumberContainer",e),this.setSecureFieldInstruction("fcCardExpirationDateContainer"),this.setSecureFieldInstruction("fcSecurityNumberContainer",t)},findContainerField(e){let t="cardholderName"===e?`#form-checkout__${e}`:`#form-checkout__${e}-container`;return Object.keys(CheckoutElements).find((e=>CheckoutElements[e]===t))},setDisplayOfError(e,t,r,n="customContent"){const s=document.querySelector(CheckoutElements[n]);if(!s)return;const o=s.querySelector(CheckoutElements[e]);o&&("add"===t?o.classList.add(`${r}`):o.classList.remove(`${r}`),"mp-error"!==r&&"mp-error-2px"!==r||this.syncFieldValidity(e,o))},syncFieldValidity(e,t){const r=this.A11Y_ERROR_TARGETS[e];if(!r)return;const n=t.classList.contains("mp-error")||t.classList.contains("mp-error-2px");if(r.sdkField)return this.setSecureFieldValidity(r.sdkField,n),void this.setDescription(t,n?r.describedBy:null);const s=document.querySelector(CheckoutElements[r.control]);this.setControlValidity(s,n,r)},setDescription(e,t){e&&(t?e.setAttribute("aria-describedby",t):e.removeAttribute("aria-describedby"))},setControlValidity(e,t,r={}){if(!e)return;if(e.setAttribute("aria-invalid",t?"true":"false"),!r.describedBy&&!r.describedByDefault&&!r.describedByAlways)return;const n=[t?r.describedBy:r.describedByDefault,r.describedByAlways].filter(Boolean);n.length?e.setAttribute("aria-describedby",n.join(" ")):e.removeAttribute("aria-describedby")},setSecureFieldValidity(e,t){const r=window.mpCustomCheckoutHandler?.cardForm;if(!0===r?.formMounted)try{r.form?.update(e,{invalid:t})}catch(e){}},getInputHelperElement(e,t,r="customContent"){const n=document.querySelector(CheckoutElements[r]);if(n)return n.querySelector(`input-helper[input-id=${e}-${t}]`)},setDisplayOfInputHelperInfo(e,t,r="customContent"){let n=this.getInputHelperElement(e,"helper-info",r);n&&(n.childNodes[1].style.display=t)},setDisplayOfInputHelper(e,t,r="customContent"){let n=this.getInputHelperElement(e,"helper",r);if(n){n.querySelector("div").style.display=t}},setDisplayOfInputHelperMessage(e,t,r="customContent"){let n=this.getInputHelperElement(e,"helper",r);if(n){n.querySelector("div").childNodes[1].innerHTML=t}},setCvvConfig(e){this.setCvvHint(e.length),this.changeCvvPlaceHolder(e.length)},changeCvvPlaceHolder(e){3===e?window.mpCustomCheckoutHandler.cardForm.form.update("securityCode",{placeholder:wc_mercadopago_custom_page_params.security_code_placeholder_text_3_digits}):window.mpCustomCheckoutHandler.cardForm.form.update("securityCode",{placeholder:wc_mercadopago_custom_page_params.security_code_placeholder_text_4_digits})},setCvvHint(e){const t=document.querySelector(CheckoutElements.mpSecurityCodeInfo);if(!t)return;const r=3===e?wc_mercadopago_custom_page_params.security_code_tooltip_text_3_digits:wc_mercadopago_custom_page_params.security_code_tooltip_text_4_digits;t.setAttribute("data-tooltip",r),t.setAttribute("aria-label",r)},additionalInfoHandler(e){e.cardholder_name?this.setElementDisplay("fcCardholderName","block"):this.setElementDisplay("fcCardholderName","none"),e.issuer?this.setElementDisplay("mpIssuerContainer","block"):this.setElementDisplay("mpIssuerContainer","none"),e.cardholder_identification_type&&e.cardholder_identification_number?this.setElementDisplay("mpDocumentContainer","block"):this.setElementDisplay("mpDocumentContainer","none")},getCountry:()=>wc_mercadopago_custom_checkout_params.site_id,formatCurrency(e){let t=new Intl.NumberFormat(wc_mercadopago_custom_checkout_params.intl,{currency:wc_mercadopago_custom_checkout_params.currency_code,style:"currency",currencyDisplay:"narrowSymbol"}).format(e);return"MLM"===this.getCountry()&&(t=t.replace(/^(\D+)/,"$1 ")),t},inputHelperName:e=>({cardNumber:CheckoutElements.mpCardNumber,cardholderName:CheckoutElements.mpCardholderName,expirationDate:CheckoutElements.mpExpirationDate,securityCode:CheckoutElements.mpSecurityCode,identificationNumber:CheckoutElements.mpIdentificationNumber}[e]),removeAdditionFields(e=!0){this.setElementDisplay("mpDocumentContainer","none"),this.setElementDisplay("mpInstallmentsCard","none"),this.setElementDisplay("mpIssuerContainer","none"),e&&this.setValueOn("cardInstallments","")},getHelperMessage(e){let t="input-helper[input-id="+this.inputHelperName(e)+"-helper]",r=document.querySelector(t),n=r?.querySelector("div[class=mp-helper]");return n?.childNodes[1]??null},verifyDocument(){let e=document.querySelector(CheckoutElements.fcIdentificationNumber),t=document.querySelector(CheckoutElements.mpDocumentContainer);return"none"===t.style.display||""===t.style.display||"-1"!==e.value&&""!==e.value&&"flex"!==document.querySelector("input-helper[input-id=mp-doc-number-helper]").querySelector("div").style.display},loadAdditionalInfo(e){const t={issuer:!1,cardholder_name:!1,cardholder_identification_type:!1,cardholder_identification_number:!1};for(let r=0;r<e.length;r++)"issuer_id"===e[r]&&(t.issuer=!0),"cardholder_name"===e[r]&&(t.cardholder_name=!0),"cardholder_identification_type"===e[r]&&(t.cardholder_identification_type=!0),"cardholder_identification_number"===e[r]&&(t.cardholder_identification_number=!0);return t},clearInstallmentsComponent(){const e=document.querySelector(CheckoutElements.mpInstallmentsContainer);e?.classList?.remove(CheckoutElements.mpInstallmentsContainer),e?.firstElementChild&&e?.removeChild(e?.firstElementChild)},showInstallmentsComponent(e){const t=document.querySelector(CheckoutElements.mpInstallmentsContainer);t.classList.add(CheckoutElements.mpInstallmentsContainer),t.appendChild(e)},shouldEnableInstallmentsComponent(e){if("debit_card"===e)return this.clearInstallmentsComponent(),void(this.installmentsEnabled=!1);this.installmentsEnabled=!0},hideErrors(){const e=document.querySelector(".mp-checkout-custom-container");if(!e)return;const t=e.querySelectorAll("input-helper");t&&t.forEach((e=>{e.querySelector("div").style.display="none"}))},clearCardState(){const e="super_token"===document.querySelector("#mp_checkout_type")?.value;e||this.setValueOn("paymentMethodId",""),this.setValueOn("fcCardholderName",""),this.setBackground("fcCardNumberContainer","no-repeat #fff");const t=document.querySelector(CheckoutElements.fcCardNumberContainer);t&&t.classList.remove("mp-card-icon-detected"),this.announceDetectedCard(""),this.setSecureFieldInstructions(),this.setInstallmentsErrorState(!1),this.clearInstallmentsComponent(),this.removeAdditionFields(!e)},clearInputs(){this.hideErrors(),this.clearCardState();document.querySelector(CheckoutElements.fcCardNumberContainer)&&(this.setValueOn("fcCardNumberContainer",""),this.setDisplayOfError("fcCardNumberContainer","removed","mp-error")),this.setDisplayOfError("fcCardholderName","removed","mp-error"),this.setValueOn("fcCardExpirationDateContainer",""),this.setDisplayOfError("fcCardExpirationDateContainer","removed","mp-error"),this.setValueOn("fcSecurityNumberContainer",""),this.setDisplayOfError("fcSecurityNumberContainer","removed","mp-error"),this.setValueOn("fcIdentificationNumber",""),this.setElementDisplay("mpDocumentContainer","none"),this.setDisplayOfError("fcIdentificationNumberContainer","removed","mp-error"),this.setDisplayOfError("mpCardholderNameInputLabel","removed","mp-label-error"),this.setDisplayOfInputHelper("mp-card-holder-name","none"),this.setDisplayOfError("mpCardholderNameInputLabel","removed","mp-label-error-2x");const e=document.querySelector("input[data-cy=input-document]");e&&(e.value="")},needsBankInterestDisclaimer(){const e=this.getCountry();return"MLC"===e.toUpperCase()||"MCO"===e.toUpperCase()||"MPE"===e.toUpperCase()},getInstallments(e){const t=[];if(!e||!Array.isArray(e.payer_costs))return t;return("MCO"===this.getCountry()?e.payer_costs.slice(0,Math.min(6,e.payer_costs.length)):e.payer_costs).forEach((e=>{const r=e.installments,n=this.formatCurrency(e.installment_amount),s=0!==e.installment_rate,o=e?.installment_rate_collector,a=Array.isArray(o)&&o.includes("THIRD_PARTY"),l=this.formatCurrency(e.total_amount);let i=`${r.toString()}x `;1==r?i+=l:s?i+=`${n} (${l})`:this.needsBankInterestDisclaimer()&&a&&!s?i+=`${n} (${l})*`:i+=`${n} ${wc_mercadopago_custom_checkout_params.input_helper_message.installments.interest_free_option_text}`;const c={value:r.toString(),title:i};if("MLA"===this.getCountry()&&e.labels){const t=this.parseTaxInfo(e.labels);t&&(c.taxInfo=t)}t.push(c)})),t},parseTaxInfo(e){if(!e||!Array.isArray(e))return null;const t={cft:null,tna:null,tea:null},r=e=>{if(!e)return null;const t=e.replace("%","").trim();return/^\d+([,.]\d+)?$/.test(t)?t:null};return e.forEach((e=>{if("string"!=typeof e)return;e.split("|").forEach((e=>{if(e.includes("CFT_")){const n=e.split("CFT_");if(n.length>1&&n[1]){const e=r(n[1]);e&&(t.cft=e)}}else if(e.includes("TEA_")){const n=e.split("TEA_");if(n.length>1&&n[1]){const e=r(n[1]);e&&(t.tea=e)}}else if(e.includes("TNA_")){const n=e.split("TNA_");if(n.length>1&&n[1]){const e=r(n[1]);e&&(t.tna=e)}}}))})),t},verifyCardholderName(){const e=document.querySelector(CheckoutElements.fcCardholderName);if(!e)return!0;const t=e.value.trim(),r=t.length>2&&!/[^a-zA-ZÀ-ÿ0-9 ]/.test(t);return this.updateCardholderNameState(e,r),r},updateCardholderNameState(e,t){const r=document.querySelector(CheckoutElements.mpCardHolderNameHelper),n=document.querySelector(CheckoutElements.mpCardholderNameInputLabel),s=document.querySelector(CheckoutElements.mpCardHolderNameHelperInfo);t?(this.toggleErrorBorder(e),n?.classList.remove("mp-label-error"),r&&(r.style.display="none"),document.activeElement===e&&(e.classList.add("mp-focus"),s.style.display="flex")):(e.classList.remove("mp-focus"),r&&(r.style.display="flex",s.style.display="none"),n&&(n.classList.add("mp-label-error"),s.style.display="none"),this.toggleErrorBorder(e,document.activeElement===e)),this.setControlValidity(e,!t,this.A11Y_ERROR_TARGETS.fcCardholderName)},verifyCardholderNameOnFocus(){const e=document.querySelector(CheckoutElements.fcCardholderName),t=document.querySelector(CheckoutElements.mpCardHolderNameHelper),r=document.querySelector(CheckoutElements.mpCardholderNameInputLabel),n=document.querySelector(CheckoutElements.mpCardHolderNameHelperInfo);e&&(e.addEventListener("focus",(()=>{e.classList.contains("mp-error")||e.classList.contains("mp-error-2px")?e.classList.contains("mp-error")&&(this.toggleErrorBorder(e,!0),n.style.display="none"):(e.classList.add("mp-focus"),n.style.display="flex")})),e.addEventListener("blur",(()=>{const s=e.classList.contains("mp-error-2px");e.classList.remove("mp-focus"),this.toggleErrorBorder(e),t&&(t.style.display="none"),r?.classList.remove("mp-label-error"),n.style.display="flex",(""!==e.value.trim()||s)&&this.verifyCardholderName()})),e.addEventListener("input",(()=>{""!==e.value.trim()?this.verifyCardholderName():this.updateCardholderNameState(e,!0)})))},clearDocumentLabelErrorOnInput(){const e=document.querySelector(CheckoutElements.mpDocumentContainer);e&&!e.dataset.mpDocLabelClearBound&&(e.dataset.mpDocLabelClearBound="true",e.addEventListener("input",(e=>{e.target?.matches?.('[data-cy="input-document"]')&&""!==e.target.value.trim()&&this.setDisplayOfError("mpDocumentInputLabel","remove","mp-label-error")})))},addDefaultOptionOnInstallmentsSelect(e){const t=document.createElement("option");t.value="",t.disabled=!0,t.selected=!0,t.innerHTML=this.INSTALLMENTS_SELECT_PLACHOLDER_TEXT,e.insertBefore(t,e.firstChild)},setChangeEventOnInstallments(e){this.clearInstallmentsComponent();const t=document.getElementById("form-checkout__installments");if(t){if(this.installmentsItemsData=e||[],this.addDefaultOptionOnInstallmentsSelect(t),!this.installmentsEnabled)return CheckoutPage.setValueOn("cardInstallments","1"),void(t.value="1");this.replaceInstallmentsOptions(t,e),this.renderBankInterestDisclaimer(e),t.addEventListener("change",(e=>{const r=e.target.value;r&&(CheckoutPage.setValueOn("cardInstallments",r),t.value=r,this.updateTaxInfoForSelect(r,"mp-installments-tax-info"),this.setInstallmentsErrorState(!1))})),t.addEventListener("focus",(()=>{t.classList.contains("mp-error")&&this.toggleErrorBorder(t,!0)})),t.addEventListener("blur",(()=>{this.installmentsWasSelected()?this.setInstallmentsErrorState(!1):this.setInstallmentsErrorState(!0)})),this.setElementDisplay("mpInstallmentsCard","block")}},setZeroDollarInitialCitInstallmentsState(){this.installmentsItemsData=[],this.setInstallmentsErrorState(!1),this.clearInstallmentsComponent();const e=document.getElementById("form-checkout__installments");if(e)for(;e.firstChild;)e.removeChild(e.firstChild);document.getElementById("mp-installments-bank-interest-hint")?.remove();const t=document.getElementById("mp-installments-tax-info");t&&(t.textContent="",t.style.display="none"),this.setValueOn("cardInstallments","1"),this.setElementDisplay("mpInstallmentsCard","none")},replaceInstallmentsOptions(e,t){const r=this.getInstallments(t);r.length&&(Array.from(e.querySelectorAll("option")).filter((e=>!e.disabled)).forEach((e=>e.remove())),r.forEach((({value:t,title:r})=>{const n=document.createElement("option");n.value=t,n.textContent=r,e.appendChild(n)})))},hasThirdPartyInterestFreeInstallment:e=>!(!e||!Array.isArray(e.payer_costs))&&e.payer_costs.some((e=>{const t=e?.installment_rate_collector;return Array.isArray(t)&&t.includes("THIRD_PARTY")&&0===e?.installment_rate})),renderBankInterestDisclaimer(e){const t=document.getElementById("mp-installments-bank-interest-hint");if(t&&t.remove(),!this.needsBankInterestDisclaimer())return;if(!this.hasThirdPartyInterestFreeInstallment(e))return;const r=wc_mercadopago_custom_checkout_params?.input_helper_message?.installments?.bank_interest_hint_text;if(!r)return;const n=document.querySelector(".mp-checkout-custom-installments-select-container");if(!n)return;const s=document.createElement("div");s.id="mp-installments-bank-interest-hint",s.className="mp-installments-bank-interest-hint",s.textContent=`*${r}`;const o=document.getElementById("mp-installments-tax-info");o?n.insertBefore(s,o):n.appendChild(s)},installmentsWasSelected(){const e=document.getElementById("form-checkout__installments");return!!e?.value},cardNumberHasError(){const e=document.querySelector(CheckoutElements.fcCardNumberContainer);return!!e&&(e.classList.contains("mp-error")||e.classList.contains("mp-error-2px"))},cardholderNameHasError(){const e=document.querySelector(CheckoutElements.fcCardholderName);return!!e&&(e.classList.contains("mp-error")||e.classList.contains("mp-error-2px"))},scrollToCheckoutCustomContainer(){const e=document.querySelector(".mp-checkout-custom-container");e&&e.scrollIntoView({behavior:"smooth"})},toggleErrorBorder(e,t){e.classList.remove("mp-error","mp-error-2px"),!0===t?e.classList.add("mp-error-2px"):!1===t&&e.classList.add("mp-error")},setInstallmentsErrorState(e){const t=document.getElementById("form-checkout__installments"),r=document.querySelector(".mp-checkout-custom-installments-select-container .mp-input-label"),n=document.querySelector("#mp-installments-error");if(t&&r&&n)if(this.setControlValidity(t,e,{describedBy:"mp-installments-error"}),e){const e=document.activeElement===t;n.style.display="flex",r.classList.add("mp-label-error"),this.toggleErrorBorder(t,e)}else n.style.display="none",this.toggleErrorBorder(t),r.classList.remove("mp-label-error")},emitGateBlockedMetric(e,t,r,n){if("function"!=typeof sendMetric)return;const s=`MP_CUSTOM_CHECKOUT_${e}_VALIDATION_BLOCKED`;n?sendMetric(s,r,t,{reason:n}):sendMetric(s,r,t)},deferBlockOverlayRemoval(e){Promise.resolve().then((()=>e?.removeBlockOverlay()))},syncInstallmentsFromSelect(){const e=document.getElementById("form-checkout__installments"),t=document.querySelector(CheckoutElements.cardInstallments);e?.value&&t&&(t.value=e.value)},runPreSubmitGates(e){if(this.cardNumberHasError()){const t="function"==typeof e?.getCardValidationReason?e.getCardValidationReason():"invalid_length",r="function"==typeof e?.getCardValidationDetail?e.getCardValidationDetail():"";return this.emitGateBlockedMetric("CARD","mp_custom_card_validation",t,r),this.setDisplayOfError("fcCardNumberContainer","add","mp-error"),this.setDisplayOfInputHelper("mp-card-number","flex"),e?.scrollToCardForm(),e?.removeLoadSpinner(),this.deferBlockOverlayRemoval(e),{passed:!1,gate:"card",reason:t}}if("function"==typeof e?.isZeroDollarInitialCitContext&&e.isZeroDollarInitialCitContext())this.setZeroDollarInitialCitInstallmentsState();else if(this.syncInstallmentsFromSelect(),!this.installmentsWasSelected())return this.emitGateBlockedMetric("INSTALLMENTS","mp_custom_installments_validation","not_selected"),this.setInstallmentsErrorState(!0),this.scrollToCheckoutCustomContainer(),e?.removeLoadSpinner(),this.deferBlockOverlayRemoval(e),{passed:!1,gate:"installments",reason:"not_selected"};const t=document.querySelectorAll(CheckoutElements.fcIdentificationNumberContainer),r=Array.from(t).some((e=>e.classList.contains("mp-error")||e.classList.contains("mp-error-2px")));if(!this.verifyDocument()||r){const t=document.querySelector(CheckoutElements.fcIdentificationNumber),r=t?.value&&"-1"!==t.value?"invalid_format":"empty_field";return this.emitGateBlockedMetric("DOCUMENT","mp_custom_document_validation",r),this.setDisplayOfError("fcIdentificationNumberContainer","add","mp-error"),this.setDisplayOfError("mpDocumentInputLabel","add","mp-label-error"),this.setDisplayOfInputHelper("mp-doc-number","flex"),document.querySelector(CheckoutElements.mpDocumentComponent)?.markInvalidFromSubmit?.(),document.querySelector(CheckoutElements.mpDocumentContainer)?.scrollIntoView({behavior:"smooth"}),e?.removeLoadSpinner(),this.deferBlockOverlayRemoval(e),{passed:!1,gate:"document",reason:r}}return{passed:!0}},updateTaxInfoForSelect(e,t,r){const n=r||this.installmentsItemsData?.payer_costs,s=document.getElementById(t);if(!s)return;if("MLA"!==this.getCountry()||parseInt(e,10)<2)return void(s.style.display="none");const o=n?.find((t=>`${t.installments}`==`${e}`)),a=this.parseTaxInfo(o?.labels),l=this.formatTaxDisplay(a);s.style.display=l?"block":"none",l&&(s.innerHTML=l)},parseTaxInfo(e){if(!Array.isArray(e))return{};const t=e=>{const t=e?.replace("%","").trim();return/^\d+([,.]\d+)?$/.test(t)?t:null};return e.filter((e=>"string"==typeof e)).flatMap((e=>e.split("|"))).reduce(((e,r)=>{for(const[n,{key:s}]of Object.entries(this.TAX_TYPES))if(r.includes(s)){const o=t(r.split(s)[1]);o&&(e[n]=o)}return e}),{})},formatTaxDisplay(e){if(!e)return null;const t=Object.entries(this.TAX_TYPES).filter((([t])=>e[t])).map((([t,{label:r,bold:n}])=>{const s=`${r}: ${e[t]}%`;return n?`<b>${s}</b>`:s}));return t.length?`${t.join(" - ")}. Tasa fija.`:null}}; -
woocommerce-mercadopago/trunk/assets/js/checkouts/mp-plugins-components.min.js
r3663899 r3710292 1 (()=>{var t={26:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-terms-and-conditions-container"),t.setAttribute("data-cy","terms-and-conditions-container"),t.appendChild(this.createText()),t.appendChild(this.createLink()),t}createText(){const t=document.createElement("span");return t.classList.add("mp-terms-and-conditions-text"),t.innerHTML=this.getAttribute("description"),t}createLink(){const t=document.createElement("a");return t.classList.add("mp-terms-and-conditions-link"),t.innerHTML=this.getAttribute("link-text"),t.href=this.getAttribute("link-src"),t.target="blank",t}}customElements.define("terms-and-conditions",t)},454:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MPE",default:!1,max_length:11,max_length_with_mask:14,min_length:11,placeholder:"99.999.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.length<=9?e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3):e.slice(0,-9)+"."+e.slice(-9,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},540:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MCO",default:!0,max_length:10,min_length:5,max_length_with_mask:13,placeholder:"9.999.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.length<=9?e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3):e.slice(0,-9)+"."+e.slice(-9,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},893:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-input-radio-container"),t.appendChild(this.createRadio()),t.appendChild(this.createLabel()),t}createRadio(){const t=document.createElement("input"),e=this.getAttribute("dataRate");return t.classList.add("mp-input-radio-radio"),t.type="radio",t.id=this.getAttribute("identification"),t.name=this.getAttribute("name"),t.value=this.getAttribute("value"),t.setAttribute("data-cy","input-radio"),e&&t.setAttribute("dataRate",e),t}createLabel(){const t=document.createElement("label");return t.classList.add("mp-input-radio-label"),t.htmlFor=this.getAttribute("identification"),t}}customElements.define("input-radio",t)},938:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLA",default:!0,max_length:8,max_length_with_mask:10,min_length:7,placeholder:"99.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},1295:()=>{class t extends HTMLElement{static get observedAttributes(){return["columns","name","button-name","bank-interest-text"]}constructor(){super(),this.index=0,this.limit=5,this.offset=this.limit,this.columns=null,this.total=0}connectedCallback(){this.build()}attributeChangedCallback(){this.firstElementChild&&(this.removeChild(this.firstElementChild),this.build())}build(){this.appendChild(this.createContainer())}setColumns(){return this.columns=JSON.parse(this.getAttribute("columns")),this}setTotal(){return this.total=this.columns.length,this}createContainer(){const t=document.createElement("div");return this.setColumns(),this.columns&&(this.setTotal(),t.classList.add("mp-input-table-container"),t.setAttribute("data-cy","input-table-container"),t.appendChild(this.createList()),t.appendChild(this.createBankInterestDisclaimer())),t}createList(){const t=document.createElement("div");t.classList.add("mp-input-table-list"),t.setAttribute("data-cy","input-table-list");const e=this.createLink();return e.onclick=()=>this.appendItems(this.columns,t,e,!0),this.appendItems(this.columns,t,e,!1),t.appendChild(e),t}createItem(t){const e=document.createElement("div");return e.classList.add("mp-input-table-item"),e.appendChild(this.createLabel(t)),e}createLabel(t){const{id:e,value:i,rowText:n,rowObs:s,highlight:a,img:r,alt:l,dataRate:o}=t,c=this.getAttribute("name"),d=document.createElement("div");return d.classList.add("mp-input-table-label"),d.appendChild(this.createOption(e,c,i,n,r,l,o)),s&&d.appendChild(this.createRowObs(s,a)),d.onclick=()=>{document.getElementById(e).checked=!0},d}createOption(t,e,i,n,s,a,r){const l=document.createElement("div");return l.classList.add("mp-input-table-option"),l.appendChild(this.createRadio(t,e,i,r)),s?l.appendChild(this.createRowTextWithImg(n,s,a)):l.appendChild(this.createRowText(n)),l}createRadio(t,e,i,n){const s=document.createElement("input-radio");return s.setAttribute("name",e),s.setAttribute("value",i),s.setAttribute("identification",t),s.setAttribute("dataRate",n),s}createRowText(t){const e=document.createElement("span");return e.classList.add("mp-input-table-row-text"),e.innerHTML=t,e}createRowTextWithImg(t,e,i){const n=document.createElement("span"),s=document.createElement("payment-method-logo");return s.setAttribute("src",e),s.setAttribute("alt",i),s.style.marginRight="10px",n.classList.add("mp-input-table-row-text-image"),n.innerHTML=t,n.appendChild(s),n}createRowObs(t,e){const i=document.createElement("span");return e?i.classList.add("mp-input-table-row-obs-highlight"):i.classList.add("mp-input-table-row-obs"),i.innerHTML=t,i}createLink(){const t=document.createElement("div");t.classList.add("mp-input-table-container-link");const e=document.createElement("a");return e.setAttribute("id","more-options"),e.classList.add("mp-input-table-link"),e.innerHTML=this.getAttribute("button-name"),t.appendChild(e),t}createBankInterestDisclaimer(){const t=document.createElement("div");t.classList.add("mp-input-table-bank-interest-container");const e=document.createElement("p");return e.classList.add("mp-input-table-bank-interest-text"),e.innerText=this.getAttribute("bank-interest-text"),t.appendChild(e),t}appendItems(t,e,i,n){this.validateLimit();for(let s=this.index;s<this.limit;s+=1)n?e.insertBefore(this.createItem(t[s]),i):e.appendChild(this.createItem(t[s]));this.limit>=this.total&&i.style.setProperty("display","none","important"),this.index+=this.offset,this.limit+=this.offset,this.validateLimit()}validateLimit(){this.limit>this.total&&(this.limit=this.total)}}customElements.define("input-table",t)},1807:(t,e,i)=>{const n=i(2781),s=i(6407),a=i(6135),r=i(938),l=i(9794),o=i(1981),c=i(2603),d=i(3505),p=i(9957),u=i(540),h=i(6020),m=i(7749),g=i(2957),b=i(6133),E=i(454);t.exports=class{static handlers={CPF:n,CNPJ:s,CC:u,MLA_CI:d,MLU_CI:p,MCO_CE:h,MPE_CE:m,MLA_DNI:r,MPE_DNI:l,NIT:g,LC:o,LE:c,RUT:b,RUC:E};static getDefaultCountryHandler(t){for(const[e,i]of Object.entries(this.handlers))if(i.CONFIG&&i.CONFIG.site_id===t&&!0===i.CONFIG.default)return e;return null}static getHandler(t){return this.handlers[t]||a}static mask(t,e){return this.getHandler(t).mask(e)}static validate(t,e){return this.getHandler(t).validate(e)}}},1943:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createLabel())}createLabel(){const t=document.createElement(" div");t.classList.add("mp-input-label"),t.setAttribute("data-cy","input-label");const e=this.getAttribute("message");t.innerHTML=e;let i=this.getAttribute("isOptional");if("string"==typeof i&&(i="false"!==i),!i){const e=document.createElement("b");e.innerHTML="*",e.style="color: red",t.appendChild(e)}return t}}customElements.define("input-label",t)},1981:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLA",default:!1,max_length:7,max_length_with_mask:9,min_length:6,placeholder:"9.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},2119:()=>{class t extends HTMLElement{helper=this.createHelper();input=this.createInput();connectedCallback(){this.build()}build(){const t=this.createInputField();this.appendChild(t)}createInputField(){const t=document.createElement("div");t.classList.add("mp-yape-input-field"),t.setAttribute("data-cy","input-field-container");const e=this.createLabel(this.getAttribute("label-message"));return t.appendChild(e),t.appendChild(this.input),t.appendChild(this.helper),t}createLabel(t){const e=document.createElement("input-label");return e.setAttribute("message",t),e.setAttribute("isOptional","true"),e}validate(){""===this.input.value?(this.helper.firstElementChild.style.display="flex",document.getElementById("helper-input-field").childNodes[1].innerHTML=document.querySelector("input-field").getAttribute("empty-error-message"),this.input.classList.add("mp-input-field-error"),document.querySelector('[data-cy="input-label"]').style.setProperty("color","#f23d4f","important")):this.input.value.length<11?(this.helper.firstElementChild.style.display="flex",document.getElementById("helper-input-field").childNodes[1].innerHTML=document.querySelector("input-field").getAttribute("invalid-error-message"),this.input.classList.add("mp-input-field-error"),document.querySelector('[data-cy="input-label"]').style.setProperty("color","#f23d4f","important")):(this.helper.firstElementChild.style.display="none",document.querySelector('[data-cy="input-label"]').style.setProperty("color","#111111","important"))}createInput(){const t=document.createElement("input");return t.classList.add("mp-yape-input"),t.setAttribute("id","checkout__yapePhoneNumber"),t.setAttribute("maxlength","11"),t.setAttribute("placeholder","Ej.: 872 123 432"),t.setAttribute("aria-hidden","true"),t.setAttribute("data-cy","input-field"),t.setAttribute("name","phoneNumber"),t.setAttribute("required","true"),t.addEventListener("input",(()=>{const e=t.value.replace(/\D/g,"");let i="";for(let t=0;t<e.length;t+=1)i+=e[t],(t+1)%3==0&&t!==e.length-1&&(i+=" ");t.value=i})),t.addEventListener("focus",(()=>{t.classList.add("mp-input-field-focus"),t.classList.remove("mp-input-field-error"),this.helper.firstElementChild.style.display="none"})),t.addEventListener("blur",(()=>{this.validate()})),t}createHelper(){const t=document.createElement("input-helper");return t.setAttribute("isVisible","false"),t.setAttribute("type","error"),t.setAttribute("message","error"),t.setAttribute("input-id","helper-input-field"),t}}customElements.define("input-field",t)},2577:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createHelper())}createHelper(){const t=document.createElement("div");t.classList.add("mp-helper"),t.setAttribute("id",this.getAttribute("input-id")),t.setAttribute("data-cy","helper-container"),t.setAttribute("role","alert"),this.validateVisibility(t);const e=this.getAttribute("message"),i=this.getAttribute("type")||"error",n=this.createHelperMessage(e,i);if("error"===i){const e=this.createIcon();t.appendChild(e)}return t.appendChild(n),t}createIcon(){const t=document.createElement("div");return t.innerHTML='\n <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n <rect width="12" height="12" rx="6" fill="#CC1818"/><path d="M6.72725 2.90918H5.27271L5.45452 6.90918H6.54543L6.72725 2.90918Z" fill="white"/>\n <path d="M5.99998 7.63645C6.40164 7.63645 6.72725 7.96206 6.72725 8.36373C6.72725 8.76539 6.40164 9.091 5.99998 9.091C5.59832 9.091 5.27271 8.76539 5.27271 8.36373C5.27271 7.96206 5.59832 7.63645 5.99998 7.63645Z" fill="white"/>\n </svg>',t.classList.add("mp-helper-icon"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),t}createHelperMessage(t,e){const i=document.createElement("div");return i.textContent=t,i.classList.add("mp-helper-message"),i.classList.add(e),i.setAttribute("data-cy","helper-message"),i.setAttribute("tabindex","-1"),i.setAttribute("aria-hidden","true"),i}updateMessage(t){this.setAttribute("message",t),this.querySelector(".mp-helper-message").textContent=t}validateVisibility(t){let e=this.getAttribute("isVisible");"string"==typeof e&&(e="false"!==e),t.style.display=e?"flex":"none"}}customElements.define("input-helper",t)},2603:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLA",default:!1,max_length:7,max_length_with_mask:9,min_length:6,placeholder:"9.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},2781:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLB",default:!0,max_length:11,max_length_with_mask:14,placeholder:"999.999.999-99"};static mask(t){return t.replace(/\D+/g,"").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})/,"$1-$2").replace(/(-\d{2})\d+?$/,"$1")}static validate(t){if("string"!=typeof t)return{result:!1,type:this.ERROR_TYPES.INVALID};if(!(t=t.replace(/[\s.-]*/gim,""))||0===t.length)return{result:!1,type:this.ERROR_TYPES.EMPTY};if("00000000000"===t||"11111111111"===t||"22222222222"===t||"33333333333"===t||"44444444444"===t||"55555555555"===t||"66666666666"===t||"77777777777"===t||"88888888888"===t||"99999999999"===t)return{result:!1,type:this.ERROR_TYPES.WRONG};if(0===parseInt(t,10))return{result:!1,type:this.ERROR_TYPES.WRONG};if(!t||11!==t.length)return{result:!1,type:this.ERROR_TYPES.INVALID};let e,i=0;for(let e=1;e<=9;e+=1)i+=parseInt(t.substring(e-1,e))*(11-e);if(e=10*i%11,10!==e&&11!==e||(e=0),e!==parseInt(t.substring(9,10)))return{result:!1,type:this.ERROR_TYPES.WRONG};i=0;for(let e=1;e<=10;e+=1)i+=parseInt(t.substring(e-1,e))*(12-e);return e=10*i%11,10!==e&&11!==e||(e=0),e!==parseInt(t.substring(10,11))?{result:!1,type:this.ERROR_TYPES.WRONG}:{result:!0,type:this.ERROR_TYPES.VALID}}}},2957:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MCO",default:!1,max_length:16,min_length:7,max_length_with_mask:16,placeholder:"999.999.999-9"};static mask(t){const e=t.replace(/\D+/g,"");if(e.length<=3)return e;if(e.length<=6)return e.slice(0,-3)+"."+e.slice(-3);if(e.length>=9){const t=e.slice(0,-1),i=e.slice(-1);return`${t.replace(/\B(?=(\d{3})+(?!\d))/g,".")}-${i}`}return e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},2979:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-pix-template-container"),t.setAttribute("data-cy","pix-template-container"),t.appendChild(this.createImage()),t.appendChild(this.createTitle()),t.appendChild(this.createSubtitle()),t}createTitle(){const t=document.createElement("p");return t.classList.add("mp-pix-template-title"),t.innerText=this.getAttribute("title"),t}createSubtitle(){const t=document.createElement("p");return t.classList.add("mp-pix-template-subtitle"),t.innerText=this.getAttribute("subtitle"),t}createImage(){const t=document.createElement("img");return t.classList.add("mp-pix-template-image"),t.src=this.getAttribute("src"),t.alt=this.getAttribute("alt"),t}}customElements.define("pix-template",t)},3185:()=>{class t extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render()}render(){const t=document.createElement("div");t.classList.add("mp-info-notification");const e=document.createElement("div");e.classList.add("content");const i=document.createElement("img");i.src=this.getAttribute("src"),i.alt="Icone de informação",i.classList.add("icon");const n=document.createElement("div");n.classList.add("message"),n.textContent=this.getAttribute("message")||"Mensagem de informação",e.appendChild(i),e.appendChild(n),t.appendChild(e);const s=document.createElement("div");s.classList.add("footer");const a=document.createElement("img");a.src=this.getAttribute("icon"),a.alt="Footer Icon",a.classList.add("footer-icon"),s.appendChild(a),s.appendChild(document.createTextNode(this.getAttribute("footer-text")||"Procesado por Mercado Pago")),this.shadowRoot.append(t),this.shadowRoot.append(s),this.applyStyles()}applyStyles(){const t=document.createElement("style");t.textContent="\n .mp-info-notification {\n display: flex !important;\n flex-direction: column !important;\n padding: 12px !important;\n background-color: #f7f7f7 !important;\n border-radius: 8px !important;\n border-left: 4px solid var(--andes-accent-color) !important;\n margin-bottom: 16px !important;\n }\n\n .content {\n display: flex !important;\n align-items: center !important;\n }\n\n .icon {\n max-width: 16px !important;\n max-height: 16px !important;\n margin-right: 8px !important;\n }\n\n @media (max-width: 600px) {\n .icon {\n margin-bottom: 15px !important;\n }\n }\n\n @media (max-width: 300px) {\n .icon {\n margin-bottom: 35px !important;\n }\n }\n\n .message {\n flex-grow: 1 !important;\n color: #333 !important;\n padding: 10px !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n font-size: 14px !important;\n font-weight: 400 !important;\n line-height: 18px !important;\n text-align: left !important;\n }\n\n .footer {\n display: flex !important;\n align-items: center !important;\n color: #999 !important;\n margin-top: 24px !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 15px !important;\n text-align: left !important;\n }\n\n .footer-icon {\n max-width: 20px !important;\n margin-right: 8px !important;\n }\n ",this.shadowRoot.appendChild(t)}}customElements.define("checkout-notice",t)},3291:t=>{t.exports=class{static ERROR_TYPES={INVALID:"invalid",EMPTY:"empty",WRONG:"wrong",VALID:"valid"};static validate(t){throw new Error(`Method 'validate()' must be implemented by ${this.name}`)}static mask(t){return t}}},3505:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLA",default:!1,max_length:8,max_length_with_mask:10,min_length:7,placeholder:"99.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){if("string"!=typeof t||0===t.length)return{result:!1,type:this.ERROR_TYPES.EMPTY};if((t=t.replace(/[\s.-]/g,"")).length>this.CONFIG.max_length)return{result:!1,type:this.ERROR_TYPES.WRONG};let e=0,i=0,n=0;const s=t[t.length-1];if(t.length<this.CONFIG.min_length)for(i=t.length;i<this.CONFIG.min_length;i+=1)t=`0${t}`;for(i=0;i<this.CONFIG.min_length;i+=1)e+=parseInt("2987634"[i],10)*parseInt(t[i],10)%10;return n=e%10==0?0:10-e%10,s!==n.toString()?{result:!1,type:this.ERROR_TYPES.WRONG}:{result:!0,type:this.ERROR_TYPES.VALID}}}},4073:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-payment-method-logo-slider-container"),t.appendChild(this.createContent()),t}createContent(){const t=JSON.parse(this.getAttribute("methods")),e=document.createElement("div");e.classList.add("mp-payment-method-logo-slider-content"),e.appendChild(this.createImage(t[0]));const i=e.firstChild;return this.createSlider(i,t),e}createImage({src:t,alt:e}){const i=document.createElement("payment-method-logo");return i.setAttribute("src",t),i.setAttribute("alt",e),i}createSlider(t,e,i=0){t.setAttribute("src",e[i].src),t.setAttribute("alt",e[i].alt),i=i<e.length-1?i+1:0,setTimeout((()=>{this.createSlider(t,e,i)}),2e3)}}customElements.define("payment-method-logo-slider",t)},4751:()=>{class t extends HTMLElement{static get observedAttributes(){return["title","description","retryButtonText"]}connectedCallback(){this.build()}attributeChangedCallback(){this.firstElementChild&&(this.removeChild(this.firstElementChild),this.build())}build(){const t=this.createAlertDetails(),e=this.createCardContent();t.appendChild(e),this.appendChild(t)}createAlertDetails(){const t=document.createElement("div");return t.classList.add("mp-alert-details-card"),t}createCardContent(){const t=document.createElement("div");t.classList.add("mp-alert-details-card-content");const e=document.createElement("div");e.classList.add("mp-alert-details-card-content-left");const i=document.createElement("div");i.classList.add("mp-alert-details-card-content-right"),t.appendChild(e),t.appendChild(i);const n=this.createBadge(),s=this.createTitle(),a=this.createDescription(),r=this.createRetryButton();return e.appendChild(n),i.appendChild(s),i.appendChild(a),i.appendChild(r),t}createBadge(){const t=document.createElement("div");return t.innerHTML="!",t.classList.add("mp-alert-details-badge"),t}createTitle(){const t=document.createElement("p");return t.innerHTML=this.getAttribute("title"),t.classList.add("mp-alert-details-title"),t}createDescription(){const t=document.createElement("p");return t.innerHTML=this.getAttribute("description"),t.classList.add("mp-alert-details-description"),t}createRetryButton(){const t=this.getAttribute("retryButtonText"),e=document.createElement("button");return e.classList.add("mp-alert-details-retry-button"),e.innerHTML=t,e.onclick=()=>document.location.reload(),e}}customElements.define("alert-details",t)},6020:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MCO",default:!1,max_length:7,min_length:6,max_length_with_mask:7,placeholder:"9999999"};static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},6045:(t,e,i)=>{const n=i(1807);class s extends HTMLElement{selectObserver=null;selectObserverTimeout=null;connectedCallback(){this.build()}disconnectedCallback(){this.cleanupSelectObserver()}cleanupSelectObserver(){this.selectObserver&&(this.selectObserver.disconnect(),this.selectObserver=null),this.selectObserverTimeout&&(clearTimeout(this.selectObserverTimeout),this.selectObserverTimeout=null)}build(){const t=this.createInputDocument();this.appendChild(t)}createInputDocument(){const t=document.createElement("div");t.classList.add("mp-input-document"),t.setAttribute("data-cy","input-document-container");const e=this.createLabel(this.getAttribute("label-message")),i=this.createHelper(this.getAttribute("helper-empty")),n=this.createHiddenField(this.getAttribute("hidden-id")),s=this.createInput(i,n,e);return t.appendChild(e),t.appendChild(s),t.appendChild(n),t.appendChild(i),t}createLabel(t){const e=document.createElement("input-label");return e.setAttribute("message",t),e.setAttribute("isOptional","false"),e}createInput(t,e,i){const n=document.createElement("div");n.classList.add("mp-input"),n.setAttribute("id","form-checkout__identificationNumber-container");const s=JSON.parse(this.getAttribute("documents")),a=this.getAttribute("validate"),r=this.createVerticalLine(),l=this.createSelect(n,t,s,a),o=this.createDocument(n,l,t,i);return l.addEventListener("change",(()=>{n.classList.remove("mp-focus"),n.classList.remove("mp-error"),t.firstElementChild.style.display="none",this.setInputProperties(l,o,this.getAttribute("site-id")),this.setMaskInputDocument(l,o,e),this.updateLabelState(i,!1)})),n.appendChild(l),n.appendChild(r),n.appendChild(o),this.setMaskInputDocument(l,o,e),s&&0!==s.length||this.observeSelectPopulationFromSdk(l,o),n}buildDocumentNameWithSiteId(t,e){const i=t.replace(/[^a-zA-Z0-9]/g,"");return`${e&&["CE","DNI","CI"].includes(i.toUpperCase())?`${e}_`:""}${i}`.toUpperCase()}setInputProperties(t,e,i){const s=this.buildDocumentNameWithSiteId(t.value,i),a=n.getHandler(s);e.value="",e.setAttribute("maxlength",this.getPermissiveMaxLength(t.value,a)),e.setAttribute("placeholder",a.CONFIG.placeholder)}getPermissiveMaxLength(t,e){const i={CPF:11,CNPJ:14,CI:8}[t]??20;return e.mask("9".repeat(i)).length}observeSelectPopulationFromSdk(t,e){this.cleanupSelectObserver();const i=new MutationObserver((()=>{if(!this.isConnected||0===t.options.length)return;const i=this.getAttribute("site-id"),s=n.getDefaultCountryHandler(i),a=s&&Array.from(t.options).find((t=>this.buildDocumentNameWithSiteId(t.value,i)===s));t.value=a?a.value:t.options[0].value,this.setInputProperties(t,e,this.getAttribute("site-id")),this.cleanupSelectObserver()}));this.selectObserver=i,i.observe(t,{childList:!0,subtree:!1}),this.selectObserverTimeout=setTimeout((()=>{this.isConnected&&this.cleanupSelectObserver()}),15e3)}createSelect(t,e,i,s){const a=document.createElement("select");if(a.classList.add("mp-document-select"),a.setAttribute("name",this.getAttribute("select-name")),a.setAttribute("id",this.getAttribute("select-id")),a.setAttribute("data-checkout",this.getAttribute("select-data-checkout")),a.setAttribute("data-cy","select-document"),i&&i.length>0){i.forEach((t=>{this.createOption(a,t)}));const t=this.getAttribute("site-id"),e=n.getDefaultCountryHandler(t),s=e&&i.find((i=>this.buildDocumentNameWithSiteId(i,t)===e));a.value=s||a.options[0].value}return s&&(a.addEventListener("focus",(()=>{t.classList.add("mp-focus"),e.firstElementChild.style.display="none"})),a.addEventListener("focusout",(()=>{t.classList.remove("mp-focus"),e.firstElementChild.style.display="none"}))),a}createOption(t,e){const i=document.createElement("option");i.innerHTML=e,i.value=e,t.appendChild(i)}createHiddenField(t){const e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute("id",t),e}createVerticalLine(){const t=document.createElement("div");return t.classList.add("mp-vertical-line"),t}setMaskInputDocument(t,e,i){e.addEventListener("input",(s=>{const a=this.buildDocumentNameWithSiteId(t.value,this.getAttribute("site-id")),r=n.getHandler(a);if(r&&r.mask&&(s.target.value=r.mask(s.target.value)),i){const t=s.target.value.toUpperCase().replace(/[^A-Z0-9]/g,"");i.value=t}this.validateDocumentRealTime(s.target,t,e.parentElement)}))}validateDocumentRealTime(t,e,i){const s=i.parentElement.querySelector("input-helper"),a=i.parentElement.querySelector("input-label"),r=this.buildDocumentNameWithSiteId(e.value,this.getAttribute("site-id")),l=n.validate(r,t.value);l.result||this.updateHelperErrorMessage(s,this.getAttribute(`helper-${l.type}`)),this.updateValidationState(l.result,t,i,s,a)}updateValidationState(t,e,i,n,s){t?this.setValidState(e,i,n,s):this.setInvalidState(e,i,n,s)}setValidState(t,e,i,n){e.classList.remove("mp-error","mp-error-2px"),i.firstElementChild.style.display="none",t.setAttribute("name",this.getAttribute("input-name")),this.updateLabelState(n,!1)}setInvalidState(t,e,i,n){""===t.value.trim()?(e.classList.add("mp-error-2px"),i.firstElementChild.style.display="flex",t.setAttribute("name",this.getAttribute("input-name")),this.updateLabelState(n,!0)):(e.classList.add("mp-error-2px"),i.firstElementChild.style.display="flex",t.setAttribute("name",this.getAttribute("flag-error")),this.updateLabelState(n,!0))}createDocument(t,e,i,n){const s=document.createElement("input");return this.getAttribute("input-id")&&s.setAttribute("id",this.getAttribute("input-id")),s.setAttribute("name",this.getAttribute("input-name")),s.setAttribute("data-checkout",this.getAttribute("input-data-checkout")),s.setAttribute("data-cy","input-document"),s.classList.add("mp-document"),s.type="text",s.inputMode="text",this.setInputProperties(e,s,this.getAttribute("site-id")),s.addEventListener("focus",(()=>{this.handleInputFocus(t,i,s,n)})),s.addEventListener("focusout",(()=>{this.handleInputFocusOut(t,i,s,n)})),s}handleInputFocus(t,e,i,n){if(t.classList.contains("mp-error"))return t.classList.remove("mp-error"),void t.classList.add("mp-error-2px");t.classList.remove("mp-error-2px"),t.classList.add("mp-focus"),e.firstElementChild.style.display="none",i.setAttribute("name",this.getAttribute("input-name")),this.updateLabelState(n,!1)}handleInputFocusOut(t,e,i,n){t.classList.remove("mp-focus"),""===i.value.trim()?this.clearErrorStates(t,e,n):this.handleNonEmptyInput(t)}clearErrorStates(t,e,i){t.classList.remove("mp-error-2px","mp-error"),e&&(e.firstElementChild.style.display="none"),this.updateLabelState(i,!1)}handleNonEmptyInput(t){t.classList.contains("mp-error-2px")&&(t.classList.remove("mp-error-2px"),t.classList.add("mp-error"))}updateLabelState(t,e){e?t.firstElementChild.classList.add("mp-label-error"):t.firstElementChild.classList.remove("mp-label-error")}updateHelperErrorMessage(t,e){t.setAttribute("message",e),t.querySelector(".mp-helper-message").innerHTML=e}createHelper(t){const e=document.createElement("input-helper");return e.setAttribute("isVisible",!1),e.setAttribute("type","error"),e.setAttribute("message",t),e.setAttribute("input-id","mp-doc-number-helper"),e}}customElements.define("input-document",s)},6133:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLC",default:!0,max_length:9,max_length_with_mask:12,min_length:8,placeholder:"99.999.999-9"};static mask(t){const e=t.replace(/[^0-9kK]/g,"").toUpperCase();if(e.length<=3)return e;if(e.length>7){const t=e.slice(0,-1),i=e.slice(-1);let n;return n=t.length<=3?t:t.length<=6?t.slice(0,-3)+"."+t.slice(-3):t.slice(0,-6)+"."+t.slice(-6,-3)+"."+t.slice(-3),n+"-"+i}return e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},6135:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:null,default:!1,min_length:5,max_length:20,max_length_with_mask:20,placeholder:""};static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},6139:()=>{class t extends HTMLElement{connectedCallback(){this.render()}getBadgeIcon(t="warning"){return{error:"X",warning:"!"}[t]}render(){const t=this.getAttribute("description")||"",e=this.getAttribute("type")||"warning",i=this.getBadgeIcon(e);this.innerHTML=`\n <div class="mp-andes-notice-card ${e}">\n <div class="mp-andes-notice-card-content">\n <div class="mp-andes-notice-badge ${e}">${i}</div>\n <span class="mp-andes-notice-description">\n ${t}\n </span>\n </div>\n </div>\n `}}customElements.define("andes-notice",t)},6407:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLB",default:!1,max_length:14,max_length_with_mask:18,placeholder:"99.999.999/9999-99"};static WEIGHTS_DV1=[5,4,3,2,9,8,7,6,5,4,3,2];static WEIGHTS_DV2=[6,5,4,3,2,9,8,7,6,5,4,3,2];static mask(t){const e=t.replace(/[^A-Za-z0-9]/g,""),i=(e.slice(0,12)+e.slice(12).replace(/[^0-9]/g,"")).slice(0,14),n=i.slice(0,2),s=i.slice(2,5),a=i.slice(5,8),r=i.slice(8,12),l=i.slice(12,14);let o=n;return s&&(o+=`.${s}`),a&&(o+=`.${a}`),r&&(o+=`/${r}`),l&&(o+=`-${l}`),o}static charToValue(t){return t.charCodeAt(0)-48}static calculateCheckDigit(t,e){let i=0;for(let n=0;n<t.length;n++)i+=this.charToValue(t[n])*e[n];const n=i%11;return n<2?0:11-n}static validate(t){if("string"!=typeof t)return{result:!1,type:this.ERROR_TYPES.EMPTY};const e=t.replace(/[^A-Za-z0-9]/g,"").toUpperCase();if(""===e)return{result:!1,type:this.ERROR_TYPES.EMPTY};if(14!==e.length)return{result:!1,type:this.ERROR_TYPES.INVALID};if(!/^[A-Z0-9]{12}[0-9]{2}$/.test(e))return{result:!1,type:this.ERROR_TYPES.INVALID};if(/^(.)\1+$/.test(e))return{result:!1,type:this.ERROR_TYPES.WRONG};const i=e.substring(0,12),n=parseInt(e[12],10),s=parseInt(e[13],10),a=this.calculateCheckDigit(i,this.WEIGHTS_DV1);if(a!==n)return{result:!1,type:this.ERROR_TYPES.WRONG};const r=i+a.toString();return this.calculateCheckDigit(r,this.WEIGHTS_DV2)!==s?{result:!1,type:this.ERROR_TYPES.WRONG}:{result:!0,type:this.ERROR_TYPES.VALID}}}},7117:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-input-select-container"),t.appendChild(this.createLabel()),t.appendChild(this.createInput()),t.appendChild(this.createHelper()),t}createInput(){const t=document.createElement("div");return t.classList.add("mp-input-select-input"),t.appendChild(this.createSelect()),t}createSelect(){const t=document.createElement("select"),e=this.getAttribute("name");t.classList.add("mp-input-select-select"),t.setAttribute("id",e),t.setAttribute("name",e);const i=this.getAttribute("options")&&JSON.parse(this.getAttribute("options"));if(this.getAttribute("default-option")){const e=document.createElement("option");e.setAttribute("selected","selected"),e.setAttribute("hidden","hidden"),e.innerHTML=this.getAttribute("default-option"),t.appendChild(e)}return i&&0!==i.length&&i.forEach((e=>{t.appendChild(this.createOption(e))})),t}createOption(t){const e=document.createElement("option");return e.innerHTML=t.description,e.value=t.id,e}createLabel(){const t=document.createElement("input-label"),e=this.getAttribute("optional");return t.setAttribute("message",this.getAttribute("label")),"false"===e?t.setAttribute("isOptional",e):t.setAttribute("isOptional","true"),t}createHelper(){const t=document.createElement("input-helper");return t.setAttribute("isVisible",!1),t.setAttribute("message",this.getAttribute("helper-message")),t.setAttribute("input-id","mp-doc-number-helper"),t.setAttribute("type","message"),t}createHiddenField(t){const e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute("id",t),e}}customElements.define("input-select",t)},7702:()=>{class t extends HTMLElement{static get observedAttributes(){return["src","alt"]}connectedCallback(){this.build()}attributeChangedCallback(){this.firstElementChild&&(this.removeChild(this.firstElementChild),this.build())}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-payment-method-logo-container"),t.appendChild(this.createImage()),t}createImage(){const t=document.createElement("img");return t.classList.add("mp-payment-method-logo-image"),t.alt=this.getAttribute("alt"),t.src=this.getAttribute("src"),t.onerror=t=>t.target?.parentNode?.parentNode?.parentNode?.removeChild(t.target.parentNode.parentNode),t}}customElements.define("payment-method-logo",t)},7749:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MPE",default:!1,max_length:12,max_length_with_mask:15,min_length:6,placeholder:"999.999.999.999"};static mask(t){const e=t.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.length<=9?e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3):e.slice(0,-9)+"."+e.slice(-9,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},7887:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){const t=this.createTestMode(),e=this.createCardHeader(),i=this.createCardContent();t.appendChild(e),t.appendChild(i),this.appendChild(t)}createTestMode(){const t=document.createElement("div");return t.classList.add("mp-test-mode-card"),t.setAttribute("data-cy","test-mode-card"),t}createCardContent(){const t=document.createElement("div");t.classList.add("mp-test-mode-card-content");const e=document.createElement("p");e.innerHTML=this.getAttribute("description"),e.classList.add("mp-test-mode-description"),e.setAttribute("data-cy","test-mode-description"),t.appendChild(e);const i=this.getAttribute("link-text"),n=this.getAttribute("link-src"),s=document.createElement("a");return s.classList.add("mp-test-mode-link"),s.innerHTML=i,s.href=n,s.target="blank",e.appendChild(s),t}createCardHeader(){const t=document.createElement("div");t.classList.add("mp-test-mode-card-content");const e=this.createBadge(),i=this.createTitle();return t.appendChild(e),t.appendChild(i),t}createBadge(){const t=document.createElement("div");return t.innerHTML="!",t.classList.add("mp-test-mode-badge"),t}createTitle(){const t=document.createElement("p");return t.innerHTML=this.getAttribute("title"),t.classList.add("mp-test-mode-title"),t.setAttribute("data-cy","test-mode-title"),t}}customElements.define("test-mode",t)},8051:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=JSON.parse(this.getAttribute("methods")),e=document.createElement("div");return e.classList.add("mp-payment-methods-container"),t.forEach((t=>{e.appendChild(this.createPaymentMethodType(t))})),e}createPaymentMethodType(t){const{title:e,label:i,payment_methods:n}=t,s=document.createElement("div");return s.classList.add("mp-payment-method-type-container"),n&&0!==n.length&&(s.appendChild(this.createHeader(e,i)),s.appendChild(this.createContent(n))),s}createHeader(t,e){const i=document.createElement("div");return i.classList.add("mp-payment-methods-header"),t&&i.appendChild(this.createTitle(t)),e&&i.appendChild(this.createBadge(e)),i}createTitle(t){const e=document.createElement("p");return e.classList.add("mp-payment-methods-title"),e.innerHTML=t,e}createBadge(t){const e=document.createElement("div"),i=document.createElement("span");return i.classList.add("mp-payment-methods-badge-text"),i.innerHTML=t,e.classList.add("mp-payment-methods-badge"),e.appendChild(i),e}createContent(t){const e=document.createElement("div");return e.classList.add("mp-payment-methods-content"),t.forEach((t=>{e.appendChild(this.createImage(t))})),e}createImage(t){const{src:e,alt:i}=t,n=document.createElement("payment-method-logo");return n.setAttribute("src",e),n.setAttribute("alt",i),n}}customElements.define("payment-methods",t)},9241:()=>{class t extends HTMLElement{helper=this.createHelper();inputContainer=this.createInputContainer();connectedCallback(){this.build()}build(){const t=document.createElement("div");t.classList.add("mp-yape-input-code-container");const e=document.createElement("div");e.classList.add("mp-yape-label-container");const i=document.createElement("label");i.setAttribute("id","yape-input-code-label"),i.textContent=this.getAttribute("label")||"Código de aprobación";const n=document.createElement("div");n.classList.add("mp-yape-icon-wrapper");const s=document.createElement("img");s.src=this.getAttribute("src"),s.alt="Icone de ajuda",s.classList.add("mp-yape-icon");const a=document.createElement("div");a.classList.add("mp-yape-tooltip"),a.textContent=this.getAttribute("tooltip-text")||"Encuéntralo en el menú de la app de Yape.",n.appendChild(s),n.appendChild(a),e.appendChild(i),e.appendChild(n),t.appendChild(e),this.inputs=[];for(let t=0;t<6;t+=1){const e=document.createElement("input");e.type="text",e.maxLength="1",e.classList.add("mp-yape-code-input"),e.setAttribute("input-index",t),this.inputs.push(e),e.addEventListener("input",(e=>{/\d/.test(e.target.value)?1===e.target.value.length&&t<5&&this.inputs[t+1].focus():e.target.value="",this.updateClassesOnInput()})),e.addEventListener("keydown",(t=>{const e=parseInt(t.target.getAttribute("input-index"));"ArrowLeft"===t.key&&e>0?this.inputs[e-1].focus():"ArrowRight"===t.key&&e<5?this.inputs[e+1].focus():"Backspace"===t.key&&e>0&&!t.target.value&&this.inputs[e-1].focus()})),0===t&&e.addEventListener("paste",(t=>this.handlePaste(t))),e.addEventListener("focus",(()=>{e.classList.add("mp-input-code-focus"),e.classList.remove("mp-input-code-error"),this.helper.firstElementChild.style.display="none",document.getElementById("yape-input-code-label").style.color="#111111"})),e.addEventListener("blur",(()=>{setTimeout((()=>{this.validate()}),100)})),this.inputContainer.appendChild(e)}t.appendChild(this.inputContainer),this.appendChild(t),this.appendChild(this.helper),this.applyStyles()}validate(){this.checkForErrors(this.helper,this.inputContainer)}handlePaste(t){if(t.preventDefault(),!Array.isArray(this.inputs))return;const e=((t.clipboardData||window.clipboardData).getData("text")||"").split("").filter((t=>/\d/.test(t)));e.length>0&&e.forEach(((t,e)=>{e<this.inputs.length&&(this.inputs[e].value=t)})),this.updateClassesOnInput()}updateClassesOnInput(){this.inputs.forEach((t=>{t.classList.remove("mp-input-code-error"),t.classList.add("mp-input-code-focus")}))}checkForErrors(t,e){const i=e.querySelectorAll("input"),n=Array.from(i).every((t=>""!==t.value)),s=Array.from(i).some((t=>""!==t.value));document.activeElement.classList.contains("mp-yape-code-input")||n||(i.forEach((t=>t.classList.add("mp-input-code-error"))),t.firstElementChild.style.display="flex",document.getElementById("yape-input-code-label").style.color="#f23d4f",document.getElementById("helper-approval-code").childNodes[1].innerHTML=s?document.querySelector("input-code").getAttribute("invalid-error-message"):document.querySelector("input-code").getAttribute("empty-error-message"))}applyStyles(){const t=document.createElement("style");t.textContent="\n .mp-checkout-container .mp-yape-input-code-container {\n display: flex !important;\n flex-direction: column !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n }\n\n .mp-checkout-container .mp-yape-label-container {\n display: flex !important;\n align-items: flex-start !important;\n margin-bottom: -8px !important;\n font-style: normal !important;\n font-weight: 400 !important;\n height: 30px !important;\n line-height: 18px !important;\n font-size: 14px !important;\n padding-left: 6px !important\n }\n\n .mp-checkout-container .mp-yape-icon-wrapper {\n position: relative !important;\n display: flex !important;\n align-items: center !important;\n }\n\n .mp-checkout-container .mp-yape-icon {\n max-width: 20px !important;\n margin-left: 4px !important;\n cursor: pointer !important;\n }\n\n .mp-checkout-container .mp-yape-tooltip {\n display: none !important;\n position: absolute !important;\n top: -55px !important;\n left: 50% !important;\n transform: translateX(-50%) !important;\n background-color: white !important;\n padding: 8px !important;\n border-radius: 8px !important;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;\n z-index: 100 !important;\n white-space: nowrap !important;\n pointer-events: none !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n font-size: 14px !important;\n font-weight: 400 !important;\n line-height: 28px !important;\n text-align: left !important;\n\n }\n\n .mp-checkout-container .mp-yape-tooltip::after {\n content: \"\";\n position: absolute;\n bottom: -8px;\n left: 51%;\n transform: translateX(-70%);\n border-width: 8px 8px 0 8px;\n border-style: solid;\n z-index: 101;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n clip-path: polygon(100% 0%, 0% 0%, 50% 100%);\n color: white;\n }\n\n .mp-checkout-container .mp-yape-icon-wrapper:hover .mp-yape-tooltip {\n display: block !important;\n }\n\n .mp-checkout-container .mp-yape-input-container {\n display: flex !important;\n gap: 8px !important;\n }\n\n .mp-checkout-container .mp-yape-code-input {\n width: 38px !important;\n height: 48px !important;\n background: #ffffff !important;\n text-align: center !important;\n font-size: 24px !important;\n border: 1px solid #ccc !important;\n border-radius: 4px !important;\n font-size: 16px !important;\n line-height: 20px !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n font-weight: 400 !important;\n box-sizing: border-box;\n }\n\n .mp-checkout-container .mp-yape-code-input:nth-child(4) {\n margin-left: 10px !important;\n }\n\n .mp-checkout-container .mp-input-code-focus {\n border: 1px solid var(--andes-accent-color) !important;\n }\n\n .mp-checkout-container .mp-input-code-error {\n border: 1px solid #f23d4f !important;\n }\n\n @media screen and (max-width: 375px) {\n #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container {\n flex-direction: row !important;\n gap: 2px !important;\n }\n\n #mp-checkout-yape-root.mp-checkout-yape-container {\n padding: 24px 0!important;\n }\n }\n\n @media only screen and (min-width: 376px) and (max-width: 480px) {\n #mp-checkout-yape-root.mp-checkout-yape-container {\n padding: 24px 0!important;\n }\n }\n ",this.appendChild(t)}createInputContainer(){const t=document.createElement("div");return t.classList.add("mp-yape-input-container"),t}createHelper(){const t=document.createElement("input-helper");return t.setAttribute("isVisible",!1),t.setAttribute("type","error"),t.setAttribute("message","error"),t.setAttribute("input-id","helper-approval-code"),t}}customElements.define("input-code",t)},9604:()=>{class t extends HTMLElement{static get observedAttributes(){return["label","placeholder","value","tooltip","validation-regexp","error-message","tooltip-position","tooltip-label"]}constructor(){super(),this._value="",this._showError=!1,this._inputEl=null,this._onDocumentClick=this._onDocumentClick.bind(this)}connectedCallback(){this._value=this.getAttribute("value")||"",this.render()}disconnectedCallback(){document.removeEventListener("click",this._onDocumentClick)}attributeChangedCallback(t,e,i){"value"===t&&this._inputEl&&this._inputEl.value!==i&&(this._inputEl.value=i||"",this._value=i||""),"value"!==t&&this.render()}get value(){return this._inputEl?this._inputEl.value:this._value}set value(t){this.setAttribute("value",t),this._inputEl&&(this._inputEl.value=t),this._value=t}_validate(t){const e=this.getAttribute("validation-regexp");if(!e||!t)return!0;try{return new RegExp(e).test(t)}catch{return!0}}_onInput(t){this._value=t.target.value,this.setAttribute("value",this._value),this._showError&&(this._showError=!1,this._updateErrorState())}_onChange(t){const e=t.target.value;e&&!this._validate(e)?this._showError=!0:this._showError=!1,this._updateErrorState(),this.dispatchEvent(new CustomEvent("change",{detail:{value:e,valid:!this._showError}}))}_onDocumentClick(t){this.contains(t.target)||this._hideTooltip()}_toggleTooltip(){this.querySelector(".mp-input-with-tooltip-tooltip-content").classList.contains("show")?this._hideTooltip():this._showTooltip()}_showTooltip(){this.querySelector(".mp-input-with-tooltip-tooltip-content").classList.add("show"),document.addEventListener("click",this._onDocumentClick)}_hideTooltip(){this.querySelector(".mp-input-with-tooltip-tooltip-content").classList.remove("show"),document.removeEventListener("click",this._onDocumentClick)}_updateErrorState(){const t=this.querySelector(".mp-input-with-tooltip-input-container"),e=this.querySelector(".mp-input-with-tooltip-label");t&&(this._showError?(t.classList.add("error"),e.classList.add("error")):(t.classList.remove("error"),e.classList.remove("error")));const i=this.querySelector(".mp-input-with-tooltip-helper-error");i&&(i.style.display=this._showError?"flex":"none")}render(){const t=this.getAttribute("label")||"",e=this.getAttribute("placeholder")||"",i=this.getAttribute("tooltip")||"",n=this.getAttribute("tooltip-label")||"Mais informações",s=this.getAttribute("error-message")||"Valor inválido",a=this._value||"",r=this._showError,l=this.getAttribute("tooltip-position")||"right";this.innerHTML=`\n <label\n tabindex="0"\n for="mp-input-with-tooltip-input"\n class="mp-input-with-tooltip-label"\n >${t}</label>\n <div class="mp-input-with-tooltip-input-container${r?" error":""}">\n <input\n id="mp-input-with-tooltip-input"\n class="mp-input-with-tooltip-input"\n placeholder="${e}"\n value="${a}"\n />\n <span\n class="mp-input-with-tooltip-tooltip-icon"\n tabindex="0"\n aria-label="${n}"\n role="button"\n >?</span>\n <div\n aria-describedby="mp-input-with-tooltip-tooltip-content"\n class="mp-input-with-tooltip-tooltip-content mp-input-with-tooltip-tooltip-${l}"\n >\n <span\n id="mp-input-with-tooltip-tooltip-content"\n tabindex="0"\n role="tooltip"\n >\n ${i}\n </span>\n </div>\n </div>\n <div\n id="mp-input-with-tooltip-helper-error"\n tabindex="0"\n class="mp-input-with-tooltip-helper-error"\n style="display:${r?"block":"none"}"\n >\n <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n <rect width="12" height="12" rx="6" fill="#CC1818"/>\n <path d="M6.72725 2.90918H5.27271L5.45452 6.90918H6.54543L6.72725 2.90918Z" fill="white"/>\n <path d="M5.99998 7.63645C6.40164 7.63645 6.72725 7.96206 6.72725 8.36373C6.72725 8.76539 6.40164 9.091 5.99998 9.091C5.59832 9.091 5.27271 8.76539 5.27271 8.36373C5.27271 7.96206 5.59832 7.63645 5.99998 7.63645Z" fill="white"/>\n </svg>\n ${s}\n </div>\n `,this._inputEl=this.querySelector("input"),this._inputEl.value=a,this._inputEl.addEventListener("input",this._onInput.bind(this)),this._inputEl.addEventListener("change",this._onChange.bind(this));const o=this.querySelector(".mp-input-with-tooltip-tooltip-icon");o.addEventListener("click",(()=>{this._toggleTooltip()})),o.addEventListener("keydown",(t=>{"Enter"!==t.key&&" "!==t.key||this._toggleTooltip()}))}}customElements.define("input-with-tooltip",t)},9794:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MPE",default:!0,max_length:9,max_length_with_mask:12,min_length:8,placeholder:"99.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=2?e:`${e.slice(0,2)}.${e.slice(2).replace(/(\d{3})(?=\d)/g,"$1.")}`}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},9957:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLU",default:!0,max_length:8,max_length_with_mask:11,min_length:7,placeholder:"9.999.999-9"};static mask(t){const e=t.replace(/\D+/g,"");if(e.length<=3)return e;if(e.length>6){const t=e.slice(0,-1),i=e.slice(-1);let n;return n=t.length<=3?t:t.length<=6?t.slice(0,-3)+"."+t.slice(-3):t.slice(0,-6)+"."+t.slice(-6,-3)+"."+t.slice(-3),n+"-"+i}return e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){if("string"!=typeof t||0===t.length)return{result:!1,type:this.ERROR_TYPES.EMPTY};if((t=t.replace(/[\s.-]/g,"")).length>this.CONFIG.max_length)return{result:!1,type:this.ERROR_TYPES.WRONG};let e=0,i=0,n=0;const s=t[t.length-1];if(t.length<this.CONFIG.min_length)for(i=t.length;i<this.CONFIG.min_length;i+=1)t=`0${t}`;for(i=0;i<this.CONFIG.min_length;i+=1)e+=parseInt("2987634"[i],10)*parseInt(t[i],10)%10;return n=e%10==0?0:10-e%10,s!==n.toString()?{result:!1,type:this.ERROR_TYPES.WRONG}:{result:!0,type:this.ERROR_TYPES.VALID}}}}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,i),a.exports}i(4751),i(6139),i(3185),i(9241),i(540),i(6407),i(2781),i(3291),i(1807),i(6135),i(1981),i(2603),i(6020),i(3505),i(938),i(9957),i(7749),i(9794),i(2957),i(454),i(6133),i(6045),i(2119),i(2577),i(1943),i(893),i(7117),i(1295),i(9604),i(4073),i(7702),i(8051),i(2979),i(26),i(7887)})();1 (()=>{var t={26:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-terms-and-conditions-container"),t.setAttribute("data-cy","terms-and-conditions-container"),t.appendChild(this.createText()),t.appendChild(this.createLink()),t}createText(){const t=document.createElement("span");return t.classList.add("mp-terms-and-conditions-text"),t.innerHTML=this.getAttribute("description"),t}createLink(){const t=document.createElement("a");return t.classList.add("mp-terms-and-conditions-link"),t.innerHTML=this.getAttribute("link-text"),t.href=this.getAttribute("link-src"),t.target="blank",t}}customElements.define("terms-and-conditions",t)},454:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MPE",default:!1,max_length:11,max_length_with_mask:14,min_length:11,placeholder:"99.999.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.length<=9?e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3):e.slice(0,-9)+"."+e.slice(-9,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},540:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MCO",default:!0,max_length:10,min_length:5,max_length_with_mask:13,placeholder:"9.999.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.length<=9?e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3):e.slice(0,-9)+"."+e.slice(-9,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},893:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-input-radio-container"),t.appendChild(this.createRadio()),t.appendChild(this.createLabel()),t}createRadio(){const t=document.createElement("input"),e=this.getAttribute("dataRate");return t.classList.add("mp-input-radio-radio"),t.type="radio",t.id=this.getAttribute("identification"),t.name=this.getAttribute("name"),t.value=this.getAttribute("value"),t.setAttribute("data-cy","input-radio"),e&&t.setAttribute("dataRate",e),t}createLabel(){const t=document.createElement("label");return t.classList.add("mp-input-radio-label"),t.htmlFor=this.getAttribute("identification"),t}}customElements.define("input-radio",t)},938:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLA",default:!0,max_length:8,max_length_with_mask:10,min_length:7,placeholder:"99.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},1295:()=>{class t extends HTMLElement{static get observedAttributes(){return["columns","name","button-name","bank-interest-text"]}constructor(){super(),this.index=0,this.limit=5,this.offset=this.limit,this.columns=null,this.total=0}connectedCallback(){this.build()}attributeChangedCallback(){this.firstElementChild&&(this.removeChild(this.firstElementChild),this.build())}build(){this.appendChild(this.createContainer())}setColumns(){return this.columns=JSON.parse(this.getAttribute("columns")),this}setTotal(){return this.total=this.columns.length,this}createContainer(){const t=document.createElement("div");return this.setColumns(),this.columns&&(this.setTotal(),t.classList.add("mp-input-table-container"),t.setAttribute("data-cy","input-table-container"),t.appendChild(this.createList()),t.appendChild(this.createBankInterestDisclaimer())),t}createList(){const t=document.createElement("div");t.classList.add("mp-input-table-list"),t.setAttribute("data-cy","input-table-list");const e=this.createLink();return e.onclick=()=>this.appendItems(this.columns,t,e,!0),this.appendItems(this.columns,t,e,!1),t.appendChild(e),t}createItem(t){const e=document.createElement("div");return e.classList.add("mp-input-table-item"),e.appendChild(this.createLabel(t)),e}createLabel(t){const{id:e,value:i,rowText:n,rowObs:s,highlight:a,img:r,alt:l,dataRate:o}=t,c=this.getAttribute("name"),d=document.createElement("div");return d.classList.add("mp-input-table-label"),d.appendChild(this.createOption(e,c,i,n,r,l,o)),s&&d.appendChild(this.createRowObs(s,a)),d.onclick=()=>{document.getElementById(e).checked=!0},d}createOption(t,e,i,n,s,a,r){const l=document.createElement("div");return l.classList.add("mp-input-table-option"),l.appendChild(this.createRadio(t,e,i,r)),s?l.appendChild(this.createRowTextWithImg(n,s,a)):l.appendChild(this.createRowText(n)),l}createRadio(t,e,i,n){const s=document.createElement("input-radio");return s.setAttribute("name",e),s.setAttribute("value",i),s.setAttribute("identification",t),s.setAttribute("dataRate",n),s}createRowText(t){const e=document.createElement("span");return e.classList.add("mp-input-table-row-text"),e.innerHTML=t,e}createRowTextWithImg(t,e,i){const n=document.createElement("span"),s=document.createElement("payment-method-logo");return s.setAttribute("src",e),s.setAttribute("alt",i),s.style.marginRight="10px",n.classList.add("mp-input-table-row-text-image"),n.innerHTML=t,n.appendChild(s),n}createRowObs(t,e){const i=document.createElement("span");return e?i.classList.add("mp-input-table-row-obs-highlight"):i.classList.add("mp-input-table-row-obs"),i.innerHTML=t,i}createLink(){const t=document.createElement("div");t.classList.add("mp-input-table-container-link");const e=document.createElement("a");return e.setAttribute("id","more-options"),e.classList.add("mp-input-table-link"),e.innerHTML=this.getAttribute("button-name"),t.appendChild(e),t}createBankInterestDisclaimer(){const t=document.createElement("div");t.classList.add("mp-input-table-bank-interest-container");const e=document.createElement("p");return e.classList.add("mp-input-table-bank-interest-text"),e.innerText=this.getAttribute("bank-interest-text"),t.appendChild(e),t}appendItems(t,e,i,n){this.validateLimit();for(let s=this.index;s<this.limit;s+=1)n?e.insertBefore(this.createItem(t[s]),i):e.appendChild(this.createItem(t[s]));this.limit>=this.total&&i.style.setProperty("display","none","important"),this.index+=this.offset,this.limit+=this.offset,this.validateLimit()}validateLimit(){this.limit>this.total&&(this.limit=this.total)}}customElements.define("input-table",t)},1807:(t,e,i)=>{const n=i(2781),s=i(6407),a=i(6135),r=i(938),l=i(9794),o=i(1981),c=i(2603),d=i(3505),p=i(9957),u=i(540),h=i(6020),m=i(7749),g=i(2957),b=i(6133),E=i(454);t.exports=class{static handlers={CPF:n,CNPJ:s,CC:u,MLA_CI:d,MLU_CI:p,MCO_CE:h,MPE_CE:m,MLA_DNI:r,MPE_DNI:l,NIT:g,LC:o,LE:c,RUT:b,RUC:E};static getDefaultCountryHandler(t){for(const[e,i]of Object.entries(this.handlers))if(i.CONFIG&&i.CONFIG.site_id===t&&!0===i.CONFIG.default)return e;return null}static getHandler(t){return this.handlers[t]||a}static mask(t,e){return this.getHandler(t).mask(e)}static validate(t,e){return this.getHandler(t).validate(e)}}},1943:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createLabel())}createLabel(){const t=document.createElement("label");t.classList.add("mp-input-label"),t.setAttribute("data-cy","input-label");const e=this.getAttribute("message");t.textContent=e;const i=this.getAttribute("for");i&&(t.htmlFor=i);let n=this.getAttribute("isOptional");if("string"==typeof n&&(n="false"!==n),!n){const e=document.createElement("b");e.textContent="*",e.style="color: red",t.appendChild(e)}return t}}customElements.define("input-label",t)},1981:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLA",default:!1,max_length:7,max_length_with_mask:9,min_length:6,placeholder:"9.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},2119:()=>{class t extends HTMLElement{helper=this.createHelper();input=this.createInput();connectedCallback(){this.build()}build(){const t=this.createInputField();this.appendChild(t)}createInputField(){const t=document.createElement("div");t.classList.add("mp-yape-input-field"),t.setAttribute("data-cy","input-field-container");const e=this.createLabel(this.getAttribute("label-message"));return t.appendChild(e),t.appendChild(this.input),t.appendChild(this.helper),t}createLabel(t){const e=document.createElement("input-label");return e.setAttribute("message",t),e.setAttribute("isOptional","true"),e}validate(){""===this.input.value?(this.helper.firstElementChild.style.display="flex",document.getElementById("helper-input-field").childNodes[1].innerHTML=document.querySelector("input-field").getAttribute("empty-error-message"),this.input.classList.add("mp-input-field-error"),document.querySelector('[data-cy="input-label"]').style.setProperty("color","#f23d4f","important")):this.input.value.length<11?(this.helper.firstElementChild.style.display="flex",document.getElementById("helper-input-field").childNodes[1].innerHTML=document.querySelector("input-field").getAttribute("invalid-error-message"),this.input.classList.add("mp-input-field-error"),document.querySelector('[data-cy="input-label"]').style.setProperty("color","#f23d4f","important")):(this.helper.firstElementChild.style.display="none",document.querySelector('[data-cy="input-label"]').style.setProperty("color","#111111","important"))}createInput(){const t=document.createElement("input");return t.classList.add("mp-yape-input"),t.setAttribute("id","checkout__yapePhoneNumber"),t.setAttribute("maxlength","11"),t.setAttribute("placeholder","Ej.: 872 123 432"),t.setAttribute("aria-hidden","true"),t.setAttribute("data-cy","input-field"),t.setAttribute("name","phoneNumber"),t.setAttribute("required","true"),t.addEventListener("input",(()=>{const e=t.value.replace(/\D/g,"");let i="";for(let t=0;t<e.length;t+=1)i+=e[t],(t+1)%3==0&&t!==e.length-1&&(i+=" ");t.value=i})),t.addEventListener("focus",(()=>{t.classList.add("mp-input-field-focus"),t.classList.remove("mp-input-field-error"),this.helper.firstElementChild.style.display="none"})),t.addEventListener("blur",(()=>{this.validate()})),t}createHelper(){const t=document.createElement("input-helper");return t.setAttribute("isVisible","false"),t.setAttribute("type","error"),t.setAttribute("message","error"),t.setAttribute("input-id","helper-input-field"),t}}customElements.define("input-field",t)},2577:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createHelper())}createHelper(){const t=document.createElement("div"),e=this.getAttribute("type")||"error";t.classList.add("mp-helper"),t.setAttribute("id",this.getAttribute("input-id")),t.setAttribute("data-cy","helper-container"),t.setAttribute("role","error"===e?"alert":"status"),this.validateVisibility(t);const i=this.getAttribute("message"),n=this.createHelperMessage(i,e);if("error"===e){const e=this.createIcon();t.appendChild(e)}return t.appendChild(n),t}createIcon(){const t=document.createElement("div");return t.innerHTML='\n <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n <rect width="12" height="12" rx="6" fill="#CC1818"/><path d="M6.72725 2.90918H5.27271L5.45452 6.90918H6.54543L6.72725 2.90918Z" fill="white"/>\n <path d="M5.99998 7.63645C6.40164 7.63645 6.72725 7.96206 6.72725 8.36373C6.72725 8.76539 6.40164 9.091 5.99998 9.091C5.59832 9.091 5.27271 8.76539 5.27271 8.36373C5.27271 7.96206 5.59832 7.63645 5.99998 7.63645Z" fill="white"/>\n </svg>',t.classList.add("mp-helper-icon"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),t}createHelperMessage(t,e){const i=document.createElement("div");return i.textContent=t,i.classList.add("mp-helper-message"),i.classList.add(e),i.setAttribute("data-cy","helper-message"),i}updateMessage(t){this.setAttribute("message",t),this.querySelector(".mp-helper-message").textContent=t}validateVisibility(t){let e=this.getAttribute("isVisible");"string"==typeof e&&(e="false"!==e),t.style.display=e?"flex":"none"}}customElements.define("input-helper",t)},2603:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLA",default:!1,max_length:7,max_length_with_mask:9,min_length:6,placeholder:"9.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},2781:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLB",default:!0,max_length:11,max_length_with_mask:14,placeholder:"999.999.999-99"};static mask(t){return t.replace(/\D+/g,"").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})/,"$1-$2").replace(/(-\d{2})\d+?$/,"$1")}static validate(t){if("string"!=typeof t)return{result:!1,type:this.ERROR_TYPES.INVALID};if(!(t=t.replace(/[\s.-]*/gim,""))||0===t.length)return{result:!1,type:this.ERROR_TYPES.EMPTY};if("00000000000"===t||"11111111111"===t||"22222222222"===t||"33333333333"===t||"44444444444"===t||"55555555555"===t||"66666666666"===t||"77777777777"===t||"88888888888"===t||"99999999999"===t)return{result:!1,type:this.ERROR_TYPES.WRONG};if(0===parseInt(t,10))return{result:!1,type:this.ERROR_TYPES.WRONG};if(!t||11!==t.length)return{result:!1,type:this.ERROR_TYPES.INVALID};let e,i=0;for(let e=1;e<=9;e+=1)i+=parseInt(t.substring(e-1,e))*(11-e);if(e=10*i%11,10!==e&&11!==e||(e=0),e!==parseInt(t.substring(9,10)))return{result:!1,type:this.ERROR_TYPES.WRONG};i=0;for(let e=1;e<=10;e+=1)i+=parseInt(t.substring(e-1,e))*(12-e);return e=10*i%11,10!==e&&11!==e||(e=0),e!==parseInt(t.substring(10,11))?{result:!1,type:this.ERROR_TYPES.WRONG}:{result:!0,type:this.ERROR_TYPES.VALID}}}},2957:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MCO",default:!1,max_length:16,min_length:7,max_length_with_mask:16,placeholder:"999.999.999-9"};static mask(t){const e=t.replace(/\D+/g,"");if(e.length<=3)return e;if(e.length<=6)return e.slice(0,-3)+"."+e.slice(-3);if(e.length>=9){const t=e.slice(0,-1),i=e.slice(-1);return`${t.replace(/\B(?=(\d{3})+(?!\d))/g,".")}-${i}`}return e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},2979:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-pix-template-container"),t.setAttribute("data-cy","pix-template-container"),t.appendChild(this.createImage()),t.appendChild(this.createTitle()),t.appendChild(this.createSubtitle()),t}createTitle(){const t=document.createElement("p");return t.classList.add("mp-pix-template-title"),t.innerText=this.getAttribute("title"),t}createSubtitle(){const t=document.createElement("p");return t.classList.add("mp-pix-template-subtitle"),t.innerText=this.getAttribute("subtitle"),t}createImage(){const t=document.createElement("img");return t.classList.add("mp-pix-template-image"),t.src=this.getAttribute("src"),t.alt=this.getAttribute("alt"),t}}customElements.define("pix-template",t)},3185:()=>{class t extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render()}render(){const t=document.createElement("div");t.classList.add("mp-info-notification");const e=document.createElement("div");e.classList.add("content");const i=document.createElement("img");i.src=this.getAttribute("src"),i.alt="Icone de informação",i.classList.add("icon");const n=document.createElement("div");n.classList.add("message"),n.textContent=this.getAttribute("message")||"Mensagem de informação",e.appendChild(i),e.appendChild(n),t.appendChild(e);const s=document.createElement("div");s.classList.add("footer");const a=document.createElement("img");a.src=this.getAttribute("icon"),a.alt="Footer Icon",a.classList.add("footer-icon"),s.appendChild(a),s.appendChild(document.createTextNode(this.getAttribute("footer-text")||"Procesado por Mercado Pago")),this.shadowRoot.append(t),this.shadowRoot.append(s),this.applyStyles()}applyStyles(){const t=document.createElement("style");t.textContent="\n .mp-info-notification {\n display: flex !important;\n flex-direction: column !important;\n padding: 12px !important;\n background-color: #f7f7f7 !important;\n border-radius: 8px !important;\n border-left: 4px solid var(--andes-accent-color) !important;\n margin-bottom: 16px !important;\n }\n\n .content {\n display: flex !important;\n align-items: center !important;\n }\n\n .icon {\n max-width: 16px !important;\n max-height: 16px !important;\n margin-right: 8px !important;\n }\n\n @media (max-width: 600px) {\n .icon {\n margin-bottom: 15px !important;\n }\n }\n\n @media (max-width: 300px) {\n .icon {\n margin-bottom: 35px !important;\n }\n }\n\n .message {\n flex-grow: 1 !important;\n color: #333 !important;\n padding: 10px !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n font-size: 14px !important;\n font-weight: 400 !important;\n line-height: 18px !important;\n text-align: left !important;\n }\n\n .footer {\n display: flex !important;\n align-items: center !important;\n color: #999 !important;\n margin-top: 24px !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 15px !important;\n text-align: left !important;\n }\n\n .footer-icon {\n max-width: 20px !important;\n margin-right: 8px !important;\n }\n ",this.shadowRoot.appendChild(t)}}customElements.define("checkout-notice",t)},3291:t=>{t.exports=class{static ERROR_TYPES={INVALID:"invalid",EMPTY:"empty",WRONG:"wrong",VALID:"valid"};static validate(t){throw new Error(`Method 'validate()' must be implemented by ${this.name}`)}static mask(t){return t}}},3505:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLA",default:!1,max_length:8,max_length_with_mask:10,min_length:7,placeholder:"99.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){if("string"!=typeof t||0===t.length)return{result:!1,type:this.ERROR_TYPES.EMPTY};if((t=t.replace(/[\s.-]/g,"")).length>this.CONFIG.max_length)return{result:!1,type:this.ERROR_TYPES.WRONG};let e=0,i=0,n=0;const s=t[t.length-1];if(t.length<this.CONFIG.min_length)for(i=t.length;i<this.CONFIG.min_length;i+=1)t=`0${t}`;for(i=0;i<this.CONFIG.min_length;i+=1)e+=parseInt("2987634"[i],10)*parseInt(t[i],10)%10;return n=e%10==0?0:10-e%10,s!==n.toString()?{result:!1,type:this.ERROR_TYPES.WRONG}:{result:!0,type:this.ERROR_TYPES.VALID}}}},4073:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-payment-method-logo-slider-container"),t.appendChild(this.createContent()),t}createContent(){const t=JSON.parse(this.getAttribute("methods")),e=document.createElement("div");e.classList.add("mp-payment-method-logo-slider-content"),e.appendChild(this.createImage(t[0]));const i=e.firstChild;return this.createSlider(i,t),e}createImage({src:t,alt:e}){const i=document.createElement("payment-method-logo");return i.setAttribute("src",t),i.setAttribute("alt",e),i}createSlider(t,e,i=0){t.setAttribute("src",e[i].src),t.setAttribute("alt",e[i].alt),i=i<e.length-1?i+1:0,setTimeout((()=>{this.createSlider(t,e,i)}),2e3)}}customElements.define("payment-method-logo-slider",t)},4751:()=>{class t extends HTMLElement{static get observedAttributes(){return["title","description","retryButtonText"]}connectedCallback(){this.build()}attributeChangedCallback(){this.firstElementChild&&(this.removeChild(this.firstElementChild),this.build())}build(){const t=this.createAlertDetails(),e=this.createCardContent();t.appendChild(e),this.appendChild(t)}createAlertDetails(){const t=document.createElement("div");return t.classList.add("mp-alert-details-card"),t}createCardContent(){const t=document.createElement("div");t.classList.add("mp-alert-details-card-content");const e=document.createElement("div");e.classList.add("mp-alert-details-card-content-left");const i=document.createElement("div");i.classList.add("mp-alert-details-card-content-right"),t.appendChild(e),t.appendChild(i);const n=this.createBadge(),s=this.createTitle(),a=this.createDescription(),r=this.createRetryButton();return e.appendChild(n),i.appendChild(s),i.appendChild(a),i.appendChild(r),t}createBadge(){const t=document.createElement("div");return t.innerHTML="!",t.classList.add("mp-alert-details-badge"),t}createTitle(){const t=document.createElement("p");return t.innerHTML=this.getAttribute("title"),t.classList.add("mp-alert-details-title"),t}createDescription(){const t=document.createElement("p");return t.innerHTML=this.getAttribute("description"),t.classList.add("mp-alert-details-description"),t}createRetryButton(){const t=this.getAttribute("retryButtonText"),e=document.createElement("button");return e.classList.add("mp-alert-details-retry-button"),e.innerHTML=t,e.onclick=()=>document.location.reload(),e}}customElements.define("alert-details",t)},6020:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MCO",default:!1,max_length:7,min_length:6,max_length_with_mask:7,placeholder:"9999999"};static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},6045:(t,e,i)=>{const n=i(1807),s={CPF:"CPF",CNPJ:"CNPJ",DNI:"DNI",CI:"CI",LC:"LC",LE:"LE",OTRO:"Otro",RUT:"RUT",CC:"CC",CE:"CE",NIT:"NIT",RUC:"RUC"},a={MPE:{CE:"C.E"}},r=t=>(t||"").replace(/[^a-zA-Z0-9]/g,"").toUpperCase();class l extends HTMLElement{selectObserver=null;selectObserverTimeout=null;connectedCallback(){this.build()}disconnectedCallback(){this.cleanupSelectObserver()}cleanupSelectObserver(){this.selectObserver&&(this.selectObserver.disconnect(),this.selectObserver=null),this.selectObserverTimeout&&(clearTimeout(this.selectObserverTimeout),this.selectObserverTimeout=null)}build(){const t=this.createInputDocument();this.appendChild(t)}createInputDocument(){const t=document.createElement("div");t.classList.add("mp-input-document"),t.setAttribute("data-cy","input-document-container");const e=this.createLabel(this.getAttribute("label-message")),i=this.createHelper(this.getAttribute("helper-empty")),n=this.createHiddenField(this.getAttribute("hidden-id")),s=this.createInstruction(),a=this.createInput(i,n,e);return t.appendChild(e),t.appendChild(a),t.appendChild(n),t.appendChild(i),s&&t.appendChild(s),t}elementId(t){return`${this.getAttribute("select-id")||"mp-doc-number"}-${t}`}hasInstruction(){return!(!this.getAttribute("instruction-range")&&!this.getAttribute("instruction-fixed"))}createInstruction(){if(!this.hasInstruction())return null;const t=document.createElement("span");return t.setAttribute("id",this.elementId("instruction")),t.classList.add("mp-sr-only"),this.instructionElement=t,t}updateInstruction(t){const e=this.instructionElement;if(!e)return;const i=t?.CONFIG?.min_length,n=t?.CONFIG?.max_length;e.textContent=n?i&&i!==n?(this.getAttribute("instruction-range")||"").replace("{min}",i).replace("{max}",n):(this.getAttribute("instruction-fixed")||"").replace("{digits}",n):""}createLabel(t){const e=document.createElement("input-label");e.setAttribute("message",t),e.setAttribute("isOptional","false"),e.setAttribute("id",this.elementId("label"));const i=this.getAttribute("select-id");return i&&e.setAttribute("for",i),e}createInput(t,e,i){const n=document.createElement("div");n.classList.add("mp-input"),n.setAttribute("id","form-checkout__identificationNumber-container");const s=JSON.parse(this.getAttribute("documents")),a=this.getAttribute("validate"),r=this.createVerticalLine(),l=this.createSelect(n,t,s,a),o=this.createDocument(n,l,t,i);return l.addEventListener("change",(()=>{n.classList.remove("mp-focus"),this.clearErrorStates(n,t,i),this.setDocumentValidity(o,t,!1),this.setInputProperties(l,o,this.getAttribute("site-id")),this.setMaskInputDocument(l,o,e)})),n.appendChild(l),n.appendChild(r),n.appendChild(o),this.setMaskInputDocument(l,o,e),s&&0!==s.length||this.observeSelectPopulationFromSdk(l,o),n}buildDocumentNameWithSiteId(t,e){const i=r(t);return`${e&&["CE","DNI","CI"].includes(i)?`${e}_`:""}${i}`.toUpperCase()}setInputProperties(t,e,i){const s=this.buildDocumentNameWithSiteId(t.value,i),a=n.getHandler(s);e.value="",e.setAttribute("maxlength",this.getPermissiveMaxLength(t.value,a)),e.setAttribute("placeholder",a.CONFIG.placeholder),this.updateInstruction(a)}getPermissiveMaxLength(t,e){const i={CPF:11,CNPJ:14,CI:8}[t]??20;return e.mask("9".repeat(i)).length}observeSelectPopulationFromSdk(t,e){this.cleanupSelectObserver();const i=new MutationObserver((()=>{if(!this.isConnected||0===t.options.length)return;const i=this.getAttribute("site-id"),s=n.getDefaultCountryHandler(i);this.normalizeDocumentOptionLabels(t,i);const a=s&&Array.from(t.options).find((t=>this.buildDocumentNameWithSiteId(t.value,i)===s));t.value=a?a.value:t.options[0].value,this.setInputProperties(t,e,this.getAttribute("site-id")),this.cleanupSelectObserver()}));this.selectObserver=i,i.observe(t,{childList:!0,subtree:!1}),this.selectObserverTimeout=setTimeout((()=>{this.isConnected&&this.cleanupSelectObserver()}),15e3)}normalizeDocumentOptionLabels(t,e){const i=(e||"").toUpperCase(),n=a[i]||{};Array.from(t.options).forEach((t=>{const e=r(t.value),i=n[e]||s[e];i&&(t.textContent=i)}))}createSelect(t,e,i,s){const a=document.createElement("select");if(a.classList.add("mp-document-select"),a.setAttribute("name",this.getAttribute("select-name")),a.setAttribute("id",this.getAttribute("select-id")),a.setAttribute("data-checkout",this.getAttribute("select-data-checkout")),a.setAttribute("data-cy","select-document"),a.setAttribute("aria-required","true"),i&&i.length>0){i.forEach((t=>{this.createOption(a,t)}));const t=this.getAttribute("site-id"),e=n.getDefaultCountryHandler(t),s=e&&i.find((i=>this.buildDocumentNameWithSiteId(i,t)===e));a.value=s||a.options[0].value}return s&&(a.addEventListener("focus",(()=>{t.classList.add("mp-focus"),e.firstElementChild.style.display="none"})),a.addEventListener("focusout",(()=>{t.classList.remove("mp-focus"),e.firstElementChild.style.display="none"}))),a}createOption(t,e){const i=document.createElement("option");i.textContent=e,i.value=e,t.appendChild(i)}createHiddenField(t){const e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute("id",t),e}createVerticalLine(){const t=document.createElement("div");return t.classList.add("mp-vertical-line"),t}setMaskInputDocument(t,e,i){e.addEventListener("input",(s=>{const a=this.buildDocumentNameWithSiteId(t.value,this.getAttribute("site-id")),r=n.getHandler(a);if(r&&r.mask&&(s.target.value=r.mask(s.target.value)),i){const t=s.target.value.toUpperCase().replace(/[^A-Z0-9]/g,"");i.value=t}this.validateDocumentRealTime(s.target,t,e.parentElement)}))}validateDocumentRealTime(t,e,i){const s=i.parentElement.querySelector("input-helper"),a=i.parentElement.querySelector("input-label"),r=this.buildDocumentNameWithSiteId(e.value,this.getAttribute("site-id")),l=n.validate(r,t.value);l.result||this.updateHelperErrorMessage(s,this.getAttribute(`helper-${l.type}`)),this.updateValidationState(l.result,t,i,s,a)}updateValidationState(t,e,i,n,s){t?this.setValidState(e,i,n,s):this.setInvalidState(e,i,n,s)}setValidState(t,e,i,n){e.classList.remove("mp-error","mp-error-2px"),i.firstElementChild.style.display="none",t.setAttribute("name",this.getAttribute("input-name")),this.updateLabelState(n,!1),this.setDocumentValidity(t,i,!1)}setDocumentValidity(t,e,i){t.setAttribute("aria-invalid",i?"true":"false");const n=e&&e.getAttribute("id"),s=[this.hasInstruction()?this.elementId("instruction"):null,i?n:null].filter(Boolean);s.length?t.setAttribute("aria-describedby",s.join(" ")):t.removeAttribute("aria-describedby")}setInvalidState(t,e,i,n){""===t.value.trim()?(e.classList.add("mp-error-2px"),i.firstElementChild.style.display="flex",t.setAttribute("name",this.getAttribute("input-name")),this.updateLabelState(n,!0)):(e.classList.add("mp-error-2px"),i.firstElementChild.style.display="flex",t.setAttribute("name",this.getAttribute("flag-error")),this.updateLabelState(n,!0)),this.setDocumentValidity(t,i,!0)}createDocument(t,e,i,n){const s=document.createElement("input");return this.getAttribute("input-id")&&s.setAttribute("id",this.getAttribute("input-id")),s.setAttribute("name",this.getAttribute("input-name")),s.setAttribute("data-checkout",this.getAttribute("input-data-checkout")),s.setAttribute("data-cy","input-document"),s.setAttribute("aria-labelledby",this.elementId("label")),s.setAttribute("aria-required","true"),this.hasInstruction()&&s.setAttribute("aria-describedby",this.elementId("instruction")),s.classList.add("mp-document"),s.type="text",s.inputMode="text",this.setInputProperties(e,s,this.getAttribute("site-id")),s.addEventListener("focus",(()=>{this.handleInputFocus(t,i,s,n)})),s.addEventListener("focusout",(()=>{this.handleInputFocusOut(t,i,s,n)})),s}handleInputFocus(t,e,i,n){if(t.classList.contains("mp-error"))return t.classList.remove("mp-error"),void t.classList.add("mp-error-2px");t.classList.remove("mp-error-2px"),t.classList.add("mp-focus"),e.firstElementChild.style.display="none",i.setAttribute("name",this.getAttribute("input-name")),this.updateLabelState(n,!1),this.setDocumentValidity(i,e,!1)}markInvalidFromSubmit(){const t=this.querySelector("input.mp-document"),e=this.querySelector("input-helper");t&&e&&this.setDocumentValidity(t,e,!0)}handleInputFocusOut(t,e,i,n){t.classList.remove("mp-focus"),""===i.value.trim()?(this.clearErrorStates(t,e,n),this.setDocumentValidity(i,e,!1)):this.handleNonEmptyInput(t)}clearErrorStates(t,e,i){t.classList.remove("mp-error-2px","mp-error"),e&&(e.firstElementChild.style.display="none"),this.updateLabelState(i,!1)}handleNonEmptyInput(t){t.classList.contains("mp-error-2px")&&(t.classList.remove("mp-error-2px"),t.classList.add("mp-error"))}updateLabelState(t,e){e?t.firstElementChild.classList.add("mp-label-error"):t.firstElementChild.classList.remove("mp-label-error")}updateHelperErrorMessage(t,e){t.updateMessage(e)}createHelper(t){const e=document.createElement("input-helper");return e.setAttribute("isVisible",!1),e.setAttribute("type","error"),e.setAttribute("message",t),e.setAttribute("input-id","mp-doc-number-helper"),e.setAttribute("id",this.elementId("helper")),e}}customElements.define("input-document",l)},6133:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLC",default:!0,max_length:9,max_length_with_mask:12,min_length:8,placeholder:"99.999.999-9"};static mask(t){const e=t.replace(/[^0-9kK]/g,"").toUpperCase();if(e.length<=3)return e;if(e.length>7){const t=e.slice(0,-1),i=e.slice(-1);let n;return n=t.length<=3?t:t.length<=6?t.slice(0,-3)+"."+t.slice(-3):t.slice(0,-6)+"."+t.slice(-6,-3)+"."+t.slice(-3),n+"-"+i}return e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},6135:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:null,default:!1,min_length:5,max_length:20,max_length_with_mask:20,placeholder:""};static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},6139:()=>{class t extends HTMLElement{connectedCallback(){this.render()}getBadgeIcon(t="warning"){return{error:"X",warning:"!"}[t]}render(){const t=this.getAttribute("description")||"",e=this.getAttribute("type")||"warning",i=this.getBadgeIcon(e);this.innerHTML=`\n <div class="mp-andes-notice-card ${e}">\n <div class="mp-andes-notice-card-content">\n <div class="mp-andes-notice-badge ${e}">${i}</div>\n <span class="mp-andes-notice-description">\n ${t}\n </span>\n </div>\n </div>\n `}}customElements.define("andes-notice",t)},6407:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLB",default:!1,max_length:14,max_length_with_mask:18,placeholder:"99.999.999/9999-99"};static WEIGHTS_DV1=[5,4,3,2,9,8,7,6,5,4,3,2];static WEIGHTS_DV2=[6,5,4,3,2,9,8,7,6,5,4,3,2];static mask(t){const e=t.replace(/[^A-Za-z0-9]/g,""),i=(e.slice(0,12)+e.slice(12).replace(/[^0-9]/g,"")).slice(0,14),n=i.slice(0,2),s=i.slice(2,5),a=i.slice(5,8),r=i.slice(8,12),l=i.slice(12,14);let o=n;return s&&(o+=`.${s}`),a&&(o+=`.${a}`),r&&(o+=`/${r}`),l&&(o+=`-${l}`),o}static charToValue(t){return t.charCodeAt(0)-48}static calculateCheckDigit(t,e){let i=0;for(let n=0;n<t.length;n++)i+=this.charToValue(t[n])*e[n];const n=i%11;return n<2?0:11-n}static validate(t){if("string"!=typeof t)return{result:!1,type:this.ERROR_TYPES.EMPTY};const e=t.replace(/[^A-Za-z0-9]/g,"").toUpperCase();if(""===e)return{result:!1,type:this.ERROR_TYPES.EMPTY};if(14!==e.length)return{result:!1,type:this.ERROR_TYPES.INVALID};if(!/^[A-Z0-9]{12}[0-9]{2}$/.test(e))return{result:!1,type:this.ERROR_TYPES.INVALID};if(/^(.)\1+$/.test(e))return{result:!1,type:this.ERROR_TYPES.WRONG};const i=e.substring(0,12),n=parseInt(e[12],10),s=parseInt(e[13],10),a=this.calculateCheckDigit(i,this.WEIGHTS_DV1);if(a!==n)return{result:!1,type:this.ERROR_TYPES.WRONG};const r=i+a.toString();return this.calculateCheckDigit(r,this.WEIGHTS_DV2)!==s?{result:!1,type:this.ERROR_TYPES.WRONG}:{result:!0,type:this.ERROR_TYPES.VALID}}}},7117:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-input-select-container"),t.appendChild(this.createLabel()),t.appendChild(this.createInput()),t.appendChild(this.createHelper()),t}createInput(){const t=document.createElement("div");return t.classList.add("mp-input-select-input"),t.appendChild(this.createSelect()),t}createSelect(){const t=document.createElement("select"),e=this.getAttribute("name");t.classList.add("mp-input-select-select"),t.setAttribute("id",e),t.setAttribute("name",e);const i=this.getAttribute("options")&&JSON.parse(this.getAttribute("options"));if(this.getAttribute("default-option")){const e=document.createElement("option");e.setAttribute("selected","selected"),e.setAttribute("hidden","hidden"),e.innerHTML=this.getAttribute("default-option"),t.appendChild(e)}return i&&0!==i.length&&i.forEach((e=>{t.appendChild(this.createOption(e))})),t}createOption(t){const e=document.createElement("option");return e.innerHTML=t.description,e.value=t.id,e}createLabel(){const t=document.createElement("input-label"),e=this.getAttribute("optional");return t.setAttribute("message",this.getAttribute("label")),"false"===e?t.setAttribute("isOptional",e):t.setAttribute("isOptional","true"),t}createHelper(){const t=document.createElement("input-helper");return t.setAttribute("isVisible",!1),t.setAttribute("message",this.getAttribute("helper-message")),t.setAttribute("input-id","mp-doc-number-helper"),t.setAttribute("type","message"),t}createHiddenField(t){const e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute("id",t),e}}customElements.define("input-select",t)},7702:()=>{class t extends HTMLElement{static get observedAttributes(){return["src","alt"]}connectedCallback(){this.build()}attributeChangedCallback(){this.firstElementChild&&(this.removeChild(this.firstElementChild),this.build())}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-payment-method-logo-container"),t.appendChild(this.createImage()),t}createImage(){const t=document.createElement("img");return t.classList.add("mp-payment-method-logo-image"),t.alt=this.getAttribute("alt"),t.src=this.getAttribute("src"),t.onerror=t=>t.target?.parentNode?.parentNode?.parentNode?.removeChild(t.target.parentNode.parentNode),t}}customElements.define("payment-method-logo",t)},7749:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MPE",default:!1,max_length:12,max_length_with_mask:15,min_length:6,placeholder:"999.999.999.999"};static mask(t){const e=t.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.length<=9?e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3):e.slice(0,-9)+"."+e.slice(-9,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},7887:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){const t=this.createTestMode(),e=this.createCardHeader(),i=this.createCardContent();t.appendChild(e),t.appendChild(i),this.appendChild(t)}createTestMode(){const t=document.createElement("div");return t.classList.add("mp-test-mode-card"),t.setAttribute("data-cy","test-mode-card"),t}createCardContent(){const t=document.createElement("div");t.classList.add("mp-test-mode-card-content");const e=document.createElement("p");e.innerHTML=this.getAttribute("description"),e.classList.add("mp-test-mode-description"),e.setAttribute("data-cy","test-mode-description"),t.appendChild(e);const i=this.getAttribute("link-text"),n=this.getAttribute("link-src"),s=document.createElement("a");return s.classList.add("mp-test-mode-link"),s.innerHTML=i,s.href=n,s.target="blank",e.appendChild(s),t}createCardHeader(){const t=document.createElement("div");t.classList.add("mp-test-mode-card-content");const e=this.createBadge(),i=this.createTitle();return t.appendChild(e),t.appendChild(i),t}createBadge(){const t=document.createElement("div");return t.innerHTML="!",t.classList.add("mp-test-mode-badge"),t}createTitle(){const t=document.createElement("p");return t.innerHTML=this.getAttribute("title"),t.classList.add("mp-test-mode-title"),t.setAttribute("data-cy","test-mode-title"),t}}customElements.define("test-mode",t)},8051:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=JSON.parse(this.getAttribute("methods")),e=document.createElement("div");return e.classList.add("mp-payment-methods-container"),t.forEach((t=>{e.appendChild(this.createPaymentMethodType(t))})),e}createPaymentMethodType(t){const{title:e,label:i,payment_methods:n}=t,s=document.createElement("div");return s.classList.add("mp-payment-method-type-container"),n&&0!==n.length&&(s.appendChild(this.createHeader(e,i)),s.appendChild(this.createContent(n))),s}createHeader(t,e){const i=document.createElement("div");return i.classList.add("mp-payment-methods-header"),t&&i.appendChild(this.createTitle(t)),e&&i.appendChild(this.createBadge(e)),i}createTitle(t){const e=document.createElement("p");return e.classList.add("mp-payment-methods-title"),e.innerHTML=t,e}createBadge(t){const e=document.createElement("div"),i=document.createElement("span");return i.classList.add("mp-payment-methods-badge-text"),i.innerHTML=t,e.classList.add("mp-payment-methods-badge"),e.appendChild(i),e}createContent(t){const e=document.createElement("div");return e.classList.add("mp-payment-methods-content"),t.forEach((t=>{e.appendChild(this.createImage(t))})),e}createImage(t){const{src:e,alt:i}=t,n=document.createElement("payment-method-logo");return n.setAttribute("src",e),n.setAttribute("alt",i),n}}customElements.define("payment-methods",t)},9241:()=>{class t extends HTMLElement{helper=this.createHelper();inputContainer=this.createInputContainer();connectedCallback(){this.build()}build(){const t=document.createElement("div");t.classList.add("mp-yape-input-code-container");const e=document.createElement("div");e.classList.add("mp-yape-label-container");const i=document.createElement("label");i.setAttribute("id","yape-input-code-label"),i.textContent=this.getAttribute("label")||"Código de aprobación";const n=document.createElement("div");n.classList.add("mp-yape-icon-wrapper");const s=document.createElement("img");s.src=this.getAttribute("src"),s.alt="Icone de ajuda",s.classList.add("mp-yape-icon");const a=document.createElement("div");a.classList.add("mp-yape-tooltip"),a.textContent=this.getAttribute("tooltip-text")||"Encuéntralo en el menú de la app de Yape.",n.appendChild(s),n.appendChild(a),e.appendChild(i),e.appendChild(n),t.appendChild(e),this.inputs=[];for(let t=0;t<6;t+=1){const e=document.createElement("input");e.type="text",e.maxLength="1",e.classList.add("mp-yape-code-input"),e.setAttribute("input-index",t),this.inputs.push(e),e.addEventListener("input",(e=>{/\d/.test(e.target.value)?1===e.target.value.length&&t<5&&this.inputs[t+1].focus():e.target.value="",this.updateClassesOnInput()})),e.addEventListener("keydown",(t=>{const e=parseInt(t.target.getAttribute("input-index"));"ArrowLeft"===t.key&&e>0?this.inputs[e-1].focus():"ArrowRight"===t.key&&e<5?this.inputs[e+1].focus():"Backspace"===t.key&&e>0&&!t.target.value&&this.inputs[e-1].focus()})),0===t&&e.addEventListener("paste",(t=>this.handlePaste(t))),e.addEventListener("focus",(()=>{e.classList.add("mp-input-code-focus"),e.classList.remove("mp-input-code-error"),this.helper.firstElementChild.style.display="none",document.getElementById("yape-input-code-label").style.color="#111111"})),e.addEventListener("blur",(()=>{setTimeout((()=>{this.validate()}),100)})),this.inputContainer.appendChild(e)}t.appendChild(this.inputContainer),this.appendChild(t),this.appendChild(this.helper),this.applyStyles()}validate(){this.checkForErrors(this.helper,this.inputContainer)}handlePaste(t){if(t.preventDefault(),!Array.isArray(this.inputs))return;const e=((t.clipboardData||window.clipboardData).getData("text")||"").split("").filter((t=>/\d/.test(t)));e.length>0&&e.forEach(((t,e)=>{e<this.inputs.length&&(this.inputs[e].value=t)})),this.updateClassesOnInput()}updateClassesOnInput(){this.inputs.forEach((t=>{t.classList.remove("mp-input-code-error"),t.classList.add("mp-input-code-focus")}))}checkForErrors(t,e){const i=e.querySelectorAll("input"),n=Array.from(i).every((t=>""!==t.value)),s=Array.from(i).some((t=>""!==t.value));document.activeElement.classList.contains("mp-yape-code-input")||n||(i.forEach((t=>t.classList.add("mp-input-code-error"))),t.firstElementChild.style.display="flex",document.getElementById("yape-input-code-label").style.color="#f23d4f",document.getElementById("helper-approval-code").childNodes[1].innerHTML=s?document.querySelector("input-code").getAttribute("invalid-error-message"):document.querySelector("input-code").getAttribute("empty-error-message"))}applyStyles(){const t=document.createElement("style");t.textContent="\n .mp-checkout-container .mp-yape-input-code-container {\n display: flex !important;\n flex-direction: column !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n }\n\n .mp-checkout-container .mp-yape-label-container {\n display: flex !important;\n align-items: flex-start !important;\n margin-bottom: -8px !important;\n font-style: normal !important;\n font-weight: 400 !important;\n height: 30px !important;\n line-height: 18px !important;\n font-size: 14px !important;\n padding-left: 6px !important\n }\n\n .mp-checkout-container .mp-yape-icon-wrapper {\n position: relative !important;\n display: flex !important;\n align-items: center !important;\n }\n\n .mp-checkout-container .mp-yape-icon {\n max-width: 20px !important;\n margin-left: 4px !important;\n cursor: pointer !important;\n }\n\n .mp-checkout-container .mp-yape-tooltip {\n display: none !important;\n position: absolute !important;\n top: -55px !important;\n left: 50% !important;\n transform: translateX(-50%) !important;\n background-color: white !important;\n padding: 8px !important;\n border-radius: 8px !important;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;\n z-index: 100 !important;\n white-space: nowrap !important;\n pointer-events: none !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n font-size: 14px !important;\n font-weight: 400 !important;\n line-height: 28px !important;\n text-align: left !important;\n\n }\n\n .mp-checkout-container .mp-yape-tooltip::after {\n content: \"\";\n position: absolute;\n bottom: -8px;\n left: 51%;\n transform: translateX(-70%);\n border-width: 8px 8px 0 8px;\n border-style: solid;\n z-index: 101;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n clip-path: polygon(100% 0%, 0% 0%, 50% 100%);\n color: white;\n }\n\n .mp-checkout-container .mp-yape-icon-wrapper:hover .mp-yape-tooltip {\n display: block !important;\n }\n\n .mp-checkout-container .mp-yape-input-container {\n display: flex !important;\n gap: 8px !important;\n }\n\n .mp-checkout-container .mp-yape-code-input {\n width: 38px !important;\n height: 48px !important;\n background: #ffffff !important;\n text-align: center !important;\n font-size: 24px !important;\n border: 1px solid #ccc !important;\n border-radius: 4px !important;\n font-size: 16px !important;\n line-height: 20px !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n font-weight: 400 !important;\n box-sizing: border-box;\n }\n\n .mp-checkout-container .mp-yape-code-input:nth-child(4) {\n margin-left: 10px !important;\n }\n\n .mp-checkout-container .mp-input-code-focus {\n border: 1px solid var(--andes-accent-color) !important;\n }\n\n .mp-checkout-container .mp-input-code-error {\n border: 1px solid #f23d4f !important;\n }\n\n @media screen and (max-width: 375px) {\n #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container {\n flex-direction: row !important;\n gap: 2px !important;\n }\n\n #mp-checkout-yape-root.mp-checkout-yape-container {\n padding: 24px 0!important;\n }\n }\n\n @media only screen and (min-width: 376px) and (max-width: 480px) {\n #mp-checkout-yape-root.mp-checkout-yape-container {\n padding: 24px 0!important;\n }\n }\n ",this.appendChild(t)}createInputContainer(){const t=document.createElement("div");return t.classList.add("mp-yape-input-container"),t}createHelper(){const t=document.createElement("input-helper");return t.setAttribute("isVisible",!1),t.setAttribute("type","error"),t.setAttribute("message","error"),t.setAttribute("input-id","helper-approval-code"),t}}customElements.define("input-code",t)},9604:()=>{class t extends HTMLElement{static get observedAttributes(){return["label","placeholder","value","tooltip","validation-regexp","error-message","tooltip-position","tooltip-label"]}constructor(){super(),this._value="",this._showError=!1,this._inputEl=null,this._onDocumentClick=this._onDocumentClick.bind(this)}connectedCallback(){this._value=this.getAttribute("value")||"",this.render()}disconnectedCallback(){document.removeEventListener("click",this._onDocumentClick)}attributeChangedCallback(t,e,i){"value"===t&&this._inputEl&&this._inputEl.value!==i&&(this._inputEl.value=i||"",this._value=i||""),"value"!==t&&this.render()}get value(){return this._inputEl?this._inputEl.value:this._value}set value(t){this.setAttribute("value",t),this._inputEl&&(this._inputEl.value=t),this._value=t}_validate(t){const e=this.getAttribute("validation-regexp");if(!e||!t)return!0;try{return new RegExp(e).test(t)}catch{return!0}}_onInput(t){this._value=t.target.value,this.setAttribute("value",this._value),this._showError&&(this._showError=!1,this._updateErrorState())}_onChange(t){const e=t.target.value;e&&!this._validate(e)?this._showError=!0:this._showError=!1,this._updateErrorState(),this.dispatchEvent(new CustomEvent("change",{detail:{value:e,valid:!this._showError}}))}_onDocumentClick(t){this.contains(t.target)||this._hideTooltip()}_toggleTooltip(){this.querySelector(".mp-input-with-tooltip-tooltip-content").classList.contains("show")?this._hideTooltip():this._showTooltip()}_showTooltip(){this.querySelector(".mp-input-with-tooltip-tooltip-content").classList.add("show"),document.addEventListener("click",this._onDocumentClick)}_hideTooltip(){this.querySelector(".mp-input-with-tooltip-tooltip-content").classList.remove("show"),document.removeEventListener("click",this._onDocumentClick)}_updateErrorState(){const t=this.querySelector(".mp-input-with-tooltip-input-container"),e=this.querySelector(".mp-input-with-tooltip-label");t&&(this._showError?(t.classList.add("error"),e.classList.add("error")):(t.classList.remove("error"),e.classList.remove("error")));const i=this.querySelector(".mp-input-with-tooltip-helper-error");i&&(i.style.display=this._showError?"flex":"none")}render(){const t=this.getAttribute("label")||"",e=this.getAttribute("placeholder")||"",i=this.getAttribute("tooltip")||"",n=this.getAttribute("tooltip-label")||"Mais informações",s=this.getAttribute("error-message")||"Valor inválido",a=this._value||"",r=this._showError,l=this.getAttribute("tooltip-position")||"right";this.innerHTML=`\n <label\n tabindex="0"\n for="mp-input-with-tooltip-input"\n class="mp-input-with-tooltip-label"\n >${t}</label>\n <div class="mp-input-with-tooltip-input-container${r?" error":""}">\n <input\n id="mp-input-with-tooltip-input"\n class="mp-input-with-tooltip-input"\n placeholder="${e}"\n value="${a}"\n />\n <span\n class="mp-input-with-tooltip-tooltip-icon"\n tabindex="0"\n aria-label="${n}"\n role="button"\n >?</span>\n <div\n aria-describedby="mp-input-with-tooltip-tooltip-content"\n class="mp-input-with-tooltip-tooltip-content mp-input-with-tooltip-tooltip-${l}"\n >\n <span\n id="mp-input-with-tooltip-tooltip-content"\n tabindex="0"\n role="tooltip"\n >\n ${i}\n </span>\n </div>\n </div>\n <div\n id="mp-input-with-tooltip-helper-error"\n tabindex="0"\n class="mp-input-with-tooltip-helper-error"\n style="display:${r?"block":"none"}"\n >\n <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n <rect width="12" height="12" rx="6" fill="#CC1818"/>\n <path d="M6.72725 2.90918H5.27271L5.45452 6.90918H6.54543L6.72725 2.90918Z" fill="white"/>\n <path d="M5.99998 7.63645C6.40164 7.63645 6.72725 7.96206 6.72725 8.36373C6.72725 8.76539 6.40164 9.091 5.99998 9.091C5.59832 9.091 5.27271 8.76539 5.27271 8.36373C5.27271 7.96206 5.59832 7.63645 5.99998 7.63645Z" fill="white"/>\n </svg>\n ${s}\n </div>\n `,this._inputEl=this.querySelector("input"),this._inputEl.value=a,this._inputEl.addEventListener("input",this._onInput.bind(this)),this._inputEl.addEventListener("change",this._onChange.bind(this));const o=this.querySelector(".mp-input-with-tooltip-tooltip-icon");o.addEventListener("click",(()=>{this._toggleTooltip()})),o.addEventListener("keydown",(t=>{"Enter"!==t.key&&" "!==t.key||this._toggleTooltip()}))}}customElements.define("input-with-tooltip",t)},9794:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MPE",default:!0,max_length:9,max_length_with_mask:12,min_length:8,placeholder:"99.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=2?e:`${e.slice(0,2)}.${e.slice(2).replace(/(\d{3})(?=\d)/g,"$1.")}`}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},9957:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLU",default:!0,max_length:8,max_length_with_mask:11,min_length:7,placeholder:"9.999.999-9"};static mask(t){const e=t.replace(/\D+/g,"");if(e.length<=3)return e;if(e.length>6){const t=e.slice(0,-1),i=e.slice(-1);let n;return n=t.length<=3?t:t.length<=6?t.slice(0,-3)+"."+t.slice(-3):t.slice(0,-6)+"."+t.slice(-6,-3)+"."+t.slice(-3),n+"-"+i}return e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){if("string"!=typeof t||0===t.length)return{result:!1,type:this.ERROR_TYPES.EMPTY};if((t=t.replace(/[\s.-]/g,"")).length>this.CONFIG.max_length)return{result:!1,type:this.ERROR_TYPES.WRONG};let e=0,i=0,n=0;const s=t[t.length-1];if(t.length<this.CONFIG.min_length)for(i=t.length;i<this.CONFIG.min_length;i+=1)t=`0${t}`;for(i=0;i<this.CONFIG.min_length;i+=1)e+=parseInt("2987634"[i],10)*parseInt(t[i],10)%10;return n=e%10==0?0:10-e%10,s!==n.toString()?{result:!1,type:this.ERROR_TYPES.WRONG}:{result:!0,type:this.ERROR_TYPES.VALID}}}}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,i),a.exports}i(4751),i(6139),i(3185),i(9241),i(540),i(6407),i(2781),i(3291),i(1807),i(6135),i(1981),i(2603),i(6020),i(3505),i(938),i(9957),i(7749),i(9794),i(2957),i(454),i(6133),i(6045),i(2119),i(2577),i(1943),i(893),i(7117),i(1295),i(9604),i(4073),i(7702),i(8051),i(2979),i(26),i(7887)})(); -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/platform/CoreMonitorMetricsAdapter.ts
r3663899 r3710292 6 6 import { SUPER_TOKEN_ALLOWED_VARIANTS, SUPER_TOKEN_VARIANT_COOKIE } from '@super-token/adapters/platform/constants'; 7 7 import type { RestoreErrorReason } from '@super-token/useCases/RestorePreloadedPaymentMethod'; 8 import { 9 toTelemetryErrorMessage, 10 toSafeTelemetryErrorCode, 11 } from '@super-token/core/checkoutSession/ErrorClassification'; 8 12 9 13 /** … … 69 73 this.PLUGIN_JS_BASE_URL = params.plugin_js_base_url; 70 74 71 this.melidata = new MelidataAdapter((metricName, value, message) => 72 this.sendMetric(metricName, value, message), 73 ); 75 this.melidata = new MelidataAdapter((metricName, value, message) => this.sendMetric(metricName, value, message)); 74 76 } 75 77 … … 141 143 142 144 private normalizeErrorMessage(error: unknown): string { 143 if (!error) return 'Unknown error'; 144 145 const errorMessage = 146 (error as { message?: string })?.message || 147 (typeof error === 'string' ? error : JSON.stringify(error)); 148 const normalizedErrorMessage = errorMessage?.includes('email') 149 ? 'invalid_email_address_provided' 150 : errorMessage; 151 152 return normalizedErrorMessage || 'Unknown error'; 145 return toTelemetryErrorMessage(error); 153 146 } 154 147 155 148 private errorCodeOf(error: unknown): string { 156 return (error as { errorCode?: string })?.errorCode || 'unknown';149 return toSafeTelemetryErrorCode(error); 157 150 } 158 151 … … 187 180 const errorMessage = this.normalizeErrorMessage(error); 188 181 this.melidata.dispatchMelidataErrorEvent(errorMessage, this.CUSTOM_CHECKOUT_STEPS.POST_SUBMIT); 189 this.sendMetric('error_to_update_security_code', paymentMethod?.id || 'unknown', errorMessage, this.errorCodeOf(error)); 182 this.sendMetric( 183 'error_to_update_security_code', 184 paymentMethod?.id || 'unknown', 185 errorMessage, 186 this.errorCodeOf(error), 187 ); 190 188 } 191 189 … … 243 241 244 242 errorOnSubmit(errorCode: string, error: unknown, shouldNormalizeError = true): void { 245 const errorMessage = shouldNormalizeError ? this.normalizeErrorMessage(error) : (error as string); 243 // Keep the legacy argument for binary compatibility. Both paths preserve the diagnostic text; 244 // the shared formatter only redacts credential/PII values. 245 void shouldNormalizeError; 246 const reportedErrorCode = toTelemetryErrorMessage(errorCode, 'UNKNOWN_ERROR'); 247 const errorMessage = this.normalizeErrorMessage(error); 246 248 this.melidata.dispatchMelidataErrorEvent(errorMessage, this.CUSTOM_CHECKOUT_STEPS.POST_SUBMIT); 247 this.sendMetric('error_on_submit_super_token', errorCode, errorMessage);249 this.sendMetric('error_on_submit_super_token', reportedErrorCode, errorMessage); 248 250 } 249 251 … … 261 263 262 264 registerAuthorizedPseudotoken(authorizedPseudotokenInputExists: boolean): void { 263 this.sendMetric('authorized_pseudotoken', 'true', `input_exists:${authorizedPseudotokenInputExists ? 'true' : 'false'}`); 265 this.sendMetric( 266 'authorized_pseudotoken', 267 'true', 268 `input_exists:${authorizedPseudotokenInputExists ? 'true' : 'false'}`, 269 ); 264 270 } 265 271 … … 270 276 271 277 hasEscNotExists(paymentMethodIdentifier: string): void { 272 this.sendMetric('has_esc_not_exists', paymentMethodIdentifier || 'UNKNOWN_PAYMENT_METHOD', 'has_esc attribute not found in payment method'); 278 this.sendMetric( 279 'has_esc_not_exists', 280 paymentMethodIdentifier || 'UNKNOWN_PAYMENT_METHOD', 281 'has_esc attribute not found in payment method', 282 ); 273 283 } 274 284 … … 276 286 const errorMessage = this.normalizeErrorMessage(error); 277 287 this.melidata.dispatchMelidataErrorEvent(errorMessage, this.CUSTOM_CHECKOUT_STEPS.SELECT_PAYMENT_METHOD); 278 this.sendMetric('get_payment_method_fail', currentPaymentMethodIdentifier || 'UNKNOWN_PAYMENT_METHOD', errorMessage); 288 this.sendMetric( 289 'get_payment_method_fail', 290 currentPaymentMethodIdentifier || 'UNKNOWN_PAYMENT_METHOD', 291 errorMessage, 292 ); 279 293 } 280 294 281 295 getPaymentMethodLoadingTime(currentPaymentMethodIdentifier: string, durationSeconds: string): void { 282 this.sendMetric('get_payment_method_loading_time', currentPaymentMethodIdentifier || 'UNKNOWN_PAYMENT_METHOD', `${durationSeconds}s`); 296 this.sendMetric( 297 'get_payment_method_loading_time', 298 currentPaymentMethodIdentifier || 'UNKNOWN_PAYMENT_METHOD', 299 `${durationSeconds}s`, 300 ); 283 301 } 284 302 285 303 fetchPaymentMethodSuccess(paymentMethodIdentifier: string, cvvIsMandatory: boolean | null): void { 286 this.sendMetric('fetch_payment_method_success', paymentMethodIdentifier || 'UNKNOWN_PAYMENT_METHOD', `cvv_is_mandatory_${cvvIsMandatory}`); 304 this.sendMetric( 305 'fetch_payment_method_success', 306 paymentMethodIdentifier || 'UNKNOWN_PAYMENT_METHOD', 307 `cvv_is_mandatory_${cvvIsMandatory}`, 308 ); 287 309 } 288 310 … … 292 314 293 315 fetchPaymentMethodTimeout(paymentMethodIdentifier: string): void { 294 this.sendMetric('fetch_payment_method_timeout', paymentMethodIdentifier || 'UNKNOWN_PAYMENT_METHOD', 'Fetch payment method timed out'); 316 this.sendMetric( 317 'fetch_payment_method_timeout', 318 paymentMethodIdentifier || 'UNKNOWN_PAYMENT_METHOD', 319 'Fetch payment method timed out', 320 ); 295 321 } 296 322 … … 309 335 renderConsumerCreditsDetailsInnerHTML(success: boolean): void { 310 336 if (!success) { 311 this.melidata.dispatchMelidataErrorEvent('render_consumer_credits_details_inner_html_failed', this.CUSTOM_CHECKOUT_STEPS.SELECT_PAYMENT_METHOD); 337 this.melidata.dispatchMelidataErrorEvent( 338 'render_consumer_credits_details_inner_html_failed', 339 this.CUSTOM_CHECKOUT_STEPS.SELECT_PAYMENT_METHOD, 340 ); 312 341 } 313 342 this.sendMetric('render_consumer_credits_details_inner_html', success, ''); … … 365 394 366 395 superTokenInitializationError(error: unknown, dispatchedFrom: string): void { 367 const errorMessage = (error as { message?: string })?.message ?? String(error);396 const errorMessage = this.normalizeErrorMessage(error); 368 397 this.sendMetric( 369 398 'SUPER_TOKEN_INITIALIZATION_ERROR', … … 465 494 // Use injected params (same object the constructor received) to stay consistent with 466 495 // the rest of the class — avoids re-reading window.* after the constructor resolved it. 467 const basePath = 468 this.PLUGIN_JS_BASE_URL || 469 '/wp-content/plugins/woocommerce-mercadopago/assets/js/'; 496 const basePath = this.PLUGIN_JS_BASE_URL || '/wp-content/plugins/woocommerce-mercadopago/assets/js/'; 470 497 const files = [ 471 498 'checkouts/custom/entities/card-form.min.js', … … 480 507 let response = await fetch(basePath + file, { method: 'HEAD', cache: 'no-store' }); 481 508 if (response.status === 405) { 482 response = await fetch(basePath + file, { method: 'GET', cache: 'no-store', headers: { Range: 'bytes=0-0' } }); 509 response = await fetch(basePath + file, { 510 method: 'GET', 511 cache: 'no-store', 512 headers: { Range: 'bytes=0-0' }, 513 }); 483 514 } 484 515 if (!response.ok) return; … … 496 527 const fileName = (file.split('/').pop() as string).replace('.min.js', ''); 497 528 const lastModifiedDate = lastModified ? new Date(lastModified).toISOString().slice(0, 10) : 'unknown'; 498 this.sendMetric('mp_js_cache_age', String(ageDays), `file : ${fileName} age_days : ${ageDays} last_modified : ${lastModifiedDate}`); 529 this.sendMetric( 530 'mp_js_cache_age', 531 String(ageDays), 532 `file : ${fileName} age_days : ${ageDays} last_modified : ${lastModifiedDate}`, 533 ); 499 534 } catch { 500 535 // Silence errors — must not impact checkout -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/platform/MelidataAdapter.ts
r3663899 r3710292 29 29 * Note: `super-token-metrics.js` (legacy) mirrored `MPCustomEventDispatcher` 30 30 * (`mp-checkout-error-dispatcher.js`) with a per-event `waitForMelidata` + 5s race. 31 * This buffer approach intentionally diverges from that mirror; aligning the32 * canonical dispatcher is a separate follow-up.31 * This adapter keeps one 5s deadline for the whole FIFO buffer rather than one timer 32 * per event, preventing a never-settled readiness promise from retaining events forever. 33 33 */ 34 34 export class MelidataAdapter { 35 35 private readonly MELIDATA_ERROR_EVENT_NAME = 'mp_checkout_error'; 36 36 private readonly MELIDATA_LOAD_TIMEOUT_METRIC = 'mp_melidata_load_timeout'; 37 private readonly MELIDATA_LOAD_TIMEOUT_MS = 5000; 37 38 38 39 private readonly sendMetric: MetricSender; … … 49 50 private readinessArmed = false; 50 51 private loadListenerAdded = false; 52 private readinessTimer: ReturnType<typeof setTimeout> | null = null; 51 53 52 54 constructor(sendMetric: MetricSender) { … … 88 90 } 89 91 92 this.armTimeout(); 93 90 94 if (window.melidataReady && typeof window.melidataReady.then === 'function') { 91 95 window.melidataReady.then(() => this.onReady()).catch(() => this.onFailure()); … … 106 110 if (!this.loadListenerAdded) { 107 111 this.loadListenerAdded = true; 108 window.addEventListener('load', () => { 109 this.readinessArmed = false; 110 this.armReadiness(); 111 }, { once: true }); 112 window.addEventListener( 113 'load', 114 () => { 115 this.readinessArmed = false; 116 this.armReadiness(); 117 }, 118 { once: true }, 119 ); 112 120 } 113 121 } 114 122 123 private armTimeout(): void { 124 if (this.readinessTimer || this.ready || this.failed) { 125 return; 126 } 127 this.readinessTimer = setTimeout(() => this.onFailure(), this.MELIDATA_LOAD_TIMEOUT_MS); 128 } 129 130 private clearTimeout(): void { 131 if (!this.readinessTimer) { 132 return; 133 } 134 clearTimeout(this.readinessTimer); 135 this.readinessTimer = null; 136 } 137 115 138 private onReady(): void { 139 if (this.ready || this.failed) { 140 return; 141 } 116 142 this.ready = true; 143 this.clearTimeout(); 117 144 this.flush(); 118 145 } 119 146 120 147 private onFailure(): void { 148 if (this.ready || this.failed) { 149 return; 150 } 121 151 this.failed = true; 122 // Intentional divergence from the legacy `waitForMelidata_` + 5s race (super-token-metrics.js). 123 // Legacy: each event raced independently, so mp_melidata_load_timeout fired once per event 124 // with message = cleanMessage (the actual error text). 125 // Here: one metric fires for the whole buffer with message = 'buffered:N'. 126 // Benefit: N tells the consumer how many events were lost, which is more actionable 127 // than a per-event timeout race; side-effect: the original error text is not in the metric. 128 // Consumers of mp_melidata_load_timeout should expect this new shape from this adapter forward. 152 this.clearTimeout(); 153 // The deadline belongs to the buffer, not to each buffered event. Emit one timeout signal 154 // and keep the individual diagnostics on their original Core Monitor metrics + FIFO events. 129 155 this.sendMetric(this.MELIDATA_LOAD_TIMEOUT_METRIC, 'true', `buffered:${this.buffer.length}`); 130 156 this.flush(); -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/platform/SdkReadinessWatcher.ts
r3663899 r3710292 5 5 export const FALLBACK_POLL_INTERVAL_MS = 50; 6 6 export const FALLBACK_POLL_MAX_WAIT_MS = 15000; 7 export const COMPOSE_RETRY_INTERVAL_MS = 1000; 7 8 8 9 export const INIT_SOURCE = { … … 23 24 24 25 /** 25 * Watches for the MP SDK instance and triggers Super Token composition exactly once,26 * Watches for the MP SDK instance and completes Super Token composition exactly once, 26 27 * using three tiers in order of availability: 27 28 * … … 29 30 * 2. Arrives via `mp_sdk_instance_ready` → compose on event (SDK_INSTANCE_EVENT 30 31 * or SDK_INSTANCE_EVENT_AFTER_LEGACY_WINDOW if >15s) 31 * 3. Appears in `window.mpSdkInstance` → compose on50ms poll (FALLBACK_POLL),32 * pollcapped at 15s32 * 3. Appears in `window.mpSdkInstance` → discover on the 50ms poll (FALLBACK_POLL), 33 * retry failed composition every 1s, capped at 15s 33 34 * 34 35 * After the poll cap, temporary load delays can still be recovered via … … 46 47 47 48 private initialized = false; 48 private pendingCompose: (() => void ) | null = null;49 private pendingCompose: (() => void | boolean) | null = null; 49 50 private activePoll: ReturnType<typeof setInterval> | null = null; 51 private nextComposeAttemptAt = 0; 52 private failedComposeAttempts = 0; 53 private reportRetryExhausted: ((attempts: number) => void) | null = null; 50 54 51 55 constructor(deps: SdkReadinessWatcherDeps) { … … 57 61 58 62 /** 59 * Begins watching for SDK availability and calls `compose` exactly once. 63 * Begins watching for SDK availability and retries `compose` at a bounded cadence until the 64 * first successful composition. 60 65 * The compose callback is stored so recoverIfSdkIsNowAvailable() can use it later. 61 66 * … … 68 73 * the bundle bootstrap before recoverIfSdkIsNowAvailable() has a chance to retry. 69 74 */ 70 start(compose: () => void): void { 75 start( 76 compose: () => void | boolean, 77 reportRetryExhausted?: (attempts: number) => void, 78 ): void { 71 79 if (this.pendingCompose !== null) { 72 80 return; 73 81 } 74 82 this.pendingCompose = compose; 83 this.reportRetryExhausted = reportRetryExhausted ?? null; 75 84 76 85 if (this.readSdkInstance()) { 77 86 this.composeWith(INIT_SOURCE.ALREADY_READY); 78 return; 87 if (this.initialized) { 88 return; 89 } 79 90 } 80 91 … … 86 97 87 98 this.activePoll = setInterval(() => { 88 if (this.readSdkInstance() ) {99 if (this.readSdkInstance() && this.now() >= this.nextComposeAttemptAt) { 89 100 this.composeWith(INIT_SOURCE.FALLBACK_POLL); 90 101 } … … 95 106 clearInterval(this.activePoll); 96 107 this.activePoll = null; 108 } 109 if (!this.initialized && this.failedComposeAttempts > 0) { 110 this.reportRetryExhausted?.(this.failedComposeAttempts); 97 111 } 98 112 }, FALLBACK_POLL_MAX_WAIT_MS); … … 137 151 } 138 152 153 const composed = this.pendingCompose(); 154 if (composed === false) { 155 this.failedComposeAttempts += 1; 156 // The 50 ms poll discovers SDK availability; it must not also hammer a failing composition. 157 // Keep recovery automatic, but retry the expensive construction at a bounded cadence. 158 this.nextComposeAttemptAt = this.now() + COMPOSE_RETRY_INTERVAL_MS; 159 return; 160 } 161 139 162 if (this.activePoll !== null) { 140 163 clearInterval(this.activePoll); … … 142 165 } 143 166 144 this.pendingCompose();145 167 this.initialized = true; 146 168 this.metrics.superTokenSdkLoaded(); -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/platform/VariantConfigAdapter.ts
r3663899 r3710292 9 9 import { sendToCoreMonitor } from './coreMonitorPayload'; 10 10 import type { CoreMonitorPayload } from './coreMonitorPayload'; 11 import { toTelemetryErrorMessage } from '@super-token/core/checkoutSession/ErrorClassification'; 11 12 12 13 interface AbConfig { … … 85 86 // active === false — Kill switch: clears cookie and returns default for ALL visitors. 86 87 this.clearVariantCookie(); 87 const defaultVariant = abConfig.default && this.isAllowed(abConfig.default) ? abConfig.default : SUPER_TOKEN_FALLBACK_VARIANT; 88 const defaultVariant = 89 abConfig.default && this.isAllowed(abConfig.default) ? abConfig.default : SUPER_TOKEN_FALLBACK_VARIANT; 88 90 this.trackMetric(this.METRIC_SUPER_TOKEN_AB_VARIANT, defaultVariant, 'source:kill_switch'); 89 91 return defaultVariant; … … 113 115 } 114 116 115 const cookieTtlDays = abConfig.cookie_ttl_days && abConfig.cookie_ttl_days > 0 116 ? abConfig.cookie_ttl_days 117 : this.SUPER_TOKEN_VARIANT_COOKIE_DEFAULT_TTL_DAYS; 117 const cookieTtlDays = 118 abConfig.cookie_ttl_days && abConfig.cookie_ttl_days > 0 119 ? abConfig.cookie_ttl_days 120 : this.SUPER_TOKEN_VARIANT_COOKIE_DEFAULT_TTL_DAYS; 118 121 119 122 this.setVariantCookie(assignedVariant, cookieTtlDays); … … 121 124 return assignedVariant; 122 125 } catch (error) { 123 const errorMessage = (error as { message?: string })?.message || 'async_error'; 124 this.trackMetric(this.METRIC_LOAD_SUPER_TOKEN_BUNDLE, this.METRIC_STATUS_FAILURE, errorMessage); 126 this.trackMetric( 127 this.METRIC_LOAD_SUPER_TOKEN_BUNDLE, 128 this.METRIC_STATUS_FAILURE, 129 toTelemetryErrorMessage(error, 'async_error'), 130 ); 125 131 return SUPER_TOKEN_FALLBACK_VARIANT; 126 132 } … … 164 170 try { 165 171 const expiration = new Date(Date.now() + ttlInDays * this.MILLISECONDS_PER_DAY).toUTCString(); 166 document.cookie = SUPER_TOKEN_VARIANT_COOKIE + '=' + variantValue167 + ';expires=' + expiration + ';path=/;SameSite=Lax;Secure';172 document.cookie = 173 SUPER_TOKEN_VARIANT_COOKIE + '=' + variantValue + ';expires=' + expiration + ';path=/;SameSite=Lax;Secure'; 168 174 } catch (_) { 169 175 // Intentionally swallow cookie errors to avoid breaking checkout flow. … … 172 178 173 179 private clearVariantCookie(): void { 174 document.cookie = SUPER_TOKEN_VARIANT_COOKIE 175 + '=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;SameSite=Lax;Secure'; 180 document.cookie = SUPER_TOKEN_VARIANT_COOKIE + '=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;SameSite=Lax;Secure'; 176 181 } 177 182 178 183 private selectVariantByWeight(variants: Record<string, { weight?: number }>): string { 179 184 const variantNames = Object.keys(variants); 180 const totalWeight = variantNames.reduce((weightSum, variantName) => weightSum + (variants[variantName].weight || 0), 0); 185 const totalWeight = variantNames.reduce( 186 (weightSum, variantName) => weightSum + (variants[variantName].weight || 0), 187 0, 188 ); 181 189 182 190 if (totalWeight <= 0) { … … 216 224 return null; 217 225 } 218 return response.json() 226 return response 227 .json() 219 228 .then((parsedConfig: AbConfig) => { 220 229 // Guard: if timeout already fired, discard result to avoid … … 226 235 return parsedConfig; 227 236 }) 228 .catch(( ) => {237 .catch((error) => { 229 238 if (!hasFetchTimedOut) { 230 this.trackMetric(this.METRIC_FETCH_AB_CONFIG, 'error', 'invalid_json');239 this.trackMetric(this.METRIC_FETCH_AB_CONFIG, 'error', toTelemetryErrorMessage(error, 'invalid_json')); 231 240 } 232 241 return null; 233 242 }); 234 243 }) 235 .catch(( ) => {244 .catch((error) => { 236 245 if (!hasFetchTimedOut) { 237 this.trackMetric(this.METRIC_FETCH_AB_CONFIG, 'error', 'network_or_cors');246 this.trackMetric(this.METRIC_FETCH_AB_CONFIG, 'error', toTelemetryErrorMessage(error, 'network_or_cors')); 238 247 } 239 248 return null; -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/platform/constants.ts
r3663899 r3710292 11 11 * Injected into the init telemetry as `js_version`. Kept in sync with the CDN bundle's version. 12 12 */ 13 export const SUPER_TOKEN_JS_VERSION = '1.2. 5';13 export const SUPER_TOKEN_JS_VERSION = '1.2.6'; 14 14 15 15 export const V2_VARIANT = 'v2'; -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/runtime/SuperTokenPaymentMethods.ts
r3663899 r3710292 30 30 * through `globalBridge.publish`. 31 31 */ 32 import { MPSuperTokenErrorCodes } from '@super-token/core/checkoutSession/ErrorClassification'; 32 import { MPSuperTokenErrorCodes, toTelemetryErrorMessage } from '@super-token/core/checkoutSession/ErrorClassification'; 33 import type { VariantViewPort } from '@super-token/ports'; 33 34 import { SelectSavedPaymentMethod } from '@super-token/useCases/SelectSavedPaymentMethod'; 34 35 import { … … 308 309 MAX_ATTEMPTS_BY_ERROR_CODE = 3; 309 310 GET_PAYMENT_METHOD_TIMEOUT_MS = 5000; 310 ACCOUNT_MONEY_ANIMATION_MS = 300;311 311 312 312 // Attributes … … 337 337 private readonly renderSavedMethods: RenderSavedMethods, 338 338 public wcEmailListener: PaymentMethodsEmailListener | null = null, 339 private readonly variantView: VariantViewPort | null = null, 339 340 ) { 340 341 this.YELLOW_WALLET_PATH = params.yellow_wallet_path; … … 411 412 412 413 reset(): void { 414 const customCheckoutEntireElement = this.getCustomCheckoutEntireElement(); 413 415 this.isRendering = false; 414 416 this.paymentMethods = []; … … 429 431 this.removeHorizontalRow(); 430 432 this.removePaymentMethodsListClasses(); 431 document.querySelectorAll(`.${this.SUPER_TOKEN_STYLES.BLOCK}`).forEach(blockElement => blockElement.remove()); 433 if (customCheckoutEntireElement) { 434 this.variantView?.reset(customCheckoutEntireElement); 435 } 432 436 } 433 437 … … 454 458 getSelectedPreloadedPaymentMethodFromActivePaymentMethods(): PaymentMethod | undefined { 455 459 return this.paymentMethods.find( 456 paymentMethod => this.paymentMethodIdentifier(paymentMethod) === this.paymentMethodIdentifier(this.selectedPreloadedPaymentMethod), 460 (paymentMethod) => 461 this.paymentMethodIdentifier(paymentMethod) === 462 this.paymentMethodIdentifier(this.selectedPreloadedPaymentMethod), 457 463 ); 458 464 } … … 461 467 if (!paymentMethod) return ''; 462 468 463 return `${paymentMethod?.id}${('card' in paymentMethod ? paymentMethod.card?.card_number?.last_four_digits : undefined) || ''}`; 469 return `${paymentMethod?.id}${ 470 ('card' in paymentMethod ? paymentMethod.card?.card_number?.last_four_digits : undefined) || '' 471 }`; 464 472 } 465 473 … … 492 500 493 501 const errorMessages: Record<string, { withRetry: string; withoutRetry: string }> = { 494 'UPDATE_SECURITY_CODE_ERROR': {502 UPDATE_SECURITY_CODE_ERROR: { 495 503 withRetry: this.UPDATE_SECURITY_CODE_WITH_RETRY_ERROR_TEXT, 496 withoutRetry: this.UPDATE_SECURITY_CODE_NO_RETRY_ERROR_TEXT 504 withoutRetry: this.UPDATE_SECURITY_CODE_NO_RETRY_ERROR_TEXT, 497 505 }, 498 'AUTHORIZE_PAYMENT_METHOD_ERROR': {506 AUTHORIZE_PAYMENT_METHOD_ERROR: { 499 507 withRetry: this.AUTHORIZE_PAYMENT_METHOD_WITH_RETRY_ERROR_TEXT, 500 withoutRetry: this.AUTHORIZE_PAYMENT_METHOD_NO_RETRY_ERROR_TEXT 508 withoutRetry: this.AUTHORIZE_PAYMENT_METHOD_NO_RETRY_ERROR_TEXT, 501 509 }, 502 'AUTHORIZE_PAYMENT_METHOD_USER_CANCELLED': {510 AUTHORIZE_PAYMENT_METHOD_USER_CANCELLED: { 503 511 withRetry: this.AUTHORIZE_PAYMENT_METHOD_WITH_RETRY_ERROR_TEXT, 504 withoutRetry: this.AUTHORIZE_PAYMENT_METHOD_NO_RETRY_ERROR_TEXT 512 withoutRetry: this.AUTHORIZE_PAYMENT_METHOD_NO_RETRY_ERROR_TEXT, 505 513 }, 506 'SELECT_PAYMENT_METHOD_ERROR': {514 SELECT_PAYMENT_METHOD_ERROR: { 507 515 withRetry: this.SELECT_PAYMENT_METHOD_ERROR_TEXT, 508 withoutRetry: this.SELECT_PAYMENT_METHOD_ERROR_TEXT 516 withoutRetry: this.SELECT_PAYMENT_METHOD_ERROR_TEXT, 509 517 }, 510 518 }; … … 562 570 excludeRecaptchaFromPreValidation(): void { 563 571 const metrics = this.mpSuperTokenMetrics; 564 const CAPTCHA_SELECTOR = '[name^="g-recaptcha-response"], [name^="h-captcha-response"], [name^="cf-turnstile-response"]'; 572 const CAPTCHA_SELECTOR = 573 '[name^="g-recaptcha-response"], [name^="h-captcha-response"], [name^="cf-turnstile-response"]'; 565 574 566 575 try { … … 579 588 const jq = window.jQuery as unknown as JQueryWithFn | undefined; 580 589 if (!jq?.fn || typeof jq.fn.serialize !== 'function') { 581 metrics?.errorToExcludeRecaptchaFromPreValidation('serialize_unavailable', 'jQuery.fn.serialize is not available'); 590 metrics?.errorToExcludeRecaptchaFromPreValidation( 591 'serialize_unavailable', 592 'jQuery.fn.serialize is not available', 593 ); 582 594 return; 583 595 } … … 595 607 // true) keep the token; otherwise omit it, scoping the disable to this call (finally). 596 608 const serializedForm = this ? (this as Record<number, HTMLFormElement | undefined>)[0] : undefined; 597 const isCheckoutForm = !!serializedForm 598 && typeof serializedForm.matches === 'function' 599 && serializedForm.matches('form.checkout'); 600 const captchaFields = serializedForm && isCheckoutForm && !window.mpEventHandler?.mercado_pago_submit 601 ? Array.from(serializedForm.querySelectorAll<HTMLInputElement>(CAPTCHA_SELECTOR)).filter((field) => !field.disabled) 602 : []; 609 const isCheckoutForm = 610 !!serializedForm && typeof serializedForm.matches === 'function' && serializedForm.matches('form.checkout'); 611 const captchaFields = 612 serializedForm && isCheckoutForm && !window.mpEventHandler?.mercado_pago_submit 613 ? Array.from(serializedForm.querySelectorAll<HTMLInputElement>(CAPTCHA_SELECTOR)).filter( 614 (field) => !field.disabled, 615 ) 616 : []; 603 617 604 618 if (!captchaFields.length) { … … 629 643 630 644 getCustomCheckoutEntireElement(): HTMLElement | null { 631 return document.querySelector<HTMLElement>(`#${this.SUPER_TOKEN_STYLES.ROOT_ID}`) 632 || document.querySelector<HTMLElement>(this.CUSTOM_CHECKOUT_BLOCKS_SELECTOR) 633 || document.querySelector<HTMLElement>(this.CUSTOM_CHECKOUT_CLASSIC_SELECTOR); 645 return ( 646 document.querySelector<HTMLElement>(`#${this.SUPER_TOKEN_STYLES.ROOT_ID}`) || 647 document.querySelector<HTMLElement>(this.CUSTOM_CHECKOUT_BLOCKS_SELECTOR) || 648 document.querySelector<HTMLElement>(this.CUSTOM_CHECKOUT_CLASSIC_SELECTOR) 649 ); 634 650 } 635 651 … … 678 694 const accordionHeader = document.querySelector(`.${this.SUPER_TOKEN_STYLES.ACCORDION_HEADER}`); 679 695 680 accordionElement?.querySelector(this.CHECKOUT_CUSTOM_CONTAINER_SELECTOR)?.classList.remove(this.SUPER_TOKEN_STYLES.ACCORDION_CONTENT); 696 accordionElement 697 ?.querySelector(this.CHECKOUT_CUSTOM_CONTAINER_SELECTOR) 698 ?.classList.remove(this.SUPER_TOKEN_STYLES.ACCORDION_CONTENT); 681 699 accordionElement?.classList.remove(this.SUPER_TOKEN_STYLES.ACCORDION); 682 700 accordionHeader?.remove(); … … 685 703 removePaymentMethodsListClasses(): void { 686 704 const customCheckoutEntireElement = this.getCustomCheckoutEntireElement(); 687 const checkoutContainer = customCheckoutEntireElement?.querySelector<HTMLElement>(this.NEW_CHECKOUT_CONTAINER_SELECTOR) ?? customCheckoutEntireElement?.querySelector<HTMLElement>(this.OLD_CHECKOUT_CONTAINER_SELECTOR); 705 const checkoutContainer = 706 customCheckoutEntireElement?.querySelector<HTMLElement>(this.NEW_CHECKOUT_CONTAINER_SELECTOR) ?? 707 customCheckoutEntireElement?.querySelector<HTMLElement>(this.OLD_CHECKOUT_CONTAINER_SELECTOR); 688 708 689 709 if (checkoutContainer) { … … 700 720 701 721 removePaymentMethodElements(): void { 702 document 703 .querySelectorAll(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD}`) 704 .forEach(element => element.remove()); 722 document.querySelectorAll(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD}`).forEach((element) => element.remove()); 705 723 } 706 724 … … 719 737 720 738 deselectAllPaymentMethods(): void { 721 document 722 .querySelectorAll<HTMLElement>(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_SELECTED}`) 723 .forEach(element => { 724 element.classList.remove(this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_SELECTED); 725 element.setAttribute('aria-selected', 'false'); 726 if (element.dataset?.type === this.ACCOUNT_MONEY_TYPE && this.ACCOUNT_MONEY_BALANCE_TEXT) { 727 element.setAttribute('aria-label', element.dataset.baseAriaLabel ?? ''); 728 } 729 }); 730 this.removeAccountMoneyBalanceLine(); 739 const customCheckoutEntireElement = this.getCustomCheckoutEntireElement(); 740 document.querySelectorAll<HTMLElement>(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_SELECTED}`).forEach((element) => { 741 element.classList.remove(this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_SELECTED); 742 element.setAttribute('aria-selected', 'false'); 743 }); 744 if (customCheckoutEntireElement) { 745 this.variantView?.clearSelectionDecoration(customCheckoutEntireElement); 746 } 731 747 } 732 748 733 749 selectNewCardAccordion(): void { 734 const accordionElement = document.querySelector<HTMLElement>(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_ACCORDION}`); 750 const accordionElement = document.querySelector<HTMLElement>( 751 `.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_ACCORDION}`, 752 ); 735 753 const accordionContent = document.querySelector<HTMLElement>(`.${this.SUPER_TOKEN_STYLES.ACCORDION_CONTENT}`); 736 754 const accordionHeader = document.querySelector<HTMLElement>(`.${this.SUPER_TOKEN_STYLES.ACCORDION_HEADER}`); … … 758 776 paymentMethodElement.classList.add(this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_SELECTED); 759 777 paymentMethodElement.setAttribute('aria-selected', 'true'); 760 if (paymentMethodElement.dataset?.type === this.ACCOUNT_MONEY_TYPE) {761 this.applyAccountMoneySelectionDecoration(paymentMethodElement);762 } 763 }764 765 getPaymentMethodSelectedFromDOMToAccountPaymentMethods(accountPaymentMethods: PaymentMethod[]): PaymentMethod | null | undefined {778 this.variantView?.decorateSelection(paymentMethodElement); 779 } 780 781 getPaymentMethodSelectedFromDOMToAccountPaymentMethods( 782 accountPaymentMethods: PaymentMethod[], 783 ): PaymentMethod | null | undefined { 766 784 const paymentMethodSelected = document.querySelector(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_SELECTED}`) || null; 767 785 if (!paymentMethodSelected) return null; 768 786 769 return accountPaymentMethods.find(paymentMethod => this.paymentMethodIdentifier(paymentMethod) === paymentMethodSelected.id); 787 return accountPaymentMethods.find( 788 (paymentMethod) => this.paymentMethodIdentifier(paymentMethod) === paymentMethodSelected.id, 789 ); 770 790 } 771 791 … … 796 816 } 797 817 798 const installmentsDropdown = paymentMethodElement.querySelector(`#mp-super-token-installments-select-${this.paymentMethodIdentifier(paymentMethodElement as unknown as PaymentMethod)}`); 818 const installmentsDropdown = paymentMethodElement.querySelector( 819 `#mp-super-token-installments-select-${this.paymentMethodIdentifier( 820 paymentMethodElement as unknown as PaymentMethod, 821 )}`, 822 ); 799 823 800 824 if (!installmentsDropdown) return; … … 819 843 } 820 844 821 const installmentsDropdown = paymentMethodElement.querySelector(`#mp-super-token-installments-select-${this.paymentMethodIdentifier(paymentMethodElement as unknown as PaymentMethod)}`); 845 const installmentsDropdown = paymentMethodElement.querySelector( 846 `#mp-super-token-installments-select-${this.paymentMethodIdentifier( 847 paymentMethodElement as unknown as PaymentMethod, 848 )}`, 849 ); 822 850 823 851 if (!installmentsDropdown) return; … … 828 856 829 857 showPaymentMethodDetails(paymentMethodElement: HTMLElement): void { 830 paymentMethodElement .querySelector(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_DETAILS}`)831 ?.classList832 ?. remove(this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_HIDE);858 paymentMethodElement 859 .querySelector(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_DETAILS}`) 860 ?.classList?.remove(this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_HIDE); 833 861 834 862 this.setPaymentMethodChildrenAriaVisible(paymentMethodElement); … … 836 864 837 865 hideAllPaymentMethodDetails(): void { 838 document 839 .querySelectorAll<HTMLElement>(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_DETAILS}`) 840 ?.forEach(element => { 841 element 842 ?.classList 843 ?.add(this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_HIDE); 844 845 this.setPaymentMethodChildrenAriaHidden(element); 846 }); 866 document.querySelectorAll<HTMLElement>(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_DETAILS}`)?.forEach((element) => { 867 element?.classList?.add(this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_HIDE); 868 869 this.setPaymentMethodChildrenAriaHidden(element); 870 }); 847 871 } 848 872 … … 882 906 883 907 formatSelectedPaymentMethodName(paymentMethod: PaymentMethod): string { 884 if (this.paymentMethodIdentifier(paymentMethod) === this.paymentMethodIdentifier({ id: this.NEW_CARD_TYPE } as unknown as PaymentMethod)) { 908 if ( 909 this.paymentMethodIdentifier(paymentMethod) === 910 this.paymentMethodIdentifier({ id: this.NEW_CARD_TYPE } as unknown as PaymentMethod) 911 ) { 885 912 return 'new_credit_card'; 886 913 } … … 900 927 const formattedPaymentMethodName = this.formatSelectedPaymentMethodName(paymentMethod); 901 928 902 document.dispatchEvent(new CustomEvent(this.SELECTED_SUPERTOKEN_METHOD_EVENT, { detail: { payment_method: formattedPaymentMethodName } })); 903 } 904 905 async onSelectSuperTokenPaymentMethod(paymentMethodElement: HTMLElement, paymentMethod: PaymentMethod): Promise<void> { 929 document.dispatchEvent( 930 new CustomEvent(this.SELECTED_SUPERTOKEN_METHOD_EVENT, { 931 detail: { payment_method: formattedPaymentMethodName }, 932 }), 933 ); 934 } 935 936 async onSelectSuperTokenPaymentMethod( 937 paymentMethodElement: HTMLElement, 938 paymentMethod: PaymentMethod, 939 ): Promise<void> { 906 940 await this.selectUseCase.execute({ 907 941 session: new LegacySelectionSession(this), … … 966 1000 967 1001 setTimeout(() => { 968 document.dispatchEvent( 969 this.selectedSupertokenMethodEvent(true) 970 ); 1002 document.dispatchEvent(this.selectedSupertokenMethodEvent(true)); 971 1003 }, 50); 972 1004 } 973 1005 974 1006 selectedSupertokenMethodEvent = (isNewCardSelected: boolean): CustomEvent => { 975 return new CustomEvent('supertoken_payment_method_selected', 976 { 977 detail: { 978 new_card_selected: isNewCardSelected, 979 checkout_type: (document.querySelector('#mp_checkout_type') as HTMLInputElement | null)?.value, 980 } 981 } 982 ); 1007 return new CustomEvent('supertoken_payment_method_selected', { 1008 detail: { 1009 new_card_selected: isNewCardSelected, 1010 checkout_type: (document.querySelector('#mp_checkout_type') as HTMLInputElement | null)?.value, 1011 }, 1012 }); 983 1013 }; 984 1014 … … 1000 1030 1001 1031 isMercadoPagoCard(paymentMethod: PaymentMethod): paymentMethod is PrepaidCardPaymentMethod { 1002 return paymentMethod?.type === this.PREPAID_CARD_TYPE && 'issuer' in paymentMethod && !!paymentMethod?.issuer?.name?.toLowerCase()?.includes(this.MERCADO_PAGO_ISSUER_NAME); 1032 return ( 1033 paymentMethod?.type === this.PREPAID_CARD_TYPE && 1034 'issuer' in paymentMethod && 1035 !!paymentMethod?.issuer?.name?.toLowerCase()?.includes(this.MERCADO_PAGO_ISSUER_NAME) 1036 ); 1003 1037 } 1004 1038 1005 1039 isMercadoPagoCreditCard(paymentMethod: PaymentMethod): paymentMethod is CreditCardPaymentMethod { 1006 return paymentMethod?.type === this.CREDIT_CARD_TYPE && 'issuer' in paymentMethod && !!paymentMethod?.issuer?.name?.toLowerCase()?.includes(this.MERCADO_PAGO_ISSUER_NAME); 1040 return ( 1041 paymentMethod?.type === this.CREDIT_CARD_TYPE && 1042 'issuer' in paymentMethod && 1043 !!paymentMethod?.issuer?.name?.toLowerCase()?.includes(this.MERCADO_PAGO_ISSUER_NAME) 1044 ); 1007 1045 } 1008 1046 1009 1047 isConsumerCredits(paymentMethod: PaymentMethod): paymentMethod is ConsumerCreditsPaymentMethod { 1010 1048 return paymentMethod?.type === this.CONSUMER_CREDITS_TYPE; 1011 }1012 1013 applyAccountMoneySelectionDecoration(paymentMethodRow: HTMLElement): void {1014 // Remove any leftover balance line synchronously before appending the new one.1015 // The close removal is deferred (~transition duration), so a fast AM -> other -> AM1016 // toggle could otherwise leave two balance nodes coexisting and strand an --open1017 // node on a deselected row. Normal deselection still animates via removeAccountMoneyBalanceLine().1018 this.getCustomCheckoutEntireElement()1019 ?.querySelectorAll(`.${this.SUPER_TOKEN_STYLES.ACCOUNT_MONEY_BALANCE_LINE}`)1020 .forEach(node => node.remove());1021 const contentSection = paymentMethodRow?.querySelector(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_CONTENT}`);1022 if (!contentSection) return;1023 const balanceParagraph = document.createElement('p');1024 balanceParagraph.classList.add(this.SUPER_TOKEN_STYLES.ACCOUNT_MONEY_BALANCE_LINE);1025 balanceParagraph.setAttribute('aria-live', 'polite');1026 balanceParagraph.textContent = this.ACCOUNT_MONEY_BALANCE_TEXT;1027 contentSection.appendChild(balanceParagraph);1028 1029 // Trigger row/title and balance line transitions in the same frame.1030 // Stale-frame guard: if another method gets selected before this frame runs,1031 // the AM row is no longer selected/connected — skip reopening it (avoids an1032 // orphan --open state on an unselected row).1033 requestAnimationFrame(() => {1034 if (!paymentMethodRow?.isConnected1035 || !paymentMethodRow.classList.contains(this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_SELECTED)) {1036 return;1037 }1038 paymentMethodRow.classList.add(this.SUPER_TOKEN_STYLES.ACCOUNT_MONEY_ROW_OPEN);1039 balanceParagraph.classList.add(this.SUPER_TOKEN_STYLES.ACCOUNT_MONEY_BALANCE_LINE_OPEN);1040 });1041 1042 const currentLabel = paymentMethodRow?.getAttribute('aria-label') ?? '';1043 if (this.ACCOUNT_MONEY_BALANCE_TEXT && !currentLabel.includes(this.ACCOUNT_MONEY_BALANCE_TEXT)) {1044 paymentMethodRow?.setAttribute('aria-label', `${currentLabel}. ${this.ACCOUNT_MONEY_BALANCE_TEXT}`);1045 }1046 }1047 1048 removeAccountMoneyBalanceLine(): void {1049 const customCheckoutRoot = this.getCustomCheckoutEntireElement();1050 if (!customCheckoutRoot) return;1051 1052 const accountMoneyRow = customCheckoutRoot1053 .querySelector(`.${this.SUPER_TOKEN_STYLES.ACCOUNT_MONEY_ROW_OPEN}`)1054 ?? customCheckoutRoot.querySelector(`.${this.SUPER_TOKEN_STYLES.ACCOUNT_MONEY_ROW}`);1055 1056 accountMoneyRow?.classList.remove(this.SUPER_TOKEN_STYLES.ACCOUNT_MONEY_ROW_OPEN);1057 1058 const balanceLine = customCheckoutRoot1059 .querySelector<HTMLElement>(`.${this.SUPER_TOKEN_STYLES.ACCOUNT_MONEY_BALANCE_LINE}`);1060 if (!balanceLine) return;1061 1062 // Already closing — avoid duplicate listeners/timers on the same node (fast toggle).1063 if (balanceLine.dataset.closing === '1') return;1064 balanceLine.dataset.closing = '1';1065 1066 balanceLine.classList.remove(this.SUPER_TOKEN_STYLES.ACCOUNT_MONEY_BALANCE_LINE_OPEN);1067 1068 // Remove the node only after the close transition actually finishes (event-driven),1069 // so the DOM removal never lands a frame before the animation ends — which is what1070 // caused the title to nudge at the end of the close. A timeout fallback guarantees1071 // cleanup if transitionend never fires (reduced motion, detached node, etc.).1072 let removed = false;1073 let fallbackTimer: ReturnType<typeof setTimeout>;1074 const finalize = () => {1075 if (removed) return;1076 removed = true;1077 balanceLine.remove();1078 };1079 // Listen until the max-height transition ends specifically — opacity/margin-top end1080 // separately, so we can't use { once: true } (it would fire on the wrong property).1081 const onTransitionEnd = function handleTransitionEnd(event: TransitionEvent) {1082 if (event.target === balanceLine && event.propertyName === 'max-height') {1083 clearTimeout(fallbackTimer);1084 balanceLine.removeEventListener('transitionend', handleTransitionEnd);1085 finalize();1086 }1087 };1088 balanceLine.addEventListener('transitionend', onTransitionEnd);1089 fallbackTimer = setTimeout(finalize, this.ACCOUNT_MONEY_ANIMATION_MS + 50);1090 1049 } 1091 1050 … … 1106 1065 } 1107 1066 1108 shouldFetchPaymentMethodAgain(paymentMethod: PaymentMethod | null, paymentMethodElement: HTMLElement | null): boolean { 1067 shouldFetchPaymentMethodAgain( 1068 paymentMethod: PaymentMethod | null, 1069 paymentMethodElement: HTMLElement | null, 1070 ): boolean { 1109 1071 if (!paymentMethod || !paymentMethodElement) throw new Error(MPSuperTokenErrorCodes.PAYMENT_METHOD_NOT_EXISTS); 1110 1072 1111 1073 if (paymentMethodElement.hasAttribute('data-cvv-is-required-double-check')) return false; 1112 1074 1113 return (this.isCreditCard(paymentMethod) || this.isDebitCard(paymentMethod)) 1114 && this.securityCodeIsRequired(paymentMethod.security_code_settings) 1115 && paymentMethod.has_esc === true; 1075 return ( 1076 (this.isCreditCard(paymentMethod) || this.isDebitCard(paymentMethod)) && 1077 this.securityCodeIsRequired(paymentMethod.security_code_settings) && 1078 paymentMethod.has_esc === true 1079 ); 1116 1080 } 1117 1081 … … 1137 1101 1138 1102 hasMissingEsc(paymentMethod: PaymentMethod): boolean { 1139 return (this.isCreditCard(paymentMethod) || this.isDebitCard(paymentMethod)) 1140 && this.securityCodeIsRequired(paymentMethod?.security_code_settings) 1141 && typeof paymentMethod?.has_esc === 'undefined'; 1103 return ( 1104 (this.isCreditCard(paymentMethod) || this.isDebitCard(paymentMethod)) && 1105 this.securityCodeIsRequired(paymentMethod?.security_code_settings) && 1106 typeof paymentMethod?.has_esc === 'undefined' 1107 ); 1142 1108 } 1143 1109 … … 1147 1113 1148 1114 timeoutRequest(errorCode: string, timeoutMs = 5000): Promise<never> { 1149 return new Promise<never>((_, reject) => 1150 setTimeout(() => reject(new Error(errorCode)), timeoutMs) 1151 ); 1115 return new Promise<never>((_, reject) => setTimeout(() => reject(new Error(errorCode)), timeoutMs)); 1152 1116 } 1153 1117 … … 1162 1126 const result = await Promise.race([ 1163 1127 this.mpSdkInstance.getAccountPaymentMethod(this.getSuperToken() as string, paymentMethod.token), 1164 this.timeoutRequest(MPSuperTokenErrorCodes.GET_PAYMENT_METHOD_TIMEOUT_ERROR, this.GET_PAYMENT_METHOD_TIMEOUT_MS) 1128 this.timeoutRequest(MPSuperTokenErrorCodes.GET_PAYMENT_METHOD_TIMEOUT_ERROR, this.GET_PAYMENT_METHOD_TIMEOUT_MS), 1165 1129 ]); 1166 1130 … … 1173 1137 this.mpSuperTokenMetrics.getPaymentMethodLoadingTime( 1174 1138 currentPaymentMethodIdentifier, 1175 this.parseMsToSeconds(Date.now() - REQUEST_START_TIME) 1139 this.parseMsToSeconds(Date.now() - REQUEST_START_TIME), 1176 1140 ); 1177 1141 … … 1184 1148 } 1185 1149 1186 const updatedPaymentMethodList = this.paymentMethods 1187 .map((pm) => this1188 .paymentMethodIdentifier(pm) === this.paymentMethodIdentifier(updatedPaymentMethod)1189 ? updatedPaymentMethod : pm1190 );1150 const updatedPaymentMethodList = this.paymentMethods.map((pm) => 1151 this.paymentMethodIdentifier(pm) === this.paymentMethodIdentifier(updatedPaymentMethod) 1152 ? updatedPaymentMethod 1153 : pm, 1154 ); 1191 1155 1192 1156 this.paymentMethods = updatedPaymentMethodList; … … 1215 1179 1216 1180 removeSecurityCodeField(paymentMethod: PaymentMethod): void { 1217 const securityCodeContainer = document.getElementById(`mp-super-token-security-code-container-${paymentMethod.token}`); 1181 const securityCodeContainer = document.getElementById( 1182 `mp-super-token-security-code-container-${paymentMethod.token}`, 1183 ); 1218 1184 1219 1185 if (securityCodeContainer) { … … 1222 1188 } 1223 1189 1224 async handleWithEscPaymentMethod(paymentMethod: PaymentMethod, paymentMethodElement: HTMLElement): Promise<PaymentMethod | null> { 1190 async handleWithEscPaymentMethod( 1191 paymentMethod: PaymentMethod, 1192 paymentMethodElement: HTMLElement, 1193 ): Promise<PaymentMethod | null> { 1225 1194 try { 1226 1195 if (this.shouldFetchPaymentMethodAgain(paymentMethod, paymentMethodElement)) { … … 1238 1207 this.storeActivePaymentMethod(updatedPaymentMethod); 1239 1208 1240 if (!this.securityCodeIsRequired('security_code_settings' in updatedPaymentMethod ? updatedPaymentMethod.security_code_settings : undefined)) { 1209 if ( 1210 !this.securityCodeIsRequired( 1211 'security_code_settings' in updatedPaymentMethod ? updatedPaymentMethod.security_code_settings : undefined, 1212 ) 1213 ) { 1241 1214 this.removeSecurityCodeField(updatedPaymentMethod); 1242 1215 } 1243 1216 1244 this.mpSuperTokenMetrics 1245 .fetchPaymentMethodSuccess( 1246 this.paymentMethodIdentifier(updatedPaymentMethod), 1247 ('security_code_settings' in updatedPaymentMethod && updatedPaymentMethod.security_code_settings) 1248 ? this.securityCodeIsRequired(updatedPaymentMethod.security_code_settings) 1249 : null 1250 ); 1217 this.mpSuperTokenMetrics.fetchPaymentMethodSuccess( 1218 this.paymentMethodIdentifier(updatedPaymentMethod), 1219 'security_code_settings' in updatedPaymentMethod && updatedPaymentMethod.security_code_settings 1220 ? this.securityCodeIsRequired(updatedPaymentMethod.security_code_settings) 1221 : null, 1222 ); 1251 1223 1252 1224 this.hideDetailsSkeleton(paymentMethodElement); … … 1258 1230 return paymentMethod; 1259 1231 } else { 1260 this.mpSuperTokenMetrics 1261 .fetchPaymentMethodSkipped( 1262 this.paymentMethodIdentifier(paymentMethod), 1263 this.getSkipReason(paymentMethod, paymentMethodElement) 1264 ); 1232 this.mpSuperTokenMetrics.fetchPaymentMethodSkipped( 1233 this.paymentMethodIdentifier(paymentMethod), 1234 this.getSkipReason(paymentMethod, paymentMethodElement), 1235 ); 1265 1236 1266 1237 return paymentMethod; … … 1272 1243 this.mpSuperTokenMetrics.getPaymentMethodLoadingTime( 1273 1244 this.paymentMethodIdentifier(paymentMethod), 1274 this.parseMsToSeconds(this.GET_PAYMENT_METHOD_TIMEOUT_MS) 1245 this.parseMsToSeconds(this.GET_PAYMENT_METHOD_TIMEOUT_MS), 1275 1246 ); 1276 1247 … … 1374 1345 1375 1346 if ( 1376 !paymentMethod 1377 || !this.securityCodeIsRequired('security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined) 1347 !paymentMethod || 1348 !this.securityCodeIsRequired( 1349 'security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined, 1350 ) 1378 1351 ) { 1379 1352 return; … … 1398 1371 1399 1372 toggleSecurityCodeErrorMessage(errorMessage: string, paymentMethod: PaymentMethod): void { 1400 const securityCodeContainerElement = document.getElementById(`mp-super-token-security-code-container-${paymentMethod.token}`); 1373 const securityCodeContainerElement = document.getElementById( 1374 `mp-super-token-security-code-container-${paymentMethod.token}`, 1375 ); 1401 1376 if (!securityCodeContainerElement) { 1402 1377 return; … … 1404 1379 1405 1380 const securityCodeLabelElement = securityCodeContainerElement.querySelector('label') as HTMLElement; 1406 const securityCodeErrorMessageElement = securityCodeContainerElement.querySelector('#mp-super-token-security-code-error-message') as HTMLElement; 1407 const helperErrorElement = securityCodeContainerElement.querySelector('#mp-input-with-tooltip-helper-error') as HTMLElement; 1408 const securityCodeInputElement = securityCodeContainerElement.querySelector('.mp-super-token-security-code-input') as HTMLElement; 1381 const securityCodeErrorMessageElement = securityCodeContainerElement.querySelector( 1382 '#mp-super-token-security-code-error-message', 1383 ) as HTMLElement; 1384 const helperErrorElement = securityCodeContainerElement.querySelector( 1385 '#mp-input-with-tooltip-helper-error', 1386 ) as HTMLElement; 1387 const securityCodeInputElement = securityCodeContainerElement.querySelector( 1388 '.mp-super-token-security-code-input', 1389 ) as HTMLElement; 1409 1390 1410 1391 // Clean up … … 1443 1424 1444 1425 mountSecurityCodeField(paymentMethod: PaymentMethod): void { 1445 if (!this.securityCodeIsRequired('security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined)) { 1426 if ( 1427 !this.securityCodeIsRequired( 1428 'security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined, 1429 ) 1430 ) { 1446 1431 return; 1447 1432 } … … 1455 1440 clearInterval(waitSecurityCodeFieldMountInterval); 1456 1441 1457 const securityCodePlaceholderText = ('security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined)?.length === 3 1458 ? this.SECURITY_CODE_PLACEHOLDER_TEXT_3_DIGITS 1459 : this.SECURITY_CODE_PLACEHOLDER_TEXT_4_DIGITS; 1460 1461 if (!window.MPCheckoutFieldsDispatcher && typeof window.sendMetric === 'function' && !this.securityFieldDispatcherMissingReported) { 1462 window.sendMetric('MP_CHECKOUT_FIELDS_DISPATCHER_MISSING', 'super_token_cvv_mount', 'mp_super_token_init_error'); 1442 const securityCodePlaceholderText = 1443 ('security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined)?.length === 3 1444 ? this.SECURITY_CODE_PLACEHOLDER_TEXT_3_DIGITS 1445 : this.SECURITY_CODE_PLACEHOLDER_TEXT_4_DIGITS; 1446 1447 if ( 1448 !window.MPCheckoutFieldsDispatcher && 1449 typeof window.sendMetric === 'function' && 1450 !this.securityFieldDispatcherMissingReported 1451 ) { 1452 window.sendMetric( 1453 'MP_CHECKOUT_FIELDS_DISPATCHER_MISSING', 1454 'super_token_cvv_mount', 1455 'mp_super_token_init_error', 1456 ); 1463 1457 this.securityFieldDispatcherMissingReported = true; 1464 1458 } 1465 1459 1466 const securityCodeField = this.mpSdkInstance.fields.create('securityCode', { 1467 placeholder: securityCodePlaceholderText, 1468 ariaRequired: true, 1469 style: { 1470 'font-size': '16px', 1471 height: '48px', 1472 padding: '12px', 1473 fontFamily: 'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif' 1474 } 1475 }) 1460 const securityCodeField = this.mpSdkInstance.fields 1461 .create('securityCode', { 1462 placeholder: securityCodePlaceholderText, 1463 ariaRequired: true, 1464 style: { 1465 'font-size': '16px', 1466 height: '48px', 1467 padding: '12px', 1468 fontFamily: 1469 'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif', 1470 }, 1471 }) 1476 1472 .mount(`mp-super-token-security-code-input-${paymentMethod.token}`) 1477 1473 .on('error', (e) => this.mpSuperTokenMetrics.errorToMountCVVField(e, paymentMethod)) 1478 1474 .on('ready', () => { 1479 1475 securityCodeField.update({ 1480 settings: ('security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined)1476 settings: 'security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined, 1481 1477 }); 1482 1478 … … 1484 1480 this.storeActiveSecurityCodeInstance(securityCodeField); 1485 1481 1486 if (this.securityCodeIsRequired('security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined)) { 1487 const securityCodeTooltip = document.querySelector(`#mp-super-token-security-code-container-${paymentMethod.token} .mp-super-token-security-code-tooltip`); 1488 const securityCodeInput = document.querySelector(`#mp-super-token-security-code-input-${paymentMethod.token}`); 1482 if ( 1483 this.securityCodeIsRequired( 1484 'security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined, 1485 ) 1486 ) { 1487 const securityCodeTooltip = document.querySelector( 1488 `#mp-super-token-security-code-container-${paymentMethod.token} .mp-super-token-security-code-tooltip`, 1489 ); 1490 const securityCodeInput = document.querySelector( 1491 `#mp-super-token-security-code-input-${paymentMethod.token}`, 1492 ); 1489 1493 1490 1494 if (!securityCodeTooltip || !securityCodeInput) return; … … 1502 1506 window.MPCheckoutFieldsDispatcher.addEventListenerDispatcher( 1503 1507 null, 1504 "focusout",1505 "super_token_cvv_filled",1508 'focusout', 1509 'super_token_cvv_filled', 1506 1510 { 1507 onlyDispatch: true 1508 } 1511 onlyDispatch: true, 1512 }, 1509 1513 ); 1510 1514 } … … 1527 1531 const allPaymentMethods = document.querySelectorAll<HTMLElement>('.mp-super-token-payment-method'); 1528 1532 1529 allPaymentMethods.forEach(paymentMethodElement => { 1530 const valuePropPill = paymentMethodElement.querySelector<HTMLElement>(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_VALUE_PROP}`); 1533 allPaymentMethods.forEach((paymentMethodElement) => { 1534 const valuePropPill = paymentMethodElement.querySelector<HTMLElement>( 1535 `.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_VALUE_PROP}`, 1536 ); 1531 1537 if (!valuePropPill) { 1532 1538 return; … … 1545 1551 1546 1552 removeMercadoPagoPrivacyPolicyFooter(): void { 1547 const footer = this.getCustomCheckoutEntireElement()?.querySelector('#mp-super-token-privacy-policy-footer') ?? null; 1553 const footer = 1554 this.getCustomCheckoutEntireElement()?.querySelector('#mp-super-token-privacy-policy-footer') ?? null; 1548 1555 if (!footer) { 1549 1556 return; … … 1572 1579 const paymentMethodIdentifier = this.paymentMethodIdentifier(paymentMethod); 1573 1580 const installmentsSelect = document.getElementById(`mp-super-token-installments-select-${paymentMethodIdentifier}`); 1574 const installmentsLabel = document.querySelector<HTMLElement>(`label[for="mp-super-token-installments-select-${paymentMethodIdentifier}"]`); 1575 const installmentsErrorHelper = document.querySelector<HTMLElement>(`#mp-super-token-installments-error-${paymentMethodIdentifier}`); 1581 const installmentsLabel = document.querySelector<HTMLElement>( 1582 `label[for="mp-super-token-installments-select-${paymentMethodIdentifier}"]`, 1583 ); 1584 const installmentsErrorHelper = document.querySelector<HTMLElement>( 1585 `#mp-super-token-installments-error-${paymentMethodIdentifier}`, 1586 ); 1576 1587 1577 1588 if (!installmentsSelect || !installmentsLabel || !installmentsErrorHelper) return; … … 1589 1600 1590 1601 forceSecurityCodeValidation(paymentMethod: PaymentMethod): void { 1591 const securityCodeContainer = document.getElementById(`mp-super-token-security-code-container-${paymentMethod.token}`); 1602 const securityCodeContainer = document.getElementById( 1603 `mp-super-token-security-code-container-${paymentMethod.token}`, 1604 ); 1592 1605 if (!securityCodeContainer) { 1593 1606 return; … … 1618 1631 } 1619 1632 1620 if (!this.isCreditCard(paymentMethod) && !this.isDebitCard(paymentMethod) && !this.isConsumerCredits(paymentMethod)) { 1633 if ( 1634 !this.isCreditCard(paymentMethod) && 1635 !this.isDebitCard(paymentMethod) && 1636 !this.isConsumerCredits(paymentMethod) 1637 ) { 1621 1638 return; 1622 1639 } … … 1628 1645 1629 1646 if ( 1630 this.securityCodeIsRequired('security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined) && 1647 this.securityCodeIsRequired( 1648 'security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined, 1649 ) && 1631 1650 !this.verifyIsSecurityCodeReferenceTrue(paymentMethod) 1632 1651 ) { … … 1634 1653 } 1635 1654 1636 if ((this.isCreditCard(paymentMethod) || this.isConsumerCredits(paymentMethod)) && !this.installmentsWasSelected(paymentMethod)) { 1655 if ( 1656 (this.isCreditCard(paymentMethod) || this.isConsumerCredits(paymentMethod)) && 1657 !this.installmentsWasSelected(paymentMethod) 1658 ) { 1637 1659 this.setInstallmentsErrorState(paymentMethod, true); 1638 1660 } … … 1661 1683 } 1662 1684 1663 if (!this.securityCodeIsRequired('security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined)) { 1685 if ( 1686 !this.securityCodeIsRequired( 1687 'security_code_settings' in paymentMethod ? paymentMethod.security_code_settings : undefined, 1688 ) 1689 ) { 1664 1690 return true; 1665 1691 } … … 1669 1695 } 1670 1696 1671 const securityCodeContainer = document.getElementById(`mp-super-token-security-code-container-${paymentMethod.token}`); 1697 const securityCodeContainer = document.getElementById( 1698 `mp-super-token-security-code-container-${paymentMethod.token}`, 1699 ); 1672 1700 if (!securityCodeContainer) { 1673 1701 return false; … … 1696 1724 const paymentMethod = this.activePaymentMethod; 1697 1725 const paymentMethodElement = document.getElementById(this.paymentMethodIdentifier(paymentMethod)); 1698 const installmentsDropdown = paymentMethodElement?.querySelector(`#mp-super-token-installments-select-${this.paymentMethodIdentifier(paymentMethod)}`); 1699 1700 if (installmentsDropdown && paymentMethod && (this.isCreditCard(paymentMethod) || this.isConsumerCredits(paymentMethod)) && !this.installmentsWasSelected(paymentMethod)) { 1726 const installmentsDropdown = paymentMethodElement?.querySelector( 1727 `#mp-super-token-installments-select-${this.paymentMethodIdentifier(paymentMethod)}`, 1728 ); 1729 1730 if ( 1731 installmentsDropdown && 1732 paymentMethod && 1733 (this.isCreditCard(paymentMethod) || this.isConsumerCredits(paymentMethod)) && 1734 !this.installmentsWasSelected(paymentMethod) 1735 ) { 1701 1736 const paymentMethodType = this.isConsumerCredits(paymentMethod) ? 'consumer_credits' : 'credit_card'; 1702 1737 this.mpSuperTokenMetrics.errorToSubmitWithoutInstallmentSelected(paymentMethodType); … … 1707 1742 return true; 1708 1743 } catch (error) { 1709 this.mpSuperTokenMetrics?.sendMetric('error_to_validate_installment_selection', 'true', (error as Error)?.message ?? 'unknown'); 1744 this.mpSuperTokenMetrics?.sendMetric( 1745 'error_to_validate_installment_selection', 1746 'true', 1747 toTelemetryErrorMessage(error, 'unknown'), 1748 ); 1710 1749 try { 1711 1750 this.forceShowValidationErrors(); … … 1756 1795 1757 1796 convertCreditCardFormToPaymentMethodElement(customCheckoutEntireElement: HTMLElement): void { 1758 const creditCardFormElement = customCheckoutEntireElement.querySelector<HTMLElement>(this.NEW_CHECKOUT_CONTAINER_SELECTOR) 1759 ?? customCheckoutEntireElement.querySelector<HTMLElement>(this.OLD_CHECKOUT_CONTAINER_SELECTOR); 1797 const creditCardFormElement = 1798 customCheckoutEntireElement.querySelector<HTMLElement>(this.NEW_CHECKOUT_CONTAINER_SELECTOR) ?? 1799 customCheckoutEntireElement.querySelector<HTMLElement>(this.OLD_CHECKOUT_CONTAINER_SELECTOR); 1760 1800 if (!creditCardFormElement) return; 1761 1801 … … 1791 1831 const addAccordionClasses = (accordionElement: HTMLElement): void => { 1792 1832 accordionElement.classList.add(this.SUPER_TOKEN_STYLES.ACCORDION); 1793 accordionElement.querySelector(this.CHECKOUT_CUSTOM_CONTAINER_SELECTOR)?.classList.add(this.SUPER_TOKEN_STYLES.ACCORDION_CONTENT); 1833 accordionElement 1834 .querySelector(this.CHECKOUT_CUSTOM_CONTAINER_SELECTOR) 1835 ?.classList.add(this.SUPER_TOKEN_STYLES.ACCORDION_CONTENT); 1794 1836 }; 1795 1837 … … 1848 1890 1849 1891 renderAccountPaymentMethods(accountPaymentMethods: PaymentMethod[], amount: string | null): void { 1892 let ownsRenderingLock = false; 1850 1893 try { 1851 1894 this.storeAmount(amount); 1852 this.storeActivePaymentMethod(this.getPaymentMethodSelectedFromDOMToAccountPaymentMethods(accountPaymentMethods) ?? null); 1895 this.storeActivePaymentMethod( 1896 this.getPaymentMethodSelectedFromDOMToAccountPaymentMethods(accountPaymentMethods) ?? null, 1897 ); 1853 1898 1854 1899 if (this.paymentMethodsAreRendered() || this.isRendering) return; … … 1856 1901 if (!this.hasStoredPaymentMethods()) this.storePaymentMethodsInMemory(accountPaymentMethods); 1857 1902 this.isRendering = true; 1903 ownsRenderingLock = true; 1858 1904 1859 1905 const customCheckoutEntireElement = this.getCustomCheckoutEntireElement(); 1860 1906 1861 1907 if (!customCheckoutEntireElement) { 1862 this.isRendering = false;1863 1908 throw new Error(MPSuperTokenErrorCodes.CUSTOM_CHECKOUT_ENTIRE_ELEMENT_NOT_FOUND); 1864 1909 } … … 1866 1911 this.onCustomCheckoutWasRendered(customCheckoutEntireElement, accountPaymentMethods); 1867 1912 1868 this.isRendering = false;1869 1913 setTimeout(() => { 1870 1914 const sdkInstanceId = this.mpSuperTokenMetrics.getSdkInstanceId(); … … 1874 1918 } catch (error) { 1875 1919 this.mpSuperTokenMetrics.errorToRenderAccountPaymentMethods(error); 1920 } finally { 1921 if (ownsRenderingLock) { 1922 this.isRendering = false; 1923 } 1876 1924 } 1877 1925 } -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/runtime/SuperTokenTriggerHandler.ts
r3663899 r3710292 33 33 import { ResetFlow } from '@super-token/useCases/ResetFlow'; 34 34 import { EnsureEmailListenerRegistered } from '@super-token/useCases/EnsureEmailListenerRegistered'; 35 import { 36 LegacyTriggerSession, 37 createFetchAndRenderMetrics, 38 } from '@super-token/adapters/session/LegacyTriggerSession'; 35 import { LegacyTriggerSession, createFetchAndRenderMetrics } from '@super-token/adapters/session/LegacyTriggerSession'; 39 36 import { 40 37 LegacyLoadOrchestrationSession, … … 46 43 import { LegacyEmailListenerSession } from '@super-token/adapters/session/LegacyEmailListenerSession'; 47 44 import type { PaymentMethod } from '@super-token/types/external-globals'; 45 import { toTelemetryErrorMessage } from '@super-token/core/checkoutSession/ErrorClassification'; 48 46 49 47 /** The subset of the ported authenticator the trigger handler reads and forwards to the sessions. */ … … 217 215 this.mpSuperTokenMetrics.sendMetric( 218 216 RESTORE_ERROR_METRIC, 219 (error as { message?: string })?.message || 'unknown',217 toTelemetryErrorMessage(error, 'unknown'), 220 218 RESTORE_ERROR_MESSAGE, 221 219 ); -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/session/LegacyRenderSession.ts
r3663899 r3710292 24 24 /** The legacy metrics instance methods the render session forwards to. */ 25 25 interface LegacyRenderMetrics { 26 errorToRenderAccountPaymentMethods(error: unknown): void; 26 27 installmentsFilled(methodType: string): void; 27 28 renderCreditsContract(success: boolean, error?: unknown): void; … … 29 30 renderConsumerCreditsHint(success: boolean, error?: unknown): void; 30 31 renderConsumerCreditsDueDate(success: boolean, error?: unknown): void; 32 renderConsumerCreditsDetailsInnerHTML(success: boolean): void; 31 33 errorToUpdateCreditsContract(error: unknown): void; 32 34 } 33 35 34 // Module-level , mirroring the legacy per-controller `installmentsDispatcherMissingReported` flag so35 // the missing-dispatcher metric is emitted once even across re-renders (new session per render).36 let dispatcherMissingReported = false;36 // Module-level so a context is reported once even across re-renders (new session per render), while 37 // keeping card and consumer-credits diagnostics independent from one another. 38 const dispatcherMissingContexts = new Set<string>(); 37 39 38 40 /** … … 81 83 82 84 reportInstallmentDispatcherMissing(context: string): void { 83 if (window.MPCheckoutFieldsDispatcher || typeof window.sendMetric !== 'function' || dispatcherMissingReported) { 85 if ( 86 window.MPCheckoutFieldsDispatcher || 87 typeof window.sendMetric !== 'function' || 88 dispatcherMissingContexts.has(context) 89 ) { 84 90 return; 85 91 } 86 92 window.sendMetric(DISPATCHER_MISSING_METRIC, context, DISPATCHER_MISSING_MESSAGE); 87 dispatcherMissingReported = true; 93 dispatcherMissingContexts.add(context); 94 } 95 96 recordPaymentMethodRowFailure(error: unknown): void { 97 this.legacy.mpSuperTokenMetrics.errorToRenderAccountPaymentMethods(error); 88 98 } 89 99 … … 129 139 this.legacy.mpSuperTokenMetrics.renderConsumerCreditsDueDate(success, error); 130 140 } 141 142 recordConsumerCreditsDetails(success: boolean): void { 143 this.legacy.mpSuperTokenMetrics.renderConsumerCreditsDetailsInnerHTML(success); 144 } 131 145 } -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/validation/checkoutValidationResolver.ts
r3663899 r3710292 17 17 */ 18 18 19 import { toTelemetryErrorMessage } from '@super-token/core/checkoutSession/ErrorClassification'; 20 19 21 const METRIC_DETAIL = 'validate_checkout_then_continue'; 20 22 const MAX_ANCESTOR_DEPTH = 20; … … 85 87 // WooCommerce field names follow billing_*/shipping_*/terms conventions and never 86 88 // contain quotes or CSS-special characters, so the fallback is safe without escaping. 87 const selector = typeof CSS !== 'undefined' && typeof CSS.escape === 'function' 88 ? `[name=${CSS.escape(fieldName)}]` 89 : `[name="${fieldName}"]`; 89 const selector = 90 typeof CSS !== 'undefined' && typeof CSS.escape === 'function' 91 ? `[name=${CSS.escape(fieldName)}]` 92 : `[name="${fieldName}"]`; 90 93 return Array.from(document.querySelectorAll(selector)); 91 94 } catch { … … 160 163 161 164 function joinErrorFields(errors: ValidationError[]): string { 162 return errors.map((error) => error?.field).filter(Boolean).join('/') || 'unknown'; 165 return ( 166 errors 167 .map((error) => error?.field) 168 .filter(Boolean) 169 .join('/') || 'unknown' 170 ); 163 171 } 164 172 … … 226 234 } 227 235 228 emitMetric(VALIDATION_METRIC.UNEXPECTED_RESPONSE, res?.data?.error || 'unknown'); 236 const responseError = toTelemetryErrorMessage(res?.data?.error, FAIL_OPEN_REASON.UNEXPECTED_RESPONSE); 237 emitMetric(VALIDATION_METRIC.UNEXPECTED_RESPONSE, responseError); 229 238 230 239 return { 231 240 action: VALIDATION_ACTION.FAIL_OPEN, 232 241 reason: FAIL_OPEN_REASON.UNEXPECTED_RESPONSE, 233 detail: res ?.data?.error,242 detail: responseError, 234 243 }; 235 244 } catch (error) { 236 const errorMessage = (error as Error)?.message || FAIL_OPEN_REASON.UNEXPECTED_ERROR; 237 245 const errorMessage = toTelemetryErrorMessage(error, FAIL_OPEN_REASON.UNEXPECTED_ERROR); 238 246 emitMetric(VALIDATION_METRIC.UNEXPECTED_ERROR, errorMessage); 239 247 -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/view/shared/consumerCreditsRow.ts
r3663899 r3710292 243 243 ): HTMLElement { 244 244 const row = buildInteractiveRow(paymentMethod, deps, presentation, session); 245 row.appendChild(buildDetailsSection(paymentMethod, deps, installmentOptions(paymentMethod))); 245 try { 246 row.appendChild(buildDetailsSection(paymentMethod, deps, installmentOptions(paymentMethod))); 247 session.recordConsumerCreditsDetails(true); 248 } catch (error) { 249 session.recordConsumerCreditsDetails(false); 250 throw error; 251 } 246 252 wireConsumerCredits(row, paymentMethod, deps, session, hint); 247 253 return row; -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/view/shared/typedRow.ts
r3663899 r3710292 36 36 presentation: RowPresentation, 37 37 context: SavedMethodsRenderContext, 38 ): HTMLElement { 39 if (isAccountMoney(paymentMethod) && context.rowSession) { 40 return buildInteractiveRow(paymentMethod, deps, presentation, context.rowSession); 38 ): HTMLElement | null { 39 try { 40 if (isAccountMoney(paymentMethod) && context.rowSession) { 41 return buildInteractiveRow(paymentMethod, deps, presentation, context.rowSession); 42 } 43 44 if (isCard(paymentMethod) && context.rowSession && context.installmentOptions) { 45 return buildCardRow(paymentMethod, deps, presentation, context.rowSession, context.installmentOptions); 46 } 47 48 if ( 49 isConsumerCredits(paymentMethod) && 50 context.rowSession && 51 context.installmentOptions && 52 context.consumerCreditsHint 53 ) { 54 return buildConsumerCreditsRow( 55 paymentMethod, 56 deps, 57 presentation, 58 context.rowSession, 59 context.installmentOptions, 60 context.consumerCreditsHint, 61 ); 62 } 63 64 return context.buildRow 65 ? context.buildRow(paymentMethod) 66 : buildPaymentMethodRow(paymentMethod, deps, presentation); 67 } catch (error) { 68 context.rowSession?.recordPaymentMethodRowFailure?.(error); 69 try { 70 // Keep the method visible even when its interactive details fail. This fallback contains 71 // presentation only, so the broken row cannot interrupt the remaining methods. 72 return buildPaymentMethodRow(paymentMethod, deps, presentation); 73 } catch { 74 // A malformed row must never abort the list. If even its presentation cannot be built, 75 // omit only this method and let the variant render every other row. 76 return null; 77 } 41 78 } 42 43 if (isCard(paymentMethod) && context.rowSession && context.installmentOptions) {44 return buildCardRow(paymentMethod, deps, presentation, context.rowSession, context.installmentOptions);45 }46 47 if (48 isConsumerCredits(paymentMethod) &&49 context.rowSession &&50 context.installmentOptions &&51 context.consumerCreditsHint52 ) {53 return buildConsumerCreditsRow(54 paymentMethod,55 deps,56 presentation,57 context.rowSession,58 context.installmentOptions,59 context.consumerCreditsHint,60 );61 }62 63 return context.buildRow64 ? context.buildRow(paymentMethod)65 : buildPaymentMethodRow(paymentMethod, deps, presentation);66 79 } -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/view/v2.1/SavedCardsView.ts
r3663899 r3710292 100 100 // interactive row for a given method type. Only the v2.1 chrome (grouped blocks, e-mail header) 101 101 // lives here; the row itself (presentation + selection wiring + card/credits details) is shared. 102 private rowFactory(context: SavedMethodsRenderContext): (paymentMethod: PaymentMethod) => HTMLElement {103 return (paymentMethod: PaymentMethod): HTMLElement =>102 private rowFactory(context: SavedMethodsRenderContext): (paymentMethod: PaymentMethod) => HTMLElement | null { 103 return (paymentMethod: PaymentMethod): HTMLElement | null => 104 104 buildTypedRow(paymentMethod, this.deps, this.rowPresentation, context); 105 105 } … … 122 122 title: string, 123 123 blockHeader: BlockHeaderData | null, 124 buildRow: (paymentMethod: PaymentMethod) => HTMLElement ,124 buildRow: (paymentMethod: PaymentMethod) => HTMLElement | null, 125 125 ): void { 126 126 if (!paymentMethods.length) { 127 return; 128 } 129 const rows = paymentMethods 130 .map(buildRow) 131 .filter((row): row is HTMLElement => row !== null); 132 if (!rows.length) { 127 133 return; 128 134 } … … 130 136 classes: [V21_STYLES.BLOCK, blockModifierClass], 131 137 attrs: { role: 'group', 'aria-label': title, tabindex: '0' }, 132 children: [this.buildBlockHeader(title, blockHeader), ... paymentMethods.map(buildRow)],138 children: [this.buildBlockHeader(title, blockHeader), ...rows], 133 139 }); 134 140 container.insertBefore(section, container.firstChild); -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/view/v2/SavedCardsView.ts
r3663899 r3710292 25 25 // Build each row through the shared per-type dispatch so v2 wires selection (and card 26 26 // installments / credits) exactly like v2.1, differing only in the flat-list chrome below. 27 const buildRow = (paymentMethod: PaymentMethod): HTMLElement =>27 const buildRow = (paymentMethod: PaymentMethod): HTMLElement | null => 28 28 buildTypedRow(paymentMethod, this.deps, V2_ROW_PRESENTATION, context); 29 29 // Insert each row at the top in reverse so the first method ends up first, then prepend the 30 30 // single list header above them all (faithful to the legacy insert order). 31 let renderedRows = 0; 31 32 [...paymentMethods].reverse().forEach((paymentMethod) => { 32 container.insertBefore(buildRow(paymentMethod), container.firstChild); 33 const row = buildRow(paymentMethod); 34 if (row) { 35 container.insertBefore(row, container.firstChild); 36 renderedRows += 1; 37 } 33 38 }); 34 container.insertBefore(this.buildListHeader(), container.firstChild); 39 if (renderedRows > 0) { 40 container.insertBefore(this.buildListHeader(), container.firstChild); 41 } 35 42 } 36 43 -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/bootstrap.ts
r3663899 r3710292 57 57 58 58 if (domainParams) { 59 composeRuntime(domainParams, recompose, metrics); 59 // The SDK watcher must observe the real variant-bound callback. Starting it before this Promise 60 // settles can mark an empty callback as initialized when the SDK was already present. 61 void composeRuntime(domainParams, recompose, metrics).then(() => { 62 startInitializationResilience(recompose, metrics); 63 }); 64 } else { 65 startInitializationResilience(recompose, metrics); 60 66 } 61 62 // Initialization resilience (Phase 2): runs synchronously after the (async) runtime composition,63 // mirroring the original module order.64 startInitializationResilience(recompose, metrics); -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/composition/initializationResilience.ts
r3663899 r3710292 12 12 } from '@super-token/adapters/platform'; 13 13 import type { SuperTokenInstances } from '@super-token/types/instances'; 14 import { toTelemetryErrorMessage } from '@super-token/core/checkoutSession/ErrorClassification'; 14 15 15 16 // The health check validates the composed instances. In the hybrid they are the legacy globals 16 17 // the CDN bundle builds; return null until they exist so the checker can re-evaluate later. 17 18 function readLegacyInstances(): SuperTokenInstances | null { 18 const { mpSuperTokenTriggerHandler, mpSuperTokenAuthenticator, mpSuperTokenPaymentMethods, mpSuperTokenMetrics, mpSuperTokenErrorHandler } = window; 19 const { 20 mpSuperTokenTriggerHandler, 21 mpSuperTokenAuthenticator, 22 mpSuperTokenPaymentMethods, 23 mpSuperTokenMetrics, 24 mpSuperTokenErrorHandler, 25 } = window; 19 26 if (!mpSuperTokenTriggerHandler) { 20 27 return null; … … 51 58 // watcher's card-form recovery path must re-run the composition for a late SDK that arrived after 52 59 // the poll window closed. The watcher also owns the SDK-readiness signals. 53 watcher.start(() => { 54 try { 55 recompose.current(); 56 } catch (error) { 57 const message = error instanceof Error ? error.message : String(error); 58 metrics.sendMetric('super_token_recovery_compose_failed', 'mp_super_token_init', message); 59 } 60 }); 60 let firstComposeFailureReported = false; 61 let lastComposeError: unknown; 62 watcher.start( 63 () => { 64 try { 65 recompose.current(); 66 return true; 67 } catch (error) { 68 lastComposeError = error; 69 if (!firstComposeFailureReported) { 70 metrics.sendMetric( 71 'super_token_recovery_compose_failed', 72 'mp_super_token_init', 73 toTelemetryErrorMessage(error), 74 ); 75 firstComposeFailureReported = true; 76 } 77 return false; 78 } 79 }, 80 (attempts) => { 81 metrics.sendMetric( 82 'super_token_recovery_compose_failed', 83 'mp_super_token_init', 84 `retry_exhausted:${attempts}; last_error:${toTelemetryErrorMessage(lastComposeError)}`, 85 ); 86 }, 87 ); 61 88 } -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/composition/runtimeComposition.ts
r3663899 r3710292 16 16 import { SuperTokenTriggerHandler } from '@super-token/adapters/runtime/SuperTokenTriggerHandler'; 17 17 import { SuperTokenDebounce } from '@super-token/adapters/runtime/SuperTokenDebounce'; 18 import { 19 CoreMonitorMetricsAdapter, 20 createDomainConfig, 21 } from '@super-token/adapters/platform'; 18 import { CoreMonitorMetricsAdapter, createDomainConfig } from '@super-token/adapters/platform'; 22 19 import type { SuperTokenDomainParams } from '@super-token/adapters/platform'; 23 import { SUPER_TOKEN_JS_VERSION } from '@super-token/adapters/platform/constants'; 20 import { SUPER_TOKEN_FALLBACK_VARIANT, SUPER_TOKEN_JS_VERSION } from '@super-token/adapters/platform/constants'; 21 import { toTelemetryErrorMessage } from '@super-token/core/checkoutSession/ErrorClassification'; 24 22 import { PaymentMethodCatalog } from '@super-token/core/checkoutSession/PaymentMethodCatalog'; 25 23 import { PaymentMethodRegistry } from '@super-token/core/paymentMethods/registry'; … … 53 51 // Clear the poll here too: without it, if the ready event fires first the interval keeps 54 52 // ticking (no-ops) until the timeout, and run() could fire twice (event + a later poll tick). 55 document.addEventListener(MP_SDK_INSTANCE_READY_EVENT, () => { 56 clearInterval(poll); 57 run(); 58 }, { once: true }); 53 document.addEventListener( 54 MP_SDK_INSTANCE_READY_EVENT, 55 () => { 56 clearInterval(poll); 57 run(); 58 }, 59 { once: true }, 60 ); 59 61 setTimeout(() => clearInterval(poll), FALLBACK_POLL_MAX_WAIT_MS); 60 62 } … … 88 90 recompose: { current: () => void }, 89 91 metrics: CoreMonitorMetricsAdapter, 90 ): void{92 ): Promise<void> { 91 93 const viewParams = domainParams as unknown as SuperTokenViewParams; 92 94 … … 123 125 } 124 126 125 const bundleParams = window.wc_mercadopago_supertoken_bundle_params as unknown as 126 SuperTokenPaymentMethodsParams & { platform_id: string }; 127 const bundleParams = 128 window.wc_mercadopago_supertoken_bundle_params as unknown as SuperTokenPaymentMethodsParams & { 129 platform_id: string; 130 }; 127 131 const entityMetrics = new CoreMonitorMetricsAdapter( 128 132 sdk, … … 139 143 let paymentMethods: SuperTokenPaymentMethods; 140 144 145 const getView = (): VariantViewPort => { 146 if (!view) { 147 view = createVariantView(variant, createVariantViewDeps(viewParams, emailListener as EmailListenerPort)); 148 } 149 return view; 150 }; 151 141 152 const renderSavedMethods = (container: HTMLElement, methods: PaymentMethod[]): void => { 142 153 // One stylesheet serves both variants; the root's data-variant scopes each variant's rules. 143 154 container.setAttribute('data-variant', variant); 144 if (!view) {145 view = createVariantView(variant, createVariantViewDeps(viewParams, emailListener as EmailListenerPort));146 }147 155 // The view builds every row itself now (createPaymentMethodElement is dropped), so buildRow 148 156 // is omitted; the render session only supplies the interactive-row behaviour primitives. 149 157 const session = new LegacyRenderSession(paymentMethods as unknown as LegacyRenderController); 150 view.renderSavedPaymentMethods({158 getView().renderSavedPaymentMethods({ 151 159 container, 152 160 paymentMethods: orderAndDecorate(methods), … … 157 165 }; 158 166 159 paymentMethods = new SuperTokenPaymentMethods(sdk, entityMetrics, bundleParams, renderSavedMethods, emailListener); 167 paymentMethods = new SuperTokenPaymentMethods( 168 sdk, 169 entityMetrics, 170 bundleParams, 171 renderSavedMethods, 172 emailListener, 173 getView(), 174 ); 160 175 const authenticator = new SuperTokenAuthenticator(sdk, paymentMethods, entityMetrics, bundleParams.platform_id); 161 176 const errorHandler = new SuperTokenErrorHandler(paymentMethods, entityMetrics); … … 188 203 void waitForCustomCheckoutHandler().then((handlerFound) => { 189 204 if (!handlerFound) { 190 entityMetrics.sendMetric('MP_CUSTOM_CHECKOUT_HANDLER_NOT_EXISTS', 'mp_super_token_init', 'mp_super_token_init_error'); 205 entityMetrics.sendMetric( 206 'MP_CUSTOM_CHECKOUT_HANDLER_NOT_EXISTS', 207 'mp_super_token_init', 208 'mp_super_token_init_error', 209 ); 191 210 } 192 211 }); … … 202 221 buildAndPublishInstances(); 203 222 } catch (error: unknown) { 204 const message = error instanceof Error ? error.message : String(error); 205 metrics.sendMetric('super_token_compose_failed', 'mp_super_token_init', message); 223 metrics.sendMetric('super_token_compose_failed', 'mp_super_token_init', toTelemetryErrorMessage(error)); 206 224 } 207 225 }); 208 226 }; 209 227 210 re solveSuperTokenVariant()228 return resolveSuperTokenVariant() 211 229 .then(composeWithVariant) 212 230 .catch((error: unknown) => { 213 const message = error instanceof Error ? error.message : String(error); 214 metrics.sendMetric('super_token_compose_failed', 'mp_super_token_init', message); 231 metrics.sendMetric('super_token_compose_failed', 'mp_super_token_init', toTelemetryErrorMessage(error)); 232 try { 233 composeWithVariant(SUPER_TOKEN_FALLBACK_VARIANT); 234 } catch (fallbackError: unknown) { 235 metrics.sendMetric('super_token_compose_failed', 'mp_super_token_init', toTelemetryErrorMessage(fallbackError)); 236 } 215 237 }); 216 238 } -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/core/checkoutSession/ErrorClassification.ts
r3663899 r3710292 25 25 FETCH_PAYMENT_METHOD_NOT_FOUND: 'FETCH_PAYMENT_METHOD_NOT_FOUND', 26 26 PAYMENT_METHOD_NOT_EXISTS: 'PAYMENT_METHOD_NOT_EXISTS', 27 UPDATE_PAYMENT_METHOD_WITH_ESC_FAILED_EMPTY_METHODS: 28 'UPDATE_PAYMENT_METHOD_WITH_ESC_FAILED_EMPTY_METHODS', 27 UPDATE_PAYMENT_METHOD_WITH_ESC_FAILED_EMPTY_METHODS: 'UPDATE_PAYMENT_METHOD_WITH_ESC_FAILED_EMPTY_METHODS', 29 28 30 29 // System errors … … 38 37 } as const; 39 38 40 export type SuperTokenErrorCode = 41 (typeof MPSuperTokenErrorCodes)[keyof typeof MPSuperTokenErrorCodes]; 39 export type SuperTokenErrorCode = (typeof MPSuperTokenErrorCodes)[keyof typeof MPSuperTokenErrorCodes]; 40 41 const KNOWN_ERROR_CODES: readonly SuperTokenErrorCode[] = Object.values(MPSuperTokenErrorCodes); 42 43 const SENSITIVE_ERROR_KEY_NAMES = 44 'authorization|access_token|refresh_token|id_token|token|authorized_pseudotoken|pseudotoken|password|client[_-]?secret|x[_-]?api[_-]?key|api[_-]?key|secret|security_code|cvv|card_number|cookie|set[_-]?cookie|session(?:[_-]?(?:id|token))?|jwt'; 45 const SENSITIVE_ERROR_KEY = new RegExp(`^(?:${SENSITIVE_ERROR_KEY_NAMES})$`, 'i'); 46 const EMAIL_ADDRESS_PATTERN = /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi; 47 const BEARER_TOKEN_PATTERN = /\b(Bearer\s+)[A-Z0-9._~+/-]+=*/gi; 48 const COOKIE_HEADER_PATTERN = /\b((?:Set-Cookie|Cookie)\s*[:=]\s*)[^\r\n]*/gi; 49 // Authorization schemes may contain spaces and Base64 padding (`==`), which can look like the 50 // start of another keyed field to the generic pattern below. Consume the complete header line 51 // first so no credential fragment survives under Basic, Bearer, Digest or future schemes. 52 const AUTHORIZATION_HEADER_PATTERN = /\b((?:Proxy-)?Authorization\s*:\s*)[^\r\n]*/gi; 53 const AUTHORIZATION_REDACTION_PLACEHOLDER = '__MP_AUTHORIZATION_REDACTED__'; 54 const JWT_TOKEN_PATTERN = /\beyJ[A-Z0-9_-]*\.[A-Z0-9_-]+\.[A-Z0-9_-]+\b/gi; 55 const KEYED_SECRET_PATTERN = new RegExp( 56 `((["']?(?:${SENSITIVE_ERROR_KEY_NAMES})["']?)\\s*[:=]\\s*)(?:"([^"\\r\\n]*)"|'([^'\\r\\n]*)'|([^,;\\r\\n}\\]&]*?))(?=\\s+[A-Z_][A-Z0-9_.-]*\\s*[:=]|[,;\\r\\n}\\]&]|$)`, 57 'gi', 58 ); 59 60 const redactKeyedSecret = ( 61 _match: string, 62 prefix: string, 63 _key: string, 64 doubleQuotedValue?: string, 65 singleQuotedValue?: string, 66 ): string => { 67 if (doubleQuotedValue !== undefined) { 68 return `${prefix}"[REDACTED]"`; 69 } 70 if (singleQuotedValue !== undefined) { 71 return `${prefix}'[REDACTED]'`; 72 } 73 return `${prefix}[REDACTED]`; 74 }; 75 76 const redactSensitiveTelemetryValues = (message: string): string => 77 message 78 .replace(EMAIL_ADDRESS_PATTERN, '[REDACTED_EMAIL]') 79 // Use a neutral marker because the generic redactor treats the closing `]` in [REDACTED] 80 // as a value delimiter and would otherwise process this header a second time. 81 .replace(AUTHORIZATION_HEADER_PATTERN, `$1${AUTHORIZATION_REDACTION_PLACEHOLDER}`) 82 .replace(KEYED_SECRET_PATTERN, redactKeyedSecret) 83 // Reconsume the complete header so semicolon-delimited cookie attributes cannot escape. 84 .replace(COOKIE_HEADER_PATTERN, '$1[REDACTED]') 85 .replace(BEARER_TOKEN_PATTERN, '$1[REDACTED]') 86 .replace(JWT_TOKEN_PATTERN, '[REDACTED_JWT]') 87 .split(AUTHORIZATION_REDACTION_PLACEHOLDER) 88 .join('[REDACTED]'); 89 90 /** 91 * Preserves the real error text needed for production troubleshooting while redacting only 92 * credential/PII values. Error names, SDK codes, HTTP statuses and surrounding diagnostic context 93 * remain intact. Objects without a message are serialized with sensitive keys replaced. 94 */ 95 export const toTelemetryErrorMessage = (error: unknown, fallback = 'Unknown error'): string => { 96 try { 97 if (typeof error === 'string' && error.trim()) { 98 return redactSensitiveTelemetryValues(error); 99 } 100 101 if (error && typeof error === 'object') { 102 const message = (error as { message?: unknown }).message; 103 if (typeof message === 'string' && message.trim()) { 104 return redactSensitiveTelemetryValues(message); 105 } 106 107 const errorCode = (error as { errorCode?: unknown }).errorCode; 108 if (typeof errorCode === 'string' && errorCode.trim()) { 109 return redactSensitiveTelemetryValues(errorCode); 110 } 111 112 const seenObjects = new WeakSet<object>(); 113 const serialized = JSON.stringify(error, (key, value) => { 114 if (SENSITIVE_ERROR_KEY.test(key)) { 115 return '[REDACTED]'; 116 } 117 if (typeof value === 'string') { 118 return redactSensitiveTelemetryValues(value); 119 } 120 if (typeof value === 'bigint') { 121 return String(value); 122 } 123 if (value && typeof value === 'object') { 124 if (seenObjects.has(value)) { 125 return '[Circular]'; 126 } 127 seenObjects.add(value); 128 } 129 return value; 130 }); 131 if (serialized && serialized !== '{}') { 132 return serialized; 133 } 134 } 135 136 if (error !== null && error !== undefined) { 137 const stringified = String(error); 138 if (stringified && stringified !== '[object Object]') { 139 return redactSensitiveTelemetryValues(stringified); 140 } 141 } 142 } catch { 143 // A malformed SDK object may throw from a getter or during serialization. 144 } 145 146 return fallback; 147 }; 148 149 /** 150 * Classifies an arbitrary exception into the allowlisted Super Token catalog. This is an auxiliary 151 * dimension for grouping; the diagnostic message is produced independently by 152 * `toTelemetryErrorMessage`, so an unknown code does not erase the real failure context. 153 */ 154 export const toSafeTelemetryErrorCode = (error: unknown): SuperTokenErrorCode => { 155 const candidates: unknown[] = [error]; 156 157 if (error && typeof error === 'object') { 158 try { 159 candidates.push((error as { errorCode?: unknown }).errorCode, (error as { message?: unknown }).message); 160 } catch { 161 return MPSuperTokenErrorCodes.UNKNOWN_ERROR; 162 } 163 } 164 165 for (const candidate of candidates) { 166 if (typeof candidate !== 'string') { 167 continue; 168 } 169 const knownCode = KNOWN_ERROR_CODES.find((code) => candidate.includes(code)); 170 if (knownCode) { 171 return knownCode; 172 } 173 } 174 175 return MPSuperTokenErrorCodes.UNKNOWN_ERROR; 176 }; 42 177 43 178 /** … … 102 237 * caller from the retry counter (SuperTokenState.shouldAllowRetry). 103 238 */ 104 export const resolveErrorMessage = ( 105 errorCode: string, 106 allowRetry: boolean, 107 copy: ErrorMessageCopy, 108 ): string => { 239 export const resolveErrorMessage = (errorCode: string, allowRetry: boolean, copy: ErrorMessageCopy): string => { 109 240 const errorMessages = errorMessagesFor(copy); 110 const errorConfig = 111 Object.entries(errorMessages).find(([key]) => errorCode.includes(key))?.[1] ?? null; 241 const errorConfig = Object.entries(errorMessages).find(([key]) => errorCode.includes(key))?.[1] ?? null; 112 242 113 243 if (!errorConfig) { -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/core/paymentMethods/BasePaymentMethodWithInstallments.ts
r3663899 r3710292 59 59 (installment) => 60 60 installment.installment_rate === 0 && 61 installment.installment_rate_collector.includes('MERCADOPAGO'),61 (installment.installment_rate_collector ?? []).includes('MERCADOPAGO'), 62 62 ); 63 63 return installmentsWithoutFee.length > 0 … … 95 95 const installmentAmount = this.formatAmount(installment.installment_amount); 96 96 const hasRate = installment.installment_rate !== 0; 97 const isThirdParty = installment.installment_rate_collector.includes('THIRD_PARTY');97 const isThirdParty = (installment.installment_rate_collector ?? []).includes('THIRD_PARTY'); 98 98 const totalAmount = this.formatAmount(installment.total_amount); 99 99 -
woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/ports/VariantViewPort.ts
r3663899 r3710292 41 41 /** Reports (once) that MPCheckoutFieldsDispatcher is unavailable at installments setup. */ 42 42 reportInstallmentDispatcherMissing(context: string): void; 43 /** Reports a row build failure before the view falls back or skips only that row. */ 44 recordPaymentMethodRowFailure(error: unknown): void; 43 45 44 46 // ─── Consumer credits (async SDK contract + state + metrics) ─── … … 58 60 recordConsumerCreditsHint(success: boolean, error?: unknown): void; 59 61 recordConsumerCreditsDueDate(success: boolean, error?: unknown): void; 62 /** Records whether the consumer-credits details section was constructed successfully. */ 63 recordConsumerCreditsDetails(success: boolean): void; 60 64 } 61 65 -
woocommerce-mercadopago/trunk/i18n/languages/woocommerce-mercadopago-es.po
r3609381 r3710292 3487 3487 #: ../../src/Translations/StoreTranslations.php:386 3488 3488 msgid "As it spelled on the card." 3489 msgstr "Com plétalo como aparece en la tarjeta."3489 msgstr "Como aparece en la tarjeta." 3490 3490 3491 3491 #: ../../src/Translations/StoreTranslations.php:387 … … 4678 4678 "momento." 4679 4679 4680 #: ../../src/Translations/StoreTranslations.php:387 4681 msgid "You can pay with card" 4682 msgstr "Puedes pagar con tarjeta" 4683 4684 #: ../../src/Translations/StoreTranslations.php:388 4685 msgid "Card" 4686 msgstr "Tarjeta" 4687 4688 #: ../../src/Translations/StoreTranslations.php:389 4689 msgid "Enter the {digits} numbers on your card." 4690 msgstr "Ingresa los {digits} números de tu tarjeta." 4691 4692 #: ../../src/Translations/StoreTranslations.php:390 4693 msgid "Enter two digits for the month and two digits for the year." 4694 msgstr "Ingresa dos dígitos para el mes y dos dígitos para el año." 4695 4696 #: ../../src/Translations/StoreTranslations.php:391 4697 msgid "Enter your {digits} digit code." 4698 msgstr "Ingresa tu código de {digits} dígitos." 4699 4700 #: ../../src/Translations/StoreTranslations.php:392 4701 msgid "Enter between {min} and {max} digits for your ID number." 4702 msgstr "Ingresa entre {min} y {max} dígitos para tu número de documento." 4703 4704 #: ../../src/Translations/StoreTranslations.php:393 4705 msgid "Enter the {digits} digits of your ID number." 4706 msgstr "Ingresa los {digits} dígitos de tu número de documento." 4707 4680 4708 #~ msgid "" 4681 4709 #~ "By disabling it, you will disable all credit cards payments from Mercado " -
woocommerce-mercadopago/trunk/i18n/languages/woocommerce-mercadopago-es_MX.po
r3609381 r3710292 3488 3488 #: ../../src/Translations/StoreTranslations.php:386 3489 3489 msgid "As it spelled on the card." 3490 msgstr "Com plétalo como aparece en la tarjeta."3490 msgstr "Como aparece en la tarjeta." 3491 3491 3492 3492 #: ../../src/Translations/StoreTranslations.php:387 … … 4681 4681 "momento." 4682 4682 4683 #: ../../src/Translations/StoreTranslations.php:387 4684 msgid "You can pay with card" 4685 msgstr "Puedes pagar con tarjeta" 4686 4687 #: ../../src/Translations/StoreTranslations.php:388 4688 msgid "Card" 4689 msgstr "Tarjeta" 4690 4691 #: ../../src/Translations/StoreTranslations.php:389 4692 msgid "Enter the {digits} numbers on your card." 4693 msgstr "Ingresa los {digits} números de tu tarjeta." 4694 4695 #: ../../src/Translations/StoreTranslations.php:390 4696 msgid "Enter two digits for the month and two digits for the year." 4697 msgstr "Ingresa dos dígitos para el mes y dos dígitos para el año." 4698 4699 #: ../../src/Translations/StoreTranslations.php:391 4700 msgid "Enter your {digits} digit code." 4701 msgstr "Ingresa tu código de {digits} dígitos." 4702 4703 #: ../../src/Translations/StoreTranslations.php:392 4704 msgid "Enter between {min} and {max} digits for your ID number." 4705 msgstr "Ingresa entre {min} y {max} dígitos para tu número de documento." 4706 4707 #: ../../src/Translations/StoreTranslations.php:393 4708 msgid "Enter the {digits} digits of your ID number." 4709 msgstr "Ingresa los {digits} dígitos de tu número de documento." 4710 4683 4711 #~ msgid "" 4684 4712 #~ "By disabling it, you will disable all credit cards payments from Mercado " -
woocommerce-mercadopago/trunk/i18n/languages/woocommerce-mercadopago-pt.po
r3609381 r3710292 3494 3494 #: ../../src/Translations/StoreTranslations.php:386 3495 3495 msgid "As it spelled on the card." 3496 msgstr " Preencha o nome como estáno cartão."3496 msgstr "Conforme aparece no cartão." 3497 3497 3498 3498 #: ../../src/Translations/StoreTranslations.php:387 … … 4695 4695 "instantes." 4696 4696 4697 #: ../../src/Translations/StoreTranslations.php:387 4698 msgid "You can pay with card" 4699 msgstr "Você pode pagar com cartão" 4700 4701 #: ../../src/Translations/StoreTranslations.php:388 4702 msgid "Card" 4703 msgstr "Cartão" 4704 4705 #: ../../src/Translations/StoreTranslations.php:389 4706 msgid "Enter the {digits} numbers on your card." 4707 msgstr "Digite os {digits} números do seu cartão." 4708 4709 #: ../../src/Translations/StoreTranslations.php:390 4710 msgid "Enter two digits for the month and two digits for the year." 4711 msgstr "Insira dois dígitos para o mês e dois dígitos para o ano." 4712 4713 #: ../../src/Translations/StoreTranslations.php:391 4714 msgid "Enter your {digits} digit code." 4715 msgstr "Digite seu código de {digits} dígitos." 4716 4717 #: ../../src/Translations/StoreTranslations.php:392 4718 msgid "Enter between {min} and {max} digits for your ID number." 4719 msgstr "Insira entre {min} e {max} dígitos para o número do seu documento." 4720 4721 #: ../../src/Translations/StoreTranslations.php:393 4722 msgid "Enter the {digits} digits of your ID number." 4723 msgstr "Insira os {digits} dígitos do número do seu documento." 4724 4697 4725 #~ msgid "" 4698 4726 #~ "By disabling it, you will disable all credit cards payments from Mercado " -
woocommerce-mercadopago/trunk/i18n/languages/woocommerce-mercadopago.pot
r3609381 r3710292 8 8 "Content-Transfer-Encoding: 8bit\n" 9 9 "Last-Translator: Mercado Pago Developers <woocommerce.dev@mercadopago.com>\n" 10 "POT-Creation-Date: 2026-0 6-30 16:56+0000\n"10 "POT-Creation-Date: 2026-08-28 12:40+0000\n" 11 11 "Project-Id-Version: undefined\n" 12 12 "X-Poedit-Basepath: ..\n" … … 17 17 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 18 18 19 #: ../../src/WoocommerceMercadoPago.php:5 45, ../../src/Translations/AdminTranslations.php:21919 #: ../../src/WoocommerceMercadoPago.php:551, ../../src/Translations/AdminTranslations.php:219 20 20 msgid "Activate WooCommerce" 21 21 msgstr "" 22 22 23 #: ../../src/WoocommerceMercadoPago.php:5 46, ../../src/Translations/AdminTranslations.php:22023 #: ../../src/WoocommerceMercadoPago.php:552, ../../src/Translations/AdminTranslations.php:220 24 24 msgid "Install WooCommerce" 25 25 msgstr "" 26 26 27 #: ../../src/WoocommerceMercadoPago.php:5 47, ../../src/Translations/AdminTranslations.php:22127 #: ../../src/WoocommerceMercadoPago.php:553, ../../src/Translations/AdminTranslations.php:221 28 28 msgid "See WooCommerce" 29 29 msgstr "" 30 30 31 #: ../../src/WoocommerceMercadoPago.php:5 49, ../../src/Translations/AdminTranslations.php:21031 #: ../../src/WoocommerceMercadoPago.php:555, ../../src/Translations/AdminTranslations.php:210 32 32 msgid "The Mercado Pago module needs an active version of %s in order to work!" 33 33 msgstr "" 34 34 35 #: ../../src/Gateways/CustomGateway.php: 30635 #: ../../src/Gateways/CustomGateway.php:407 36 36 msgid "Could not load the subscription to change the payment method." 37 37 msgstr "" 38 38 39 #: ../../src/Gateways/CustomGateway.php: 32139 #: ../../src/Gateways/CustomGateway.php:422 40 40 msgid "Subscription is not linked to Mercado Pago yet." 41 41 msgstr "" 42 42 43 #: ../../src/Gateways/CustomGateway.php: 32943 #: ../../src/Gateways/CustomGateway.php:430 44 44 msgid "Please enter the new card data to continue." 45 45 msgstr "" 46 46 47 #: ../../src/Gateways/CustomGateway.php: 34047 #: ../../src/Gateways/CustomGateway.php:441 48 48 msgid "Recurring Payments credential is missing. Contact the store administrator." 49 49 msgstr "" 50 50 51 #: ../../src/Gateways/CustomGateway.php: 36651 #: ../../src/Gateways/CustomGateway.php:467 52 52 msgid "We could not process the card change. Please try again in a few minutes." 53 53 msgstr "" 54 54 55 #: ../../src/Gateways/CustomGateway.php: 37955 #: ../../src/Gateways/CustomGateway.php:480 56 56 msgid "We could not add the new card. Please try a different card." 57 57 msgstr "" 58 58 59 #: ../../src/Gateways/CustomGateway.php: 389, ../../src/Gateways/CustomGateway.php:44059 #: ../../src/Gateways/CustomGateway.php:490, ../../src/Gateways/CustomGateway.php:543 60 60 msgid "Payment method updated successfully." 61 61 msgstr "" 62 62 63 63 #. translators: %s = subscription id 64 #: ../../src/Gateways/CustomGateway.php: 52164 #: ../../src/Gateways/CustomGateway.php:623 65 65 msgid "Mercado Pago: critical inconsistency removing the old card on subscription %s. Please check WC > Status > Logs (channel: mercadopago-subscriptions)." 66 66 msgstr "" 67 67 68 #: ../../src/Gateways/CustomGateway.php: 91368 #: ../../src/Gateways/CustomGateway.php:1014 69 69 msgid "Subscription" 70 70 msgstr "" 71 71 72 #: ../../src/Gateways/CustomGateway.php:1 04772 #: ../../src/Gateways/CustomGateway.php:1148 73 73 msgid "Please fill in at least one Pre-approval Access Token to activate Recurring Payments." 74 74 msgstr "" 75 75 76 #: ../../src/Gateways/CustomGateway.php:1 06176 #: ../../src/Gateways/CustomGateway.php:1166 77 77 msgid "Sandbox" 78 78 msgstr "" 79 79 80 #: ../../src/Gateways/CustomGateway.php:1 06280 #: ../../src/Gateways/CustomGateway.php:1167 81 81 msgid "Production" 82 82 msgstr "" 83 83 84 84 #. translators: %s: environment name (Production or Sandbox) 85 #: ../../src/Gateways/CustomGateway.php:1 06885 #: ../../src/Gateways/CustomGateway.php:1173 86 86 msgid "Please fill in the %s Pre-approval Access Token to activate Recurring Payments in this environment." 87 87 msgstr "" 88 88 89 89 #. translators: %s: environment name (Production or Sandbox) 90 #: ../../src/Gateways/CustomGateway.php:11 3090 #: ../../src/Gateways/CustomGateway.php:1181 91 91 msgid "Please fill in the %s Pre-approval Public Key to activate Recurring Payments in this environment." 92 92 msgstr "" 93 93 94 #: ../../src/Gateways/CustomGateway.php:1 08394 #: ../../src/Gateways/CustomGateway.php:1202 95 95 msgid "Recurring credential" 96 96 msgstr "" 97 97 98 #: ../../src/Gateways/CustomGateway.php:1 09098 #: ../../src/Gateways/CustomGateway.php:1209 99 99 msgid "Test credential" 100 100 msgstr "" 101 101 102 #: ../../src/Gateways/CustomGateway.php:1 151102 #: ../../src/Gateways/CustomGateway.php:1270 103 103 msgid "Error validating recurring payments credential." 104 104 msgstr "" 105 105 106 #: ../../src/Gateways/CustomGateway.php:1 146106 #: ../../src/Gateways/CustomGateway.php:1265 107 107 msgid "Pre-approval credentials validated successfully" 108 108 msgstr "" 109 109 110 #: ../../src/Gateways/CustomGateway.php:1 147110 #: ../../src/Gateways/CustomGateway.php:1266 111 111 msgid "Application" 112 112 msgstr "" 113 113 114 #: ../../src/Gateways/CustomGateway.php:1 167114 #: ../../src/Gateways/CustomGateway.php:1286 115 115 msgid "Invalid Token format." 116 116 msgstr "" 117 117 118 #: ../../src/Gateways/CustomGateway.php:1 168118 #: ../../src/Gateways/CustomGateway.php:1287 119 119 msgid "Invalid or expired Token." 120 120 msgstr "" 121 121 122 #: ../../src/Gateways/CustomGateway.php:1 169122 #: ../../src/Gateways/CustomGateway.php:1288 123 123 msgid "This Access Token does not belong to the expected application. Contact your Mercado Pago commercial consultant." 124 124 msgstr "" 125 125 126 #: ../../src/Gateways/CustomGateway.php:1 170126 #: ../../src/Gateways/CustomGateway.php:1289 127 127 msgid "Credential application not found. Please check if the token is valid." 128 128 msgstr "" 129 129 130 #: ../../src/Gateways/CustomGateway.php:1 171130 #: ../../src/Gateways/CustomGateway.php:1290 131 131 msgid "Could not validate the credential at this time. Please try again." 132 132 msgstr "" 133 133 134 #: ../../src/Gateways/CustomGateway.php:1 172134 #: ../../src/Gateways/CustomGateway.php:1291 135 135 msgid "Could not verify application scopes. Please contact your Mercado Pago commercial consultant." 136 136 msgstr "" 137 137 138 #: ../../src/Gateways/CustomGateway.php:1 173138 #: ../../src/Gateways/CustomGateway.php:1292 139 139 msgid "This credential does not have the required Pre-approval scope. Please request activation from your Mercado Pago commercial consultant." 140 140 msgstr "" 141 141 142 #: ../../src/Gateways/CustomGateway.php:1 174142 #: ../../src/Gateways/CustomGateway.php:1293 143 143 msgid "This application is inactive in Mercado Pago. Contact your Mercado Pago commercial consultant." 144 144 msgstr "" 145 145 146 #: ../../src/Gateways/CustomGateway.php:1 175146 #: ../../src/Gateways/CustomGateway.php:1294 147 147 msgid "This application is blocked in Mercado Pago. Contact your Mercado Pago commercial consultant." 148 148 msgstr "" 149 149 150 #: ../../src/Gateways/CustomGateway.php:1 176150 #: ../../src/Gateways/CustomGateway.php:1295 151 151 msgid "This application is disabled in Mercado Pago. Contact your Mercado Pago commercial consultant." 152 152 msgstr "" 153 153 154 #: ../../src/Gateways/CustomGateway.php:1 177154 #: ../../src/Gateways/CustomGateway.php:1296 155 155 msgid "Unexpected response when validating the credential." 156 156 msgstr "" 157 157 158 #: ../../src/Gateways/CustomGateway.php:1 180158 #: ../../src/Gateways/CustomGateway.php:1299 159 159 msgid "An error occurred while validating the credential." 160 160 msgstr "" 161 161 162 #: ../../src/Hooks/Subscriptions.php:1 30162 #: ../../src/Hooks/Subscriptions.php:145 163 163 msgid "Mercado Pago: subscription data incomplete — no subscription ID found." 164 164 msgstr "" 165 165 166 #: ../../src/Hooks/Subscriptions.php:1 44166 #: ../../src/Hooks/Subscriptions.php:159 167 167 msgid "Mercado Pago: subscription access token not configured." 168 168 msgstr "" 169 169 170 #: ../../src/Hooks/Subscriptions.php:163 170 #: ../../src/Hooks/Subscriptions.php:182 171 msgid "Mercado Pago: renewal failed — could not determine conversion rate. WCS will retry." 172 msgstr "" 173 174 #: ../../src/Hooks/Subscriptions.php:197 171 175 msgid "Mercado Pago: renewal failed due to a connectivity error. WCS will retry." 172 176 msgstr "" 173 177 174 #: ../../src/Hooks/Subscriptions.php: 171178 #: ../../src/Hooks/Subscriptions.php:205 175 179 msgid "Mercado Pago: subscription credentials invalid or revoked." 176 180 msgstr "" 177 181 178 #: ../../src/Hooks/Subscriptions.php: 190182 #: ../../src/Hooks/Subscriptions.php:232 179 183 msgid "Mercado Pago: awaiting payment confirmation." 180 184 msgstr "" 181 185 182 #: ../../src/Hooks/Subscriptions.php: 282186 #: ../../src/Hooks/Subscriptions.php:330 183 187 msgid "Your Pre-approval credentials are invalid or lost scope. Subscription renewals are failing. Go to Settings > Recurring Payments to reconfigure." 184 188 msgstr "" 185 189 186 190 #. translators: %d: number of subscriptions with incomplete data 187 #: ../../src/Hooks/Subscriptions.php: 295191 #: ../../src/Hooks/Subscriptions.php:343 188 192 msgid "We found %d subscriptions with incomplete data. Renewals for these subscriptions will not work. Contact support." 189 193 msgstr "" 190 194 191 #: ../../src/Hooks/Subscriptions.php: 392195 #: ../../src/Hooks/Subscriptions.php:470 192 196 msgid "Subscription renewal" 193 197 msgstr "" … … 1814 1818 msgstr "" 1815 1819 1816 #: ../../src/Translations/AdminTranslations.php:1276, ../../src/Translations/StoreTranslations.php:318, ../../src/Translations/StoreTranslations.php:322, ../../src/Translations/StoreTranslations.php:324, ../../src/Translations/StoreTranslations.php:326, ../../src/Translations/StoreTranslations.php:338, ../../src/Translations/StoreTranslations.php:343, ../../src/Translations/StoreTranslations.php:346, ../../src/Translations/StoreTranslations.php:4 83, ../../src/Translations/StoreTranslations.php:4851820 #: ../../src/Translations/AdminTranslations.php:1276, ../../src/Translations/StoreTranslations.php:318, ../../src/Translations/StoreTranslations.php:322, ../../src/Translations/StoreTranslations.php:324, ../../src/Translations/StoreTranslations.php:326, ../../src/Translations/StoreTranslations.php:338, ../../src/Translations/StoreTranslations.php:343, ../../src/Translations/StoreTranslations.php:346, ../../src/Translations/StoreTranslations.php:490, ../../src/Translations/StoreTranslations.php:492 1817 1821 msgid "Fill out this field." 1818 1822 msgstr "" … … 2278 2282 msgstr "" 2279 2283 2280 #: ../../src/Translations/AdminTranslations.php:15562281 msgid "This payment was made using Fast Pay with Mercado Pago and does not yet support refunds through the WooCommerce order page. Please process the refund directly from your Mercado Pago payment details page."2282 msgstr ""2283 2284 2284 #: ../../src/Translations/StoreTranslations.php:167 2285 2285 msgid "discount of" … … 2310 2310 msgstr "" 2311 2311 2312 #: ../../src/Translations/StoreTranslations.php:174, ../../src/Translations/StoreTranslations.php:227, ../../src/Translations/StoreTranslations.php:353, ../../src/Translations/StoreTranslations.php:4 56, ../../src/Translations/StoreTranslations.php:539, ../../src/Translations/StoreTranslations.php:5972312 #: ../../src/Translations/StoreTranslations.php:174, ../../src/Translations/StoreTranslations.php:227, ../../src/Translations/StoreTranslations.php:353, ../../src/Translations/StoreTranslations.php:463, ../../src/Translations/StoreTranslations.php:546, ../../src/Translations/StoreTranslations.php:604 2313 2313 msgid "There was an error. Please try again in a few minutes." 2314 2314 msgstr "" 2315 2315 2316 #: ../../src/Translations/StoreTranslations.php:175, ../../src/Translations/StoreTranslations.php:217, ../../src/Translations/StoreTranslations.php:4 39, ../../src/Translations/StoreTranslations.php:473, ../../src/Translations/StoreTranslations.php:531, ../../src/Translations/StoreTranslations.php:5952316 #: ../../src/Translations/StoreTranslations.php:175, ../../src/Translations/StoreTranslations.php:217, ../../src/Translations/StoreTranslations.php:446, ../../src/Translations/StoreTranslations.php:480, ../../src/Translations/StoreTranslations.php:538, ../../src/Translations/StoreTranslations.php:602 2317 2317 msgid "By continuing, you agree to our" 2318 2318 msgstr "" 2319 2319 2320 #: ../../src/Translations/StoreTranslations.php:176, ../../src/Translations/StoreTranslations.php:218, ../../src/Translations/StoreTranslations.php:44 0, ../../src/Translations/StoreTranslations.php:475, ../../src/Translations/StoreTranslations.php:532, ../../src/Translations/StoreTranslations.php:5962320 #: ../../src/Translations/StoreTranslations.php:176, ../../src/Translations/StoreTranslations.php:218, ../../src/Translations/StoreTranslations.php:447, ../../src/Translations/StoreTranslations.php:482, ../../src/Translations/StoreTranslations.php:539, ../../src/Translations/StoreTranslations.php:603 2321 2321 msgid "Terms and conditions" 2322 2322 msgstr "" … … 2330 2330 msgstr "" 2331 2331 2332 #: ../../src/Translations/StoreTranslations.php:190, ../../src/Translations/StoreTranslations.php:212, ../../src/Translations/StoreTranslations.php:315, ../../src/Translations/StoreTranslations.php:47 1, ../../src/Translations/StoreTranslations.php:523, ../../src/Translations/StoreTranslations.php:5832332 #: ../../src/Translations/StoreTranslations.php:190, ../../src/Translations/StoreTranslations.php:212, ../../src/Translations/StoreTranslations.php:315, ../../src/Translations/StoreTranslations.php:478, ../../src/Translations/StoreTranslations.php:530, ../../src/Translations/StoreTranslations.php:590 2333 2333 msgid "See the rules for the test mode." 2334 2334 msgstr "" … … 2478 2478 msgstr "" 2479 2479 2480 #: ../../src/Translations/StoreTranslations.php:325, ../../src/Translations/StoreTranslations.php:5 24, ../../src/Translations/StoreTranslations.php:5842480 #: ../../src/Translations/StoreTranslations.php:325, ../../src/Translations/StoreTranslations.php:531, ../../src/Translations/StoreTranslations.php:591 2481 2481 msgid "Holder ID" 2482 2482 msgstr "" … … 2693 2693 2694 2694 #: ../../src/Translations/StoreTranslations.php:387 2695 msgid "You can pay with card" 2696 msgstr "" 2697 2698 #: ../../src/Translations/StoreTranslations.php:388 2699 msgid "Card" 2700 msgstr "" 2701 2702 #: ../../src/Translations/StoreTranslations.php:389 2703 msgid "Enter the {digits} numbers on your card." 2704 msgstr "" 2705 2706 #: ../../src/Translations/StoreTranslations.php:390 2707 msgid "Enter two digits for the month and two digits for the year." 2708 msgstr "" 2709 2710 #: ../../src/Translations/StoreTranslations.php:391 2711 msgid "Enter your {digits} digit code." 2712 msgstr "" 2713 2714 #: ../../src/Translations/StoreTranslations.php:392 2715 msgid "Enter between {min} and {max} digits for your ID number." 2716 msgstr "" 2717 2718 #: ../../src/Translations/StoreTranslations.php:393 2719 msgid "Enter the {digits} digits of your ID number." 2720 msgstr "" 2721 2722 #: ../../src/Translations/StoreTranslations.php:394 2695 2723 msgid "The first installment <b>is due on</b>" 2696 2724 msgstr "" 2697 2725 2698 #: ../../src/Translations/StoreTranslations.php:3 892726 #: ../../src/Translations/StoreTranslations.php:396 2699 2727 msgid "Jan" 2700 2728 msgstr "" 2701 2729 2702 #: ../../src/Translations/StoreTranslations.php:39 02730 #: ../../src/Translations/StoreTranslations.php:397 2703 2731 msgid "Feb" 2704 2732 msgstr "" 2705 2733 2706 #: ../../src/Translations/StoreTranslations.php:39 12734 #: ../../src/Translations/StoreTranslations.php:398 2707 2735 msgid "Mar" 2708 2736 msgstr "" 2709 2737 2710 #: ../../src/Translations/StoreTranslations.php:39 22738 #: ../../src/Translations/StoreTranslations.php:399 2711 2739 msgid "Apr" 2712 2740 msgstr "" 2713 2741 2714 #: ../../src/Translations/StoreTranslations.php: 3932742 #: ../../src/Translations/StoreTranslations.php:400 2715 2743 msgid "May" 2716 2744 msgstr "" 2717 2745 2718 #: ../../src/Translations/StoreTranslations.php: 3942746 #: ../../src/Translations/StoreTranslations.php:401 2719 2747 msgid "June" 2720 2748 msgstr "" 2721 2749 2722 #: ../../src/Translations/StoreTranslations.php: 3952750 #: ../../src/Translations/StoreTranslations.php:402 2723 2751 msgid "July" 2724 2752 msgstr "" 2725 2753 2726 #: ../../src/Translations/StoreTranslations.php: 3962754 #: ../../src/Translations/StoreTranslations.php:403 2727 2755 msgid "Aug" 2728 2756 msgstr "" 2729 2757 2730 #: ../../src/Translations/StoreTranslations.php: 3972758 #: ../../src/Translations/StoreTranslations.php:404 2731 2759 msgid "Sept" 2732 2760 msgstr "" 2733 2761 2734 #: ../../src/Translations/StoreTranslations.php: 3982762 #: ../../src/Translations/StoreTranslations.php:405 2735 2763 msgid "Oct" 2736 2764 msgstr "" 2737 2765 2738 #: ../../src/Translations/StoreTranslations.php: 3992766 #: ../../src/Translations/StoreTranslations.php:406 2739 2767 msgid "Nov" 2740 2768 msgstr "" 2741 2769 2742 #: ../../src/Translations/StoreTranslations.php:40 02770 #: ../../src/Translations/StoreTranslations.php:407 2743 2771 msgid "Dec" 2744 2772 msgstr "" 2745 2773 2746 #: ../../src/Translations/StoreTranslations.php:40 22774 #: ../../src/Translations/StoreTranslations.php:409 2747 2775 msgid "The payment will be debited automatically from your Mercado Pago account. Make sure to have available balance on the due date." 2748 2776 msgstr "" 2749 2777 2750 #: ../../src/Translations/StoreTranslations.php:4 032778 #: ../../src/Translations/StoreTranslations.php:410 2751 2779 msgid "Interest rate" 2752 2780 msgstr "" 2753 2781 2754 #: ../../src/Translations/StoreTranslations.php:4 042782 #: ../../src/Translations/StoreTranslations.php:411 2755 2783 msgid "per month and" 2756 2784 msgstr "" 2757 2785 2758 #: ../../src/Translations/StoreTranslations.php:4 052786 #: ../../src/Translations/StoreTranslations.php:412 2759 2787 msgid "per year" 2760 2788 msgstr "" 2761 2789 2762 #: ../../src/Translations/StoreTranslations.php:4 062790 #: ../../src/Translations/StoreTranslations.php:413 2763 2791 msgid "Total effective cost" 2764 2792 msgstr "" 2765 2793 2766 #: ../../src/Translations/StoreTranslations.php:4 072794 #: ../../src/Translations/StoreTranslations.php:414 2767 2795 msgid "Tax on Financial Transactions (IOF)" 2768 2796 msgstr "" 2769 2797 2770 #: ../../src/Translations/StoreTranslations.php:4 082798 #: ../../src/Translations/StoreTranslations.php:415 2771 2799 msgid "Total amount borrowed" 2772 2800 msgstr "" 2773 2801 2774 #: ../../src/Translations/StoreTranslations.php:4 092802 #: ../../src/Translations/StoreTranslations.php:416 2775 2803 msgid "APR" 2776 2804 msgstr "" 2777 2805 2778 #: ../../src/Translations/StoreTranslations.php:41 02806 #: ../../src/Translations/StoreTranslations.php:417 2779 2807 msgid "excluding VAT" 2780 2808 msgstr "" 2781 2809 2782 #: ../../src/Translations/StoreTranslations.php:41 12810 #: ../../src/Translations/StoreTranslations.php:418 2783 2811 msgid "Annual interest rate" 2784 2812 msgstr "" 2785 2813 2786 #: ../../src/Translations/StoreTranslations.php:41 22814 #: ../../src/Translations/StoreTranslations.php:419 2787 2815 msgid "French amortization system with a fixed final monthly installment" 2788 2816 msgstr "" 2789 2817 2790 #: ../../src/Translations/StoreTranslations.php:4 132818 #: ../../src/Translations/StoreTranslations.php:420 2791 2819 msgid "EIR" 2792 2820 msgstr "" 2793 2821 2794 #: ../../src/Translations/StoreTranslations.php:4 142822 #: ../../src/Translations/StoreTranslations.php:421 2795 2823 msgid "NAR" 2796 2824 msgstr "" 2797 2825 2798 #: ../../src/Translations/StoreTranslations.php:4 152826 #: ../../src/Translations/StoreTranslations.php:422 2799 2827 msgid "EAR" 2800 2828 msgstr "" 2801 2829 2802 #: ../../src/Translations/StoreTranslations.php:4 162830 #: ../../src/Translations/StoreTranslations.php:423 2803 2831 msgid "Fixed rate" 2804 2832 msgstr "" 2805 2833 2806 #: ../../src/Translations/StoreTranslations.php:4 172834 #: ../../src/Translations/StoreTranslations.php:424 2807 2835 msgid "Learn more about <a href=\"{link}\" target=\"_blank\">how we protect your privacy</a>." 2808 2836 msgstr "" 2809 2837 2810 #: ../../src/Translations/StoreTranslations.php:4 182838 #: ../../src/Translations/StoreTranslations.php:425 2811 2839 msgid "The payment could not be completed. Please try again or pay with another method." 2812 2840 msgstr "" 2813 2841 2814 #: ../../src/Translations/StoreTranslations.php:4 192842 #: ../../src/Translations/StoreTranslations.php:426 2815 2843 msgid "The payment could not be completed. Please pay with another method." 2816 2844 msgstr "" 2817 2845 2818 #: ../../src/Translations/StoreTranslations.php:42 02846 #: ../../src/Translations/StoreTranslations.php:427 2819 2847 msgid "It was not possible to validate your identity. Please try again or pay with another method." 2820 2848 msgstr "" 2821 2849 2822 #: ../../src/Translations/StoreTranslations.php:42 12850 #: ../../src/Translations/StoreTranslations.php:428 2823 2851 msgid "It was not possible to validate your identity. Please pay with another method." 2824 2852 msgstr "" 2825 2853 2826 #: ../../src/Translations/StoreTranslations.php:42 22854 #: ../../src/Translations/StoreTranslations.php:429 2827 2855 msgid "Select a payment method to complete your purchase." 2828 2856 msgstr "" 2829 2857 2830 #: ../../src/Translations/StoreTranslations.php:4 342858 #: ../../src/Translations/StoreTranslations.php:441 2831 2859 msgid "Pix in Test Mode" 2832 2860 msgstr "" 2833 2861 2834 #: ../../src/Translations/StoreTranslations.php:4 35, ../../src/Translations/StoreTranslations.php:4722862 #: ../../src/Translations/StoreTranslations.php:442, ../../src/Translations/StoreTranslations.php:479 2835 2863 msgid "You can test the flow to generate a code, but you cannot finalize the payment." 2836 2864 msgstr "" 2837 2865 2838 #: ../../src/Translations/StoreTranslations.php:4 362866 #: ../../src/Translations/StoreTranslations.php:443 2839 2867 msgid "Pay instantly" 2840 2868 msgstr "" 2841 2869 2842 #: ../../src/Translations/StoreTranslations.php:4 372870 #: ../../src/Translations/StoreTranslations.php:444 2843 2871 msgid "By confirming your purchase, we will show you a code to make the payment." 2844 2872 msgstr "" 2845 2873 2846 #: ../../src/Translations/StoreTranslations.php:4 382874 #: ../../src/Translations/StoreTranslations.php:445 2847 2875 msgid "Pix logo" 2848 2876 msgstr "" 2849 2877 2850 #: ../../src/Translations/StoreTranslations.php:44 1, ../../src/Translations/StoreTranslations.php:4502878 #: ../../src/Translations/StoreTranslations.php:448, ../../src/Translations/StoreTranslations.php:457 2851 2879 msgid "Code valid for " 2852 2880 msgstr "" 2853 2881 2854 #: ../../src/Translations/StoreTranslations.php:44 22882 #: ../../src/Translations/StoreTranslations.php:449 2855 2883 msgid "Now you just need to pay with Pix to finalize your purchase" 2856 2884 msgstr "" 2857 2885 2858 #: ../../src/Translations/StoreTranslations.php:4 432886 #: ../../src/Translations/StoreTranslations.php:450 2859 2887 msgid "How to pay with Pix:" 2860 2888 msgstr "" 2861 2889 2862 #: ../../src/Translations/StoreTranslations.php:4 442890 #: ../../src/Translations/StoreTranslations.php:451 2863 2891 msgid "Go to your bank's app or website" 2864 2892 msgstr "" 2865 2893 2866 #: ../../src/Translations/StoreTranslations.php:4 452894 #: ../../src/Translations/StoreTranslations.php:452 2867 2895 msgid "Search for the option to pay with Pix" 2868 2896 msgstr "" 2869 2897 2870 #: ../../src/Translations/StoreTranslations.php:4 462898 #: ../../src/Translations/StoreTranslations.php:453 2871 2899 msgid "Scan the QR code or Pix code" 2872 2900 msgstr "" 2873 2901 2874 #: ../../src/Translations/StoreTranslations.php:4 472902 #: ../../src/Translations/StoreTranslations.php:454 2875 2903 msgid "Done! You will see the payment confirmation" 2876 2904 msgstr "" 2877 2905 2878 #: ../../src/Translations/StoreTranslations.php:4 482906 #: ../../src/Translations/StoreTranslations.php:455 2879 2907 msgid "Value: " 2880 2908 msgstr "" 2881 2909 2882 #: ../../src/Translations/StoreTranslations.php:4 492910 #: ../../src/Translations/StoreTranslations.php:456 2883 2911 msgid "Scan the QR code:" 2884 2912 msgstr "" 2885 2913 2886 #: ../../src/Translations/StoreTranslations.php:45 12914 #: ../../src/Translations/StoreTranslations.php:458 2887 2915 msgid "If you prefer, you can pay by copying and pasting the following code" 2888 2916 msgstr "" 2889 2917 2890 #: ../../src/Translations/StoreTranslations.php:45 22918 #: ../../src/Translations/StoreTranslations.php:459 2891 2919 msgid "Copy code" 2892 2920 msgstr "" 2893 2921 2894 #: ../../src/Translations/StoreTranslations.php:4 53, ../../src/Translations/StoreTranslations.php:538, ../../src/Translations/StoreTranslations.php:5942922 #: ../../src/Translations/StoreTranslations.php:460, ../../src/Translations/StoreTranslations.php:545, ../../src/Translations/StoreTranslations.php:601 2895 2923 msgid "Mercado Pago: The customer has not paid yet." 2896 2924 msgstr "" 2897 2925 2898 #: ../../src/Translations/StoreTranslations.php:4 542926 #: ../../src/Translations/StoreTranslations.php:461 2899 2927 msgid "Mercado Pago: Now you just need to pay with Pix to finalize your purchase." 2900 2928 msgstr "" 2901 2929 2902 #: ../../src/Translations/StoreTranslations.php:4 552930 #: ../../src/Translations/StoreTranslations.php:462 2903 2931 msgid "Scan the QR code below or copy and paste the code into your bank's application." 2904 2932 msgstr "" 2905 2933 2906 #: ../../src/Translations/StoreTranslations.php:4 572934 #: ../../src/Translations/StoreTranslations.php:464 2907 2935 msgid "Payment Approved" 2908 2936 msgstr "" 2909 2937 2910 #: ../../src/Translations/StoreTranslations.php:4 582938 #: ../../src/Translations/StoreTranslations.php:465 2911 2939 msgid "Your payment with PIX has been successfully approved." 2912 2940 msgstr "" 2913 2941 2914 #: ../../src/Translations/StoreTranslations.php:47 02942 #: ../../src/Translations/StoreTranslations.php:477 2915 2943 msgid "Yape in Test Mode" 2916 2944 msgstr "" 2917 2945 2918 #: ../../src/Translations/StoreTranslations.php:4 742946 #: ../../src/Translations/StoreTranslations.php:481 2919 2947 msgid "Cell phone linked to Yape" 2920 2948 msgstr "" 2921 2949 2922 #: ../../src/Translations/StoreTranslations.php:4 762950 #: ../../src/Translations/StoreTranslations.php:483 2923 2951 msgid "Verify in Yape that the option \"Compra por internet\" is activated and that the daily limit is enough." 2924 2952 msgstr "" 2925 2953 2926 #: ../../src/Translations/StoreTranslations.php:4 772954 #: ../../src/Translations/StoreTranslations.php:484 2927 2955 msgid "Pay with Yape in a few minutes" 2928 2956 msgstr "" 2929 2957 2930 #: ../../src/Translations/StoreTranslations.php:4 782958 #: ../../src/Translations/StoreTranslations.php:485 2931 2959 msgid "Fill out the following details and confirm your purchase." 2932 2960 msgstr "" 2933 2961 2934 #: ../../src/Translations/StoreTranslations.php:4 792962 #: ../../src/Translations/StoreTranslations.php:486 2935 2963 msgid "Approval code" 2936 2964 msgstr "" 2937 2965 2938 #: ../../src/Translations/StoreTranslations.php:48 02966 #: ../../src/Translations/StoreTranslations.php:487 2939 2967 msgid "Processed by Mercado Pago" 2940 2968 msgstr "" 2941 2969 2942 #: ../../src/Translations/StoreTranslations.php:48 12970 #: ../../src/Translations/StoreTranslations.php:488 2943 2971 msgid "The code is available in the Yape app menu." 2944 2972 msgstr "" 2945 2973 2946 #: ../../src/Translations/StoreTranslations.php:48 2, ../../src/Translations/StoreTranslations.php:4842974 #: ../../src/Translations/StoreTranslations.php:489, ../../src/Translations/StoreTranslations.php:491 2947 2975 msgid "Enter the entire number." 2948 2976 msgstr "" 2949 2977 2950 #: ../../src/Translations/StoreTranslations.php: 4972978 #: ../../src/Translations/StoreTranslations.php:504 2951 2979 msgid "Payment approved." 2952 2980 msgstr "" 2953 2981 2954 #: ../../src/Translations/StoreTranslations.php: 4982982 #: ../../src/Translations/StoreTranslations.php:505 2955 2983 msgid "Waiting for the Pix payment." 2956 2984 msgstr "" 2957 2985 2958 #: ../../src/Translations/StoreTranslations.php: 4992986 #: ../../src/Translations/StoreTranslations.php:506 2959 2987 msgid "Waiting for the ticket payment." 2960 2988 msgstr "" 2961 2989 2962 #: ../../src/Translations/StoreTranslations.php:50 02990 #: ../../src/Translations/StoreTranslations.php:507 2963 2991 msgid "The customer has not made the payment yet." 2964 2992 msgstr "" 2965 2993 2966 #: ../../src/Translations/StoreTranslations.php:50 12994 #: ../../src/Translations/StoreTranslations.php:508 2967 2995 msgid "Payment is pending review." 2968 2996 msgstr "" 2969 2997 2970 #: ../../src/Translations/StoreTranslations.php:50 22998 #: ../../src/Translations/StoreTranslations.php:509 2971 2999 msgid "Payment was declined. The customer can try again." 2972 3000 msgstr "" 2973 3001 2974 #: ../../src/Translations/StoreTranslations.php:5 033002 #: ../../src/Translations/StoreTranslations.php:510 2975 3003 msgid "Payment was returned to the customer." 2976 3004 msgstr "" 2977 3005 2978 #: ../../src/Translations/StoreTranslations.php:5 043006 #: ../../src/Translations/StoreTranslations.php:511 2979 3007 msgid "The payment was partially returned to the customer. the amount refunded was : " 2980 3008 msgstr "" 2981 3009 2982 #: ../../src/Translations/StoreTranslations.php:5 053010 #: ../../src/Translations/StoreTranslations.php:512 2983 3011 msgid "Payment was canceled." 2984 3012 msgstr "" 2985 3013 2986 #: ../../src/Translations/StoreTranslations.php:5 06, ../../src/Translations/StoreTranslations.php:5073014 #: ../../src/Translations/StoreTranslations.php:513, ../../src/Translations/StoreTranslations.php:514 2987 3015 msgid "The payment is in mediation or the purchase was unknown by the customer." 2988 3016 msgstr "" 2989 3017 2990 #: ../../src/Translations/StoreTranslations.php:5 083018 #: ../../src/Translations/StoreTranslations.php:515 2991 3019 msgid "The payment" 2992 3020 msgstr "" 2993 3021 2994 #: ../../src/Translations/StoreTranslations.php:5 093022 #: ../../src/Translations/StoreTranslations.php:516 2995 3023 msgid "was notified by Mercado Pago with status" 2996 3024 msgstr "" 2997 3025 2998 #: ../../src/Translations/StoreTranslations.php:52 13026 #: ../../src/Translations/StoreTranslations.php:528 2999 3027 msgid "Offline Methods in Test Mode" 3000 3028 msgstr "" 3001 3029 3002 #: ../../src/Translations/StoreTranslations.php:52 23030 #: ../../src/Translations/StoreTranslations.php:529 3003 3031 msgid "You can test the flow to generate an invoice, but you cannot finalize the payment." 3004 3032 msgstr "" 3005 3033 3006 #: ../../src/Translations/StoreTranslations.php:5 25, ../../src/Translations/StoreTranslations.php:544, ../../src/Translations/StoreTranslations.php:552, ../../src/Translations/StoreTranslations.php:556, ../../src/Translations/StoreTranslations.php:560, ../../src/Translations/StoreTranslations.php:567, ../../src/Translations/StoreTranslations.php:5853034 #: ../../src/Translations/StoreTranslations.php:532, ../../src/Translations/StoreTranslations.php:551, ../../src/Translations/StoreTranslations.php:559, ../../src/Translations/StoreTranslations.php:563, ../../src/Translations/StoreTranslations.php:567, ../../src/Translations/StoreTranslations.php:574, ../../src/Translations/StoreTranslations.php:592 3007 3035 msgid "Please complete this field." 3008 3036 msgstr "" 3009 3037 3010 #: ../../src/Translations/StoreTranslations.php:5 26, ../../src/Translations/StoreTranslations.php:5863038 #: ../../src/Translations/StoreTranslations.php:533, ../../src/Translations/StoreTranslations.php:593 3011 3039 msgid "Please enter the full ID number." 3012 3040 msgstr "" 3013 3041 3014 #: ../../src/Translations/StoreTranslations.php:5 27, ../../src/Translations/StoreTranslations.php:5873042 #: ../../src/Translations/StoreTranslations.php:534, ../../src/Translations/StoreTranslations.php:594 3015 3043 msgid "Please enter a valid ID." 3016 3044 msgstr "" 3017 3045 3018 #: ../../src/Translations/StoreTranslations.php:5 283046 #: ../../src/Translations/StoreTranslations.php:535 3019 3047 msgid "Select your payment method" 3020 3048 msgstr "" 3021 3049 3022 #: ../../src/Translations/StoreTranslations.php:5 29, ../../src/Translations/StoreTranslations.php:5893050 #: ../../src/Translations/StoreTranslations.php:536, ../../src/Translations/StoreTranslations.php:596 3023 3051 msgid "more options" 3024 3052 msgstr "" 3025 3053 3026 #: ../../src/Translations/StoreTranslations.php:53 03054 #: ../../src/Translations/StoreTranslations.php:537 3027 3055 msgid "Select a payment method." 3028 3056 msgstr "" 3029 3057 3030 #: ../../src/Translations/StoreTranslations.php:5 333058 #: ../../src/Translations/StoreTranslations.php:540 3031 3059 msgid "Great, we processed your purchase order. Complete the payment with ticket so that we finish approving it." 3032 3060 msgstr "" 3033 3061 3034 #: ../../src/Translations/StoreTranslations.php:5 343062 #: ../../src/Translations/StoreTranslations.php:541 3035 3063 msgid "Print ticket" 3036 3064 msgstr "" 3037 3065 3038 #: ../../src/Translations/StoreTranslations.php:5 353066 #: ../../src/Translations/StoreTranslations.php:542 3039 3067 msgid " and " 3040 3068 msgstr "" 3041 3069 3042 #: ../../src/Translations/StoreTranslations.php:5 363070 #: ../../src/Translations/StoreTranslations.php:543 3043 3071 msgid "To print the ticket again click" 3044 3072 msgstr "" 3045 3073 3046 #: ../../src/Translations/StoreTranslations.php:5 373074 #: ../../src/Translations/StoreTranslations.php:544 3047 3075 msgid "here" 3048 3076 msgstr "" 3049 3077 3050 #: ../../src/Translations/StoreTranslations.php:54 03078 #: ../../src/Translations/StoreTranslations.php:547 3051 3079 msgid "Enter payment details" 3052 3080 msgstr "" 3053 3081 3054 #: ../../src/Translations/StoreTranslations.php:54 13082 #: ../../src/Translations/StoreTranslations.php:548 3055 3083 msgid "Use delivery details." 3056 3084 msgstr "" 3057 3085 3058 #: ../../src/Translations/StoreTranslations.php:54 23086 #: ../../src/Translations/StoreTranslations.php:549 3059 3087 msgid "ZIP code" 3060 3088 msgstr "" 3061 3089 3062 #: ../../src/Translations/StoreTranslations.php:5 433090 #: ../../src/Translations/StoreTranslations.php:550 3063 3091 msgid "E.g.: 01310-200" 3064 3092 msgstr "" 3065 3093 3066 #: ../../src/Translations/StoreTranslations.php:5 453094 #: ../../src/Translations/StoreTranslations.php:552 3067 3095 msgid "Please enter the full ZIP code." 3068 3096 msgstr "" 3069 3097 3070 #: ../../src/Translations/StoreTranslations.php:5 463098 #: ../../src/Translations/StoreTranslations.php:553 3071 3099 msgid "Please enter a valid ZIP code." 3072 3100 msgstr "" 3073 3101 3074 #: ../../src/Translations/StoreTranslations.php:5 473102 #: ../../src/Translations/StoreTranslations.php:554 3075 3103 msgid "State" 3076 3104 msgstr "" 3077 3105 3078 #: ../../src/Translations/StoreTranslations.php:5 483106 #: ../../src/Translations/StoreTranslations.php:555 3079 3107 msgid "Select a state" 3080 3108 msgstr "" 3081 3109 3082 #: ../../src/Translations/StoreTranslations.php:5 493110 #: ../../src/Translations/StoreTranslations.php:556 3083 3111 msgid "Please select an option." 3084 3112 msgstr "" 3085 3113 3086 #: ../../src/Translations/StoreTranslations.php:55 03114 #: ../../src/Translations/StoreTranslations.php:557 3087 3115 msgid "City" 3088 3116 msgstr "" 3089 3117 3090 #: ../../src/Translations/StoreTranslations.php:55 13118 #: ../../src/Translations/StoreTranslations.php:558 3091 3119 msgid "E.g.: São Paulo" 3092 3120 msgstr "" 3093 3121 3094 #: ../../src/Translations/StoreTranslations.php:5 533122 #: ../../src/Translations/StoreTranslations.php:560 3095 3123 msgid "Please enter the full name of the city." 3096 3124 msgstr "" 3097 3125 3098 #: ../../src/Translations/StoreTranslations.php:5 543126 #: ../../src/Translations/StoreTranslations.php:561 3099 3127 msgid "Neighborhood" 3100 3128 msgstr "" 3101 3129 3102 #: ../../src/Translations/StoreTranslations.php:5 553130 #: ../../src/Translations/StoreTranslations.php:562 3103 3131 msgid "E.g.: Jardim das flores" 3104 3132 msgstr "" 3105 3133 3106 #: ../../src/Translations/StoreTranslations.php:5 573134 #: ../../src/Translations/StoreTranslations.php:564 3107 3135 msgid "Please enter the full neighborhood name." 3108 3136 msgstr "" 3109 3137 3110 #: ../../src/Translations/StoreTranslations.php:5 583138 #: ../../src/Translations/StoreTranslations.php:565 3111 3139 msgid "Address" 3112 3140 msgstr "" 3113 3141 3114 #: ../../src/Translations/StoreTranslations.php:5 593142 #: ../../src/Translations/StoreTranslations.php:566 3115 3143 msgid "E.g.: Avenida das Flores" 3116 3144 msgstr "" 3117 3145 3118 #: ../../src/Translations/StoreTranslations.php:56 13146 #: ../../src/Translations/StoreTranslations.php:568 3119 3147 msgid "Please enter the full address." 3120 3148 msgstr "" 3121 3149 3122 #: ../../src/Translations/StoreTranslations.php:56 23150 #: ../../src/Translations/StoreTranslations.php:569 3123 3151 msgid "Complement (optional)" 3124 3152 msgstr "" 3125 3153 3126 #: ../../src/Translations/StoreTranslations.php:5 633154 #: ../../src/Translations/StoreTranslations.php:570 3127 3155 msgid "E.g.: Apartament 52 block C" 3128 3156 msgstr "" 3129 3157 3130 #: ../../src/Translations/StoreTranslations.php:5 643158 #: ../../src/Translations/StoreTranslations.php:571 3131 3159 msgid "Number" 3132 3160 msgstr "" 3133 3161 3134 #: ../../src/Translations/StoreTranslations.php:5 653162 #: ../../src/Translations/StoreTranslations.php:572 3135 3163 msgid "E.g.: 148" 3136 3164 msgstr "" 3137 3165 3138 #: ../../src/Translations/StoreTranslations.php:5 663166 #: ../../src/Translations/StoreTranslations.php:573 3139 3167 msgid "No number" 3140 3168 msgstr "" 3141 3169 3142 #: ../../src/Translations/StoreTranslations.php:5 683170 #: ../../src/Translations/StoreTranslations.php:575 3143 3171 msgid "Please enter a valid number." 3144 3172 msgstr "" 3145 3173 3146 #: ../../src/Translations/StoreTranslations.php:58 13174 #: ../../src/Translations/StoreTranslations.php:588 3147 3175 msgid "Checkout PSE in Test Mode" 3148 3176 msgstr "" 3149 3177 3150 #: ../../src/Translations/StoreTranslations.php:58 23178 #: ../../src/Translations/StoreTranslations.php:589 3151 3179 msgid "You can test the flow to generate a payment with PSE" 3152 3180 msgstr "" 3153 3181 3154 #: ../../src/Translations/StoreTranslations.php:5 883182 #: ../../src/Translations/StoreTranslations.php:595 3155 3183 msgid "Select where you want to pay" 3156 3184 msgstr "" 3157 3185 3158 #: ../../src/Translations/StoreTranslations.php:59 03186 #: ../../src/Translations/StoreTranslations.php:597 3159 3187 msgid "Person type " 3160 3188 msgstr "" 3161 3189 3162 #: ../../src/Translations/StoreTranslations.php:59 13190 #: ../../src/Translations/StoreTranslations.php:598 3163 3191 msgid "Financial institution" 3164 3192 msgstr "" 3165 3193 3166 #: ../../src/Translations/StoreTranslations.php:59 23194 #: ../../src/Translations/StoreTranslations.php:599 3167 3195 msgid "Select the financial institution" 3168 3196 msgstr "" 3169 3197 3170 #: ../../src/Translations/StoreTranslations.php: 5933198 #: ../../src/Translations/StoreTranslations.php:600 3171 3199 msgid "Select the institution" 3172 3200 msgstr "" 3173 3201 3174 #: ../../src/Translations/StoreTranslations.php:61 03202 #: ../../src/Translations/StoreTranslations.php:617 3175 3203 msgid "A problem was occurred when processing your payment. Please, try again." 3176 3204 msgstr "" 3177 3205 3178 #: ../../src/Translations/StoreTranslations.php:61 13206 #: ../../src/Translations/StoreTranslations.php:618 3179 3207 msgid "<strong>Your payment was declined because something went wrong</strong><br>Please make sure all the information was entered correctly." 3180 3208 msgstr "" 3181 3209 3182 #: ../../src/Translations/StoreTranslations.php:61 23210 #: ../../src/Translations/StoreTranslations.php:619 3183 3211 msgid "This payment method is temporarily unavailable. Please choose another option or contact the store." 3184 3212 msgstr "" 3185 3213 3186 #: ../../src/Translations/StoreTranslations.php:6 133214 #: ../../src/Translations/StoreTranslations.php:620 3187 3215 msgid "See your order form" 3188 3216 msgstr "" 3189 3217 3190 #: ../../src/Translations/StoreTranslations.php:6 143218 #: ../../src/Translations/StoreTranslations.php:621 3191 3219 msgid "Your payment was declined. You can try again." 3192 3220 msgstr "" 3193 3221 3194 #: ../../src/Translations/StoreTranslations.php:6 153222 #: ../../src/Translations/StoreTranslations.php:622 3195 3223 msgid "Click to try again" 3196 3224 msgstr "" 3197 3225 3198 #: ../../src/Translations/StoreTranslations.php:6 163226 #: ../../src/Translations/StoreTranslations.php:623 3199 3227 msgid "That's it, payment accepted!" 3200 3228 msgstr "" 3201 3229 3202 #: ../../src/Translations/StoreTranslations.php:6 173230 #: ../../src/Translations/StoreTranslations.php:624 3203 3231 msgid "We are processing your payment. In less than an hour we will send you the result by email." 3204 3232 msgstr "" 3205 3233 3206 #: ../../src/Translations/StoreTranslations.php:6 183234 #: ../../src/Translations/StoreTranslations.php:625 3207 3235 msgid "We are processing your payment. In less than 2 days we will send you by email if the payment has been approved or if additional information is needed." 3208 3236 msgstr "" 3209 3237 3210 #: ../../src/Translations/StoreTranslations.php:6 193238 #: ../../src/Translations/StoreTranslations.php:626 3211 3239 msgid "Check the card number." 3212 3240 msgstr "" 3213 3241 3214 #: ../../src/Translations/StoreTranslations.php:62 03242 #: ../../src/Translations/StoreTranslations.php:627 3215 3243 msgid "Check the expiration date." 3216 3244 msgstr "" 3217 3245 3218 #: ../../src/Translations/StoreTranslations.php:62 13246 #: ../../src/Translations/StoreTranslations.php:628 3219 3247 msgid "Check the information provided." 3220 3248 msgstr "" 3221 3249 3222 #: ../../src/Translations/StoreTranslations.php:62 23250 #: ../../src/Translations/StoreTranslations.php:629 3223 3251 msgid "Check the informed security code." 3224 3252 msgstr "" 3225 3253 3226 #: ../../src/Translations/StoreTranslations.php:6 23, ../../src/Translations/StoreTranslations.php:6243254 #: ../../src/Translations/StoreTranslations.php:630, ../../src/Translations/StoreTranslations.php:631 3227 3255 msgid "Your payment cannot be processed." 3228 3256 msgstr "" 3229 3257 3230 #: ../../src/Translations/StoreTranslations.php:6 253258 #: ../../src/Translations/StoreTranslations.php:632 3231 3259 msgid "You must authorize payments for your orders." 3232 3260 msgstr "" 3233 3261 3234 #: ../../src/Translations/StoreTranslations.php:6 263262 #: ../../src/Translations/StoreTranslations.php:633 3235 3263 msgid "Contact your card issuer to activate it. The phone is on the back of your card." 3236 3264 msgstr "" 3237 3265 3238 #: ../../src/Translations/StoreTranslations.php:6 273266 #: ../../src/Translations/StoreTranslations.php:634 3239 3267 msgid "You have already made a payment of this amount. If you have to pay again, use another card or other method of payment." 3240 3268 msgstr "" 3241 3269 3242 #: ../../src/Translations/StoreTranslations.php:6 283270 #: ../../src/Translations/StoreTranslations.php:635 3243 3271 msgid "Your payment was declined. Please select another payment method. It is recommended in cash." 3244 3272 msgstr "" 3245 3273 3246 #: ../../src/Translations/StoreTranslations.php:6 293274 #: ../../src/Translations/StoreTranslations.php:636 3247 3275 msgid "Your payment does not have sufficient funds." 3248 3276 msgstr "" 3249 3277 3250 #: ../../src/Translations/StoreTranslations.php:63 03278 #: ../../src/Translations/StoreTranslations.php:637 3251 3279 msgid "Payment cannot process the selected fee." 3252 3280 msgstr "" 3253 3281 3254 #: ../../src/Translations/StoreTranslations.php:63 13282 #: ../../src/Translations/StoreTranslations.php:638 3255 3283 msgid "You have reached the limit of allowed attempts. Choose another card or other payment method." 3256 3284 msgstr "" 3257 3285 3258 #: ../../src/Translations/StoreTranslations.php:63 23286 #: ../../src/Translations/StoreTranslations.php:639 3259 3287 msgid "This payment method cannot process your payment." 3260 3288 msgstr "" 3261 3289 3262 #: ../../src/Translations/StoreTranslations.php:6 44, ../../src/Translations/StoreTranslations.php:7143290 #: ../../src/Translations/StoreTranslations.php:651, ../../src/Translations/StoreTranslations.php:721 3263 3291 msgid "<strong>Your bank needs you to authorize the payment</strong><br>Please call the telephone number on your card or pay with another method." 3264 3292 msgstr "" 3265 3293 3266 #: ../../src/Translations/StoreTranslations.php:6 45, ../../src/Translations/StoreTranslations.php:6463294 #: ../../src/Translations/StoreTranslations.php:652, ../../src/Translations/StoreTranslations.php:653 3267 3295 msgid "<strong>For safety reasons, your payment was declined</strong><br>We recommended paying with your usual payment method and device for online purchases." 3268 3296 msgstr "" 3269 3297 3270 #: ../../src/Translations/StoreTranslations.php:6 47, ../../src/Translations/StoreTranslations.php:648, ../../src/Translations/StoreTranslations.php:649, ../../src/Translations/StoreTranslations.php:6503298 #: ../../src/Translations/StoreTranslations.php:654, ../../src/Translations/StoreTranslations.php:655, ../../src/Translations/StoreTranslations.php:656, ../../src/Translations/StoreTranslations.php:657 3271 3299 msgid "<strong>One or more card details were entered incorrectly</strong><br>Please enter them again as they appear on the card to complete the payment." 3272 3300 msgstr "" 3273 3301 3274 #: ../../src/Translations/StoreTranslations.php:65 13302 #: ../../src/Translations/StoreTranslations.php:658 3275 3303 msgid "<strong>Your credit card has no available limit</strong><br>Please pay using another card or choose another payment method." 3276 3304 msgstr "" 3277 3305 3278 #: ../../src/Translations/StoreTranslations.php:65 23306 #: ../../src/Translations/StoreTranslations.php:659 3279 3307 msgid "<strong>Your debit card has insufficient funds</strong><br>Please pay using another card or choose another payment method." 3280 3308 msgstr "" 3281 3309 3282 #: ../../src/Translations/StoreTranslations.php:6 53, ../../src/Translations/StoreTranslations.php:6913310 #: ../../src/Translations/StoreTranslations.php:660, ../../src/Translations/StoreTranslations.php:698 3283 3311 msgid "<strong>Your card does not accept the number of installments selected</strong><br>Please choose a different number of installments or use a different payment method." 3284 3312 msgstr "" 3285 3313 3286 #: ../../src/Translations/StoreTranslations.php:6 543314 #: ../../src/Translations/StoreTranslations.php:661 3287 3315 msgid "<strong>You need to activate your card</strong><br>Please contact your bank by calling the number on the back of your card or choose another payment method." 3288 3316 msgstr "" 3289 3317 3290 #: ../../src/Translations/StoreTranslations.php:6 553318 #: ../../src/Translations/StoreTranslations.php:662 3291 3319 msgid "<strong>You reached the limit of payment attempts with this card</strong><br>Please pay using another card or choose another payment method." 3292 3320 msgstr "" 3293 3321 3294 #: ../../src/Translations/StoreTranslations.php:6 563322 #: ../../src/Translations/StoreTranslations.php:663 3295 3323 msgid "<strong>Your payment was declined because you already paid for this purchase</strong><br>Check your card transactions to verify it." 3296 3324 msgstr "" 3297 3325 3298 #: ../../src/Translations/StoreTranslations.php:6 57, ../../src/Translations/StoreTranslations.php:658, ../../src/Translations/StoreTranslations.php:6593326 #: ../../src/Translations/StoreTranslations.php:664, ../../src/Translations/StoreTranslations.php:665, ../../src/Translations/StoreTranslations.php:666 3299 3327 msgid "<strong>The card issuing bank declined the payment</strong><br>We recommended paying with another payment method or contact your bank." 3300 3328 msgstr "" 3301 3329 3302 #: ../../src/Translations/StoreTranslations.php:66 03330 #: ../../src/Translations/StoreTranslations.php:667 3303 3331 msgid "<strong>For safety reasons, the card issuing bank declined the payment</strong><br>We recommended paying with your usual payment method and device for online purchases." 3304 3332 msgstr "" 3305 3333 3306 #: ../../src/Translations/StoreTranslations.php:66 13334 #: ../../src/Translations/StoreTranslations.php:668 3307 3335 msgid "<strong>Your payment was declined because something went wrong</strong><br>We recommended trying again or paying with another method." 3308 3336 msgstr "" 3309 3337 3310 #: ../../src/Translations/StoreTranslations.php:66 23338 #: ../../src/Translations/StoreTranslations.php:669 3311 3339 msgid "<strong>Yape declined your payment</strong><br>Your payment could not be processed. Please try again or choose another payment method." 3312 3340 msgstr "" 3313 3341 3314 #: ../../src/Translations/StoreTranslations.php:6 633342 #: ../../src/Translations/StoreTranslations.php:670 3315 3343 msgid "<strong>Yape declined your payment</strong><br>Your payment could not be processed. You can contact Yape to find out why or try again with this or another payment method." 3316 3344 msgstr "" 3317 3345 3318 #: ../../src/Translations/StoreTranslations.php:6 643346 #: ../../src/Translations/StoreTranslations.php:671 3319 3347 msgid "<strong>Yape declined your payment</strong><br>Your payment was rejected because something went wrong. We recommend trying again or paying with another method." 3320 3348 msgstr "" 3321 3349 3322 #: ../../src/Translations/StoreTranslations.php:6 653350 #: ../../src/Translations/StoreTranslations.php:672 3323 3351 msgid "<strong>Yape declined your payment</strong><br>This payment exceeds your daily limit for online purchases with Yape. We recommend paying with another method or trying again tomorrow." 3324 3352 msgstr "" 3325 3353 3326 #: ../../src/Translations/StoreTranslations.php:6 663354 #: ../../src/Translations/StoreTranslations.php:673 3327 3355 msgid "<strong>Yape declined your payment</strong><br>After three incorrect approval codes, the payment can't be done with Yape for your safety. Pay with another method or try again in 24 hours." 3328 3356 msgstr "" 3329 3357 3330 #: ../../src/Translations/StoreTranslations.php:6 783358 #: ../../src/Translations/StoreTranslations.php:685 3331 3359 msgid "<strong>Choose the number of installments to complete the payment</strong>" 3332 3360 msgstr "" 3333 3361 3334 #: ../../src/Translations/StoreTranslations.php:6 793362 #: ../../src/Translations/StoreTranslations.php:686 3335 3363 msgid "<strong>One or more of the buyer details were entered incorrectly</strong><br>Please check the identification number and try again." 3336 3364 msgstr "" 3337 3365 3338 #: ../../src/Translations/StoreTranslations.php:68 0, ../../src/Translations/StoreTranslations.php:7193366 #: ../../src/Translations/StoreTranslations.php:687, ../../src/Translations/StoreTranslations.php:726 3339 3367 msgid "<strong>One or more card details were entered incorrectly</strong><br>Please enter them again exactly as they appear on the card to complete the payment." 3340 3368 msgstr "" 3341 3369 3342 #: ../../src/Translations/StoreTranslations.php:68 1, ../../src/Translations/StoreTranslations.php:7083370 #: ../../src/Translations/StoreTranslations.php:688, ../../src/Translations/StoreTranslations.php:715 3343 3371 msgid "<strong>For safety reasons, the card issuing bank declined the payment</strong><br>We recommend paying with your usual payment method and device for online purchases." 3344 3372 msgstr "" 3345 3373 3346 #: ../../src/Translations/StoreTranslations.php:68 23374 #: ../../src/Translations/StoreTranslations.php:689 3347 3375 msgid "<strong>The amount to be paid is outside the allowed limit for this payment method</strong><br>Enter an amount within the limits or use another payment method." 3348 3376 msgstr "" 3349 3377 3350 #: ../../src/Translations/StoreTranslations.php:6 833378 #: ../../src/Translations/StoreTranslations.php:690 3351 3379 msgid "<strong>The discount code is not valid</strong><br>Check the code you entered and try again." 3352 3380 msgstr "" 3353 3381 3354 #: ../../src/Translations/StoreTranslations.php:6 843382 #: ../../src/Translations/StoreTranslations.php:691 3355 3383 msgid "<strong>The discount amount must be a number</strong><br>Enter a valid value to continue." 3356 3384 msgstr "" 3357 3385 3358 #: ../../src/Translations/StoreTranslations.php:6 853386 #: ../../src/Translations/StoreTranslations.php:692 3359 3387 msgid "<strong>Credentials don’t match the environment</strong><br>Enter the correct test or production keys to complete the payment." 3360 3388 msgstr "" 3361 3389 3362 #: ../../src/Translations/StoreTranslations.php:6 863390 #: ../../src/Translations/StoreTranslations.php:693 3363 3391 msgid "<strong>The e-mail is incorrect</strong><br>Make sure to enter it correctly to complete the payment." 3364 3392 msgstr "" 3365 3393 3366 #: ../../src/Translations/StoreTranslations.php:6 873394 #: ../../src/Translations/StoreTranslations.php:694 3367 3395 msgid "<strong>The e-mail isn't valid for payment</strong><br>Enter another e-mail to complete the payment." 3368 3396 msgstr "" 3369 3397 3370 #: ../../src/Translations/StoreTranslations.php:6 88, ../../src/Translations/StoreTranslations.php:7163398 #: ../../src/Translations/StoreTranslations.php:695, ../../src/Translations/StoreTranslations.php:723 3371 3399 msgid "<strong>The payment method you selected is not available</strong><br>Choose another method to complete your purchase." 3372 3400 msgstr "" 3373 3401 3374 #: ../../src/Translations/StoreTranslations.php:6 89, ../../src/Translations/StoreTranslations.php:703, ../../src/Translations/StoreTranslations.php:7043402 #: ../../src/Translations/StoreTranslations.php:696, ../../src/Translations/StoreTranslations.php:710, ../../src/Translations/StoreTranslations.php:711 3375 3403 msgid "<strong>Your payment was declined because something went wrong</strong><br>We recommend trying again or paying with another method." 3376 3404 msgstr "" 3377 3405 3378 #: ../../src/Translations/StoreTranslations.php:69 0, ../../src/Translations/StoreTranslations.php:7053406 #: ../../src/Translations/StoreTranslations.php:697, ../../src/Translations/StoreTranslations.php:712 3379 3407 msgid "<strong>Your payment was declined by the store</strong><br>Try another payment method or contact the seller." 3380 3408 msgstr "" 3381 3409 3382 #: ../../src/Translations/StoreTranslations.php:7 063410 #: ../../src/Translations/StoreTranslations.php:713 3383 3411 msgid "<strong>Your payment was declined because you already paid for this purchase</strong><br>Please check your card transactions to verify it." 3384 3412 msgstr "" 3385 3413 3386 #: ../../src/Translations/StoreTranslations.php:7 073414 #: ../../src/Translations/StoreTranslations.php:714 3387 3415 msgid "<strong>For safety reasons, your payment was declined</strong><br>We recommend paying with your usual payment method and device for online purchases." 3388 3416 msgstr "" 3389 3417 3390 #: ../../src/Translations/StoreTranslations.php:7 093418 #: ../../src/Translations/StoreTranslations.php:716 3391 3419 msgid "<strong>For safety reasons, your payment was declined</strong><br>We recommend paying with your usual payment method and device for online purchases. " 3392 3420 msgstr "" 3393 3421 3394 #: ../../src/Translations/StoreTranslations.php:71 03422 #: ../../src/Translations/StoreTranslations.php:717 3395 3423 msgid "<strong>It was not possible to complete the payment</strong><br>Please use another method to complete the purchase." 3396 3424 msgstr "" 3397 3425 3398 #: ../../src/Translations/StoreTranslations.php:71 13426 #: ../../src/Translations/StoreTranslations.php:718 3399 3427 msgid "<strong>Your credit card has no available limit</strong><br>Choose another payment method." 3400 3428 msgstr "" 3401 3429 3402 #: ../../src/Translations/StoreTranslations.php:71 23430 #: ../../src/Translations/StoreTranslations.php:719 3403 3431 msgid "<strong>You have to activate your card</strong><br>Please contact your bank by calling the number on the back of your card or choose another payment method." 3404 3432 msgstr "" 3405 3433 3406 #: ../../src/Translations/StoreTranslations.php:7 133434 #: ../../src/Translations/StoreTranslations.php:720 3407 3435 msgid "<strong>You reached the limit of payment attempts with this card</strong><br>Please pay with another card or choose another payment method." 3408 3436 msgstr "" 3409 3437 3410 #: ../../src/Translations/StoreTranslations.php:7 153438 #: ../../src/Translations/StoreTranslations.php:722 3411 3439 msgid "<strong>The card issuing bank declined the payment</strong><br>We recommend using another payment method or contacting your bank." 3412 3440 msgstr "" 3413 3441 3414 #: ../../src/Translations/StoreTranslations.php:7 173442 #: ../../src/Translations/StoreTranslations.php:724 3415 3443 msgid "<strong>The test e-mail you entered is not valid</strong><br>Enter a valid email to complete the payment." 3416 3444 msgstr "" 3417 3445 3418 #: ../../src/Translations/StoreTranslations.php:7 183446 #: ../../src/Translations/StoreTranslations.php:725 3419 3447 msgid "<strong>The email you entered is not valid</strong><br>Enter a valid email to complete the payment." 3420 3448 msgstr "" 3421 3449 3422 #: ../../src/Translations/StoreTranslations.php:7 343450 #: ../../src/Translations/StoreTranslations.php:741 3423 3451 msgid "<strong>It wasn't possible to validate the payment</strong><br>Try again in a moment. If the issue persists, please contact the seller for next steps." 3424 3452 msgstr "" 3425 3453 3426 #: ../../src/Translations/StoreTranslations.php:7 353454 #: ../../src/Translations/StoreTranslations.php:742 3427 3455 msgid "<strong>Your payment was declined due to an error</strong><br>Please try again or use a different payment method." 3428 3456 msgstr "" 3429 3457 3430 #: ../../src/Translations/StoreTranslations.php:7 363458 #: ../../src/Translations/StoreTranslations.php:743 3431 3459 msgid "<strong>This payment method isn't available</strong><br>Please use a different payment method to complete your purchase." 3432 3460 msgstr "" 3433 3461 3434 #: ../../src/Translations/StoreTranslations.php:7 373462 #: ../../src/Translations/StoreTranslations.php:744 3435 3463 msgid "<strong>Something went wrong while processing your payment</strong><br>Check if the charge appears on your card. If not, please try again or use a different payment method." 3436 3464 msgstr "" 3437 3465 3438 #: ../../src/Translations/StoreTranslations.php:7 383466 #: ../../src/Translations/StoreTranslations.php:745 3439 3467 msgid "<strong>It wasn't possible to validate your card</strong><br>Check if you have available credit or use a different payment method." 3440 3468 msgstr "" 3441 3469 3442 #: ../../src/Translations/StoreTranslations.php:7 39, ../../src/Translations/StoreTranslations.php:7403470 #: ../../src/Translations/StoreTranslations.php:746, ../../src/Translations/StoreTranslations.php:747 3443 3471 msgid "<strong>For security reasons, your payment was declined</strong><br>We recommend using your usual payment method and device for online purchases." 3444 3472 msgstr "" 3445 3473 3446 #: ../../src/Translations/StoreTranslations.php:74 13474 #: ../../src/Translations/StoreTranslations.php:748 3447 3475 msgid "<strong>The purchase amount exceeds the limit for this payment method</strong><br>Please use a different payment method to complete your purchase." 3448 3476 msgstr "" 3449 3477 3450 #: ../../src/Translations/StoreTranslations.php:74 23478 #: ../../src/Translations/StoreTranslations.php:749 3451 3479 msgid "<strong>Some card details are incorrect</strong><br>Please review the information entered to complete the payment." 3452 3480 msgstr "" 3453 3481 3454 #: ../../src/Translations/StoreTranslations.php:7 553482 #: ../../src/Translations/StoreTranslations.php:762 3455 3483 msgid "<strong>Your payment session has expired</strong><br>Please try again to complete your purchase." 3456 3484 msgstr "" 3457 3485 3458 #: ../../src/Translations/StoreTranslations.php:77 03486 #: ../../src/Translations/StoreTranslations.php:777 3459 3487 msgid "We could not activate your subscription. Please try again." 3460 3488 msgstr "" 3461 3489 3462 #: ../../src/Translations/StoreTranslations.php:77 13490 #: ../../src/Translations/StoreTranslations.php:778 3463 3491 msgid "Recurring payments credential is not configured. Please contact the store." 3464 3492 msgstr "" 3465 3493 3466 #: ../../src/Translations/StoreTranslations.php:77 23494 #: ../../src/Translations/StoreTranslations.php:779 3467 3495 msgid "Card data is incomplete. Please review and try again." 3468 3496 msgstr "" 3469 3497 3470 #: ../../src/Translations/StoreTranslations.php:7 733498 #: ../../src/Translations/StoreTranslations.php:780 3471 3499 msgid "Pre-approval access token is not configured." 3472 3500 msgstr "" 3473 3501 3474 #: ../../src/Translations/StoreTranslations.php:7 743502 #: ../../src/Translations/StoreTranslations.php:781 3475 3503 msgid "Card data is incomplete." 3476 3504 msgstr "" 3477 3505 3478 #: ../../src/Translations/StoreTranslations.php:7 843506 #: ../../src/Translations/StoreTranslations.php:791 3479 3507 msgid "We are taking you to validate the card" 3480 3508 msgstr "" 3481 3509 3482 #: ../../src/Translations/StoreTranslations.php:7 853510 #: ../../src/Translations/StoreTranslations.php:792 3483 3511 msgid "with your bank" 3484 3512 msgstr "" 3485 3513 3486 #: ../../src/Translations/StoreTranslations.php:7 863514 #: ../../src/Translations/StoreTranslations.php:793 3487 3515 msgid "We need to confirm that you are the cardholder." 3488 3516 msgstr "" 3489 3517 3490 #: ../../src/Translations/StoreTranslations.php:7 873518 #: ../../src/Translations/StoreTranslations.php:794 3491 3519 msgid "We are receiving the response from your bank" 3492 3520 msgstr "" 3493 3521 3494 #: ../../src/Translations/StoreTranslations.php:7 883522 #: ../../src/Translations/StoreTranslations.php:795 3495 3523 msgid "Complete the bank validation so your payment can be approved" 3496 3524 msgstr "" 3497 3525 3498 #: ../../src/Translations/StoreTranslations.php:7 893526 #: ../../src/Translations/StoreTranslations.php:796 3499 3527 msgid "Please keep this page open. If you close it, you will not be able to resume the validation." 3500 3528 msgstr "" 3501 3529 3502 #: ../../src/Translations/StoreTranslations.php:79 03530 #: ../../src/Translations/StoreTranslations.php:797 3503 3531 msgid "<b>For safety reasons, your payment was declined</b><br>We recommend paying with your usual payment method and device for online purchases." 3504 3532 msgstr "" 3505 3533 3506 #: ../../src/Translations/StoreTranslations.php:8 083534 #: ../../src/Translations/StoreTranslations.php:815 3507 3535 msgid "We could not process this card. Please try again." 3508 3536 msgstr "" 3509 3537 3510 #: ../../src/Translations/StoreTranslations.php:8 093538 #: ../../src/Translations/StoreTranslations.php:816 3511 3539 msgid "Payment was declined by the card issuer." 3512 3540 msgstr "" 3513 3541 3514 #: ../../src/Translations/StoreTranslations.php:81 03542 #: ../../src/Translations/StoreTranslations.php:817 3515 3543 msgid "3D Secure authentication failed. Please try another card." 3516 3544 msgstr "" 3517 3545 3518 #: ../../src/Translations/StoreTranslations.php:81 1, ../../src/Translations/StoreTranslations.php:813, ../../src/Translations/StoreTranslations.php:814, ../../src/Translations/StoreTranslations.php:820, ../../src/Translations/StoreTranslations.php:8293546 #: ../../src/Translations/StoreTranslations.php:818, ../../src/Translations/StoreTranslations.php:820, ../../src/Translations/StoreTranslations.php:821, ../../src/Translations/StoreTranslations.php:827, ../../src/Translations/StoreTranslations.php:836 3519 3547 msgid "A technical error occurred. Please contact support." 3520 3548 msgstr "" 3521 3549 3522 #: ../../src/Translations/StoreTranslations.php:81 23550 #: ../../src/Translations/StoreTranslations.php:819 3523 3551 msgid "The card linked to this subscription has expired. Please update the card." 3524 3552 msgstr "" 3525 3553 3526 #: ../../src/Translations/StoreTranslations.php:8 193554 #: ../../src/Translations/StoreTranslations.php:826 3527 3555 msgid "We could not save the card. Please try again." 3528 3556 msgstr "" 3529 3557 3530 #: ../../src/Translations/StoreTranslations.php:8 233558 #: ../../src/Translations/StoreTranslations.php:830 3531 3559 msgid "We could not complete the operation. Please try another card." 3532 3560 msgstr "" 3533 3561 3534 #: ../../src/Translations/StoreTranslations.php:8 263562 #: ../../src/Translations/StoreTranslations.php:833 3535 3563 msgid "Service temporarily unavailable. Please try again in a moment." 3536 3564 msgstr "" -
woocommerce-mercadopago/trunk/readme.txt
r3663899 r3710292 5 5 Tested up to: 7.0 6 6 Requires PHP: 7.4 7 Stable tag: 8.9. 37 Stable tag: 8.9.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 135 135 Check out our <a href="https://www.mercadopago.com.br/developers/pt/plugins_sdks/plugins/official/woo-commerce/">official documentation</a> for more information on the specific fields to configure. 136 136 137 = v8.9. 3 (24/08/2026) =137 = v8.9.4 (17/09/2026) = 138 138 ### Added 139 - Enable refunds for fast payment orders directly from the WooCommerce order panel — full or partial, like any other payment method 140 - Format the document (ID) field per country in the card, ticket and PSE checkouts, and show the required-field message in real time when it is left empty 139 - Add accessible descriptions to the card checkout fields, including the expected number of digits of the document per country and the expected format of the cardholder name 140 - Add alternative text to the accepted card brand logos and announce the detected brand to screen readers 141 142 ### Changed 143 - Standardize the document type labels shown in the card checkout across all supported countries while preserving the document values, order and selection provided by Mercado Pago 144 - Update the cardholder name helper text in Spanish and Portuguese to match the checkout content guidelines 145 - Change the card checkout fields to be announced by screen readers, including the document, issuer and installments fields 146 - Change the card checkout error messages to be announced by screen readers when a field is left invalid, including why the document was rejected when the purchase is blocked 147 - Change the card checkout helper texts to be announced by screen readers, with error messages announced immediately and supporting texts waiting their turn 148 - Show a keyboard focus indicator on the issuer and installments fields of the card checkout 149 - Announce the required state of the card checkout fields to screen readers 150 - Align the card checkout form with the design specification: add the missing spacing between the installments selector and the bank interest disclaimer along with its typography, keep the expiration date and security code fields aligned when only one of them shows an error, and apply the standard spacing before the installments section in countries that do not display the document field 151 - Standardize the document field placeholder color across the card, PSE and boleto checkouts, so it no longer inherits an inconsistent color from the store theme 152 - Send the store marketplace, contact email and country when starting the onboarding funnel, so stores that install the plugin without finishing the setup can be identified and reached out to 153 - Add diagnostics to help identify Custom Checkout initialization delays caused by slow-loading store scripts 154 - Update the Mercado Pago PHP SDK to 3.7.0 141 155 142 156 ### Fixed 143 - Fix the fast payment checkout freezing on block-based, hybrid and multi-step checkouts when a step before payment fails: the loading overlay is now cleared and an error is shown instead of leaving the spinner stuck 144 - Prevent a checkout error caused by requesting the available payment methods before the store is fully configured 145 - Fix currency conversion not being applied at checkout for stores whose account had been blocked from the previous conversion service, so orders in a different currency now convert correctly again 157 - Allow card tokenization for an initial zero-dollar subscription authorization by keeping the fixed one-installment value without showing or validating an inapplicable installments choice or prematurely validating an untouched holder name 158 - Complete approved zero-dollar subscription authorizations synchronously after validating and persisting the recurring profile, and surface incomplete responses consistently in Classic, Blocks and Order Pay without clearing the buyer's cart or waiting for a payment notification that is not emitted 159 - Show the card retry message when the payment provider reports that the saved card is no longer valid during an initial subscription payment 160 - Fix Custom Checkout initialization in Classic, Blocks and order-pay pages when optimization plugins defer script execution, including the Mercado Pago SDK, or render the checkout form after the Mercado Pago scripts load 161 - Fix the card checkout security code hint stating three digits for card brands that use four 162 - Fix per-payment refunded amount being incorrectly stuck after the first partial refund when multiple partial refunds arrive in separate webhook notifications for the same payment 163 - Keep the fast payment checkout working when a single saved payment method fails to render, so one faulty row no longer blocks the rest of the list 164 - Retry fast payment initialization, a bounded number of times, when the Mercado Pago SDK becomes available late 146 165 147 166 ### Security 148 - Harden fast payment diagnostics so payment credentials are never included in telemetry data167 - Remove authorization headers, session cookies and other credentials from fast payment diagnostics before they are sent 149 168 150 169 [See changelog for all versions](https://github.com/mercadopago/cart-woocommerce/blob/main/CHANGELOG.md). -
woocommerce-mercadopago/trunk/src/Funnel/Funnel.php
r3609381 r3710292 14 14 class Funnel 15 15 { 16 // Generic message reported for the seller-contact step, instead of the real 17 // exception, since the SDK exception can echo the request body (which carries 18 // the seller's email) verbatim — see runWithTreatment(). 19 private const SELLER_CONTACT_ERROR_MESSAGE = 'Error updating seller contact information'; 20 16 21 private Sdk $sdk; 17 22 … … 59 64 $createSellerFunnelBase->platform_version = $this->getWoocommerceVersion(); 60 65 $createSellerFunnelBase->plugin_version = MP_VERSION; 66 $createSellerFunnelBase->site_id = $this->resolveSiteId(); 61 67 $response = $createSellerFunnelBase->save(); 62 68 $this->store->setInstallationId($response->id); … … 73 79 return !empty($this->store->getInstallationId()) 74 80 && !empty($this->store->getInstallationKey()); 81 } 82 83 /** 84 * Send the store's contact email and country so Product can identify sellers 85 * who installed the plugin but never added credentials — this step is chained 86 * from the $after callback of create(), not from updateStepCredentials(), since 87 * that step never runs for that audience. 88 */ 89 public function updateStepSellerContact(?\Closure $after = null): void 90 { 91 $this->update([ 92 'email' => $this->getStoreEmail(), 93 'country' => Country::getWoocommerceDefaultCountry(), 94 ], $after, self::SELLER_CONTACT_ERROR_MESSAGE); 75 95 } 76 96 … … 82 102 'plugin_mode' => $this->getPluginMode(), 83 103 'cust_id' => $this->seller->getCustIdFromAT(), 84 'site_id' => $this-> country::countryToSiteId($this->country->getPluginDefaultCountry()),104 'site_id' => $this->resolveSiteId(), 85 105 ], $after); 86 106 } … … 130 150 * @param array $attrs Funnel attribute values map 131 151 * @param \Closure $after Function to run after funnel updated, inside treatment 132 */ 133 private function update(array $attrs, ?\Closure $after = null): void 152 * @param string $sanitizedError Message to report instead of the exception — 153 * required for steps that carry PII (see 154 * runWithTreatment()) 155 */ 156 private function update(array $attrs, ?\Closure $after = null, ?string $sanitizedError = null): void 134 157 { 135 158 if (!$this->created()) { … … 154 177 $after(); 155 178 } 156 }); 179 }, $sanitizedError); 180 } 181 182 /** 183 * Read the store's contact email for the onboarding funnel. 184 * 185 * admin_email is the one address WordPress guarantees to exist. The installer's 186 * own address would fit the goal better, but it is unreachable from here — see 187 * traps.md. Kept isolated so swapping the source is a one-line change. 188 */ 189 private function getStoreEmail(): string 190 { 191 return get_option('admin_email', ''); 192 } 193 194 /** 195 * Allowlisted conversion — never the raw country code (CWE-99). A country outside the 196 * seven site ids resolves to '', normalized to null so the funnel column keeps one 197 * representation of "unknown". Shared by both steps that send it — see traps.md. 198 */ 199 private function resolveSiteId(): ?string 200 { 201 $persistedSiteId = $this->seller->getSiteId(); 202 203 // getPluginDefaultCountry() trusts the persisted site id without validating it, and 204 // siteIdToCountry() answers AR for anything it does not know — so an unsupported stored 205 // value would travel as MLA. Guarded here only: that helper also decides which payment 206 // methods a store is offered, which this step has no business changing. See traps.md. 207 $country = ($persistedSiteId === '' || Country::isValidSiteId($persistedSiteId)) 208 ? $this->country->getPluginDefaultCountry() 209 : Country::getWoocommerceDefaultCountry(); 210 211 $siteId = $this->country::countryToSiteId($country); 212 213 return $siteId !== '' ? $siteId : null; 157 214 } 158 215 … … 179 236 } 180 237 181 private function runWithTreatment(\Closure $callback): void 238 /** 239 * @param \Closure $callback 240 * @param string $sanitizedError When given, reported in place of the SDK 241 * exception, which can echo the request body 242 * verbatim (e.g. on a JSON encode failure) and 243 * leak PII into the plugin log and Datadog 244 */ 245 private function runWithTreatment(\Closure $callback, ?string $sanitizedError = null): void 182 246 { 183 247 try { … … 186 250 $this->sendSuccessEvent(); 187 251 } catch (Exception $ex) { 188 $GLOBALS['mercadopago']->logs->file->error(sprintf("Error on %s\n%s", __METHOD__, $ex), __CLASS__); 189 $this->sendErrorEvent($ex->getMessage()); 252 $logDetail = $sanitizedError ?? (string) $ex; 253 $eventMessage = $sanitizedError ?? $ex->getMessage(); 254 255 $GLOBALS['mercadopago']->logs->file->error(sprintf("Error on %s\n%s", __METHOD__, $logDetail), __CLASS__); 256 $this->sendErrorEvent($eventMessage); 190 257 } 191 258 } -
woocommerce-mercadopago/trunk/src/Funnel/UpdateSellerFunnelBase.php
r3609381 r3710292 5 5 class UpdateSellerFunnelBase extends \MercadoPago\PP\Sdk\Entity\Identification\UpdateSellerFunnelBase 6 6 { 7 // Declared here because the SDK entity does not have it. Only add a property to 8 // this subclass while the SDK lacks it, and drop it once the SDK declares it: 9 // a typed child property over an untyped parent one is a fatal error in PHP. 10 // See docs/agent/traps.md. 7 11 public string $plugin_version; 8 9 public ?bool $is_subscription_enabled = null;10 12 } -
woocommerce-mercadopago/trunk/src/Gateways/CustomGateway.php
r3663899 r3710292 90 90 91 91 /** 92 * Alt text of each accepted card logo. Brand names are not translatable. 93 */ 94 protected const CARD_FLAG_NAMES = [ 95 'amex' => 'American Express', 96 'cabal' => 'Cabal', 97 'codensa' => 'Codensa', 98 'diners' => 'Diners Club', 99 'elo' => 'Elo', 100 'hypercard' => 'Hipercard', 101 'lider' => 'Lider', 102 'maestro' => 'Maestro', 103 'master' => 'Mastercard', 104 'naranjax' => 'Naranja X', 105 'oca' => 'OCA', 106 'redcompra' => 'Redcompra', 107 'visa' => 'Visa', 108 ]; 109 110 /** 92 111 * CustomGateway constructor 93 112 * @throws Exception … … 191 210 && function_exists('wcs_order_contains_subscription') 192 211 && \wcs_order_contains_subscription($order, 'any'); 212 } 213 214 return class_exists('WC_Subscriptions_Cart') 215 && \WC_Subscriptions_Cart::cart_contains_subscription(); 216 } 217 218 /** 219 * Returns whether the rendered card form belongs to the initial subscription 220 * payment branch handled by process_payment(). 221 * 222 * This is presentation context only. The browser combines it with the current 223 * checkout amount to avoid requiring installments for a zero-dollar CIT, but 224 * it must never be treated as authorization or payment input by the backend. 225 * 226 * Unlike isSubscriptionPaymentContext(), this deliberately excludes payment- 227 * method changes and renewal orders. The default order types accepted by 228 * wcs_order_contains_subscription() mirror the existing initial-CIT branch in 229 * process_payment(); passing "any" here would also include renewals. 230 */ 231 private function isInitialSubscriptionPaymentContext(): bool 232 { 233 if (!SubscriptionsHelper::isWcsActive() || $this->isAutomaticPaymentsOff()) { 234 return false; 235 } 236 237 $isPaymentMethodChange = ( 238 class_exists('WC_Subscriptions_Change_Payment_Gateway') 239 && !empty(\WC_Subscriptions_Change_Payment_Gateway::$is_request_to_change_payment) 240 ) || $this->mercadopago->helpers->url->validateGetVar('change_payment_method'); 241 242 if ($isPaymentMethodChange) { 243 return false; 244 } 245 246 $orderId = (int) get_query_var('order-pay'); 247 if ($orderId > 0) { 248 $order = wc_get_order($orderId); 249 return $order && \wcs_order_contains_subscription($order); 193 250 } 194 251 … … 744 801 // Hard API failure (4xx/5xx) — subscription was likely not created. 745 802 if ($httpStatus >= 400) { 746 $apiError = $data['error'] ??null;747 $ detail = $data['payment']['status_detail'] ??null;803 $apiError = is_string($data['error'] ?? null) ? $data['error'] : null; 804 $apiCode = is_string($data['code'] ?? null) ? $data['code'] : null; 748 805 $logger->warning( 749 806 "op=cit step=api_error http_status={$httpStatus} order_id={$orderId}", 750 807 $logSource 751 808 ); 752 $msg = $helper->mapApiErrorToUserMessage($httpStatus, $apiError, $ detail);753 return ['result' => 'failure', 'messages' => $msg];809 $msg = $helper->mapApiErrorToUserMessage($httpStatus, $apiError, $apiCode); 810 return $this->failInitialCit($msg); 754 811 } 755 812 … … 776 833 } 777 834 835 // A zero-dollar authorization (ZDA) does not generate a payment webhook. 836 // Complete it synchronously only when Core confirms the full recurring 837 // profile contract. The amount comes from the server-built CIT payload, 838 // never from checkout input. 839 if (SubscriptionsHelper::isZeroDollarCit($payload) && $paymentStatus !== 'rejected') { 840 $contractViolation = $this->getZeroDollarCitContractViolation($data, $httpStatus); 841 842 if ($contractViolation === null) { 843 $logger->info( 844 "op=cit step=zda_completed http_status={$httpStatus} order_id={$orderId}", 845 $logSource 846 ); 847 848 return $this->completeApprovedZeroDollarCit($order, (string) $paymentId); 849 } 850 851 $logger->warning( 852 "op=cit step=zda_contract_violation reason={$contractViolation} http_status={$httpStatus} order_id={$orderId}", 853 $logSource 854 ); 855 856 return $this->failInitialCit($translations['wcs_cit_failed_generic'] ?? ''); 857 } 858 778 859 // Delegate all 2xx status handling to the shared method: 779 // approved → redirect (payment_complete handled by MP webhook)860 // approved paid → redirect (payment_complete handled by MP webhook) 780 861 // pending_challenge → 3DS modal flow 781 862 // pending/in_process → redirect to order received 782 863 // rejected → buyerRefusedMessages (same UX as normal checkout) 783 864 return $this->handleResponseStatus($order, $this->normalizeCitResponse($data)); 865 } 866 867 /** 868 * Validates the Core response contract required to finish a ZDA without a webhook. 869 * 870 * Returns a stable, non-sensitive reason for observability, or null when valid. 871 */ 872 private function getZeroDollarCitContractViolation(array $data, int $httpStatus): ?string 873 { 874 if ($httpStatus < 200 || $httpStatus >= 300) { 875 return 'unexpected_http_status'; 876 } 877 878 if (($data['payment']['status'] ?? null) !== 'approved') { 879 return 'payment_not_approved'; 880 } 881 882 if (!$this->hasCitIdentifier($data['payment']['id'] ?? null)) { 883 return 'payment_id_missing'; 884 } 885 886 if (!$this->hasCitIdentifier($data['subscription']['id'] ?? null)) { 887 return 'subscription_id_missing'; 888 } 889 890 if (!$this->hasCitIdentifier($data['customer']['id'] ?? null)) { 891 return 'customer_id_missing'; 892 } 893 894 if (!$this->hasCitIdentifier($data['card']['id'] ?? null)) { 895 return 'card_id_missing'; 896 } 897 898 if (($data['profile']['status'] ?? null) !== 'active') { 899 return 'profile_not_active'; 900 } 901 902 if (!$this->hasCitIdentifier($data['profile']['id'] ?? null)) { 903 return 'profile_id_missing'; 904 } 905 906 if (!array_key_exists('three_ds_info', $data) || $data['three_ds_info'] !== null) { 907 return 'unexpected_three_ds_info'; 908 } 909 910 return null; 911 } 912 913 /** 914 * Accepts Core's numeric and opaque identifier formats while rejecting empty, 915 * non-scalar and non-positive numeric values. 916 * 917 * @param mixed $value 918 */ 919 private function hasCitIdentifier($value): bool 920 { 921 if (is_int($value)) { 922 return $value > 0; 923 } 924 925 if (!is_string($value)) { 926 return false; 927 } 928 929 $value = trim($value); 930 if ($value === '') { 931 return false; 932 } 933 934 // Core identifiers use different formats (numeric, UUID and opaque strings). 935 // Reject only known-invalid numeric values without constraining opaque formats. 936 return !is_numeric($value) || (float) $value > 0; 937 } 938 939 /** 940 * Completes a valid approved ZDA after its AP metadata has been persisted. 941 * 942 * @param \WC_Order $order 943 * @return array{result:string, redirect:string} 944 */ 945 private function completeApprovedZeroDollarCit($order, string $paymentId): array 946 { 947 $order->payment_complete($paymentId); 948 $this->mercadopago->helpers->cart->emptyCart(); 949 950 $urlReceived = $order->get_checkout_order_received_url(); 951 $orderStatus = $this->mercadopago->orderStatus->getOrderStatusMessage('accredited'); 952 953 $this->mercadopago->helpers->notices->storeApprovedStatusNotice($orderStatus); 954 955 $return = [ 956 'result' => 'success', 957 'redirect' => $urlReceived, 958 ]; 959 960 if ($this->isOrderPayPage()) { 961 $this->handlePayForOrderRequest($return); 962 } 963 964 return $return; 965 } 966 967 /** 968 * Return an initial CIT failure using the response contract expected by 969 * Classic Checkout, Blocks and the Order Pay page. 970 * 971 * @return array{result:string, redirect:string, message:string} 972 */ 973 private function failInitialCit(string $message): array 974 { 975 $this->mercadopago->helpers->notices->storeNotice($message, 'error'); 976 977 $return = [ 978 'result' => 'fail', 979 'redirect' => '', 980 'message' => $message, 981 ]; 982 983 if ($this->isOrderPayPage()) { 984 $this->handlePayForOrderRequest([ 985 'result' => 'fail', 986 'redirect' => false, 987 'messages' => $message, 988 ]); 989 } 990 991 return $return; 784 992 } 785 993 … … 911 1119 } 912 1120 913 return [ 1121 $formattedTransactionAmount = (float) Numbers::formatByCurrency($currency, $transactionAmount); 1122 $transaction = [ 1123 'amount' => $formattedTransactionAmount, 1124 'currency' => $currency, 1125 'description' => $this->buildSubscriptionDescription($order), 1126 'external_reference' => get_option('_mp_store_identificator', 'WC-') . $order->get_id(), 1127 'installments' => 1, // RN-08: subscriptions are incompatible with installment payments. 1128 'statement_descriptor' => $storeConfig->getStoreName('Mercado Pago'), 1129 ]; 1130 1131 // Core rejects 3DS configuration on zero-dollar authorization requests. 1132 // The amount is calculated server-side, so buyers cannot disable 3DS on paid CITs. 1133 if ($formattedTransactionAmount > 0.0) { 1134 $transaction['three_d_secure_mode'] = 'optional'; 1135 } 1136 1137 $payload = [ 914 1138 'token' => $checkout['token'], 915 1139 'payer' => $payer, 916 'transaction' => [ 917 'amount' => (float) Numbers::formatByCurrency($currency, $transactionAmount), 918 'currency' => $currency, 919 'description' => $this->buildSubscriptionDescription($order), 920 'external_reference' => get_option('_mp_store_identificator', 'WC-') . $order->get_id(), 921 'installments' => 1, // RN-08: subscriptions are incompatible with installment payments. 922 'statement_descriptor' => $storeConfig->getStoreName('Mercado Pago'), 923 'three_d_secure_mode' => 'optional', 924 ], 1140 'transaction' => $transaction, 925 1141 'subscription' => [ 926 1142 'external_id' => 'WC-SUB-' . $subscription->get_id(), … … 956 1172 ], 957 1173 ], 958 'sponsor_id' => $this->countryConfigs['sponsor_id'] ?? null, 959 'notification_url' => $this->buildCitNotificationUrl(), 1174 'sponsor_id' => $this->countryConfigs['sponsor_id'] ?? null, 960 1175 'point_of_interaction' => [ 961 1176 'location' => [ … … 965 1180 ], 966 1181 ]; 1182 1183 // ZDA is final synchronously and Core rejects notification_url for amount zero. 1184 if ($formattedTransactionAmount > 0.0) { 1185 $payload['notification_url'] = $this->buildCitNotificationUrl(); 1186 } 1187 1188 return $payload; 967 1189 } 968 1190 … … 1558 1780 'handle' => 'wc_mercadopago_custom_card_form', 1559 1781 'path' => 'checkouts/custom/entities/card-form', 1560 'deps' => ['wc_mercadopago_custom_card_form_error_codes'], 1782 'deps' => [ 1783 'wc_mercadopago_sdk', 1784 'wc_mercadopago_custom_card_form_error_codes', 1785 'wc_mercadopago_custom_page', 1786 ], 1561 1787 'localize' => [ 1562 1788 'security_code_placeholder_text_3_digits' => $this->storeTranslations['security_code_placeholder_text_3_digits'], … … 1566 1792 'handle' => 'wc_mercadopago_custom_three_ds_handler', 1567 1793 'path' => 'checkouts/custom/entities/three-ds-handler', 1794 'deps' => ['wc_mercadopago_custom_page'], 1568 1795 ], 1569 1796 [ … … 1574 1801 'handle' => 'wc_mercadopago_custom_event_handler', 1575 1802 'path' => 'checkouts/custom/entities/event-handler', 1576 'deps' => ['wc_mercadopago_custom_mobile_checkout_classic_observer'], 1803 'deps' => [ 1804 'wc_mercadopago_custom_mobile_checkout_classic_observer', 1805 'wc_mercadopago_custom_page', 1806 ], 1577 1807 'localize' => [ 1578 1808 'is_mobile' => Device::isMobile(), … … 1582 1812 'handle' => 'wc_mercadopago_custom_page', 1583 1813 'path' => 'checkouts/custom/mp-custom-page', 1814 'deps' => ['wc_mercadopago_custom_elements'], 1584 1815 'localize' => [ 1585 1816 'security_code_placeholder_text_3_digits' => $this->storeTranslations['security_code_placeholder_text_3_digits'], … … 1588 1819 'security_code_tooltip_text_4_digits' => $this->storeTranslations['security_code_tooltip_text_4_digits'], 1589 1820 'installments_select_placeholder_text' => $this->storeTranslations['placeholders_installments'], 1821 'detected_card_label' => $this->storeTranslations['detected_card_label'], 1822 'card_number_instruction' => $this->storeTranslations['card_number_instruction'], 1823 'card_expiration_instruction' => $this->storeTranslations['card_expiration_instruction'], 1824 'security_code_instruction' => $this->storeTranslations['security_code_instruction'], 1590 1825 ], 1591 1826 ], … … 1597 1832 'handle' => 'wc_mercadopago_custom_checkout', 1598 1833 'path' => 'checkouts/custom/mp-custom-checkout', 1834 'deps' => [ 1835 'wc_mercadopago_custom_page', 1836 'wc_mercadopago_custom_card_form', 1837 'wc_mercadopago_custom_three_ds_handler', 1838 'wc_mercadopago_custom_event_handler', 1839 ], 1599 1840 'localize' => [ 1600 1841 'public_key' => $this->mercadopago->sellerConfig->getCredentialsPublicKey(), … … 1822 2063 'card_installments_label' => $this->storeTranslations['card_installments_label'], 1823 2064 'amount' => $amountAndCurrencyRatio['amount'], 2065 'is_cit_initial_context' => $this->isInitialSubscriptionPaymentContext(), 1824 2066 'currency_ratio' => $amountAndCurrencyRatio['currencyRatio'], 1825 2067 'message_error_amount' => $this->storeTranslations['message_error_amount'], 1826 2068 'security_code_tooltip_text_3_digits' => $this->storeTranslations['security_code_tooltip_text_3_digits'], 1827 2069 'placeholders_cardholder_name' => $this->storeTranslations['placeholders_cardholder_name'], 1828 'cardFlagIconUrls' => array_map( 1829 fn($icon) => $this->mercadopago->helpers->url->getImageAsset("checkouts/custom/card-flags/$icon"), 2070 'cardFlags' => array_map( 2071 fn($icon) => [ 2072 'url' => $this->mercadopago->helpers->url->getImageAsset("checkouts/custom/card-flags/$icon"), 2073 'name' => static::CARD_FLAG_NAMES[$icon] ?? $icon, 2074 ], 1830 2075 static::CARD_FLAGS_BY_COUNTRY[$this->mercadopago->sellerConfig->getSiteId()] ?? [] 1831 2076 ), 2077 'accepted_cards_label' => $this->storeTranslations['accepted_cards_label'], 2078 'card_document_instruction_range' => $this->storeTranslations['card_document_instruction_range'], 2079 'card_document_instruction_fixed' => $this->storeTranslations['card_document_instruction_fixed'], 1832 2080 'card_holder_input_helper_info' => $this->storeTranslations['card_holder_input_helper_info'], 1833 2081 'mercadopago_privacy_policy' => str_replace( -
woocommerce-mercadopago/trunk/src/Helpers/AutomaticPaymentsClient.php
r3609381 r3710292 111 111 * @return Response 112 112 * 113 * @throws \RuntimeException When subscription.id is absent from theresponse (orphan payment, AC-2).113 * @throws \RuntimeException When subscription.id is absent from a paid 2xx CIT response (orphan payment, AC-2). 114 114 * @throws \Exception Propagated from {@see Requester} on network or HTTP >= 400 errors. 115 115 */ … … 141 141 } 142 142 143 // Orphan detection: a 2xx without subscription.id means a charge was created 144 // without a registered subscription — unrecoverable orphan state. 145 // Logged as 'error' (WC Logger does not have a 'critical' level; 'error' is the highest). 143 $isZeroDollarCit = SubscriptionsHelper::isZeroDollarCit($payload); 144 145 // The gateway owns the complete ZDA response contract and its checkout-specific 146 // failure adapters. Return incomplete ZDA responses so it can report the exact 147 // allowlisted violation without exposing Core response details to the buyer. 148 if ($isZeroDollarCit && empty($data['subscription']['id'])) { 149 return $response; 150 } 151 152 // Paid-CIT orphan detection keeps its existing fail-closed behavior: a 2xx 153 // without subscription.id means a charge was created without a registered 154 // subscription. WC Logger has no critical level, so error is the highest. 146 155 if (empty($data['subscription']['id'])) { 147 156 $this->log('error', 'op=cit status=orphan_detected', [ -
woocommerce-mercadopago/trunk/src/Helpers/SubscriptionsHelper.php
r3609381 r3710292 15 15 * Utilities for the WooCommerce Subscriptions integration with Mercado Pago 16 16 * Automatic Payments (Pre-approval). Centralizes subscription order detection, 17 * subscription metadata read/write, deterministic idempotency key generation18 * and the error → buyer-message mapping.17 * subscription metadata read/write, zero-dollar CIT detection, deterministic 18 * idempotency key generation and the error → buyer-message mapping. 19 19 * 20 20 * @package MercadoPago\Woocommerce\Helpers … … 82 82 return class_exists('WC_Subscriptions') 83 83 && function_exists('wcs_order_contains_subscription'); 84 } 85 86 /** 87 * Identifies a ZDA from the amount calculated in the server-side CIT payload. 88 * 89 * Both the Automatic Payments client and the gateway must use this shared 90 * predicate so incomplete ZDA responses are routed to the same contract 91 * validator. Checkout input and response amounts are not authoritative. 92 */ 93 public static function isZeroDollarCit(array $payload): bool 94 { 95 if ( 96 !isset($payload['transaction']) 97 || !is_array($payload['transaction']) 98 || !array_key_exists('amount', $payload['transaction']) 99 || !is_numeric($payload['transaction']['amount']) 100 ) { 101 return false; 102 } 103 104 return (float) $payload['transaction']['amount'] === 0.0; 84 105 } 85 106 -
woocommerce-mercadopago/trunk/src/Notification/CoreNotification.php
r3663899 r3710292 159 159 $safeRefundId = preg_replace('/[\r\n\t]/', '', (string) $refundId); 160 160 161 // Refund-id dedup: if this refund_id was already applied (persisted at refund 162 // time from the panel), skip the refund flow entirely. Still sync payment-details 163 // metadata (installments, last_four_digits, and the per-payment refunded amount) 164 // so order meta stays current. The sync runs in authoritative mode: the per-payment 165 // refunded total is recomputed from the MP payload (not incremented), which keeps it 166 // idempotent under webhook redelivery and is the only place panel-origin refunds 167 // update that metadata — RefundHandler persists only the refund_id. Leaving it stale 168 // would let a later multi-payment refund read an over-stated remaining balance for an 169 // already-refunded payment and issue a duplicate refund against it. 161 // Refund-id dedup: if this refund_id was already applied (persisted at refund time from 162 // the panel), the refund is fully accounted for — RefundHandler recorded the per-payment 163 // refunded amount at refund time (PSW-4412), and the WooCommerce refund already exists. 164 // Skip the notification to avoid creating a duplicate refund or double-counting the amount. 170 165 if ($this->orderStatus->isRefundIdApplied($order, (string) $refundId)) { 171 166 $this->logs->file->info('Refund already applied, skipping notification refund: ' . $safeRefundId, __CLASS__); 172 if (!empty($data['payments_details'])) {173 // Guard the metadata sync: a failure here must not abort the remaining174 // entries of the refunds_notifying loop (which would leave the MP webhook175 // retrying indefinitely on a 500).176 try {177 $this->updatePaymentDetails($order, $data, true);178 $order->save();179 } catch (Exception $e) {180 $this->logs->file->error(181 'Failed to sync payment details after dedup skip for refund '182 . $safeRefundId . ': ' . $e->getMessage(),183 __CLASS__184 );185 }186 }187 167 continue; 188 168 } … … 312 292 * @return void 313 293 */ 314 public function updatePaymentDetails(WC_Order $order, array $data , bool $authoritativeRefund = false): void294 public function updatePaymentDetails(WC_Order $order, array $data): void 315 295 { 316 296 $payment_ids = []; … … 325 305 $refundedAmount = $paymentData->refund ?? 0; 326 306 327 if ($authoritativeRefund) { 328 // Dedup-skip path: sync the per-payment refunded total from the MP payload. This 329 // is the ONLY place the per-payment refund metadata is updated for panel-origin 330 // refunds (RefundHandler persists just the refund_id, never the per-payment 331 // amount, so the normal incrementing path is never reached for them). 332 // 333 // The refund amount does NOT live in payment['refunds'] — that structure only 334 // carries id/status/notifying/metadata per refund. The amount lives in 335 // refunds_notifying[]. So we cross-reference by refund id to sum the amounts of 336 // this payment's refunds that are present in the current notification. 337 // 338 // A single notification only carries the amounts of the refunds it is notifying; 339 // amounts of previously-applied refunds are not in the payload. We therefore never 340 // reduce the stored total (max) — this keeps the sync idempotent under webhook 341 // redelivery and prevents a partial payload from zeroing out or shrinking a value 342 // that was already recorded. 343 $notifyingAmountById = []; 344 foreach ($data['refunds_notifying'] ?? [] as $notifyingRefund) { 345 if (isset($notifyingRefund['id'], $notifyingRefund['amount']) && is_numeric($notifyingRefund['amount'])) { 346 $notifyingAmountById[(string) $notifyingRefund['id']] = (float) $notifyingRefund['amount']; 347 } 348 } 349 350 $notifyingTotal = 0.0; 351 $hasNotifyingMatch = false; 352 foreach (array_keys($payment['refunds'] ?? []) as $paymentRefundId) { 353 if (isset($notifyingAmountById[(string) $paymentRefundId])) { 354 $notifyingTotal += $notifyingAmountById[(string) $paymentRefundId]; 355 $hasNotifyingMatch = true; 356 } 357 } 358 359 if ($hasNotifyingMatch) { 360 $refundedAmount = max((float) $refundedAmount, $notifyingTotal); 361 } 362 } elseif (isset($data['current_refund']) && isset($payment['refunds'][$data['current_refund']['id']])) { 307 // MP-origin refund: the notification carries the current refund's amount, which is 308 // incremented into the per-payment total here. Panel-origin refunds do NOT reach this 309 // path — RefundHandler records their per-payment amount at refund time (PSW-4412), and 310 // their notification is recognised as already-applied and skipped in 311 // handleRefundNotification. 312 if (isset($data['current_refund']) && isset($payment['refunds'][$data['current_refund']['id']])) { 363 313 $refundedAmount += $data['current_refund']['amount']; 314 $this->logs->file->info( 315 sprintf( 316 'Accumulated MP-origin refund %s (%s) on payment %s; [Refund] -> %s', 317 preg_replace('/[\r\n\t]/', '', (string) $data['current_refund']['id']), 318 $data['current_refund']['amount'], 319 preg_replace('/[\r\n\t]/', '', (string) $payment['id']), 320 $refundedAmount 321 ), 322 __CLASS__ 323 ); 364 324 } 365 325 -
woocommerce-mercadopago/trunk/src/Order/OrderMetadata.php
r3663899 r3710292 533 533 534 534 /** 535 * Add a refunded amount to a payment's per-payment "[Refund X]" metadata. 536 * 537 * Source-of-truth write (PSW-4412): called by RefundHandler at panel-refund time, when the 538 * exact payment and amount are known. Recording the amount here — instead of reconstructing it 539 * later from an async notification — removes the need to tell a new order from a legacy one: 540 * the notification only has to recognise the already-applied refund and skip it. 541 * 542 * Increments the existing "[Refund X]" segment in place, preserving every other stored field, 543 * and reloads meta first (HPOS-safe) so a concurrent notification write is observed. Never 544 * throws — a persistence failure is logged and swallowed so a transient DB error cannot abort 545 * the refund flow; the WooCommerce order-level refunded total (get_total_refunded) remains the 546 * authoritative record. 547 * 548 * @param WC_Order $order 549 * @param string $paymentId 550 * @param float $amount amount refunded from this payment, in the MP account currency 551 * 552 * @return void 553 */ 554 public function addRefundedAmountToPayment(WC_Order $order, string $paymentId, float $amount): void 555 { 556 if ($amount <= 0) { 557 return; 558 } 559 560 // Force a fresh read (HPOS-safe) before updating so a concurrent notification write is observed. 561 $order->read_meta_data(true); 562 563 $metaKey = PaymentMetadata::getPaymentMetaKey($paymentId); 564 $stored = (string) $order->get_meta($metaKey); 565 566 if ($stored === '' || strpos($stored, '[Refund') === false) { 567 // No per-payment metadata (or no [Refund] segment) to increment yet: the payment-details 568 // sync has not run for this payment. The order-level refunded total still records the 569 // refund, so bail out without corrupting the stored string. 570 $this->logs->file->info( 571 'No payment metadata to update refunded amount for payment ' . $paymentId 572 . ' on order ' . $order->get_id(), 573 __CLASS__ 574 ); 575 return; 576 } 577 578 $paymentData = PaymentMetadata::extractPaymentDataFromMeta($stored); 579 $previousRefund = (float) ($paymentData->refund ?? 0); 580 $newRefunded = $previousRefund + $amount; 581 582 // Replace only the [Refund X] segment, preserving every other stored field. The pattern is 583 // static and $stored is guaranteed to contain a [Refund ...] segment (checked above), so 584 // preg_replace always returns the updated string; the `?? $stored` is a defensive no-op that 585 // keeps the value untouched in the impossible event of a PCRE failure. 586 $updated = preg_replace( 587 '/\[Refund [^\]]*\]/', 588 sprintf('[Refund %s]', $newRefunded), 589 $stored, 590 1 591 ) ?? $stored; 592 593 try { 594 $this->orderMeta->update($order, $metaKey, $updated); 595 $this->logs->file->info( 596 sprintf( 597 'Recorded refund amount %s on payment %s at refund time; [Refund] %s -> %s (order %s)', 598 $amount, 599 preg_replace('/[\r\n\t]/', '', $paymentId), 600 $previousRefund, 601 $newRefunded, 602 $order->get_id() 603 ), 604 __CLASS__ 605 ); 606 } catch (\Throwable $e) { 607 // Log only the exception class, never getMessage(): a wpdb/PDO exception can embed the 608 // failing SQL in the message and leak it into centralized logs. 609 $this->logs->file->error( 610 'Failed to persist refunded amount for payment ' . $paymentId 611 . ' on order ' . $order->get_id() . '; exception type: ' . get_class($e), 612 __CLASS__ 613 ); 614 } 615 } 616 617 /** 535 618 * Update an order's payments metadata 536 619 * -
woocommerce-mercadopago/trunk/src/Refund/RefundHandler.php
r3663899 r3710292 180 180 if ($refundId !== null) { 181 181 $this->mercadopago->orderMetadata->addAppliedRefundId($this->order, (string) $refundId); 182 // Source of truth (PSW-4412): record the per-payment refunded amount now, at refund time. 183 // The async notification recognises this refund_id as already applied and skips it, so the 184 // amount is never double-counted. $amount is already in the MP account currency (scaled by 185 // the currency ratio in processRefund), matching the stored per-payment total. 186 $this->mercadopago->orderMetadata->addRefundedAmountToPayment($this->order, $paymentId, $amount); 182 187 } else { 183 188 $this->mercadopago->logs->file->info( -
woocommerce-mercadopago/trunk/src/Translations/StoreTranslations.php
r3609381 r3710292 385 385 'locale' => __('en-US', 'woocommerce-mercadopago'), 386 386 'card_holder_input_helper_info' => __('As it spelled on the card.', 'woocommerce-mercadopago'), 387 'accepted_cards_label' => __('You can pay with card', 'woocommerce-mercadopago'), 388 'detected_card_label' => __('Card', 'woocommerce-mercadopago'), 389 'card_number_instruction' => __('Enter the {digits} numbers on your card.', 'woocommerce-mercadopago'), 390 'card_expiration_instruction' => __('Enter two digits for the month and two digits for the year.', 'woocommerce-mercadopago'), 391 'security_code_instruction' => __('Enter your {digits} digit code.', 'woocommerce-mercadopago'), 392 'card_document_instruction_range' => __('Enter between {min} and {max} digits for your ID number.', 'woocommerce-mercadopago'), 393 'card_document_instruction_fixed' => __('Enter the {digits} digits of your ID number.', 'woocommerce-mercadopago'), 387 394 'consumer_credits_due_date' => __('The first installment <b>is due on</b>', 'woocommerce-mercadopago'), 388 395 'months_abbreviated' => [ … … 821 828 822 829 // Stable Core P&P codes (spec §4.7 - "Códigos estáveis") 830 'CPP_TAAP_0000001' => __('We could not process this card. Please try again.', 'woocommerce-mercadopago'), 823 831 'CPP_TAAP_0602002' => __('We could not complete the operation. Please try another card.', 'woocommerce-mercadopago'), 824 832 -
woocommerce-mercadopago/trunk/src/WoocommerceMercadoPago.php
r3663899 r3710292 40 40 class WoocommerceMercadoPago 41 41 { 42 private const PLUGIN_VERSION = '8.9. 3';42 private const PLUGIN_VERSION = '8.9.4'; 43 43 44 44 private const PLUGIN_MIN_PHP = '7.4'; … … 336 336 public function activatePlugin(): void 337 337 { 338 $after = fn() => $this->storeConfig->setExecuteActivate(false); 339 340 $this->funnel->created() ? $this->funnel->updateStepActivate($after) : $this->funnel->create($after); 338 $disableActivate = fn() => $this->storeConfig->setExecuteActivate(false); 339 340 if ($this->funnel->created()) { 341 $this->funnel->updateStepActivate($disableActivate); 342 return; 343 } 344 345 // Chained inside create()'s $after, not updateStepCredentials(): the seller 346 // contact step must reach sellers who install the plugin but never add 347 // credentials, and updateStepCredentials() never runs for that audience. 348 $this->funnel->create(function () use ($disableActivate) { 349 $disableActivate(); 350 $this->funnel->updateStepSellerContact(); 351 }); 341 352 } 342 353 -
woocommerce-mercadopago/trunk/templates/public/checkouts/custom-checkout.php
r3663899 r3710292 29 29 * @var string $card_installments_label 30 30 * @var string $amount 31 * @var bool $is_cit_initial_context 31 32 * @var string $currency_ratio 32 33 * @var string $message_error_amount … … 36 37 * @var string $interest_free_option_text 37 38 * @var string $bank_interest_hint_text 39 * @var bool $wallet_button_enabled 40 * @var string $card_holder_input_helper_info 41 * @var string $accepted_cards_label 42 * @var string $card_document_instruction_range 43 * @var string $card_document_instruction_fixed 44 * @var array $cardFlags list of ['url' => string, 'name' => string] 38 45 * 39 46 * @see \MercadoPago\Woocommerce\Gateways\CustomGateway … … 55 62 <?php else : ?> 56 63 <div class="mp-checkout-custom-container"> 57 <div class="mp-checkout-custom-card-flags"> 58 <?php foreach ($cardFlagIconUrls as $cardFlagIconUrl) : ?> 59 <img src="<?= esc_url($cardFlagIconUrl); ?>"> 60 <?php endforeach; ?> 64 <div class="mp-checkout-custom-card-flags" role="group" aria-labelledby="mp-accepted-cards-label"> 65 <span id="mp-accepted-cards-label" class="mp-sr-only"><?= esc_html($accepted_cards_label); ?></span> 66 <ul class="mp-checkout-custom-card-flags-list"> 67 <?php foreach ($cardFlags as $cardFlag) : ?> 68 <li><img src="<?= esc_url($cardFlag['url']); ?>" alt="<?= esc_attr($cardFlag['name']); ?>"></li> 69 <?php endforeach; ?> 70 </ul> 61 71 </div> 72 73 <?php // The brand icon is a CSS background, invisible to screen readers. ?> 74 <span id="mp-detected-card-announcement" class="mp-sr-only" aria-live="polite"></span> 62 75 <?php if ($test_mode) : ?> 63 76 <test-mode … … 111 124 isOptinal=false 112 125 message="<?= esc_html($card_number_input_label); ?>" 113 for='mp-card-number'126 id='mp-card-number-label' 114 127 > 115 128 </input-label> 116 129 117 <div class="mp-checkout-custom-card-input" id="form-checkout__cardNumber-container" ></div>130 <div class="mp-checkout-custom-card-input" id="form-checkout__cardNumber-container" aria-labelledby="mp-card-number-label"></div> 118 131 119 132 <input-helper … … 130 143 message="<?= esc_html($card_holder_name_input_label); ?>" 131 144 isOptinal=false 145 for='form-checkout__cardholderName' 132 146 > 133 147 </input-label> … … 139 153 name="mp-card-holder-name" 140 154 data-checkout="cardholderName" 155 aria-describedby="mp-card-holder-name-helper-info mp-card-holder-name-example" 156 aria-required="true" 141 157 /> 158 159 <?php // aria-describedby displaces the placeholder — see traps.md. ?> 160 <span id="mp-card-holder-name-example" class="mp-sr-only"><?= esc_html($placeholders_cardholder_name); ?></span> 142 161 143 162 <input-helper … … 163 182 message="<?= esc_html($card_expiration_input_label); ?>" 164 183 isOptinal=false 184 id='mp-expiration-date-label' 165 185 > 166 186 </input-label> … … 169 189 id="form-checkout__expirationDate-container" 170 190 class="mp-checkout-custom-card-input mp-checkout-custom-left-card-input" 191 aria-labelledby="mp-expiration-date-label" 171 192 > 172 193 </div> … … 185 206 message="<?= esc_html($card_security_code_input_label); ?>" 186 207 isOptinal=false 208 id='mp-security-code-label' 187 209 > 188 210 </input-label> 189 211 190 212 <div class="mp-checkout-custom-security-code-container"> 191 <div id="form-checkout__securityCode-container" class="mp-checkout-custom-security-code-input" ></div>213 <div id="form-checkout__securityCode-container" class="mp-checkout-custom-security-code-input" aria-labelledby="mp-security-code-label"></div> 192 214 <span 193 215 id="mp-security-code-info" … … 223 245 flag-error="docNumberError" 224 246 site-id="<?= esc_attr($site_id); ?>" 247 instruction-range="<?= esc_attr($card_document_instruction_range); ?>" 248 instruction-fixed="<?= esc_attr($card_document_instruction_fixed); ?>" 225 249 > 226 250 </input-document> … … 234 258 isOptinal=false 235 259 message="<?= esc_html($card_issuer_input_label); ?>" 236 for=' mp-issuer'260 for='form-checkout__issuer' 237 261 > 238 262 </input-label> … … 240 264 241 265 <div class="mp-input-select-input"> 242 <select name="issuer" id="form-checkout__issuer" class="mp-custom-checkout-select-input" ></select>266 <select name="issuer" id="form-checkout__issuer" class="mp-custom-checkout-select-input" aria-required="true"></select> 243 267 </div> 244 268 </div> … … 255 279 id="form-checkout__installments" 256 280 class="mp-custom-checkout-select-input" 281 aria-required="true" 257 282 > 258 283 </select> … … 273 298 274 299 <div id="mercadopago-utilities" style="display:none;"> 275 <input type="hidden" id="mp-amount" value='<?= esc_textarea($amount); ?>' name="mercadopago_custom[amount]" />300 <input type="hidden" id="mp-amount" value='<?= esc_textarea($amount); ?>' name="mercadopago_custom[amount]" data-mp-cit-initial-context="<?= esc_attr(!empty($is_cit_initial_context) ? 'true' : 'false'); ?>"/> 276 301 <input type="hidden" id="currency_ratio" value='<?= esc_textarea($currency_ratio); ?>' name="mercadopago_custom[currency_ratio]"/> 277 302 <input type="hidden" id="paymentMethodId" name="mercadopago_custom[payment_method_id]"/> -
woocommerce-mercadopago/trunk/vendor/autoload.php
r3582079 r3710292 20 20 require_once __DIR__ . '/composer/autoload_real.php'; 21 21 22 return ComposerAutoloaderInit 18ea251a1d3302239f52e95d9f180dd5::getLoader();22 return ComposerAutoloaderInit2cbef7d43bc272823d4d80b299eb68ed::getLoader(); -
woocommerce-mercadopago/trunk/vendor/composer/autoload_real.php
r3582079 r3710292 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 18ea251a1d3302239f52e95d9f180dd55 class ComposerAutoloaderInit2cbef7d43bc272823d4d80b299eb68ed 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 18ea251a1d3302239f52e95d9f180dd5', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit2cbef7d43bc272823d4d80b299eb68ed', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 18ea251a1d3302239f52e95d9f180dd5', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit2cbef7d43bc272823d4d80b299eb68ed', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 18ea251a1d3302239f52e95d9f180dd5::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInit2cbef7d43bc272823d4d80b299eb68ed::getInitializer($loader)); 33 33 34 34 $loader->register(true); -
woocommerce-mercadopago/trunk/vendor/composer/autoload_static.php
r3663899 r3710292 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 18ea251a1d3302239f52e95d9f180dd57 class ComposerStaticInit2cbef7d43bc272823d4d80b299eb68ed 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( 10 'M' => 10 'M' => 11 11 array ( 12 12 'MercadoPago\\Woocommerce\\' => 24, … … 16 16 17 17 public static $prefixDirsPsr4 = array ( 18 'MercadoPago\\Woocommerce\\' => 18 'MercadoPago\\Woocommerce\\' => 19 19 array ( 20 20 0 => __DIR__ . '/../..' . '/src', 21 21 ), 22 'MercadoPago\\PP\\Sdk\\' => 22 'MercadoPago\\PP\\Sdk\\' => 23 23 array ( 24 24 0 => __DIR__ . '/..' . '/mp-plugins/php-sdk/src', … … 260 260 { 261 261 return \Closure::bind(function () use ($loader) { 262 $loader->prefixLengthsPsr4 = ComposerStaticInit 18ea251a1d3302239f52e95d9f180dd5::$prefixLengthsPsr4;263 $loader->prefixDirsPsr4 = ComposerStaticInit 18ea251a1d3302239f52e95d9f180dd5::$prefixDirsPsr4;264 $loader->classMap = ComposerStaticInit 18ea251a1d3302239f52e95d9f180dd5::$classMap;262 $loader->prefixLengthsPsr4 = ComposerStaticInit2cbef7d43bc272823d4d80b299eb68ed::$prefixLengthsPsr4; 263 $loader->prefixDirsPsr4 = ComposerStaticInit2cbef7d43bc272823d4d80b299eb68ed::$prefixDirsPsr4; 264 $loader->classMap = ComposerStaticInit2cbef7d43bc272823d4d80b299eb68ed::$classMap; 265 265 266 266 }, null, ClassLoader::class); -
woocommerce-mercadopago/trunk/vendor/composer/installed.json
r3582079 r3710292 3 3 { 4 4 "name": "mp-plugins/php-sdk", 5 "version": "3. 5.0",6 "version_normalized": "3. 5.0.0",5 "version": "3.7.0", 6 "version_normalized": "3.7.0.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/mercadopago/pp-php-sdk.git", 10 "reference": " 629e4be5749972c47105c3f8adcc3bbfd60d22ba"10 "reference": "e705530643386942790ba96c04eecf5aa3e199fd" 11 11 }, 12 12 "dist": { 13 13 "type": "zip", 14 "url": "https://api.github.com/repos/mercadopago/pp-php-sdk/zipball/ 629e4be5749972c47105c3f8adcc3bbfd60d22ba",15 "reference": " 629e4be5749972c47105c3f8adcc3bbfd60d22ba",14 "url": "https://api.github.com/repos/mercadopago/pp-php-sdk/zipball/e705530643386942790ba96c04eecf5aa3e199fd", 15 "reference": "e705530643386942790ba96c04eecf5aa3e199fd", 16 16 "shasum": "" 17 17 }, … … 24 24 "squizlabs/php_codesniffer": "3.7.2" 25 25 }, 26 "time": "2026-0 5-15T17:06:00+00:00",26 "time": "2026-09-03T13:31:37+00:00", 27 27 "type": "library", 28 28 "installation-source": "dist", … … 47 47 "support": { 48 48 "issues": "https://github.com/mercadopago/pp-php-sdk/issues", 49 "source": "https://github.com/mercadopago/pp-php-sdk/tree/v3. 5.0"49 "source": "https://github.com/mercadopago/pp-php-sdk/tree/v3.7.0" 50 50 }, 51 51 "install-path": "../mp-plugins/php-sdk" -
woocommerce-mercadopago/trunk/vendor/composer/installed.php
r3582079 r3710292 12 12 'versions' => array( 13 13 'mp-plugins/php-sdk' => array( 14 'pretty_version' => '3. 5.0',15 'version' => '3. 5.0.0',16 'reference' => ' 629e4be5749972c47105c3f8adcc3bbfd60d22ba',14 'pretty_version' => '3.7.0', 15 'version' => '3.7.0.0', 16 'reference' => 'e705530643386942790ba96c04eecf5aa3e199fd', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../mp-plugins/php-sdk', -
woocommerce-mercadopago/trunk/vendor/mp-plugins/php-sdk/CHANGELOG.md
r3582079 r3710292 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## V3.7.0 9 ### Added 10 - Add `email` and `country` (nullable) fields to `CreateSellerFunnelBase` and `UpdateSellerFunnelBase` entities, allowing the WooCommerce plugin to send the seller's e-mail and country at `start-integration` and `update-integration` 11 12 ## V3.6.1 13 ### Fixed 14 - Guard `PHP_VERSION_ID < 80500` added to `curlClose()` in `CurlRequester` to avoid `E_DEPRECATED` notice emitted by `curl_close()` on PHP 8.5+. Behavior is unchanged for PHP < 8.5, where `curl_close()` continues to be called explicitly. Addresses PSW-4158. 15 16 ## V3.6.0 17 ### Added 18 - Add `is_subscription_enabled` (nullable boolean) field to `UpdateSellerFunnelBase` entity, allowing the WooCommerce team to persist whether the subscription feature is enabled for a given seller via the `update-integration` endpoint 7 19 8 20 ## V3.5.0 -
woocommerce-mercadopago/trunk/vendor/mp-plugins/php-sdk/composer.json
r3582079 r3710292 2 2 "name": "mp-plugins/php-sdk", 3 3 "description": "Mercado Pago Plugins PHP-SDK", 4 "version": "3. 5.0",4 "version": "3.7.0", 5 5 "type": "library", 6 6 "scripts": { -
woocommerce-mercadopago/trunk/vendor/mp-plugins/php-sdk/composer.lock
r3582079 r3710292 5 5 "This file is @generated automatically" 6 6 ], 7 "content-hash": " d864dd31cd920272ad8620ec1b58a203",7 "content-hash": "923edb7d764c7f938758acd7d3075956", 8 8 "packages": [], 9 9 "packages-dev": [ … … 1828 1828 }, 1829 1829 "platform-dev": {}, 1830 "plugin-api-version": "2. 6.0"1830 "plugin-api-version": "2.9.0" 1831 1831 } -
woocommerce-mercadopago/trunk/vendor/mp-plugins/php-sdk/src/Entity/Identification/CreateSellerFunnelBase.php
r3582079 r3710292 14 14 * @property string $plugin_version 15 15 * @property string $site_id 16 * @property string|null $email 17 * @property string|null $country Free-text country name (e.g. "Brazil"), no fixed format enforced. 16 18 * 17 19 * @package MercadoPago\PP\Sdk\Entity\Identification … … 43 45 */ 44 46 protected $site_id; 47 48 /** 49 * @var string|null 50 */ 51 protected $email; 52 53 /** 54 * @var string|null 55 */ 56 protected $country; 45 57 46 58 /** -
woocommerce-mercadopago/trunk/vendor/mp-plugins/php-sdk/src/Entity/Identification/UpdateSellerFunnelBase.php
r3582079 r3710292 19 19 * @property string $cpp_token 20 20 * @property bool $is_disabled 21 * @property bool|null $is_subscription_enabled 22 * @property string|null $email 23 * @property string|null $country Free-text country name (e.g. "Brazil"), no fixed format enforced. 21 24 * 22 25 * @package MercadoPago\PP\Sdk\Entity\Identification … … 72 75 */ 73 76 protected $site_id; 77 /** 78 * @var bool|null 79 */ 80 protected $is_subscription_enabled; 81 /** 82 * @var string|null 83 */ 84 protected $email; 85 /** 86 * @var string|null 87 */ 88 protected $country; 74 89 75 90 -
woocommerce-mercadopago/trunk/vendor/mp-plugins/php-sdk/src/HttpClient/Requester/CurlRequester.php
r3349895 r3710292 162 162 } 163 163 164 /**165 * @codeCoverageIgnore166 */167 164 protected function curlClose($request) 168 165 { 169 curl_close($request); 166 if ($this->getPhpVersionId() < 80500) { 167 curl_close($request); 168 } 169 } 170 171 /** 172 * @codeCoverageIgnore 173 */ 174 protected function getPhpVersionId(): int 175 { 176 return PHP_VERSION_ID; 170 177 } 171 178 -
woocommerce-mercadopago/trunk/woocommerce-mercadopago.php
r3663899 r3710292 1 1 2 <?php 2 3 … … 5 6 * Plugin URI: https://github.com/mercadopago/cart-woocommerce 6 7 * Description: Configure the payment options and accept payments with cards, ticket and money of Mercado Pago account. 7 * Version: 8.9. 38 * Version: 8.9.4 8 9 * Author: Mercado Pago 9 10 * Author URI: https://developers.mercadopago.com/
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)