rebill-web-components-sdk 1.10.5 → 1.10.7-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/card-fields-wrapper.card-identification.card-iframe.card-skeleton.rebill-address-form.rebill-address-search.rebill-input-combo.rebill-input-phone.rebill-installments.selectable-card.single-payment-method.entry.cjs.js.map +1 -1
- package/dist/cjs/card-fields-wrapper_11.cjs.entry.js +9 -12
- package/dist/cjs/index-C-VTnc0I.js.map +1 -1
- package/dist/cjs/rebill-change-card.cjs.entry.js +1 -2
- package/dist/cjs/rebill-change-card.entry.cjs.js.map +1 -1
- package/dist/cjs/rebill-checkout.cjs.entry.js +10 -3
- package/dist/cjs/rebill-checkout.entry.cjs.js.map +1 -1
- package/dist/cjs/rebill-form.cjs.entry.js +5 -2
- package/dist/cjs/rebill-form.entry.cjs.js.map +1 -1
- package/dist/cjs/rebill-renewal.cjs.entry.js +26 -2
- package/dist/cjs/rebill-renewal.entry.cjs.js.map +1 -1
- package/dist/collection/components/change-card/rebill-change-card.js +1 -2
- package/dist/collection/components/change-card/rebill-change-card.js.map +1 -1
- package/dist/collection/components/checkout/rebill-checkout.js +10 -3
- package/dist/collection/components/checkout/rebill-checkout.js.map +1 -1
- package/dist/collection/components/renewal/rebill-renewal.js +27 -2
- package/dist/collection/components/renewal/rebill-renewal.js.map +1 -1
- package/dist/collection/components/shared/form/form.js +5 -2
- package/dist/collection/components/shared/form/form.js.map +1 -1
- package/dist/collection/components/shared/inputs/input-phone/input-phone.js +9 -12
- package/dist/collection/components/shared/inputs/input-phone/input-phone.js.map +1 -1
- package/dist/components/p-8BpuJ_V5.js.map +1 -1
- package/dist/components/{p-0y1EkPsV.js → p-CRMAYXj0.js} +3 -3
- package/dist/components/{p-0y1EkPsV.js.map → p-CRMAYXj0.js.map} +1 -1
- package/dist/components/{p-BFqhozQ0.js → p-DKPrueOT.js} +3 -3
- package/dist/components/{p-BFqhozQ0.js.map → p-DKPrueOT.js.map} +1 -1
- package/dist/components/{p-Cs-pA3OO.js → p-DVaxhIJe.js} +7 -4
- package/dist/components/p-DVaxhIJe.js.map +1 -0
- package/dist/components/{p-RbKsk0NK.js → p-Dsv10JVE.js} +11 -14
- package/dist/components/p-Dsv10JVE.js.map +1 -0
- package/dist/components/rebill-change-card.js +5 -6
- package/dist/components/rebill-change-card.js.map +1 -1
- package/dist/components/rebill-checkout-form.js +1 -1
- package/dist/components/rebill-checkout.js +14 -7
- package/dist/components/rebill-checkout.js.map +1 -1
- package/dist/components/rebill-form.js +1 -1
- package/dist/components/rebill-input-phone.js +1 -1
- package/dist/components/rebill-renewal.js +31 -7
- package/dist/components/rebill-renewal.js.map +1 -1
- package/dist/components/root-component.js +1 -1
- package/dist/components/user-information-phone.js +1 -1
- package/dist/esm/card-fields-wrapper.card-identification.card-iframe.card-skeleton.rebill-address-form.rebill-address-search.rebill-input-combo.rebill-input-phone.rebill-installments.selectable-card.single-payment-method.entry.js.map +1 -1
- package/dist/esm/card-fields-wrapper_11.entry.js +9 -12
- package/dist/esm/index-BTZ7D7jU.js.map +1 -1
- package/dist/esm/rebill-change-card.entry.js +1 -2
- package/dist/esm/rebill-change-card.entry.js.map +1 -1
- package/dist/esm/rebill-checkout.entry.js +10 -3
- package/dist/esm/rebill-checkout.entry.js.map +1 -1
- package/dist/esm/rebill-form.entry.js +5 -2
- package/dist/esm/rebill-form.entry.js.map +1 -1
- package/dist/esm/rebill-renewal.entry.js +27 -3
- package/dist/esm/rebill-renewal.entry.js.map +1 -1
- package/dist/rebill-web-components-sdk/card-fields-wrapper.card-identification.card-iframe.card-skeleton.rebill-address-form.rebill-address-search.rebill-input-combo.rebill-input-phone.rebill-installments.selectable-card.single-payment-method.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/{p-a8726b6d.entry.js → p-85e7cd6f.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-a8726b6d.entry.js.map → p-85e7cd6f.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-d827e221.entry.js → p-90c50e5b.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/p-90c50e5b.entry.js.map +1 -0
- package/dist/rebill-web-components-sdk/p-BTZ7D7jU.js.map +1 -1
- package/dist/rebill-web-components-sdk/{p-14fb1c5c.entry.js → p-ae158592.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/p-ae158592.entry.js.map +1 -0
- package/dist/rebill-web-components-sdk/p-d2d7500e.entry.js +2 -0
- package/dist/rebill-web-components-sdk/p-d2d7500e.entry.js.map +1 -0
- package/dist/rebill-web-components-sdk/{p-1a99d53d.entry.js → p-e6df1fe2.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-1a99d53d.entry.js.map → p-e6df1fe2.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/rebill-change-card.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/rebill-checkout.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/rebill-form.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/rebill-renewal.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
- package/dist/types/components/renewal/rebill-renewal.d.ts +5 -0
- package/package.json +1 -1
- package/dist/components/p-Cs-pA3OO.js.map +0 -1
- package/dist/components/p-RbKsk0NK.js.map +0 -1
- package/dist/rebill-web-components-sdk/p-14fb1c5c.entry.js.map +0 -1
- package/dist/rebill-web-components-sdk/p-84a8160a.entry.js +0 -2
- package/dist/rebill-web-components-sdk/p-84a8160a.entry.js.map +0 -1
- package/dist/rebill-web-components-sdk/p-d827e221.entry.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as i,h as r}from"./p-BTZ7D7jU.js";import{c as t}from"./p-MMCcKmy_.js";import{a as o}from"./p-CV0wqtJM.js";import{P as l,S as a,I as n}from"./p-Bkzz9eGU.js";import{r as s,R as c,o as d}from"./p-CgrJ7D7V.js";import{B as p,g as m,i as b}from"./p-Do_vNuMa.js";import{f as u}from"./p-D2fDSwuH.js";import{G as g}from"./p-CMSUR2TZ.js";import{i as h}from"./p-B076eOjt.js";import{g as f,a as y}from"./p-BpAHEeyu.js";import"./p-E-ZsRS8r.js";import"./p-CzeVW03r.js";import"./p-DnJ3mmmK.js";const x=":root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark-hover:#001c4a;--rebill-color-info-border:#0156f6;--rebill-color-info-text:#172b85;--rebill-color-link:#0056f6;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-light:rgba(0, 17, 49, 0.1);--rebill-color-error:#ef4444;--rebill-color-error-background:#fef2f2;--rebill-color-error-light:rgba(239, 68, 68, 0.1);--rebill-color-error-dark:#6f101b;--rebill-color-background:#ffffff;--rebill-color-background-left:#fafafa;--rebill-color-background-right:#f4f5f6;--rebill-color-background-secondary:#f7f8fa;--rebill-color-border:#ebedef;--rebill-color-timeline-connector:#c4c8cf;--rebill-color-neutrals-700:#58616e;--rebill-color-neutrals-500:#9ca3af;--rebill-color-border-primary:#e4e4e7;--rebill-color-text-primary:#3b4049;--rebill-color-text-secondary:#6b7280;--rebill-color-grey-700:#7d7d7d;--rebill-color-text-secondary-light:#a1a1aa;--rebill-color-text-on-primary:#ffffff;--rebill-color-disabled:#9ca3af;--rebill-color-shadow:rgba(0, 0, 0, 0.1);--rebill-color-green:#10b981;--rebill-color-green-text:#257c67;--rebill-color-green-light:rgba(183, 233, 221, 0.15);--rebill-color-green-light-2:rgba(183, 233, 221, 1);--rebill-color-info-background:#d5e4ff;--rebill-color-background-secondary-light:#f7f8fa;--rebill-breakpoint-mobile:768px;--rebill-breakpoint-tablet:1024px;--rebill-breakpoint-desktop:1025px;--rebill-color-orange:#ff9400;--rebill-color-black:#1e2025;--rebill-color-grey-300:#3b4049;--rebill-color-grey-100:#aeaeae}.qr-container,.qr-image,.qr-image svg,.qr-image img,[class*='qr-'],[class*='success'],[class*='receipt']{transition:none !important;animation:none !important;will-change:auto !important}button:active,button:focus,button:hover{isolation:isolate}@media (max-width: 1024px){.rebill-checkout-renewal{flex-direction:column;gap:0;justify-content:flex-start;background:var(--rebill-color-background);padding:20px}.right-section .left-section{width:100%;height:100%;background:var(--rebill-color-background)}.checkout-form-section{display:flex;flex-direction:column;justify-content:flex-start;gap:24px;height:100%;margin-top:24px}.otp-container{display:flex;flex-direction:column;justify-content:flex-start;gap:24px}}@media (min-width: 1025px){.rebill-checkout-renewal{width:100vw;min-height:100vh;display:flex;flex-direction:row;justify-content:center;overflow-y:auto}.left-section{display:flex;width:60%;background:var(--rebill-color-background-left);justify-content:space-around}.right-section{display:flex;padding-top:72px;width:40%;background:var(--rebill-color-background-right);position:sticky;top:0;justify-content:center}.checkout-form-section{display:flex;flex-direction:column;justify-content:flex-start;margin-bottom:36px;margin-top:24px;gap:32px}.left-section-container{max-width:450px;min-width:450px;margin:2.5rem 2rem 1.5rem 2rem;display:flex;flex-direction:column}.checkout-summary-section{max-width:450px;min-width:350px;margin:0rem 2rem;background:var(--rebill-color-background-right);display:flex;flex-direction:column;justify-content:flex-start;width:100%}.checkout-form-section user-information,.checkout-form-section payment-method-selector,.checkout-form-section rebill-address,.checkout-summary-section rebill-summary{width:100%}.pac-container{border-radius:4px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border:1px solid #e0e0e0;margin-top:4px;font-family:inherit}.pac-item{padding:10px 12px;cursor:pointer;border-top:none}.pac-item:first-child{border-top:none}.pac-item:hover{background-color:#f5f5f5}.pac-item-query{font-weight:500}.pac-icon{display:none}}.payment-button-container{display:flex;flex-direction:column;gap:16px;margin-bottom:16px}.animated-component{transition:all 0.3s ease-in-out;overflow:visible}.fade-in{animation:fadeIn 0.4s ease-in-out}.slide-in{animation:slideIn 0.5s ease-out}@keyframes fadeIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes slideIn{from{opacity:0;transform:translateX(-20px);max-height:0}to{opacity:1;transform:translateX(0);max-height:450px}}.animated-component.hide{animation:fadeOut 0.3s ease-in-out forwards}@keyframes fadeOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(20px)}}rebill-mode-sandbox{position:fixed;bottom:50px;left:50%;transform:translateX(-50%);z-index:1000}@media (max-width: 1024px){rebill-test-mode-chip{bottom:46px}}@media (min-width: 1025px){rebill-test-mode-chip{bottom:46px}}.mode-sandbox-mobile-container{display:flex;align-items:center;width:100%;padding:0;margin:0;box-sizing:border-box}@media (min-width: 1451px){.left-section-container{min-width:450px;margin:2.5rem 5rem 1.5rem 5rem}.checkout-summary-section{min-width:450px;margin:0rem 5rem}}:root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark-hover:#001c4a;--rebill-color-info-border:#0156f6;--rebill-color-info-text:#172b85;--rebill-color-link:#0056f6;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-light:rgba(0, 17, 49, 0.1);--rebill-color-error:#ef4444;--rebill-color-error-background:#fef2f2;--rebill-color-error-light:rgba(239, 68, 68, 0.1);--rebill-color-error-dark:#6f101b;--rebill-color-background:#ffffff;--rebill-color-background-left:#fafafa;--rebill-color-background-right:#f4f5f6;--rebill-color-background-secondary:#f7f8fa;--rebill-color-border:#ebedef;--rebill-color-timeline-connector:#c4c8cf;--rebill-color-neutrals-700:#58616e;--rebill-color-neutrals-500:#9ca3af;--rebill-color-border-primary:#e4e4e7;--rebill-color-text-primary:#3b4049;--rebill-color-text-secondary:#6b7280;--rebill-color-grey-700:#7d7d7d;--rebill-color-text-secondary-light:#a1a1aa;--rebill-color-text-on-primary:#ffffff;--rebill-color-disabled:#9ca3af;--rebill-color-shadow:rgba(0, 0, 0, 0.1);--rebill-color-green:#10b981;--rebill-color-green-text:#257c67;--rebill-color-green-light:rgba(183, 233, 221, 0.15);--rebill-color-green-light-2:rgba(183, 233, 221, 1);--rebill-color-info-background:#d5e4ff;--rebill-color-background-secondary-light:#f7f8fa;--rebill-breakpoint-mobile:768px;--rebill-breakpoint-tablet:1024px;--rebill-breakpoint-desktop:1025px;--rebill-color-orange:#ff9400;--rebill-color-black:#1e2025;--rebill-color-grey-300:#3b4049;--rebill-color-grey-100:#aeaeae}.qr-container,.qr-image,.qr-image svg,.qr-image img,[class*='qr-'],[class*='success'],[class*='receipt']{transition:none !important;animation:none !important;will-change:auto !important}button:active,button:focus,button:hover{isolation:isolate}.success-page__text-content{margin-bottom:2rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.success-page__success-content{display:flex;flex-direction:column;align-items:center;gap:1rem;width:100%;overflow-x:hidden;box-sizing:border-box}.success-page__lottie-container{width:80px;height:80px}.success-page__success-content rebill-typography[variant='h3']{margin:0 !important;padding:0 !important}.success-page__success-icon{display:flex;justify-content:center;margin:0.5rem 0}.success-page__info-card{padding:24px;gap:16px;width:100%;max-width:450px;border:1px solid #ebedef;border-radius:8px;display:flex;flex-direction:column;box-sizing:border-box}.success-page__card-row{display:flex;justify-content:space-between;align-items:start;min-height:20px;gap:15%}.success-page__card-row:last-of-type{margin-bottom:0}.success-page__card-value{display:flex;align-items:center;gap:0.5rem}.success-page__payment-method-display{display:flex;align-items:center;gap:8px;justify-content:center}.success-page__payment-method-display rebill-card-icon{display:inline-block;flex-shrink:0;margin-right:8px;vertical-align:middle}.success-page__payment-method-display rebill-card-icon svg{display:block}.success-page__payment-method-display rebill-icon{display:inline-block;vertical-align:middle;margin-right:8px}.success-page__payment-method-display rebill-icon div{display:block}.success-page__card-divider{height:1px;background:#e5e7eb}.success-page__download-container{display:flex;align-items:center;justify-content:flex-start;gap:2px;text-decoration:none;cursor:pointer}.success-page__contact-info{text-align:left}.success-page__reference-number{word-break:break-all;overflow-wrap:break-word;hyphens:auto;max-width:100%;text-align:right}.success-page__total-amount-container{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-direction:row}.success-page__trial-pill{background-color:var(--rebill-color-green-light-2);border-radius:4px;padding:4px 6px 4px 6px;display:flex;align-items:center;justify-content:center}.success-page__next-charge-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px}.success-page__next-charge-details{display:flex;justify-content:space-between;align-items:flex-start}.success-page__next-charge-amount{display:flex;flex-direction:row;align-items:center;gap:4px}.success-page__next-charge-date{text-align:right}.success-page__next-charge-section{margin-top:12px;padding-top:12px}@media (max-width: 1024px){.success-page__success-content{max-width:100%;gap:1.5rem;margin-left:16px;margin-right:16px}.success-page__info-card{width:100%;max-width:100%;padding:12px}.success-page__text-content{gap:12px}}@media (max-width: 767px){.success-page__info-card{padding:12px}.success-page__processing-container{padding:0 16px}}.success-page__success-icon{background:rgba(27, 167, 122, 0.15);width:96px;height:96px;border-radius:50%;display:flex;align-items:center;justify-content:center}.success-page__info-card{margin-top:24px;background:white}.success-page__payment-method-display{display:flex;align-items:center;gap:8px}";const k=class{constructor(r){e(this,r);this.success=i(this,"success");this.paymentError=i(this,"paymentError")}changeCardData;changeCardToken;isSubmitting=false;isCardSubmitting=false;isCardSuccess=false;errorMessage=null;breakpoint=p.DESKTOP;errorPaymentCard=false;initialData={};countries=[];allRequiredFields={};currentRequiredFields=[];errorCardInvalid=false;cardMode="input";completedAt=null;success;paymentError;currentPaymentMethod=l.CARD;validationSchema={phoneNumber:t().when([],{is:()=>h("phoneNumber",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.phoneRequired"),otherwise:e=>e.notRequired()}),"billing-country":t().when([],{is:()=>h("billing-country",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.countryRequired"),otherwise:e=>e.notRequired()}),"billing-state":t().when([],{is:()=>h("billing-state",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.stateRequired"),otherwise:e=>e.notRequired()}),"billing-address":t().when([],{is:()=>h("billing-address",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.addressRequired"),otherwise:e=>e.notRequired()}),"billing-city":t().when([],{is:()=>h("billing-city",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.cityRequired"),otherwise:e=>e.notRequired()}),"billing-zip":t().when([],{is:()=>h("billing-zip",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.zipRequired"),otherwise:e=>e.notRequired()}),documentType:t().when([],{is:()=>h("documentType",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.documentTypeRequired"),otherwise:e=>e.notRequired()}),documentNumber:t().when([],{is:()=>h("documentNumber",this.currentRequiredFields)&&this.cardMode==="input",then:e=>{const i=e.required("validation.documentNumberRequired").min(7,"validation.documentInvalid");if(s.data?.price?.country==="BR"){return i.test("numeric-only","validation.documentNumberNumericOnly",(e=>{if(!e)return true;return/^\d+$/.test(e)}))}return i},otherwise:e=>e.notRequired()})};resizeHandler=()=>{this.breakpoint=m(window.innerWidth)};async componentWillLoad(){this.resizeHandler();window.addEventListener("resize",this.resizeHandler);const e=typeof this.changeCardData==="string"?JSON.parse(this.changeCardData):this.changeCardData;c.initializeRenewal({...e,token:this.changeCardToken});s.data.subscription.customerId="";c.setCardId(null);c.setCardTokenId(null);c.setCardInformation(null);a.setCustomerId(null);a.setCardId(null);a.setCardTokenId(null);c.setCardMode("input");this.cardMode="input";c.setSelectedPaymentMethod(l.CARD);g.loadGoogleMapsScript();try{const e=await o.data.getCountries();this.countries=e.data}catch(e){console.error("Error loading countries:",e)}try{this.allRequiredFields=await f()}catch(e){console.error("Error loading required fields:",e)}try{this.currentRequiredFields=y(l.CARD,this.allRequiredFields).fields}catch(e){console.error("Error getting required fields for card:",e)}await this.initializeFingerprint();this.initialData=this.getInitialData();d("cardMode",(()=>{if(s.cardMode!=="input"){c.setCardMode("input");return}this.cardMode="input"}))}disconnectedCallback(){window.removeEventListener("resize",this.resizeHandler)}async initializeFingerprint(){if(!s.deviceId){try{const e=crypto.randomUUID();const i=await o.fingerPrint.getFingerPrint(e);c.setDeviceId(e);const r=i.result.script;const t=document.createElement("script");t.innerHTML=r;document.body.appendChild(t)}catch(e){console.error("Failed to initialize fingerprint:",e)}}}async handleSubmit(e){if(this.isSubmitting){return}await this.handleChangeCard(e)}async handleChangeCard(e){const i=e?.detail||this.getInitialData();if(!s.data.cardTokenId||!s.data.cardInformation){this.errorCardInvalid=true;return}this.errorCardInvalid=false;this.isSubmitting=true;this.isCardSubmitting=true;c.setLoading(true);try{const e={};e.cardTokenId=s.data.cardTokenId;e.billingDetails={address:{lineOne:i["billing-address"]||"",city:i["billing-city"]||"",state:i["billing-state"]||"",country:i["billing-country"]||"",zipCode:i["billing-zip"]||""},identification:{type:i.documentType||"",value:i.documentNumber||""}};const r=await o.subscriptions.changeCard(s.data.subscription.id,e,this.changeCardToken);if(r.data?.card){c.setCardInformation({brand:r.data.card.brand,type:s.data.cardInformation?.type||"",isoCountry:s.data.cardInformation?.isoCountry||"",bank:s.data.cardInformation?.bank||"",lastFour:r.data.card.lastFour,installments:s.data.cardInformation?.installments||{installments:[]}})}this.completedAt=(new Date).toISOString();this.isSubmitting=false;this.isCardSubmitting=false;c.setLoading(false);this.isCardSuccess=true;this.success.emit(r.data)}catch(e){this.isSubmitting=false;this.isCardSubmitting=false;c.setLoading(false);this.errorPaymentCard=true;this.errorMessage={message:e.data?.error?.message};this.paymentError.emit(e)}}getInitialData=()=>({email:s.data.subscription.customerEmail,fullName:s.data.subscription.customerName,card:"","billing-country":"","billing-state":"","billing-address":"","billing-city":"","billing-zip":"",bankId:"",phoneNumber:"",countryCodePhoneNumber:"",documentType:"",documentNumber:""});hasPrefilledAddress=()=>{const e=["billing-country","billing-state","billing-address","billing-city","billing-zip"];return e.some((e=>{const i=this.initialData[e];return i&&i.trim()!==""}))};getFormattedCompletionDate=()=>{if(!this.completedAt){return""}return u(this.completedAt)};get isSandboxMode(){const e=s.data?.organization?.id;return e?e.startsWith("test"):false}render(){if(!s.isInitialized){return r("div",{class:"loading"},n.translate("renewal.loading"))}const e=e=>r("renewal-summary",{titleKey:"changeCard.title",totalAmount:s.data.price.amount,subTotalAmount:s.data.subscription.subTotalAmount,currency:s.data.price.currency,subscriptionTitle:s.data.subscription.name[0]?.text||"Subscription",subscriptionAmount:s.data.subscription.amount,nextChargeDate:s.data.subscription.nextChargeDate,frequency:s.data.subscription.frequency,couponCode:s.data.price.couponCode,discountAmount:s.data.price.discountedAmount,discountPercentage:s.data.price.discountPercentage,...e});return r(r.Fragment,null,r("rebill-processing-payment",{style:{display:this.isCardSubmitting?"block":"none"},titleKey:"changeCard.processingTitle",subtitleKey:"changeCard.processingSubtitle"}),this.isCardSuccess?r("change-card-success",{customerName:s.data.subscription.customerName,cardBrand:s.data.cardInformation?.brand,cardLastFour:s.data.cardInformation?.lastFour||"****",paymentDate:this.getFormattedCompletionDate(),customerEmail:s.data.subscription.customerEmail}):r("rebill-checkout-form",{style:{display:this.isCardSubmitting||this.isCardSuccess?"none":"block"},validationSchema:this.validationSchema,initialData:this.initialData,onSubmit:e=>this.handleSubmit(e),renderForm:({submit:i,errors:t})=>r("div",{class:"rebill-checkout-renewal"},r("div",{class:"left-section"},r("div",{class:"left-section-container"},this.isSandboxMode&&b(this.breakpoint,p.DESKTOP)&&r("div",{class:"mode-sandbox-mobile-container",style:{display:this.isCardSubmitting||this.isCardSuccess?"none":"block"}},r("rebill-mode-sandbox-mobile",null)),r("organization-logo",{organization:s.data.organization}),r("div",{class:"checkout-form-section"},r("user-information-static",{userInfo:{customerName:s.data.subscription.customerName,customerEmail:s.data.subscription.customerEmail}}),b(this.breakpoint,p.DESKTOP)&&e({displayedComponents:"header"}),b(this.breakpoint,p.DESKTOP)&&e({displayedComponents:"details"}),r("div",{style:{display:"flex",flexDirection:"column",gap:"32px"}},r("payment-method-selector",{enabledPaymentMethods:[l.CARD],defaultSelected:this.currentPaymentMethod,errorComponent:{showErrorComponent:this.errorPaymentCard,alertTitle:this.errorMessage?.alertTitle||n.translate("changeCard.errorTitle"),message:this.errorMessage?.message||n.translate("changeCard.errorDescription")},cardError:{showCardInvalid:this.errorCardInvalid,type:null},country:s.data.price.country,documentTypeError:t?.documentType,documentNumberError:t?.documentNumber,showDocument:this.cardMode==="input"&&(h("documentType",this.currentRequiredFields)||h("documentNumber",this.currentRequiredFields))})),this.cardMode==="input"&&(h("billing-country",this.currentRequiredFields)||h("billing-state",this.currentRequiredFields)||h("billing-address",this.currentRequiredFields)||h("billing-city",this.currentRequiredFields)||h("billing-zip",this.currentRequiredFields))&&r("div",{class:"animated-component slide-in"},r("rebill-address",{countryOptions:this.countries.map((e=>({label:e.country,value:e.isoCountryCode}))),billingView:this.hasPrefilledAddress()?"form":"search",errors:{"billing-country":t["billing-country"],"billing-state":t["billing-state"],"billing-address":t["billing-address"],"billing-city":t["billing-city"],"billing-zip":t["billing-zip"]}})),this.cardMode==="input"&&h("phoneNumber",this.currentRequiredFields)&&r("div",{class:"animated-component fade-in"},r("user-information-phone",{error:t?.phoneNumber})),b(this.breakpoint,p.DESKTOP)&&e({displayedComponents:"summary"}),r("div",{style:{display:"flex",flexDirection:"column",gap:"16px"}},r("payment-button",{paymentMethod:l.CARD,isLoading:this.isSubmitting,isChangeCard:true,country:s.data.price.country,isDisabled:s.fetchingInstallments,onSubmit:()=>i()}),r("rebill-alert",{type:"secure",variant:"variant-secure",icon:"lock-outline",message:n.translate("otp.secureMessage")}))),this.isSandboxMode&&!b(this.breakpoint,p.DESKTOP)&&r("rebill-mode-sandbox",null),r("rebill-footer",{style:{marginTop:b(this.breakpoint,p.DESKTOP)?"24px":"auto"}}))),!b(this.breakpoint,p.DESKTOP)&&r("div",{class:"right-section"},r("div",{class:"checkout-summary-section"},e({displayedComponents:["header","details","summary"]}))))}))}};k.style=x;export{k as rebill_change_card};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as i,h as r}from"./p-BTZ7D7jU.js";import{c as t}from"./p-MMCcKmy_.js";import{a as o}from"./p-CV0wqtJM.js";import{P as l,S as a,I as n}from"./p-Bkzz9eGU.js";import{r as s,R as c,o as d}from"./p-CgrJ7D7V.js";import{B as p,g as m,i as b}from"./p-Do_vNuMa.js";import{f as u}from"./p-D2fDSwuH.js";import{G as g}from"./p-CMSUR2TZ.js";import{i as h}from"./p-B076eOjt.js";import{g as f,a as y}from"./p-BpAHEeyu.js";import"./p-E-ZsRS8r.js";import"./p-CzeVW03r.js";import"./p-DnJ3mmmK.js";const x=":root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark-hover:#001c4a;--rebill-color-info-border:#0156f6;--rebill-color-info-text:#172b85;--rebill-color-link:#0056f6;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-light:rgba(0, 17, 49, 0.1);--rebill-color-error:#ef4444;--rebill-color-error-background:#fef2f2;--rebill-color-error-light:rgba(239, 68, 68, 0.1);--rebill-color-error-dark:#6f101b;--rebill-color-background:#ffffff;--rebill-color-background-left:#fafafa;--rebill-color-background-right:#f4f5f6;--rebill-color-background-secondary:#f7f8fa;--rebill-color-border:#ebedef;--rebill-color-timeline-connector:#c4c8cf;--rebill-color-neutrals-700:#58616e;--rebill-color-neutrals-500:#9ca3af;--rebill-color-border-primary:#e4e4e7;--rebill-color-text-primary:#3b4049;--rebill-color-text-secondary:#6b7280;--rebill-color-grey-700:#7d7d7d;--rebill-color-text-secondary-light:#a1a1aa;--rebill-color-text-on-primary:#ffffff;--rebill-color-disabled:#9ca3af;--rebill-color-shadow:rgba(0, 0, 0, 0.1);--rebill-color-green:#10b981;--rebill-color-green-text:#257c67;--rebill-color-green-light:rgba(183, 233, 221, 0.15);--rebill-color-green-light-2:rgba(183, 233, 221, 1);--rebill-color-info-background:#d5e4ff;--rebill-color-background-secondary-light:#f7f8fa;--rebill-breakpoint-mobile:768px;--rebill-breakpoint-tablet:1024px;--rebill-breakpoint-desktop:1025px;--rebill-color-orange:#ff9400;--rebill-color-black:#1e2025;--rebill-color-grey-300:#3b4049;--rebill-color-grey-100:#aeaeae}.qr-container,.qr-image,.qr-image svg,.qr-image img,[class*='qr-'],[class*='success'],[class*='receipt']{transition:none !important;animation:none !important;will-change:auto !important}button:active,button:focus,button:hover{isolation:isolate}@media (max-width: 1024px){.rebill-checkout-renewal{flex-direction:column;gap:0;justify-content:flex-start;background:var(--rebill-color-background);padding:20px}.right-section .left-section{width:100%;height:100%;background:var(--rebill-color-background)}.checkout-form-section{display:flex;flex-direction:column;justify-content:flex-start;gap:24px;height:100%;margin-top:24px}.otp-container{display:flex;flex-direction:column;justify-content:flex-start;gap:24px}}@media (min-width: 1025px){.rebill-checkout-renewal{width:100vw;min-height:100vh;display:flex;flex-direction:row;justify-content:center;overflow-y:auto}.left-section{display:flex;width:60%;background:var(--rebill-color-background-left);justify-content:space-around}.right-section{display:flex;padding-top:72px;width:40%;background:var(--rebill-color-background-right);position:sticky;top:0;justify-content:center}.checkout-form-section{display:flex;flex-direction:column;justify-content:flex-start;margin-bottom:36px;margin-top:24px;gap:32px}.left-section-container{max-width:450px;min-width:450px;margin:2.5rem 2rem 1.5rem 2rem;display:flex;flex-direction:column}.checkout-summary-section{max-width:450px;min-width:350px;margin:0rem 2rem;background:var(--rebill-color-background-right);display:flex;flex-direction:column;justify-content:flex-start;width:100%}.checkout-form-section user-information,.checkout-form-section payment-method-selector,.checkout-form-section rebill-address,.checkout-summary-section rebill-summary{width:100%}.pac-container{border-radius:4px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border:1px solid #e0e0e0;margin-top:4px;font-family:inherit}.pac-item{padding:10px 12px;cursor:pointer;border-top:none}.pac-item:first-child{border-top:none}.pac-item:hover{background-color:#f5f5f5}.pac-item-query{font-weight:500}.pac-icon{display:none}}.payment-button-container{display:flex;flex-direction:column;gap:16px;margin-bottom:16px}.animated-component{transition:all 0.3s ease-in-out;overflow:visible}.fade-in{animation:fadeIn 0.4s ease-in-out}.slide-in{animation:slideIn 0.5s ease-out}@keyframes fadeIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes slideIn{from{opacity:0;transform:translateX(-20px);max-height:0}to{opacity:1;transform:translateX(0);max-height:450px}}.animated-component.hide{animation:fadeOut 0.3s ease-in-out forwards}@keyframes fadeOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(20px)}}rebill-mode-sandbox{position:fixed;bottom:50px;left:50%;transform:translateX(-50%);z-index:1000}@media (max-width: 1024px){rebill-test-mode-chip{bottom:46px}}@media (min-width: 1025px){rebill-test-mode-chip{bottom:46px}}.mode-sandbox-mobile-container{display:flex;align-items:center;width:100%;padding:0;margin:0;box-sizing:border-box}@media (min-width: 1451px){.left-section-container{min-width:450px;margin:2.5rem 5rem 1.5rem 5rem}.checkout-summary-section{min-width:450px;margin:0rem 5rem}}:root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark-hover:#001c4a;--rebill-color-info-border:#0156f6;--rebill-color-info-text:#172b85;--rebill-color-link:#0056f6;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-light:rgba(0, 17, 49, 0.1);--rebill-color-error:#ef4444;--rebill-color-error-background:#fef2f2;--rebill-color-error-light:rgba(239, 68, 68, 0.1);--rebill-color-error-dark:#6f101b;--rebill-color-background:#ffffff;--rebill-color-background-left:#fafafa;--rebill-color-background-right:#f4f5f6;--rebill-color-background-secondary:#f7f8fa;--rebill-color-border:#ebedef;--rebill-color-timeline-connector:#c4c8cf;--rebill-color-neutrals-700:#58616e;--rebill-color-neutrals-500:#9ca3af;--rebill-color-border-primary:#e4e4e7;--rebill-color-text-primary:#3b4049;--rebill-color-text-secondary:#6b7280;--rebill-color-grey-700:#7d7d7d;--rebill-color-text-secondary-light:#a1a1aa;--rebill-color-text-on-primary:#ffffff;--rebill-color-disabled:#9ca3af;--rebill-color-shadow:rgba(0, 0, 0, 0.1);--rebill-color-green:#10b981;--rebill-color-green-text:#257c67;--rebill-color-green-light:rgba(183, 233, 221, 0.15);--rebill-color-green-light-2:rgba(183, 233, 221, 1);--rebill-color-info-background:#d5e4ff;--rebill-color-background-secondary-light:#f7f8fa;--rebill-breakpoint-mobile:768px;--rebill-breakpoint-tablet:1024px;--rebill-breakpoint-desktop:1025px;--rebill-color-orange:#ff9400;--rebill-color-black:#1e2025;--rebill-color-grey-300:#3b4049;--rebill-color-grey-100:#aeaeae}.qr-container,.qr-image,.qr-image svg,.qr-image img,[class*='qr-'],[class*='success'],[class*='receipt']{transition:none !important;animation:none !important;will-change:auto !important}button:active,button:focus,button:hover{isolation:isolate}.success-page__text-content{margin-bottom:2rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.success-page__success-content{display:flex;flex-direction:column;align-items:center;gap:1rem;width:100%;overflow-x:hidden;box-sizing:border-box}.success-page__lottie-container{width:80px;height:80px}.success-page__success-content rebill-typography[variant='h3']{margin:0 !important;padding:0 !important}.success-page__success-icon{display:flex;justify-content:center;margin:0.5rem 0}.success-page__info-card{padding:24px;gap:16px;width:100%;max-width:450px;border:1px solid #ebedef;border-radius:8px;display:flex;flex-direction:column;box-sizing:border-box}.success-page__card-row{display:flex;justify-content:space-between;align-items:start;min-height:20px;gap:15%}.success-page__card-row:last-of-type{margin-bottom:0}.success-page__card-value{display:flex;align-items:center;gap:0.5rem}.success-page__payment-method-display{display:flex;align-items:center;gap:8px;justify-content:center}.success-page__payment-method-display rebill-card-icon{display:inline-block;flex-shrink:0;margin-right:8px;vertical-align:middle}.success-page__payment-method-display rebill-card-icon svg{display:block}.success-page__payment-method-display rebill-icon{display:inline-block;vertical-align:middle;margin-right:8px}.success-page__payment-method-display rebill-icon div{display:block}.success-page__card-divider{height:1px;background:#e5e7eb}.success-page__download-container{display:flex;align-items:center;justify-content:flex-start;gap:2px;text-decoration:none;cursor:pointer}.success-page__contact-info{text-align:left}.success-page__reference-number{word-break:break-all;overflow-wrap:break-word;hyphens:auto;max-width:100%;text-align:right}.success-page__total-amount-container{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-direction:row}.success-page__trial-pill{background-color:var(--rebill-color-green-light-2);border-radius:4px;padding:4px 6px 4px 6px;display:flex;align-items:center;justify-content:center}.success-page__next-charge-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px}.success-page__next-charge-details{display:flex;justify-content:space-between;align-items:flex-start}.success-page__next-charge-amount{display:flex;flex-direction:row;align-items:center;gap:4px}.success-page__next-charge-date{text-align:right}.success-page__next-charge-section{margin-top:12px;padding-top:12px}@media (max-width: 1024px){.success-page__success-content{max-width:100%;gap:1.5rem;margin-left:16px;margin-right:16px}.success-page__info-card{width:100%;max-width:100%;padding:12px}.success-page__text-content{gap:12px}}@media (max-width: 767px){.success-page__info-card{padding:12px}.success-page__processing-container{padding:0 16px}}.success-page__success-icon{background:rgba(27, 167, 122, 0.15);width:96px;height:96px;border-radius:50%;display:flex;align-items:center;justify-content:center}.success-page__info-card{margin-top:24px;background:white}.success-page__payment-method-display{display:flex;align-items:center;gap:8px}";const k=class{constructor(r){e(this,r);this.success=i(this,"success");this.paymentError=i(this,"paymentError")}changeCardData;changeCardToken;isSubmitting=false;isCardSubmitting=false;isCardSuccess=false;errorMessage=null;breakpoint=p.DESKTOP;errorPaymentCard=false;initialData={};countries=[];allRequiredFields={};currentRequiredFields=[];errorCardInvalid=false;cardMode="input";completedAt=null;success;paymentError;currentPaymentMethod=l.CARD;validationSchema={phoneNumber:t().when([],{is:()=>h("phoneNumber",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.phoneRequired"),otherwise:e=>e.notRequired()}),"billing-country":t().when([],{is:()=>h("billing-country",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.countryRequired"),otherwise:e=>e.notRequired()}),"billing-state":t().when([],{is:()=>h("billing-state",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.stateRequired"),otherwise:e=>e.notRequired()}),"billing-address":t().when([],{is:()=>h("billing-address",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.addressRequired"),otherwise:e=>e.notRequired()}),"billing-city":t().when([],{is:()=>h("billing-city",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.cityRequired"),otherwise:e=>e.notRequired()}),"billing-zip":t().when([],{is:()=>h("billing-zip",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.zipRequired"),otherwise:e=>e.notRequired()}),documentType:t().when([],{is:()=>h("documentType",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.documentTypeRequired"),otherwise:e=>e.notRequired()}),documentNumber:t().when([],{is:()=>h("documentNumber",this.currentRequiredFields)&&this.cardMode==="input",then:e=>{const i=e.required("validation.documentNumberRequired").min(7,"validation.documentInvalid");if(s.data?.price?.country==="BR"){return i.test("numeric-only","validation.documentNumberNumericOnly",(e=>{if(!e)return true;return/^\d+$/.test(e)}))}return i},otherwise:e=>e.notRequired()})};resizeHandler=()=>{this.breakpoint=m(window.innerWidth)};async componentWillLoad(){this.resizeHandler();window.addEventListener("resize",this.resizeHandler);const e=typeof this.changeCardData==="string"?JSON.parse(this.changeCardData):this.changeCardData;c.initializeRenewal({...e,token:this.changeCardToken});s.data.subscription.customerId="";c.setCardId(null);c.setCardTokenId(null);c.setCardInformation(null);a.setCustomerId(null);a.setCardId(null);a.setCardTokenId(null);c.setCardMode("input");this.cardMode="input";c.setSelectedPaymentMethod(l.CARD);g.loadGoogleMapsScript();try{const e=await o.data.getCountries();this.countries=e.data}catch(e){console.error("Error loading countries:",e)}try{this.allRequiredFields=await f()}catch(e){console.error("Error loading required fields:",e)}try{this.currentRequiredFields=y(l.CARD,this.allRequiredFields).fields}catch(e){console.error("Error getting required fields for card:",e)}await this.initializeFingerprint();this.initialData=this.getInitialData();d("cardMode",(()=>{if(s.cardMode!=="input"){c.setCardMode("input");return}this.cardMode="input"}))}disconnectedCallback(){window.removeEventListener("resize",this.resizeHandler)}async initializeFingerprint(){if(!s.deviceId){try{const e=crypto.randomUUID();const i=await o.fingerPrint.getFingerPrint(e);c.setDeviceId(e);const r=i.result.script;const t=document.createElement("script");t.innerHTML=r;document.body.appendChild(t)}catch(e){console.error("Failed to initialize fingerprint:",e)}}}async handleSubmit(e){if(this.isSubmitting){return}await this.handleChangeCard(e)}async handleChangeCard(e){const i=e?.detail||this.getInitialData();if(!s.data.cardTokenId||!s.data.cardInformation){this.errorCardInvalid=true;return}this.errorCardInvalid=false;this.isSubmitting=true;this.isCardSubmitting=true;c.setLoading(true);try{const e={};e.cardTokenId=s.data.cardTokenId;e.billingDetails={address:{lineOne:i["billing-address"]||"",city:i["billing-city"]||"",state:i["billing-state"]||"",country:i["billing-country"]||"",zipCode:i["billing-zip"]||""},identification:{type:i.documentType||"",value:i.documentNumber||""}};const r=await o.subscriptions.changeCard(s.data.subscription.id,e,this.changeCardToken);if(r.data?.card){c.setCardInformation({brand:r.data.card.brand,type:s.data.cardInformation?.type||"",isoCountry:s.data.cardInformation?.isoCountry||"",bank:s.data.cardInformation?.bank||"",lastFour:r.data.card.lastFour,installments:s.data.cardInformation?.installments||{installments:[]}})}this.completedAt=(new Date).toISOString();this.isSubmitting=false;this.isCardSubmitting=false;c.setLoading(false);this.isCardSuccess=true;this.success.emit(r.data)}catch(e){this.isSubmitting=false;this.isCardSubmitting=false;c.setLoading(false);this.errorPaymentCard=true;this.errorMessage={message:e.data?.error?.message};this.paymentError.emit(e)}}getInitialData=()=>({email:s.data.subscription.customerEmail,fullName:s.data.subscription.customerName,card:"","billing-country":"","billing-state":"","billing-address":"","billing-city":"","billing-zip":"",bankId:"",phoneNumber:"",countryCodePhoneNumber:"",documentType:"",documentNumber:""});hasPrefilledAddress=()=>{const e=["billing-country","billing-state","billing-address","billing-city","billing-zip"];return e.some((e=>{const i=this.initialData[e];return i&&i.trim()!==""}))};getFormattedCompletionDate=()=>{if(!this.completedAt){return""}return u(this.completedAt)};get isSandboxMode(){const e=s.data?.organization?.id;return e?e.startsWith("test"):false}render(){if(!s.isInitialized){return r("div",{class:"loading"},n.translate("renewal.loading"))}const e=e=>r("renewal-summary",{titleKey:"changeCard.title",totalAmount:s.data.price.amount,subTotalAmount:s.data.subscription.subTotalAmount,currency:s.data.price.currency,subscriptionTitle:s.data.subscription.name[0]?.text||"Subscription",subscriptionAmount:s.data.subscription.amount,nextChargeDate:s.data.subscription.nextChargeDate,frequency:s.data.subscription.frequency,couponCode:s.data.price.couponCode,discountAmount:s.data.price.discountedAmount,discountPercentage:s.data.price.discountPercentage,...e});return r(r.Fragment,null,r("rebill-processing-payment",{style:{display:this.isCardSubmitting?"block":"none"},titleKey:"changeCard.processingTitle",subtitleKey:"changeCard.processingSubtitle"}),this.isCardSuccess?r("change-card-success",{customerName:s.data.subscription.customerName,cardBrand:s.data.cardInformation?.brand,cardLastFour:s.data.cardInformation?.lastFour||"****",paymentDate:this.getFormattedCompletionDate(),customerEmail:s.data.subscription.customerEmail}):r("rebill-checkout-form",{style:{display:this.isCardSubmitting||this.isCardSuccess?"none":"block"},validationSchema:this.validationSchema,initialData:this.initialData,onSubmit:e=>this.handleSubmit(e),renderForm:({submit:i,errors:t})=>r("div",{class:"rebill-checkout-renewal"},r("div",{class:"left-section"},r("div",{class:"left-section-container"},this.isSandboxMode&&b(this.breakpoint,p.DESKTOP)&&r("div",{class:"mode-sandbox-mobile-container",style:{display:this.isCardSubmitting||this.isCardSuccess?"none":"block"}},r("rebill-mode-sandbox-mobile",null)),r("organization-logo",{organization:s.data.organization}),r("div",{class:"checkout-form-section"},r("user-information-static",{userInfo:{customerName:s.data.subscription.customerName,customerEmail:s.data.subscription.customerEmail}}),b(this.breakpoint,p.DESKTOP)&&e({displayedComponents:"header"}),b(this.breakpoint,p.DESKTOP)&&e({displayedComponents:"details"}),r("div",{style:{display:"flex",flexDirection:"column",gap:"32px"}},r("payment-method-selector",{enabledPaymentMethods:[l.CARD],defaultSelected:this.currentPaymentMethod,errorComponent:{showErrorComponent:this.errorPaymentCard,alertTitle:this.errorMessage?.alertTitle||n.translate("changeCard.errorTitle"),message:this.errorMessage?.message||n.translate("changeCard.errorDescription")},cardError:{showCardInvalid:this.errorCardInvalid,type:null},country:s.data.price.country,documentTypeError:t?.documentType,documentNumberError:t?.documentNumber,showDocument:this.cardMode==="input"&&(h("documentType",this.currentRequiredFields)||h("documentNumber",this.currentRequiredFields))})),this.cardMode==="input"&&(h("billing-country",this.currentRequiredFields)||h("billing-state",this.currentRequiredFields)||h("billing-address",this.currentRequiredFields)||h("billing-city",this.currentRequiredFields)||h("billing-zip",this.currentRequiredFields))&&r("div",{class:"animated-component slide-in"},r("rebill-address",{countryOptions:this.countries.map((e=>({label:e.country,value:e.isoCountryCode}))),billingView:this.hasPrefilledAddress()?"form":"search",errors:{"billing-country":t["billing-country"],"billing-state":t["billing-state"],"billing-address":t["billing-address"],"billing-city":t["billing-city"],"billing-zip":t["billing-zip"]}})),this.cardMode==="input"&&h("phoneNumber",this.currentRequiredFields)&&r("div",{class:"animated-component fade-in"},r("user-information-phone",{error:t?.phoneNumber||t?.isValidPhoneNumber})),b(this.breakpoint,p.DESKTOP)&&e({displayedComponents:"summary"}),r("div",{style:{display:"flex",flexDirection:"column",gap:"16px"}},r("payment-button",{paymentMethod:l.CARD,isLoading:this.isSubmitting,isChangeCard:true,country:s.data.price.country,isDisabled:s.fetchingInstallments,onSubmit:()=>i()}),r("rebill-alert",{type:"secure",variant:"variant-secure",icon:"lock-outline",message:n.translate("otp.secureMessage")}))),this.isSandboxMode&&!b(this.breakpoint,p.DESKTOP)&&r("rebill-mode-sandbox",null),r("rebill-footer",{style:{marginTop:b(this.breakpoint,p.DESKTOP)?"24px":"auto"}}))),!b(this.breakpoint,p.DESKTOP)&&r("div",{class:"right-section"},r("div",{class:"checkout-summary-section"},e({displayedComponents:["header","details","summary"]}))))}))}};k.style=x;export{k as rebill_change_card};
|
|
2
|
+
//# sourceMappingURL=p-ae158592.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["registerInstance","createEvent","h","create$6","api","PAYMENT_METHOD_ENUM","SessionStore","I18nService","renewalState","RenewalStore","onChange","BREAKPOINT_ENUM","getBreakpoint","isBreakpointBelow","formatDateTime","GoogleMapsService","isFieldRequired","getAllRequiredFieldsRenewal","getRequiredFieldsForMethod","rebillChangeCardCss","RebillChangeCard","constructor","hostRef","this","success","paymentError","changeCardData","changeCardToken","isSubmitting","isCardSubmitting","isCardSuccess","errorMessage","breakpoint","DESKTOP","errorPaymentCard","initialData","countries","allRequiredFields","currentRequiredFields","errorCardInvalid","cardMode","completedAt","currentPaymentMethod","CARD","validationSchema","phoneNumber","when","is","then","schema","required","otherwise","notRequired","documentType","documentNumber","baseSchema","min","data","price","country","test","value","resizeHandler","window","innerWidth","componentWillLoad","addEventListener","changeCardProps","JSON","parse","initializeRenewal","token","subscription","customerId","setCardId","setCardTokenId","setCardInformation","setCustomerId","setCardMode","setSelectedPaymentMethod","loadGoogleMapsScript","response","getCountries","error","console","fields","initializeFingerprint","getInitialData","disconnectedCallback","removeEventListener","deviceId","uuid","crypto","randomUUID","fingerprintResponse","fingerPrint","getFingerPrint","setDeviceId","script","result","scriptElement","document","createElement","innerHTML","body","appendChild","handleSubmit","event","handleChangeCard","formData","detail","cardTokenId","cardInformation","setLoading","changeCardRequest","billingDetails","address","lineOne","city","state","zipCode","identification","type","subscriptions","changeCard","id","card","brand","isoCountry","bank","lastFour","installments","Date","toISOString","emit","message","email","customerEmail","fullName","customerName","bankId","countryCodePhoneNumber","hasPrefilledAddress","billingFields","some","key","trim","getFormattedCompletionDate","isSandboxMode","organizationId","organization","startsWith","render","isInitialized","class","translate","renderSummary","props","titleKey","totalAmount","amount","subTotalAmount","currency","subscriptionTitle","name","text","subscriptionAmount","nextChargeDate","frequency","couponCode","discountAmount","discountedAmount","discountPercentage","Fragment","style","display","subtitleKey","cardBrand","cardLastFour","paymentDate","onSubmit","args","renderForm","submit","errors","userInfo","displayedComponents","flexDirection","gap","enabledPaymentMethods","defaultSelected","errorComponent","showErrorComponent","alertTitle","cardError","showCardInvalid","documentTypeError","documentNumberError","showDocument","countryOptions","map","label","isoCountryCode","billingView","isValidPhoneNumber","paymentMethod","isLoading","isChangeCard","isDisabled","fetchingInstallments","variant","icon","marginTop"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAaC,MAAS,8BAC7CC,MAAgB,8BAChBC,MAAW,8BACXC,OAA0BC,OAAmBC,MAAmB,8BAChEC,OAAmBC,OAAmBC,MAAgB,8BACtDC,OAAsBC,OAAoBC,MAAyB,8BACnEC,MAAsB,8BACtBC,MAAyB,8BACzBC,MAAuB,8BACvBC,OAAkCC,MAAkC,wBAC3E,wBACA,wBACA,kBAEP,MAAMC,EAAsB,knTAE5B,MAAMC,EAAmB,MACrB,WAAAC,CAAYC,GACRtB,EAAiBuB,KAAMD,GACvBC,KAAKC,QAAUvB,EAAYsB,KAAM,WACjCA,KAAKE,aAAexB,EAAYsB,KAAM,eAC1C,CACAG,eACAC,gBACAC,aAAe,MACfC,iBAAmB,MACnBC,cAAgB,MAChBC,aAAe,KACfC,WAAarB,EAAgBsB,QAC7BC,iBAAmB,MACnBC,YAAc,CAAC,EACfC,UAAY,GACZC,kBAAoB,CAAC,EACrBC,sBAAwB,GACxBC,iBAAmB,MACnBC,SAAW,QACXC,YAAc,KACdjB,QACAC,aACAiB,qBAAuBrC,EAAoBsC,KAC3CC,iBAAmB,CACfC,YAAe1C,IAAW2C,KAAK,GAAI,CAC/BC,GAAI,IAAM/B,EAAgB,cAAeO,KAAKe,wBAA0Bf,KAAKiB,WAAa,QAC1FQ,KAAMC,GAAUA,EAAOC,SAAS,4BAChCC,UAAWF,GAAUA,EAAOG,gBAEhC,kBAAmBjD,IAAW2C,KAAK,GAAI,CACnCC,GAAI,IAAM/B,EAAgB,kBAAmBO,KAAKe,wBAA0Bf,KAAKiB,WAAa,QAC9FQ,KAAM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E4K,MAAO,CAC1HsC,UAAWvM,EAAkBU,KAAKS,WAAYrB,EAAgBsB,SACxD,OACA,aACDpB,EAAkBU,KAAKS,WAAYrB,EAAgBsB,UAAa/B,EAAE,MAAO,CAAEwJ,MAAO,iBAAmBxJ,EAAE,MAAO,CAAEwJ,MAAO,4BAA8BE,EAAc,CAC5K8B,oBAAqB,CAAC,SAAU,UAAW,kBAEvD,GAEJtK,EAAiB0J,MAAQ3J,SAEhBC","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,c as t,h as i}from"./p-BTZ7D7jU.js";import{c as r}from"./p-MMCcKmy_.js";import{a as o}from"./p-CV0wqtJM.js";import{g as n,C as s,P as a,a as l}from"./p-BRbb4VbD.js";import{P as c,I as d}from"./p-Bkzz9eGU.js";import{S as h}from"./p-vsLqF4hk.js";import{r as m,R as u,o as p}from"./p-CgrJ7D7V.js";import{B as f,g as b,i as g}from"./p-Do_vNuMa.js";import{C as y}from"./p-C5Pu-n-i.js";import{G as x}from"./p-CMSUR2TZ.js";import{P as w}from"./p-DnJ3mmmK.js";import{i as k,g as v}from"./p-B076eOjt.js";import{g as C,a as q}from"./p-BpAHEeyu.js";import"./p-E-ZsRS8r.js";import"./p-CzeVW03r.js";const j=":root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark-hover:#001c4a;--rebill-color-info-border:#0156f6;--rebill-color-info-text:#172b85;--rebill-color-link:#0056f6;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-light:rgba(0, 17, 49, 0.1);--rebill-color-error:#ef4444;--rebill-color-error-background:#fef2f2;--rebill-color-error-light:rgba(239, 68, 68, 0.1);--rebill-color-error-dark:#6f101b;--rebill-color-background:#ffffff;--rebill-color-background-left:#fafafa;--rebill-color-background-right:#f4f5f6;--rebill-color-background-secondary:#f7f8fa;--rebill-color-border:#ebedef;--rebill-color-timeline-connector:#c4c8cf;--rebill-color-neutrals-700:#58616e;--rebill-color-neutrals-500:#9ca3af;--rebill-color-border-primary:#e4e4e7;--rebill-color-text-primary:#3b4049;--rebill-color-text-secondary:#6b7280;--rebill-color-grey-700:#7d7d7d;--rebill-color-text-secondary-light:#a1a1aa;--rebill-color-text-on-primary:#ffffff;--rebill-color-disabled:#9ca3af;--rebill-color-shadow:rgba(0, 0, 0, 0.1);--rebill-color-green:#10b981;--rebill-color-green-text:#257c67;--rebill-color-green-light:rgba(183, 233, 221, 0.15);--rebill-color-green-light-2:rgba(183, 233, 221, 1);--rebill-color-info-background:#d5e4ff;--rebill-color-background-secondary-light:#f7f8fa;--rebill-breakpoint-mobile:768px;--rebill-breakpoint-tablet:1024px;--rebill-breakpoint-desktop:1025px;--rebill-color-orange:#ff9400;--rebill-color-black:#1e2025;--rebill-color-grey-300:#3b4049;--rebill-color-grey-100:#aeaeae}.qr-container,.qr-image,.qr-image svg,.qr-image img,[class*='qr-'],[class*='success'],[class*='receipt']{transition:none !important;animation:none !important;will-change:auto !important}button:active,button:focus,button:hover{isolation:isolate}@media (max-width: 1024px){.rebill-checkout-renewal{flex-direction:column;gap:0;justify-content:flex-start;background:var(--rebill-color-background);padding:20px}.right-section .left-section{width:100%;height:100%;background:var(--rebill-color-background)}.checkout-form-section{display:flex;flex-direction:column;justify-content:flex-start;gap:24px;height:100%;margin-top:24px}.otp-container{display:flex;flex-direction:column;justify-content:flex-start;gap:24px}}@media (min-width: 1025px){.rebill-checkout-renewal{width:100vw;min-height:100vh;display:flex;flex-direction:row;justify-content:center;overflow-y:auto}.left-section{display:flex;width:60%;background:var(--rebill-color-background-left);justify-content:space-around}.right-section{display:flex;padding-top:72px;width:40%;background:var(--rebill-color-background-right);position:sticky;top:0;justify-content:center}.checkout-form-section{display:flex;flex-direction:column;justify-content:flex-start;margin-bottom:36px;margin-top:24px;gap:32px}.left-section-container{max-width:450px;min-width:450px;margin:2.5rem 2rem 1.5rem 2rem;display:flex;flex-direction:column}.checkout-summary-section{max-width:450px;min-width:350px;margin:0rem 2rem;background:var(--rebill-color-background-right);display:flex;flex-direction:column;justify-content:flex-start;width:100%}.checkout-form-section user-information,.checkout-form-section payment-method-selector,.checkout-form-section rebill-address,.checkout-summary-section rebill-summary{width:100%}.pac-container{border-radius:4px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border:1px solid #e0e0e0;margin-top:4px;font-family:inherit}.pac-item{padding:10px 12px;cursor:pointer;border-top:none}.pac-item:first-child{border-top:none}.pac-item:hover{background-color:#f5f5f5}.pac-item-query{font-weight:500}.pac-icon{display:none}}.payment-button-container{display:flex;flex-direction:column;gap:16px;margin-bottom:16px}.animated-component{transition:all 0.3s ease-in-out;overflow:visible}.fade-in{animation:fadeIn 0.4s ease-in-out}.slide-in{animation:slideIn 0.5s ease-out}@keyframes fadeIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes slideIn{from{opacity:0;transform:translateX(-20px);max-height:0}to{opacity:1;transform:translateX(0);max-height:450px}}.animated-component.hide{animation:fadeOut 0.3s ease-in-out forwards}@keyframes fadeOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(20px)}}rebill-mode-sandbox{position:fixed;bottom:50px;left:50%;transform:translateX(-50%);z-index:1000}@media (max-width: 1024px){rebill-test-mode-chip{bottom:46px}}@media (min-width: 1025px){rebill-test-mode-chip{bottom:46px}}.mode-sandbox-mobile-container{display:flex;align-items:center;width:100%;padding:0;margin:0;box-sizing:border-box}@media (min-width: 1451px){.left-section-container{min-width:450px;margin:2.5rem 5rem 1.5rem 5rem}.checkout-summary-section{min-width:450px;margin:0rem 5rem}}";const M=class{constructor(i){e(this,i);this.success=t(this,"success");this.paymentError=t(this,"paymentError");this.paymentMethodSelected=t(this,"paymentMethodSelected")}renewalData;renewalToken;currentPaymentMethod=c.CARD;isSubmitting=false;isCardSubmitting=false;isCardSuccess=false;errorMessage=null;breakpoint=f.DESKTOP;errorPaymentCard=false;errorPaymentAPM=false;initialData={};checkoutResponse=null;currentApmPaymentMethod=null;countries=[];allRequiredFields={};currentRequiredFields=[];errorCardInvalid=false;cardMode="select";success;paymentError;paymentMethodSelected;validationSchema={phoneNumber:r().when([],{is:()=>k("phoneNumber",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.phoneRequired"),otherwise:e=>e.notRequired()}),"billing-country":r().when([],{is:()=>k("billing-country",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.countryRequired"),otherwise:e=>e.notRequired()}),"billing-state":r().when([],{is:()=>k("billing-state",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.stateRequired"),otherwise:e=>e.notRequired()}),"billing-address":r().when([],{is:()=>k("billing-address",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.addressRequired"),otherwise:e=>e.notRequired()}),"billing-city":r().when([],{is:()=>k("billing-city",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.cityRequired"),otherwise:e=>e.notRequired()}),"billing-zip":r().when([],{is:()=>k("billing-zip",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.zipRequired"),otherwise:e=>e.notRequired()}),bankId:r().when([],{is:()=>k("bankId",this.currentRequiredFields),then:e=>e.required("validation.bankRequired"),otherwise:e=>e.notRequired()}),documentType:r().when([],{is:()=>k("documentType",this.currentRequiredFields)&&this.cardMode==="input",then:e=>e.required("validation.documentTypeRequired"),otherwise:e=>e.notRequired()}),documentNumber:r().when([],{is:()=>k("documentNumber",this.currentRequiredFields)&&this.cardMode==="input",then:e=>{const t=e.required("validation.documentNumberRequired").min(7,"validation.documentInvalid");if(m.data?.price?.country==="BR"){return t.test("numeric-only","validation.documentNumberNumericOnly",(e=>{if(!e)return true;return/^\d+$/.test(e)}))}return t},otherwise:e=>e.notRequired()})};resizeHandler=()=>{this.breakpoint=b(window.innerWidth)};async componentWillLoad(){this.resizeHandler();window.addEventListener("resize",this.resizeHandler);const e=typeof this.renewalData==="string"?JSON.parse(this.renewalData):this.renewalData;u.initializeRenewal({...e,token:this.renewalToken});x.loadGoogleMapsScript();try{const e=await o.data.getCountries();this.countries=e.data}catch(e){console.error("Error loading countries:",e)}try{this.allRequiredFields=await C()}catch(e){console.error("Error loading required fields:",e)}if(m.data.paymentMethods.length>0){let e=null;if(m.data.subscription?.paymentMethod){const t=m.data.subscription.paymentMethod.toLowerCase();const i=t==="card"?c.CARD:t==="bank_transfer"?c.BANK_TRANSFER:null;if(i){const t=m.data.paymentMethods.some((e=>e.type===i));if(t){e=i}}}if(!e){e=m.data.paymentMethods[0].type}this.currentPaymentMethod=e;u.setSelectedPaymentMethod(e);if(e!==c.CARD){this.cardMode="input";u.setCardMode("input")}try{this.currentRequiredFields=q(e,this.allRequiredFields).fields}catch(e){console.error("Error getting required fields for method:",e)}await this.initializeFingerprint(e)}this.initialData=this.getInitialData();p("cardMode",(()=>{this.cardMode=m.cardMode}))}disconnectedCallback(){window.removeEventListener("resize",this.resizeHandler)}async handlePaymentMethodSelected(e){e.stopPropagation();if(this.currentPaymentMethod===e.detail){return}this.currentPaymentMethod=e.detail;u.setSelectedPaymentMethod(this.currentPaymentMethod);if(this.currentPaymentMethod!==c.CARD){this.cardMode="input";u.setCardMode("input")}try{this.currentRequiredFields=q(this.currentPaymentMethod,this.allRequiredFields).fields}catch(e){console.error("Error getting required fields for method:",e)}await this.initializeFingerprint(this.currentPaymentMethod);this.paymentMethodSelected.emit(e.detail)}async initializeFingerprint(e){if(e===c.CARD&&!m.deviceId){try{const e=crypto.randomUUID();const t=await o.fingerPrint.getFingerPrint(e);u.setDeviceId(e);const i=t.result.script;const r=document.createElement("script");r.innerHTML=i;document.body.appendChild(r)}catch(e){console.error("Failed to initialize fingerprint:",e)}}}handleBankSelected(e){e.stopPropagation();u.setSelectedBankId(e.detail)}handleCardSelected(e){const{card:t,cvv:i}=e.detail;u.setSelectedCard(t);u.setCvv(i||"")}get currentPaymentError(){if(this.currentPaymentMethod===c.CARD){return this.errorPaymentCard}else if(this.currentPaymentMethod===c.CASH||this.currentPaymentMethod===c.BANK_TRANSFER){return this.errorPaymentAPM}return false}async handleSubmit(e){if(this.isSubmitting){return}if(this.currentPaymentMethod===c.CARD){await this.handleCardRenewal(e)}else{await this.handleAPMRenewal(e)}}async handleCardRenewal(e){const t=e?.detail||this.getInitialData();if(!m.data.cardId&&!m.data.cardTokenId){this.errorCardInvalid=true;return}if(!m.data.cardInformation&&!m.data.cardId){this.errorCardInvalid=true;return}this.errorCardInvalid=false;this.isSubmitting=true;this.isCardSubmitting=true;u.setLoading(true);try{const e={transaction:{quantity:1},...m.data.cardId&&{cardId:m.data.cardId},...m.data.cardTokenId&&{cardTokenId:m.data.cardTokenId},customAttributes:{...m.deviceId&&{deviceId:m.deviceId}},...this.cardMode==="input"&&{customer:{firstName:t.fullName?.split(" ")[0]||m.data.subscription.customerName?.split(" ")[0],lastName:t.fullName?.split(" ").slice(1).join(" ")||m.data.subscription.customerName?.split(" ").slice(1).join(" "),email:t.email||m.data.subscription.customerEmail,phone:{countryCode:t.countryCodePhoneNumber||"",number:t.phoneNumber||""}},billingDetails:{address:{lineOne:t["billing-address"]||"",city:t["billing-city"]||"",state:t["billing-state"]||"",country:t["billing-country"]||"",zipCode:t["billing-zip"]||""},identification:{type:t.documentType||"",value:t.documentNumber||""}}}};const i=n();const r=await o.checkout.createCardCheckoutRequest(m.data.id,i,e,m.token);this.isSubmitting=false;this.isCardSubmitting=false;u.setLoading(false);u.setCheckoutResponse(r.data);if(r.data.result?.status.toUpperCase()===s.APPROVED){this.isCardSuccess=true}else{this.isCardSuccess=false;this.errorPaymentCard=true;this.errorMessage={message:r.data.error?.error?.message}}}catch(e){this.isSubmitting=false;this.isCardSubmitting=false;u.setLoading(false);this.errorPaymentCard=true;this.errorMessage={message:e.data?.error?.message}}}async handleAPMRenewal(e){this.isSubmitting=true;u.setLoading(true);try{const t=w.mapToAPMPaymentMethod(this.currentPaymentMethod,m.data.price.country);const i=e?.detail||this.getFormData();const r={address:{country:i["billing-country"],state:i["billing-state"]||"",city:i["billing-city"]||"",zipCode:i["billing-zip"]||"",lineOne:i["billing-address"]||""},identification:{type:i.documentType||"dni",value:i.documentNumber||""}};const a={transaction:{quantity:1},method:t,billingDetails:r,redirect:{approved:window.location.origin+"/renewal/success",rejected:window.location.origin+"/renewal/failure"},paymentMetadata:{orderId:m.data.id,source:"renewal-web"},customAttributes:{bank:i.bankId||""}};a.customer={firstName:i.fullName?.split(" ")[0]||m.data.subscription.customerName.split(" ")[0]||"",lastName:i.fullName?.split(" ").slice(1).join(" ")||m.data.subscription.customerName.split(" ").slice(1).join(" ")||"",email:i.email||m.data.subscription.customerEmail,phone:{countryCode:i.countryCodePhoneNumber||"",number:i.phoneNumber||""}};const l=n();const c=await o.checkout.createAPMCheckoutRequest(m.data.id,l,a);this.isSubmitting=false;u.setLoading(false);u.setCheckoutResponse(c.data);this.checkoutResponse=c.data;const d=c.data.result?.status?.toString().toLowerCase();const p=d===s.APPROVED.toLowerCase();const f=d===h.PENDING_CUSTOMER_CHARGE;if(p){this.isCardSuccess=true;this.errorPaymentAPM=false;this.errorMessage=null}else if(f){this.isCardSuccess=false;this.errorPaymentAPM=false;this.errorMessage=null}else{this.paymentError.emit(c.data);u.setCheckoutResponse(c.data);this.errorPaymentAPM=true;this.errorMessage={alertTitle:c.data?.error?.message,message:c.data.error?.message}}}catch(e){this.isSubmitting=false;u.setLoading(false);this.paymentError.emit(e);this.errorPaymentAPM=true;this.errorMessage={alertTitle:e.data?.error?.message,message:e.data?.error?.message}}}getFormData=()=>this.initialData;getInitialData=()=>({email:m.data.subscription.customerEmail,fullName:m.data.subscription.customerName,card:"","billing-country":"","billing-state":"","billing-address":"","billing-city":"","billing-zip":"",bankId:"",phoneNumber:"",countryCodePhoneNumber:"",documentType:"",documentNumber:""});hasPrefilledAddress=()=>{const e=["billing-country","billing-state","billing-address","billing-city","billing-zip"];return e.some((e=>{const t=this.initialData[e];return t&&t.trim()!==""}))};getPaymentDate=()=>{const e=m.form.checkoutResponse;if(!e)return"";if("date"in e){return e.date}return""};getReferenceNumber=()=>{const e=m.form.checkoutResponse;if(!e)return"";if("traceId"in e){return e.traceId}return""};get isAPMCheckoutVisible(){return!this.isCardSuccess&&!this.errorPaymentAPM&&!!this.checkoutResponse?.result&&(this.currentPaymentMethod===c.CASH||this.currentPaymentMethod===c.BANK_TRANSFER)}handlePaymentStatusChange=e=>{if(e.isCompleted){if(e.status===h.APPROVED){this.isCardSuccess=true;this.errorPaymentAPM=false;this.errorMessage=null;this.success.emit({paymentMethod:this.currentPaymentMethod,data:this.checkoutResponse})}else if(e.status===h.REJECTED){this.errorPaymentAPM=true;this.errorMessage={alertTitle:a.APM_ERROR_GENERIC,message:a.APM_MESSAGE_ERROR}}}};render(){if(!m.isInitialized){return i("div",{class:"loading"},d.translate("renewal.loading"))}const e=e=>i("renewal-summary",{totalAmount:m.data.price.amount,subTotalAmount:m.data.subscription.subTotalAmount,currency:m.data.price.currency,subscriptionTitle:m.data.subscription.name[0]?.text||"Subscription",subscriptionAmount:m.data.subscription.amount,nextChargeDate:m.data.subscription.nextChargeDate,frequency:m.data.subscription.frequency,couponCode:m.data.price.couponCode,discountAmount:m.data.price.discountedAmount,discountPercentage:m.data.price.discountPercentage,...e});return i(i.Fragment,null,i("rebill-processing-payment",{style:{display:this.isCardSubmitting?"block":"none"}}),this.isCardSuccess?i("renewal-success-page",{typePaymentMethod:this.currentPaymentMethod,paymentDate:this.getPaymentDate(),referenceNumber:this.getReferenceNumber(),cardLastFour:m.data.subscription.cardLastFour,country:m.data.price.country,paymentMethodName:w.mapToAPMPaymentMethod(this.currentPaymentMethod,m.data?.price?.country),bank:m.form?.selectedBankId||""}):i("rebill-checkout-form",{style:{display:this.isCardSubmitting||this.isCardSuccess?"none":"block"},validationSchema:this.validationSchema,initialData:this.initialData,onSubmit:e=>this.handleSubmit(e),renderForm:({submit:t,formData:r,errors:o})=>i("div",{class:"rebill-checkout-renewal"},i("div",{class:"left-section"},i("div",{class:"left-section-container"},i("organization-logo",{organization:m.data.organization}),i("div",{class:"checkout-form-section"},i("user-information-static",{userInfo:{customerName:m.data.subscription.customerName,customerEmail:m.data.subscription.customerEmail}}),g(this.breakpoint,f.DESKTOP)&&e({displayedComponents:"header"}),g(this.breakpoint,f.DESKTOP)&&e({displayedComponents:"details"}),i("div",{style:{display:"flex",flexDirection:"column",gap:"32px"}},i("payment-method-selector",{enabledPaymentMethods:[...new Set(m.data.paymentMethods.map((e=>e.type)))],defaultSelected:this.currentPaymentMethod,errorComponent:{showErrorComponent:this.currentPaymentError,alertTitle:l.getErrorTitle(this.currentPaymentMethod,m.data.price.country,this.errorMessage?.alertTitle),message:l.getErrorMessage(this.errorMessage?.message,this.currentPaymentMethod,m.data.price.country)},cardError:{showCardInvalid:this.errorCardInvalid,type:null},country:m.data.price.country,documentTypeError:o?.documentType,documentNumberError:o?.documentNumber,showDocument:!this.isAPMCheckoutVisible&&this.cardMode==="input"&&(k("documentType",this.currentRequiredFields)||k("documentNumber",this.currentRequiredFields))}),this.currentPaymentMethod!==c.CARD&&m.data.subscription?.paymentMethod===c.CARD&&i("rebill-alert",{type:"info",message:d.translate("renewal.paymentMethodAlert",{cardLastFour:m.data?.subscription?.cardLastFour||"****"}),icon:"calendar-edit",variant:"outlined",colorIcon:y.PRIMARY}),!this.isAPMCheckoutVisible&&this.cardMode==="input"&&k("bankId",this.currentRequiredFields)&&i("div",{class:"animated-component fade-in"},i("rebill-bank-selector",{banks:v("bank",this.allRequiredFields[this.currentPaymentMethod]?.original)||[],defaultSelectedBankId:r.bankId||"",error:o?.bankId}))),!this.isAPMCheckoutVisible&&this.cardMode==="input"&&(k("billing-country",this.currentRequiredFields)||k("billing-state",this.currentRequiredFields)||k("billing-address",this.currentRequiredFields)||k("billing-city",this.currentRequiredFields)||k("billing-zip",this.currentRequiredFields))&&i("div",{class:"animated-component slide-in"},i("rebill-address",{countryOptions:this.countries.map((e=>({label:e.country,value:e.isoCountryCode}))),billingView:this.hasPrefilledAddress()?"form":"search",errors:{"billing-country":o["billing-country"],"billing-state":o["billing-state"],"billing-address":o["billing-address"],"billing-city":o["billing-city"],"billing-zip":o["billing-zip"]}})),!this.isAPMCheckoutVisible&&this.cardMode==="input"&&k("phoneNumber",this.currentRequiredFields)&&i("div",{class:"animated-component fade-in"},i("user-information-phone",{error:o?.phoneNumber})),this.isAPMCheckoutVisible&&i("apm-checkout",{paymentMethod:this.currentPaymentMethod,referenceId:this.currentPaymentMethod===c.CASH?this.checkoutResponse.result.data.referenceId:undefined,qrCodeData:this.currentPaymentMethod===c.BANK_TRANSFER?this.checkoutResponse.result.data.qrCode:undefined,code:this.checkoutResponse?.result?.data?.code,providerName:m.data.organization?.name||"",expirationDate:(()=>{const e=new Date;e.setDate(e.getDate()+30);return e.toISOString()})(),country:m.data.price.country,redirectUrl:this.checkoutResponse.result.data.url,checkoutRequestId:this.checkoutResponse?.result?.checkoutRequestId,bearerToken:this.checkoutResponse?.result?.data?.bearerToken,onPaymentStatusChange:e=>this.handlePaymentStatusChange(e.detail)}),g(this.breakpoint,f.DESKTOP)&&e({displayedComponents:"summary"}),i("div",{style:{display:"flex",flexDirection:"column",gap:"16px"}},!this.isAPMCheckoutVisible&&i("payment-button",{paymentMethod:this.currentPaymentMethod,isLoading:this.isSubmitting,isRenewal:true,trialPeriodDays:m.data.subscription.trialPeriodDays,redirectUrl:!!this.checkoutResponse?.result?.data?.url,timeToRedirect:5e3,country:m.data.price.country,isDisabled:m.fetchingInstallments,onSubmit:()=>t()}),i("rebill-alert",{type:"secure",variant:"variant-secure",icon:"lock-outline",message:d.translate("otp.secureMessage")}))),i("rebill-footer",{style:{marginTop:g(this.breakpoint,f.DESKTOP)?"24px":"auto"}}))),!g(this.breakpoint,f.DESKTOP)&&i("div",{class:"right-section"},i("div",{class:"checkout-summary-section"},e({displayedComponents:["header","details","summary"]}))))}))}};M.style=j;export{M as rebill_renewal};
|
|
2
|
+
//# sourceMappingURL=p-d2d7500e.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["registerInstance","createEvent","h","create$6","api","generateIdempotencyKey","CheckoutStatusE","PaymentMessageE","PaymentErrorMapper","PAYMENT_METHOD_ENUM","I18nService","STATUS_REQ_CHECKOUT_APM","renewalState","RenewalStore","onChange","BREAKPOINT_ENUM","getBreakpoint","isBreakpointBelow","COLORS_ENUM","GoogleMapsService","PaymentMethodMapper","isFieldRequired","getFieldValues","getAllRequiredFieldsRenewal","getRequiredFieldsForMethod","rebillRenewalCss","RebillRenewal","constructor","hostRef","this","success","paymentError","paymentMethodSelected","renewalData","renewalToken","currentPaymentMethod","CARD","isSubmitting","isCardSubmitting","isCardSuccess","errorMessage","breakpoint","DESKTOP","errorPaymentCard","errorPaymentAPM","initialData","checkoutResponse","currentApmPaymentMethod","countries","allRequiredFields","currentRequiredFields","errorCardInvalid","cardMode","validationSchema","phoneNumber","when","is","then","schema","required","otherwise","notRequired","bankId","documentType","documentNumber","baseSchema","min","data","price","country","test","value","resizeHandler","window","innerWidth","componentWillLoad","addEventListener","renewalProps","JSON","parse","initializeRenewal","token","loadGoogleMapsScript","response","getCountries","error","console","paymentMethods","length","defaultPaymentMethod","subscription","paymentMethod","subscriptionPaymentMethod","toLowerCase","mappedMethod","BANK_TRANSFER","isAvailable","some","pm","type","setSelectedPaymentMethod","setCardMode","fields","initializeFingerprint","getInitialData","disconnectedCallback","removeEventListener","handlePaymentMethodSelected","event","stopPropagation","detail","emit","deviceId","uuid","crypto","randomUUID","fingerprintResponse","fingerPrint","getFingerPrint","setDeviceId","script","result","scriptElement","document","createElement","innerHTML","body","appendChild","handleBankSelected","setSelectedBankId","handleCardSelected","card","cvv","setSelectedCard","setCvv","currentPaymentError","CASH","handleSubmit","handleCardRenewal","handleAPMRenewal","formData","cardId","cardTokenId","cardInformation","setLoading","renewalRequest","transaction","quantity","customAttributes","customer","firstName","fullName","split","customerName","lastName","slice","join","email","customerEmail","phone","countryCode","countryCodePhoneNumber","number","billingDetails","address","lineOne","city","state","zipCode","identification","idempotencyKey","checkout","createCardCheckoutRequest","id","setCheckoutResponse","status","toUpperCase","APPROVED","message","apmPaymentMethod","mapToAPMPaymentMethod","getFormData","method","redirect","approved","location","origin","rejected","paymentMetadata","orderId","source","bank","createAPMCheckoutRequest","toString","isApproved","isPendingCustomerCharge","PENDING_CUSTOMER_CHARGE","alertTitle","hasPrefilledAddress","billingFields","key","trim","getPaymentDate","payment","form","date","getReferenceNumber","traceId","isAPMCheckoutVisible","handlePaymentStatusChange","statusData","isCompleted","REJECTED","APM_ERROR_GENERIC","APM_MESSAGE_ERROR","render","isInitialized","class","translate","renderRenewalSummary","props","totalAmount","amount","subTotalAmount","currency","subscriptionTitle","name","text","subscriptionAmount","nextChargeDate","frequency","couponCode","discountAmount","discountedAmount","discountPercentage","Fragment","style","display","typePaymentMethod","paymentDate","referenceNumber","cardLastFour","paymentMethodName","selectedBankId","onSubmit","args","renderForm","submit","errors","organization","userInfo","displayedComponents","flexDirection","gap","enabledPaymentMethods","Set","map","defaultSelected","errorComponent","showErrorComponent","getErrorTitle","getErrorMessage","cardError","showCardInvalid","documentTypeError","documentNumberError","showDocument","icon","variant","colorIcon","PRIMARY","banks","original","defaultSelectedBankId","countryOptions","label","isoCountryCode","billingView","referenceId","undefined","qrCodeData","qrCode","code","providerName","expirationDate","Date","setDate","getDate","toISOString","redirectUrl","url","checkoutRequestId","bearerToken","onPaymentStatusChange","isLoading","isRenewal","trialPeriodDays","timeToRedirect","isDisabled","fetchingInstallments","marginTop"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAaC,MAAS,8BAC7CC,MAAgB,8BAChBC,MAAW,8BACXC,OAA6BC,OAAsBC,OAAsBC,MAA0B,8BACnGC,OAA0BC,MAAmB,8BAC7CC,MAA+B,8BAC/BC,OAAmBC,OAAmBC,MAAgB,8BACtDC,OAAsBC,OAAoBC,MAAyB,8BACnEC,MAAmB,8BACnBC,MAAyB,8BACzB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-ZsRS8r.js";class e{schema;constructor(t){this.schema=a().shape(t)}async validateField(t,i){try{await this.schema.validateAt(t,i);return""}catch(t){if(t instanceof h){return t.message}return""}}async validateForm(t){try{await this.schema.validate(t,{abortEarly:false});return{}}catch(t){if(t instanceof h){const i={};t.inner.forEach((t=>{if(t.path){i[t.path]=t.message}}));return i}return{}}}}const r=class{constructor(s){t(this,s);this.submit=i(this,"submit");this.change=i(this,"change")}validationSchema;initialData={};submit;change;renderForm;formData={};errors={};validator;hasSubmitted=false;handleInitialDataChange(t){const i={...this.formData};Object.keys(t).forEach((s=>{if(i[s]===undefined||i[s]===""){i[s]=t[s]}}));this.formData=i;this.change.emit(this.formData)}handleValidationSchemaChange(t){this.validator=new e(t)}componentWillLoad(){this.formData={...this.initialData};this.validator=new e(this.validationSchema);setTimeout((()=>{this.change.emit(this.formData)}),100)}setFieldValue(t,i){if(this.formData[t]!==i){this.formData={...this.formData,[t]:i}}}setFieldError(t,i){if(this.errors[t]!==i){this.errors={...this.errors,[t]:i}}}clearFieldError(t){if(this.hasFieldError(t)){this.setFieldError(t,"")}}hasFieldError(t){return this.errors[t]!==""}async handleInputChange(t){if(!t.detail||!t.detail.id)return;const{id:i,value:s,disabled:a}=t.detail;this.setFieldValue(i,s);if(this.hasSubmitted&&!a){const t=await this.validator.validateField(i,this.formData);this.setFieldError(i,t)}else{if(this.hasFieldError(i)){this.clearFieldError(i)}}this.change.emit(this.formData)}async handleBlur(t){if(!t.detail||!t.detail.id)return;const{id:i,disabled:
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as i,h as s}from"./p-BTZ7D7jU.js";import{a,V as h}from"./p-MMCcKmy_.js";import"./p-E-ZsRS8r.js";class e{schema;constructor(t){this.schema=a().shape(t)}async validateField(t,i){try{await this.schema.validateAt(t,i);return""}catch(t){if(t instanceof h){return t.message}return""}}async validateForm(t){try{await this.schema.validate(t,{abortEarly:false});return{}}catch(t){if(t instanceof h){const i={};t.inner.forEach((t=>{if(t.path){i[t.path]=t.message}}));return i}return{}}}}const r=class{constructor(s){t(this,s);this.submit=i(this,"submit");this.change=i(this,"change")}validationSchema;initialData={};submit;change;renderForm;formData={};errors={};validator;hasSubmitted=false;handleInitialDataChange(t){const i={...this.formData};Object.keys(t).forEach((s=>{if(i[s]===undefined||i[s]===""){i[s]=t[s]}}));this.formData=i;this.change.emit(this.formData)}handleValidationSchemaChange(t){this.validator=new e(t)}componentWillLoad(){this.formData={...this.initialData};this.validator=new e(this.validationSchema);setTimeout((()=>{this.change.emit(this.formData)}),100)}setFieldValue(t,i){if(this.formData[t]!==i){this.formData={...this.formData,[t]:i}}}setFieldError(t,i){if(this.errors[t]!==i){this.errors={...this.errors,[t]:i}}}clearFieldError(t){if(this.hasFieldError(t)){this.setFieldError(t,"")}}hasFieldError(t){return this.errors[t]!==""}async handleInputChange(t){if(!t.detail||!t.detail.id)return;const{id:i,value:s,disabled:a}=t.detail;this.setFieldValue(i,s);if(this.hasSubmitted&&!a){const t=await this.validator.validateField(i,this.formData);this.setFieldError(i,t)}else{if(this.hasFieldError(i)){this.clearFieldError(i)}}this.change.emit(this.formData)}async handleBlur(t){if(!t.detail||!t.detail.id)return;const{id:i,value:s,disabled:a}=t.detail;if(s!==undefined){this.setFieldValue(i,s)}if(!a){const t=await this.validator.validateField(i,this.formData);this.setFieldError(i,t)}}async submitForm(){this.hasSubmitted=true;this.errors={};const t=await this.validator.validateForm(this.formData);this.errors=t;if(Object.values(this.errors).filter((t=>!!t)).length===0){this.submit.emit(this.formData)}}async resetValidation(){this.hasSubmitted=false;this.errors={}}async clearError(t){this.clearFieldError(t)}handleSubmit=async t=>{t.preventDefault();await this.submitForm()};render(){return s("form",{key:"16a2a9b5f7a45b4fb4a00ab9177bc61680272da8",onSubmit:t=>this.handleSubmit(t),noValidate:true},this.renderForm?this.renderForm({submit:()=>this.submitForm(),formData:this.formData,errors:this.errors}):s("slot",null))}static get watchers(){return{initialData:["handleInitialDataChange"],validationSchema:["handleValidationSchemaChange"]}}};export{r as rebill_form};
|
|
2
|
+
//# sourceMappingURL=p-e6df1fe2.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["registerInstance","createEvent","h","create$3","ValidationError","FormValidator","schema","constructor","validationSchema","this","shape","validateField","fieldName","formData","validateAt","error","message","validateForm","validate","abortEarly","errors","inner","forEach","err","path","Form","hostRef","submit","change","initialData","renderForm","validator","hasSubmitted","handleInitialDataChange","newValue","updatedFormData","Object","keys","key","undefined","emit","handleValidationSchemaChange","newSchema","componentWillLoad","setTimeout","setFieldValue","id","value","setFieldError","clearFieldError","hasFieldError","handleInputChange","event","detail","disabled","handleBlur","submitForm","values","filter","length","resetValidation","clearError","fieldId","handleSubmit","async","preventDefault","render","onSubmit","e","noValidate","watchers"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAaC,MAAS,yBAC7CC,OAAeC,MAAuB,wBAC7C,kBAEP,MAAMC,EACFC,OACA,WAAAC,CAAYC,GACRC,KAAKH,OAASH,IAAWO,MAAMF,EACnC,CACA,mBAAMG,CAAcC,EAAWC,GAC3B,UACUJ,KAAKH,OAAOQ,WAAWF,EAAWC,GACxC,MAAO,EACX,CACA,MAAOE,GACH,GAAIA,aAAiBX,EAAiB,CAClC,OAAOW,EAAMC,OACjB,CACA,MAAO,EACX,CACJ,CACA,kBAAMC,CAAaJ,GACf,UACUJ,KAAKH,OAAOY,SAASL,EAAU,CAAEM,WAAY,QACnD,MAAO,CAAC,CACZ,CACA,MAAOJ,GACH,GAAIA,aAAiBX,EAAiB,CAClC,MAAMgB,EAAS,CAAC,EAChBL,EAAMM,MAAMC,SAAQC,IAChB,GAAIA,EAAIC,KAAM,CACVJ,EAAOG,EAAIC,MAAQD,EAAIP,OAC3B,KAEJ,OAAOI,CACX,CACA,MAAO,CAAC,CACZ,CACJ,EAGJ,MAAMK,EAAO,MACT,WAAAlB,CAAYmB,GACR1B,EAAiBS,KAAMiB,GACvBjB,KAAKkB,OAAS1B,EAA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EAAMC,OACtC5C,KAAKoC,cAAcC,EAAIC,GACvB,GAAItC,KAAKuB,eAAiBsB,EAAU,CAChC,MAAMvC,QAAcN,KAAKsB,UAAUpB,cAAcmC,EAAIrC,KAAKI,UAC1DJ,KAAKuC,cAAcF,EAAI/B,EAC3B,KACK,CACD,GAAIN,KAAKyC,cAAcJ,GAAK,CACxBrC,KAAKwC,gBAAgBH,EACzB,CACJ,CACArC,KAAKmB,OAAOY,KAAK/B,KAAKI,SAC1B,CACA,gBAAM0C,CAAWH,GACb,IAAKA,EAAMC,SAAWD,EAAMC,OAAOP,GAC/B,OACJ,MAAMA,GAAEA,
|
|
1
|
+
{"version":3,"names":["registerInstance","createEvent","h","create$3","ValidationError","FormValidator","schema","constructor","validationSchema","this","shape","validateField","fieldName","formData","validateAt","error","message","validateForm","validate","abortEarly","errors","inner","forEach","err","path","Form","hostRef","submit","change","initialData","renderForm","validator","hasSubmitted","handleInitialDataChange","newValue","updatedFormData","Object","keys","key","undefined","emit","handleValidationSchemaChange","newSchema","componentWillLoad","setTimeout","setFieldValue","id","value","setFieldError","clearFieldError","hasFieldError","handleInputChange","event","detail","disabled","handleBlur","submitForm","values","filter","length","resetValidation","clearError","fieldId","handleSubmit","async","preventDefault","render","onSubmit","e","noValidate","watchers"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAaC,MAAS,yBAC7CC,OAAeC,MAAuB,wBAC7C,kBAEP,MAAMC,EACFC,OACA,WAAAC,CAAYC,GACRC,KAAKH,OAASH,IAAWO,MAAMF,EACnC,CACA,mBAAMG,CAAcC,EAAWC,GAC3B,UACUJ,KAAKH,OAAOQ,WAAWF,EAAWC,GACxC,MAAO,EACX,CACA,MAAOE,GACH,GAAIA,aAAiBX,EAAiB,CAClC,OAAOW,EAAMC,OACjB,CACA,MAAO,EACX,CACJ,CACA,kBAAMC,CAAaJ,GACf,UACUJ,KAAKH,OAAOY,SAASL,EAAU,CAAEM,WAAY,QACnD,MAAO,CAAC,CACZ,CACA,MAA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pBvB,KAAKW,OAAS,CAAC,CACnB,CACA,gBAAMyC,CAAWC,GACbrD,KAAKwC,gBAAgBa,EACzB,CACAC,aAAeC,MAAOZ,IAClBA,EAAMa,uBACAxD,KAAK+C,YAAY,EAE3B,MAAAU,GACI,OAAQhE,EAAE,OAAQ,CAAEoC,IAAK,2CAA4C6B,SAAUC,GAAK3D,KAAKsD,aAAaK,GAAIC,WAAY,MAAQ5D,KAAKqB,WAAcrB,KAAKqB,WAAW,CAC7JH,OAAQ,IAAMlB,KAAK+C,aACnB3C,SAAUJ,KAAKI,SACfO,OAAQX,KAAKW,SACVlB,EAAE,OAAQ,MACrB,CACA,mBAAWoE,GAAa,MAAO,CAC3BzC,YAAe,CAAC,2BAChBrB,iBAAoB,CAAC,gCACtB,UAGEiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rebill-change-card.entry.esm.js","sources":["src/components/change-card/rebill-change-card.css?tag=rebill-change-card","src/components/change-card/rebill-change-card.tsx"],"sourcesContent":["@import '../renewal/rebill-renewal.css';\n@import '../checkout/card-success-page/success-page.css';\n\n.success-page__success-icon {\n background: rgba(27, 167, 122, 0.15);\n width: 96px;\n height: 96px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.success-page__info-card {\n margin-top: 24px;\n background: white;\n}\n\n.success-page__payment-method-display {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n","import { Component, Event, EventEmitter, h, Prop, State } from '@stencil/core';\nimport * as yup from 'yup';\nimport { api, Country } from '../../api';\nimport { ChangeCardRequest } from '../../api/entities/subscriptions/types';\nimport '../../components/checkout/apm/apm-checkout/apm-checkout';\nimport '../../components/checkout/payment-button/payment-button';\nimport '../../components/checkout/payment-method-selector/payment-method-selector';\nimport '../../components/checkout/processing-payment/processing-payment';\nimport { I18nService } from '../../i18n/i18n.service';\nimport { PAYMENT_METHOD_ENUM } from '../../models/enums/payment-methods.enum';\nimport { PaymentMessageE } from '../../models/enums/payment-status.enum';\nimport { onChange as renewalOnChange, renewalState, RenewalStore } from '../../store/renewal.store';\nimport { SessionStore } from '../../store/session.store';\nimport { BREAKPOINT_ENUM, getBreakpoint, isBreakpointBelow } from '../../utils/breakpoint';\nimport { formatDateTime } from '../../utils/date-formatter';\nimport { GoogleMapsService } from '../../utils/google-maps.service';\nimport { AlertErrorKeys } from '../../utils/payment-error-mapper';\nimport { isFieldRequired } from '../../utils/required-fields-mappers';\nimport '../renewal/renewal-summary/renewal-summary';\nimport {\n AllRequiredFieldsMap,\n getAllRequiredFieldsRenewal,\n getRequiredFieldsForMethod,\n} from '../renewal/utils/getRequiredFieldsRenewal';\nimport '../shared/mode-sandbox/mode-sandbox';\nimport './change-card-success';\nimport './rebill-change-card.css';\n\n@Component({\n tag: 'rebill-change-card',\n styleUrl: 'rebill-change-card.css',\n shadow: false,\n})\nexport class RebillChangeCard {\n @Prop() changeCardData!: string;\n @Prop() changeCardToken!: string;\n\n @State() isSubmitting: boolean = false;\n @State() isCardSubmitting: boolean = false;\n @State() isCardSuccess: boolean = false;\n @State() errorMessage: AlertErrorKeys | null = null;\n @State() breakpoint: BREAKPOINT_ENUM = BREAKPOINT_ENUM.DESKTOP;\n @State() errorPaymentCard: boolean = false;\n @State() initialData: any = {};\n @State() countries: Country[] = [];\n @State() allRequiredFields: AllRequiredFieldsMap = {};\n @State() currentRequiredFields: string[] = [];\n @State() errorCardInvalid: boolean = false;\n @State() cardMode: 'input' | 'select' | null = 'input';\n @State() completedAt: string | null = null;\n\n @Event() success: EventEmitter<any>;\n @Event() paymentError: EventEmitter<any>;\n\n private currentPaymentMethod: PAYMENT_METHOD_ENUM = PAYMENT_METHOD_ENUM.CARD;\n\n private validationSchema = {\n 'phoneNumber': yup.string().when([], {\n is: () =>\n isFieldRequired('phoneNumber', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.phoneRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-country': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-country', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.countryRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-state': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-state', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.stateRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-address': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-address', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.addressRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-city': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-city', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.cityRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-zip': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-zip', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.zipRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'documentType': yup.string().when([], {\n is: () =>\n isFieldRequired('documentType', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.documentTypeRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'documentNumber': yup.string().when([], {\n is: () =>\n isFieldRequired('documentNumber', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => {\n const baseSchema = schema\n .required('validation.documentNumberRequired')\n .min(7, 'validation.documentInvalid');\n if (renewalState.data?.price?.country === 'BR') {\n return baseSchema.test('numeric-only', 'validation.documentNumberNumericOnly', value => {\n if (!value) return true;\n return /^\\d+$/.test(value);\n });\n }\n\n return baseSchema;\n },\n otherwise: schema => schema.notRequired(),\n }),\n };\n\n private resizeHandler = () => {\n this.breakpoint = getBreakpoint(window.innerWidth);\n };\n\n async componentWillLoad() {\n this.resizeHandler();\n window.addEventListener('resize', this.resizeHandler);\n\n const changeCardProps =\n typeof this.changeCardData === 'string'\n ? JSON.parse(this.changeCardData)\n : this.changeCardData;\n\n RenewalStore.initializeRenewal({\n ...changeCardProps,\n token: this.changeCardToken,\n });\n renewalState.data.subscription.customerId = '';\n RenewalStore.setCardId(null);\n RenewalStore.setCardTokenId(null);\n RenewalStore.setCardInformation(null);\n SessionStore.setCustomerId(null);\n SessionStore.setCardId(null);\n SessionStore.setCardTokenId(null);\n RenewalStore.setCardMode('input');\n this.cardMode = 'input';\n RenewalStore.setSelectedPaymentMethod(PAYMENT_METHOD_ENUM.CARD);\n\n GoogleMapsService.loadGoogleMapsScript();\n\n try {\n const response = await api.data.getCountries();\n this.countries = response.data;\n } catch (error) {\n console.error('Error loading countries:', error);\n }\n\n try {\n this.allRequiredFields = await getAllRequiredFieldsRenewal();\n } catch (error) {\n console.error('Error loading required fields:', error);\n }\n\n try {\n this.currentRequiredFields = getRequiredFieldsForMethod(\n PAYMENT_METHOD_ENUM.CARD,\n this.allRequiredFields,\n ).fields;\n } catch (error) {\n console.error('Error getting required fields for card:', error);\n }\n\n await this.initializeFingerprint();\n this.initialData = this.getInitialData();\n\n renewalOnChange('cardMode', () => {\n if (renewalState.cardMode !== 'input') {\n RenewalStore.setCardMode('input');\n return;\n }\n this.cardMode = 'input';\n });\n }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.resizeHandler);\n }\n\n private async initializeFingerprint() {\n if (!renewalState.deviceId) {\n try {\n const uuid = crypto.randomUUID();\n const fingerprintResponse = await api.fingerPrint.getFingerPrint(uuid);\n RenewalStore.setDeviceId(uuid);\n const script = fingerprintResponse.result.script;\n const scriptElement = document.createElement('script');\n scriptElement.innerHTML = script;\n document.body.appendChild(scriptElement);\n } catch (error) {\n console.error('Failed to initialize fingerprint:', error);\n }\n }\n }\n\n private async handleSubmit(event?: CustomEvent) {\n if (this.isSubmitting) {\n return;\n }\n\n await this.handleChangeCard(event);\n }\n\n private async handleChangeCard(event?: CustomEvent) {\n const formData = event?.detail || this.getInitialData();\n\n if (!renewalState.data.cardTokenId || !renewalState.data.cardInformation) {\n this.errorCardInvalid = true;\n return;\n }\n\n this.errorCardInvalid = false;\n this.isSubmitting = true;\n this.isCardSubmitting = true;\n RenewalStore.setLoading(true);\n\n try {\n const changeCardRequest: ChangeCardRequest = {};\n\n changeCardRequest.cardTokenId = renewalState.data.cardTokenId;\n changeCardRequest.billingDetails = {\n address: {\n lineOne: formData['billing-address'] || '',\n city: formData['billing-city'] || '',\n state: formData['billing-state'] || '',\n country: formData['billing-country'] || '',\n zipCode: formData['billing-zip'] || '',\n },\n identification: {\n type: formData.documentType || '',\n value: formData.documentNumber || '',\n },\n };\n\n const response = await api.subscriptions.changeCard(\n renewalState.data.subscription.id,\n changeCardRequest,\n this.changeCardToken,\n );\n\n // Update card information from response if available\n if (response.data?.card) {\n RenewalStore.setCardInformation({\n brand: response.data.card.brand,\n type: renewalState.data.cardInformation?.type || '',\n isoCountry: renewalState.data.cardInformation?.isoCountry || '',\n bank: renewalState.data.cardInformation?.bank || '',\n lastFour: response.data.card.lastFour,\n installments: renewalState.data.cardInformation?.installments || {\n installments: [],\n },\n });\n }\n\n this.completedAt = new Date().toISOString();\n this.isSubmitting = false;\n this.isCardSubmitting = false;\n RenewalStore.setLoading(false);\n this.isCardSuccess = true;\n this.success.emit(response.data);\n } catch (error: any) {\n this.isSubmitting = false;\n this.isCardSubmitting = false;\n RenewalStore.setLoading(false);\n\n this.errorPaymentCard = true;\n this.errorMessage = {\n message: error.data?.error?.message as PaymentMessageE,\n };\n this.paymentError.emit(error);\n }\n }\n\n private getInitialData = () => {\n return {\n 'email': renewalState.data.subscription.customerEmail,\n 'fullName': renewalState.data.subscription.customerName,\n 'card': '',\n 'billing-country': '',\n 'billing-state': '',\n 'billing-address': '',\n 'billing-city': '',\n 'billing-zip': '',\n 'bankId': '',\n 'phoneNumber': '',\n 'countryCodePhoneNumber': '',\n 'documentType': '',\n 'documentNumber': '',\n };\n };\n\n private hasPrefilledAddress = () => {\n const billingFields = [\n 'billing-country',\n 'billing-state',\n 'billing-address',\n 'billing-city',\n 'billing-zip',\n ];\n return billingFields.some(key => {\n const value = this.initialData[key];\n return value && value.trim() !== '';\n });\n };\n\n private getFormattedCompletionDate = () => {\n if (!this.completedAt) {\n return '';\n }\n return formatDateTime(this.completedAt);\n };\n\n private get isSandboxMode(): boolean {\n const organizationId = renewalState.data?.organization?.id;\n return organizationId ? organizationId.startsWith('test') : false;\n };\n\n render() {\n if (!renewalState.isInitialized) {\n return <div class=\"loading\">{I18nService.translate('renewal.loading')}</div>;\n }\n\n const renderSummary = props => (\n <renewal-summary\n titleKey=\"changeCard.title\"\n totalAmount={renewalState.data.price.amount}\n subTotalAmount={renewalState.data.subscription.subTotalAmount}\n currency={renewalState.data.price.currency}\n subscriptionTitle={renewalState.data.subscription.name[0]?.text || 'Subscription'}\n subscriptionAmount={renewalState.data.subscription.amount}\n nextChargeDate={renewalState.data.subscription.nextChargeDate}\n frequency={renewalState.data.subscription.frequency}\n couponCode={renewalState.data.price.couponCode}\n discountAmount={renewalState.data.price.discountedAmount}\n discountPercentage={renewalState.data.price.discountPercentage}\n {...props}\n />\n );\n\n return (\n <>\n <rebill-processing-payment\n style={{ display: this.isCardSubmitting ? 'block' : 'none' }}\n titleKey=\"changeCard.processingTitle\"\n subtitleKey=\"changeCard.processingSubtitle\"\n />\n {this.isCardSuccess ? (\n <change-card-success\n customerName={renewalState.data.subscription.customerName}\n cardBrand={renewalState.data.cardInformation?.brand}\n cardLastFour={renewalState.data.cardInformation?.lastFour || '****'}\n paymentDate={this.getFormattedCompletionDate()}\n customerEmail={renewalState.data.subscription.customerEmail}\n />\n ) : (\n <rebill-checkout-form\n style={{ display: this.isCardSubmitting || this.isCardSuccess ? 'none' : 'block' }}\n validationSchema={this.validationSchema}\n initialData={this.initialData}\n onSubmit={(args: any) => this.handleSubmit(args)}\n renderForm={({ submit, errors }) => (\n <div class=\"rebill-checkout-renewal\">\n <div class=\"left-section\">\n <div class=\"left-section-container\">\n {/* Modo sandbox para mobile - posicionado arriba del logo */}\n {this.isSandboxMode &&\n isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) && (\n <div\n class=\"mode-sandbox-mobile-container\"\n style={{\n display: this.isCardSubmitting || this.isCardSuccess ? 'none' : 'block',\n }}\n >\n <rebill-mode-sandbox-mobile />\n </div>\n )}\n <organization-logo organization={renewalState.data.organization} />\n\n <div class=\"checkout-form-section\">\n <user-information-static\n userInfo={{\n customerName: renewalState.data.subscription.customerName,\n customerEmail: renewalState.data.subscription.customerEmail,\n }}\n />\n\n {isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&\n renderSummary({\n displayedComponents: 'header',\n })}\n\n {isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&\n renderSummary({\n displayedComponents: 'details',\n })}\n\n <div style={{ display: 'flex', flexDirection: 'column', gap: '32px' }}>\n <payment-method-selector\n enabledPaymentMethods={[PAYMENT_METHOD_ENUM.CARD]}\n defaultSelected={this.currentPaymentMethod}\n errorComponent={{\n showErrorComponent: this.errorPaymentCard,\n alertTitle:\n this.errorMessage?.alertTitle ||\n I18nService.translate('changeCard.errorTitle'),\n message:\n this.errorMessage?.message ||\n I18nService.translate('changeCard.errorDescription'),\n }}\n cardError={{\n showCardInvalid: this.errorCardInvalid,\n type: null,\n }}\n country={renewalState.data.price.country}\n documentTypeError={errors?.documentType}\n documentNumberError={errors?.documentNumber}\n showDocument={\n this.cardMode === 'input' &&\n (isFieldRequired('documentType', this.currentRequiredFields) ||\n isFieldRequired('documentNumber', this.currentRequiredFields))\n }\n />\n </div>\n\n {this.cardMode === 'input' &&\n (isFieldRequired('billing-country', this.currentRequiredFields) ||\n isFieldRequired('billing-state', this.currentRequiredFields) ||\n isFieldRequired('billing-address', this.currentRequiredFields) ||\n isFieldRequired('billing-city', this.currentRequiredFields) ||\n isFieldRequired('billing-zip', this.currentRequiredFields)) && (\n <div class=\"animated-component slide-in\">\n <rebill-address\n countryOptions={this.countries.map(country => ({\n label: country.country,\n value: country.isoCountryCode,\n }))}\n billingView={this.hasPrefilledAddress() ? 'form' : 'search'}\n errors={{\n 'billing-country': errors['billing-country'],\n 'billing-state': errors['billing-state'],\n 'billing-address': errors['billing-address'],\n 'billing-city': errors['billing-city'],\n 'billing-zip': errors['billing-zip'],\n }}\n />\n </div>\n )}\n {this.cardMode === 'input' &&\n isFieldRequired('phoneNumber', this.currentRequiredFields) && (\n <div class=\"animated-component fade-in\">\n <user-information-phone error={errors?.phoneNumber} />\n </div>\n )}\n\n {isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&\n renderSummary({\n displayedComponents: 'summary',\n })}\n\n <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>\n <payment-button\n paymentMethod={PAYMENT_METHOD_ENUM.CARD}\n isLoading={this.isSubmitting}\n isChangeCard={true}\n country={renewalState.data.price.country}\n isDisabled={renewalState.fetchingInstallments}\n onSubmit={() => submit()}\n />\n\n <rebill-alert\n type=\"secure\"\n variant=\"variant-secure\"\n icon=\"lock-outline\"\n message={I18nService.translate('otp.secureMessage')}\n />\n </div>\n </div>\n {this.isSandboxMode &&\n !isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) && (\n <rebill-mode-sandbox />\n )}\n <rebill-footer\n style={{\n marginTop: isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP)\n ? '24px'\n : 'auto',\n }}\n />\n </div>\n </div>\n\n {!isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) && (\n <div class=\"right-section\">\n <div class=\"checkout-summary-section\">\n {renderSummary({\n displayedComponents: ['header', 'details', 'summary'],\n })}\n </div>\n </div>\n )}\n </div>\n )}\n />\n )}\n </>\n );\n }\n}\n"],"names":["yup.string","renewalOnChange"],"mappings":";;;;;;;;;;;;;;AAAA,MAAM,mBAAmB,GAAG,inTAAinT;;MCiChoT,gBAAgB,GAAA,MAAA;;;;;;AACnB,IAAA,cAAc;AACd,IAAA,eAAe;IAEd,YAA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AmB,CAAC,EACnD,CAAA,CACE,CACF,EACL,IAAI,CAAC,aAAa;gBACjB,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,OAAO,CAAC,KAC1D,8BAAuB,CACxB,EACH,CAAA,CAAA,eAAA,EAAA,EACE,KAAK,EAAE;oBACL,SAAS,EAAE,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,OAAO;AACnE,0BAAE;AACF,0BAAE,MAAM;AACX,iBAAA,EAAA,CACD,CACE,CACF,EAEL,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,OAAO,CAAC,KAC3D,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,eAAe,EAAA,EACxB,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,0BAA0B,EAAA,EAClC,aAAa,CAAC;AACb,gBAAA,mBAAmB,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;aACtD,CAAC,CACE,CACF,CACP,CACG,CACP,EACD,CAAA,CACH,CACA;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"rebill-change-card.entry.esm.js","sources":["src/components/change-card/rebill-change-card.css?tag=rebill-change-card","src/components/change-card/rebill-change-card.tsx"],"sourcesContent":["@import '../renewal/rebill-renewal.css';\n@import '../checkout/card-success-page/success-page.css';\n\n.success-page__success-icon {\n background: rgba(27, 167, 122, 0.15);\n width: 96px;\n height: 96px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.success-page__info-card {\n margin-top: 24px;\n background: white;\n}\n\n.success-page__payment-method-display {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n","import { Component, Event, EventEmitter, h, Prop, State } from '@stencil/core';\nimport * as yup from 'yup';\nimport { api, Country } from '../../api';\nimport { ChangeCardRequest } from '../../api/entities/subscriptions/types';\nimport '../../components/checkout/apm/apm-checkout/apm-checkout';\nimport '../../components/checkout/payment-button/payment-button';\nimport '../../components/checkout/payment-method-selector/payment-method-selector';\nimport '../../components/checkout/processing-payment/processing-payment';\nimport { I18nService } from '../../i18n/i18n.service';\nimport { PAYMENT_METHOD_ENUM } from '../../models/enums/payment-methods.enum';\nimport { PaymentMessageE } from '../../models/enums/payment-status.enum';\nimport { onChange as renewalOnChange, renewalState, RenewalStore } from '../../store/renewal.store';\nimport { SessionStore } from '../../store/session.store';\nimport { BREAKPOINT_ENUM, getBreakpoint, isBreakpointBelow } from '../../utils/breakpoint';\nimport { formatDateTime } from '../../utils/date-formatter';\nimport { GoogleMapsService } from '../../utils/google-maps.service';\nimport { AlertErrorKeys } from '../../utils/payment-error-mapper';\nimport { isFieldRequired } from '../../utils/required-fields-mappers';\nimport '../renewal/renewal-summary/renewal-summary';\nimport {\n AllRequiredFieldsMap,\n getAllRequiredFieldsRenewal,\n getRequiredFieldsForMethod,\n} from '../renewal/utils/getRequiredFieldsRenewal';\nimport '../shared/mode-sandbox/mode-sandbox';\nimport './change-card-success';\nimport './rebill-change-card.css';\n\n@Component({\n tag: 'rebill-change-card',\n styleUrl: 'rebill-change-card.css',\n shadow: false,\n})\nexport class RebillChangeCard {\n @Prop() changeCardData!: string;\n @Prop() changeCardToken!: string;\n\n @State() isSubmitting: boolean = false;\n @State() isCardSubmitting: boolean = false;\n @State() isCardSuccess: boolean = false;\n @State() errorMessage: AlertErrorKeys | null = null;\n @State() breakpoint: BREAKPOINT_ENUM = BREAKPOINT_ENUM.DESKTOP;\n @State() errorPaymentCard: boolean = false;\n @State() initialData: any = {};\n @State() countries: Country[] = [];\n @State() allRequiredFields: AllRequiredFieldsMap = {};\n @State() currentRequiredFields: string[] = [];\n @State() errorCardInvalid: boolean = false;\n @State() cardMode: 'input' | 'select' | null = 'input';\n @State() completedAt: string | null = null;\n\n @Event() success: EventEmitter<any>;\n @Event() paymentError: EventEmitter<any>;\n\n private currentPaymentMethod: PAYMENT_METHOD_ENUM = PAYMENT_METHOD_ENUM.CARD;\n\n private validationSchema = {\n 'phoneNumber': yup.string().when([], {\n is: () =>\n isFieldRequired('phoneNumber', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.phoneRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-country': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-country', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.countryRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-state': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-state', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.stateRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-address': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-address', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.addressRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-city': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-city', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.cityRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'billing-zip': yup.string().when([], {\n is: () =>\n isFieldRequired('billing-zip', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.zipRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'documentType': yup.string().when([], {\n is: () =>\n isFieldRequired('documentType', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => schema.required('validation.documentTypeRequired'),\n otherwise: schema => schema.notRequired(),\n }),\n 'documentNumber': yup.string().when([], {\n is: () =>\n isFieldRequired('documentNumber', this.currentRequiredFields) && this.cardMode === 'input',\n then: schema => {\n const baseSchema = schema\n .required('validation.documentNumberRequired')\n .min(7, 'validation.documentInvalid');\n if (renewalState.data?.price?.country === 'BR') {\n return baseSchema.test('numeric-only', 'validation.documentNumberNumericOnly', value => {\n if (!value) return true;\n return /^\\d+$/.test(value);\n });\n }\n\n return baseSchema;\n },\n otherwise: schema => schema.notRequired(),\n }),\n };\n\n private resizeHandler = () => {\n this.breakpoint = getBreakpoint(window.innerWidth);\n };\n\n async componentWillLoad() {\n this.resizeHandler();\n window.addEventListener('resize', this.resizeHandler);\n\n const changeCardProps =\n typeof this.changeCardData === 'string'\n ? JSON.parse(this.changeCardData)\n : this.changeCardData;\n\n RenewalStore.initializeRenewal({\n ...changeCardProps,\n token: this.changeCardToken,\n });\n renewalState.data.subscription.customerId = '';\n RenewalStore.setCardId(null);\n RenewalStore.setCardTokenId(null);\n RenewalStore.setCardInformation(null);\n SessionStore.setCustomerId(null);\n SessionStore.setCardId(null);\n SessionStore.setCardTokenId(null);\n RenewalStore.setCardMode('input');\n this.cardMode = 'input';\n RenewalStore.setSelectedPaymentMethod(PAYMENT_METHOD_ENUM.CARD);\n\n GoogleMapsService.loadGoogleMapsScript();\n\n try {\n const response = await api.data.getCountries();\n this.countries = response.data;\n } catch (error) {\n console.error('Error loading countries:', error);\n }\n\n try {\n this.allRequiredFields = await getAllRequiredFieldsRenewal();\n } catch (error) {\n console.error('Error loading required fields:', error);\n }\n\n try {\n this.currentRequiredFields = getRequiredFieldsForMethod(\n PAYMENT_METHOD_ENUM.CARD,\n this.allRequiredFields,\n ).fields;\n } catch (error) {\n console.error('Error getting required fields for card:', error);\n }\n\n await this.initializeFingerprint();\n this.initialData = this.getInitialData();\n\n renewalOnChange('cardMode', () => {\n if (renewalState.cardMode !== 'input') {\n RenewalStore.setCardMode('input');\n return;\n }\n this.cardMode = 'input';\n });\n }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.resizeHandler);\n }\n\n private async initializeFingerprint() {\n if (!renewalState.deviceId) {\n try {\n const uuid = crypto.randomUUID();\n const fingerprintResponse = await api.fingerPrint.getFingerPrint(uuid);\n RenewalStore.setDeviceId(uuid);\n const script = fingerprintResponse.result.script;\n const scriptElement = document.createElement('script');\n scriptElement.innerHTML = script;\n document.body.appendChild(scriptElement);\n } catch (error) {\n console.error('Failed to initialize fingerprint:', error);\n }\n }\n }\n\n private async handleSubmit(event?: CustomEvent) {\n if (this.isSubmitting) {\n return;\n }\n\n await this.handleChangeCard(event);\n }\n\n private async handleChangeCard(event?: CustomEvent) {\n const formData = event?.detail || this.getInitialData();\n\n if (!renewalState.data.cardTokenId || !renewalState.data.cardInformation) {\n this.errorCardInvalid = true;\n return;\n }\n\n this.errorCardInvalid = false;\n this.isSubmitting = true;\n this.isCardSubmitting = true;\n RenewalStore.setLoading(true);\n\n try {\n const changeCardRequest: ChangeCardRequest = {};\n\n changeCardRequest.cardTokenId = renewalState.data.cardTokenId;\n changeCardRequest.billingDetails = {\n address: {\n lineOne: formData['billing-address'] || '',\n city: formData['billing-city'] || '',\n state: formData['billing-state'] || '',\n country: formData['billing-country'] || '',\n zipCode: formData['billing-zip'] || '',\n },\n identification: {\n type: formData.documentType || '',\n value: formData.documentNumber || '',\n },\n };\n\n const response = await api.subscriptions.changeCard(\n renewalState.data.subscription.id,\n changeCardRequest,\n this.changeCardToken,\n );\n\n // Update card information from response if available\n if (response.data?.card) {\n RenewalStore.setCardInformation({\n brand: response.data.card.brand,\n type: renewalState.data.cardInformation?.type || '',\n isoCountry: renewalState.data.cardInformation?.isoCountry || '',\n bank: renewalState.data.cardInformation?.bank || '',\n lastFour: response.data.card.lastFour,\n installments: renewalState.data.cardInformation?.installments || {\n installments: [],\n },\n });\n }\n\n this.completedAt = new Date().toISOString();\n this.isSubmitting = false;\n this.isCardSubmitting = false;\n RenewalStore.setLoading(false);\n this.isCardSuccess = true;\n this.success.emit(response.data);\n } catch (error: any) {\n this.isSubmitting = false;\n this.isCardSubmitting = false;\n RenewalStore.setLoading(false);\n\n this.errorPaymentCard = true;\n this.errorMessage = {\n message: error.data?.error?.message as PaymentMessageE,\n };\n this.paymentError.emit(error);\n }\n }\n\n private getInitialData = () => {\n return {\n 'email': renewalState.data.subscription.customerEmail,\n 'fullName': renewalState.data.subscription.customerName,\n 'card': '',\n 'billing-country': '',\n 'billing-state': '',\n 'billing-address': '',\n 'billing-city': '',\n 'billing-zip': '',\n 'bankId': '',\n 'phoneNumber': '',\n 'countryCodePhoneNumber': '',\n 'documentType': '',\n 'documentNumber': '',\n };\n };\n\n private hasPrefilledAddress = () => {\n const billingFields = [\n 'billing-country',\n 'billing-state',\n 'billing-address',\n 'billing-city',\n 'billing-zip',\n ];\n return billingFields.some(key => {\n const value = this.initialData[key];\n return value && value.trim() !== '';\n });\n };\n\n private getFormattedCompletionDate = () => {\n if (!this.completedAt) {\n return '';\n }\n return formatDateTime(this.completedAt);\n };\n\n private get isSandboxMode(): boolean {\n const organizationId = renewalState.data?.organization?.id;\n return organizationId ? organizationId.startsWith('test') : false;\n }\n\n render() {\n if (!renewalState.isInitialized) {\n return <div class=\"loading\">{I18nService.translate('renewal.loading')}</div>;\n }\n\n const renderSummary = props => (\n <renewal-summary\n titleKey=\"changeCard.title\"\n totalAmount={renewalState.data.price.amount}\n subTotalAmount={renewalState.data.subscription.subTotalAmount}\n currency={renewalState.data.price.currency}\n subscriptionTitle={renewalState.data.subscription.name[0]?.text || 'Subscription'}\n subscriptionAmount={renewalState.data.subscription.amount}\n nextChargeDate={renewalState.data.subscription.nextChargeDate}\n frequency={renewalState.data.subscription.frequency}\n couponCode={renewalState.data.price.couponCode}\n discountAmount={renewalState.data.price.discountedAmount}\n discountPercentage={renewalState.data.price.discountPercentage}\n {...props}\n />\n );\n\n return (\n <>\n <rebill-processing-payment\n style={{ display: this.isCardSubmitting ? 'block' : 'none' }}\n titleKey=\"changeCard.processingTitle\"\n subtitleKey=\"changeCard.processingSubtitle\"\n />\n {this.isCardSuccess ? (\n <change-card-success\n customerName={renewalState.data.subscription.customerName}\n cardBrand={renewalState.data.cardInformation?.brand}\n cardLastFour={renewalState.data.cardInformation?.lastFour || '****'}\n paymentDate={this.getFormattedCompletionDate()}\n customerEmail={renewalState.data.subscription.customerEmail}\n />\n ) : (\n <rebill-checkout-form\n style={{ display: this.isCardSubmitting || this.isCardSuccess ? 'none' : 'block' }}\n validationSchema={this.validationSchema}\n initialData={this.initialData}\n onSubmit={(args: any) => this.handleSubmit(args)}\n renderForm={({ submit, errors }) => (\n <div class=\"rebill-checkout-renewal\">\n <div class=\"left-section\">\n <div class=\"left-section-container\">\n {/* Modo sandbox para mobile - posicionado arriba del logo */}\n {this.isSandboxMode &&\n isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) && (\n <div\n class=\"mode-sandbox-mobile-container\"\n style={{\n display: this.isCardSubmitting || this.isCardSuccess ? 'none' : 'block',\n }}\n >\n <rebill-mode-sandbox-mobile />\n </div>\n )}\n <organization-logo organization={renewalState.data.organization} />\n\n <div class=\"checkout-form-section\">\n <user-information-static\n userInfo={{\n customerName: renewalState.data.subscription.customerName,\n customerEmail: renewalState.data.subscription.customerEmail,\n }}\n />\n\n {isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&\n renderSummary({\n displayedComponents: 'header',\n })}\n\n {isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&\n renderSummary({\n displayedComponents: 'details',\n })}\n\n <div style={{ display: 'flex', flexDirection: 'column', gap: '32px' }}>\n <payment-method-selector\n enabledPaymentMethods={[PAYMENT_METHOD_ENUM.CARD]}\n defaultSelected={this.currentPaymentMethod}\n errorComponent={{\n showErrorComponent: this.errorPaymentCard,\n alertTitle:\n this.errorMessage?.alertTitle ||\n I18nService.translate('changeCard.errorTitle'),\n message:\n this.errorMessage?.message ||\n I18nService.translate('changeCard.errorDescription'),\n }}\n cardError={{\n showCardInvalid: this.errorCardInvalid,\n type: null,\n }}\n country={renewalState.data.price.country}\n documentTypeError={errors?.documentType}\n documentNumberError={errors?.documentNumber}\n showDocument={\n this.cardMode === 'input' &&\n (isFieldRequired('documentType', this.currentRequiredFields) ||\n isFieldRequired('documentNumber', this.currentRequiredFields))\n }\n />\n </div>\n\n {this.cardMode === 'input' &&\n (isFieldRequired('billing-country', this.currentRequiredFields) ||\n isFieldRequired('billing-state', this.currentRequiredFields) ||\n isFieldRequired('billing-address', this.currentRequiredFields) ||\n isFieldRequired('billing-city', this.currentRequiredFields) ||\n isFieldRequired('billing-zip', this.currentRequiredFields)) && (\n <div class=\"animated-component slide-in\">\n <rebill-address\n countryOptions={this.countries.map(country => ({\n label: country.country,\n value: country.isoCountryCode,\n }))}\n billingView={this.hasPrefilledAddress() ? 'form' : 'search'}\n errors={{\n 'billing-country': errors['billing-country'],\n 'billing-state': errors['billing-state'],\n 'billing-address': errors['billing-address'],\n 'billing-city': errors['billing-city'],\n 'billing-zip': errors['billing-zip'],\n }}\n />\n </div>\n )}\n {this.cardMode === 'input' &&\n isFieldRequired('phoneNumber', this.currentRequiredFields) && (\n <div class=\"animated-component fade-in\">\n <user-information-phone\n error={errors?.phoneNumber || errors?.isValidPhoneNumber}\n />\n </div>\n )}\n\n {isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) &&\n renderSummary({\n displayedComponents: 'summary',\n })}\n\n <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>\n <payment-button\n paymentMethod={PAYMENT_METHOD_ENUM.CARD}\n isLoading={this.isSubmitting}\n isChangeCard={true}\n country={renewalState.data.price.country}\n isDisabled={renewalState.fetchingInstallments}\n onSubmit={() => submit()}\n />\n\n <rebill-alert\n type=\"secure\"\n variant=\"variant-secure\"\n icon=\"lock-outline\"\n message={I18nService.translate('otp.secureMessage')}\n />\n </div>\n </div>\n {this.isSandboxMode &&\n !isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) && (\n <rebill-mode-sandbox />\n )}\n <rebill-footer\n style={{\n marginTop: isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP)\n ? '24px'\n : 'auto',\n }}\n />\n </div>\n </div>\n\n {!isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) && (\n <div class=\"right-section\">\n <div class=\"checkout-summary-section\">\n {renderSummary({\n displayedComponents: ['header', 'details', 'summary'],\n })}\n </div>\n </div>\n )}\n </div>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