rebill-web-components-sdk 1.8.10 → 1.8.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/apm-checkout_19.cjs.entry.js +1 -1
- package/dist/cjs/{index-B3Laezx8.js → index-DLWPfXe-.js} +3 -3
- package/dist/cjs/{index-B3Laezx8.js.map → index-DLWPfXe-.js.map} +1 -1
- package/dist/cjs/{jspdf.es.min-ByYxEd9e.js → jspdf.es.min-BoQioi3m.js} +4 -4
- package/dist/cjs/{jspdf.es.min-ByYxEd9e.js.map → jspdf.es.min-BoQioi3m.js.map} +1 -1
- package/dist/cjs/otp-component_7.cjs.entry.js +1 -1
- package/dist/cjs/{pdf-generator-CuE412-Z.js → pdf-generator-zX0ZE6Aa.js} +7 -7
- package/dist/{esm/pdf-generator-snBLBL7p.js.map → cjs/pdf-generator-zX0ZE6Aa.js.map} +1 -1
- package/dist/cjs/renewal-success-page_2.cjs.entry.js +1 -1
- package/dist/collection/utils/download-template.js +3 -3
- package/dist/collection/utils/download-template.js.map +1 -1
- package/dist/components/apm-checkout.js +1 -1
- package/dist/components/apm-download.js +1 -1
- package/dist/components/{p-DfK-jtq1.js → p-B1Jt4Nzk.js} +3 -3
- package/dist/components/{p-DfK-jtq1.js.map → p-B1Jt4Nzk.js.map} +1 -1
- package/dist/components/{p-B05hShHO.js → p-BFKOns7K.js} +4 -4
- package/dist/components/{p-B05hShHO.js.map → p-BFKOns7K.js.map} +1 -1
- package/dist/components/{p-DmzNVDlw.js → p-BIat5a1z.js} +3 -3
- package/dist/components/{p-DmzNVDlw.js.map → p-BIat5a1z.js.map} +1 -1
- package/dist/components/{p-BYXzf-S2.js → p-BP8l8kwZ.js} +7 -7
- package/dist/components/{p-BYXzf-S2.js.map → p-BP8l8kwZ.js.map} +1 -1
- package/dist/components/{p-TnX37Ths.js → p-Buh4lAbF.js} +3 -3
- package/dist/components/{p-TnX37Ths.js.map → p-Buh4lAbF.js.map} +1 -1
- package/dist/components/{p-do9ScsKB.js → p-CSqJ7ePk.js} +3 -3
- package/dist/components/{p-do9ScsKB.js.map → p-CSqJ7ePk.js.map} +1 -1
- package/dist/components/{p-D96If9jd.js → p-KfcaXfJX.js} +3 -3
- package/dist/components/{p-D96If9jd.js.map → p-KfcaXfJX.js.map} +1 -1
- package/dist/components/rebill-checkout.js +3 -3
- package/dist/components/rebill-renewal.js +3 -3
- package/dist/components/renewal-success-page.js +1 -1
- package/dist/components/success-page.js +1 -1
- package/dist/esm/apm-checkout_19.entry.js +1 -1
- package/dist/esm/{index-Dbv9TW_F.js → index-CymF2J-m.js} +3 -3
- package/dist/esm/{index-Dbv9TW_F.js.map → index-CymF2J-m.js.map} +1 -1
- package/dist/esm/{jspdf.es.min-Cshxy1Va.js → jspdf.es.min-CDCJH4OD.js} +4 -4
- package/dist/esm/{jspdf.es.min-Cshxy1Va.js.map → jspdf.es.min-CDCJH4OD.js.map} +1 -1
- package/dist/esm/otp-component_7.entry.js +1 -1
- package/dist/esm/{pdf-generator-snBLBL7p.js → pdf-generator-B4NHkX8z.js} +7 -7
- package/dist/{cjs/pdf-generator-CuE412-Z.js.map → esm/pdf-generator-B4NHkX8z.js.map} +1 -1
- package/dist/esm/renewal-success-page_2.entry.js +1 -1
- package/dist/rebill-web-components-sdk/{p-50dad6ef.entry.js → p-3af0544a.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-CbbYM1HT.js → p-CBIvw8lr.js} +5 -5
- package/dist/rebill-web-components-sdk/{p-CbbYM1HT.js.map → p-CBIvw8lr.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-HVtQDxzl.js → p-DLk0jy5R.js} +9 -9
- package/dist/rebill-web-components-sdk/{p-HVtQDxzl.js.map → p-DLk0jy5R.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-7195af41.entry.js → p-c41119c0.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-BsxJk8cY.js → p-cHVoxSaG.js} +4 -4
- package/dist/rebill-web-components-sdk/{p-BsxJk8cY.js.map → p-cHVoxSaG.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-b77a2a72.entry.js → p-d99d4450.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
- package/package.json +1 -1
- /package/dist/rebill-web-components-sdk/{p-50dad6ef.entry.js.map → p-3af0544a.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-7195af41.entry.js.map → p-c41119c0.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-b77a2a72.entry.js.map → p-d99d4450.entry.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import { P as PAYMENT_METHOD_ENUM, I as I18nService, f as formatAmount, e as ins
|
|
|
3
3
|
import { r as renewalState } from './renewal.store-B-RX1YyN.js';
|
|
4
4
|
import { B as BREAKPOINT_ENUM, g as getBreakpoint, i as isBreakpointBelow } from './breakpoint-Do_vNuMa.js';
|
|
5
5
|
import { C as COLORS_ENUM } from './color-class-mapper-DA598vBj.js';
|
|
6
|
-
import { g as getCountryPaymentMethods, P as PDFGenerator } from './pdf-generator-
|
|
6
|
+
import { g as getCountryPaymentMethods, P as PDFGenerator } from './pdf-generator-B4NHkX8z.js';
|
|
7
7
|
import { f as formatDateTime, a as formatDate } from './date-formatter-Cr2zi4ji.js';
|
|
8
8
|
import './_commonjsHelpers-E-ZsRS8r.js';
|
|
9
9
|
import './assets-B96SyP8A.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as a,d as r,h as t}from"./p-D8cwEAmw.js";import{P as i,I as s,f as o,e as c,s as l}from"./p-CP6XOgmg.js";import{r as n}from"./p-DSucGJz2.js";import{B as d,g as b,i as p}from"./p-Do_vNuMa.js";import{C as f}from"./p-DA598vBj.js";import{g as h,P as g}from"./p-BsxJk8cY.js";import{f as y,a as m}from"./p-D0e855_t.js";import"./p-E-ZsRS8r.js";import"./p-B96SyP8A.js";const u=":root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-hover:#001c4a;--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-info-border:#0156f6;--rebill-color-info-text:#172b85;--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}.renewal-success-page__success-content{display:flex;flex-direction:column;align-items:center;gap:1rem;width:100%;overflow-x:hidden;box-sizing:border-box}.renewal-success-page__success-content rebill-typography[variant='h3']{margin:0 !important;padding:0 !important}.renewal-success-page__success-icon{display:flex;justify-content:center;margin:0.5rem 0}.renewal-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}.renewal-success-page__card-row{display:flex;justify-content:space-between;align-items:start;min-height:20px;gap:15%}.renewal-success-page__card-row:last-of-type{margin-bottom:0}.renewal-success-page__card-value{display:flex;align-items:center;gap:0.5rem}.renewal-success-page__payment-method-display{display:flex;align-items:center;gap:8px;justify-content:center}.renewal-success-page__payment-method-display rebill-card-icon{display:inline-block;flex-shrink:0;margin-right:8px;vertical-align:middle}.renewal-success-page__payment-method-display rebill-card-icon svg{display:block}.renewal-success-page__payment-method-display rebill-icon{display:inline-block;vertical-align:middle;margin-right:8px}.renewal-success-page__payment-method-display rebill-icon div{display:block}.renewal-success-page__card-divider{height:1px;background:#e5e7eb}.renewal-success-page__download-container{display:flex;align-items:center;justify-content:flex-start;gap:2px;text-decoration:none;cursor:pointer}.renewal-success-page__contact-info{text-align:left}.renewal-success-page__reference-number{word-break:break-all;overflow-wrap:break-word;hyphens:auto;max-width:100%;text-align:right}.renewal-success-page__total-amount-container{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-direction:row}@media (max-width: 1024px){.renewal-success-page__success-content{max-width:100%;gap:1.5rem;margin-left:16px;margin-right:16px}.renewal-success-page__info-card{width:100%;max-width:100%;padding:12px}}@media (max-width: 767px){.renewal-success-page__info-card{padding:12px}}";const w=class{constructor(r){e(this,r);this.successRedirect=a(this,"successRedirect")}typePaymentMethod=i.CARD;country="";bank="";paymentMethodName="";cardLastFour="";paymentDate="";referenceNumber="";trialPeriodDays=0;debitDay=0;planAmount=0;currentLocale="es";breakpoint=d.DESKTOP;successRedirect;loaderProgress=0;isLoadingLottie=true;showRedirectMessage=false;timeToRedirect=3e3;progressInterval;lottieContainer;lottieAnimation;successDisplayTimeout;applyStartCaseToBrand=e=>{if(!e)return"";return e.toLowerCase().split(/[\s-]+/).map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")};getPaymentMethodConfig(e){const a=this.country?h(this.country):null;const r=a?.find((a=>a.type===e));const t={[i.CARD]:{key:i.CARD,label:s.translate("paymentMethods.card"),icons:["card"]},[i.CASH]:{key:i.CASH,label:s.translate("paymentMethods.cash"),icons:["pago-facil"]},[i.BANK_TRANSFER]:{key:i.BANK_TRANSFER,label:s.translate("paymentMethods.bank_transfer"),icons:["plus"]}};const o=t[e];return{...o,icons:r?.icons||o.icons}}getPaymentDate=()=>this.paymentDate||"";componentWillLoad(){this.breakpoint=b(window.innerWidth);if(this.showRedirectMessage){this.successDisplayTimeout=window.setTimeout((()=>{this.showRedirectMessage=true;this.loadLottieAnimation()}),1500);setTimeout((()=>{this.stopLoaderAnimation()}),this.timeToRedirect)}}componentDidLoad(){window.addEventListener("resize",this.handleResize);if(!this.showRedirectMessage){this.loadLottieAnimation()}}disconnectedCallback(){if(this.successDisplayTimeout){clearTimeout(this.successDisplayTimeout)}window.removeEventListener("resize",this.handleResize);this.stopLoaderAnimation()}handleResize=()=>{this.breakpoint=b(window.innerWidth)};loadLottieAnimation=async()=>{try{const e=await import("./p-GK75wIKe.js").then((function(e){return e.l}));const a=await fetch(r(`./assets/loader-redirect1.json`));const t=await a.json();if(this.lottieContainer){this.lottieAnimation=e.default.loadAnimation({container:this.lottieContainer,renderer:"svg",loop:true,autoplay:true,animationData:t})}else{this.startLoaderAnimation()}}catch(e){this.startLoaderAnimation()}};startLoaderAnimation=()=>{const e=3e3;const a=50;const r=a/e*100;this.progressInterval=window.setInterval((()=>{this.loaderProgress=Math.min(this.loaderProgress+r,100);if(this.loaderProgress>=100){this.stopLoaderAnimation()}}),a)};stopLoaderAnimation=()=>{if(this.progressInterval){clearInterval(this.progressInterval);this.progressInterval=undefined}if(this.lottieAnimation){this.lottieAnimation.destroy();this.lottieAnimation=undefined}};handleDownloadReceipt=async()=>{try{await g.generateAndDownloadReceipt({paymentMethod:this.typePaymentMethod===i.CARD?this.textPaymentMethodCard():this.paymentMethodName,...this.typePaymentMethod===i.BANK_TRANSFER&&{bank:this.bank},...this.typePaymentMethod===i.CARD&&{cardBrand:this.applyStartCaseToBrand(n.data.cardInformation?.brand||"")},...this.typePaymentMethod===i.CARD&&{cardLastFour:this.cardLastFour??n.data.cardInformation?.lastFour},paymentDate:y(this.getPaymentDate())||y((new Date).toISOString()),email:n.data.subscription.customerEmail||"",referenceNumber:this.referenceNumber,productTitle:n.data.subscription.name[0]?.text||"Subscription",subtotal:this.getFormattedSubtotal(),total:this.getFormattedTotal(),currency:n.data.price.currency||" ",discountAmount:this.getFormattedDiscountAmount(),trialPeriodDays:this.trialPeriodDays,debitDay:this.debitDay,planAmount:this.getFormattedSubtotal(this.planAmount),isBankTransfer:this.typePaymentMethod===i.BANK_TRANSFER})}catch(e){console.error("Error downloading receipt:",e)}};getFormattedDiscountAmount=()=>undefined;getFormattedSubtotal=(e=null)=>o(e||n.data.price.amount,n.data.price.currency);getFormattedTotal=()=>{if(this.trialPeriodDays>0){return o(0,n.data.price.currency)}return o(n.data.price.amount,n.data.price.currency)};textPaymentMethodCard=()=>{const e=n.data?.cardInformation?.brand;const a=this.cardLastFour||n.data?.cardInformation?.lastFour;const r=this.applyStartCaseToBrand(e||"");return e&&a?`${r} - ${a}`:r};render(){return t("rebill-checkout-single-column",{key:"4496c796a233649f3aed1c003630710313b09fda"},t("div",{key:"b632042d52817d351a975a4122838221d17a43cd",class:"renewal-success-page__success-content"},t("rebill-typography",{key:"8e533a76f9599028dfcefb87f07b8ae1e1093743",variant:"h3",color:f.PRIMARY_DARK_TEXT},s.translate("processing.successTitle")),t("div",{key:"04e69b288dda8067c4ea5c18861fd2d1e97fe22b",class:"renewal-success-page__success-icon"},t("svg",{key:"6feaa06227d3a33194b6b67d7e827296552f817f",width:p(this.breakpoint,d.DESKTOP)?"64":"96",height:p(this.breakpoint,d.DESKTOP)?"64":"96",viewBox:"0 0 96 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"f10028efad0800f907160b9475b8ed416082e12f","fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.99219 47.998C7.99219 25.9067 25.9008 7.99805 47.9922 7.99805C70.0836 7.99805 87.9922 25.9067 87.9922 47.998C87.9922 70.0894 70.0836 87.998 47.9922 87.998C25.9008 87.998 7.99219 70.0894 7.99219 47.998ZM61.5401 39.2645C62.2396 38.4096 62.1136 37.1496 61.2587 36.4501C60.4038 35.7507 59.1437 35.8767 58.4443 36.7316L41.8437 57.0211L35.4064 50.5838C34.6254 49.8028 33.359 49.8028 32.578 50.5838C31.7969 51.3649 31.7969 52.6312 32.578 53.4123L40.578 61.4123C40.9775 61.8118 41.5275 62.0237 42.0918 61.9956C42.6562 61.9674 43.1823 61.7019 43.5401 61.2645L61.5401 39.2645Z",fill:"#35B093"}))),t("div",{key:"f0e058f90a24f5a3d2cdb35d124bf709e34990e9",class:"renewal-success-page__info-card"},t("div",{key:"2086be74abb7b9688d5ff11c9b5160f34d66c2a2",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"b21241d0518f44764a04dfe7210c0ab4430d9ac9",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentMethod")),t("div",{key:"bca3d109e8e26f1e81de6cdd9b3e48fc53055e0a",class:"renewal-success-page__card-value"},t("div",{key:"a8595b953581c5eb73cd440b2e654ea1b7a055a1",class:"renewal-success-page__payment-method-display"},this.typePaymentMethod===i.CARD&&t(t.Fragment,null,t("rebill-card-icon",{key:"6e057bfc4951ccad8e9bd8e31786cf4cc1663ce9","card-brand":n.data?.cardInformation?.brand||""}),t("rebill-typography",{key:"63971fdb0c75050764f99b3cca698b9aed0d51db",variant:"body2",color:f.PRIMARY_DARK_TEXT},this.textPaymentMethodCard())),this.typePaymentMethod===i.BANK_TRANSFER&&t("div",{key:"b3de67829a6d13255287682c117543a1c1cc1f5f",style:{display:"flex",alignItems:"center",gap:"8px"}},t("div",{key:"39eafa3c5e9d2d2d9de3570f301c51b85b52d05e",style:{display:"flex",alignItems:"center",gap:"8px"}},this.getPaymentMethodConfig(i.BANK_TRANSFER).icons.map((e=>t("rebill-icon",{name:e,size:"24px"})))),t("rebill-typography",{key:"4d21176e8032b7b92c0abce56be4ac832a8fe1b9",variant:"body2",color:f.PRIMARY_DARK_TEXT},s.translate("paymentMethods.bank_transfer")))))),t("div",{key:"8e02e9e1c8f9c6befb56d0a35639438ded4943c2",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"a54d9c0b8f864ebdfe83e8ea5d933590c75a91aa",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentDate")),t("rebill-typography",{key:"6b6ca198cd8a8690785b17637f807bac92e2fe41",variant:"body2",color:f.PRIMARY_DARK_TEXT},y(this.paymentDate||this.getPaymentDate())||"")),t("div",{key:"462eb137825ffd9ce792129ba1091c2873bbaac6",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"342dfcde9ad869b3cfc7d298cd320a30a8be35c9",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentEmail")),t("rebill-typography",{key:"5f1f729d5f4824436b4340164beb98f0fb8f0848",variant:"body2",color:f.PRIMARY_DARK_TEXT},n.data.subscription.customerEmail)),t("div",{key:"eb53c500781f0d2b8a5e7b8ee5d7b29112cc44d5",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"24da425c9e38ea07cf9a306a0424c5960ee7dba7",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentReference")),t("rebill-typography",{key:"75cc1049bd3b345c723f7f64c6df23f2b41246ba",variant:"body2",color:f.PRIMARY_DARK_TEXT,class:"renewal-success-page__reference-number"},this.referenceNumber||""))),t("div",{key:"d5d68da7b66d79447263c9238b96d1b8cd291ec3",class:"renewal-success-page__info-card"},t("rebill-typography",{key:"68ddcfc907883d471b44f6c37ef4ef15d02dda55",variant:"subtitle-bold",color:f.PRIMARY_DARK_TEXT},s.translate("processing.purchaseDetails")),t("div",{key:"3abf06bdf76c053a6bc6c8110ef4d0ad667229c2",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"09d66339dc619a3fe10063f617a3891cfcd2d40d",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseDetail")),t("rebill-typography",{key:"cacc03f95b2dcfea276444d1c810e37ab9401e05",variant:"body2",color:f.PRIMARY_DARK_TEXT},n.data.subscription.name[0]?.text||"Subscription")),t("div",{key:"13a048d1ed8a4994fc3aa84e7f1f69edc8b28347",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"eaabad0bf612765f4ec37bccab7b539297e54b78",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseSubtotal")),t("rebill-typography",{key:"0d6c4809abebfbba605ca2e189e108abdce44e2a",variant:"body2",color:f.PRIMARY_DARK_TEXT},this.getFormattedSubtotal())),t("div",{key:"4280743028def8cd05816db01eb4fc070696aac5",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"7c9d7b42f1d35303fd977cce5a1f6dcb5a0bb2f6",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseMontoTotal")),t("div",{key:"442c35562a300cdffd9fadc37c7ffd1ddaf9f5ce",class:"renewal-success-page__total-amount-container"},t("rebill-typography",{key:"2b852d80132e4c5dd18ec7906caa2fdddd432def",variant:"body2",color:f.PRIMARY_DARK_TEXT},this.getFormattedTotal()))),t("div",{key:"23de8c78e6b6e1c3906b93f962ccbe331ebe3260",class:"renewal-success-page__card-divider"}),t("div",{key:"ab6221386001e8f63f06877bfb7fcf671996035a",class:"renewal-success-page__download-container"},t("svg",{key:"15a7b460baa13df7d7aeccefa623c94ecde9228f",class:"download-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"07be4439313a931dd41086a03cb30bbd843b108a",d:"M13.498 9.83333V12.1667C13.498 12.903 12.9011 13.5 12.1647 13.5H3.83138C3.095 13.5 2.49805 12.903 2.49805 12.1667V9.83333M7.99804 10V2.5M7.99804 10L5.66471 7.66667M7.99804 10L10.3314 7.66667",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})),t("rebill-button",{key:"5d85f4123ffa4fcea3bd3fa38074f65a6d671bbd",type:"button",variant:"download",size:"small",onClick:this.handleDownloadReceipt},t("rebill-typography",{key:"5dd14c730d1c693333b5224d04b964ed9c1321a9",variant:"overline",color:f.PRIMARY_DARK_TEXT},s.translate("processing.download")))),t("div",{key:"ad7e781a90ffb785a73ebae5c44c8a77ea8230ab",class:"renewal-success-page__contact-info"},t("rebill-typography",{key:"2d41f742c4efbdf200523308683bd8e77a770a39",variant:"information-text",color:f.SECONDARY},s.translate("processing.downloadDescription"))))))}};w.style=u;const x=".wrapper{margin:0 auto;display:flex;flex-direction:column;align-items:center}.header{display:flex;flex-direction:column;align-items:center;gap:8px}.title{font-size:1rem;font-weight:500;color:var(--rebill-color-primary-dark-text);text-align:center}.amount{font-size:2.25rem;font-weight:500;color:var(--rebill-color-primary-dark-text);margin:0 0 1.5rem 0;text-align:center;line-height:1.1}.per{font-size:1.1rem;font-weight:400;color:var(--rebill-color-text-secondary)}.label-muted{font-size:1rem;color:var(--rebill-color-primary-dark);margin:0 0 1.5rem 0;text-align:center}.info{width:100%;margin-top:1.5rem;margin-bottom:3rem;display:flex;flex-direction:column;gap:1.4rem}.row{display:flex;justify-content:space-between;align-items:center;font-size:1rem;line-height:1.4;width:100%}.left{color:var(--rebill-color-text-secondary);font-weight:400}.right{color:var(--rebill-color-primary-dark-text);font-weight:400;text-align:right}.divider{border:none;border-top:1px solid var(--rebill-color-border);margin:1rem 0}@media (max-width: 1024px){.amount{margin-bottom:0}.row{font-size:0.9rem}.row:not(:last-child){margin-bottom:0.5rem}.left{color:var(--rebill-color-primary-dark-text)}}.total-row{width:100%;display:flex;justify-content:space-between;align-items:center;font-size:1.1rem;font-weight:600}.total-row .left{color:var(--rebill-color-primary-dark-text)}";const k=class{constructor(a){e(this,a)}forceUpdate=0;displayedComponents=["header","details","summary"];componentWillLoad(){c.on("languageChanged",this.handleLanguageChange)}disconnectedCallback(){c.off("languageChanged",this.handleLanguageChange)}handleLanguageChange=()=>{this.forceUpdate=this.forceUpdate+1};totalAmount;subscriptionTitle;subscriptionAmount;nextChargeDate;frequency;currency;getFrequencyText(){if(!this.frequency||!this.frequency.period)return"";const e=this.frequency.period.toLowerCase();const a=this.frequency.count;const r=`summary.${e}`;return s.translate(r,{count:a})}renderHeader=()=>t("div",{class:"header"},t("p",{class:"title"},s.translate("renewal.title")),t("p",{class:"amount"},o(this.totalAmount,this.currency)," ",t("span",{class:"per"},"/ ",this.getFrequencyText().toLowerCase())));renderInfoRow=(e,a)=>t("div",{class:"row"},t("div",{class:"left"},e),t("div",{class:"right"},a));renderProduct=()=>this.renderInfoRow(this.subscriptionTitle,o(this.subscriptionAmount,this.currency));renderNextRenewal=()=>this.renderInfoRow(s.translate("renewal.nextRenewal"),m(this.nextChargeDate,undefined,l.currentLocale));renderSubtotal=()=>this.renderInfoRow(s.translate("renewal.subtotal"),o(this.totalAmount,this.currency));renderTotal=()=>t("div",{class:"total-row"},t("div",{class:"left"},s.translate("renewal.totalToRenew")),t("div",{class:"right"},o(this.totalAmount,this.currency)));renderDesktop=()=>t("div",{class:"wrapper"},this.renderHeader(),t("div",{class:"info"},t("div",{class:"row"},t("div",{class:""},s.translate("renewal.subscriptionDetails"))),this.renderProduct(),this.renderNextRenewal(),this.renderSubtotal()),this.renderTotal());render(){if(this.displayedComponents.includes("header")&&this.displayedComponents.includes("details")&&this.displayedComponents.includes("summary")){return this.renderDesktop()}if(this.displayedComponents.includes("header")){return this.renderHeader()}if(this.displayedComponents.includes("details")){return t("collapsible-card",{header:s.translate("summary.details")},this.renderProduct(),this.renderNextRenewal())}if(this.displayedComponents.includes("summary")){return t("collapsible-card",{header:s.translate("summary.summary")},this.renderInfoRow(this.subscriptionTitle,"1 x "+o(this.subscriptionAmount,this.currency)),this.renderSubtotal(),t("rebill-divider",null),this.renderInfoRow(s.translate("renewal.totalToRenew"),o(this.totalAmount,this.currency)))}}};k.style=x;export{w as renewal_success_page,k as renewal_summary};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as a,d as r,h as t}from"./p-D8cwEAmw.js";import{P as i,I as s,f as o,e as c,s as l}from"./p-CP6XOgmg.js";import{r as n}from"./p-DSucGJz2.js";import{B as d,g as b,i as p}from"./p-Do_vNuMa.js";import{C as f}from"./p-DA598vBj.js";import{g as h,P as g}from"./p-cHVoxSaG.js";import{f as y,a as m}from"./p-D0e855_t.js";import"./p-E-ZsRS8r.js";import"./p-B96SyP8A.js";const u=":root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-hover:#001c4a;--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-info-border:#0156f6;--rebill-color-info-text:#172b85;--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}.renewal-success-page__success-content{display:flex;flex-direction:column;align-items:center;gap:1rem;width:100%;overflow-x:hidden;box-sizing:border-box}.renewal-success-page__success-content rebill-typography[variant='h3']{margin:0 !important;padding:0 !important}.renewal-success-page__success-icon{display:flex;justify-content:center;margin:0.5rem 0}.renewal-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}.renewal-success-page__card-row{display:flex;justify-content:space-between;align-items:start;min-height:20px;gap:15%}.renewal-success-page__card-row:last-of-type{margin-bottom:0}.renewal-success-page__card-value{display:flex;align-items:center;gap:0.5rem}.renewal-success-page__payment-method-display{display:flex;align-items:center;gap:8px;justify-content:center}.renewal-success-page__payment-method-display rebill-card-icon{display:inline-block;flex-shrink:0;margin-right:8px;vertical-align:middle}.renewal-success-page__payment-method-display rebill-card-icon svg{display:block}.renewal-success-page__payment-method-display rebill-icon{display:inline-block;vertical-align:middle;margin-right:8px}.renewal-success-page__payment-method-display rebill-icon div{display:block}.renewal-success-page__card-divider{height:1px;background:#e5e7eb}.renewal-success-page__download-container{display:flex;align-items:center;justify-content:flex-start;gap:2px;text-decoration:none;cursor:pointer}.renewal-success-page__contact-info{text-align:left}.renewal-success-page__reference-number{word-break:break-all;overflow-wrap:break-word;hyphens:auto;max-width:100%;text-align:right}.renewal-success-page__total-amount-container{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-direction:row}@media (max-width: 1024px){.renewal-success-page__success-content{max-width:100%;gap:1.5rem;margin-left:16px;margin-right:16px}.renewal-success-page__info-card{width:100%;max-width:100%;padding:12px}}@media (max-width: 767px){.renewal-success-page__info-card{padding:12px}}";const w=class{constructor(r){e(this,r);this.successRedirect=a(this,"successRedirect")}typePaymentMethod=i.CARD;country="";bank="";paymentMethodName="";cardLastFour="";paymentDate="";referenceNumber="";trialPeriodDays=0;debitDay=0;planAmount=0;currentLocale="es";breakpoint=d.DESKTOP;successRedirect;loaderProgress=0;isLoadingLottie=true;showRedirectMessage=false;timeToRedirect=3e3;progressInterval;lottieContainer;lottieAnimation;successDisplayTimeout;applyStartCaseToBrand=e=>{if(!e)return"";return e.toLowerCase().split(/[\s-]+/).map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")};getPaymentMethodConfig(e){const a=this.country?h(this.country):null;const r=a?.find((a=>a.type===e));const t={[i.CARD]:{key:i.CARD,label:s.translate("paymentMethods.card"),icons:["card"]},[i.CASH]:{key:i.CASH,label:s.translate("paymentMethods.cash"),icons:["pago-facil"]},[i.BANK_TRANSFER]:{key:i.BANK_TRANSFER,label:s.translate("paymentMethods.bank_transfer"),icons:["plus"]}};const o=t[e];return{...o,icons:r?.icons||o.icons}}getPaymentDate=()=>this.paymentDate||"";componentWillLoad(){this.breakpoint=b(window.innerWidth);if(this.showRedirectMessage){this.successDisplayTimeout=window.setTimeout((()=>{this.showRedirectMessage=true;this.loadLottieAnimation()}),1500);setTimeout((()=>{this.stopLoaderAnimation()}),this.timeToRedirect)}}componentDidLoad(){window.addEventListener("resize",this.handleResize);if(!this.showRedirectMessage){this.loadLottieAnimation()}}disconnectedCallback(){if(this.successDisplayTimeout){clearTimeout(this.successDisplayTimeout)}window.removeEventListener("resize",this.handleResize);this.stopLoaderAnimation()}handleResize=()=>{this.breakpoint=b(window.innerWidth)};loadLottieAnimation=async()=>{try{const e=await import("./p-GK75wIKe.js").then((function(e){return e.l}));const a=await fetch(r(`./assets/loader-redirect1.json`));const t=await a.json();if(this.lottieContainer){this.lottieAnimation=e.default.loadAnimation({container:this.lottieContainer,renderer:"svg",loop:true,autoplay:true,animationData:t})}else{this.startLoaderAnimation()}}catch(e){this.startLoaderAnimation()}};startLoaderAnimation=()=>{const e=3e3;const a=50;const r=a/e*100;this.progressInterval=window.setInterval((()=>{this.loaderProgress=Math.min(this.loaderProgress+r,100);if(this.loaderProgress>=100){this.stopLoaderAnimation()}}),a)};stopLoaderAnimation=()=>{if(this.progressInterval){clearInterval(this.progressInterval);this.progressInterval=undefined}if(this.lottieAnimation){this.lottieAnimation.destroy();this.lottieAnimation=undefined}};handleDownloadReceipt=async()=>{try{await g.generateAndDownloadReceipt({paymentMethod:this.typePaymentMethod===i.CARD?this.textPaymentMethodCard():this.paymentMethodName,...this.typePaymentMethod===i.BANK_TRANSFER&&{bank:this.bank},...this.typePaymentMethod===i.CARD&&{cardBrand:this.applyStartCaseToBrand(n.data.cardInformation?.brand||"")},...this.typePaymentMethod===i.CARD&&{cardLastFour:this.cardLastFour??n.data.cardInformation?.lastFour},paymentDate:y(this.getPaymentDate())||y((new Date).toISOString()),email:n.data.subscription.customerEmail||"",referenceNumber:this.referenceNumber,productTitle:n.data.subscription.name[0]?.text||"Subscription",subtotal:this.getFormattedSubtotal(),total:this.getFormattedTotal(),currency:n.data.price.currency||" ",discountAmount:this.getFormattedDiscountAmount(),trialPeriodDays:this.trialPeriodDays,debitDay:this.debitDay,planAmount:this.getFormattedSubtotal(this.planAmount),isBankTransfer:this.typePaymentMethod===i.BANK_TRANSFER})}catch(e){console.error("Error downloading receipt:",e)}};getFormattedDiscountAmount=()=>undefined;getFormattedSubtotal=(e=null)=>o(e||n.data.price.amount,n.data.price.currency);getFormattedTotal=()=>{if(this.trialPeriodDays>0){return o(0,n.data.price.currency)}return o(n.data.price.amount,n.data.price.currency)};textPaymentMethodCard=()=>{const e=n.data?.cardInformation?.brand;const a=this.cardLastFour||n.data?.cardInformation?.lastFour;const r=this.applyStartCaseToBrand(e||"");return e&&a?`${r} - ${a}`:r};render(){return t("rebill-checkout-single-column",{key:"4496c796a233649f3aed1c003630710313b09fda"},t("div",{key:"b632042d52817d351a975a4122838221d17a43cd",class:"renewal-success-page__success-content"},t("rebill-typography",{key:"8e533a76f9599028dfcefb87f07b8ae1e1093743",variant:"h3",color:f.PRIMARY_DARK_TEXT},s.translate("processing.successTitle")),t("div",{key:"04e69b288dda8067c4ea5c18861fd2d1e97fe22b",class:"renewal-success-page__success-icon"},t("svg",{key:"6feaa06227d3a33194b6b67d7e827296552f817f",width:p(this.breakpoint,d.DESKTOP)?"64":"96",height:p(this.breakpoint,d.DESKTOP)?"64":"96",viewBox:"0 0 96 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"f10028efad0800f907160b9475b8ed416082e12f","fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.99219 47.998C7.99219 25.9067 25.9008 7.99805 47.9922 7.99805C70.0836 7.99805 87.9922 25.9067 87.9922 47.998C87.9922 70.0894 70.0836 87.998 47.9922 87.998C25.9008 87.998 7.99219 70.0894 7.99219 47.998ZM61.5401 39.2645C62.2396 38.4096 62.1136 37.1496 61.2587 36.4501C60.4038 35.7507 59.1437 35.8767 58.4443 36.7316L41.8437 57.0211L35.4064 50.5838C34.6254 49.8028 33.359 49.8028 32.578 50.5838C31.7969 51.3649 31.7969 52.6312 32.578 53.4123L40.578 61.4123C40.9775 61.8118 41.5275 62.0237 42.0918 61.9956C42.6562 61.9674 43.1823 61.7019 43.5401 61.2645L61.5401 39.2645Z",fill:"#35B093"}))),t("div",{key:"f0e058f90a24f5a3d2cdb35d124bf709e34990e9",class:"renewal-success-page__info-card"},t("div",{key:"2086be74abb7b9688d5ff11c9b5160f34d66c2a2",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"b21241d0518f44764a04dfe7210c0ab4430d9ac9",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentMethod")),t("div",{key:"bca3d109e8e26f1e81de6cdd9b3e48fc53055e0a",class:"renewal-success-page__card-value"},t("div",{key:"a8595b953581c5eb73cd440b2e654ea1b7a055a1",class:"renewal-success-page__payment-method-display"},this.typePaymentMethod===i.CARD&&t(t.Fragment,null,t("rebill-card-icon",{key:"6e057bfc4951ccad8e9bd8e31786cf4cc1663ce9","card-brand":n.data?.cardInformation?.brand||""}),t("rebill-typography",{key:"63971fdb0c75050764f99b3cca698b9aed0d51db",variant:"body2",color:f.PRIMARY_DARK_TEXT},this.textPaymentMethodCard())),this.typePaymentMethod===i.BANK_TRANSFER&&t("div",{key:"b3de67829a6d13255287682c117543a1c1cc1f5f",style:{display:"flex",alignItems:"center",gap:"8px"}},t("div",{key:"39eafa3c5e9d2d2d9de3570f301c51b85b52d05e",style:{display:"flex",alignItems:"center",gap:"8px"}},this.getPaymentMethodConfig(i.BANK_TRANSFER).icons.map((e=>t("rebill-icon",{name:e,size:"24px"})))),t("rebill-typography",{key:"4d21176e8032b7b92c0abce56be4ac832a8fe1b9",variant:"body2",color:f.PRIMARY_DARK_TEXT},s.translate("paymentMethods.bank_transfer")))))),t("div",{key:"8e02e9e1c8f9c6befb56d0a35639438ded4943c2",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"a54d9c0b8f864ebdfe83e8ea5d933590c75a91aa",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentDate")),t("rebill-typography",{key:"6b6ca198cd8a8690785b17637f807bac92e2fe41",variant:"body2",color:f.PRIMARY_DARK_TEXT},y(this.paymentDate||this.getPaymentDate())||"")),t("div",{key:"462eb137825ffd9ce792129ba1091c2873bbaac6",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"342dfcde9ad869b3cfc7d298cd320a30a8be35c9",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentEmail")),t("rebill-typography",{key:"5f1f729d5f4824436b4340164beb98f0fb8f0848",variant:"body2",color:f.PRIMARY_DARK_TEXT},n.data.subscription.customerEmail)),t("div",{key:"eb53c500781f0d2b8a5e7b8ee5d7b29112cc44d5",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"24da425c9e38ea07cf9a306a0424c5960ee7dba7",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentReference")),t("rebill-typography",{key:"75cc1049bd3b345c723f7f64c6df23f2b41246ba",variant:"body2",color:f.PRIMARY_DARK_TEXT,class:"renewal-success-page__reference-number"},this.referenceNumber||""))),t("div",{key:"d5d68da7b66d79447263c9238b96d1b8cd291ec3",class:"renewal-success-page__info-card"},t("rebill-typography",{key:"68ddcfc907883d471b44f6c37ef4ef15d02dda55",variant:"subtitle-bold",color:f.PRIMARY_DARK_TEXT},s.translate("processing.purchaseDetails")),t("div",{key:"3abf06bdf76c053a6bc6c8110ef4d0ad667229c2",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"09d66339dc619a3fe10063f617a3891cfcd2d40d",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseDetail")),t("rebill-typography",{key:"cacc03f95b2dcfea276444d1c810e37ab9401e05",variant:"body2",color:f.PRIMARY_DARK_TEXT},n.data.subscription.name[0]?.text||"Subscription")),t("div",{key:"13a048d1ed8a4994fc3aa84e7f1f69edc8b28347",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"eaabad0bf612765f4ec37bccab7b539297e54b78",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseSubtotal")),t("rebill-typography",{key:"0d6c4809abebfbba605ca2e189e108abdce44e2a",variant:"body2",color:f.PRIMARY_DARK_TEXT},this.getFormattedSubtotal())),t("div",{key:"4280743028def8cd05816db01eb4fc070696aac5",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"7c9d7b42f1d35303fd977cce5a1f6dcb5a0bb2f6",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseMontoTotal")),t("div",{key:"442c35562a300cdffd9fadc37c7ffd1ddaf9f5ce",class:"renewal-success-page__total-amount-container"},t("rebill-typography",{key:"2b852d80132e4c5dd18ec7906caa2fdddd432def",variant:"body2",color:f.PRIMARY_DARK_TEXT},this.getFormattedTotal()))),t("div",{key:"23de8c78e6b6e1c3906b93f962ccbe331ebe3260",class:"renewal-success-page__card-divider"}),t("div",{key:"ab6221386001e8f63f06877bfb7fcf671996035a",class:"renewal-success-page__download-container"},t("svg",{key:"15a7b460baa13df7d7aeccefa623c94ecde9228f",class:"download-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"07be4439313a931dd41086a03cb30bbd843b108a",d:"M13.498 9.83333V12.1667C13.498 12.903 12.9011 13.5 12.1647 13.5H3.83138C3.095 13.5 2.49805 12.903 2.49805 12.1667V9.83333M7.99804 10V2.5M7.99804 10L5.66471 7.66667M7.99804 10L10.3314 7.66667",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})),t("rebill-button",{key:"5d85f4123ffa4fcea3bd3fa38074f65a6d671bbd",type:"button",variant:"download",size:"small",onClick:this.handleDownloadReceipt},t("rebill-typography",{key:"5dd14c730d1c693333b5224d04b964ed9c1321a9",variant:"overline",color:f.PRIMARY_DARK_TEXT},s.translate("processing.download")))),t("div",{key:"ad7e781a90ffb785a73ebae5c44c8a77ea8230ab",class:"renewal-success-page__contact-info"},t("rebill-typography",{key:"2d41f742c4efbdf200523308683bd8e77a770a39",variant:"information-text",color:f.SECONDARY},s.translate("processing.downloadDescription"))))))}};w.style=u;const x=".wrapper{margin:0 auto;display:flex;flex-direction:column;align-items:center}.header{display:flex;flex-direction:column;align-items:center;gap:8px}.title{font-size:1rem;font-weight:500;color:var(--rebill-color-primary-dark-text);text-align:center}.amount{font-size:2.25rem;font-weight:500;color:var(--rebill-color-primary-dark-text);margin:0 0 1.5rem 0;text-align:center;line-height:1.1}.per{font-size:1.1rem;font-weight:400;color:var(--rebill-color-text-secondary)}.label-muted{font-size:1rem;color:var(--rebill-color-primary-dark);margin:0 0 1.5rem 0;text-align:center}.info{width:100%;margin-top:1.5rem;margin-bottom:3rem;display:flex;flex-direction:column;gap:1.4rem}.row{display:flex;justify-content:space-between;align-items:center;font-size:1rem;line-height:1.4;width:100%}.left{color:var(--rebill-color-text-secondary);font-weight:400}.right{color:var(--rebill-color-primary-dark-text);font-weight:400;text-align:right}.divider{border:none;border-top:1px solid var(--rebill-color-border);margin:1rem 0}@media (max-width: 1024px){.amount{margin-bottom:0}.row{font-size:0.9rem}.row:not(:last-child){margin-bottom:0.5rem}.left{color:var(--rebill-color-primary-dark-text)}}.total-row{width:100%;display:flex;justify-content:space-between;align-items:center;font-size:1.1rem;font-weight:600}.total-row .left{color:var(--rebill-color-primary-dark-text)}";const k=class{constructor(a){e(this,a)}forceUpdate=0;displayedComponents=["header","details","summary"];componentWillLoad(){c.on("languageChanged",this.handleLanguageChange)}disconnectedCallback(){c.off("languageChanged",this.handleLanguageChange)}handleLanguageChange=()=>{this.forceUpdate=this.forceUpdate+1};totalAmount;subscriptionTitle;subscriptionAmount;nextChargeDate;frequency;currency;getFrequencyText(){if(!this.frequency||!this.frequency.period)return"";const e=this.frequency.period.toLowerCase();const a=this.frequency.count;const r=`summary.${e}`;return s.translate(r,{count:a})}renderHeader=()=>t("div",{class:"header"},t("p",{class:"title"},s.translate("renewal.title")),t("p",{class:"amount"},o(this.totalAmount,this.currency)," ",t("span",{class:"per"},"/ ",this.getFrequencyText().toLowerCase())));renderInfoRow=(e,a)=>t("div",{class:"row"},t("div",{class:"left"},e),t("div",{class:"right"},a));renderProduct=()=>this.renderInfoRow(this.subscriptionTitle,o(this.subscriptionAmount,this.currency));renderNextRenewal=()=>this.renderInfoRow(s.translate("renewal.nextRenewal"),m(this.nextChargeDate,undefined,l.currentLocale));renderSubtotal=()=>this.renderInfoRow(s.translate("renewal.subtotal"),o(this.totalAmount,this.currency));renderTotal=()=>t("div",{class:"total-row"},t("div",{class:"left"},s.translate("renewal.totalToRenew")),t("div",{class:"right"},o(this.totalAmount,this.currency)));renderDesktop=()=>t("div",{class:"wrapper"},this.renderHeader(),t("div",{class:"info"},t("div",{class:"row"},t("div",{class:""},s.translate("renewal.subscriptionDetails"))),this.renderProduct(),this.renderNextRenewal(),this.renderSubtotal()),this.renderTotal());render(){if(this.displayedComponents.includes("header")&&this.displayedComponents.includes("details")&&this.displayedComponents.includes("summary")){return this.renderDesktop()}if(this.displayedComponents.includes("header")){return this.renderHeader()}if(this.displayedComponents.includes("details")){return t("collapsible-card",{header:s.translate("summary.details")},this.renderProduct(),this.renderNextRenewal())}if(this.displayedComponents.includes("summary")){return t("collapsible-card",{header:s.translate("summary.summary")},this.renderInfoRow(this.subscriptionTitle,"1 x "+o(this.subscriptionAmount,this.currency)),this.renderSubtotal(),t("rebill-divider",null),this.renderInfoRow(s.translate("renewal.totalToRenew"),o(this.totalAmount,this.currency)))}}};k.style=x;export{w as renewal_success_page,k as renewal_summary};
|
|
2
|
+
//# sourceMappingURL=p-3af0544a.entry.js.map
|