Plugin Directory

Changeset 3710292


Ignore:
Timestamp:
09/23/2026 11:22:45 PM (4 weeks ago)
Author:
mercadopago
Message:

Release version 8.9.4

Location:
woocommerce-mercadopago/trunk
Files:
56 edited

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)}}
     1class 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}));
     1function 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",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 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"};
     1const 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}};
     1const 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  
    66import { SUPER_TOKEN_ALLOWED_VARIANTS, SUPER_TOKEN_VARIANT_COOKIE } from '@super-token/adapters/platform/constants';
    77import type { RestoreErrorReason } from '@super-token/useCases/RestorePreloadedPaymentMethod';
     8import {
     9  toTelemetryErrorMessage,
     10  toSafeTelemetryErrorCode,
     11} from '@super-token/core/checkoutSession/ErrorClassification';
    812
    913/**
    … …  
    6973    this.PLUGIN_JS_BASE_URL = params.plugin_js_base_url;
    7074
    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));
    7476  }
    7577
    … …  
    141143
    142144  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);
    153146  }
    154147
    155148  private errorCodeOf(error: unknown): string {
    156     return (error as { errorCode?: string })?.errorCode || 'unknown';
     149    return toSafeTelemetryErrorCode(error);
    157150  }
    158151
    … …  
    187180    const errorMessage = this.normalizeErrorMessage(error);
    188181    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    );
    190188  }
    191189
    … …  
    243241
    244242  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);
    246248    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);
    248250  }
    249251
    … …  
    261263
    262264  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    );
    264270  }
    265271
    … …  
    270276
    271277  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    );
    273283  }
    274284
    … …  
    276286    const errorMessage = this.normalizeErrorMessage(error);
    277287    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    );
    279293  }
    280294
    281295  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    );
    283301  }
    284302
    285303  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    );
    287309  }
    288310
    … …  
    292314
    293315  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    );
    295321  }
    296322
    … …  
    309335  renderConsumerCreditsDetailsInnerHTML(success: boolean): void {
    310336    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      );
    312341    }
    313342    this.sendMetric('render_consumer_credits_details_inner_html', success, '');
    … …  
    365394
    366395  superTokenInitializationError(error: unknown, dispatchedFrom: string): void {
    367     const errorMessage = (error as { message?: string })?.message ?? String(error);
     396    const errorMessage = this.normalizeErrorMessage(error);
    368397    this.sendMetric(
    369398      'SUPER_TOKEN_INITIALIZATION_ERROR',
    … …  
    465494    // Use injected params (same object the constructor received) to stay consistent with
    466495    // 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/';
    470497    const files = [
    471498      'checkouts/custom/entities/card-form.min.js',
    … …  
    480507          let response = await fetch(basePath + file, { method: 'HEAD', cache: 'no-store' });
    481508          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            });
    483514          }
    484515          if (!response.ok) return;
    … …  
    496527          const fileName = (file.split('/').pop() as string).replace('.min.js', '');
    497528          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          );
    499534        } catch {
    500535          // Silence errors — must not impact checkout
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/platform/MelidataAdapter.ts

    r3663899 r3710292  
    2929 * Note: `super-token-metrics.js` (legacy) mirrored `MPCustomEventDispatcher`
    3030 * (`mp-checkout-error-dispatcher.js`) with a per-event `waitForMelidata` + 5s race.
    31  * This buffer approach intentionally diverges from that mirror; aligning the
    32  * 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.
    3333 */
    3434export class MelidataAdapter {
    3535  private readonly MELIDATA_ERROR_EVENT_NAME = 'mp_checkout_error';
    3636  private readonly MELIDATA_LOAD_TIMEOUT_METRIC = 'mp_melidata_load_timeout';
     37  private readonly MELIDATA_LOAD_TIMEOUT_MS = 5000;
    3738
    3839  private readonly sendMetric: MetricSender;
    … …  
    4950  private readinessArmed = false;
    5051  private loadListenerAdded = false;
     52  private readinessTimer: ReturnType<typeof setTimeout> | null = null;
    5153
    5254  constructor(sendMetric: MetricSender) {
    … …  
    8890    }
    8991
     92    this.armTimeout();
     93
    9094    if (window.melidataReady && typeof window.melidataReady.then === 'function') {
    9195      window.melidataReady.then(() => this.onReady()).catch(() => this.onFailure());
    … …  
    106110    if (!this.loadListenerAdded) {
    107111      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      );
    112120    }
    113121  }
    114122
     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
    115138  private onReady(): void {
     139    if (this.ready || this.failed) {
     140      return;
     141    }
    116142    this.ready = true;
     143    this.clearTimeout();
    117144    this.flush();
    118145  }
    119146
    120147  private onFailure(): void {
     148    if (this.ready || this.failed) {
     149      return;
     150    }
    121151    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.
    129155    this.sendMetric(this.MELIDATA_LOAD_TIMEOUT_METRIC, 'true', `buffered:${this.buffer.length}`);
    130156    this.flush();
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/platform/SdkReadinessWatcher.ts

    r3663899 r3710292  
    55export const FALLBACK_POLL_INTERVAL_MS = 50;
    66export const FALLBACK_POLL_MAX_WAIT_MS = 15000;
     7export const COMPOSE_RETRY_INTERVAL_MS = 1000;
    78
    89export const INIT_SOURCE = {
    … …  
    2324
    2425/**
    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,
    2627 * using three tiers in order of availability:
    2728 *
    … …  
    2930 *   2. Arrives via `mp_sdk_instance_ready`   → compose on event (SDK_INSTANCE_EVENT
    3031 *                                               or SDK_INSTANCE_EVENT_AFTER_LEGACY_WINDOW if >15s)
    31  *   3. Appears in `window.mpSdkInstance`     → compose on 50ms poll (FALLBACK_POLL),
    32  *                                               poll capped at 15s
     32 *   3. Appears in `window.mpSdkInstance`     → discover on the 50ms poll (FALLBACK_POLL),
     33 *                                               retry failed composition every 1s, capped at 15s
    3334 *
    3435 * After the poll cap, temporary load delays can still be recovered via
    … …  
    4647
    4748  private initialized = false;
    48   private pendingCompose: (() => void) | null = null;
     49  private pendingCompose: (() => void | boolean) | null = null;
    4950  private activePoll: ReturnType<typeof setInterval> | null = null;
     51  private nextComposeAttemptAt = 0;
     52  private failedComposeAttempts = 0;
     53  private reportRetryExhausted: ((attempts: number) => void) | null = null;
    5054
    5155  constructor(deps: SdkReadinessWatcherDeps) {
    … …  
    5761
    5862  /**
    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.
    6065   * The compose callback is stored so recoverIfSdkIsNowAvailable() can use it later.
    6166   *
    … …  
    6873   * the bundle bootstrap before recoverIfSdkIsNowAvailable() has a chance to retry.
    6974   */
    70   start(compose: () => void): void {
     75  start(
     76    compose: () => void | boolean,
     77    reportRetryExhausted?: (attempts: number) => void,
     78  ): void {
    7179    if (this.pendingCompose !== null) {
    7280      return;
    7381    }
    7482    this.pendingCompose = compose;
     83    this.reportRetryExhausted = reportRetryExhausted ?? null;
    7584
    7685    if (this.readSdkInstance()) {
    7786      this.composeWith(INIT_SOURCE.ALREADY_READY);
    78       return;
     87      if (this.initialized) {
     88        return;
     89      }
    7990    }
    8091
    … …  
    8697
    8798    this.activePoll = setInterval(() => {
    88       if (this.readSdkInstance()) {
     99      if (this.readSdkInstance() && this.now() >= this.nextComposeAttemptAt) {
    89100        this.composeWith(INIT_SOURCE.FALLBACK_POLL);
    90101      }
    … …  
    95106        clearInterval(this.activePoll);
    96107        this.activePoll = null;
     108      }
     109      if (!this.initialized && this.failedComposeAttempts > 0) {
     110        this.reportRetryExhausted?.(this.failedComposeAttempts);
    97111      }
    98112    }, FALLBACK_POLL_MAX_WAIT_MS);
    … …  
    137151    }
    138152
     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
    139162    if (this.activePoll !== null) {
    140163      clearInterval(this.activePoll);
    … …  
    142165    }
    143166
    144     this.pendingCompose();
    145167    this.initialized = true;
    146168    this.metrics.superTokenSdkLoaded();
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/platform/VariantConfigAdapter.ts

    r3663899 r3710292  
    99import { sendToCoreMonitor } from './coreMonitorPayload';
    1010import type { CoreMonitorPayload } from './coreMonitorPayload';
     11import { toTelemetryErrorMessage } from '@super-token/core/checkoutSession/ErrorClassification';
    1112
    1213interface AbConfig {
    … …  
    8586        // active === false — Kill switch: clears cookie and returns default for ALL visitors.
    8687        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;
    8890        this.trackMetric(this.METRIC_SUPER_TOKEN_AB_VARIANT, defaultVariant, 'source:kill_switch');
    8991        return defaultVariant;
    … …  
    113115      }
    114116
    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;
    118121
    119122      this.setVariantCookie(assignedVariant, cookieTtlDays);
    … …  
    121124      return assignedVariant;
    122125    } 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      );
    125131      return SUPER_TOKEN_FALLBACK_VARIANT;
    126132    }
    … …  
    164170    try {
    165171      const expiration = new Date(Date.now() + ttlInDays * this.MILLISECONDS_PER_DAY).toUTCString();
    166       document.cookie = SUPER_TOKEN_VARIANT_COOKIE + '=' + variantValue
    167         + ';expires=' + expiration + ';path=/;SameSite=Lax;Secure';
     172      document.cookie =
     173        SUPER_TOKEN_VARIANT_COOKIE + '=' + variantValue + ';expires=' + expiration + ';path=/;SameSite=Lax;Secure';
    168174    } catch (_) {
    169175      // Intentionally swallow cookie errors to avoid breaking checkout flow.
    … …  
    172178
    173179  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';
    176181  }
    177182
    178183  private selectVariantByWeight(variants: Record<string, { weight?: number }>): string {
    179184    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    );
    181189
    182190    if (totalWeight <= 0) {
    … …  
    216224          return null;
    217225        }
    218         return response.json()
     226        return response
     227          .json()
    219228          .then((parsedConfig: AbConfig) => {
    220229            // Guard: if timeout already fired, discard result to avoid
    … …  
    226235            return parsedConfig;
    227236          })
    228           .catch(() => {
     237          .catch((error) => {
    229238            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'));
    231240            }
    232241            return null;
    233242          });
    234243      })
    235       .catch(() => {
     244      .catch((error) => {
    236245        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'));
    238247        }
    239248        return null;
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/platform/constants.ts

    r3663899 r3710292  
    1111 * Injected into the init telemetry as `js_version`. Kept in sync with the CDN bundle's version.
    1212 */
    13 export const SUPER_TOKEN_JS_VERSION = '1.2.5';
     13export const SUPER_TOKEN_JS_VERSION = '1.2.6';
    1414
    1515export const V2_VARIANT = 'v2';
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/runtime/SuperTokenPaymentMethods.ts

    r3663899 r3710292  
    3030 * through `globalBridge.publish`.
    3131 */
    32 import { MPSuperTokenErrorCodes } from '@super-token/core/checkoutSession/ErrorClassification';
     32import { MPSuperTokenErrorCodes, toTelemetryErrorMessage } from '@super-token/core/checkoutSession/ErrorClassification';
     33import type { VariantViewPort } from '@super-token/ports';
    3334import { SelectSavedPaymentMethod } from '@super-token/useCases/SelectSavedPaymentMethod';
    3435import {
    … …  
    308309  MAX_ATTEMPTS_BY_ERROR_CODE = 3;
    309310  GET_PAYMENT_METHOD_TIMEOUT_MS = 5000;
    310   ACCOUNT_MONEY_ANIMATION_MS = 300;
    311311
    312312  // Attributes
    … …  
    337337    private readonly renderSavedMethods: RenderSavedMethods,
    338338    public wcEmailListener: PaymentMethodsEmailListener | null = null,
     339    private readonly variantView: VariantViewPort | null = null,
    339340  ) {
    340341    this.YELLOW_WALLET_PATH = params.yellow_wallet_path;
    … …  
    411412
    412413  reset(): void {
     414    const customCheckoutEntireElement = this.getCustomCheckoutEntireElement();
    413415    this.isRendering = false;
    414416    this.paymentMethods = [];
    … …  
    429431    this.removeHorizontalRow();
    430432    this.removePaymentMethodsListClasses();
    431     document.querySelectorAll(`.${this.SUPER_TOKEN_STYLES.BLOCK}`).forEach(blockElement => blockElement.remove());
     433    if (customCheckoutEntireElement) {
     434      this.variantView?.reset(customCheckoutEntireElement);
     435    }
    432436  }
    433437
    … …  
    454458  getSelectedPreloadedPaymentMethodFromActivePaymentMethods(): PaymentMethod | undefined {
    455459    return this.paymentMethods.find(
    456       paymentMethod => this.paymentMethodIdentifier(paymentMethod) === this.paymentMethodIdentifier(this.selectedPreloadedPaymentMethod),
     460      (paymentMethod) =>
     461        this.paymentMethodIdentifier(paymentMethod) ===
     462        this.paymentMethodIdentifier(this.selectedPreloadedPaymentMethod),
    457463    );
    458464  }
    … …  
    461467    if (!paymentMethod) return '';
    462468
    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    }`;
    464472  }
    465473
    … …  
    492500
    493501    const errorMessages: Record<string, { withRetry: string; withoutRetry: string }> = {
    494       'UPDATE_SECURITY_CODE_ERROR': {
     502      UPDATE_SECURITY_CODE_ERROR: {
    495503        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,
    497505      },
    498       'AUTHORIZE_PAYMENT_METHOD_ERROR': {
     506      AUTHORIZE_PAYMENT_METHOD_ERROR: {
    499507        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,
    501509      },
    502       'AUTHORIZE_PAYMENT_METHOD_USER_CANCELLED': {
     510      AUTHORIZE_PAYMENT_METHOD_USER_CANCELLED: {
    503511        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,
    505513      },
    506       'SELECT_PAYMENT_METHOD_ERROR': {
     514      SELECT_PAYMENT_METHOD_ERROR: {
    507515        withRetry: this.SELECT_PAYMENT_METHOD_ERROR_TEXT,
    508         withoutRetry: this.SELECT_PAYMENT_METHOD_ERROR_TEXT
     516        withoutRetry: this.SELECT_PAYMENT_METHOD_ERROR_TEXT,
    509517      },
    510518    };
    … …  
    562570  excludeRecaptchaFromPreValidation(): void {
    563571    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"]';
    565574
    566575    try {
    … …  
    579588      const jq = window.jQuery as unknown as JQueryWithFn | undefined;
    580589      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        );
    582594        return;
    583595      }
    … …  
    595607        // true) keep the token; otherwise omit it, scoping the disable to this call (finally).
    596608        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            : [];
    603617
    604618        if (!captchaFields.length) {
    … …  
    629643
    630644  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    );
    634650  }
    635651
    … …  
    678694    const accordionHeader = document.querySelector(`.${this.SUPER_TOKEN_STYLES.ACCORDION_HEADER}`);
    679695
    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);
    681699    accordionElement?.classList.remove(this.SUPER_TOKEN_STYLES.ACCORDION);
    682700    accordionHeader?.remove();
    … …  
    685703  removePaymentMethodsListClasses(): void {
    686704    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);
    688708
    689709    if (checkoutContainer) {
    … …  
    700720
    701721  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());
    705723  }
    706724
    … …  
    719737
    720738  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    }
    731747  }
    732748
    733749  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    );
    735753    const accordionContent = document.querySelector<HTMLElement>(`.${this.SUPER_TOKEN_STYLES.ACCORDION_CONTENT}`);
    736754    const accordionHeader = document.querySelector<HTMLElement>(`.${this.SUPER_TOKEN_STYLES.ACCORDION_HEADER}`);
    … …  
    758776    paymentMethodElement.classList.add(this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_SELECTED);
    759777    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 {
    766784    const paymentMethodSelected = document.querySelector(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_SELECTED}`) || null;
    767785    if (!paymentMethodSelected) return null;
    768786
    769     return accountPaymentMethods.find(paymentMethod => this.paymentMethodIdentifier(paymentMethod) === paymentMethodSelected.id);
     787    return accountPaymentMethods.find(
     788      (paymentMethod) => this.paymentMethodIdentifier(paymentMethod) === paymentMethodSelected.id,
     789    );
    770790  }
    771791
    … …  
    796816    }
    797817
    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    );
    799823
    800824    if (!installmentsDropdown) return;
    … …  
    819843    }
    820844
    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    );
    822850
    823851    if (!installmentsDropdown) return;
    … …  
    828856
    829857  showPaymentMethodDetails(paymentMethodElement: HTMLElement): void {
    830     paymentMethodElement.querySelector(`.${this.SUPER_TOKEN_STYLES.PAYMENT_METHOD_DETAILS}`)
    831       ?.classList
    832       ?.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);
    833861
    834862    this.setPaymentMethodChildrenAriaVisible(paymentMethodElement);
    … …  
    836864
    837865  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    });
    847871  }
    848872
    … …  
    882906
    883907  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    ) {
    885912      return 'new_credit_card';
    886913    }
    … …  
    900927    const formattedPaymentMethodName = this.formatSelectedPaymentMethodName(paymentMethod);
    901928
    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> {
    906940    await this.selectUseCase.execute({
    907941      session: new LegacySelectionSession(this),
    … …  
    9661000
    9671001    setTimeout(() => {
    968       document.dispatchEvent(
    969         this.selectedSupertokenMethodEvent(true)
    970       );
     1002      document.dispatchEvent(this.selectedSupertokenMethodEvent(true));
    9711003    }, 50);
    9721004  }
    9731005
    9741006  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    });
    9831013  };
    9841014
    … …  
    10001030
    10011031  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    );
    10031037  }
    10041038
    10051039  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    );
    10071045  }
    10081046
    10091047  isConsumerCredits(paymentMethod: PaymentMethod): paymentMethod is ConsumerCreditsPaymentMethod {
    10101048    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 -> AM
    1016     // toggle could otherwise leave two balance nodes coexisting and strand an --open
    1017     // 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 an
    1032     // orphan --open state on an unselected row).
    1033     requestAnimationFrame(() => {
    1034       if (!paymentMethodRow?.isConnected
    1035         || !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 = customCheckoutRoot
    1053       .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 = customCheckoutRoot
    1059       .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 what
    1070     // caused the title to nudge at the end of the close. A timeout fallback guarantees
    1071     // 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 end
    1080     // 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);
    10901049  }
    10911050
    … …  
    11061065  }
    11071066
    1108   shouldFetchPaymentMethodAgain(paymentMethod: PaymentMethod | null, paymentMethodElement: HTMLElement | null): boolean {
     1067  shouldFetchPaymentMethodAgain(
     1068    paymentMethod: PaymentMethod | null,
     1069    paymentMethodElement: HTMLElement | null,
     1070  ): boolean {
    11091071    if (!paymentMethod || !paymentMethodElement) throw new Error(MPSuperTokenErrorCodes.PAYMENT_METHOD_NOT_EXISTS);
    11101072
    11111073    if (paymentMethodElement.hasAttribute('data-cvv-is-required-double-check')) return false;
    11121074
    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    );
    11161080  }
    11171081
    … …  
    11371101
    11381102  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    );
    11421108  }
    11431109
    … …  
    11471113
    11481114  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));
    11521116  }
    11531117
    … …  
    11621126    const result = await Promise.race([
    11631127      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),
    11651129    ]);
    11661130
    … …  
    11731137    this.mpSuperTokenMetrics.getPaymentMethodLoadingTime(
    11741138      currentPaymentMethodIdentifier,
    1175       this.parseMsToSeconds(Date.now() - REQUEST_START_TIME)
     1139      this.parseMsToSeconds(Date.now() - REQUEST_START_TIME),
    11761140    );
    11771141
    … …  
    11841148    }
    11851149
    1186     const updatedPaymentMethodList = this.paymentMethods
    1187       .map((pm) => this
    1188         .paymentMethodIdentifier(pm) === this.paymentMethodIdentifier(updatedPaymentMethod)
    1189         ? updatedPaymentMethod : pm
    1190       );
     1150    const updatedPaymentMethodList = this.paymentMethods.map((pm) =>
     1151      this.paymentMethodIdentifier(pm) === this.paymentMethodIdentifier(updatedPaymentMethod)
     1152        ? updatedPaymentMethod
     1153        : pm,
     1154    );
    11911155
    11921156    this.paymentMethods = updatedPaymentMethodList;
    … …  
    12151179
    12161180  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    );
    12181184
    12191185    if (securityCodeContainer) {
    … …  
    12221188  }
    12231189
    1224   async handleWithEscPaymentMethod(paymentMethod: PaymentMethod, paymentMethodElement: HTMLElement): Promise<PaymentMethod | null> {
     1190  async handleWithEscPaymentMethod(
     1191    paymentMethod: PaymentMethod,
     1192    paymentMethodElement: HTMLElement,
     1193  ): Promise<PaymentMethod | null> {
    12251194    try {
    12261195      if (this.shouldFetchPaymentMethodAgain(paymentMethod, paymentMethodElement)) {
    … …  
    12381207        this.storeActivePaymentMethod(updatedPaymentMethod);
    12391208
    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        ) {
    12411214          this.removeSecurityCodeField(updatedPaymentMethod);
    12421215        }
    12431216
    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        );
    12511223
    12521224        this.hideDetailsSkeleton(paymentMethodElement);
    … …  
    12581230        return paymentMethod;
    12591231      } 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        );
    12651236
    12661237        return paymentMethod;
    … …  
    12721243        this.mpSuperTokenMetrics.getPaymentMethodLoadingTime(
    12731244          this.paymentMethodIdentifier(paymentMethod),
    1274           this.parseMsToSeconds(this.GET_PAYMENT_METHOD_TIMEOUT_MS)
     1245          this.parseMsToSeconds(this.GET_PAYMENT_METHOD_TIMEOUT_MS),
    12751246        );
    12761247
    … …  
    13741345
    13751346    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      )
    13781351    ) {
    13791352      return;
    … …  
    13981371
    13991372  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    );
    14011376    if (!securityCodeContainerElement) {
    14021377      return;
    … …  
    14041379
    14051380    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;
    14091390
    14101391    // Clean up
    … …  
    14431424
    14441425  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    ) {
    14461431      return;
    14471432    }
    … …  
    14551440        clearInterval(waitSecurityCodeFieldMountInterval);
    14561441
    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          );
    14631457          this.securityFieldDispatcherMissingReported = true;
    14641458        }
    14651459
    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          })
    14761472          .mount(`mp-super-token-security-code-input-${paymentMethod.token}`)
    14771473          .on('error', (e) => this.mpSuperTokenMetrics.errorToMountCVVField(e, paymentMethod))
    14781474          .on('ready', () => {
    14791475            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,
    14811477            });
    14821478
    … …  
    14841480            this.storeActiveSecurityCodeInstance(securityCodeField);
    14851481
    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              );
    14891493
    14901494              if (!securityCodeTooltip || !securityCodeInput) return;
    … …  
    15021506                window.MPCheckoutFieldsDispatcher.addEventListenerDispatcher(
    15031507                  null,
    1504                   "focusout",
    1505                   "super_token_cvv_filled",
     1508                  'focusout',
     1509                  'super_token_cvv_filled',
    15061510                  {
    1507                     onlyDispatch: true
    1508                   }
     1511                    onlyDispatch: true,
     1512                  },
    15091513                );
    15101514              }
    … …  
    15271531    const allPaymentMethods = document.querySelectorAll<HTMLElement>('.mp-super-token-payment-method');
    15281532
    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      );
    15311537      if (!valuePropPill) {
    15321538        return;
    … …  
    15451551
    15461552  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;
    15481555    if (!footer) {
    15491556      return;
    … …  
    15721579    const paymentMethodIdentifier = this.paymentMethodIdentifier(paymentMethod);
    15731580    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    );
    15761587
    15771588    if (!installmentsSelect || !installmentsLabel || !installmentsErrorHelper) return;
    … …  
    15891600
    15901601  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    );
    15921605    if (!securityCodeContainer) {
    15931606      return;
    … …  
    16181631    }
    16191632
    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    ) {
    16211638      return;
    16221639    }
    … …  
    16281645
    16291646    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      ) &&
    16311650      !this.verifyIsSecurityCodeReferenceTrue(paymentMethod)
    16321651    ) {
    … …  
    16341653    }
    16351654
    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    ) {
    16371659      this.setInstallmentsErrorState(paymentMethod, true);
    16381660    }
    … …  
    16611683      }
    16621684
    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      ) {
    16641690        return true;
    16651691      }
    … …  
    16691695      }
    16701696
    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      );
    16721700      if (!securityCodeContainer) {
    16731701        return false;
    … …  
    16961724      const paymentMethod = this.activePaymentMethod;
    16971725      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      ) {
    17011736        const paymentMethodType = this.isConsumerCredits(paymentMethod) ? 'consumer_credits' : 'credit_card';
    17021737        this.mpSuperTokenMetrics.errorToSubmitWithoutInstallmentSelected(paymentMethodType);
    … …  
    17071742      return true;
    17081743    } 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      );
    17101749      try {
    17111750        this.forceShowValidationErrors();
    … …  
    17561795
    17571796  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);
    17601800    if (!creditCardFormElement) return;
    17611801
    … …  
    17911831    const addAccordionClasses = (accordionElement: HTMLElement): void => {
    17921832      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);
    17941836    };
    17951837
    … …  
    18481890
    18491891  renderAccountPaymentMethods(accountPaymentMethods: PaymentMethod[], amount: string | null): void {
     1892    let ownsRenderingLock = false;
    18501893    try {
    18511894      this.storeAmount(amount);
    1852       this.storeActivePaymentMethod(this.getPaymentMethodSelectedFromDOMToAccountPaymentMethods(accountPaymentMethods) ?? null);
     1895      this.storeActivePaymentMethod(
     1896        this.getPaymentMethodSelectedFromDOMToAccountPaymentMethods(accountPaymentMethods) ?? null,
     1897      );
    18531898
    18541899      if (this.paymentMethodsAreRendered() || this.isRendering) return;
    … …  
    18561901      if (!this.hasStoredPaymentMethods()) this.storePaymentMethodsInMemory(accountPaymentMethods);
    18571902      this.isRendering = true;
     1903      ownsRenderingLock = true;
    18581904
    18591905      const customCheckoutEntireElement = this.getCustomCheckoutEntireElement();
    18601906
    18611907      if (!customCheckoutEntireElement) {
    1862         this.isRendering = false;
    18631908        throw new Error(MPSuperTokenErrorCodes.CUSTOM_CHECKOUT_ENTIRE_ELEMENT_NOT_FOUND);
    18641909      }
    … …  
    18661911      this.onCustomCheckoutWasRendered(customCheckoutEntireElement, accountPaymentMethods);
    18671912
    1868       this.isRendering = false;
    18691913      setTimeout(() => {
    18701914        const sdkInstanceId = this.mpSuperTokenMetrics.getSdkInstanceId();
    … …  
    18741918    } catch (error) {
    18751919      this.mpSuperTokenMetrics.errorToRenderAccountPaymentMethods(error);
     1920    } finally {
     1921      if (ownsRenderingLock) {
     1922        this.isRendering = false;
     1923      }
    18761924    }
    18771925  }
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/runtime/SuperTokenTriggerHandler.ts

    r3663899 r3710292  
    3333import { ResetFlow } from '@super-token/useCases/ResetFlow';
    3434import { EnsureEmailListenerRegistered } from '@super-token/useCases/EnsureEmailListenerRegistered';
    35 import {
    36   LegacyTriggerSession,
    37   createFetchAndRenderMetrics,
    38 } from '@super-token/adapters/session/LegacyTriggerSession';
     35import { LegacyTriggerSession, createFetchAndRenderMetrics } from '@super-token/adapters/session/LegacyTriggerSession';
    3936import {
    4037  LegacyLoadOrchestrationSession,
    … …  
    4643import { LegacyEmailListenerSession } from '@super-token/adapters/session/LegacyEmailListenerSession';
    4744import type { PaymentMethod } from '@super-token/types/external-globals';
     45import { toTelemetryErrorMessage } from '@super-token/core/checkoutSession/ErrorClassification';
    4846
    4947/** The subset of the ported authenticator the trigger handler reads and forwards to the sessions. */
    … …  
    217215        this.mpSuperTokenMetrics.sendMetric(
    218216          RESTORE_ERROR_METRIC,
    219           (error as { message?: string })?.message || 'unknown',
     217          toTelemetryErrorMessage(error, 'unknown'),
    220218          RESTORE_ERROR_MESSAGE,
    221219        );
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/session/LegacyRenderSession.ts

    r3663899 r3710292  
    2424/** The legacy metrics instance methods the render session forwards to. */
    2525interface LegacyRenderMetrics {
     26  errorToRenderAccountPaymentMethods(error: unknown): void;
    2627  installmentsFilled(methodType: string): void;
    2728  renderCreditsContract(success: boolean, error?: unknown): void;
    … …  
    2930  renderConsumerCreditsHint(success: boolean, error?: unknown): void;
    3031  renderConsumerCreditsDueDate(success: boolean, error?: unknown): void;
     32  renderConsumerCreditsDetailsInnerHTML(success: boolean): void;
    3133  errorToUpdateCreditsContract(error: unknown): void;
    3234}
    3335
    34 // Module-level, mirroring the legacy per-controller `installmentsDispatcherMissingReported` flag so
    35 // 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.
     38const dispatcherMissingContexts = new Set<string>();
    3739
    3840/**
    … …  
    8183
    8284  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    ) {
    8490      return;
    8591    }
    8692    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);
    8898  }
    8999
    … …  
    129139    this.legacy.mpSuperTokenMetrics.renderConsumerCreditsDueDate(success, error);
    130140  }
     141
     142  recordConsumerCreditsDetails(success: boolean): void {
     143    this.legacy.mpSuperTokenMetrics.renderConsumerCreditsDetailsInnerHTML(success);
     144  }
    131145}
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/validation/checkoutValidationResolver.ts

    r3663899 r3710292  
    1717 */
    1818
     19import { toTelemetryErrorMessage } from '@super-token/core/checkoutSession/ErrorClassification';
     20
    1921const METRIC_DETAIL = 'validate_checkout_then_continue';
    2022const MAX_ANCESTOR_DEPTH = 20;
    … …  
    8587    // WooCommerce field names follow billing_*/shipping_*/terms conventions and never
    8688    // 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}"]`;
    9093    return Array.from(document.querySelectorAll(selector));
    9194  } catch {
    … …  
    160163
    161164function 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  );
    163171}
    164172
    … …  
    226234    }
    227235
    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);
    229238
    230239    return {
    231240      action: VALIDATION_ACTION.FAIL_OPEN,
    232241      reason: FAIL_OPEN_REASON.UNEXPECTED_RESPONSE,
    233       detail: res?.data?.error,
     242      detail: responseError,
    234243    };
    235244  } 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);
    238246    emitMetric(VALIDATION_METRIC.UNEXPECTED_ERROR, errorMessage);
    239247
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/view/shared/consumerCreditsRow.ts

    r3663899 r3710292  
    243243): HTMLElement {
    244244  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  }
    246252  wireConsumerCredits(row, paymentMethod, deps, session, hint);
    247253  return row;
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/view/shared/typedRow.ts

    r3663899 r3710292  
    3636  presentation: RowPresentation,
    3737  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    }
    4178  }
    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.consumerCreditsHint
    52   ) {
    53     return buildConsumerCreditsRow(
    54       paymentMethod,
    55       deps,
    56       presentation,
    57       context.rowSession,
    58       context.installmentOptions,
    59       context.consumerCreditsHint,
    60     );
    61   }
    62 
    63   return context.buildRow
    64     ? context.buildRow(paymentMethod)
    65     : buildPaymentMethodRow(paymentMethod, deps, presentation);
    6679}
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/view/v2.1/SavedCardsView.ts

    r3663899 r3710292  
    100100  // interactive row for a given method type. Only the v2.1 chrome (grouped blocks, e-mail header)
    101101  // 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 =>
    104104      buildTypedRow(paymentMethod, this.deps, this.rowPresentation, context);
    105105  }
    … …  
    122122    title: string,
    123123    blockHeader: BlockHeaderData | null,
    124     buildRow: (paymentMethod: PaymentMethod) => HTMLElement,
     124    buildRow: (paymentMethod: PaymentMethod) => HTMLElement | null,
    125125  ): void {
    126126    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) {
    127133      return;
    128134    }
    … …  
    130136      classes: [V21_STYLES.BLOCK, blockModifierClass],
    131137      attrs: { role: 'group', 'aria-label': title, tabindex: '0' },
    132       children: [this.buildBlockHeader(title, blockHeader), ...paymentMethods.map(buildRow)],
     138      children: [this.buildBlockHeader(title, blockHeader), ...rows],
    133139    });
    134140    container.insertBefore(section, container.firstChild);
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/adapters/view/v2/SavedCardsView.ts

    r3663899 r3710292  
    2525    // Build each row through the shared per-type dispatch so v2 wires selection (and card
    2626    // 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 =>
    2828      buildTypedRow(paymentMethod, this.deps, V2_ROW_PRESENTATION, context);
    2929    // Insert each row at the top in reverse so the first method ends up first, then prepend the
    3030    // single list header above them all (faithful to the legacy insert order).
     31    let renderedRows = 0;
    3132    [...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      }
    3338    });
    34     container.insertBefore(this.buildListHeader(), container.firstChild);
     39    if (renderedRows > 0) {
     40      container.insertBefore(this.buildListHeader(), container.firstChild);
     41    }
    3542  }
    3643
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/bootstrap.ts

    r3663899 r3710292  
    5757
    5858if (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);
    6066}
    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  
    1212} from '@super-token/adapters/platform';
    1313import type { SuperTokenInstances } from '@super-token/types/instances';
     14import { toTelemetryErrorMessage } from '@super-token/core/checkoutSession/ErrorClassification';
    1415
    1516// The health check validates the composed instances. In the hybrid they are the legacy globals
    1617// the CDN bundle builds; return null until they exist so the checker can re-evaluate later.
    1718function 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;
    1926  if (!mpSuperTokenTriggerHandler) {
    2027    return null;
    … …  
    5158  // watcher's card-form recovery path must re-run the composition for a late SDK that arrived after
    5259  // 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  );
    6188}
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/composition/runtimeComposition.ts

    r3663899 r3710292  
    1616import { SuperTokenTriggerHandler } from '@super-token/adapters/runtime/SuperTokenTriggerHandler';
    1717import { SuperTokenDebounce } from '@super-token/adapters/runtime/SuperTokenDebounce';
    18 import {
    19   CoreMonitorMetricsAdapter,
    20   createDomainConfig,
    21 } from '@super-token/adapters/platform';
     18import { CoreMonitorMetricsAdapter, createDomainConfig } from '@super-token/adapters/platform';
    2219import type { SuperTokenDomainParams } from '@super-token/adapters/platform';
    23 import { SUPER_TOKEN_JS_VERSION } from '@super-token/adapters/platform/constants';
     20import { SUPER_TOKEN_FALLBACK_VARIANT, SUPER_TOKEN_JS_VERSION } from '@super-token/adapters/platform/constants';
     21import { toTelemetryErrorMessage } from '@super-token/core/checkoutSession/ErrorClassification';
    2422import { PaymentMethodCatalog } from '@super-token/core/checkoutSession/PaymentMethodCatalog';
    2523import { PaymentMethodRegistry } from '@super-token/core/paymentMethods/registry';
    … …  
    5351  // Clear the poll here too: without it, if the ready event fires first the interval keeps
    5452  // 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  );
    5961  setTimeout(() => clearInterval(poll), FALLBACK_POLL_MAX_WAIT_MS);
    6062}
    … …  
    8890  recompose: { current: () => void },
    8991  metrics: CoreMonitorMetricsAdapter,
    90 ): void {
     92): Promise<void> {
    9193  const viewParams = domainParams as unknown as SuperTokenViewParams;
    9294
    … …  
    123125      }
    124126
    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        };
    127131      const entityMetrics = new CoreMonitorMetricsAdapter(
    128132        sdk,
    … …  
    139143      let paymentMethods: SuperTokenPaymentMethods;
    140144
     145      const getView = (): VariantViewPort => {
     146        if (!view) {
     147          view = createVariantView(variant, createVariantViewDeps(viewParams, emailListener as EmailListenerPort));
     148        }
     149        return view;
     150      };
     151
    141152      const renderSavedMethods = (container: HTMLElement, methods: PaymentMethod[]): void => {
    142153        // One stylesheet serves both variants; the root's data-variant scopes each variant's rules.
    143154        container.setAttribute('data-variant', variant);
    144         if (!view) {
    145           view = createVariantView(variant, createVariantViewDeps(viewParams, emailListener as EmailListenerPort));
    146         }
    147155        // The view builds every row itself now (createPaymentMethodElement is dropped), so buildRow
    148156        // is omitted; the render session only supplies the interactive-row behaviour primitives.
    149157        const session = new LegacyRenderSession(paymentMethods as unknown as LegacyRenderController);
    150         view.renderSavedPaymentMethods({
     158        getView().renderSavedPaymentMethods({
    151159          container,
    152160          paymentMethods: orderAndDecorate(methods),
    … …  
    157165      };
    158166
    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      );
    160175      const authenticator = new SuperTokenAuthenticator(sdk, paymentMethods, entityMetrics, bundleParams.platform_id);
    161176      const errorHandler = new SuperTokenErrorHandler(paymentMethods, entityMetrics);
    … …  
    188203      void waitForCustomCheckoutHandler().then((handlerFound) => {
    189204        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          );
    191210        }
    192211      });
    … …  
    202221        buildAndPublishInstances();
    203222      } 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));
    206224      }
    207225    });
    208226  };
    209227
    210   resolveSuperTokenVariant()
     228  return resolveSuperTokenVariant()
    211229    .then(composeWithVariant)
    212230    .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      }
    215237    });
    216238}
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/core/checkoutSession/ErrorClassification.ts

    r3663899 r3710292  
    2525  FETCH_PAYMENT_METHOD_NOT_FOUND: 'FETCH_PAYMENT_METHOD_NOT_FOUND',
    2626  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',
    2928
    3029  // System errors
    … …  
    3837} as const;
    3938
    40 export type SuperTokenErrorCode =
    41   (typeof MPSuperTokenErrorCodes)[keyof typeof MPSuperTokenErrorCodes];
     39export type SuperTokenErrorCode = (typeof MPSuperTokenErrorCodes)[keyof typeof MPSuperTokenErrorCodes];
     40
     41const KNOWN_ERROR_CODES: readonly SuperTokenErrorCode[] = Object.values(MPSuperTokenErrorCodes);
     42
     43const 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';
     45const SENSITIVE_ERROR_KEY = new RegExp(`^(?:${SENSITIVE_ERROR_KEY_NAMES})$`, 'i');
     46const EMAIL_ADDRESS_PATTERN = /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi;
     47const BEARER_TOKEN_PATTERN = /\b(Bearer\s+)[A-Z0-9._~+/-]+=*/gi;
     48const 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.
     52const AUTHORIZATION_HEADER_PATTERN = /\b((?:Proxy-)?Authorization\s*:\s*)[^\r\n]*/gi;
     53const AUTHORIZATION_REDACTION_PLACEHOLDER = '__MP_AUTHORIZATION_REDACTED__';
     54const JWT_TOKEN_PATTERN = /\beyJ[A-Z0-9_-]*\.[A-Z0-9_-]+\.[A-Z0-9_-]+\b/gi;
     55const 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
     60const 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
     76const 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 */
     95export 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 */
     154export 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};
    42177
    43178/**
    … …  
    102237 * caller from the retry counter (SuperTokenState.shouldAllowRetry).
    103238 */
    104 export const resolveErrorMessage = (
    105   errorCode: string,
    106   allowRetry: boolean,
    107   copy: ErrorMessageCopy,
    108 ): string => {
     239export const resolveErrorMessage = (errorCode: string, allowRetry: boolean, copy: ErrorMessageCopy): string => {
    109240  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;
    112242
    113243  if (!errorConfig) {
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/core/paymentMethods/BasePaymentMethodWithInstallments.ts

    r3663899 r3710292  
    5959      (installment) =>
    6060        installment.installment_rate === 0 &&
    61         installment.installment_rate_collector.includes('MERCADOPAGO'),
     61        (installment.installment_rate_collector ?? []).includes('MERCADOPAGO'),
    6262    );
    6363    return installmentsWithoutFee.length > 0
    … …  
    9595    const installmentAmount = this.formatAmount(installment.installment_amount);
    9696    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');
    9898    const totalAmount = this.formatAmount(installment.total_amount);
    9999
  • woocommerce-mercadopago/trunk/assets/js/checkouts/super-token/ports/VariantViewPort.ts

    r3663899 r3710292  
    4141  /** Reports (once) that MPCheckoutFieldsDispatcher is unavailable at installments setup. */
    4242  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;
    4345
    4446  // ─── Consumer credits (async SDK contract + state + metrics) ───
    … …  
    5860  recordConsumerCreditsHint(success: boolean, error?: unknown): void;
    5961  recordConsumerCreditsDueDate(success: boolean, error?: unknown): void;
     62  /** Records whether the consumer-credits details section was constructed successfully. */
     63  recordConsumerCreditsDetails(success: boolean): void;
    6064}
    6165
  • woocommerce-mercadopago/trunk/i18n/languages/woocommerce-mercadopago-es.po

    r3609381 r3710292  
    34873487#: ../../src/Translations/StoreTranslations.php:386
    34883488msgid "As it spelled on the card."
    3489 msgstr "Complétalo como aparece en la tarjeta."
     3489msgstr "Como aparece en la tarjeta."
    34903490
    34913491#: ../../src/Translations/StoreTranslations.php:387
    … …  
    46784678"momento."
    46794679
     4680#: ../../src/Translations/StoreTranslations.php:387
     4681msgid "You can pay with card"
     4682msgstr "Puedes pagar con tarjeta"
     4683
     4684#: ../../src/Translations/StoreTranslations.php:388
     4685msgid "Card"
     4686msgstr "Tarjeta"
     4687
     4688#: ../../src/Translations/StoreTranslations.php:389
     4689msgid "Enter the {digits} numbers on your card."
     4690msgstr "Ingresa los {digits} números de tu tarjeta."
     4691
     4692#: ../../src/Translations/StoreTranslations.php:390
     4693msgid "Enter two digits for the month and two digits for the year."
     4694msgstr "Ingresa dos dígitos para el mes y dos dígitos para el año."
     4695
     4696#: ../../src/Translations/StoreTranslations.php:391
     4697msgid "Enter your {digits} digit code."
     4698msgstr "Ingresa tu código de {digits} dígitos."
     4699
     4700#: ../../src/Translations/StoreTranslations.php:392
     4701msgid "Enter between {min} and {max} digits for your ID number."
     4702msgstr "Ingresa entre {min} y {max} dígitos para tu número de documento."
     4703
     4704#: ../../src/Translations/StoreTranslations.php:393
     4705msgid "Enter the {digits} digits of your ID number."
     4706msgstr "Ingresa los {digits} dígitos de tu número de documento."
     4707
    46804708#~ msgid ""
    46814709#~ "By disabling it, you will disable all credit cards payments from Mercado "
  • woocommerce-mercadopago/trunk/i18n/languages/woocommerce-mercadopago-es_MX.po

    r3609381 r3710292  
    34883488#: ../../src/Translations/StoreTranslations.php:386
    34893489msgid "As it spelled on the card."
    3490 msgstr "Complétalo como aparece en la tarjeta."
     3490msgstr "Como aparece en la tarjeta."
    34913491
    34923492#: ../../src/Translations/StoreTranslations.php:387
    … …  
    46814681"momento."
    46824682
     4683#: ../../src/Translations/StoreTranslations.php:387
     4684msgid "You can pay with card"
     4685msgstr "Puedes pagar con tarjeta"
     4686
     4687#: ../../src/Translations/StoreTranslations.php:388
     4688msgid "Card"
     4689msgstr "Tarjeta"
     4690
     4691#: ../../src/Translations/StoreTranslations.php:389
     4692msgid "Enter the {digits} numbers on your card."
     4693msgstr "Ingresa los {digits} números de tu tarjeta."
     4694
     4695#: ../../src/Translations/StoreTranslations.php:390
     4696msgid "Enter two digits for the month and two digits for the year."
     4697msgstr "Ingresa dos dígitos para el mes y dos dígitos para el año."
     4698
     4699#: ../../src/Translations/StoreTranslations.php:391
     4700msgid "Enter your {digits} digit code."
     4701msgstr "Ingresa tu código de {digits} dígitos."
     4702
     4703#: ../../src/Translations/StoreTranslations.php:392
     4704msgid "Enter between {min} and {max} digits for your ID number."
     4705msgstr "Ingresa entre {min} y {max} dígitos para tu número de documento."
     4706
     4707#: ../../src/Translations/StoreTranslations.php:393
     4708msgid "Enter the {digits} digits of your ID number."
     4709msgstr "Ingresa los {digits} dígitos de tu número de documento."
     4710
    46834711#~ msgid ""
    46844712#~ "By disabling it, you will disable all credit cards payments from Mercado "
  • woocommerce-mercadopago/trunk/i18n/languages/woocommerce-mercadopago-pt.po

    r3609381 r3710292  
    34943494#: ../../src/Translations/StoreTranslations.php:386
    34953495msgid "As it spelled on the card."
    3496 msgstr "Preencha o nome como está no cartão."
     3496msgstr "Conforme aparece no cartão."
    34973497
    34983498#: ../../src/Translations/StoreTranslations.php:387
    … …  
    46954695"instantes."
    46964696
     4697#: ../../src/Translations/StoreTranslations.php:387
     4698msgid "You can pay with card"
     4699msgstr "Você pode pagar com cartão"
     4700
     4701#: ../../src/Translations/StoreTranslations.php:388
     4702msgid "Card"
     4703msgstr "Cartão"
     4704
     4705#: ../../src/Translations/StoreTranslations.php:389
     4706msgid "Enter the {digits} numbers on your card."
     4707msgstr "Digite os {digits} números do seu cartão."
     4708
     4709#: ../../src/Translations/StoreTranslations.php:390
     4710msgid "Enter two digits for the month and two digits for the year."
     4711msgstr "Insira dois dígitos para o mês e dois dígitos para o ano."
     4712
     4713#: ../../src/Translations/StoreTranslations.php:391
     4714msgid "Enter your {digits} digit code."
     4715msgstr "Digite seu código de {digits} dígitos."
     4716
     4717#: ../../src/Translations/StoreTranslations.php:392
     4718msgid "Enter between {min} and {max} digits for your ID number."
     4719msgstr "Insira entre {min} e {max} dígitos para o número do seu documento."
     4720
     4721#: ../../src/Translations/StoreTranslations.php:393
     4722msgid "Enter the {digits} digits of your ID number."
     4723msgstr "Insira os {digits} dígitos do número do seu documento."
     4724
    46974725#~ msgid ""
    46984726#~ "By disabling it, you will disable all credit cards payments from Mercado "
  • woocommerce-mercadopago/trunk/i18n/languages/woocommerce-mercadopago.pot

    r3609381 r3710292  
    88"Content-Transfer-Encoding: 8bit\n"
    99"Last-Translator: Mercado Pago Developers <woocommerce.dev@mercadopago.com>\n"
    10 "POT-Creation-Date: 2026-06-30 16:56+0000\n"
     10"POT-Creation-Date: 2026-08-28 12:40+0000\n"
    1111"Project-Id-Version: undefined\n"
    1212"X-Poedit-Basepath: ..\n"
    … …  
    1717"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    1818
    19 #: ../../src/WoocommerceMercadoPago.php:545, ../../src/Translations/AdminTranslations.php:219
     19#: ../../src/WoocommerceMercadoPago.php:551, ../../src/Translations/AdminTranslations.php:219
    2020msgid "Activate WooCommerce"
    2121msgstr ""
    2222
    23 #: ../../src/WoocommerceMercadoPago.php:546, ../../src/Translations/AdminTranslations.php:220
     23#: ../../src/WoocommerceMercadoPago.php:552, ../../src/Translations/AdminTranslations.php:220
    2424msgid "Install WooCommerce"
    2525msgstr ""
    2626
    27 #: ../../src/WoocommerceMercadoPago.php:547, ../../src/Translations/AdminTranslations.php:221
     27#: ../../src/WoocommerceMercadoPago.php:553, ../../src/Translations/AdminTranslations.php:221
    2828msgid "See WooCommerce"
    2929msgstr ""
    3030
    31 #: ../../src/WoocommerceMercadoPago.php:549, ../../src/Translations/AdminTranslations.php:210
     31#: ../../src/WoocommerceMercadoPago.php:555, ../../src/Translations/AdminTranslations.php:210
    3232msgid "The Mercado Pago module needs an active version of %s in order to work!"
    3333msgstr ""
    3434
    35 #: ../../src/Gateways/CustomGateway.php:306
     35#: ../../src/Gateways/CustomGateway.php:407
    3636msgid "Could not load the subscription to change the payment method."
    3737msgstr ""
    3838
    39 #: ../../src/Gateways/CustomGateway.php:321
     39#: ../../src/Gateways/CustomGateway.php:422
    4040msgid "Subscription is not linked to Mercado Pago yet."
    4141msgstr ""
    4242
    43 #: ../../src/Gateways/CustomGateway.php:329
     43#: ../../src/Gateways/CustomGateway.php:430
    4444msgid "Please enter the new card data to continue."
    4545msgstr ""
    4646
    47 #: ../../src/Gateways/CustomGateway.php:340
     47#: ../../src/Gateways/CustomGateway.php:441
    4848msgid "Recurring Payments credential is missing. Contact the store administrator."
    4949msgstr ""
    5050
    51 #: ../../src/Gateways/CustomGateway.php:366
     51#: ../../src/Gateways/CustomGateway.php:467
    5252msgid "We could not process the card change. Please try again in a few minutes."
    5353msgstr ""
    5454
    55 #: ../../src/Gateways/CustomGateway.php:379
     55#: ../../src/Gateways/CustomGateway.php:480
    5656msgid "We could not add the new card. Please try a different card."
    5757msgstr ""
    5858
    59 #: ../../src/Gateways/CustomGateway.php:389, ../../src/Gateways/CustomGateway.php:440
     59#: ../../src/Gateways/CustomGateway.php:490, ../../src/Gateways/CustomGateway.php:543
    6060msgid "Payment method updated successfully."
    6161msgstr ""
    6262
    6363#. translators: %s = subscription id
    64 #: ../../src/Gateways/CustomGateway.php:521
     64#: ../../src/Gateways/CustomGateway.php:623
    6565msgid "Mercado Pago: critical inconsistency removing the old card on subscription %s. Please check WC > Status > Logs (channel: mercadopago-subscriptions)."
    6666msgstr ""
    6767
    68 #: ../../src/Gateways/CustomGateway.php:913
     68#: ../../src/Gateways/CustomGateway.php:1014
    6969msgid "Subscription"
    7070msgstr ""
    7171
    72 #: ../../src/Gateways/CustomGateway.php:1047
     72#: ../../src/Gateways/CustomGateway.php:1148
    7373msgid "Please fill in at least one Pre-approval Access Token to activate Recurring Payments."
    7474msgstr ""
    7575
    76 #: ../../src/Gateways/CustomGateway.php:1061
     76#: ../../src/Gateways/CustomGateway.php:1166
    7777msgid "Sandbox"
    7878msgstr ""
    7979
    80 #: ../../src/Gateways/CustomGateway.php:1062
     80#: ../../src/Gateways/CustomGateway.php:1167
    8181msgid "Production"
    8282msgstr ""
    8383
    8484#. translators: %s: environment name (Production or Sandbox)
    85 #: ../../src/Gateways/CustomGateway.php:1068
     85#: ../../src/Gateways/CustomGateway.php:1173
    8686msgid "Please fill in the %s Pre-approval Access Token to activate Recurring Payments in this environment."
    8787msgstr ""
    8888
    8989#. translators: %s: environment name (Production or Sandbox)
    90 #: ../../src/Gateways/CustomGateway.php:1130
     90#: ../../src/Gateways/CustomGateway.php:1181
    9191msgid "Please fill in the %s Pre-approval Public Key to activate Recurring Payments in this environment."
    9292msgstr ""
    9393
    94 #: ../../src/Gateways/CustomGateway.php:1083
     94#: ../../src/Gateways/CustomGateway.php:1202
    9595msgid "Recurring credential"
    9696msgstr ""
    9797
    98 #: ../../src/Gateways/CustomGateway.php:1090
     98#: ../../src/Gateways/CustomGateway.php:1209
    9999msgid "Test credential"
    100100msgstr ""
    101101
    102 #: ../../src/Gateways/CustomGateway.php:1151
     102#: ../../src/Gateways/CustomGateway.php:1270
    103103msgid "Error validating recurring payments credential."
    104104msgstr ""
    105105
    106 #: ../../src/Gateways/CustomGateway.php:1146
     106#: ../../src/Gateways/CustomGateway.php:1265
    107107msgid "Pre-approval credentials validated successfully"
    108108msgstr ""
    109109
    110 #: ../../src/Gateways/CustomGateway.php:1147
     110#: ../../src/Gateways/CustomGateway.php:1266
    111111msgid "Application"
    112112msgstr ""
    113113
    114 #: ../../src/Gateways/CustomGateway.php:1167
     114#: ../../src/Gateways/CustomGateway.php:1286
    115115msgid "Invalid Token format."
    116116msgstr ""
    117117
    118 #: ../../src/Gateways/CustomGateway.php:1168
     118#: ../../src/Gateways/CustomGateway.php:1287
    119119msgid "Invalid or expired Token."
    120120msgstr ""
    121121
    122 #: ../../src/Gateways/CustomGateway.php:1169
     122#: ../../src/Gateways/CustomGateway.php:1288
    123123msgid "This Access Token does not belong to the expected application. Contact your Mercado Pago commercial consultant."
    124124msgstr ""
    125125
    126 #: ../../src/Gateways/CustomGateway.php:1170
     126#: ../../src/Gateways/CustomGateway.php:1289
    127127msgid "Credential application not found. Please check if the token is valid."
    128128msgstr ""
    129129
    130 #: ../../src/Gateways/CustomGateway.php:1171
     130#: ../../src/Gateways/CustomGateway.php:1290
    131131msgid "Could not validate the credential at this time. Please try again."
    132132msgstr ""
    133133
    134 #: ../../src/Gateways/CustomGateway.php:1172
     134#: ../../src/Gateways/CustomGateway.php:1291
    135135msgid "Could not verify application scopes. Please contact your Mercado Pago commercial consultant."
    136136msgstr ""
    137137
    138 #: ../../src/Gateways/CustomGateway.php:1173
     138#: ../../src/Gateways/CustomGateway.php:1292
    139139msgid "This credential does not have the required Pre-approval scope. Please request activation from your Mercado Pago commercial consultant."
    140140msgstr ""
    141141
    142 #: ../../src/Gateways/CustomGateway.php:1174
     142#: ../../src/Gateways/CustomGateway.php:1293
    143143msgid "This application is inactive in Mercado Pago. Contact your Mercado Pago commercial consultant."
    144144msgstr ""
    145145
    146 #: ../../src/Gateways/CustomGateway.php:1175
     146#: ../../src/Gateways/CustomGateway.php:1294
    147147msgid "This application is blocked in Mercado Pago. Contact your Mercado Pago commercial consultant."
    148148msgstr ""
    149149
    150 #: ../../src/Gateways/CustomGateway.php:1176
     150#: ../../src/Gateways/CustomGateway.php:1295
    151151msgid "This application is disabled in Mercado Pago. Contact your Mercado Pago commercial consultant."
    152152msgstr ""
    153153
    154 #: ../../src/Gateways/CustomGateway.php:1177
     154#: ../../src/Gateways/CustomGateway.php:1296
    155155msgid "Unexpected response when validating the credential."
    156156msgstr ""
    157157
    158 #: ../../src/Gateways/CustomGateway.php:1180
     158#: ../../src/Gateways/CustomGateway.php:1299
    159159msgid "An error occurred while validating the credential."
    160160msgstr ""
    161161
    162 #: ../../src/Hooks/Subscriptions.php:130
     162#: ../../src/Hooks/Subscriptions.php:145
    163163msgid "Mercado Pago: subscription data incomplete — no subscription ID found."
    164164msgstr ""
    165165
    166 #: ../../src/Hooks/Subscriptions.php:144
     166#: ../../src/Hooks/Subscriptions.php:159
    167167msgid "Mercado Pago: subscription access token not configured."
    168168msgstr ""
    169169
    170 #: ../../src/Hooks/Subscriptions.php:163
     170#: ../../src/Hooks/Subscriptions.php:182
     171msgid "Mercado Pago: renewal failed — could not determine conversion rate. WCS will retry."
     172msgstr ""
     173
     174#: ../../src/Hooks/Subscriptions.php:197
    171175msgid "Mercado Pago: renewal failed due to a connectivity error. WCS will retry."
    172176msgstr ""
    173177
    174 #: ../../src/Hooks/Subscriptions.php:171
     178#: ../../src/Hooks/Subscriptions.php:205
    175179msgid "Mercado Pago: subscription credentials invalid or revoked."
    176180msgstr ""
    177181
    178 #: ../../src/Hooks/Subscriptions.php:190
     182#: ../../src/Hooks/Subscriptions.php:232
    179183msgid "Mercado Pago: awaiting payment confirmation."
    180184msgstr ""
    181185
    182 #: ../../src/Hooks/Subscriptions.php:282
     186#: ../../src/Hooks/Subscriptions.php:330
    183187msgid "Your Pre-approval credentials are invalid or lost scope. Subscription renewals are failing. Go to Settings > Recurring Payments to reconfigure."
    184188msgstr ""
    185189
    186190#. translators: %d: number of subscriptions with incomplete data
    187 #: ../../src/Hooks/Subscriptions.php:295
     191#: ../../src/Hooks/Subscriptions.php:343
    188192msgid "We found %d subscriptions with incomplete data. Renewals for these subscriptions will not work. Contact support."
    189193msgstr ""
    190194
    191 #: ../../src/Hooks/Subscriptions.php:392
     195#: ../../src/Hooks/Subscriptions.php:470
    192196msgid "Subscription renewal"
    193197msgstr ""
    … …  
    18141818msgstr ""
    18151819
    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:483, ../../src/Translations/StoreTranslations.php:485
     1820#: ../../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
    18171821msgid "Fill out this field."
    18181822msgstr ""
    … …  
    22782282msgstr ""
    22792283
    2280 #: ../../src/Translations/AdminTranslations.php:1556
    2281 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 
    22842284#: ../../src/Translations/StoreTranslations.php:167
    22852285msgid "discount of"
    … …  
    23102310msgstr ""
    23112311
    2312 #: ../../src/Translations/StoreTranslations.php:174, ../../src/Translations/StoreTranslations.php:227, ../../src/Translations/StoreTranslations.php:353, ../../src/Translations/StoreTranslations.php:456, ../../src/Translations/StoreTranslations.php:539, ../../src/Translations/StoreTranslations.php:597
     2312#: ../../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
    23132313msgid "There was an error. Please try again in a few minutes."
    23142314msgstr ""
    23152315
    2316 #: ../../src/Translations/StoreTranslations.php:175, ../../src/Translations/StoreTranslations.php:217, ../../src/Translations/StoreTranslations.php:439, ../../src/Translations/StoreTranslations.php:473, ../../src/Translations/StoreTranslations.php:531, ../../src/Translations/StoreTranslations.php:595
     2316#: ../../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
    23172317msgid "By continuing, you agree to our"
    23182318msgstr ""
    23192319
    2320 #: ../../src/Translations/StoreTranslations.php:176, ../../src/Translations/StoreTranslations.php:218, ../../src/Translations/StoreTranslations.php:440, ../../src/Translations/StoreTranslations.php:475, ../../src/Translations/StoreTranslations.php:532, ../../src/Translations/StoreTranslations.php:596
     2320#: ../../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
    23212321msgid "Terms and conditions"
    23222322msgstr ""
    … …  
    23302330msgstr ""
    23312331
    2332 #: ../../src/Translations/StoreTranslations.php:190, ../../src/Translations/StoreTranslations.php:212, ../../src/Translations/StoreTranslations.php:315, ../../src/Translations/StoreTranslations.php:471, ../../src/Translations/StoreTranslations.php:523, ../../src/Translations/StoreTranslations.php:583
     2332#: ../../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
    23332333msgid "See the rules for the test mode."
    23342334msgstr ""
    … …  
    24782478msgstr ""
    24792479
    2480 #: ../../src/Translations/StoreTranslations.php:325, ../../src/Translations/StoreTranslations.php:524, ../../src/Translations/StoreTranslations.php:584
     2480#: ../../src/Translations/StoreTranslations.php:325, ../../src/Translations/StoreTranslations.php:531, ../../src/Translations/StoreTranslations.php:591
    24812481msgid "Holder ID"
    24822482msgstr ""
    … …  
    26932693
    26942694#: ../../src/Translations/StoreTranslations.php:387
     2695msgid "You can pay with card"
     2696msgstr ""
     2697
     2698#: ../../src/Translations/StoreTranslations.php:388
     2699msgid "Card"
     2700msgstr ""
     2701
     2702#: ../../src/Translations/StoreTranslations.php:389
     2703msgid "Enter the {digits} numbers on your card."
     2704msgstr ""
     2705
     2706#: ../../src/Translations/StoreTranslations.php:390
     2707msgid "Enter two digits for the month and two digits for the year."
     2708msgstr ""
     2709
     2710#: ../../src/Translations/StoreTranslations.php:391
     2711msgid "Enter your {digits} digit code."
     2712msgstr ""
     2713
     2714#: ../../src/Translations/StoreTranslations.php:392
     2715msgid "Enter between {min} and {max} digits for your ID number."
     2716msgstr ""
     2717
     2718#: ../../src/Translations/StoreTranslations.php:393
     2719msgid "Enter the {digits} digits of your ID number."
     2720msgstr ""
     2721
     2722#: ../../src/Translations/StoreTranslations.php:394
    26952723msgid "The first installment <b>is due on</b>"
    26962724msgstr ""
    26972725
    2698 #: ../../src/Translations/StoreTranslations.php:389
     2726#: ../../src/Translations/StoreTranslations.php:396
    26992727msgid "Jan"
    27002728msgstr ""
    27012729
    2702 #: ../../src/Translations/StoreTranslations.php:390
     2730#: ../../src/Translations/StoreTranslations.php:397
    27032731msgid "Feb"
    27042732msgstr ""
    27052733
    2706 #: ../../src/Translations/StoreTranslations.php:391
     2734#: ../../src/Translations/StoreTranslations.php:398
    27072735msgid "Mar"
    27082736msgstr ""
    27092737
    2710 #: ../../src/Translations/StoreTranslations.php:392
     2738#: ../../src/Translations/StoreTranslations.php:399
    27112739msgid "Apr"
    27122740msgstr ""
    27132741
    2714 #: ../../src/Translations/StoreTranslations.php:393
     2742#: ../../src/Translations/StoreTranslations.php:400
    27152743msgid "May"
    27162744msgstr ""
    27172745
    2718 #: ../../src/Translations/StoreTranslations.php:394
     2746#: ../../src/Translations/StoreTranslations.php:401
    27192747msgid "June"
    27202748msgstr ""
    27212749
    2722 #: ../../src/Translations/StoreTranslations.php:395
     2750#: ../../src/Translations/StoreTranslations.php:402
    27232751msgid "July"
    27242752msgstr ""
    27252753
    2726 #: ../../src/Translations/StoreTranslations.php:396
     2754#: ../../src/Translations/StoreTranslations.php:403
    27272755msgid "Aug"
    27282756msgstr ""
    27292757
    2730 #: ../../src/Translations/StoreTranslations.php:397
     2758#: ../../src/Translations/StoreTranslations.php:404
    27312759msgid "Sept"
    27322760msgstr ""
    27332761
    2734 #: ../../src/Translations/StoreTranslations.php:398
     2762#: ../../src/Translations/StoreTranslations.php:405
    27352763msgid "Oct"
    27362764msgstr ""
    27372765
    2738 #: ../../src/Translations/StoreTranslations.php:399
     2766#: ../../src/Translations/StoreTranslations.php:406
    27392767msgid "Nov"
    27402768msgstr ""
    27412769
    2742 #: ../../src/Translations/StoreTranslations.php:400
     2770#: ../../src/Translations/StoreTranslations.php:407
    27432771msgid "Dec"
    27442772msgstr ""
    27452773
    2746 #: ../../src/Translations/StoreTranslations.php:402
     2774#: ../../src/Translations/StoreTranslations.php:409
    27472775msgid "The payment will be debited automatically from your Mercado Pago account. Make sure to have available balance on the due date."
    27482776msgstr ""
    27492777
    2750 #: ../../src/Translations/StoreTranslations.php:403
     2778#: ../../src/Translations/StoreTranslations.php:410
    27512779msgid "Interest rate"
    27522780msgstr ""
    27532781
    2754 #: ../../src/Translations/StoreTranslations.php:404
     2782#: ../../src/Translations/StoreTranslations.php:411
    27552783msgid "per month and"
    27562784msgstr ""
    27572785
    2758 #: ../../src/Translations/StoreTranslations.php:405
     2786#: ../../src/Translations/StoreTranslations.php:412
    27592787msgid "per year"
    27602788msgstr ""
    27612789
    2762 #: ../../src/Translations/StoreTranslations.php:406
     2790#: ../../src/Translations/StoreTranslations.php:413
    27632791msgid "Total effective cost"
    27642792msgstr ""
    27652793
    2766 #: ../../src/Translations/StoreTranslations.php:407
     2794#: ../../src/Translations/StoreTranslations.php:414
    27672795msgid "Tax on Financial Transactions (IOF)"
    27682796msgstr ""
    27692797
    2770 #: ../../src/Translations/StoreTranslations.php:408
     2798#: ../../src/Translations/StoreTranslations.php:415
    27712799msgid "Total amount borrowed"
    27722800msgstr ""
    27732801
    2774 #: ../../src/Translations/StoreTranslations.php:409
     2802#: ../../src/Translations/StoreTranslations.php:416
    27752803msgid "APR"
    27762804msgstr ""
    27772805
    2778 #: ../../src/Translations/StoreTranslations.php:410
     2806#: ../../src/Translations/StoreTranslations.php:417
    27792807msgid "excluding VAT"
    27802808msgstr ""
    27812809
    2782 #: ../../src/Translations/StoreTranslations.php:411
     2810#: ../../src/Translations/StoreTranslations.php:418
    27832811msgid "Annual interest rate"
    27842812msgstr ""
    27852813
    2786 #: ../../src/Translations/StoreTranslations.php:412
     2814#: ../../src/Translations/StoreTranslations.php:419
    27872815msgid "French amortization system with a fixed final monthly installment"
    27882816msgstr ""
    27892817
    2790 #: ../../src/Translations/StoreTranslations.php:413
     2818#: ../../src/Translations/StoreTranslations.php:420
    27912819msgid "EIR"
    27922820msgstr ""
    27932821
    2794 #: ../../src/Translations/StoreTranslations.php:414
     2822#: ../../src/Translations/StoreTranslations.php:421
    27952823msgid "NAR"
    27962824msgstr ""
    27972825
    2798 #: ../../src/Translations/StoreTranslations.php:415
     2826#: ../../src/Translations/StoreTranslations.php:422
    27992827msgid "EAR"
    28002828msgstr ""
    28012829
    2802 #: ../../src/Translations/StoreTranslations.php:416
     2830#: ../../src/Translations/StoreTranslations.php:423
    28032831msgid "Fixed rate"
    28042832msgstr ""
    28052833
    2806 #: ../../src/Translations/StoreTranslations.php:417
     2834#: ../../src/Translations/StoreTranslations.php:424
    28072835msgid "Learn more about&nbsp;<a href=\"{link}\" target=\"_blank\">how we protect your privacy</a>."
    28082836msgstr ""
    28092837
    2810 #: ../../src/Translations/StoreTranslations.php:418
     2838#: ../../src/Translations/StoreTranslations.php:425
    28112839msgid "The payment could not be completed. Please try again or pay with another method."
    28122840msgstr ""
    28132841
    2814 #: ../../src/Translations/StoreTranslations.php:419
     2842#: ../../src/Translations/StoreTranslations.php:426
    28152843msgid "The payment could not be completed. Please pay with another method."
    28162844msgstr ""
    28172845
    2818 #: ../../src/Translations/StoreTranslations.php:420
     2846#: ../../src/Translations/StoreTranslations.php:427
    28192847msgid "It was not possible to validate your identity. Please try again or pay with another method."
    28202848msgstr ""
    28212849
    2822 #: ../../src/Translations/StoreTranslations.php:421
     2850#: ../../src/Translations/StoreTranslations.php:428
    28232851msgid "It was not possible to validate your identity. Please pay with another method."
    28242852msgstr ""
    28252853
    2826 #: ../../src/Translations/StoreTranslations.php:422
     2854#: ../../src/Translations/StoreTranslations.php:429
    28272855msgid "Select a payment method to complete your purchase."
    28282856msgstr ""
    28292857
    2830 #: ../../src/Translations/StoreTranslations.php:434
     2858#: ../../src/Translations/StoreTranslations.php:441
    28312859msgid "Pix in Test Mode"
    28322860msgstr ""
    28332861
    2834 #: ../../src/Translations/StoreTranslations.php:435, ../../src/Translations/StoreTranslations.php:472
     2862#: ../../src/Translations/StoreTranslations.php:442, ../../src/Translations/StoreTranslations.php:479
    28352863msgid "You can test the flow to generate a code, but you cannot finalize the payment."
    28362864msgstr ""
    28372865
    2838 #: ../../src/Translations/StoreTranslations.php:436
     2866#: ../../src/Translations/StoreTranslations.php:443
    28392867msgid "Pay instantly"
    28402868msgstr ""
    28412869
    2842 #: ../../src/Translations/StoreTranslations.php:437
     2870#: ../../src/Translations/StoreTranslations.php:444
    28432871msgid "By confirming your purchase, we will show you a code to make the payment."
    28442872msgstr ""
    28452873
    2846 #: ../../src/Translations/StoreTranslations.php:438
     2874#: ../../src/Translations/StoreTranslations.php:445
    28472875msgid "Pix logo"
    28482876msgstr ""
    28492877
    2850 #: ../../src/Translations/StoreTranslations.php:441, ../../src/Translations/StoreTranslations.php:450
     2878#: ../../src/Translations/StoreTranslations.php:448, ../../src/Translations/StoreTranslations.php:457
    28512879msgid "Code valid for "
    28522880msgstr ""
    28532881
    2854 #: ../../src/Translations/StoreTranslations.php:442
     2882#: ../../src/Translations/StoreTranslations.php:449
    28552883msgid "Now you just need to pay with Pix to finalize your purchase"
    28562884msgstr ""
    28572885
    2858 #: ../../src/Translations/StoreTranslations.php:443
     2886#: ../../src/Translations/StoreTranslations.php:450
    28592887msgid "How to pay with Pix:"
    28602888msgstr ""
    28612889
    2862 #: ../../src/Translations/StoreTranslations.php:444
     2890#: ../../src/Translations/StoreTranslations.php:451
    28632891msgid "Go to your bank's app or website"
    28642892msgstr ""
    28652893
    2866 #: ../../src/Translations/StoreTranslations.php:445
     2894#: ../../src/Translations/StoreTranslations.php:452
    28672895msgid "Search for the option to pay with Pix"
    28682896msgstr ""
    28692897
    2870 #: ../../src/Translations/StoreTranslations.php:446
     2898#: ../../src/Translations/StoreTranslations.php:453
    28712899msgid "Scan the QR code or Pix code"
    28722900msgstr ""
    28732901
    2874 #: ../../src/Translations/StoreTranslations.php:447
     2902#: ../../src/Translations/StoreTranslations.php:454
    28752903msgid "Done! You will see the payment confirmation"
    28762904msgstr ""
    28772905
    2878 #: ../../src/Translations/StoreTranslations.php:448
     2906#: ../../src/Translations/StoreTranslations.php:455
    28792907msgid "Value: "
    28802908msgstr ""
    28812909
    2882 #: ../../src/Translations/StoreTranslations.php:449
     2910#: ../../src/Translations/StoreTranslations.php:456
    28832911msgid "Scan the QR code:"
    28842912msgstr ""
    28852913
    2886 #: ../../src/Translations/StoreTranslations.php:451
     2914#: ../../src/Translations/StoreTranslations.php:458
    28872915msgid "If you prefer, you can pay by copying and pasting the following code"
    28882916msgstr ""
    28892917
    2890 #: ../../src/Translations/StoreTranslations.php:452
     2918#: ../../src/Translations/StoreTranslations.php:459
    28912919msgid "Copy code"
    28922920msgstr ""
    28932921
    2894 #: ../../src/Translations/StoreTranslations.php:453, ../../src/Translations/StoreTranslations.php:538, ../../src/Translations/StoreTranslations.php:594
     2922#: ../../src/Translations/StoreTranslations.php:460, ../../src/Translations/StoreTranslations.php:545, ../../src/Translations/StoreTranslations.php:601
    28952923msgid "Mercado Pago: The customer has not paid yet."
    28962924msgstr ""
    28972925
    2898 #: ../../src/Translations/StoreTranslations.php:454
     2926#: ../../src/Translations/StoreTranslations.php:461
    28992927msgid "Mercado Pago: Now you just need to pay with Pix to finalize your purchase."
    29002928msgstr ""
    29012929
    2902 #: ../../src/Translations/StoreTranslations.php:455
     2930#: ../../src/Translations/StoreTranslations.php:462
    29032931msgid "Scan the QR code below or copy and paste the code into your bank's application."
    29042932msgstr ""
    29052933
    2906 #: ../../src/Translations/StoreTranslations.php:457
     2934#: ../../src/Translations/StoreTranslations.php:464
    29072935msgid "Payment Approved"
    29082936msgstr ""
    29092937
    2910 #: ../../src/Translations/StoreTranslations.php:458
     2938#: ../../src/Translations/StoreTranslations.php:465
    29112939msgid "Your payment with PIX has been successfully approved."
    29122940msgstr ""
    29132941
    2914 #: ../../src/Translations/StoreTranslations.php:470
     2942#: ../../src/Translations/StoreTranslations.php:477
    29152943msgid "Yape in Test Mode"
    29162944msgstr ""
    29172945
    2918 #: ../../src/Translations/StoreTranslations.php:474
     2946#: ../../src/Translations/StoreTranslations.php:481
    29192947msgid "Cell phone linked to Yape"
    29202948msgstr ""
    29212949
    2922 #: ../../src/Translations/StoreTranslations.php:476
     2950#: ../../src/Translations/StoreTranslations.php:483
    29232951msgid "Verify in Yape that the option \"Compra por internet\" is activated and that the daily limit is enough."
    29242952msgstr ""
    29252953
    2926 #: ../../src/Translations/StoreTranslations.php:477
     2954#: ../../src/Translations/StoreTranslations.php:484
    29272955msgid "Pay with Yape in a few minutes"
    29282956msgstr ""
    29292957
    2930 #: ../../src/Translations/StoreTranslations.php:478
     2958#: ../../src/Translations/StoreTranslations.php:485
    29312959msgid "Fill out the following details and confirm your purchase."
    29322960msgstr ""
    29332961
    2934 #: ../../src/Translations/StoreTranslations.php:479
     2962#: ../../src/Translations/StoreTranslations.php:486
    29352963msgid "Approval code"
    29362964msgstr ""
    29372965
    2938 #: ../../src/Translations/StoreTranslations.php:480
     2966#: ../../src/Translations/StoreTranslations.php:487
    29392967msgid "Processed by Mercado Pago"
    29402968msgstr ""
    29412969
    2942 #: ../../src/Translations/StoreTranslations.php:481
     2970#: ../../src/Translations/StoreTranslations.php:488
    29432971msgid "The code is available in the Yape app menu."
    29442972msgstr ""
    29452973
    2946 #: ../../src/Translations/StoreTranslations.php:482, ../../src/Translations/StoreTranslations.php:484
     2974#: ../../src/Translations/StoreTranslations.php:489, ../../src/Translations/StoreTranslations.php:491
    29472975msgid "Enter the entire number."
    29482976msgstr ""
    29492977
    2950 #: ../../src/Translations/StoreTranslations.php:497
     2978#: ../../src/Translations/StoreTranslations.php:504
    29512979msgid "Payment approved."
    29522980msgstr ""
    29532981
    2954 #: ../../src/Translations/StoreTranslations.php:498
     2982#: ../../src/Translations/StoreTranslations.php:505
    29552983msgid "Waiting for the Pix payment."
    29562984msgstr ""
    29572985
    2958 #: ../../src/Translations/StoreTranslations.php:499
     2986#: ../../src/Translations/StoreTranslations.php:506
    29592987msgid "Waiting for the ticket payment."
    29602988msgstr ""
    29612989
    2962 #: ../../src/Translations/StoreTranslations.php:500
     2990#: ../../src/Translations/StoreTranslations.php:507
    29632991msgid "The customer has not made the payment yet."
    29642992msgstr ""
    29652993
    2966 #: ../../src/Translations/StoreTranslations.php:501
     2994#: ../../src/Translations/StoreTranslations.php:508
    29672995msgid "Payment is pending review."
    29682996msgstr ""
    29692997
    2970 #: ../../src/Translations/StoreTranslations.php:502
     2998#: ../../src/Translations/StoreTranslations.php:509
    29712999msgid "Payment was declined. The customer can try again."
    29723000msgstr ""
    29733001
    2974 #: ../../src/Translations/StoreTranslations.php:503
     3002#: ../../src/Translations/StoreTranslations.php:510
    29753003msgid "Payment was returned to the customer."
    29763004msgstr ""
    29773005
    2978 #: ../../src/Translations/StoreTranslations.php:504
     3006#: ../../src/Translations/StoreTranslations.php:511
    29793007msgid "The payment was partially returned to the customer. the amount refunded was : "
    29803008msgstr ""
    29813009
    2982 #: ../../src/Translations/StoreTranslations.php:505
     3010#: ../../src/Translations/StoreTranslations.php:512
    29833011msgid "Payment was canceled."
    29843012msgstr ""
    29853013
    2986 #: ../../src/Translations/StoreTranslations.php:506, ../../src/Translations/StoreTranslations.php:507
     3014#: ../../src/Translations/StoreTranslations.php:513, ../../src/Translations/StoreTranslations.php:514
    29873015msgid "The payment is in mediation or the purchase was unknown by the customer."
    29883016msgstr ""
    29893017
    2990 #: ../../src/Translations/StoreTranslations.php:508
     3018#: ../../src/Translations/StoreTranslations.php:515
    29913019msgid "The payment"
    29923020msgstr ""
    29933021
    2994 #: ../../src/Translations/StoreTranslations.php:509
     3022#: ../../src/Translations/StoreTranslations.php:516
    29953023msgid "was notified by Mercado Pago with status"
    29963024msgstr ""
    29973025
    2998 #: ../../src/Translations/StoreTranslations.php:521
     3026#: ../../src/Translations/StoreTranslations.php:528
    29993027msgid "Offline Methods in Test Mode"
    30003028msgstr ""
    30013029
    3002 #: ../../src/Translations/StoreTranslations.php:522
     3030#: ../../src/Translations/StoreTranslations.php:529
    30033031msgid "You can test the flow to generate an invoice, but you cannot finalize the payment."
    30043032msgstr ""
    30053033
    3006 #: ../../src/Translations/StoreTranslations.php:525, ../../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:585
     3034#: ../../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
    30073035msgid "Please complete this field."
    30083036msgstr ""
    30093037
    3010 #: ../../src/Translations/StoreTranslations.php:526, ../../src/Translations/StoreTranslations.php:586
     3038#: ../../src/Translations/StoreTranslations.php:533, ../../src/Translations/StoreTranslations.php:593
    30113039msgid "Please enter the full ID number."
    30123040msgstr ""
    30133041
    3014 #: ../../src/Translations/StoreTranslations.php:527, ../../src/Translations/StoreTranslations.php:587
     3042#: ../../src/Translations/StoreTranslations.php:534, ../../src/Translations/StoreTranslations.php:594
    30153043msgid "Please enter a valid ID."
    30163044msgstr ""
    30173045
    3018 #: ../../src/Translations/StoreTranslations.php:528
     3046#: ../../src/Translations/StoreTranslations.php:535
    30193047msgid "Select your payment method"
    30203048msgstr ""
    30213049
    3022 #: ../../src/Translations/StoreTranslations.php:529, ../../src/Translations/StoreTranslations.php:589
     3050#: ../../src/Translations/StoreTranslations.php:536, ../../src/Translations/StoreTranslations.php:596
    30233051msgid "more options"
    30243052msgstr ""
    30253053
    3026 #: ../../src/Translations/StoreTranslations.php:530
     3054#: ../../src/Translations/StoreTranslations.php:537
    30273055msgid "Select a payment method."
    30283056msgstr ""
    30293057
    3030 #: ../../src/Translations/StoreTranslations.php:533
     3058#: ../../src/Translations/StoreTranslations.php:540
    30313059msgid "Great, we processed your purchase order. Complete the payment with ticket so that we finish approving it."
    30323060msgstr ""
    30333061
    3034 #: ../../src/Translations/StoreTranslations.php:534
     3062#: ../../src/Translations/StoreTranslations.php:541
    30353063msgid "Print ticket"
    30363064msgstr ""
    30373065
    3038 #: ../../src/Translations/StoreTranslations.php:535
     3066#: ../../src/Translations/StoreTranslations.php:542
    30393067msgid " and "
    30403068msgstr ""
    30413069
    3042 #: ../../src/Translations/StoreTranslations.php:536
     3070#: ../../src/Translations/StoreTranslations.php:543
    30433071msgid "To print the ticket again click"
    30443072msgstr ""
    30453073
    3046 #: ../../src/Translations/StoreTranslations.php:537
     3074#: ../../src/Translations/StoreTranslations.php:544
    30473075msgid "here"
    30483076msgstr ""
    30493077
    3050 #: ../../src/Translations/StoreTranslations.php:540
     3078#: ../../src/Translations/StoreTranslations.php:547
    30513079msgid "Enter payment details"
    30523080msgstr ""
    30533081
    3054 #: ../../src/Translations/StoreTranslations.php:541
     3082#: ../../src/Translations/StoreTranslations.php:548
    30553083msgid "Use delivery details."
    30563084msgstr ""
    30573085
    3058 #: ../../src/Translations/StoreTranslations.php:542
     3086#: ../../src/Translations/StoreTranslations.php:549
    30593087msgid "ZIP code"
    30603088msgstr ""
    30613089
    3062 #: ../../src/Translations/StoreTranslations.php:543
     3090#: ../../src/Translations/StoreTranslations.php:550
    30633091msgid "E.g.: 01310-200"
    30643092msgstr ""
    30653093
    3066 #: ../../src/Translations/StoreTranslations.php:545
     3094#: ../../src/Translations/StoreTranslations.php:552
    30673095msgid "Please enter the full ZIP code."
    30683096msgstr ""
    30693097
    3070 #: ../../src/Translations/StoreTranslations.php:546
     3098#: ../../src/Translations/StoreTranslations.php:553
    30713099msgid "Please enter a valid ZIP code."
    30723100msgstr ""
    30733101
    3074 #: ../../src/Translations/StoreTranslations.php:547
     3102#: ../../src/Translations/StoreTranslations.php:554
    30753103msgid "State"
    30763104msgstr ""
    30773105
    3078 #: ../../src/Translations/StoreTranslations.php:548
     3106#: ../../src/Translations/StoreTranslations.php:555
    30793107msgid "Select a state"
    30803108msgstr ""
    30813109
    3082 #: ../../src/Translations/StoreTranslations.php:549
     3110#: ../../src/Translations/StoreTranslations.php:556
    30833111msgid "Please select an option."
    30843112msgstr ""
    30853113
    3086 #: ../../src/Translations/StoreTranslations.php:550
     3114#: ../../src/Translations/StoreTranslations.php:557
    30873115msgid "City"
    30883116msgstr ""
    30893117
    3090 #: ../../src/Translations/StoreTranslations.php:551
     3118#: ../../src/Translations/StoreTranslations.php:558
    30913119msgid "E.g.: São Paulo"
    30923120msgstr ""
    30933121
    3094 #: ../../src/Translations/StoreTranslations.php:553
     3122#: ../../src/Translations/StoreTranslations.php:560
    30953123msgid "Please enter the full name of the city."
    30963124msgstr ""
    30973125
    3098 #: ../../src/Translations/StoreTranslations.php:554
     3126#: ../../src/Translations/StoreTranslations.php:561
    30993127msgid "Neighborhood"
    31003128msgstr ""
    31013129
    3102 #: ../../src/Translations/StoreTranslations.php:555
     3130#: ../../src/Translations/StoreTranslations.php:562
    31033131msgid "E.g.: Jardim das flores"
    31043132msgstr ""
    31053133
    3106 #: ../../src/Translations/StoreTranslations.php:557
     3134#: ../../src/Translations/StoreTranslations.php:564
    31073135msgid "Please enter the full neighborhood name."
    31083136msgstr ""
    31093137
    3110 #: ../../src/Translations/StoreTranslations.php:558
     3138#: ../../src/Translations/StoreTranslations.php:565
    31113139msgid "Address"
    31123140msgstr ""
    31133141
    3114 #: ../../src/Translations/StoreTranslations.php:559
     3142#: ../../src/Translations/StoreTranslations.php:566
    31153143msgid "E.g.: Avenida das Flores"
    31163144msgstr ""
    31173145
    3118 #: ../../src/Translations/StoreTranslations.php:561
     3146#: ../../src/Translations/StoreTranslations.php:568
    31193147msgid "Please enter the full address."
    31203148msgstr ""
    31213149
    3122 #: ../../src/Translations/StoreTranslations.php:562
     3150#: ../../src/Translations/StoreTranslations.php:569
    31233151msgid "Complement (optional)"
    31243152msgstr ""
    31253153
    3126 #: ../../src/Translations/StoreTranslations.php:563
     3154#: ../../src/Translations/StoreTranslations.php:570
    31273155msgid "E.g.: Apartament 52 block C"
    31283156msgstr ""
    31293157
    3130 #: ../../src/Translations/StoreTranslations.php:564
     3158#: ../../src/Translations/StoreTranslations.php:571
    31313159msgid "Number"
    31323160msgstr ""
    31333161
    3134 #: ../../src/Translations/StoreTranslations.php:565
     3162#: ../../src/Translations/StoreTranslations.php:572
    31353163msgid "E.g.: 148"
    31363164msgstr ""
    31373165
    3138 #: ../../src/Translations/StoreTranslations.php:566
     3166#: ../../src/Translations/StoreTranslations.php:573
    31393167msgid "No number"
    31403168msgstr ""
    31413169
    3142 #: ../../src/Translations/StoreTranslations.php:568
     3170#: ../../src/Translations/StoreTranslations.php:575
    31433171msgid "Please enter a valid number."
    31443172msgstr ""
    31453173
    3146 #: ../../src/Translations/StoreTranslations.php:581
     3174#: ../../src/Translations/StoreTranslations.php:588
    31473175msgid "Checkout PSE in Test Mode"
    31483176msgstr ""
    31493177
    3150 #: ../../src/Translations/StoreTranslations.php:582
     3178#: ../../src/Translations/StoreTranslations.php:589
    31513179msgid "You can test the flow to generate a payment with PSE"
    31523180msgstr ""
    31533181
    3154 #: ../../src/Translations/StoreTranslations.php:588
     3182#: ../../src/Translations/StoreTranslations.php:595
    31553183msgid "Select where you want to pay"
    31563184msgstr ""
    31573185
    3158 #: ../../src/Translations/StoreTranslations.php:590
     3186#: ../../src/Translations/StoreTranslations.php:597
    31593187msgid "Person type "
    31603188msgstr ""
    31613189
    3162 #: ../../src/Translations/StoreTranslations.php:591
     3190#: ../../src/Translations/StoreTranslations.php:598
    31633191msgid "Financial institution"
    31643192msgstr ""
    31653193
    3166 #: ../../src/Translations/StoreTranslations.php:592
     3194#: ../../src/Translations/StoreTranslations.php:599
    31673195msgid "Select the financial institution"
    31683196msgstr ""
    31693197
    3170 #: ../../src/Translations/StoreTranslations.php:593
     3198#: ../../src/Translations/StoreTranslations.php:600
    31713199msgid "Select the institution"
    31723200msgstr ""
    31733201
    3174 #: ../../src/Translations/StoreTranslations.php:610
     3202#: ../../src/Translations/StoreTranslations.php:617
    31753203msgid "A problem was occurred when processing your payment. Please, try again."
    31763204msgstr ""
    31773205
    3178 #: ../../src/Translations/StoreTranslations.php:611
     3206#: ../../src/Translations/StoreTranslations.php:618
    31793207msgid "<strong>Your payment was declined because something went wrong</strong><br>Please make sure all the information was entered correctly."
    31803208msgstr ""
    31813209
    3182 #: ../../src/Translations/StoreTranslations.php:612
     3210#: ../../src/Translations/StoreTranslations.php:619
    31833211msgid "This payment method is temporarily unavailable. Please choose another option or contact the store."
    31843212msgstr ""
    31853213
    3186 #: ../../src/Translations/StoreTranslations.php:613
     3214#: ../../src/Translations/StoreTranslations.php:620
    31873215msgid "See your order form"
    31883216msgstr ""
    31893217
    3190 #: ../../src/Translations/StoreTranslations.php:614
     3218#: ../../src/Translations/StoreTranslations.php:621
    31913219msgid "Your payment was declined. You can try again."
    31923220msgstr ""
    31933221
    3194 #: ../../src/Translations/StoreTranslations.php:615
     3222#: ../../src/Translations/StoreTranslations.php:622
    31953223msgid "Click to try again"
    31963224msgstr ""
    31973225
    3198 #: ../../src/Translations/StoreTranslations.php:616
     3226#: ../../src/Translations/StoreTranslations.php:623
    31993227msgid "That's it, payment accepted!"
    32003228msgstr ""
    32013229
    3202 #: ../../src/Translations/StoreTranslations.php:617
     3230#: ../../src/Translations/StoreTranslations.php:624
    32033231msgid "We are processing your payment. In less than an hour we will send you the result by email."
    32043232msgstr ""
    32053233
    3206 #: ../../src/Translations/StoreTranslations.php:618
     3234#: ../../src/Translations/StoreTranslations.php:625
    32073235msgid "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."
    32083236msgstr ""
    32093237
    3210 #: ../../src/Translations/StoreTranslations.php:619
     3238#: ../../src/Translations/StoreTranslations.php:626
    32113239msgid "Check the card number."
    32123240msgstr ""
    32133241
    3214 #: ../../src/Translations/StoreTranslations.php:620
     3242#: ../../src/Translations/StoreTranslations.php:627
    32153243msgid "Check the expiration date."
    32163244msgstr ""
    32173245
    3218 #: ../../src/Translations/StoreTranslations.php:621
     3246#: ../../src/Translations/StoreTranslations.php:628
    32193247msgid "Check the information provided."
    32203248msgstr ""
    32213249
    3222 #: ../../src/Translations/StoreTranslations.php:622
     3250#: ../../src/Translations/StoreTranslations.php:629
    32233251msgid "Check the informed security code."
    32243252msgstr ""
    32253253
    3226 #: ../../src/Translations/StoreTranslations.php:623, ../../src/Translations/StoreTranslations.php:624
     3254#: ../../src/Translations/StoreTranslations.php:630, ../../src/Translations/StoreTranslations.php:631
    32273255msgid "Your payment cannot be processed."
    32283256msgstr ""
    32293257
    3230 #: ../../src/Translations/StoreTranslations.php:625
     3258#: ../../src/Translations/StoreTranslations.php:632
    32313259msgid "You must authorize payments for your orders."
    32323260msgstr ""
    32333261
    3234 #: ../../src/Translations/StoreTranslations.php:626
     3262#: ../../src/Translations/StoreTranslations.php:633
    32353263msgid "Contact your card issuer to activate it. The phone is on the back of your card."
    32363264msgstr ""
    32373265
    3238 #: ../../src/Translations/StoreTranslations.php:627
     3266#: ../../src/Translations/StoreTranslations.php:634
    32393267msgid "You have already made a payment of this amount. If you have to pay again, use another card or other method of payment."
    32403268msgstr ""
    32413269
    3242 #: ../../src/Translations/StoreTranslations.php:628
     3270#: ../../src/Translations/StoreTranslations.php:635
    32433271msgid "Your payment was declined. Please select another payment method. It is recommended in cash."
    32443272msgstr ""
    32453273
    3246 #: ../../src/Translations/StoreTranslations.php:629
     3274#: ../../src/Translations/StoreTranslations.php:636
    32473275msgid "Your payment does not have sufficient funds."
    32483276msgstr ""
    32493277
    3250 #: ../../src/Translations/StoreTranslations.php:630
     3278#: ../../src/Translations/StoreTranslations.php:637
    32513279msgid "Payment cannot process the selected fee."
    32523280msgstr ""
    32533281
    3254 #: ../../src/Translations/StoreTranslations.php:631
     3282#: ../../src/Translations/StoreTranslations.php:638
    32553283msgid "You have reached the limit of allowed attempts. Choose another card or other payment method."
    32563284msgstr ""
    32573285
    3258 #: ../../src/Translations/StoreTranslations.php:632
     3286#: ../../src/Translations/StoreTranslations.php:639
    32593287msgid "This payment method cannot process your payment."
    32603288msgstr ""
    32613289
    3262 #: ../../src/Translations/StoreTranslations.php:644, ../../src/Translations/StoreTranslations.php:714
     3290#: ../../src/Translations/StoreTranslations.php:651, ../../src/Translations/StoreTranslations.php:721
    32633291msgid "<strong>Your bank needs you to authorize the payment</strong><br>Please call the telephone number on your card or pay with another method."
    32643292msgstr ""
    32653293
    3266 #: ../../src/Translations/StoreTranslations.php:645, ../../src/Translations/StoreTranslations.php:646
     3294#: ../../src/Translations/StoreTranslations.php:652, ../../src/Translations/StoreTranslations.php:653
    32673295msgid "<strong>For safety reasons, your payment was declined</strong><br>We recommended paying with your usual payment method and device for online purchases."
    32683296msgstr ""
    32693297
    3270 #: ../../src/Translations/StoreTranslations.php:647, ../../src/Translations/StoreTranslations.php:648, ../../src/Translations/StoreTranslations.php:649, ../../src/Translations/StoreTranslations.php:650
     3298#: ../../src/Translations/StoreTranslations.php:654, ../../src/Translations/StoreTranslations.php:655, ../../src/Translations/StoreTranslations.php:656, ../../src/Translations/StoreTranslations.php:657
    32713299msgid "<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."
    32723300msgstr ""
    32733301
    3274 #: ../../src/Translations/StoreTranslations.php:651
     3302#: ../../src/Translations/StoreTranslations.php:658
    32753303msgid "<strong>Your credit card has no available limit</strong><br>Please pay using another card or choose another payment method."
    32763304msgstr ""
    32773305
    3278 #: ../../src/Translations/StoreTranslations.php:652
     3306#: ../../src/Translations/StoreTranslations.php:659
    32793307msgid "<strong>Your debit card has insufficient funds</strong><br>Please pay using another card or choose another payment method."
    32803308msgstr ""
    32813309
    3282 #: ../../src/Translations/StoreTranslations.php:653, ../../src/Translations/StoreTranslations.php:691
     3310#: ../../src/Translations/StoreTranslations.php:660, ../../src/Translations/StoreTranslations.php:698
    32833311msgid "<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."
    32843312msgstr ""
    32853313
    3286 #: ../../src/Translations/StoreTranslations.php:654
     3314#: ../../src/Translations/StoreTranslations.php:661
    32873315msgid "<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."
    32883316msgstr ""
    32893317
    3290 #: ../../src/Translations/StoreTranslations.php:655
     3318#: ../../src/Translations/StoreTranslations.php:662
    32913319msgid "<strong>You reached the limit of payment attempts with this card</strong><br>Please pay using another card or choose another payment method."
    32923320msgstr ""
    32933321
    3294 #: ../../src/Translations/StoreTranslations.php:656
     3322#: ../../src/Translations/StoreTranslations.php:663
    32953323msgid "<strong>Your payment was declined because you already paid for this purchase</strong><br>Check your card transactions to verify it."
    32963324msgstr ""
    32973325
    3298 #: ../../src/Translations/StoreTranslations.php:657, ../../src/Translations/StoreTranslations.php:658, ../../src/Translations/StoreTranslations.php:659
     3326#: ../../src/Translations/StoreTranslations.php:664, ../../src/Translations/StoreTranslations.php:665, ../../src/Translations/StoreTranslations.php:666
    32993327msgid "<strong>The card issuing bank declined the payment</strong><br>We recommended paying with another payment method or contact your bank."
    33003328msgstr ""
    33013329
    3302 #: ../../src/Translations/StoreTranslations.php:660
     3330#: ../../src/Translations/StoreTranslations.php:667
    33033331msgid "<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."
    33043332msgstr ""
    33053333
    3306 #: ../../src/Translations/StoreTranslations.php:661
     3334#: ../../src/Translations/StoreTranslations.php:668
    33073335msgid "<strong>Your payment was declined because something went wrong</strong><br>We recommended trying again or paying with another method."
    33083336msgstr ""
    33093337
    3310 #: ../../src/Translations/StoreTranslations.php:662
     3338#: ../../src/Translations/StoreTranslations.php:669
    33113339msgid "<strong>Yape declined your payment</strong><br>Your payment could not be processed. Please try again or choose another payment method."
    33123340msgstr ""
    33133341
    3314 #: ../../src/Translations/StoreTranslations.php:663
     3342#: ../../src/Translations/StoreTranslations.php:670
    33153343msgid "<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."
    33163344msgstr ""
    33173345
    3318 #: ../../src/Translations/StoreTranslations.php:664
     3346#: ../../src/Translations/StoreTranslations.php:671
    33193347msgid "<strong>Yape declined your payment</strong><br>Your payment was rejected because something went wrong. We recommend trying again or paying with another method."
    33203348msgstr ""
    33213349
    3322 #: ../../src/Translations/StoreTranslations.php:665
     3350#: ../../src/Translations/StoreTranslations.php:672
    33233351msgid "<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."
    33243352msgstr ""
    33253353
    3326 #: ../../src/Translations/StoreTranslations.php:666
     3354#: ../../src/Translations/StoreTranslations.php:673
    33273355msgid "<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."
    33283356msgstr ""
    33293357
    3330 #: ../../src/Translations/StoreTranslations.php:678
     3358#: ../../src/Translations/StoreTranslations.php:685
    33313359msgid "<strong>Choose the number of installments to complete the payment</strong>"
    33323360msgstr ""
    33333361
    3334 #: ../../src/Translations/StoreTranslations.php:679
     3362#: ../../src/Translations/StoreTranslations.php:686
    33353363msgid "<strong>One or more of the buyer details were entered incorrectly</strong><br>Please check the identification number and try again."
    33363364msgstr ""
    33373365
    3338 #: ../../src/Translations/StoreTranslations.php:680, ../../src/Translations/StoreTranslations.php:719
     3366#: ../../src/Translations/StoreTranslations.php:687, ../../src/Translations/StoreTranslations.php:726
    33393367msgid "<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."
    33403368msgstr ""
    33413369
    3342 #: ../../src/Translations/StoreTranslations.php:681, ../../src/Translations/StoreTranslations.php:708
     3370#: ../../src/Translations/StoreTranslations.php:688, ../../src/Translations/StoreTranslations.php:715
    33433371msgid "<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."
    33443372msgstr ""
    33453373
    3346 #: ../../src/Translations/StoreTranslations.php:682
     3374#: ../../src/Translations/StoreTranslations.php:689
    33473375msgid "<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."
    33483376msgstr ""
    33493377
    3350 #: ../../src/Translations/StoreTranslations.php:683
     3378#: ../../src/Translations/StoreTranslations.php:690
    33513379msgid "<strong>The discount code is not valid</strong><br>Check the code you entered and try again."
    33523380msgstr ""
    33533381
    3354 #: ../../src/Translations/StoreTranslations.php:684
     3382#: ../../src/Translations/StoreTranslations.php:691
    33553383msgid "<strong>The discount amount must be a number</strong><br>Enter a valid value to continue."
    33563384msgstr ""
    33573385
    3358 #: ../../src/Translations/StoreTranslations.php:685
     3386#: ../../src/Translations/StoreTranslations.php:692
    33593387msgid "<strong>Credentials don’t match the environment</strong><br>Enter the correct test or production keys to complete the payment."
    33603388msgstr ""
    33613389
    3362 #: ../../src/Translations/StoreTranslations.php:686
     3390#: ../../src/Translations/StoreTranslations.php:693
    33633391msgid "<strong>The e-mail is incorrect</strong><br>Make sure to enter it correctly to complete the payment."
    33643392msgstr ""
    33653393
    3366 #: ../../src/Translations/StoreTranslations.php:687
     3394#: ../../src/Translations/StoreTranslations.php:694
    33673395msgid "<strong>The e-mail isn't valid for payment</strong><br>Enter another e-mail to complete the payment."
    33683396msgstr ""
    33693397
    3370 #: ../../src/Translations/StoreTranslations.php:688, ../../src/Translations/StoreTranslations.php:716
     3398#: ../../src/Translations/StoreTranslations.php:695, ../../src/Translations/StoreTranslations.php:723
    33713399msgid "<strong>The payment method you selected is not available</strong><br>Choose another method to complete your purchase."
    33723400msgstr ""
    33733401
    3374 #: ../../src/Translations/StoreTranslations.php:689, ../../src/Translations/StoreTranslations.php:703, ../../src/Translations/StoreTranslations.php:704
     3402#: ../../src/Translations/StoreTranslations.php:696, ../../src/Translations/StoreTranslations.php:710, ../../src/Translations/StoreTranslations.php:711
    33753403msgid "<strong>Your payment was declined because something went wrong</strong><br>We recommend trying again or paying with another method."
    33763404msgstr ""
    33773405
    3378 #: ../../src/Translations/StoreTranslations.php:690, ../../src/Translations/StoreTranslations.php:705
     3406#: ../../src/Translations/StoreTranslations.php:697, ../../src/Translations/StoreTranslations.php:712
    33793407msgid "<strong>Your payment was declined by the store</strong><br>Try another payment method or contact the seller."
    33803408msgstr ""
    33813409
    3382 #: ../../src/Translations/StoreTranslations.php:706
     3410#: ../../src/Translations/StoreTranslations.php:713
    33833411msgid "<strong>Your payment was declined because you already paid for this purchase</strong><br>Please check your card transactions to verify it."
    33843412msgstr ""
    33853413
    3386 #: ../../src/Translations/StoreTranslations.php:707
     3414#: ../../src/Translations/StoreTranslations.php:714
    33873415msgid "<strong>For safety reasons, your payment was declined</strong><br>We recommend paying with your usual payment method and device for online purchases."
    33883416msgstr ""
    33893417
    3390 #: ../../src/Translations/StoreTranslations.php:709
     3418#: ../../src/Translations/StoreTranslations.php:716
    33913419msgid "<strong>For safety reasons, your payment was declined</strong><br>We recommend paying with your usual payment method and device for online purchases. "
    33923420msgstr ""
    33933421
    3394 #: ../../src/Translations/StoreTranslations.php:710
     3422#: ../../src/Translations/StoreTranslations.php:717
    33953423msgid "<strong>It was not possible to complete the payment</strong><br>Please use another method to complete the purchase."
    33963424msgstr ""
    33973425
    3398 #: ../../src/Translations/StoreTranslations.php:711
     3426#: ../../src/Translations/StoreTranslations.php:718
    33993427msgid "<strong>Your credit card has no available limit</strong><br>Choose another payment method."
    34003428msgstr ""
    34013429
    3402 #: ../../src/Translations/StoreTranslations.php:712
     3430#: ../../src/Translations/StoreTranslations.php:719
    34033431msgid "<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."
    34043432msgstr ""
    34053433
    3406 #: ../../src/Translations/StoreTranslations.php:713
     3434#: ../../src/Translations/StoreTranslations.php:720
    34073435msgid "<strong>You reached the limit of payment attempts with this card</strong><br>Please pay with another card or choose another payment method."
    34083436msgstr ""
    34093437
    3410 #: ../../src/Translations/StoreTranslations.php:715
     3438#: ../../src/Translations/StoreTranslations.php:722
    34113439msgid "<strong>The card issuing bank declined the payment</strong><br>We recommend using another payment method or contacting your bank."
    34123440msgstr ""
    34133441
    3414 #: ../../src/Translations/StoreTranslations.php:717
     3442#: ../../src/Translations/StoreTranslations.php:724
    34153443msgid "<strong>The test e-mail you entered is not valid</strong><br>Enter a valid email to complete the payment."
    34163444msgstr ""
    34173445
    3418 #: ../../src/Translations/StoreTranslations.php:718
     3446#: ../../src/Translations/StoreTranslations.php:725
    34193447msgid "<strong>The email you entered is not valid</strong><br>Enter a valid email to complete the payment."
    34203448msgstr ""
    34213449
    3422 #: ../../src/Translations/StoreTranslations.php:734
     3450#: ../../src/Translations/StoreTranslations.php:741
    34233451msgid "<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."
    34243452msgstr ""
    34253453
    3426 #: ../../src/Translations/StoreTranslations.php:735
     3454#: ../../src/Translations/StoreTranslations.php:742
    34273455msgid "<strong>Your payment was declined due to an error</strong><br>Please try again or use a different payment method."
    34283456msgstr ""
    34293457
    3430 #: ../../src/Translations/StoreTranslations.php:736
     3458#: ../../src/Translations/StoreTranslations.php:743
    34313459msgid "<strong>This payment method isn't available</strong><br>Please use a different payment method to complete your purchase."
    34323460msgstr ""
    34333461
    3434 #: ../../src/Translations/StoreTranslations.php:737
     3462#: ../../src/Translations/StoreTranslations.php:744
    34353463msgid "<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."
    34363464msgstr ""
    34373465
    3438 #: ../../src/Translations/StoreTranslations.php:738
     3466#: ../../src/Translations/StoreTranslations.php:745
    34393467msgid "<strong>It wasn't possible to validate your card</strong><br>Check if you have available credit or use a different payment method."
    34403468msgstr ""
    34413469
    3442 #: ../../src/Translations/StoreTranslations.php:739, ../../src/Translations/StoreTranslations.php:740
     3470#: ../../src/Translations/StoreTranslations.php:746, ../../src/Translations/StoreTranslations.php:747
    34433471msgid "<strong>For security reasons, your payment was declined</strong><br>We recommend using your usual payment method and device for online purchases."
    34443472msgstr ""
    34453473
    3446 #: ../../src/Translations/StoreTranslations.php:741
     3474#: ../../src/Translations/StoreTranslations.php:748
    34473475msgid "<strong>The purchase amount exceeds the limit for this payment method</strong><br>Please use a different payment method to complete your purchase."
    34483476msgstr ""
    34493477
    3450 #: ../../src/Translations/StoreTranslations.php:742
     3478#: ../../src/Translations/StoreTranslations.php:749
    34513479msgid "<strong>Some card details are incorrect</strong><br>Please review the information entered to complete the payment."
    34523480msgstr ""
    34533481
    3454 #: ../../src/Translations/StoreTranslations.php:755
     3482#: ../../src/Translations/StoreTranslations.php:762
    34553483msgid "<strong>Your payment session has expired</strong><br>Please try again to complete your purchase."
    34563484msgstr ""
    34573485
    3458 #: ../../src/Translations/StoreTranslations.php:770
     3486#: ../../src/Translations/StoreTranslations.php:777
    34593487msgid "We could not activate your subscription. Please try again."
    34603488msgstr ""
    34613489
    3462 #: ../../src/Translations/StoreTranslations.php:771
     3490#: ../../src/Translations/StoreTranslations.php:778
    34633491msgid "Recurring payments credential is not configured. Please contact the store."
    34643492msgstr ""
    34653493
    3466 #: ../../src/Translations/StoreTranslations.php:772
     3494#: ../../src/Translations/StoreTranslations.php:779
    34673495msgid "Card data is incomplete. Please review and try again."
    34683496msgstr ""
    34693497
    3470 #: ../../src/Translations/StoreTranslations.php:773
     3498#: ../../src/Translations/StoreTranslations.php:780
    34713499msgid "Pre-approval access token is not configured."
    34723500msgstr ""
    34733501
    3474 #: ../../src/Translations/StoreTranslations.php:774
     3502#: ../../src/Translations/StoreTranslations.php:781
    34753503msgid "Card data is incomplete."
    34763504msgstr ""
    34773505
    3478 #: ../../src/Translations/StoreTranslations.php:784
     3506#: ../../src/Translations/StoreTranslations.php:791
    34793507msgid "We are taking you to validate the card"
    34803508msgstr ""
    34813509
    3482 #: ../../src/Translations/StoreTranslations.php:785
     3510#: ../../src/Translations/StoreTranslations.php:792
    34833511msgid "with your bank"
    34843512msgstr ""
    34853513
    3486 #: ../../src/Translations/StoreTranslations.php:786
     3514#: ../../src/Translations/StoreTranslations.php:793
    34873515msgid "We need to confirm that you are the cardholder."
    34883516msgstr ""
    34893517
    3490 #: ../../src/Translations/StoreTranslations.php:787
     3518#: ../../src/Translations/StoreTranslations.php:794
    34913519msgid "We are receiving the response from your bank"
    34923520msgstr ""
    34933521
    3494 #: ../../src/Translations/StoreTranslations.php:788
     3522#: ../../src/Translations/StoreTranslations.php:795
    34953523msgid "Complete the bank validation so your payment can be approved"
    34963524msgstr ""
    34973525
    3498 #: ../../src/Translations/StoreTranslations.php:789
     3526#: ../../src/Translations/StoreTranslations.php:796
    34993527msgid "Please keep this page open. If you close it, you will not be able to resume the validation."
    35003528msgstr ""
    35013529
    3502 #: ../../src/Translations/StoreTranslations.php:790
     3530#: ../../src/Translations/StoreTranslations.php:797
    35033531msgid "<b>For safety reasons, your payment was declined</b><br>We recommend paying with your usual payment method and device for online purchases."
    35043532msgstr ""
    35053533
    3506 #: ../../src/Translations/StoreTranslations.php:808
     3534#: ../../src/Translations/StoreTranslations.php:815
    35073535msgid "We could not process this card. Please try again."
    35083536msgstr ""
    35093537
    3510 #: ../../src/Translations/StoreTranslations.php:809
     3538#: ../../src/Translations/StoreTranslations.php:816
    35113539msgid "Payment was declined by the card issuer."
    35123540msgstr ""
    35133541
    3514 #: ../../src/Translations/StoreTranslations.php:810
     3542#: ../../src/Translations/StoreTranslations.php:817
    35153543msgid "3D Secure authentication failed. Please try another card."
    35163544msgstr ""
    35173545
    3518 #: ../../src/Translations/StoreTranslations.php:811, ../../src/Translations/StoreTranslations.php:813, ../../src/Translations/StoreTranslations.php:814, ../../src/Translations/StoreTranslations.php:820, ../../src/Translations/StoreTranslations.php:829
     3546#: ../../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
    35193547msgid "A technical error occurred. Please contact support."
    35203548msgstr ""
    35213549
    3522 #: ../../src/Translations/StoreTranslations.php:812
     3550#: ../../src/Translations/StoreTranslations.php:819
    35233551msgid "The card linked to this subscription has expired. Please update the card."
    35243552msgstr ""
    35253553
    3526 #: ../../src/Translations/StoreTranslations.php:819
     3554#: ../../src/Translations/StoreTranslations.php:826
    35273555msgid "We could not save the card. Please try again."
    35283556msgstr ""
    35293557
    3530 #: ../../src/Translations/StoreTranslations.php:823
     3558#: ../../src/Translations/StoreTranslations.php:830
    35313559msgid "We could not complete the operation. Please try another card."
    35323560msgstr ""
    35333561
    3534 #: ../../src/Translations/StoreTranslations.php:826
     3562#: ../../src/Translations/StoreTranslations.php:833
    35353563msgid "Service temporarily unavailable. Please try again in a moment."
    35363564msgstr ""
  • woocommerce-mercadopago/trunk/readme.txt

    r3663899 r3710292  
    55Tested up to: 7.0
    66Requires PHP: 7.4
    7 Stable tag: 8.9.3
     7Stable tag: 8.9.4
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    135135Check 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.
    136136
    137 = v8.9.3 (24/08/2026) =
     137= v8.9.4 (17/09/2026) =
    138138### 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
    141155
    142156### 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
    146165
    147166### Security
    148 - Harden fast payment diagnostics so payment credentials are never included in telemetry data
     167- Remove authorization headers, session cookies and other credentials from fast payment diagnostics before they are sent
    149168
    150169[See changelog for all versions](https://github.com/mercadopago/cart-woocommerce/blob/main/CHANGELOG.md).
  • woocommerce-mercadopago/trunk/src/Funnel/Funnel.php

    r3609381 r3710292  
    1414class Funnel
    1515{
     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
    1621    private Sdk $sdk;
    1722
    … …  
    5964            $createSellerFunnelBase->platform_version = $this->getWoocommerceVersion();
    6065            $createSellerFunnelBase->plugin_version = MP_VERSION;
     66            $createSellerFunnelBase->site_id = $this->resolveSiteId();
    6167            $response = $createSellerFunnelBase->save();
    6268            $this->store->setInstallationId($response->id);
    … …  
    7379        return !empty($this->store->getInstallationId())
    7480            && !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);
    7595    }
    7696
    … …  
    82102            'plugin_mode'                    => $this->getPluginMode(),
    83103            'cust_id'                        => $this->seller->getCustIdFromAT(),
    84             'site_id'                        => $this->country::countryToSiteId($this->country->getPluginDefaultCountry()),
     104            'site_id'                        => $this->resolveSiteId(),
    85105        ], $after);
    86106    }
    … …  
    130150     * @param array $attrs Funnel attribute values map
    131151     * @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
    134157    {
    135158        if (!$this->created()) {
    … …  
    154177                $after();
    155178            }
    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;
    157214    }
    158215
    … …  
    179236    }
    180237
    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
    182246    {
    183247        try {
    … …  
    186250            $this->sendSuccessEvent();
    187251        } 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);
    190257        }
    191258    }
  • woocommerce-mercadopago/trunk/src/Funnel/UpdateSellerFunnelBase.php

    r3609381 r3710292  
    55class UpdateSellerFunnelBase extends \MercadoPago\PP\Sdk\Entity\Identification\UpdateSellerFunnelBase
    66{
     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.
    711    public string $plugin_version;
    8 
    9     public ?bool $is_subscription_enabled = null;
    1012}
  • woocommerce-mercadopago/trunk/src/Gateways/CustomGateway.php

    r3663899 r3710292  
    9090
    9191    /**
     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    /**
    92111     * CustomGateway constructor
    93112     * @throws Exception
    … …  
    191210                && function_exists('wcs_order_contains_subscription')
    192211                && \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);
    193250        }
    194251
    … …  
    744801        // Hard API failure (4xx/5xx) — subscription was likely not created.
    745802        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;
    748805            $logger->warning(
    749806                "op=cit step=api_error http_status={$httpStatus} order_id={$orderId}",
    750807                $logSource
    751808            );
    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);
    754811        }
    755812
    … …  
    776833        }
    777834
     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
    778859        // 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)
    780861        //   pending_challenge → 3DS modal flow
    781862        //   pending/in_process → redirect to order received
    782863        //   rejected          → buyerRefusedMessages (same UX as normal checkout)
    783864        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;
    784992    }
    785993
    … …  
    9111119        }
    9121120
    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 = [
    9141138            'token' => $checkout['token'],
    9151139            '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,
    9251141            'subscription' => [
    9261142                'external_id' => 'WC-SUB-' . $subscription->get_id(),
    … …  
    9561172                ],
    9571173            ],
    958             'sponsor_id'      => $this->countryConfigs['sponsor_id'] ?? null,
    959             'notification_url' => $this->buildCitNotificationUrl(),
     1174            'sponsor_id' => $this->countryConfigs['sponsor_id'] ?? null,
    9601175            'point_of_interaction' => [
    9611176                'location' => [
    … …  
    9651180            ],
    9661181        ];
     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;
    9671189    }
    9681190
    … …  
    15581780                'handle' => 'wc_mercadopago_custom_card_form',
    15591781                '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                ],
    15611787                'localize' => [
    15621788                    'security_code_placeholder_text_3_digits' => $this->storeTranslations['security_code_placeholder_text_3_digits'],
    … …  
    15661792                'handle' => 'wc_mercadopago_custom_three_ds_handler',
    15671793                'path' => 'checkouts/custom/entities/three-ds-handler',
     1794                'deps' => ['wc_mercadopago_custom_page'],
    15681795            ],
    15691796            [
    … …  
    15741801                'handle' => 'wc_mercadopago_custom_event_handler',
    15751802                '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                ],
    15771807                'localize' => [
    15781808                    'is_mobile' => Device::isMobile(),
    … …  
    15821812                'handle' => 'wc_mercadopago_custom_page',
    15831813                'path' => 'checkouts/custom/mp-custom-page',
     1814                'deps' => ['wc_mercadopago_custom_elements'],
    15841815                'localize' => [
    15851816                    'security_code_placeholder_text_3_digits' => $this->storeTranslations['security_code_placeholder_text_3_digits'],
    … …  
    15881819                    'security_code_tooltip_text_4_digits' => $this->storeTranslations['security_code_tooltip_text_4_digits'],
    15891820                    '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'],
    15901825                ],
    15911826            ],
    … …  
    15971832                'handle' => 'wc_mercadopago_custom_checkout',
    15981833                '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                ],
    15991840                'localize' => [
    16001841                    'public_key' => $this->mercadopago->sellerConfig->getCredentialsPublicKey(),
    … …  
    18222063            'card_installments_label' => $this->storeTranslations['card_installments_label'],
    18232064            'amount' => $amountAndCurrencyRatio['amount'],
     2065            'is_cit_initial_context' => $this->isInitialSubscriptionPaymentContext(),
    18242066            'currency_ratio' => $amountAndCurrencyRatio['currencyRatio'],
    18252067            'message_error_amount' => $this->storeTranslations['message_error_amount'],
    18262068            'security_code_tooltip_text_3_digits' => $this->storeTranslations['security_code_tooltip_text_3_digits'],
    18272069            '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                ],
    18302075                static::CARD_FLAGS_BY_COUNTRY[$this->mercadopago->sellerConfig->getSiteId()] ?? []
    18312076            ),
     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'],
    18322080            'card_holder_input_helper_info' => $this->storeTranslations['card_holder_input_helper_info'],
    18332081            'mercadopago_privacy_policy' => str_replace(
  • woocommerce-mercadopago/trunk/src/Helpers/AutomaticPaymentsClient.php

    r3609381 r3710292  
    111111     * @return Response
    112112     *
    113      * @throws \RuntimeException When subscription.id is absent from the response (orphan payment, AC-2).
     113     * @throws \RuntimeException When subscription.id is absent from a paid 2xx CIT response (orphan payment, AC-2).
    114114     * @throws \Exception        Propagated from {@see Requester} on network or HTTP >= 400 errors.
    115115     */
    … …  
    141141        }
    142142
    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.
    146155        if (empty($data['subscription']['id'])) {
    147156            $this->log('error', 'op=cit status=orphan_detected', [
  • woocommerce-mercadopago/trunk/src/Helpers/SubscriptionsHelper.php

    r3609381 r3710292  
    1515 * Utilities for the WooCommerce Subscriptions integration with Mercado Pago
    1616 * Automatic Payments (Pre-approval). Centralizes subscription order detection,
    17  * subscription metadata read/write, deterministic idempotency key generation
    18  * 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.
    1919 *
    2020 * @package MercadoPago\Woocommerce\Helpers
    … …  
    8282        return class_exists('WC_Subscriptions')
    8383            && 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;
    84105    }
    85106
  • woocommerce-mercadopago/trunk/src/Notification/CoreNotification.php

    r3663899 r3710292  
    159159            $safeRefundId = preg_replace('/[\r\n\t]/', '', (string) $refundId);
    160160
    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.
    170165            if ($this->orderStatus->isRefundIdApplied($order, (string) $refundId)) {
    171166                $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 remaining
    174                     // entries of the refunds_notifying loop (which would leave the MP webhook
    175                     // 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                 }
    187167                continue;
    188168            }
    … …  
    312292     * @return void
    313293     */
    314     public function updatePaymentDetails(WC_Order $order, array $data, bool $authoritativeRefund = false): void
     294    public function updatePaymentDetails(WC_Order $order, array $data): void
    315295    {
    316296        $payment_ids = [];
    … …  
    325305            $refundedAmount = $paymentData->refund ?? 0;
    326306
    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']])) {
    363313                $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                );
    364324            }
    365325
  • woocommerce-mercadopago/trunk/src/Order/OrderMetadata.php

    r3663899 r3710292  
    533533
    534534    /**
     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    /**
    535618     * Update an order's payments metadata
    536619     *
  • woocommerce-mercadopago/trunk/src/Refund/RefundHandler.php

    r3663899 r3710292  
    180180        if ($refundId !== null) {
    181181            $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);
    182187        } else {
    183188            $this->mercadopago->logs->file->info(
  • woocommerce-mercadopago/trunk/src/Translations/StoreTranslations.php

    r3609381 r3710292  
    385385            'locale'                                              => __('en-US', 'woocommerce-mercadopago'),
    386386            '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'),
    387394            'consumer_credits_due_date'                           => __('The first installment <b>is due on</b>', 'woocommerce-mercadopago'),
    388395            'months_abbreviated' => [
    … …  
    821828
    822829            // 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'),
    823831            'CPP_TAAP_0602002'       => __('We could not complete the operation. Please try another card.', 'woocommerce-mercadopago'),
    824832
  • woocommerce-mercadopago/trunk/src/WoocommerceMercadoPago.php

    r3663899 r3710292  
    4040class WoocommerceMercadoPago
    4141{
    42     private const PLUGIN_VERSION = '8.9.3';
     42    private const PLUGIN_VERSION = '8.9.4';
    4343
    4444    private const PLUGIN_MIN_PHP = '7.4';
    … …  
    336336    public function activatePlugin(): void
    337337    {
    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        });
    341352    }
    342353
  • woocommerce-mercadopago/trunk/templates/public/checkouts/custom-checkout.php

    r3663899 r3710292  
    2929 * @var string $card_installments_label
    3030 * @var string $amount
     31 * @var bool $is_cit_initial_context
    3132 * @var string $currency_ratio
    3233 * @var string $message_error_amount
    … …  
    3637 * @var string $interest_free_option_text
    3738 * @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]
    3845 *
    3946 * @see \MercadoPago\Woocommerce\Gateways\CustomGateway
    … …  
    5562    <?php else : ?>
    5663        <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>
    6171            </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>
    6275            <?php if ($test_mode) : ?>
    6376                <test-mode
    … …  
    111124                            isOptinal=false
    112125                            message="<?= esc_html($card_number_input_label); ?>"
    113                             for='mp-card-number'
     126                            id='mp-card-number-label'
    114127                        >
    115128                        </input-label>
    116129
    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>
    118131
    119132                        <input-helper
    … …  
    130143                            message="<?= esc_html($card_holder_name_input_label); ?>"
    131144                            isOptinal=false
     145                            for='form-checkout__cardholderName'
    132146                        >
    133147                        </input-label>
    … …  
    139153                            name="mp-card-holder-name"
    140154                            data-checkout="cardholderName"
     155                            aria-describedby="mp-card-holder-name-helper-info mp-card-holder-name-example"
     156                            aria-required="true"
    141157                        />
     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>
    142161
    143162                        <input-helper
    … …  
    163182                                message="<?= esc_html($card_expiration_input_label); ?>"
    164183                                isOptinal=false
     184                                id='mp-expiration-date-label'
    165185                            >
    166186                            </input-label>
    … …  
    169189                                id="form-checkout__expirationDate-container"
    170190                                class="mp-checkout-custom-card-input mp-checkout-custom-left-card-input"
     191                                aria-labelledby="mp-expiration-date-label"
    171192                            >
    172193                            </div>
    … …  
    185206                                message="<?= esc_html($card_security_code_input_label); ?>"
    186207                                isOptinal=false
     208                                id='mp-security-code-label'
    187209                            >
    188210                            </input-label>
    189211
    190212                            <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>
    192214                                <span
    193215                                    id="mp-security-code-info"
    … …  
    223245                            flag-error="docNumberError"
    224246                            site-id="<?= esc_attr($site_id); ?>"
     247                            instruction-range="<?= esc_attr($card_document_instruction_range); ?>"
     248                            instruction-fixed="<?= esc_attr($card_document_instruction_fixed); ?>"
    225249                        >
    226250                        </input-document>
    … …  
    234258                                isOptinal=false
    235259                                message="<?= esc_html($card_issuer_input_label); ?>"
    236                                 for='mp-issuer'
     260                                for='form-checkout__issuer'
    237261                            >
    238262                            </input-label>
    … …  
    240264
    241265                        <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>
    243267                        </div>
    244268                    </div>
    … …  
    255279                            id="form-checkout__installments"
    256280                            class="mp-custom-checkout-select-input"
     281                            aria-required="true"
    257282                        >
    258283                        </select>
    … …  
    273298
    274299<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'); ?>"/>
    276301    <input type="hidden" id="currency_ratio" value='<?= esc_textarea($currency_ratio); ?>' name="mercadopago_custom[currency_ratio]"/>
    277302    <input type="hidden" id="paymentMethodId" name="mercadopago_custom[payment_method_id]"/>
  • woocommerce-mercadopago/trunk/vendor/autoload.php

    r3582079 r3710292  
    2020require_once __DIR__ . '/composer/autoload_real.php';
    2121
    22 return ComposerAutoloaderInit18ea251a1d3302239f52e95d9f180dd5::getLoader();
     22return ComposerAutoloaderInit2cbef7d43bc272823d4d80b299eb68ed::getLoader();
  • woocommerce-mercadopago/trunk/vendor/composer/autoload_real.php

    r3582079 r3710292  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit18ea251a1d3302239f52e95d9f180dd5
     5class ComposerAutoloaderInit2cbef7d43bc272823d4d80b299eb68ed
    66{
    77    private static $loader;
    … …  
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit18ea251a1d3302239f52e95d9f180dd5', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit2cbef7d43bc272823d4d80b299eb68ed', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit18ea251a1d3302239f52e95d9f180dd5', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit2cbef7d43bc272823d4d80b299eb68ed', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit18ea251a1d3302239f52e95d9f180dd5::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInit2cbef7d43bc272823d4d80b299eb68ed::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • woocommerce-mercadopago/trunk/vendor/composer/autoload_static.php

    r3663899 r3710292  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit18ea251a1d3302239f52e95d9f180dd5
     7class ComposerStaticInit2cbef7d43bc272823d4d80b299eb68ed
    88{
    99    public static $prefixLengthsPsr4 = array (
    10         'M' =>
     10        'M' => 
    1111        array (
    1212            'MercadoPago\\Woocommerce\\' => 24,
    … …  
    1616
    1717    public static $prefixDirsPsr4 = array (
    18         'MercadoPago\\Woocommerce\\' =>
     18        'MercadoPago\\Woocommerce\\' => 
    1919        array (
    2020            0 => __DIR__ . '/../..' . '/src',
    2121        ),
    22         'MercadoPago\\PP\\Sdk\\' =>
     22        'MercadoPago\\PP\\Sdk\\' => 
    2323        array (
    2424            0 => __DIR__ . '/..' . '/mp-plugins/php-sdk/src',
    … …  
    260260    {
    261261        return \Closure::bind(function () use ($loader) {
    262             $loader->prefixLengthsPsr4 = ComposerStaticInit18ea251a1d3302239f52e95d9f180dd5::$prefixLengthsPsr4;
    263             $loader->prefixDirsPsr4 = ComposerStaticInit18ea251a1d3302239f52e95d9f180dd5::$prefixDirsPsr4;
    264             $loader->classMap = ComposerStaticInit18ea251a1d3302239f52e95d9f180dd5::$classMap;
     262            $loader->prefixLengthsPsr4 = ComposerStaticInit2cbef7d43bc272823d4d80b299eb68ed::$prefixLengthsPsr4;
     263            $loader->prefixDirsPsr4 = ComposerStaticInit2cbef7d43bc272823d4d80b299eb68ed::$prefixDirsPsr4;
     264            $loader->classMap = ComposerStaticInit2cbef7d43bc272823d4d80b299eb68ed::$classMap;
    265265
    266266        }, null, ClassLoader::class);
  • woocommerce-mercadopago/trunk/vendor/composer/installed.json

    r3582079 r3710292  
    33        {
    44            "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",
    77            "source": {
    88                "type": "git",
    99                "url": "https://github.com/mercadopago/pp-php-sdk.git",
    10                 "reference": "629e4be5749972c47105c3f8adcc3bbfd60d22ba"
     10                "reference": "e705530643386942790ba96c04eecf5aa3e199fd"
    1111            },
    1212            "dist": {
    1313                "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",
    1616                "shasum": ""
    1717            },
    … …  
    2424                "squizlabs/php_codesniffer": "3.7.2"
    2525            },
    26             "time": "2026-05-15T17:06:00+00:00",
     26            "time": "2026-09-03T13:31:37+00:00",
    2727            "type": "library",
    2828            "installation-source": "dist",
    … …  
    4747            "support": {
    4848                "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"
    5050            },
    5151            "install-path": "../mp-plugins/php-sdk"
  • woocommerce-mercadopago/trunk/vendor/composer/installed.php

    r3582079 r3710292  
    1212    'versions' => array(
    1313        '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',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../mp-plugins/php-sdk',
  • woocommerce-mercadopago/trunk/vendor/mp-plugins/php-sdk/CHANGELOG.md

    r3582079 r3710292  
    55The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
    66and 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
    719
    820## V3.5.0
  • woocommerce-mercadopago/trunk/vendor/mp-plugins/php-sdk/composer.json

    r3582079 r3710292  
    22  "name": "mp-plugins/php-sdk",
    33  "description": "Mercado Pago Plugins PHP-SDK",
    4   "version": "3.5.0",
     4  "version": "3.7.0",
    55  "type": "library",
    66  "scripts": {
  • woocommerce-mercadopago/trunk/vendor/mp-plugins/php-sdk/composer.lock

    r3582079 r3710292  
    55        "This file is @generated automatically"
    66    ],
    7     "content-hash": "d864dd31cd920272ad8620ec1b58a203",
     7    "content-hash": "923edb7d764c7f938758acd7d3075956",
    88    "packages": [],
    99    "packages-dev": [
    … …  
    18281828    },
    18291829    "platform-dev": {},
    1830     "plugin-api-version": "2.6.0"
     1830    "plugin-api-version": "2.9.0"
    18311831}
  • woocommerce-mercadopago/trunk/vendor/mp-plugins/php-sdk/src/Entity/Identification/CreateSellerFunnelBase.php

    r3582079 r3710292  
    1414 * @property string $plugin_version
    1515 * @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.
    1618 *
    1719 * @package MercadoPago\PP\Sdk\Entity\Identification
    … …  
    4345     */
    4446    protected $site_id;
     47
     48    /**
     49     * @var string|null
     50     */
     51    protected $email;
     52
     53    /**
     54     * @var string|null
     55     */
     56    protected $country;
    4557
    4658    /**
  • woocommerce-mercadopago/trunk/vendor/mp-plugins/php-sdk/src/Entity/Identification/UpdateSellerFunnelBase.php

    r3582079 r3710292  
    1919 * @property string $cpp_token
    2020 * @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.
    2124 *
    2225 * @package MercadoPago\PP\Sdk\Entity\Identification
    … …  
    7275     */
    7376    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;
    7489
    7590
  • woocommerce-mercadopago/trunk/vendor/mp-plugins/php-sdk/src/HttpClient/Requester/CurlRequester.php

    r3349895 r3710292  
    162162    }
    163163
    164     /**
    165      * @codeCoverageIgnore
    166      */
    167164    protected function curlClose($request)
    168165    {
    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;
    170177    }
    171178
  • woocommerce-mercadopago/trunk/woocommerce-mercadopago.php

    r3663899 r3710292  
     1
    12<?php
    23
    … …  
    56 * Plugin URI: https://github.com/mercadopago/cart-woocommerce
    67 * Description: Configure the payment options and accept payments with cards, ticket and money of Mercado Pago account.
    7  * Version: 8.9.3
     8 * Version: 8.9.4
    89 * Author: Mercado Pago
    910 * Author URI: https://developers.mercadopago.com/
Note: See TracChangeset for help on using the changeset viewer.