rebill-web-components-sdk 1.10.6 → 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.
Files changed (64) hide show
  1. 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
  2. package/dist/cjs/card-fields-wrapper_11.cjs.entry.js +9 -12
  3. package/dist/cjs/index-C-VTnc0I.js.map +1 -1
  4. package/dist/cjs/rebill-change-card.cjs.entry.js +1 -2
  5. package/dist/cjs/rebill-change-card.entry.cjs.js.map +1 -1
  6. package/dist/cjs/rebill-checkout.cjs.entry.js +10 -3
  7. package/dist/cjs/rebill-checkout.entry.cjs.js.map +1 -1
  8. package/dist/cjs/rebill-form.cjs.entry.js +5 -2
  9. package/dist/cjs/rebill-form.entry.cjs.js.map +1 -1
  10. package/dist/collection/components/change-card/rebill-change-card.js +1 -2
  11. package/dist/collection/components/change-card/rebill-change-card.js.map +1 -1
  12. package/dist/collection/components/checkout/rebill-checkout.js +10 -3
  13. package/dist/collection/components/checkout/rebill-checkout.js.map +1 -1
  14. package/dist/collection/components/shared/form/form.js +5 -2
  15. package/dist/collection/components/shared/form/form.js.map +1 -1
  16. package/dist/collection/components/shared/inputs/input-phone/input-phone.js +9 -12
  17. package/dist/collection/components/shared/inputs/input-phone/input-phone.js.map +1 -1
  18. package/dist/components/p-8BpuJ_V5.js.map +1 -1
  19. package/dist/components/{p-0y1EkPsV.js → p-CRMAYXj0.js} +3 -3
  20. package/dist/components/{p-0y1EkPsV.js.map → p-CRMAYXj0.js.map} +1 -1
  21. package/dist/components/{p-BFqhozQ0.js → p-DKPrueOT.js} +3 -3
  22. package/dist/components/{p-BFqhozQ0.js.map → p-DKPrueOT.js.map} +1 -1
  23. package/dist/components/{p-Cs-pA3OO.js → p-DVaxhIJe.js} +7 -4
  24. package/dist/components/p-DVaxhIJe.js.map +1 -0
  25. package/dist/components/{p-RbKsk0NK.js → p-Dsv10JVE.js} +11 -14
  26. package/dist/components/p-Dsv10JVE.js.map +1 -0
  27. package/dist/components/rebill-change-card.js +5 -6
  28. package/dist/components/rebill-change-card.js.map +1 -1
  29. package/dist/components/rebill-checkout-form.js +1 -1
  30. package/dist/components/rebill-checkout.js +14 -7
  31. package/dist/components/rebill-checkout.js.map +1 -1
  32. package/dist/components/rebill-form.js +1 -1
  33. package/dist/components/rebill-input-phone.js +1 -1
  34. package/dist/components/rebill-renewal.js +4 -4
  35. package/dist/components/root-component.js +1 -1
  36. package/dist/components/user-information-phone.js +1 -1
  37. 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
  38. package/dist/esm/card-fields-wrapper_11.entry.js +9 -12
  39. package/dist/esm/index-BTZ7D7jU.js.map +1 -1
  40. package/dist/esm/rebill-change-card.entry.js +1 -2
  41. package/dist/esm/rebill-change-card.entry.js.map +1 -1
  42. package/dist/esm/rebill-checkout.entry.js +10 -3
  43. package/dist/esm/rebill-checkout.entry.js.map +1 -1
  44. package/dist/esm/rebill-form.entry.js +5 -2
  45. package/dist/esm/rebill-form.entry.js.map +1 -1
  46. 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
  47. package/dist/rebill-web-components-sdk/{p-a8726b6d.entry.js → p-85e7cd6f.entry.js} +2 -2
  48. package/dist/rebill-web-components-sdk/{p-a8726b6d.entry.js.map → p-85e7cd6f.entry.js.map} +1 -1
  49. package/dist/rebill-web-components-sdk/{p-d827e221.entry.js → p-90c50e5b.entry.js} +2 -2
  50. package/dist/rebill-web-components-sdk/p-90c50e5b.entry.js.map +1 -0
  51. package/dist/rebill-web-components-sdk/p-BTZ7D7jU.js.map +1 -1
  52. package/dist/rebill-web-components-sdk/{p-14fb1c5c.entry.js → p-ae158592.entry.js} +2 -2
  53. package/dist/rebill-web-components-sdk/p-ae158592.entry.js.map +1 -0
  54. package/dist/rebill-web-components-sdk/{p-1a99d53d.entry.js → p-e6df1fe2.entry.js} +2 -2
  55. package/dist/rebill-web-components-sdk/{p-1a99d53d.entry.js.map → p-e6df1fe2.entry.js.map} +1 -1
  56. package/dist/rebill-web-components-sdk/rebill-change-card.entry.esm.js.map +1 -1
  57. package/dist/rebill-web-components-sdk/rebill-checkout.entry.esm.js.map +1 -1
  58. package/dist/rebill-web-components-sdk/rebill-form.entry.esm.js.map +1 -1
  59. package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
  60. package/package.json +1 -1
  61. package/dist/components/p-Cs-pA3OO.js.map +0 -1
  62. package/dist/components/p-RbKsk0NK.js.map +0 -1
  63. package/dist/rebill-web-components-sdk/p-14fb1c5c.entry.js.map +0 -1
  64. 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-14fb1c5c.entry.js.map
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,O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";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,disabled:s}=t.detail;if(!s){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:"52bbd73020352379d4d196e1fa6ea32dbb5bf8cc",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-1a99d53d.entry.js.map
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,E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,KAAKkB,OAAOa,KAAK/B,KAAKI,SAC1B,CACJ,CACA,qBAAM+C,GACFnD,KAAKuB,aAAe,MACpBvB,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
+ {"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,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AAKW,OAASA,EACd,GAAIgB,OAAOqB,OAAOhD,KAAKW,QAAQsC,QAAOX,KAAWA,IAAOY,SAAW,EAAG,CAClElD,KAAKkB,OAAOa,KAAK/B,KAAKI,SAC1B,CACJ,CACA,qBAAM+C,GACFnD,KAAKuB,aAAe,MACpBvB,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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AAE,EACxB,CAAA,EAEF,CACE,CAAA,cAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,gBAAgB,EACxB,IAAI,EAAC,cAAc,EACnB,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,mBAAmB,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>\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,YAAY,GAAY,KAAK;IAC7B,gBAAgB,GAAY,KAAK;IACjC,aAAa,GAAY,KAAK;IAC9B,YAAY,GAA0B,IAAI;AAC1C,IAAA,UAAU,GAAoB,eAAe,CAAC,OAAO;IACrD,gBAAgB,GAAY,KAAK;IACjC,WAAW,GAAQ,EAAE;IACrB,SAAS,GAAc,EAAE;IACzB,iBAAiB,GAAyB,EAAE;IAC5C,qBAAqB,GAAa,EAAE;IACpC,gBAAgB,GAAY,KAAK;IACjC,QAAQ,GAA8B,OAAO;IAC7C,WAAW,GAAkB,IAAI;AAEjC,IAAA,OAAO;AACP,IAAA,YAAY;AAEb,IAAA,oBAAoB,GAAwB,mBAAmB,CAAC,IAAI;AAEpE,IAAA,gBAAgB,GAAG;QACzB,aAAa,EAAEA,QAAU,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE;AACnC,YAAA,EAAE,EAAE,MACF,eAAe,CAAC,aAAa,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,IAAI,CAAC,QAAQ,KAAK,OAAO;YACzF,IAAI,EAAE,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,0BAA0B,CAAC;YAC3D,SAAS,EAAE,MAAM,IAAI,MAAM,CAAC,WAAW,EAAE;SAC1C,CAAC;QACF,iBAAiB,EAAEA,QAAU,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE;AACvC,YAAA,EAAE,EAAE,MACF,eAAe,CAAC,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