rebill-web-components-sdk 1.8.35 → 1.8.36

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 (33) hide show
  1. package/dist/cjs/index-C-VTnc0I.js.map +1 -1
  2. package/dist/cjs/rebill-checkout.cjs.entry.js +2 -3
  3. package/dist/cjs/rebill-checkout.entry.cjs.js.map +1 -1
  4. package/dist/cjs/renewal-success-page.renewal-summary.entry.cjs.js.map +1 -1
  5. package/dist/cjs/renewal-success-page_2.cjs.entry.js +0 -3
  6. package/dist/collection/components/checkout/rebill-checkout.js +2 -3
  7. package/dist/collection/components/checkout/rebill-checkout.js.map +1 -1
  8. package/dist/collection/components/renewal/renewal-summary/renewal-summary.js +0 -3
  9. package/dist/collection/components/renewal/renewal-summary/renewal-summary.js.map +1 -1
  10. package/dist/components/p-8BpuJ_V5.js.map +1 -1
  11. package/dist/components/{p-mqJmoJIO.js → p-CmKAtNPq.js} +2 -5
  12. package/dist/components/p-CmKAtNPq.js.map +1 -0
  13. package/dist/components/rebill-checkout.js +2 -3
  14. package/dist/components/rebill-checkout.js.map +1 -1
  15. package/dist/components/rebill-renewal.js +1 -1
  16. package/dist/components/renewal-summary.js +1 -1
  17. package/dist/esm/index-D8cwEAmw.js.map +1 -1
  18. package/dist/esm/rebill-checkout.entry.js +2 -3
  19. package/dist/esm/rebill-checkout.entry.js.map +1 -1
  20. package/dist/esm/renewal-success-page.renewal-summary.entry.js.map +1 -1
  21. package/dist/esm/renewal-success-page_2.entry.js +0 -3
  22. package/dist/rebill-web-components-sdk/{p-bde8f6aa.entry.js → p-3a585ddc.entry.js} +2 -2
  23. package/dist/rebill-web-components-sdk/p-3a585ddc.entry.js.map +1 -0
  24. package/dist/rebill-web-components-sdk/p-9b146258.entry.js +2 -0
  25. package/dist/rebill-web-components-sdk/{p-6667496c.entry.js.map → p-9b146258.entry.js.map} +1 -1
  26. package/dist/rebill-web-components-sdk/p-D8cwEAmw.js.map +1 -1
  27. package/dist/rebill-web-components-sdk/rebill-checkout.entry.esm.js.map +1 -1
  28. package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
  29. package/dist/rebill-web-components-sdk/renewal-success-page.renewal-summary.entry.esm.js.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/components/p-mqJmoJIO.js.map +0 -1
  32. package/dist/rebill-web-components-sdk/p-6667496c.entry.js +0 -2
  33. package/dist/rebill-web-components-sdk/p-bde8f6aa.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"renewal-success-page.renewal-summary.entry.js","sources":["src/components/renewal/renewal-success-page/renewal-success-page.css?tag=renewal-success-page","src/components/renewal/renewal-success-page/renewal-success-page.tsx","src/components/renewal/renewal-summary/renewal-summary.css?tag=renewal-summary","src/components/renewal/renewal-summary/renewal-summary.tsx"],"sourcesContent":["@import '../../../styles/variables.css';\n\n/* Success View Styles */\n.renewal-success-page__success-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n width: 100%;\n overflow-x: hidden;\n box-sizing: border-box;\n}\n\n/* Eliminar márgenes del h3 en el componente de éxito */\n.renewal-success-page__success-content rebill-typography[variant='h3'] {\n margin: 0 !important;\n padding: 0 !important;\n}\n\n.renewal-success-page__success-icon {\n display: flex;\n justify-content: center;\n margin: 0.5rem 0;\n}\n\n/* Info Cards */\n.renewal-success-page__info-card {\n padding: 24px;\n gap: 16px;\n width: 100%;\n max-width: 450px;\n border: 1px solid #ebedef;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n}\n\n.renewal-success-page__card-row {\n display: flex;\n justify-content: space-between;\n align-items: start;\n min-height: 20px;\n gap: 15%;\n}\n\n.renewal-success-page__card-row:last-of-type {\n margin-bottom: 0;\n}\n\n.renewal-success-page__card-value {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.renewal-success-page__payment-method-display {\n display: flex;\n align-items: center;\n gap: 8px;\n justify-content: center;\n}\n\n.renewal-success-page__payment-method-display rebill-card-icon {\n display: inline-block;\n flex-shrink: 0;\n margin-right: 8px;\n vertical-align: middle;\n}\n\n.renewal-success-page__payment-method-display rebill-card-icon svg {\n display: block;\n}\n\n.renewal-success-page__payment-method-display rebill-icon {\n display: inline-block;\n vertical-align: middle;\n margin-right: 8px;\n}\n\n.renewal-success-page__payment-method-display rebill-icon div {\n display: block;\n}\n\n.renewal-success-page__card-divider {\n height: 1px;\n background: #e5e7eb;\n}\n\n.renewal-success-page__download-container {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 2px;\n text-decoration: none;\n cursor: pointer;\n}\n\n.renewal-success-page__contact-info {\n text-align: left;\n}\n\n.renewal-success-page__reference-number {\n word-break: break-all;\n overflow-wrap: break-word;\n hyphens: auto;\n max-width: 100%;\n text-align: right;\n}\n\n.renewal-success-page__total-amount-container {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n flex-direction: row;\n}\n\n/* Responsive Styles */\n@media (max-width: 1024px) {\n .renewal-success-page__success-content {\n max-width: 100%;\n gap: 1.5rem;\n margin-left: 16px;\n margin-right: 16px;\n }\n\n .renewal-success-page__info-card {\n width: 100%;\n max-width: 100%;\n padding: 12px;\n }\n}\n\n@media (max-width: 767px) {\n .renewal-success-page__info-card {\n padding: 12px;\n }\n}\n","import { Component, Event, EventEmitter, getAssetPath, h, Prop, State } from '@stencil/core';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { PAYMENT_METHOD_ENUM } from '../../../models/enums/payment-methods.enum';\nimport { renewalState } from '../../../store/renewal.store';\nimport { formatDateTime } from '../../../utils';\nimport { BREAKPOINT_ENUM, getBreakpoint, isBreakpointBelow } from '../../../utils/breakpoint';\nimport { COLORS_ENUM } from '../../../utils/color-class-mapper';\nimport { getCountryPaymentMethods } from '../../../utils/countries-payment-methods';\nimport { formatAmount } from '../../../utils/currency-formatter';\nimport { PDFGenerator } from '../../../utils/pdf-generator';\n\n@Component({\n tag: 'renewal-success-page',\n styleUrl: 'renewal-success-page.css',\n shadow: false,\n})\nexport class RenewalSuccessPage {\n @Prop() typePaymentMethod: PAYMENT_METHOD_ENUM = PAYMENT_METHOD_ENUM.CARD;\n @Prop() country?: string = '';\n @Prop() bank?: string = '';\n @Prop() paymentMethodName?: string = '';\n @Prop() cardLastFour?: string = '';\n @Prop() paymentDate: string = '';\n @Prop() referenceNumber: string = '';\n @Prop() trialPeriodDays?: number = 0;\n @Prop() debitDay?: number = 0;\n @Prop() planAmount?: number = 0;\n @State() currentLocale: string = 'es';\n @State() breakpoint: BREAKPOINT_ENUM = BREAKPOINT_ENUM.DESKTOP;\n\n @Event() successRedirect: EventEmitter<any>;\n @State() loaderProgress: number = 0;\n @State() isLoadingLottie: boolean = true;\n @State() showRedirectMessage: boolean = false;\n @Prop() timeToRedirect: number = 3000;\n private progressInterval?: number;\n private lottieContainer?: HTMLElement;\n private lottieAnimation?: any;\n private successDisplayTimeout?: number;\n\n private applyStartCaseToBrand = (brand: string): string => {\n if (!brand) return '';\n\n return brand\n .toLowerCase()\n .split(/[\\s-]+/)\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n };\n\n private getPaymentMethodConfig(method: PAYMENT_METHOD_ENUM) {\n const countryPaymentMethods = this.country ? getCountryPaymentMethods(this.country) : null;\n\n const countrySpecificMethod = countryPaymentMethods?.find(pm => pm.type === method);\n\n // Default configurations (fallback)\n const defaultConfigs = {\n [PAYMENT_METHOD_ENUM.CARD]: {\n key: PAYMENT_METHOD_ENUM.CARD,\n label: I18nService.translate('paymentMethods.card'),\n icons: ['card'],\n },\n [PAYMENT_METHOD_ENUM.CASH]: {\n key: PAYMENT_METHOD_ENUM.CASH,\n label: I18nService.translate('paymentMethods.cash'),\n icons: ['pago-facil'],\n },\n [PAYMENT_METHOD_ENUM.BANK_TRANSFER]: {\n key: PAYMENT_METHOD_ENUM.BANK_TRANSFER,\n label: I18nService.translate('paymentMethods.bank_transfer'),\n icons: ['plus'],\n },\n };\n\n const defaultConfig = defaultConfigs[method];\n\n // If we have country-specific icons, use them; otherwise use defaults\n return {\n ...defaultConfig,\n icons: countrySpecificMethod?.icons || defaultConfig.icons,\n };\n }\n\n private getPaymentDate = (): string => {\n // Usar el parámetro paymentDate que viene del renewal principal\n return this.paymentDate || '';\n };\n\n componentWillLoad() {\n this.breakpoint = getBreakpoint(window.innerWidth);\n\n // Para renewal, no hay redirect por defecto, pero podríamos agregarlo si es necesario\n if (this.showRedirectMessage) {\n this.successDisplayTimeout = window.setTimeout(() => {\n this.showRedirectMessage = true;\n this.loadLottieAnimation();\n }, 1500);\n\n setTimeout(() => {\n // Aquí podrías agregar lógica de redirect si es necesaria\n this.stopLoaderAnimation();\n }, this.timeToRedirect);\n }\n }\n\n componentDidLoad() {\n window.addEventListener('resize', this.handleResize);\n if (!this.showRedirectMessage) {\n this.loadLottieAnimation();\n }\n }\n\n disconnectedCallback() {\n if (this.successDisplayTimeout) {\n clearTimeout(this.successDisplayTimeout);\n }\n window.removeEventListener('resize', this.handleResize);\n this.stopLoaderAnimation();\n }\n\n private handleResize = () => {\n this.breakpoint = getBreakpoint(window.innerWidth);\n };\n\n private loadLottieAnimation = async () => {\n try {\n const lottie = await import('lottie-web');\n const animationData = await fetch(getAssetPath(`./assets/loader-redirect1.json`));\n const animationJson = await animationData.json();\n\n if (this.lottieContainer) {\n this.lottieAnimation = lottie.default.loadAnimation({\n container: this.lottieContainer,\n renderer: 'svg',\n loop: true,\n autoplay: true,\n animationData: animationJson,\n });\n } else {\n this.startLoaderAnimation();\n }\n } catch (error) {\n this.startLoaderAnimation();\n }\n };\n\n private startLoaderAnimation = () => {\n const duration = 3000;\n const interval = 50;\n const increment = (interval / duration) * 100;\n\n this.progressInterval = window.setInterval(() => {\n this.loaderProgress = Math.min(this.loaderProgress + increment, 100);\n if (this.loaderProgress >= 100) {\n this.stopLoaderAnimation();\n }\n }, interval);\n };\n\n private stopLoaderAnimation = () => {\n if (this.progressInterval) {\n clearInterval(this.progressInterval);\n this.progressInterval = undefined;\n }\n if (this.lottieAnimation) {\n this.lottieAnimation.destroy();\n this.lottieAnimation = undefined;\n }\n };\n\n private handleDownloadReceipt = async () => {\n try {\n await PDFGenerator.generateAndDownloadReceipt({\n paymentMethod:\n this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD\n ? this.textPaymentMethodCard()\n : this.paymentMethodName,\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && { bank: this.bank }),\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && {\n cardBrand: this.applyStartCaseToBrand(renewalState.data.cardInformation?.brand || ''),\n }),\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && {\n cardLastFour: this.cardLastFour ?? renewalState.data.cardInformation?.lastFour,\n }),\n paymentDate:\n formatDateTime(this.getPaymentDate()) || formatDateTime(new Date().toISOString()),\n email: renewalState.data.subscription.customerEmail || '',\n referenceNumber: this.referenceNumber,\n productTitle: renewalState.data.subscription.name[0]?.text || 'Subscription',\n subtotal: formatAmount(\n renewalState.data.subscription.subTotalAmount,\n renewalState.data.price.currency as any,\n ),\n total: formatAmount(\n renewalState.data.price.amount,\n renewalState.data.price.currency as any,\n ),\n currency: (renewalState.data.price.currency as any) || ' ',\n ...(this.getDiscountAmountValue() > 0 && {\n discountAmount: formatAmount(\n this.getDiscountAmountValue(),\n renewalState.data.price.currency as any,\n ),\n }),\n trialPeriodDays: this.trialPeriodDays,\n debitDay: this.debitDay,\n planAmount: formatAmount(this.planAmount, renewalState.data.price.currency as any),\n isBankTransfer: this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER,\n });\n } catch (error) {\n console.error('Error downloading receipt:', error);\n }\n };\n\n private getDiscountAmountValue = () => {\n if (renewalState?.data?.price?.amount < renewalState?.data?.subscription?.subTotalAmount) {\n return renewalState?.data?.subscription?.subTotalAmount - renewalState?.data?.price?.amount;\n }\n return 0;\n };\n\n hasDiscount = () => {\n return this.getDiscountAmountValue() > 0;\n };\n\n private textPaymentMethodCard = () => {\n const cardBrand = renewalState.data?.cardInformation?.brand;\n const cardLastFour = this.cardLastFour || renewalState.data?.cardInformation?.lastFour;\n\n const formattedBrand = this.applyStartCaseToBrand(cardBrand || '');\n return cardBrand && cardLastFour ? `${formattedBrand} - ${cardLastFour}` : formattedBrand;\n };\n\n render() {\n return (\n <rebill-checkout-single-column>\n <div class=\"renewal-success-page__success-content\">\n <rebill-typography variant=\"h3\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.successTitle')}\n </rebill-typography>\n\n <div class=\"renewal-success-page__success-icon\">\n <svg\n width={isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96'}\n height={isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96'}\n viewBox=\"0 0 96 96\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n 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\"\n fill=\"#35B093\"\n />\n </svg>\n </div>\n\n {/* Payment Details Card */}\n <div class=\"renewal-success-page__info-card\">\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentMethod')}\n </rebill-typography>\n <div class=\"renewal-success-page__card-value\">\n <div class=\"renewal-success-page__payment-method-display\">\n {this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && (\n <>\n <rebill-card-icon\n card-brand={renewalState.data?.cardInformation?.brand || ''}\n />\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.textPaymentMethodCard()}\n </rebill-typography>\n </>\n )}\n {this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && (\n <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>\n <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>\n {this.getPaymentMethodConfig(PAYMENT_METHOD_ENUM.BANK_TRANSFER).icons.map(\n iconName => {\n return <rebill-icon name={iconName} size=\"24px\" />;\n },\n )}\n </div>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('paymentMethods.bank_transfer')}\n </rebill-typography>\n </div>\n )}\n </div>\n </div>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentDate')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatDateTime(this.paymentDate || this.getPaymentDate()) || ''}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentEmail')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {renewalState.data.subscription.customerEmail}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentReference')}\n </rebill-typography>\n <rebill-typography\n variant=\"body2\"\n color={COLORS_ENUM.PRIMARY_DARK_TEXT}\n class=\"renewal-success-page__reference-number\"\n >\n {this.referenceNumber || ''}\n </rebill-typography>\n </div>\n </div>\n\n {/* Purchase Details Card */}\n <div class=\"renewal-success-page__info-card\">\n <rebill-typography variant=\"subtitle-bold\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.purchaseDetails')}\n </rebill-typography>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseDetail')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {renewalState.data.subscription.name[0]?.text || 'Subscription'}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseSubtotal')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatAmount(\n renewalState.data.subscription.subTotalAmount,\n renewalState.data.price.currency as any,\n )}\n </rebill-typography>\n </div>\n {this.hasDiscount() && (\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('summary.discount')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatAmount(\n this.getDiscountAmountValue(),\n renewalState.data.price.currency as any,\n )}\n </rebill-typography>\n </div>\n )}\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseMontoTotal')}\n </rebill-typography>\n <div class=\"renewal-success-page__total-amount-container\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatAmount(\n renewalState.data.price.amount,\n renewalState.data.price.currency as any,\n )}\n </rebill-typography>\n </div>\n </div>\n <div class=\"renewal-success-page__card-divider\"></div>\n <div class=\"renewal-success-page__download-container\">\n <svg\n class=\"download-icon\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <rebill-button\n type=\"button\"\n variant=\"download\"\n size=\"small\"\n onClick={this.handleDownloadReceipt}\n >\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.download')}\n </rebill-typography>\n </rebill-button>\n </div>\n\n {/* Contact Info */}\n <div class=\"renewal-success-page__contact-info\">\n <rebill-typography variant=\"information-text\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.downloadDescription')}\n </rebill-typography>\n </div>\n </div>\n </div>\n </rebill-checkout-single-column>\n );\n }\n}\n",".wrapper {\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.header {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n}\n.title {\n font-size: 1rem;\n font-weight: 500;\n color: var(--rebill-color-primary-dark-text);\n text-align: center;\n}\n\n.amount {\n font-size: 2.25rem;\n font-weight: 500;\n color: var(--rebill-color-primary-dark-text);\n margin: 0 0 1.5rem 0;\n text-align: center;\n line-height: 1.1;\n}\n\n.per {\n font-size: 1.1rem;\n font-weight: 400;\n color: var(--rebill-color-text-secondary);\n}\n\n.label-muted {\n font-size: 1rem;\n color: var(--rebill-color-primary-dark);\n margin: 0 0 1.5rem 0;\n text-align: center;\n}\n\n.info {\n width: 100%;\n margin-top: 1.5rem;\n margin-bottom: 3rem;\n display: flex;\n flex-direction: column;\n gap: 1.4rem;\n}\n\n.row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 1rem;\n line-height: 1.4;\n width: 100%;\n}\n\n.left {\n color: var(--rebill-color-text-secondary);\n font-weight: 400;\n}\n\n.right {\n color: var(--rebill-color-primary-dark-text);\n font-weight: 400;\n text-align: right;\n}\n\n.divider {\n border: none;\n border-top: 1px solid var(--rebill-color-border);\n margin: 1rem 0;\n}\n\n@media (max-width: 1024px) {\n .amount {\n margin-bottom: 0;\n }\n .row {\n font-size: 0.9rem;\n }\n .row:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n .left {\n color: var(--rebill-color-primary-dark-text);\n }\n}\n\n.total-row {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 1.1rem;\n font-weight: 600;\n}\n\n.total-row .left {\n color: var(--rebill-color-primary-dark-text);\n}\n","import { Component, h, Prop, State } from '@stencil/core';\nimport i18n from '../../../i18n/i18n.config';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { sessionState } from '../../../store/session.store';\nimport { formatAmount } from '../../../utils/currency-formatter';\nimport { formatDate as formatDateByLocale } from '../../../utils/date-formatter';\n\n@Component({\n tag: 'renewal-summary',\n styleUrl: 'renewal-summary.css',\n shadow: false,\n})\nexport class RenewalSummary {\n @State() private forceUpdate = 0;\n @Prop() displayedComponents: ('header' | 'details' | 'summary')[] = [\n 'header',\n 'details',\n 'summary',\n ];\n @Prop() totalAmount!: number;\n @Prop() subTotalAmount!: number;\n @Prop() subscriptionTitle!: string;\n @Prop() subscriptionAmount!: number;\n @Prop() nextChargeDate?: string;\n @Prop() frequency?: { count: number; period: string };\n @Prop() currency: string;\n @Prop() couponCode?: string;\n @Prop() discountAmount?: number;\n @Prop() discountPercentage?: number;\n\n componentWillLoad() {\n i18n.on('languageChanged', this.handleLanguageChange);\n }\n\n disconnectedCallback() {\n i18n.off('languageChanged', this.handleLanguageChange);\n }\n\n private handleLanguageChange = () => {\n this.forceUpdate = this.forceUpdate + 1;\n };\n\n private getFrequencyText(): string {\n if (!this.frequency || !this.frequency.period) return '';\n\n const period = this.frequency.period.toLowerCase();\n const count = this.frequency.count;\n\n const translationKey = `summary.${period}`;\n return I18nService.translate(translationKey, { count });\n }\n\n private getDiscountAmount(): number {\n if (this.totalAmount < this.subTotalAmount) {\n console.log('this.subTotalAmount', this.subTotalAmount);\n console.log('this.totalAmount', this.totalAmount);\n console.log('this.discountAmount', this.subTotalAmount - this.totalAmount);\n return this.subTotalAmount - this.totalAmount;\n }\n\n return this.discountAmount || 0;\n }\n\n renderHeader = () => {\n return (\n <div class=\"header\">\n <p class=\"title\">{I18nService.translate('renewal.title')}</p>\n <p class=\"amount\">\n <span class=\"total-amount\">{formatAmount(this.totalAmount, this.currency)}</span>{' '}\n <span class=\"per\">/ {this.getFrequencyText().toLowerCase()}</span>\n </p>\n </div>\n );\n };\n\n renderInfoRow = (label: string, value: string) => {\n return (\n <div class=\"row\">\n <div class=\"left\">{label}</div>\n <div class=\"right\">{value}</div>\n </div>\n );\n };\n\n renderProduct = () => {\n return this.renderInfoRow(\n this.subscriptionTitle,\n formatAmount(this.subscriptionAmount, this.currency),\n );\n };\n\n renderNextRenewal = () => {\n return this.renderInfoRow(\n I18nService.translate('renewal.nextRenewal'),\n formatDateByLocale(this.nextChargeDate, undefined, sessionState.currentLocale),\n );\n };\n\n renderSubtotal = () => {\n return this.renderInfoRow(\n I18nService.translate('renewal.subtotal'),\n formatAmount(this.subTotalAmount, this.currency),\n );\n };\n\n private renderDiscount = () => {\n if (this.getDiscountAmount() <= 0) return null;\n return (\n <div class=\"row\">\n <div class=\"left\">{I18nService.translate('summary.discount')}</div>\n <div class=\"right discount-chip-wrapper\">\n <discount-coupon\n displayMode=\"readonly\"\n readonlyCouponCode={this.couponCode || undefined}\n readonlyDiscountAmount={this.getDiscountAmount()}\n readonlyCurrency={this.currency}\n />\n </div>\n </div>\n );\n };\n\n renderTotal = () => {\n return (\n <div class=\"total-row\">\n <div class=\"left\">{I18nService.translate('renewal.totalToRenew')}</div>\n <div class=\"right\">{formatAmount(this.totalAmount, this.currency)}</div>\n </div>\n );\n };\n\n renderDesktop = () => {\n return (\n <div class=\"wrapper\">\n {this.renderHeader()}\n <div class=\"info\">\n <div class=\"row\">\n <div class=\"\">{I18nService.translate('renewal.subscriptionDetails')}</div>\n </div>\n {this.renderProduct()}\n {this.renderNextRenewal()}\n {this.renderSubtotal()}\n {this.renderDiscount()}\n </div>\n\n {this.renderTotal()}\n </div>\n );\n };\n\n render() {\n if (\n this.displayedComponents.includes('header') &&\n this.displayedComponents.includes('details') &&\n this.displayedComponents.includes('summary')\n ) {\n return this.renderDesktop();\n }\n if (this.displayedComponents.includes('header')) {\n return this.renderHeader();\n }\n if (this.displayedComponents.includes('details')) {\n return (\n <collapsible-card header={I18nService.translate('summary.details')}>\n {this.renderProduct()}\n {this.renderNextRenewal()}\n </collapsible-card>\n );\n }\n if (this.displayedComponents.includes('summary')) {\n return (\n <collapsible-card header={I18nService.translate('summary.summary')}>\n {this.renderInfoRow(\n this.subscriptionTitle,\n '1 x ' + formatAmount(this.subscriptionAmount, this.currency),\n )}\n {this.renderSubtotal()}\n {this.renderDiscount()}\n\n <rebill-divider />\n {this.renderInfoRow(\n I18nService.translate('renewal.totalToRenew'),\n formatAmount(this.totalAmount, this.currency),\n )}\n </collapsible-card>\n );\n }\n }\n}\n"],"names":["i18n","formatDateByLocale","sessionState"],"mappings":";;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,u3HAAu3H;;MCgBx4H,kBAAkB,GAAA,MAAA;;;;;AACrB,IAAA,iBAAiB,GAAwB,mBAAmB,CAAC,IAAI;IACjE,OAAO,GAAY,EAAE;IACrB,IAAI,GAAY,EAAE;IAClB,iBAAiB,GAAY,EAAE;IAC/B,YAAY,GAAY,EAAE;IAC1B,WAAW,GAAW,EAAE;IACxB,eAAe,GAAW,EAAE;IAC5B,eAAe,GAAY,CAAC;IAC5B,QAAQ,G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I,CAAC,QAAQ,CAAC,CAC9D,EACA,IAAI,CAAC,cAAc,EAAE,EACrB,IAAI,CAAC,cAAc,EAAE,EAEtB,CAAkB,CAAA,gBAAA,EAAA,IAAA,CAAA,EACjB,IAAI,CAAC,aAAa,CACjB,WAAW,CAAC,SAAS,CAAC,sBAAsB,CAAC,EAC7C,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAC9C,CACgB;;;;;;;;"}
1
+ {"version":3,"file":"renewal-success-page.renewal-summary.entry.js","sources":["src/components/renewal/renewal-success-page/renewal-success-page.css?tag=renewal-success-page","src/components/renewal/renewal-success-page/renewal-success-page.tsx","src/components/renewal/renewal-summary/renewal-summary.css?tag=renewal-summary","src/components/renewal/renewal-summary/renewal-summary.tsx"],"sourcesContent":["@import '../../../styles/variables.css';\n\n/* Success View Styles */\n.renewal-success-page__success-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n width: 100%;\n overflow-x: hidden;\n box-sizing: border-box;\n}\n\n/* Eliminar márgenes del h3 en el componente de éxito */\n.renewal-success-page__success-content rebill-typography[variant='h3'] {\n margin: 0 !important;\n padding: 0 !important;\n}\n\n.renewal-success-page__success-icon {\n display: flex;\n justify-content: center;\n margin: 0.5rem 0;\n}\n\n/* Info Cards */\n.renewal-success-page__info-card {\n padding: 24px;\n gap: 16px;\n width: 100%;\n max-width: 450px;\n border: 1px solid #ebedef;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n}\n\n.renewal-success-page__card-row {\n display: flex;\n justify-content: space-between;\n align-items: start;\n min-height: 20px;\n gap: 15%;\n}\n\n.renewal-success-page__card-row:last-of-type {\n margin-bottom: 0;\n}\n\n.renewal-success-page__card-value {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.renewal-success-page__payment-method-display {\n display: flex;\n align-items: center;\n gap: 8px;\n justify-content: center;\n}\n\n.renewal-success-page__payment-method-display rebill-card-icon {\n display: inline-block;\n flex-shrink: 0;\n margin-right: 8px;\n vertical-align: middle;\n}\n\n.renewal-success-page__payment-method-display rebill-card-icon svg {\n display: block;\n}\n\n.renewal-success-page__payment-method-display rebill-icon {\n display: inline-block;\n vertical-align: middle;\n margin-right: 8px;\n}\n\n.renewal-success-page__payment-method-display rebill-icon div {\n display: block;\n}\n\n.renewal-success-page__card-divider {\n height: 1px;\n background: #e5e7eb;\n}\n\n.renewal-success-page__download-container {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 2px;\n text-decoration: none;\n cursor: pointer;\n}\n\n.renewal-success-page__contact-info {\n text-align: left;\n}\n\n.renewal-success-page__reference-number {\n word-break: break-all;\n overflow-wrap: break-word;\n hyphens: auto;\n max-width: 100%;\n text-align: right;\n}\n\n.renewal-success-page__total-amount-container {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n flex-direction: row;\n}\n\n/* Responsive Styles */\n@media (max-width: 1024px) {\n .renewal-success-page__success-content {\n max-width: 100%;\n gap: 1.5rem;\n margin-left: 16px;\n margin-right: 16px;\n }\n\n .renewal-success-page__info-card {\n width: 100%;\n max-width: 100%;\n padding: 12px;\n }\n}\n\n@media (max-width: 767px) {\n .renewal-success-page__info-card {\n padding: 12px;\n }\n}\n","import { Component, Event, EventEmitter, getAssetPath, h, Prop, State } from '@stencil/core';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { PAYMENT_METHOD_ENUM } from '../../../models/enums/payment-methods.enum';\nimport { renewalState } from '../../../store/renewal.store';\nimport { formatDateTime } from '../../../utils';\nimport { BREAKPOINT_ENUM, getBreakpoint, isBreakpointBelow } from '../../../utils/breakpoint';\nimport { COLORS_ENUM } from '../../../utils/color-class-mapper';\nimport { getCountryPaymentMethods } from '../../../utils/countries-payment-methods';\nimport { formatAmount } from '../../../utils/currency-formatter';\nimport { PDFGenerator } from '../../../utils/pdf-generator';\n\n@Component({\n tag: 'renewal-success-page',\n styleUrl: 'renewal-success-page.css',\n shadow: false,\n})\nexport class RenewalSuccessPage {\n @Prop() typePaymentMethod: PAYMENT_METHOD_ENUM = PAYMENT_METHOD_ENUM.CARD;\n @Prop() country?: string = '';\n @Prop() bank?: string = '';\n @Prop() paymentMethodName?: string = '';\n @Prop() cardLastFour?: string = '';\n @Prop() paymentDate: string = '';\n @Prop() referenceNumber: string = '';\n @Prop() trialPeriodDays?: number = 0;\n @Prop() debitDay?: number = 0;\n @Prop() planAmount?: number = 0;\n @State() currentLocale: string = 'es';\n @State() breakpoint: BREAKPOINT_ENUM = BREAKPOINT_ENUM.DESKTOP;\n\n @Event() successRedirect: EventEmitter<any>;\n @State() loaderProgress: number = 0;\n @State() isLoadingLottie: boolean = true;\n @State() showRedirectMessage: boolean = false;\n @Prop() timeToRedirect: number = 3000;\n private progressInterval?: number;\n private lottieContainer?: HTMLElement;\n private lottieAnimation?: any;\n private successDisplayTimeout?: number;\n\n private applyStartCaseToBrand = (brand: string): string => {\n if (!brand) return '';\n\n return brand\n .toLowerCase()\n .split(/[\\s-]+/)\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n };\n\n private getPaymentMethodConfig(method: PAYMENT_METHOD_ENUM) {\n const countryPaymentMethods = this.country ? getCountryPaymentMethods(this.country) : null;\n\n const countrySpecificMethod = countryPaymentMethods?.find(pm => pm.type === method);\n\n // Default configurations (fallback)\n const defaultConfigs = {\n [PAYMENT_METHOD_ENUM.CARD]: {\n key: PAYMENT_METHOD_ENUM.CARD,\n label: I18nService.translate('paymentMethods.card'),\n icons: ['card'],\n },\n [PAYMENT_METHOD_ENUM.CASH]: {\n key: PAYMENT_METHOD_ENUM.CASH,\n label: I18nService.translate('paymentMethods.cash'),\n icons: ['pago-facil'],\n },\n [PAYMENT_METHOD_ENUM.BANK_TRANSFER]: {\n key: PAYMENT_METHOD_ENUM.BANK_TRANSFER,\n label: I18nService.translate('paymentMethods.bank_transfer'),\n icons: ['plus'],\n },\n };\n\n const defaultConfig = defaultConfigs[method];\n\n // If we have country-specific icons, use them; otherwise use defaults\n return {\n ...defaultConfig,\n icons: countrySpecificMethod?.icons || defaultConfig.icons,\n };\n }\n\n private getPaymentDate = (): string => {\n // Usar el parámetro paymentDate que viene del renewal principal\n return this.paymentDate || '';\n };\n\n componentWillLoad() {\n this.breakpoint = getBreakpoint(window.innerWidth);\n\n // Para renewal, no hay redirect por defecto, pero podríamos agregarlo si es necesario\n if (this.showRedirectMessage) {\n this.successDisplayTimeout = window.setTimeout(() => {\n this.showRedirectMessage = true;\n this.loadLottieAnimation();\n }, 1500);\n\n setTimeout(() => {\n // Aquí podrías agregar lógica de redirect si es necesaria\n this.stopLoaderAnimation();\n }, this.timeToRedirect);\n }\n }\n\n componentDidLoad() {\n window.addEventListener('resize', this.handleResize);\n if (!this.showRedirectMessage) {\n this.loadLottieAnimation();\n }\n }\n\n disconnectedCallback() {\n if (this.successDisplayTimeout) {\n clearTimeout(this.successDisplayTimeout);\n }\n window.removeEventListener('resize', this.handleResize);\n this.stopLoaderAnimation();\n }\n\n private handleResize = () => {\n this.breakpoint = getBreakpoint(window.innerWidth);\n };\n\n private loadLottieAnimation = async () => {\n try {\n const lottie = await import('lottie-web');\n const animationData = await fetch(getAssetPath(`./assets/loader-redirect1.json`));\n const animationJson = await animationData.json();\n\n if (this.lottieContainer) {\n this.lottieAnimation = lottie.default.loadAnimation({\n container: this.lottieContainer,\n renderer: 'svg',\n loop: true,\n autoplay: true,\n animationData: animationJson,\n });\n } else {\n this.startLoaderAnimation();\n }\n } catch (error) {\n this.startLoaderAnimation();\n }\n };\n\n private startLoaderAnimation = () => {\n const duration = 3000;\n const interval = 50;\n const increment = (interval / duration) * 100;\n\n this.progressInterval = window.setInterval(() => {\n this.loaderProgress = Math.min(this.loaderProgress + increment, 100);\n if (this.loaderProgress >= 100) {\n this.stopLoaderAnimation();\n }\n }, interval);\n };\n\n private stopLoaderAnimation = () => {\n if (this.progressInterval) {\n clearInterval(this.progressInterval);\n this.progressInterval = undefined;\n }\n if (this.lottieAnimation) {\n this.lottieAnimation.destroy();\n this.lottieAnimation = undefined;\n }\n };\n\n private handleDownloadReceipt = async () => {\n try {\n await PDFGenerator.generateAndDownloadReceipt({\n paymentMethod:\n this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD\n ? this.textPaymentMethodCard()\n : this.paymentMethodName,\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && { bank: this.bank }),\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && {\n cardBrand: this.applyStartCaseToBrand(renewalState.data.cardInformation?.brand || ''),\n }),\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && {\n cardLastFour: this.cardLastFour ?? renewalState.data.cardInformation?.lastFour,\n }),\n paymentDate:\n formatDateTime(this.getPaymentDate()) || formatDateTime(new Date().toISOString()),\n email: renewalState.data.subscription.customerEmail || '',\n referenceNumber: this.referenceNumber,\n productTitle: renewalState.data.subscription.name[0]?.text || 'Subscription',\n subtotal: formatAmount(\n renewalState.data.subscription.subTotalAmount,\n renewalState.data.price.currency as any,\n ),\n total: formatAmount(\n renewalState.data.price.amount,\n renewalState.data.price.currency as any,\n ),\n currency: (renewalState.data.price.currency as any) || ' ',\n ...(this.getDiscountAmountValue() > 0 && {\n discountAmount: formatAmount(\n this.getDiscountAmountValue(),\n renewalState.data.price.currency as any,\n ),\n }),\n trialPeriodDays: this.trialPeriodDays,\n debitDay: this.debitDay,\n planAmount: formatAmount(this.planAmount, renewalState.data.price.currency as any),\n isBankTransfer: this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER,\n });\n } catch (error) {\n console.error('Error downloading receipt:', error);\n }\n };\n\n private getDiscountAmountValue = () => {\n if (renewalState?.data?.price?.amount < renewalState?.data?.subscription?.subTotalAmount) {\n return renewalState?.data?.subscription?.subTotalAmount - renewalState?.data?.price?.amount;\n }\n return 0;\n };\n\n hasDiscount = () => {\n return this.getDiscountAmountValue() > 0;\n };\n\n private textPaymentMethodCard = () => {\n const cardBrand = renewalState.data?.cardInformation?.brand;\n const cardLastFour = this.cardLastFour || renewalState.data?.cardInformation?.lastFour;\n\n const formattedBrand = this.applyStartCaseToBrand(cardBrand || '');\n return cardBrand && cardLastFour ? `${formattedBrand} - ${cardLastFour}` : formattedBrand;\n };\n\n render() {\n return (\n <rebill-checkout-single-column>\n <div class=\"renewal-success-page__success-content\">\n <rebill-typography variant=\"h3\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.successTitle')}\n </rebill-typography>\n\n <div class=\"renewal-success-page__success-icon\">\n <svg\n width={isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96'}\n height={isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96'}\n viewBox=\"0 0 96 96\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n 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\"\n fill=\"#35B093\"\n />\n </svg>\n </div>\n\n {/* Payment Details Card */}\n <div class=\"renewal-success-page__info-card\">\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentMethod')}\n </rebill-typography>\n <div class=\"renewal-success-page__card-value\">\n <div class=\"renewal-success-page__payment-method-display\">\n {this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && (\n <>\n <rebill-card-icon\n card-brand={renewalState.data?.cardInformation?.brand || ''}\n />\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.textPaymentMethodCard()}\n </rebill-typography>\n </>\n )}\n {this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && (\n <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>\n <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>\n {this.getPaymentMethodConfig(PAYMENT_METHOD_ENUM.BANK_TRANSFER).icons.map(\n iconName => {\n return <rebill-icon name={iconName} size=\"24px\" />;\n },\n )}\n </div>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('paymentMethods.bank_transfer')}\n </rebill-typography>\n </div>\n )}\n </div>\n </div>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentDate')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatDateTime(this.paymentDate || this.getPaymentDate()) || ''}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentEmail')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {renewalState.data.subscription.customerEmail}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentReference')}\n </rebill-typography>\n <rebill-typography\n variant=\"body2\"\n color={COLORS_ENUM.PRIMARY_DARK_TEXT}\n class=\"renewal-success-page__reference-number\"\n >\n {this.referenceNumber || ''}\n </rebill-typography>\n </div>\n </div>\n\n {/* Purchase Details Card */}\n <div class=\"renewal-success-page__info-card\">\n <rebill-typography variant=\"subtitle-bold\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.purchaseDetails')}\n </rebill-typography>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseDetail')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {renewalState.data.subscription.name[0]?.text || 'Subscription'}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseSubtotal')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatAmount(\n renewalState.data.subscription.subTotalAmount,\n renewalState.data.price.currency as any,\n )}\n </rebill-typography>\n </div>\n {this.hasDiscount() && (\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('summary.discount')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatAmount(\n this.getDiscountAmountValue(),\n renewalState.data.price.currency as any,\n )}\n </rebill-typography>\n </div>\n )}\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseMontoTotal')}\n </rebill-typography>\n <div class=\"renewal-success-page__total-amount-container\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatAmount(\n renewalState.data.price.amount,\n renewalState.data.price.currency as any,\n )}\n </rebill-typography>\n </div>\n </div>\n <div class=\"renewal-success-page__card-divider\"></div>\n <div class=\"renewal-success-page__download-container\">\n <svg\n class=\"download-icon\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <rebill-button\n type=\"button\"\n variant=\"download\"\n size=\"small\"\n onClick={this.handleDownloadReceipt}\n >\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.download')}\n </rebill-typography>\n </rebill-button>\n </div>\n\n {/* Contact Info */}\n <div class=\"renewal-success-page__contact-info\">\n <rebill-typography variant=\"information-text\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.downloadDescription')}\n </rebill-typography>\n </div>\n </div>\n </div>\n </rebill-checkout-single-column>\n );\n }\n}\n",".wrapper {\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.header {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n}\n.title {\n font-size: 1rem;\n font-weight: 500;\n color: var(--rebill-color-primary-dark-text);\n text-align: center;\n}\n\n.amount {\n font-size: 2.25rem;\n font-weight: 500;\n color: var(--rebill-color-primary-dark-text);\n margin: 0 0 1.5rem 0;\n text-align: center;\n line-height: 1.1;\n}\n\n.per {\n font-size: 1.1rem;\n font-weight: 400;\n color: var(--rebill-color-text-secondary);\n}\n\n.label-muted {\n font-size: 1rem;\n color: var(--rebill-color-primary-dark);\n margin: 0 0 1.5rem 0;\n text-align: center;\n}\n\n.info {\n width: 100%;\n margin-top: 1.5rem;\n margin-bottom: 3rem;\n display: flex;\n flex-direction: column;\n gap: 1.4rem;\n}\n\n.row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 1rem;\n line-height: 1.4;\n width: 100%;\n}\n\n.left {\n color: var(--rebill-color-text-secondary);\n font-weight: 400;\n}\n\n.right {\n color: var(--rebill-color-primary-dark-text);\n font-weight: 400;\n text-align: right;\n}\n\n.divider {\n border: none;\n border-top: 1px solid var(--rebill-color-border);\n margin: 1rem 0;\n}\n\n@media (max-width: 1024px) {\n .amount {\n margin-bottom: 0;\n }\n .row {\n font-size: 0.9rem;\n }\n .row:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n .left {\n color: var(--rebill-color-primary-dark-text);\n }\n}\n\n.total-row {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 1.1rem;\n font-weight: 600;\n}\n\n.total-row .left {\n color: var(--rebill-color-primary-dark-text);\n}\n","import { Component, h, Prop, State } from '@stencil/core';\nimport i18n from '../../../i18n/i18n.config';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { sessionState } from '../../../store/session.store';\nimport { formatAmount } from '../../../utils/currency-formatter';\nimport { formatDate as formatDateByLocale } from '../../../utils/date-formatter';\n\n@Component({\n tag: 'renewal-summary',\n styleUrl: 'renewal-summary.css',\n shadow: false,\n})\nexport class RenewalSummary {\n @State() private forceUpdate = 0;\n @Prop() displayedComponents: ('header' | 'details' | 'summary')[] = [\n 'header',\n 'details',\n 'summary',\n ];\n @Prop() totalAmount!: number;\n @Prop() subTotalAmount!: number;\n @Prop() subscriptionTitle!: string;\n @Prop() subscriptionAmount!: number;\n @Prop() nextChargeDate?: string;\n @Prop() frequency?: { count: number; period: string };\n @Prop() currency: string;\n @Prop() couponCode?: string;\n @Prop() discountAmount?: number;\n @Prop() discountPercentage?: number;\n\n componentWillLoad() {\n i18n.on('languageChanged', this.handleLanguageChange);\n }\n\n disconnectedCallback() {\n i18n.off('languageChanged', this.handleLanguageChange);\n }\n\n private handleLanguageChange = () => {\n this.forceUpdate = this.forceUpdate + 1;\n };\n\n private getFrequencyText(): string {\n if (!this.frequency || !this.frequency.period) return '';\n\n const period = this.frequency.period.toLowerCase();\n const count = this.frequency.count;\n\n const translationKey = `summary.${period}`;\n return I18nService.translate(translationKey, { count });\n }\n\n private getDiscountAmount(): number {\n if (this.totalAmount < this.subTotalAmount) {\n return this.subTotalAmount - this.totalAmount;\n }\n\n return this.discountAmount || 0;\n }\n\n renderHeader = () => {\n return (\n <div class=\"header\">\n <p class=\"title\">{I18nService.translate('renewal.title')}</p>\n <p class=\"amount\">\n <span class=\"total-amount\">{formatAmount(this.totalAmount, this.currency)}</span>{' '}\n <span class=\"per\">/ {this.getFrequencyText().toLowerCase()}</span>\n </p>\n </div>\n );\n };\n\n renderInfoRow = (label: string, value: string) => {\n return (\n <div class=\"row\">\n <div class=\"left\">{label}</div>\n <div class=\"right\">{value}</div>\n </div>\n );\n };\n\n renderProduct = () => {\n return this.renderInfoRow(\n this.subscriptionTitle,\n formatAmount(this.subscriptionAmount, this.currency),\n );\n };\n\n renderNextRenewal = () => {\n return this.renderInfoRow(\n I18nService.translate('renewal.nextRenewal'),\n formatDateByLocale(this.nextChargeDate, undefined, sessionState.currentLocale),\n );\n };\n\n renderSubtotal = () => {\n return this.renderInfoRow(\n I18nService.translate('renewal.subtotal'),\n formatAmount(this.subTotalAmount, this.currency),\n );\n };\n\n private renderDiscount = () => {\n if (this.getDiscountAmount() <= 0) return null;\n return (\n <div class=\"row\">\n <div class=\"left\">{I18nService.translate('summary.discount')}</div>\n <div class=\"right discount-chip-wrapper\">\n <discount-coupon\n displayMode=\"readonly\"\n readonlyCouponCode={this.couponCode || undefined}\n readonlyDiscountAmount={this.getDiscountAmount()}\n readonlyCurrency={this.currency}\n />\n </div>\n </div>\n );\n };\n\n renderTotal = () => {\n return (\n <div class=\"total-row\">\n <div class=\"left\">{I18nService.translate('renewal.totalToRenew')}</div>\n <div class=\"right\">{formatAmount(this.totalAmount, this.currency)}</div>\n </div>\n );\n };\n\n renderDesktop = () => {\n return (\n <div class=\"wrapper\">\n {this.renderHeader()}\n <div class=\"info\">\n <div class=\"row\">\n <div class=\"\">{I18nService.translate('renewal.subscriptionDetails')}</div>\n </div>\n {this.renderProduct()}\n {this.renderNextRenewal()}\n {this.renderSubtotal()}\n {this.renderDiscount()}\n </div>\n\n {this.renderTotal()}\n </div>\n );\n };\n\n render() {\n if (\n this.displayedComponents.includes('header') &&\n this.displayedComponents.includes('details') &&\n this.displayedComponents.includes('summary')\n ) {\n return this.renderDesktop();\n }\n if (this.displayedComponents.includes('header')) {\n return this.renderHeader();\n }\n if (this.displayedComponents.includes('details')) {\n return (\n <collapsible-card header={I18nService.translate('summary.details')}>\n {this.renderProduct()}\n {this.renderNextRenewal()}\n </collapsible-card>\n );\n }\n if (this.displayedComponents.includes('summary')) {\n return (\n <collapsible-card header={I18nService.translate('summary.summary')}>\n {this.renderInfoRow(\n this.subscriptionTitle,\n '1 x ' + formatAmount(this.subscriptionAmount, this.currency),\n )}\n {this.renderSubtotal()}\n {this.renderDiscount()}\n\n <rebill-divider />\n {this.renderInfoRow(\n I18nService.translate('renewal.totalToRenew'),\n formatAmount(this.totalAmount, this.currency),\n )}\n </collapsible-card>\n );\n }\n }\n}\n"],"names":["i18n","formatDateByLocale","sessionState"],"mappings":";;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,u3HAAu3H;;MCgBx4H,kBAAkB,GAAA,MAAA;;;;;AACrB,IAAA,iBAAiB,GAAwB,mBAAmB,CAAC,IAAI;IACjE,OAAO,GAAY,EAAE;IACrB,IAAI,GAAY,EAAE;IAClB,iBAAiB,GAAY,EAAE;IAC/B,YAAY,GAAY,EAAE;IAC1B,WAAW,GAAW,EAAE;IACxB,eAAe,GAAW,EAAE;IAC5B,eAAe,GAAY,CAAC;IAC5B,QAAQ,GAAY,CAAC;IACrB,UAAU,GAAY,CAAC;IACtB,aAAa,GAAW,IAAI;AAC5B,IAAA,UAAU,GAAoB,eAAe,CAAC,OAAO;AAErD,IAAA,eAAe;IACf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  if (this.totalAmount < this.subTotalAmount) {
250
- console.log('this.subTotalAmount', this.subTotalAmount);
251
- console.log('this.totalAmount', this.totalAmount);
252
- console.log('this.discountAmount', this.subTotalAmount - this.totalAmount);
253
250
  return this.subTotalAmount - this.totalAmount;
254
251
  }
255
252
  return this.discountAmount || 0;
@@ -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-DkbFAMha.js";import{r as n}from"./p-BOVs95c7.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 y}from"./p-Catt3XCa.js";import{f as g,a as u}from"./p--EE-bffI.js";import"./p-E-ZsRS8r.js";import"./p-C5OYI4I6.js";const m=":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 y.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:g(this.getPaymentDate())||g((new Date).toISOString()),email:n.data.subscription.customerEmail||"",referenceNumber:this.referenceNumber,productTitle:n.data.subscription.name[0]?.text||"Subscription",subtotal:o(n.data.subscription.subTotalAmount,n.data.price.currency),total:o(n.data.price.amount,n.data.price.currency),currency:n.data.price.currency||" ",...this.getDiscountAmountValue()>0&&{discountAmount:o(this.getDiscountAmountValue(),n.data.price.currency)},trialPeriodDays:this.trialPeriodDays,debitDay:this.debitDay,planAmount:o(this.planAmount,n.data.price.currency),isBankTransfer:this.typePaymentMethod===i.BANK_TRANSFER})}catch(e){console.error("Error downloading receipt:",e)}};getDiscountAmountValue=()=>{if(n?.data?.price?.amount<n?.data?.subscription?.subTotalAmount){return n?.data?.subscription?.subTotalAmount-n?.data?.price?.amount}return 0};hasDiscount=()=>this.getDiscountAmountValue()>0;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:"cb90cb24d93fb4245e4eaf3cdeeab4e278b2c546"},t("div",{key:"20e031f6307df3ffeceb32ff4bf1337ac54ad098",class:"renewal-success-page__success-content"},t("rebill-typography",{key:"199431628bf2461d82397f04146f5f830d5ed88f",variant:"h3",color:f.PRIMARY_DARK_TEXT},s.translate("processing.successTitle")),t("div",{key:"761a4e40d5b1653a3cd3e9b667027025b19dacf0",class:"renewal-success-page__success-icon"},t("svg",{key:"35c1f8a00382da91c35813c086a13236ef64d150",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:"eba561010f527546317c5a5368364e3b7d88a8d8","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:"82ac13c8d26f7ac58c28e8b49518abe140749561",class:"renewal-success-page__info-card"},t("div",{key:"0b1c283d679bf968265a23b67fd8821c9a1a57db",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"ca1a8d98b07b2a681cf630f09d047a0c60063be6",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentMethod")),t("div",{key:"4449bcb86cddf6316f570bad14b240f3e328ae99",class:"renewal-success-page__card-value"},t("div",{key:"4858d10857b00244122145864cc92906abdcd24a",class:"renewal-success-page__payment-method-display"},this.typePaymentMethod===i.CARD&&t(t.Fragment,null,t("rebill-card-icon",{key:"b64cfc5c69e3c0627f361650f039e06329c9004e","card-brand":n.data?.cardInformation?.brand||""}),t("rebill-typography",{key:"7ef5fc2219158df995dfbcab3ecd35291ce6d1eb",variant:"body2",color:f.PRIMARY_DARK_TEXT},this.textPaymentMethodCard())),this.typePaymentMethod===i.BANK_TRANSFER&&t("div",{key:"9759c64a9ca925f6ad3ebe5be536451a2e7b8e9c",style:{display:"flex",alignItems:"center",gap:"8px"}},t("div",{key:"9b8b9987a82403e24f355fd68ca625d5ac6be0d0",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:"b830a51f477da38f4fad6d861d56d8473eedc1e0",variant:"body2",color:f.PRIMARY_DARK_TEXT},s.translate("paymentMethods.bank_transfer")))))),t("div",{key:"9f336dc44b09b227dca8d55f7543af8d6965340e",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"54487e54a1d044044748d39e838f0bcedc1806db",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentDate")),t("rebill-typography",{key:"f90cb87eaad022c8e4e8a7fd50b6efc98e96e5fb",variant:"body2",color:f.PRIMARY_DARK_TEXT},g(this.paymentDate||this.getPaymentDate())||"")),t("div",{key:"4f5dd152b68e4bf8f09929fc459204c9c9316c7d",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"977d12ffd4f81822f16e040f36380354569a38ee",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentEmail")),t("rebill-typography",{key:"62e10631ec66d641f7c2a2e18aecd583d14d51d1",variant:"body2",color:f.PRIMARY_DARK_TEXT},n.data.subscription.customerEmail)),t("div",{key:"ef143339c11f42d47d5c29dcb77f432a6ab522ab",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"d7f341310f59a3f15a112cdcd393f60dd762f742",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentReference")),t("rebill-typography",{key:"06c82cbdede33d774212a283229e51a27de9526f",variant:"body2",color:f.PRIMARY_DARK_TEXT,class:"renewal-success-page__reference-number"},this.referenceNumber||""))),t("div",{key:"6e1dc249302831b6d86174d69c766d4149e532d0",class:"renewal-success-page__info-card"},t("rebill-typography",{key:"b9c21efa101829c13f8cc13518c55769fdf2f210",variant:"subtitle-bold",color:f.PRIMARY_DARK_TEXT},s.translate("processing.purchaseDetails")),t("div",{key:"28d67a7e5b44c05d5c4d795c0293c841ee5b220f",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"907bb77f52600cff2d1cfd9cc66653d5a62f1d8a",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseDetail")),t("rebill-typography",{key:"ae917b6621a7e550793f363f64854cccc9c676c5",variant:"body2",color:f.PRIMARY_DARK_TEXT},n.data.subscription.name[0]?.text||"Subscription")),t("div",{key:"5aee63e2757c447c31a554563bc3bfe4442e9727",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"dfd32d9e61e6671ae0ccd7204efc0dc957ce6f5f",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseSubtotal")),t("rebill-typography",{key:"60d4e2c5d2a9907c7676692f123b9ac809726636",variant:"body2",color:f.PRIMARY_DARK_TEXT},o(n.data.subscription.subTotalAmount,n.data.price.currency))),this.hasDiscount()&&t("div",{key:"c2b4d3539da9811e82e14f00e40995813642e281",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"4cc407db9e8654592ac8961793ac16c5c8bdc650",variant:"body2",color:f.SECONDARY},s.translate("summary.discount")),t("rebill-typography",{key:"8767ff24390fd66f61a3007ec5c89b23f4d15708",variant:"body2",color:f.PRIMARY_DARK_TEXT},o(this.getDiscountAmountValue(),n.data.price.currency))),t("div",{key:"6f58d05abb853a328a91bfb773f2efbb46ddf766",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"1b07af9baa275addf2270e9ebb652021ba3af2ad",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseMontoTotal")),t("div",{key:"01c846178f5a87baf3cebe47f373e93b415fd9fb",class:"renewal-success-page__total-amount-container"},t("rebill-typography",{key:"570f795573812b983aacd716fc95892c16ddb66f",variant:"body2",color:f.PRIMARY_DARK_TEXT},o(n.data.price.amount,n.data.price.currency)))),t("div",{key:"101e06be84246481dd7fb120b4e64df6656382e7",class:"renewal-success-page__card-divider"}),t("div",{key:"bad8e69d95ee7befdb613246328ff6ef9556cf9d",class:"renewal-success-page__download-container"},t("svg",{key:"97b4a2ac69de811ce0881b577cd0c3bc39e13c14",class:"download-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"31afab13c012655e05413f5cf15d2545b3ac835e",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:"335a6328a75c0474ff6983bc0c3be5f8fdd62033",type:"button",variant:"download",size:"small",onClick:this.handleDownloadReceipt},t("rebill-typography",{key:"9d5427cb68781fe7b8202639ea9ef8f0fc13c6ed",variant:"overline",color:f.PRIMARY_DARK_TEXT},s.translate("processing.download")))),t("div",{key:"1fba619b28bac4f85e2f00a7a227c91a4352f9b7",class:"renewal-success-page__contact-info"},t("rebill-typography",{key:"942aee63c06bc040ea304545ddf0dfc64235102a",variant:"information-text",color:f.SECONDARY},s.translate("processing.downloadDescription"))))))}};w.style=m;const k=".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 v=class{constructor(a){e(this,a)}forceUpdate=0;displayedComponents=["header","details","summary"];totalAmount;subTotalAmount;subscriptionTitle;subscriptionAmount;nextChargeDate;frequency;currency;couponCode;discountAmount;discountPercentage;componentWillLoad(){c.on("languageChanged",this.handleLanguageChange)}disconnectedCallback(){c.off("languageChanged",this.handleLanguageChange)}handleLanguageChange=()=>{this.forceUpdate=this.forceUpdate+1};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})}getDiscountAmount(){if(this.totalAmount<this.subTotalAmount){console.log("this.subTotalAmount",this.subTotalAmount);console.log("this.totalAmount",this.totalAmount);console.log("this.discountAmount",this.subTotalAmount-this.totalAmount);return this.subTotalAmount-this.totalAmount}return this.discountAmount||0}renderHeader=()=>t("div",{class:"header"},t("p",{class:"title"},s.translate("renewal.title")),t("p",{class:"amount"},t("span",{class:"total-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"),u(this.nextChargeDate,undefined,l.currentLocale));renderSubtotal=()=>this.renderInfoRow(s.translate("renewal.subtotal"),o(this.subTotalAmount,this.currency));renderDiscount=()=>{if(this.getDiscountAmount()<=0)return null;return t("div",{class:"row"},t("div",{class:"left"},s.translate("summary.discount")),t("div",{class:"right discount-chip-wrapper"},t("discount-coupon",{displayMode:"readonly",readonlyCouponCode:this.couponCode||undefined,readonlyDiscountAmount:this.getDiscountAmount(),readonlyCurrency: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.renderDiscount()),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(),this.renderDiscount(),t("rebill-divider",null),this.renderInfoRow(s.translate("renewal.totalToRenew"),o(this.totalAmount,this.currency)))}}};v.style=k;export{w as renewal_success_page,v as renewal_summary};
2
- //# sourceMappingURL=p-bde8f6aa.entry.js.map
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-DkbFAMha.js";import{r as n}from"./p-BOVs95c7.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 y}from"./p-Catt3XCa.js";import{f as g,a as u}from"./p--EE-bffI.js";import"./p-E-ZsRS8r.js";import"./p-C5OYI4I6.js";const m=":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 y.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:g(this.getPaymentDate())||g((new Date).toISOString()),email:n.data.subscription.customerEmail||"",referenceNumber:this.referenceNumber,productTitle:n.data.subscription.name[0]?.text||"Subscription",subtotal:o(n.data.subscription.subTotalAmount,n.data.price.currency),total:o(n.data.price.amount,n.data.price.currency),currency:n.data.price.currency||" ",...this.getDiscountAmountValue()>0&&{discountAmount:o(this.getDiscountAmountValue(),n.data.price.currency)},trialPeriodDays:this.trialPeriodDays,debitDay:this.debitDay,planAmount:o(this.planAmount,n.data.price.currency),isBankTransfer:this.typePaymentMethod===i.BANK_TRANSFER})}catch(e){console.error("Error downloading receipt:",e)}};getDiscountAmountValue=()=>{if(n?.data?.price?.amount<n?.data?.subscription?.subTotalAmount){return n?.data?.subscription?.subTotalAmount-n?.data?.price?.amount}return 0};hasDiscount=()=>this.getDiscountAmountValue()>0;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:"cb90cb24d93fb4245e4eaf3cdeeab4e278b2c546"},t("div",{key:"20e031f6307df3ffeceb32ff4bf1337ac54ad098",class:"renewal-success-page__success-content"},t("rebill-typography",{key:"199431628bf2461d82397f04146f5f830d5ed88f",variant:"h3",color:f.PRIMARY_DARK_TEXT},s.translate("processing.successTitle")),t("div",{key:"761a4e40d5b1653a3cd3e9b667027025b19dacf0",class:"renewal-success-page__success-icon"},t("svg",{key:"35c1f8a00382da91c35813c086a13236ef64d150",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:"eba561010f527546317c5a5368364e3b7d88a8d8","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:"82ac13c8d26f7ac58c28e8b49518abe140749561",class:"renewal-success-page__info-card"},t("div",{key:"0b1c283d679bf968265a23b67fd8821c9a1a57db",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"ca1a8d98b07b2a681cf630f09d047a0c60063be6",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentMethod")),t("div",{key:"4449bcb86cddf6316f570bad14b240f3e328ae99",class:"renewal-success-page__card-value"},t("div",{key:"4858d10857b00244122145864cc92906abdcd24a",class:"renewal-success-page__payment-method-display"},this.typePaymentMethod===i.CARD&&t(t.Fragment,null,t("rebill-card-icon",{key:"b64cfc5c69e3c0627f361650f039e06329c9004e","card-brand":n.data?.cardInformation?.brand||""}),t("rebill-typography",{key:"7ef5fc2219158df995dfbcab3ecd35291ce6d1eb",variant:"body2",color:f.PRIMARY_DARK_TEXT},this.textPaymentMethodCard())),this.typePaymentMethod===i.BANK_TRANSFER&&t("div",{key:"9759c64a9ca925f6ad3ebe5be536451a2e7b8e9c",style:{display:"flex",alignItems:"center",gap:"8px"}},t("div",{key:"9b8b9987a82403e24f355fd68ca625d5ac6be0d0",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:"b830a51f477da38f4fad6d861d56d8473eedc1e0",variant:"body2",color:f.PRIMARY_DARK_TEXT},s.translate("paymentMethods.bank_transfer")))))),t("div",{key:"9f336dc44b09b227dca8d55f7543af8d6965340e",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"54487e54a1d044044748d39e838f0bcedc1806db",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentDate")),t("rebill-typography",{key:"f90cb87eaad022c8e4e8a7fd50b6efc98e96e5fb",variant:"body2",color:f.PRIMARY_DARK_TEXT},g(this.paymentDate||this.getPaymentDate())||"")),t("div",{key:"4f5dd152b68e4bf8f09929fc459204c9c9316c7d",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"977d12ffd4f81822f16e040f36380354569a38ee",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentEmail")),t("rebill-typography",{key:"62e10631ec66d641f7c2a2e18aecd583d14d51d1",variant:"body2",color:f.PRIMARY_DARK_TEXT},n.data.subscription.customerEmail)),t("div",{key:"ef143339c11f42d47d5c29dcb77f432a6ab522ab",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"d7f341310f59a3f15a112cdcd393f60dd762f742",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentReference")),t("rebill-typography",{key:"06c82cbdede33d774212a283229e51a27de9526f",variant:"body2",color:f.PRIMARY_DARK_TEXT,class:"renewal-success-page__reference-number"},this.referenceNumber||""))),t("div",{key:"6e1dc249302831b6d86174d69c766d4149e532d0",class:"renewal-success-page__info-card"},t("rebill-typography",{key:"b9c21efa101829c13f8cc13518c55769fdf2f210",variant:"subtitle-bold",color:f.PRIMARY_DARK_TEXT},s.translate("processing.purchaseDetails")),t("div",{key:"28d67a7e5b44c05d5c4d795c0293c841ee5b220f",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"907bb77f52600cff2d1cfd9cc66653d5a62f1d8a",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseDetail")),t("rebill-typography",{key:"ae917b6621a7e550793f363f64854cccc9c676c5",variant:"body2",color:f.PRIMARY_DARK_TEXT},n.data.subscription.name[0]?.text||"Subscription")),t("div",{key:"5aee63e2757c447c31a554563bc3bfe4442e9727",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"dfd32d9e61e6671ae0ccd7204efc0dc957ce6f5f",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseSubtotal")),t("rebill-typography",{key:"60d4e2c5d2a9907c7676692f123b9ac809726636",variant:"body2",color:f.PRIMARY_DARK_TEXT},o(n.data.subscription.subTotalAmount,n.data.price.currency))),this.hasDiscount()&&t("div",{key:"c2b4d3539da9811e82e14f00e40995813642e281",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"4cc407db9e8654592ac8961793ac16c5c8bdc650",variant:"body2",color:f.SECONDARY},s.translate("summary.discount")),t("rebill-typography",{key:"8767ff24390fd66f61a3007ec5c89b23f4d15708",variant:"body2",color:f.PRIMARY_DARK_TEXT},o(this.getDiscountAmountValue(),n.data.price.currency))),t("div",{key:"6f58d05abb853a328a91bfb773f2efbb46ddf766",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"1b07af9baa275addf2270e9ebb652021ba3af2ad",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseMontoTotal")),t("div",{key:"01c846178f5a87baf3cebe47f373e93b415fd9fb",class:"renewal-success-page__total-amount-container"},t("rebill-typography",{key:"570f795573812b983aacd716fc95892c16ddb66f",variant:"body2",color:f.PRIMARY_DARK_TEXT},o(n.data.price.amount,n.data.price.currency)))),t("div",{key:"101e06be84246481dd7fb120b4e64df6656382e7",class:"renewal-success-page__card-divider"}),t("div",{key:"bad8e69d95ee7befdb613246328ff6ef9556cf9d",class:"renewal-success-page__download-container"},t("svg",{key:"97b4a2ac69de811ce0881b577cd0c3bc39e13c14",class:"download-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"31afab13c012655e05413f5cf15d2545b3ac835e",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:"335a6328a75c0474ff6983bc0c3be5f8fdd62033",type:"button",variant:"download",size:"small",onClick:this.handleDownloadReceipt},t("rebill-typography",{key:"9d5427cb68781fe7b8202639ea9ef8f0fc13c6ed",variant:"overline",color:f.PRIMARY_DARK_TEXT},s.translate("processing.download")))),t("div",{key:"1fba619b28bac4f85e2f00a7a227c91a4352f9b7",class:"renewal-success-page__contact-info"},t("rebill-typography",{key:"942aee63c06bc040ea304545ddf0dfc64235102a",variant:"information-text",color:f.SECONDARY},s.translate("processing.downloadDescription"))))))}};w.style=m;const k=".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 v=class{constructor(a){e(this,a)}forceUpdate=0;displayedComponents=["header","details","summary"];totalAmount;subTotalAmount;subscriptionTitle;subscriptionAmount;nextChargeDate;frequency;currency;couponCode;discountAmount;discountPercentage;componentWillLoad(){c.on("languageChanged",this.handleLanguageChange)}disconnectedCallback(){c.off("languageChanged",this.handleLanguageChange)}handleLanguageChange=()=>{this.forceUpdate=this.forceUpdate+1};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})}getDiscountAmount(){if(this.totalAmount<this.subTotalAmount){return this.subTotalAmount-this.totalAmount}return this.discountAmount||0}renderHeader=()=>t("div",{class:"header"},t("p",{class:"title"},s.translate("renewal.title")),t("p",{class:"amount"},t("span",{class:"total-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"),u(this.nextChargeDate,undefined,l.currentLocale));renderSubtotal=()=>this.renderInfoRow(s.translate("renewal.subtotal"),o(this.subTotalAmount,this.currency));renderDiscount=()=>{if(this.getDiscountAmount()<=0)return null;return t("div",{class:"row"},t("div",{class:"left"},s.translate("summary.discount")),t("div",{class:"right discount-chip-wrapper"},t("discount-coupon",{displayMode:"readonly",readonlyCouponCode:this.couponCode||undefined,readonlyDiscountAmount:this.getDiscountAmount(),readonlyCurrency: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.renderDiscount()),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(),this.renderDiscount(),t("rebill-divider",null),this.renderInfoRow(s.translate("renewal.totalToRenew"),o(this.totalAmount,this.currency)))}}};v.style=k;export{w as renewal_success_page,v as renewal_summary};
2
+ //# sourceMappingURL=p-3a585ddc.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["registerInstance","createEvent","getAssetPath","h","PAYMENT_METHOD_ENUM","I18nService","formatAmount","instance","state","renewalState","BREAKPOINT_ENUM","getBreakpoint","isBreakpointBelow","COLORS_ENUM","getCountryPaymentMethods","PDFGenerator","formatDateTime","formatDate","renewalSuccessPageCss","RenewalSuccessPage","constructor","hostRef","this","successRedirect","typePaymentMethod","CARD","country","bank","paymentMethodName","cardLastFour","paymentDate","referenceNumber","trialPeriodDays","debitDay","planAmount","currentLocale","breakpoint","DESKTOP","loaderProgress","isLoadingLottie","showRedirectMessage","timeToRedirect","progressInterval","lottieContainer","lottieAnimation","successDisplayTimeout","applyStartCaseToBrand","brand","toLowerCase","split","map","word","charAt","toUpperCase","slice","join","getPaymentMethodConfig","method","countryPaymentMethods","countrySpecificMethod","find","pm","type","defaultConfigs","key","label","translate","icons","CASH","BANK_TRANSFER","defaultConfig","getPaymentDate","componentWillLoad","window","innerWidth","setTimeout","loadLottieAnimation","stopLoaderAnimation","componentDidLoad","addEventListener","handleResize","disconnectedCallback","clearTimeout","removeEventListener","async","lottie","import","then","n","l","animationData","fetch","animationJson","json","default","loadAnimation","container","renderer","loop","autoplay","startLoaderAnimation","error","duration","interval","increment","setInterval","Math","min","clearInterval","undefined","destroy","handleDownloadReceipt","generateAndDownloadReceipt","paymentMethod","textPaymentMethodCard","cardBrand","data","cardInformation","lastFour","Date","toISOString","email","subscription","customerEmail","productTitle","name","text","subtotal","subTotalAmount","price","currency","total","amount","getDiscountAmountValue","discountAmount","isBankTransfer","console","hasDiscount","formattedBrand","render","class","variant","color","PRIMARY_DARK_TEXT","width","height","viewBox","fill","xmlns","d","SECONDARY","Fragment","style","display","alignItems","gap","iconName","size","stroke","onClick","renewalSummaryCss","RenewalSummary","forceUpdate","displayedComponents","totalAmount","subscriptionTitle","subscriptionAmount","nextChargeDate","frequency","couponCode","discountPercentage","on","handleLanguageChange","off","getFrequencyText","period","count","translationKey","getDiscountAmount","renderHeader","renderInfoRow","value","renderProduct","renderNextRenewal","renderSubtotal","renderDiscount","displayMode","readonlyCouponCode","readonlyDiscountAmount","readonlyCurrency","renderTotal","renderDesktop","includes","header"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAkBC,OAAcC,MAAS,8BAChEC,OAA0BC,OAAkBC,OAAmBC,OAAeC,MA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yI,MAAO,QAAUzI,EAAE,MAAO,CAAEyI,MAAO,OAASzI,EAAE,MAAO,CAAEyI,MAAO,IAAMvI,EAAY6D,UAAU,iCAAkC5C,KAAKgK,gBAAiBhK,KAAKiK,oBAAqBjK,KAAKkK,iBAAkBlK,KAAKmK,kBAAmBnK,KAAKwK,eAE3S,MAAAnD,GACI,GAAIrH,KAAK6I,oBAAoB6B,SAAS,WAClC1K,KAAK6I,oBAAoB6B,SAAS,YAClC1K,KAAK6I,oBAAoB6B,SAAS,WAAY,CAC9C,OAAO1K,KAAKyK,eAChB,CACA,GAAIzK,KAAK6I,oBAAoB6B,SAAS,UAAW,CAC7C,OAAO1K,KAAK6J,cAChB,CACA,GAAI7J,KAAK6I,oBAAoB6B,SAAS,WAAY,CAC9C,OAAQ7L,EAAE,mBAAoB,CAAE8L,OAAQ5L,EAAY6D,UAAU,oBAAsB5C,KAAKgK,gBAAiBhK,KAAKiK,oBACnH,CACA,GAAIjK,KAAK6I,oBAAoB6B,SAAS,WAAY,CAC9C,OAAQ7L,EAAE,mBAAoB,CAAE8L,OAAQ5L,EAAY6D,UAAU,oBAAsB5C,KAAK8J,cAAc9J,KAAK+I,kBAAmB,OAAS/J,EAAagB,KAAKgJ,mBAAoBhJ,KAAK4G,WAAY5G,KAAKkK,iBAAkBlK,KAAKmK,iBAAkBtL,EAAE,iBAAkB,MAAOmB,KAAK8J,cAAc/K,EAAY6D,UAAU,wBAAyB5D,EAAagB,KAAK8I,YAAa9I,KAAK4G,WAClX,CACJ,GAEJ+B,EAAeT,MAAQQ,SAEd7I,0BAA4C8I","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as e}from"./p-D8cwEAmw.js";import{c as s}from"./p-MMCcKmy_.js";import{a as n}from"./p-CTo1s54i.js";import{m as a,g as o,P as r,C as l,i as c,a as h,b as d}from"./p-DDA1jPBc.js";import{s as u,S as m,I as p,a as f,i as y,P as b,o as g,b as w}from"./p-DkbFAMha.js";import{S as k}from"./p-vsLqF4hk.js";import{B as x,g as v,i as C}from"./p-Do_vNuMa.js";import{P as I,G as P}from"./p-CrUPzbxi.js";import"./p-E-ZsRS8r.js";import"./p-D339jHg4.js";const S={checkoutSummary:true,submitButton:true,billingAddress:true,customerInformation:true,discountCode:true,logo:true,footer:true,sandboxMode:true,processingPayment:true,successPage:true,errorMessage:true};var M;(function(t){t["BAMBOO"]="bamboo_payment";t["FISERV"]="fiserv";t["KUSHKI"]="kushki";t["PAYWAY"]="payway";t["DOCK"]="dock";t["KLAP"]="klap";t["MOVII"]="movii";t["STRIPE"]="stripe";t["DECIDIR"]="decidir"})(M||(M={}));const N=async(t,i,e)=>{const s=await n.checkout.getRequiredFields({currency:t,method:i},e);return{fields:a(s.data),original:s.data}};const j=async()=>{const t=u.data?.itemInformation?.paymentMethods;const i=t.map((async t=>{try{const i=I.mapToAPMPaymentMethod(t,u.data?.pricing?.country);const e=await N(u.data.pricing.currency,i,u.data.organization.id);return{paymentMethod:t,...e}}catch(i){console.error(`Error getting required fields for ${t}:`,i);return{paymentMethod:t,fields:[],original:[]}}}));const e=await Promise.all(i);const s={};e.forEach((t=>{s[t.paymentMethod]={fields:t.fields,original:t.original}}));return s};const D=(t,i)=>{const e=i[t];if(e){return e}else{return{fields:[],original:[]}}};const R=t=>typeof t==="string"?JSON.parse(t):t;const T=t=>R(t);const z=()=>"190.188.127.250";const A=async({publicKey:t,instantProduct:i,instantPlan:e})=>{const s=R(i?i:e);const a=await n.sessions.createSDKInstantSessionRequest(s,o(),z(),t);const r={...a.data,...a.data.plan&&{plan:{...a.data.plan,description:s.description||[]}},...a.data.product&&{product:{...a.data.product,description:s.description||[]}}};const l=r;return l};const q=async({publicKey:t,productId:i,planId:e})=>{const s=await n.sessions.createSDKItemSessionRequest({...i?{productId:i}:{},...e?{planId:e}:{},idempotencyKey:o(),deviceId:"123123123",clientIP:z(),publicKey:t});const a=s.data;return a};const E=async({publicKey:t,checkoutLandingSession:i,instantProduct:e,instantPlan:s,productId:n,planId:a})=>{if(i){const t=await T(i);return{session:t,type:m.CHECKOUT_LANDING}}if(e||s){const i=await A({publicKey:t,instantProduct:e,instantPlan:s});return{session:i,type:m.INSTANT}}if(n||a){const i=await q({publicKey:t,productId:n,planId:a});return{session:i,type:m.SDK_ITEM}}};const F="@media (max-width: 1024px){.rebill-checkout{width:100%;flex-direction:column;gap:0;justify-content:flex-start;background:var(--rebill-color-background);padding:20px}.right-section-checkout .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%}.otp-container{display:flex;flex-direction:column;justify-content:flex-start;gap:24px}.rebill-checkout.full-width-layout .left-section{width:100%}.rebill-checkout.full-width-layout .left-section-container{max-width:none;width:100%}}@media (min-width: 1025px){.rebill-checkout{width:100%;min-height:600px;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-checkout{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;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%}.rebill-checkout.full-width-layout .left-section{width:100%;justify-content:stretch}.rebill-checkout.full-width-layout .left-section-container{max-width:none;min-width:auto;width:100%;margin:2.5rem 2rem 1.5rem 2rem}.pac-container{border-radius:4px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border:1px solid #e0e0e0;margin-top:4px;font-family:inherit}.pac-item{padding:10px 12px;cursor:pointer;border-top:none}.pac-item:first-child{border-top:none}.pac-item:hover{background-color:#f5f5f5}.pac-item-query{font-weight:500}.pac-icon{display:none}}.payment-button-container{display:flex;flex-direction:column;gap:16px;margin-bottom:16px}.animated-component{transition:all 0.3s ease-in-out;overflow:visible}.fade-in{animation:fadeIn 0.4s ease-in-out}.slide-in{animation:slideIn 0.5s ease-out}@keyframes fadeIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes slideIn{from{opacity:0;transform:translateX(-20px);max-height:0}to{opacity:1;transform:translateX(0);max-height:450px}}.animated-component.hide{animation:fadeOut 0.3s ease-in-out forwards}@keyframes fadeOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(20px)}}rebill-mode-sandbox{position:fixed;bottom:50px;left:50%;transform:translateX(-50%);z-index:1000}@media (max-width: 1024px){rebill-test-mode-chip{bottom:46px}}@media (min-width: 1025px){rebill-test-mode-chip{bottom:46px}}.mode-sandbox-mobile-container{display:flex;align-items:center;width:100%;padding:0;margin:0;box-sizing:border-box}@media (min-width: 1451px){.left-section-container{min-width:450px;margin:2.5rem 5rem 1.5rem 5rem}.checkout-summary-section{min-width:450px;margin:0rem 5rem}}";const O=class{constructor(e){t(this,e);this.error=i(this,"error");this.success=i(this,"success");this.successRedirect=i(this,"successRedirect");this.formChange=i(this,"formChange");this.paymentMethodSelected=i(this,"paymentMethodSelected")}productId;planId;publicKey;instantProduct;instantPlan;display;customerInformation;oneClickCheckout=true;css;language;async handleLanguageChange(t,i){if(t&&t!==i){try{await p.changeLanguage(t);f.changeLanguage(t);console.log(`[RebillCheckout] Language changed from ${i} to ${t}`)}catch(t){console.error("[RebillCheckout] Failed to change language:",t)}}}error;success;successRedirect;formChange;checkoutLandingSession;externalPayment;rejectedPaymentCard=false;rejectedPaymentAPM=false;countries=[];currentPaymentMethod;checkoutResponse=null;isSubmitting=false;isCardSubmitting=false;isCardSuccess=false;isAPMSubmitting=false;isAPMSuccess=false;storedCheckoutResults=new Map;alertErrorKeys=null;currentApmPaymentMethod=null;breakpoint=x.DESKTOP;showRefreshModal=false;cardError={showCardInvalid:false,type:null};initialData={};allRequiredFields={};currentRequiredFields=[];customerExists=false;showOtp=false;otpVerified=false;responseCheckoutCard=null;cardMode=null;formElement;emailDebounceTimeout=null;injectedStyleElement=null;get displayConfig(){if(!this.display){return S}if(typeof this.display==="string"){try{const t=JSON.parse(this.display);return{...S,...t}}catch(t){console.warn("Invalid display configuration string, using defaults:",t);return S}}return{...S,...this.display}}get parsedCustomerInformation(){if(!this.customerInformation){return null}if(typeof this.customerInformation==="string"){try{return JSON.parse(this.customerInformation)}catch(t){console.warn("Invalid customerInformation configuration string, ignoring:",t);return null}}return this.customerInformation}get filteredPaymentMethods(){const t=u.data?.itemInformation?.paymentMethods||[];const i=this.displayConfig.excludePaymentMethods;if(!i||i.length===0){return t}return t.filter((t=>!i.includes(t)))}getCombinedUserData(t={}){const i=u.data.userInformation;const e=this.parsedCustomerInformation;return{email:t?.email||e?.email||i.email,fullName:t?.fullName||e?.fullName||i.fullName,countryCodePhoneNumber:t?.countryCodePhoneNumber||e?.phoneNumber?.countryCode||e?.countryCode||i.countryCode,phoneNumber:t?.phoneNumber||e?.phoneNumber?.number||i.phoneNumber,documentType:t?.documentType||e?.documentType||i.documentType,documentNumber:t?.documentNumber||e?.documentNumber||i.documentNumber,"billing-country":t?.["billing-country"]||e?.address?.billingAddress?.country||i.address?.billingAddress?.country,"billing-state":t?.["billing-state"]||e?.address?.billingAddress?.state||i.address?.billingAddress?.state,"billing-address":t?.["billing-address"]||e?.address?.billingAddress?.address||i.address?.billingAddress?.address,"billing-city":t?.["billing-city"]||e?.address?.billingAddress?.city||i.address?.billingAddress?.city,"billing-zip":t?.["billing-zip"]||e?.address?.billingAddress?.zip||i.address?.billingAddress?.zip}}injectCustomCSS(){if(!this.css){return}this.cleanupInjectedCSS();const t=`rebill-checkout-css-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;if(this.css.startsWith("http://")||this.css.startsWith("https://")||this.css.startsWith("//")){const i=document.createElement("link");i.rel="stylesheet";i.href=this.css;i.id=t;i.setAttribute("data-rebill-injected","true");document.head.appendChild(i);this.injectedStyleElement=i}else{const i=document.createElement("style");i.id=t;i.setAttribute("data-rebill-injected","true");i.textContent=this.css;document.head.appendChild(i);this.injectedStyleElement=i}}cleanupInjectedCSS(){if(this.injectedStyleElement){try{this.injectedStyleElement.remove()}catch(t){console.warn("Error removing injected CSS:",t)}this.injectedStyleElement=null}}timeToRedirectAPM=5e3;resizeHandler=()=>{const t=v(window.innerWidth);if(t!==this.breakpoint){this.breakpoint=t}};disconnectedCallback(){window.removeEventListener("resize",this.resizeHandler);if(this.emailDebounceTimeout){clearTimeout(this.emailDebounceTimeout);this.emailDebounceTimeout=null}this.cleanupInjectedCSS()}async componentWillLoad(){try{this.resizeHandler();window.addEventListener("resize",this.resizeHandler);this.injectCustomCSS();if(this.language){await p.changeLanguage(this.language)}else{y()}const{session:t,type:i}=await E({publicKey:this.publicKey,checkoutLandingSession:this.checkoutLandingSession,instantProduct:this.instantProduct,instantPlan:this.instantPlan,productId:this.productId,planId:this.planId});f.initializeSession({session:t,type:i,payment:typeof this.externalPayment==="string"?JSON.parse(this.externalPayment):this.externalPayment});if(u.sessionRefreshed){this.showRefreshModal=true}P.loadGoogleMapsScript();const e=await n.data.getCountries();this.countries=e.data;if(this.parsedCustomerInformation){f.setUserInformation(this.parsedCustomerInformation)}this.initialData=this.getInitialData();this.allRequiredFields=await j();if(this.filteredPaymentMethods.length>0){if(u.data.paymentStatus===r.REJECTED||u.data.paymentStatus===r.APPROVED&&this.filteredPaymentMethods.includes(b.BANK_TRANSFER)){const t=this.filteredPaymentMethods.find((t=>t===b.BANK_TRANSFER));if(t){this.changePaymentMethod(t);f.setPaymentMethodSelected(t)}}else{this.changePaymentMethod(this.filteredPaymentMethods[0])}}if(this.oneClickCheckout){n.customers.exists({email:u.data?.prefilledData?.email},this.publicKey).then((t=>{this.customerExists=t.data.exists}))}this.cardMode=u.cardMode;g("cardMode",(()=>{this.cardMode=u.cardMode}))}catch(t){console.error("Error initializing checkout:",t)}}componentWillUpdate(){this.injectCustomCSS()}async changePaymentMethod(t){if(t!==this.currentPaymentMethod&&this.filteredPaymentMethods.includes(t)){if(this.checkoutResponse){this.checkoutResponse=null;f.clearCheckoutResponse()}this.currentPaymentMethod=t;f.setPaymentMethodSelected(t);if(t!==b.CARD){this.cardMode="input";f.setCardMode("input")}this.isSubmitting=false;this.currentApmPaymentMethod=I.mapToAPMPaymentMethod(t,u.data?.pricing?.country);if(t!==b.CASH&&t!==b.BANK_TRANSFER){this.checkoutResponse=null;f.clearCheckoutResponse()}else{this.checkoutResponse=null;f.clearCheckoutResponse()}this.paymentMethodSelected.emit(t);try{this.currentRequiredFields=D(t,this.allRequiredFields).fields;const i=await n.sessions.updateCurrentSessionPaymentMethod(u.data.sessionId,{paymentMethodName:I.mapToAPMPaymentMethod(t,u.data.pricing.country),paymentMethodType:t,currency:u.data.pricing.currency});f.setProviderKey(i.providerKey);if(i.providerKey===M.DECIDIR||u.data.providerKey===M.DECIDIR){const t=crypto.randomUUID();const i=await n.fingerPrint.getFingerPrint(t);u.deviceId=t;const e=i.result.script;const s=document.createElement("script");s.innerHTML=e;document.body.appendChild(s)}}catch(t){console.error("Failed to update payment method or get required fields:",t)}}}get currentPaymentError(){if(this.currentPaymentMethod===b.CARD){return this.rejectedPaymentCard}else if(this.currentPaymentMethod===b.CASH||this.currentPaymentMethod===b.BANK_TRANSFER){return this.rejectedPaymentAPM}return false}paymentMethodSelected;async handlePaymentMethodSelected(t){t.stopPropagation();const i=t.detail;this.changePaymentMethod(i);if(this.formElement){this.formElement.resetValidation()}}async handleSubmit(t){if(this.isSubmitting){return}this.rejectedPaymentCard=false;this.rejectedPaymentAPM=false;if(this.currentPaymentMethod===b.CARD){this.handleSubmitCard(t)}else if(this.currentPaymentMethod===b.CASH||this.currentPaymentMethod===b.BANK_TRANSFER){this.handleSubmitAPM(t)}}handleFormChange(t){const i=t.detail;let e=true;let s={};if(this.formElement?.errors){s=this.formElement.errors;e=Object.keys(s).length===0}this.formChange.emit({data:i,isValid:e,errors:Object.keys(s).length>0?s:undefined})}async handleSubmitCard(t){const i=t.detail;const e=this.getCombinedUserData(i);if(!u.data.cardTokenId&&!u.data.cardId){this.cardError={showCardInvalid:true,type:"card_error"};return}if(!u.data.cardInformation&&!u.data.cardId){this.cardError={showCardInvalid:true,type:"tokenization_error"};return}this.cardError={showCardInvalid:false,type:null};const s={transaction:{quantity:1,...u.data.discount.couponCode&&{couponCode:u.data.discount.couponCode}},installments:Number(i.installments||u.data.cardInformation?.installments?.selectedInstallment?.installment),...u.data.cardTokenId&&{cardTokenId:u.data.cardTokenId,...u.data?.itemInformation?.type!==w.PLAN&&{saveCard:u.saveCard}},...u.data.cardId&&{cardId:u.data.cardId},...(!this.otpVerified||this.cardMode==="input")&&{customer:{firstName:e.fullName?.split(" ")[0],lastName:e.fullName?.split(" ").slice(1).join(" "),email:e.email,phone:{countryCode:e.countryCodePhoneNumber,number:e.phoneNumber}}},billingDetails:{address:{lineOne:e["billing-address"],city:e["billing-city"],state:e["billing-state"],country:e["billing-country"],zipCode:e["billing-zip"]},identification:{type:e.documentType,value:e.documentNumber}},customAttributes:{...u.deviceId&&{deviceId:u.deviceId}},...u.metadata&&{paymentMetadata:u.metadata}};const a=o();this.isSubmitting=true;this.isCardSubmitting=true;try{const t=await n.checkout.createCardCheckoutRequest(u.data.sessionId,a,s,u.data.accessToken||undefined);f.setCheckoutResponse(t.data);this.responseCheckoutCard=t.data;if(t.data.result?.status.toUpperCase()===l.APPROVED){this.isCardSuccess=true;f.setPaymentStatus(r.APPROVED);this.success.emit({paymentMethod:this.currentPaymentMethod,data:t.data});u.data.cardInformation.lastFour=t.data.result?.cardLastFour}else{this.error.emit({paymentMethod:this.currentPaymentMethod,data:t.data});f.setCheckoutResponse(t.data);this.rejectedPaymentCard=true;this.alertErrorKeys={message:t.data.result?.statusDetail.toLowerCase()??t.data.error?.error?.message?.toLowerCase()}}}catch(t){this.error.emit({paymentMethod:this.currentPaymentMethod,data:t.data});f.setCheckoutResponse(t.data);this.responseCheckoutCard=t.data;this.rejectedPaymentCard=true;this.alertErrorKeys={message:t.data?.error?.type?.toLowerCase()??t.data?.result?.statusDetail?.toLowerCase()}}finally{this.isSubmitting=false;this.isCardSubmitting=false}}async handleSubmitAPM(t){if(this.currentPaymentMethod!==b.CASH&&this.currentPaymentMethod!==b.BANK_TRANSFER){return}this.isSubmitting=true;const i=t.detail;const e=this.getCombinedUserData(i);try{const t={address:{country:e["billing-country"]||"",state:e["billing-state"]||"",city:e["billing-city"]||"",zipCode:e["billing-zip"]||"",lineOne:e["billing-address"]||""},identification:{type:e.documentType,value:e.documentNumber}};const s=this.currentApmPaymentMethod||I.mapToAPMPaymentMethod(this.currentPaymentMethod,u.data?.pricing?.country);const a={transaction:{quantity:1,...u.data.discount.couponCode&&{couponCode:u.data.discount.couponCode}},method:s,billingDetails:t,redirect:{approved:window.location.origin+"/payment/success",rejected:window.location.origin+"/payment/failure"},paymentMetadata:u.metadata,customAttributes:{bank:i.bankId||u.data?.bankId?.code}};{a.customer={firstName:e.fullName?.split(" ")[0]||"",lastName:e.fullName?.split(" ").slice(1).join(" ")||"",email:e.email,phone:{countryCode:e.countryCodePhoneNumber||"",number:e.phoneNumber||""}}}const r=o();const l=await n.checkout.createAPMCheckoutRequest(u.data.sessionId,r,a);this.isSubmitting=false;this.checkoutResponse=l.data;this.storedCheckoutResults.set(this.currentPaymentMethod,l.data);if(l.data?.date){u.data.paymentDate=l.data.date;u.createdAt=l.data.date}if(l.data?.traceId){u.data.paymentReference=l.data.traceId}}catch(t){this.isSubmitting=false;this.checkoutResponse=t.data;this.alertErrorKeys={message:t.data?.error?.type?.toLowerCase()??t.data?.result?.statusDetail?.toLowerCase()};this.rejectedPaymentAPM=true}}async submit(){if(this.formElement&&typeof this.formElement.submit==="function"){this.formElement.submit()}else{await this.handleSubmit({detail:{}})}}handlePaymentStatusChange=t=>{if(t.isCompleted){if(t.status===k.APPROVED){f.setPaymentStatus(r.APPROVED);this.success.emit({paymentMethod:this.currentPaymentMethod,data:this.checkoutResponse})}else if(t.status===k.REJECTED){f.setPaymentStatus(r.REJECTED);this.alertErrorKeys={alertTitle:r.APM_ERROR_GENERIC,message:r.APM_MESSAGE_ERROR}}}};async handleInputChange(t){if(t?.detail?.id==="email"&&this.oneClickCheckout){if(this.emailDebounceTimeout){clearTimeout(this.emailDebounceTimeout)}if(!t.detail.value||t.detail.value.trim()===""){this.customerExists=false;f.clearCustomerIdAndToken();return}this.emailDebounceTimeout=setTimeout((async()=>{try{const t=await n.customers.exists({email:u.data.userInformation.email},this.publicKey);this.customerExists=t.data.exists}catch(t){this.customerExists=false}}),500)}}validationSchema={email:s().when([],{is:()=>!this.otpVerified,then:t=>t.email("validation.emailInvalid").matches(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,"validation.emailInvalid").required("validation.emailRequired"),otherwise:t=>t.notRequired()}),fullName:s().when([],{is:()=>!this.otpVerified,then:t=>t.required("validation.fullNameRequired").matches(/^[a-zA-ZÀ-ÿ\u00f1\u00d1\s]{2,}\s+[a-zA-ZÀ-ÿ\u00f1\u00d1\s]{2,}$/,"validation.fullNameInvalid"),otherwise:t=>t.notRequired()}),isValidPhoneNumber:s().when([],{is:()=>c("phoneNumber",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.equals(["true"],"validation.phoneRequired"),otherwise:t=>t.notRequired()}),"billing-country":s().when([],{is:()=>c("billing-country",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.countryRequired"),otherwise:t=>t.notRequired()}),"billing-state":s().when([],{is:()=>c("billing-state",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.stateRequired"),otherwise:t=>t.notRequired()}),"billing-address":s().when([],{is:()=>c("billing-address",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.addressRequired"),otherwise:t=>t.notRequired()}),"billing-city":s().when([],{is:()=>c("billing-city",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.cityRequired"),otherwise:t=>t.notRequired()}),"billing-zip":s().when([],{is:()=>c("billing-zip",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.zipRequired"),otherwise:t=>t.notRequired()}),bankId:s().when([],{is:()=>c("bankId",this.currentRequiredFields),then:t=>t.required("validation.bankRequired"),otherwise:t=>t.notRequired()}),installments:s().when([],{is:()=>this.currentPaymentMethod===b.CARD&&u.data.cardInformation.installments.isAvailableInstallments&&u.data.cardInformation?.installments?.installments.length>0&&u.data.itemInformation.type!==w.PLAN,then:t=>t.required("validation.installmentsRequired"),otherwise:t=>t.notRequired()}),documentType:s().when([],{is:()=>c("documentType",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.documentTypeRequired"),otherwise:t=>t.notRequired()}),documentNumber:s().when([],{is:()=>c("documentNumber",this.currentRequiredFields)&&!this.otpVerified||this.otpVerified&&this.cardMode==="input",then:t=>t.required("validation.documentNumberRequired").min(7,"validation.documentInvalid"),otherwise:t=>t.notRequired()})};getInitialData=()=>({email:u.data.userInformation.email||"",fullName:u.data.userInformation.fullName||"",phoneNumber:u.data.userInformation.phoneNumber?.number||"",countryCodePhoneNumber:u.data.userInformation.countryCode||"",documentType:"",documentNumber:"","billing-country":u.data.userInformation.address?.billingAddress?.country||"","billing-state":u.data.userInformation?.address?.billingAddress?.state||"","billing-address":u.data.userInformation?.address?.billingAddress?.address||"","billing-city":u.data.userInformation?.address?.billingAddress?.city||"","billing-zip":u.data.userInformation?.address?.billingAddress?.zip||"",bankId:u.data.bankId?.code||"",card:"",installments:u.data.cardInformation?.installments?.selectedInstallment?.installment?.toString()||""});hasPrefilledAddress=()=>{const t=["billing-country","billing-state","billing-address","billing-city","billing-zip"];return t.some((t=>{const i=this.initialData[t];return i&&i.trim()!==""}))};get isQrCodeVisible(){return!!this.checkoutResponse?.result?.data?.qrCode}get isBankTransferVisible(){return!!this.checkoutResponse?.result?.data?.account&&!!this.checkoutResponse?.result?.data?.bankName&&!!this.checkoutResponse?.result?.data?.reference}isPaymentApproved=()=>{if(u.data.paymentStatus===r.APPROVED){return true}return false};handleRebillAccountClick(t){this.showOtp=t.detail}handleReturnForm(t){this.showOtp=t.detail;f.clearCustomerIdAndToken()}handleSignOut(){this.showOtp=false;this.otpVerified=false;if(!u?.data?.prefilledData?.email){this.customerExists=false}f.clearCustomerIdAndToken();f.clearUserInformation();this.cardError={showCardInvalid:false,type:null};this.alertErrorKeys=null;this.rejectedPaymentCard=false;this.rejectedPaymentAPM=false}handleCodeVerified(){this.otpVerified=true;this.showOtp=false;this.rejectedPaymentCard=false;this.alertErrorKeys=null;this.cardError={showCardInvalid:false,type:null};if(this.formElement){this.formElement.resetValidation()}}isPaymentRejected(){return u.data.paymentStatus===r.REJECTED&&this.currentPaymentMethod===b.BANK_TRANSFER}render(){const t=this.countries.map((t=>({label:t.country,value:t.isoCountryCode})));const i=(t={})=>e("rebill-summary",{key:"698d9a1b5eeee59f9e4b9762bedcedd4818a059e",totalAmount:u.data.pricing.total,currency:u.data.pricing.currency,itemTitle:u._session?.getTitle(),itemDescription:u._session?.getDescription(),itemAmount:u.data.pricing.subtotal,subtotal:u.data.pricing.subtotal,allowCoupon:u._session?.getAllowCoupon(this.displayConfig),currentBreakpoint:this.breakpoint,planFrequency:u._session?.getPlanFrequency(),planFrequencyCount:u._session?.getPlanFrequencyCount(),discountType:u.data.discount.discountType,discountedPercentage:u.data.discount.discountedPercentage,discountDuration:u.data.discount.discountDuration,discountAmount:u.data.discount.discountAmount,...t});return u.isInitialized&&e(e.Fragment,null,this.showRefreshModal&&e("rebill-modal-overlay",{key:"6a0d7aab67c17d0fc60bb30103e04ddc6903c2cc"}),this.displayConfig.processingPayment&&e("rebill-processing-payment",{key:"4dbf0982819ef2b65752a53654fc5a0c3c858875",style:{display:this.isCardSubmitting?"block":"none"}}),this.displayConfig.successPage&&this.isPaymentApproved()&&u.isInitialized?e("success-page",{typePaymentMethod:u.data.paymentMethodSelected,paymentMethodName:I.mapToAPMPaymentMethod(u.data.paymentMethodSelected||u.data.payment?.paymentMethodType,u.data?.pricing?.country),country:u.data?.pricing?.country,bank:u.data.payment?.paymentMethodMetadata?.bank||u.data.payment?.paymentMethodMetadata?.bank,cardLastFour:this.responseCheckoutCard?.result?.cardLastFour||u.data.cardInformation?.lastFour,paymentDate:u.data.paymentDate||this.responseCheckoutCard?.date||u.data.payment?.createdAt||this.checkoutResponse?.result?.data?.createdAt,referenceNumber:u.data.paymentReference||u.data.payment?.traceId||this.responseCheckoutCard?.traceId,onSuccessRedirect:t=>{this.successRedirect.emit(t.detail)},trialPeriodDays:u.data?.itemInformation?.trial?.trialPeriodDays,debitDay:u.data?.itemInformation?.debitDay,planAmount:u.data?.pricing?.planAmount}):e(e.Fragment,null,this.displayConfig.sandboxMode&&u.isSandbox&&u.data.sessionType===m.CHECKOUT_LANDING&&C(this.breakpoint,x.DESKTOP)&&e("div",{class:"mode-sandbox-mobile-container",style:{display:this.isCardSubmitting||this.isCardSuccess?"none":"block"}},e("rebill-mode-sandbox-mobile",null)),e("rebill-checkout-form",{ref:t=>this.formElement=t,style:{display:this.isCardSubmitting||this.isCardSuccess?"none":"block"},validationSchema:this.validationSchema,initialData:this.initialData,onSubmit:t=>this.handleSubmit(t),onChange:t=>this.handleFormChange(t),renderForm:({submit:s,formData:n,errors:a})=>{const o=!this.isCardSuccess&&this.checkoutResponse?.result&&(this.currentPaymentMethod===b.CASH||this.currentPaymentMethod===b.BANK_TRANSFER);return e("div",{class:`rebill-checkout ${!this.displayConfig.checkoutSummary?"full-width-layout":""}`},e("div",{class:"left-section"},e("div",{class:"left-section-container"},this.displayConfig.logo&&e("organization-logo",{organization:u.data.organization}),e("div",{class:"otp-container",style:{display:this.showOtp?"block":"none"}},e("otp-component",null)),e("div",{style:{display:this.showOtp?"none":"block"}},e("div",{class:"checkout-form-section"},this.displayConfig.checkoutSummary&&e("div",{class:"summary-mobile-tablet",style:{display:C(this.breakpoint,x.DESKTOP)?"block":"none"}},i({displayedComponents:["totalAmount","discount","timelineFreeTrial","timelineDebitDay","itemDetails"]})),!this.otpVerified&&this.displayConfig.customerInformation&&e("user-information",{customerExists:this.customerExists,disabled:this.isSubmitting,errors:{email:a.email,fullName:a.fullName}}),this.otpVerified&&this.displayConfig.customerInformation&&e("user-information-static",{variant:"otp",userInfo:{customerName:u.data.userInformation.fullName?.split(" ")[0],customerEmail:u.data.userInformation.email}}),e("div",{style:{display:"flex",flexDirection:"column",gap:"16px"}},e("payment-method-selector",{enabledPaymentMethods:this.filteredPaymentMethods,defaultSelected:this.currentPaymentMethod,disabled:this.isSubmitting,errorComponent:{showErrorComponent:this.displayConfig.errorMessage&&(this.currentPaymentError||this.isPaymentRejected()),alertTitle:h.getErrorTitle(this.currentPaymentMethod,u.data?.pricing?.country||"",this.alertErrorKeys?.alertTitle),message:h.getErrorMessage(this.alertErrorKeys?.message,this.currentPaymentMethod,u.data?.pricing?.country)},country:u.data?.pricing?.country,installmentsError:a.installments,showDocument:(!this.otpVerified||this.otpVerified&&this.cardMode==="input")&&!o&&!this.isQrCodeVisible&&(c("documentNumber",this.currentRequiredFields)||c("documentType",this.currentRequiredFields)),documentTypeError:a.documentType,documentNumberError:a.documentNumber,cardError:this.cardError,customCSS:this.css}),!o&&(()=>{const t=c("bankId",this.currentRequiredFields);return t})()&&e("div",{class:"animated-component fade-in"},e("rebill-bank-selector",{banks:d("bank",this.allRequiredFields[this.currentPaymentMethod].original)||[],defaultSelectedBankId:n.bankId||"",error:a?.bankId,disabled:this.isSubmitting}))),!o&&(!this.otpVerified||this.cardMode==="input")&&e(e.Fragment,null,this.displayConfig.billingAddress&&(c("billing-country",this.currentRequiredFields)||c("billing-state",this.currentRequiredFields)||c("billing-address",this.currentRequiredFields)||c("billing-city",this.currentRequiredFields)||c("billing-zip",this.currentRequiredFields))&&e("div",{class:"animated-component slide-in"},e("rebill-address",{disabled:this.isSubmitting,countryOptions:t,billingView:this.hasPrefilledAddress()?"form":"search",errors:{"billing-country":a["billing-country"],"billing-state":a["billing-state"],"billing-address":a["billing-address"],"billing-city":a["billing-city"],"billing-zip":a["billing-zip"]}})),this.displayConfig.customerInformation&&c("phoneNumber",this.currentRequiredFields)&&e("div",{class:"animated-component fade-in"},e("user-information-phone",{disabled:this.isSubmitting,error:a?.phoneNumber,countryCode:u.data.userInformation?.countryCode||u.data.country}))),o&&e("apm-checkout",{paymentMethod:this.currentPaymentMethod,referenceId:this.currentPaymentMethod===b.CASH?this.checkoutResponse?.result?.data?.referenceId:undefined,qrCodeData:this.currentPaymentMethod===b.BANK_TRANSFER?this.checkoutResponse?.result?.data?.qrCode:undefined,code:this.currentPaymentMethod===b.BANK_TRANSFER?this.checkoutResponse?.result?.data?.code:undefined,checkoutRequestId:this.checkoutResponse?.result?.checkoutRequestId,providerName:u.data.providerKey,expirationDate:(()=>{const t=new Date;t.setDate(t.getDate()+30);return t.toISOString()})(),onPaymentStatusChange:t=>this.handlePaymentStatusChange(t.detail),country:u.data?.pricing?.country,redirectUrl:this.checkoutResponse?.result?.data?.url,timeToRedirect:this.timeToRedirectAPM,bearerToken:this.checkoutResponse?.result?.data?.bearerToken,bankTransferData:this.checkoutResponse?.result?.data?.account&&this.checkoutResponse?.result?.data?.bankName&&this.checkoutResponse?.result?.data?.reference?{account:this.checkoutResponse.result.data.account,bankName:this.checkoutResponse.result.data.bankName,reference:this.checkoutResponse.result.data.reference}:undefined}),this.displayConfig.checkoutSummary&&e("div",{class:"summary-price-details",style:{display:C(this.breakpoint,x.DESKTOP)?"block":"none"}},i({displayedComponents:["priceDetails"]})),this.displayConfig.submitButton&&!(o&&(this.isQrCodeVisible||this.isBankTransferVisible))&&e("div",{class:"payment-button-container"},e("payment-button",{paymentMethod:this.currentPaymentMethod,isLoading:this.isSubmitting,trialPeriodDays:u.data?.itemInformation?.trial?.trialPeriodDays,onSubmit:()=>{s()},redirectUrl:!!this.checkoutResponse?.result?.data?.url,timeToRedirect:this.timeToRedirectAPM,isDisabled:u.data.fetchingInstallments,country:u.data?.pricing?.country}),e("rebill-alert",{type:"secure",variant:"variant-secure",icon:"lock-outline",message:p.translate("otp.secureMessage")}))),this.displayConfig.sandboxMode&&u.isSandbox&&u.data.sessionType===m.CHECKOUT_LANDING&&!C(this.breakpoint,x.DESKTOP)&&e("rebill-mode-sandbox",null)),this.displayConfig.footer&&e("rebill-footer",{style:{marginTop:C(this.breakpoint,x.DESKTOP)?"24px":"auto"}}))),this.displayConfig.checkoutSummary&&e("div",{class:"right-section-checkout"},e("div",{class:"checkout-summary-section"},e("div",{class:"summary-desktop",style:{display:!C(this.breakpoint,x.DESKTOP)?"block":"none"}},i()))))}})))}static get watchers(){return{language:["handleLanguageChange"]}}};O.style=F;export{O as rebill_checkout};
2
+ //# sourceMappingURL=p-9b146258.entry.js.map