@alma/widgets 3.3.12 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1755,7 +1755,9 @@ if (!''.trim) String.prototype.trim = function () {
1755
1755
 
1756
1756
  var messagesDE = {
1757
1757
  "credit-features.credit-cost-display": "{creditCost} (APR {taegPercentage})",
1758
- "credit-features.information": "Ein Kredit verpflichtet Sie und muss zurückgezahlt werden. Prüfen Sie Ihre Rückzahlungsfähigkeit, bevor Sie sich verpflichten.",
1758
+ "credit-features.information": "Überprüfen Sie Ihre Rückzahlungsmöglichkeiten, bevor Sie eine Verpflichtung eingehen.",
1759
+ "credit-features.information.title": "Ein Kredit verpflichtet Sie und muss zurückgezahlt werden.",
1760
+ "credit-features.legal-text": "Kredit in Höhe von {totalWithoutFirstInstallment} zu einem festen Sollzinssatz von {taegPercentage} über eine Laufzeit von {installmeentsCountWithoutFirst} Monaten. Ermöglicht, zusätzlich zu einer Anzahlung von {firstInstallmentAmount}, die Finanzierung eines Kaufs in Höhe von {productPriceWithoutCreditCost}. Vorbehaltlich der Prüfung und Annahme durch Alma. Gesetzliche Widerrufsfrist von 14 Tagen. Simulation präsentiert von Alma, eingetragen im RCS Nanterre unter der Nummer 839 100 575, Zahlungsinstitut und Finanzierungsgesellschaft, zugelassen von der ACPR unter der Nummer 17408 (IPC-Nummer / Bankcode).",
1759
1761
  "credit-features.total-credit-cost": "Davon Kreditkosten",
1760
1762
  "eligibility-modal.bullet-1": "Wählen Sie <strong>Alma</strong> beim Check-out. ",
1761
1763
  "eligibility-modal.bullet-2": "Lassen Sie sich führen und bestätigen Sie Ihre Zahlung in <strong>2 Minuten.</strong>",
@@ -1770,6 +1772,7 @@ var messagesDE = {
1770
1772
  "installments.today": "Heute",
1771
1773
  "installments.total-amount": "Gesamtsumme",
1772
1774
  "installments.total-fees": "Davon Kosten",
1775
+ "payment-plan-strings.credit": "Klicken Sie, um mehr zu erfahren",
1773
1776
  "payment-plan-strings.day-abbreviation": "T{deferredDays}",
1774
1777
  "payment-plan-strings.default-message": "Bezahlen Sie zinsfrei in mehreren Raten mit Alma.",
1775
1778
  "payment-plan-strings.deferred": "{totalAmount} zu zahlen am {dueDate}",
@@ -1785,7 +1788,9 @@ var messagesDE = {
1785
1788
 
1786
1789
  var messagesEN = {
1787
1790
  "credit-features.credit-cost-display": "{creditCost} (APR {taegPercentage})",
1788
- "credit-features.information": "A loan commits you and must be repaid. Check your ability to repay before committing yourself.",
1791
+ "credit-features.information": "Check your repayment capacity before committing yourself.",
1792
+ "credit-features.information.title": "Credit is a commitment and must be repaid.",
1793
+ "credit-features.legal-text": "Loan of {totalWithoutFirstInstallment} at a fixed interest rate of {taegPercentage} over a period of {installmeentsCountWithoutFirst} months. In addition to a down payment of {firstInstallmentAmount}, this loan can be used to finance a purchase of {productPriceWithoutCreditCost}. Subject to review and acceptance by Alma. Legal cooling-off period of 14 days. Simulation presented by Alma, registered with the RCS Nanterre under number 839 100 575, payment and finance company approved by the ACPR under number 17408 (CIB number / Bank code).",
1789
1794
  "credit-features.total-credit-cost": "Of which cost of credit",
1790
1795
  "eligibility-modal.bullet-1": "Choose <strong>Alma</strong> at checkout.",
1791
1796
  "eligibility-modal.bullet-2": "Let us guide you and validate your payment in <strong>2 minutes.</strong>",
@@ -1800,6 +1805,7 @@ var messagesEN = {
1800
1805
  "installments.today": "Today",
1801
1806
  "installments.total-amount": "Total",
1802
1807
  "installments.total-fees": "Of which costs (incl. VAT)",
1808
+ "payment-plan-strings.credit": "Click to find out more",
1803
1809
  "payment-plan-strings.day-abbreviation": "D{deferredDays}",
1804
1810
  "payment-plan-strings.default-message": "Pay in installments with Alma",
1805
1811
  "payment-plan-strings.deferred": "{totalAmount} to pay the {dueDate}",
@@ -1815,7 +1821,9 @@ var messagesEN = {
1815
1821
 
1816
1822
  var messagesES = {
1817
1823
  "credit-features.credit-cost-display": "{creditCost} (TAE {taegPercentage})",
1818
- "credit-features.information": "Un préstamo te compromete y debe ser devuelto. Comprueba tu capacidad financiera antes de comprometerte.",
1824
+ "credit-features.information": "Compruebe tu capacidad de reembolso antes de comprometerte.",
1825
+ "credit-features.information.title": "El crédito y/o pago a plazos es un compromiso y debe devolverse.",
1826
+ "credit-features.legal-text": "{totalWithoutFirstInstallment} {taegPercentage} {installmeentsCountWithoutFirst} Préstamo de a un tipo deudor fijo de a lo largo de un periodo de meses. {firstInstallmentAmount} {productPriceWithoutCreditCost}Además de un depósito de , esto le permitirá financiar una compra de . Sujeto a revisión y aceptación por parte de Alma. Plazo legal de retractación de 14 días. Simulación presentada por Alma, inscrita en el Registro Mercantil de Nanterre con el número 839 100 575, sociedad de pago y financiación autorizada por la ACPR con el número 17408 (número CIB / código bancario).",
1819
1827
  "credit-features.total-credit-cost": "Coste de crédito (incl. en el total)",
1820
1828
  "eligibility-modal.bullet-1": "Elige <strong>Alma</strong> como método de pago.",
1821
1829
  "eligibility-modal.bullet-2": "Déjate guiar y válida tu pago en <strong>2 minutos.</strong>",
@@ -1830,6 +1838,7 @@ var messagesES = {
1830
1838
  "installments.today": "Hoy",
1831
1839
  "installments.total-amount": "Total",
1832
1840
  "installments.total-fees": "De los cuales, costes (IVA incluido)",
1841
+ "payment-plan-strings.credit": "Haz click para más información",
1833
1842
  "payment-plan-strings.day-abbreviation": "D{deferredDays}",
1834
1843
  "payment-plan-strings.default-message": "Pagar a plazos con Alma",
1835
1844
  "payment-plan-strings.deferred": "{totalAmount} a pagar el {dueDate}",
@@ -1845,7 +1854,9 @@ var messagesES = {
1845
1854
 
1846
1855
  var messagesFR = {
1847
1856
  "credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
1848
- "credit-features.information": "Un crédit vous engage et doit être remboursé. Vérifiez vos capacités de remboursement avant de vous engager.",
1857
+ "credit-features.information": "Vérifiez vos capacités de remboursement avant de vous engager.",
1858
+ "credit-features.information.title": "Un crédit vous engage et doit être remboursé.",
1859
+ "credit-features.legal-text": "Crédit d'un montant de {totalWithoutFirstInstallment} au taux débiteur fixe de {taegPercentage} sur une durée de {installmeentsCountWithoutFirst} mois. Permettant, en complément d'un acompte de {firstInstallmentAmount}, de financer un achat d'un montant de {productPriceWithoutCreditCost}. Sous réserve d'étude et d'acceptation par Alma. Délai légal de rétractation de 14 jours. Simulation présentée par Alma, immatriculée au RCS Nanterre sous le numéro 839 100 575, établissement de paiement et société de financement agréée par l’ACPR sous le n° 17408 (numéro CIB / Code banque).",
1849
1860
  "credit-features.total-credit-cost": "Dont coût du crédit",
1850
1861
  "eligibility-modal.bullet-1": "Choisissez <strong>Alma</strong> au moment du paiement.",
1851
1862
  "eligibility-modal.bullet-2": "Laissez-vous guider et validez votre paiement en <strong>2 minutes.</strong>",
@@ -1860,6 +1871,7 @@ var messagesFR = {
1860
1871
  "installments.today": "Aujourd'hui",
1861
1872
  "installments.total-amount": "Total",
1862
1873
  "installments.total-fees": "Dont frais (TTC)",
1874
+ "payment-plan-strings.credit": "Cliquez pour en savoir plus",
1863
1875
  "payment-plan-strings.day-abbreviation": "J{deferredDays}",
1864
1876
  "payment-plan-strings.default-message": "Payez en plusieurs fois avec Alma",
1865
1877
  "payment-plan-strings.deferred": "{totalAmount} à payer le {dueDate}",
@@ -1875,7 +1887,9 @@ var messagesFR = {
1875
1887
 
1876
1888
  var messagesIT = {
1877
1889
  "credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
1878
- "credit-features.information": "Un pagamento rateale ti impegna e deve essere ripagato. Verifica la tua disponibilità finanziaria prima di impegnarti.",
1890
+ "credit-features.information": "Verificate la vostra capacità di rimborso prima di prendere un impegno.",
1891
+ "credit-features.information.title": "Il credito è un impegno e deve essere ripagato.",
1892
+ "credit-features.legal-text": "{totalWithoutFirstInstallment} {taegPercentage} {installmeentsCountWithoutFirst} Prestito a tasso fisso per un periodo di mesi. {firstInstallmentAmount} {productPriceWithoutCreditCost}Oltre a un deposito di , questo vi permetterà di finanziare un acquisto di . Soggetto a revisione e accettazione da parte di Alma. Periodo di recesso legale di 14 giorni. Simulazione presentata da Alma, iscritta al Registro del Commercio e delle Imprese di Nanterre con il numero 839 100 575, società di pagamento e di finanziamento approvata dall'ACPR con il numero 17408 (numero CIB / codice bancario).",
1879
1893
  "credit-features.total-credit-cost": "Di cui commissioni",
1880
1894
  "eligibility-modal.bullet-1": "Seleziona <strong>Alma</strong> come metodo di pagamento.",
1881
1895
  "eligibility-modal.bullet-2": "Segui le istruzioni e completa l'acquisto <strong>in meno di 2 minuti.</strong>",
@@ -1890,6 +1904,7 @@ var messagesIT = {
1890
1904
  "installments.today": "Oggi",
1891
1905
  "installments.total-amount": "Totale",
1892
1906
  "installments.total-fees": "Di cui commissioni",
1907
+ "payment-plan-strings.credit": "Clicca qui per saperne di più",
1893
1908
  "payment-plan-strings.day-abbreviation": "G{deferredDays}",
1894
1909
  "payment-plan-strings.default-message": "Paga a rate con Alma, senza registrazione.",
1895
1910
  "payment-plan-strings.deferred": "{totalAmount} da pagare il {dueDate}",
@@ -1905,7 +1920,9 @@ var messagesIT = {
1905
1920
 
1906
1921
  var messagesNL = {
1907
1922
  "credit-features.credit-cost-display": "{creditCost} (gemiddeld rente percentage {taegPercentage})",
1908
- "credit-features.information": "Een lening is bindend en moet worden terugbetaald. Ga na of je het kunt terugbetalen voordat je jezelf vastlegt.",
1923
+ "credit-features.information": "Controleer uw terugbetalingscapaciteit voordat u een toezegging doet.",
1924
+ "credit-features.information.title": "Krediet is een verplichting en moet worden terugbetaald.",
1925
+ "credit-features.legal-text": "{totalWithoutFirstInstallment} {taegPercentage} {installmeentsCountWithoutFirst} Lening van tegen een vaste rentevoet van over een periode van maanden. {firstInstallmentAmount} {productPriceWithoutCreditCost}Naast een aanbetaling van , kun je hiermee een aankoop financieren van . Onder voorbehoud van beoordeling en aanvaarding door Alma. Wettelijke herroepingstermijn van 14 dagen. Simulatie aangeboden door Alma, ingeschreven in het handels- en bedrijvenregister van Nanterre onder nummer 839 100 575, betalings- en financieringsmaatschappij erkend door de ACPR onder nummer 17408 (CIB-nummer / bankcode).",
1909
1926
  "credit-features.total-credit-cost": "Waarvan kredietkosten",
1910
1927
  "eligibility-modal.bullet-1": "Kies <strong>Alma</strong> bij het afrekenen om de eerste termijnbetaling te voldoen. Dit kan gemakkelijk via jouw favoriete betaalmethode.",
1911
1928
  "eligibility-modal.bullet-2": "Betaal gemakkelijk <strong>binnen 1 minuut </strong>. Je hebt hier geen account voor nodig.",
@@ -1920,6 +1937,7 @@ var messagesNL = {
1920
1937
  "installments.today": "Vandaag",
1921
1938
  "installments.total-amount": "Totaal",
1922
1939
  "installments.total-fees": "Waarvan kosten (incl. BTW)",
1940
+ "payment-plan-strings.credit": "Klik hier voor meer informatie",
1923
1941
  "payment-plan-strings.day-abbreviation": "D{deferredDays}",
1924
1942
  "payment-plan-strings.default-message": "Betaal in termijnen bij Alma - helemaal rentevrij",
1925
1943
  "payment-plan-strings.deferred": "{totalAmount} te betalen op {dueDate}",
@@ -1935,7 +1953,9 @@ var messagesNL = {
1935
1953
 
1936
1954
  var messagesPT = {
1937
1955
  "credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
1938
- "credit-features.information": "Um crédito é um compromisso e deve ser reembolsado. Verifique a sua capacidade de pagar antes de se comprometer.",
1956
+ "credit-features.information": "Verifique a sua capacidade de reembolso antes de assumir um compromisso.",
1957
+ "credit-features.information.title": "O crédito é um compromisso e deve ser reembolsado.",
1958
+ "credit-features.legal-text": "{totalWithoutFirstInstallment} {taegPercentage} {installmeentsCountWithoutFirst} Empréstimo de a uma taxa de juro fixa de durante um período de meses. {firstInstallmentAmount} {productPriceWithoutCreditCost}Para além de um depósito de , isto permitir-lhe-á financiar uma compra de . Sujeito a análise e aceitação pela Alma. Prazo legal de retratação de 14 dias. Simulação apresentada pela Alma, inscrita na Conservatória do Registo Comercial e das Sociedades de Nanterre sob o número 839 100 575, sociedade de pagamento e de financiamento aprovada pela ACPR sob o número 17408 (número CIB / código bancário).",
1939
1959
  "credit-features.total-credit-cost": "Incluindo comissões de crédito",
1940
1960
  "eligibility-modal.bullet-1": "Seleccionar <strong>Alma - Pay Now</strong> no final da compra.",
1941
1961
  "eligibility-modal.bullet-2": "Siga as instruções e valide o seu pagamento em <strong>2 minutos.</strong>",
@@ -1950,6 +1970,7 @@ var messagesPT = {
1950
1970
  "installments.today": "Hoje",
1951
1971
  "installments.total-amount": "Total",
1952
1972
  "installments.total-fees": "Das quais comissões (incl. IVA)",
1973
+ "payment-plan-strings.credit": "Clique aqui para saber mais",
1953
1974
  "payment-plan-strings.day-abbreviation": "D{deferredDays}",
1954
1975
  "payment-plan-strings.default-message": "Pagamento em prestações com a Alma",
1955
1976
  "payment-plan-strings.deferred": "{totalAmount} a pagar em {dueDate}",
@@ -2195,7 +2216,7 @@ var useFetchEligibility = function useFetchEligibility(purchaseAmount, _ref, pla
2195
2216
  shipping_address: shipping_address
2196
2217
  }, {
2197
2218
  Authorization: "Alma-Merchant-Auth " + merchantId,
2198
- 'X-Alma-Agent': "Alma Widget/" + "v3.3.12"
2219
+ 'X-Alma-Agent': "Alma Widget/" + "v3.4.0"
2199
2220
  }).then(function (res) {
2200
2221
  setCache(key, res);
2201
2222
  setEligibility(res);
@@ -2209,7 +2230,7 @@ var useFetchEligibility = function useFetchEligibility(purchaseAmount, _ref, pla
2209
2230
  return [filterEligibility(eligibility, plans), status];
2210
2231
  };
2211
2232
 
2212
- var s = {"container":"_GTTk7","total":"_34s2g","fees":"_W7qIA","creditCost":"_24KmE"};
2233
+ var s = {"container":"_GTTk7","total":"_34s2g","creditInfo":"_15KNd","creditInfoTitle":"_3T0mA","fees":"_W7qIA","creditCost":"_24KmE","creditInfoLegalText":"_2e3lw"};
2213
2234
 
2214
2235
  /**
2215
2236
  * Prefix classes to avoid name collisions.
@@ -2239,6 +2260,7 @@ var STATIC_CUSTOMISATION_CLASSES = {
2239
2260
  };
2240
2261
 
2241
2262
  var TotalBlock = function TotalBlock(_ref) {
2263
+ var _currentPlan$payment_, _currentPlan$payment_2, _currentPlan$payment_3, _currentPlan$payment_4;
2242
2264
  var currentPlan = _ref.currentPlan;
2243
2265
  var intl = reactIntl.useIntl();
2244
2266
  var total = priceFromCents(currentPlan.purchase_amount + currentPlan.customer_total_cost_amount);
@@ -2246,7 +2268,20 @@ var TotalBlock = function TotalBlock(_ref) {
2246
2268
  var TAEG = (currentPlan == null ? void 0 : currentPlan.annual_interest_rate) && currentPlan.annual_interest_rate / 10000 || 0;
2247
2269
  var customerFees = priceFromCents(currentPlan.customer_total_cost_amount);
2248
2270
  var isCredit = currentPlan.installments_count > 4;
2249
- return /*#__PURE__*/React__default.createElement("div", {
2271
+ var firstInstallmentAmount = priceFromCents((_currentPlan$payment_ = (_currentPlan$payment_2 = currentPlan.payment_plan) == null || (_currentPlan$payment_2 = _currentPlan$payment_2[0]) == null ? void 0 : _currentPlan$payment_2.total_amount) != null ? _currentPlan$payment_ : 0);
2272
+ // For totalWithoutFirstInstallment, we need to get the total price and add the credit cost, before removing the first installment, to get the rest of the amount to pay.
2273
+ var totalWithoutFirstInstallment = priceFromCents(currentPlan.purchase_amount + currentPlan.customer_total_cost_amount - ((_currentPlan$payment_3 = (_currentPlan$payment_4 = currentPlan.payment_plan) == null || (_currentPlan$payment_4 = _currentPlan$payment_4[0]) == null ? void 0 : _currentPlan$payment_4.total_amount) != null ? _currentPlan$payment_3 : 0));
2274
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, isCredit && ( /*#__PURE__*/React__default.createElement("div", {
2275
+ className: s.creditInfo
2276
+ }, /*#__PURE__*/React__default.createElement("span", {
2277
+ className: s.creditInfoTitle
2278
+ }, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2279
+ id: "credit-features.information.title",
2280
+ defaultMessage: "Un cr\xE9dit vous engage et doit \xEAtre rembours\xE9."
2281
+ })), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2282
+ id: "credit-features.information",
2283
+ defaultMessage: "V\xE9rifiez vos capacit\xE9s de remboursement avant de vous engager."
2284
+ }))), /*#__PURE__*/React__default.createElement("div", {
2250
2285
  className: cx(s.container, STATIC_CUSTOMISATION_CLASSES.summary),
2251
2286
  "data-testid": "modal-summary"
2252
2287
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -2287,7 +2322,31 @@ var TotalBlock = function TotalBlock(_ref) {
2287
2322
  value: customerFees,
2288
2323
  style: "currency",
2289
2324
  currency: "EUR"
2290
- }))))));
2325
+ }))))), isCredit && ( /*#__PURE__*/React__default.createElement("div", {
2326
+ className: s.creditInfoLegalText
2327
+ }, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2328
+ id: "credit-features.legal-text",
2329
+ defaultMessage: "Cr\xE9dit d'un montant de {totalWithoutFirstInstallment} au taux d\xE9biteur fixe de {taegPercentage} sur une dur\xE9e de {installmeentsCountWithoutFirst} mois. Permettant, en compl\xE9ment d'un acompte de {firstInstallmentAmount}, de financer un achat d'un montant de {productPriceWithoutCreditCost}. Sous r\xE9serve d'\xE9tude et d'acceptation par Alma. D\xE9lai l\xE9gal de r\xE9tractation de 14 jours. Simulation pr\xE9sent\xE9e par Alma, immatricul\xE9e au RCS Nanterre sous le num\xE9ro 839 100 575, \xE9tablissement de paiement\xA0et soci\xE9t\xE9 de financement agr\xE9\xE9e par l\u2019ACPR sous le n\xB0 17408 (num\xE9ro CIB / Code banque).",
2330
+ values: {
2331
+ totalWithoutFirstInstallment: intl.formatNumber(totalWithoutFirstInstallment, {
2332
+ style: 'currency',
2333
+ currency: 'EUR'
2334
+ }),
2335
+ taegPercentage: intl.formatNumber(TAEG, {
2336
+ style: 'percent',
2337
+ maximumFractionDigits: 2
2338
+ }),
2339
+ installmeentsCountWithoutFirst: currentPlan.installments_count - 1,
2340
+ firstInstallmentAmount: intl.formatNumber(firstInstallmentAmount, {
2341
+ style: 'currency',
2342
+ currency: 'EUR'
2343
+ }),
2344
+ productPriceWithoutCreditCost: intl.formatNumber(total - creditCost, {
2345
+ style: 'currency',
2346
+ currency: 'EUR'
2347
+ })
2348
+ }
2349
+ })))));
2291
2350
  };
2292
2351
 
2293
2352
  var s$1 = {"loadingIndicator":"_31lrj","bounce":"_3NtDa"};
@@ -2365,6 +2424,8 @@ var ControlledModal = function ControlledModal(_ref) {
2365
2424
  }, children));
2366
2425
  };
2367
2426
 
2427
+ var s$3 = {"openModalInfo":"_bplXm"};
2428
+
2368
2429
  var paymentPlanShorthandName = function paymentPlanShorthandName(payment) {
2369
2430
  var deferred_days = payment.deferred_days,
2370
2431
  deferred_months = payment.deferred_months,
@@ -2468,6 +2529,15 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
2468
2529
  var areInstallmentsOfSameAmount = payment_plan == null ? void 0 : payment_plan.every(function (installment, index) {
2469
2530
  return index === 0 || installment.total_amount === payment_plan[0].total_amount;
2470
2531
  });
2532
+ if (installmentsCount > 4) {
2533
+ return /*#__PURE__*/React__default.createElement("span", {
2534
+ className: s$3.openModalInfo
2535
+ }, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2536
+ id: "payment-plan-strings.credit",
2537
+ defaultMessage: "Cliquez pour en savoir plus",
2538
+ description: "Link to credit details"
2539
+ }));
2540
+ }
2471
2541
  if (isP1X(payment)) {
2472
2542
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2473
2543
  id: "payment-plan-strings.pay-now",
@@ -2520,41 +2590,41 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
2520
2590
  });
2521
2591
  };
2522
2592
 
2523
- var s$3 = {"buttons":"_1l2Oa","active":"_3rue7","textButton":"_2T78a"};
2593
+ var s$4 = {"buttons":"_1l2Oa","active":"_3rue7","textButton":"_2T78a"};
2524
2594
 
2525
2595
  var EligibilityPlansButtons = function EligibilityPlansButtons(_ref) {
2526
2596
  var eligibilityPlans = _ref.eligibilityPlans,
2527
2597
  currentPlanIndex = _ref.currentPlanIndex,
2528
2598
  setCurrentPlanIndex = _ref.setCurrentPlanIndex;
2529
2599
  return /*#__PURE__*/React__default.createElement("div", {
2530
- className: cx(s$3.buttons, STATIC_CUSTOMISATION_CLASSES.eligibilityOptions)
2600
+ className: cx(s$4.buttons, STATIC_CUSTOMISATION_CLASSES.eligibilityOptions)
2531
2601
  }, eligibilityPlans.map(function (eligibilityPlan, index) {
2532
2602
  var _cx;
2533
2603
  return /*#__PURE__*/React__default.createElement("button", {
2534
2604
  key: index,
2535
- className: cx((_cx = {}, _cx[cx(s$3.active, STATIC_CUSTOMISATION_CLASSES.activeOption)] = index === currentPlanIndex, _cx)),
2605
+ className: cx((_cx = {}, _cx[cx(s$4.active, STATIC_CUSTOMISATION_CLASSES.activeOption)] = index === currentPlanIndex, _cx)),
2536
2606
  onClick: function onClick() {
2537
2607
  return setCurrentPlanIndex(index);
2538
2608
  }
2539
2609
  }, /*#__PURE__*/React__default.createElement("span", {
2540
- className: s$3.textButton
2610
+ className: s$4.textButton
2541
2611
  }, paymentPlanShorthandName(eligibilityPlan)));
2542
2612
  }));
2543
2613
  };
2544
2614
 
2545
- var s$4 = {"installment":"_z2Uiv","date":"_2lJQy","dot":"_1Z9wr","isCurrent":"_2Nmkl","bold":"_ezY-3"};
2615
+ var s$5 = {"installment":"_z2Uiv","date":"_2lJQy","dot":"_1Z9wr","isCurrent":"_2Nmkl","bold":"_ezY-3"};
2546
2616
 
2547
2617
  var Installment = function Installment(_ref) {
2548
2618
  var _cx, _cx2;
2549
2619
  var installment = _ref.installment,
2550
2620
  index = _ref.index;
2551
2621
  return /*#__PURE__*/React__default.createElement("div", {
2552
- className: s$4.installment,
2622
+ className: s$5.installment,
2553
2623
  "data-testid": "installment-" + index
2554
2624
  }, /*#__PURE__*/React__default.createElement("div", {
2555
- className: s$4.date
2625
+ className: s$5.date
2556
2626
  }, /*#__PURE__*/React__default.createElement("div", {
2557
- className: cx(s$4.dot, (_cx = {}, _cx[s$4.isCurrent] = index === 0, _cx))
2627
+ className: cx(s$5.dot, (_cx = {}, _cx[s$5.isCurrent] = index === 0, _cx))
2558
2628
  }), dateFns.isToday(installment.due_date * 1000) ? ( /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2559
2629
  id: "installments.today",
2560
2630
  defaultMessage: "Aujourd'hui",
@@ -2565,7 +2635,7 @@ var Installment = function Installment(_ref) {
2565
2635
  month: "long",
2566
2636
  year: "numeric"
2567
2637
  }))), /*#__PURE__*/React__default.createElement("div", {
2568
- className: cx((_cx2 = {}, _cx2[s$4.bold] = index === 0, _cx2))
2638
+ className: cx((_cx2 = {}, _cx2[s$5.bold] = index === 0, _cx2))
2569
2639
  }, /*#__PURE__*/React__default.createElement(reactIntl.FormattedNumber, {
2570
2640
  value: installment.total_amount / 100,
2571
2641
  style: "currency",
@@ -2573,13 +2643,12 @@ var Installment = function Installment(_ref) {
2573
2643
  })));
2574
2644
  };
2575
2645
 
2576
- var s$5 = {"schedule":"_MPKjS","creditInfo":"_3a7er"};
2646
+ var s$6 = {"schedule":"_MPKjS"};
2577
2647
 
2578
2648
  var Schedule = function Schedule(_ref) {
2579
2649
  var currentPlan = _ref.currentPlan;
2580
- var isCredit = currentPlan.installments_count > 4;
2581
2650
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
2582
- className: cx(s$5.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
2651
+ className: cx(s$6.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
2583
2652
  "data-testid": "modal-installments-element"
2584
2653
  }, ((currentPlan == null ? void 0 : currentPlan.payment_plan) || []).map(function (installment, index) {
2585
2654
  return /*#__PURE__*/React__default.createElement(Installment, {
@@ -2587,12 +2656,7 @@ var Schedule = function Schedule(_ref) {
2587
2656
  installment: installment,
2588
2657
  index: index
2589
2658
  });
2590
- }), isCredit && ( /*#__PURE__*/React__default.createElement("div", {
2591
- className: s$5.creditInfo
2592
- }, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2593
- id: "credit-features.information",
2594
- defaultMessage: "Un cr\xE9dit vous engage et doit \xEAtre rembours\xE9. V\xE9rifiez vos capacit\xE9s de remboursement avant de vous engager."
2595
- })))));
2659
+ })));
2596
2660
  };
2597
2661
 
2598
2662
  var _excluded$1 = ["color"];
@@ -2765,7 +2829,7 @@ var CbCard = function CbCard() {
2765
2829
  }))));
2766
2830
  };
2767
2831
 
2768
- var s$6 = {"cardContainer":"_1N3yO"};
2832
+ var s$7 = {"cardContainer":"_1N3yO"};
2769
2833
 
2770
2834
  var Cards = function Cards(_ref) {
2771
2835
  var cards = _ref.cards;
@@ -2773,17 +2837,17 @@ var Cards = function Cards(_ref) {
2773
2837
  var uniqueCards = Array.from(new Set(cards));
2774
2838
  return /*#__PURE__*/React__default.createElement("div", {
2775
2839
  "data-testid": "card-logos",
2776
- className: cx(s$6.cardContainer, STATIC_CUSTOMISATION_CLASSES.cardContainer)
2840
+ className: cx(s$7.cardContainer, STATIC_CUSTOMISATION_CLASSES.cardContainer)
2777
2841
  }, uniqueCards.map(function (card) {
2778
2842
  return /*#__PURE__*/React__default.createElement("div", {
2779
2843
  key: card,
2780
- className: s$6.card,
2844
+ className: s$7.card,
2781
2845
  "data-testid": "card-logo-" + card
2782
2846
  }, card === 'cb' && /*#__PURE__*/React__default.createElement(CbCard, null), card === 'amex' && /*#__PURE__*/React__default.createElement(AmexCard, null), card === 'mastercard' && /*#__PURE__*/React__default.createElement(MasterCard, null), card === 'visa' && /*#__PURE__*/React__default.createElement(VisaCard, null));
2783
2847
  }));
2784
2848
  };
2785
2849
 
2786
- var s$7 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
2850
+ var s$8 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
2787
2851
 
2788
2852
  var Info = function Info(_ref) {
2789
2853
  var isCurrentPlanP1X = _ref.isCurrentPlanP1X;
@@ -2791,12 +2855,12 @@ var Info = function Info(_ref) {
2791
2855
  /*#__PURE__*/
2792
2856
  // TODO: refactor this component into subcomponent to factorise code and be cleaner
2793
2857
  React__default.createElement("div", {
2794
- className: cx(s$7.list, STATIC_CUSTOMISATION_CLASSES.info),
2858
+ className: cx(s$8.list, STATIC_CUSTOMISATION_CLASSES.info),
2795
2859
  "data-testid": "modal-info-element"
2796
2860
  }, /*#__PURE__*/React__default.createElement("div", {
2797
- className: s$7.listItem
2861
+ className: s$8.listItem
2798
2862
  }, /*#__PURE__*/React__default.createElement("div", {
2799
- className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
2863
+ className: cx(s$8.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
2800
2864
  }, "1"), /*#__PURE__*/React__default.createElement("div", {
2801
2865
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2802
2866
  }, isCurrentPlanP1X ? ( /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
@@ -2816,9 +2880,9 @@ var Info = function Info(_ref) {
2816
2880
  }
2817
2881
  }
2818
2882
  })))), /*#__PURE__*/React__default.createElement("div", {
2819
- className: s$7.listItem
2883
+ className: s$8.listItem
2820
2884
  }, /*#__PURE__*/React__default.createElement("div", {
2821
- className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
2885
+ className: cx(s$8.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
2822
2886
  }, "2"), /*#__PURE__*/React__default.createElement("div", {
2823
2887
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2824
2888
  }, isCurrentPlanP1X ? ( /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
@@ -2838,9 +2902,9 @@ var Info = function Info(_ref) {
2838
2902
  }
2839
2903
  }
2840
2904
  })))), /*#__PURE__*/React__default.createElement("div", {
2841
- className: s$7.listItem
2905
+ className: s$8.listItem
2842
2906
  }, /*#__PURE__*/React__default.createElement("div", {
2843
- className: cx(s$7.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
2907
+ className: cx(s$8.bullet, STATIC_CUSTOMISATION_CLASSES.bullet)
2844
2908
  }, "3"), /*#__PURE__*/React__default.createElement("div", {
2845
2909
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2846
2910
  }, isCurrentPlanP1X ? ( /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
@@ -2863,13 +2927,13 @@ var Info = function Info(_ref) {
2863
2927
  );
2864
2928
  };
2865
2929
 
2866
- var s$8 = {"title":"_3ERx-"};
2930
+ var s$9 = {"title":"_3ERx-"};
2867
2931
 
2868
2932
  var Title = function Title(_ref) {
2869
2933
  var isSomePlanDeferred = _ref.isSomePlanDeferred,
2870
2934
  isCurrentPlanP1X = _ref.isCurrentPlanP1X;
2871
2935
  return /*#__PURE__*/React__default.createElement("div", {
2872
- className: cx(s$8.title, STATIC_CUSTOMISATION_CLASSES.title),
2936
+ className: cx(s$9.title, STATIC_CUSTOMISATION_CLASSES.title),
2873
2937
  "data-testid": "modal-title-element"
2874
2938
  }, isSomePlanDeferred ? ( /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2875
2939
  id: "eligibility-modal.title-deferred-plan",
@@ -2883,7 +2947,7 @@ var Title = function Title(_ref) {
2883
2947
  })));
2884
2948
  };
2885
2949
 
2886
- var s$9 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC","logo":"_xW3wt"};
2950
+ var s$a = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC","logo":"_xW3wt"};
2887
2951
 
2888
2952
  var DesktopModal = function DesktopModal(_ref) {
2889
2953
  var children = _ref.children,
@@ -2891,10 +2955,10 @@ var DesktopModal = function DesktopModal(_ref) {
2891
2955
  cards = _ref.cards,
2892
2956
  isCurrentPlanP1X = _ref.isCurrentPlanP1X;
2893
2957
  return /*#__PURE__*/React__default.createElement("div", {
2894
- className: cx(s$9.container, STATIC_CUSTOMISATION_CLASSES.desktopModal),
2958
+ className: cx(s$a.container, STATIC_CUSTOMISATION_CLASSES.desktopModal),
2895
2959
  "data-testid": "modal-container"
2896
2960
  }, /*#__PURE__*/React__default.createElement("aside", {
2897
- className: cx([s$9.block, s$9.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
2961
+ className: cx([s$a.block, s$a.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
2898
2962
  }, /*#__PURE__*/React__default.createElement(Title, {
2899
2963
  isSomePlanDeferred: isSomePlanDeferred,
2900
2964
  isCurrentPlanP1X: isCurrentPlanP1X
@@ -2903,16 +2967,16 @@ var DesktopModal = function DesktopModal(_ref) {
2903
2967
  }), cards && /*#__PURE__*/React__default.createElement(Cards, {
2904
2968
  cards: cards
2905
2969
  }), /*#__PURE__*/React__default.createElement(AlmaLogo, {
2906
- className: s$9.logo,
2970
+ className: s$a.logo,
2907
2971
  width: "75"
2908
2972
  })), /*#__PURE__*/React__default.createElement("div", {
2909
- className: cx(s$9.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
2973
+ className: cx(s$a.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
2910
2974
  }, children));
2911
2975
  };
2912
2976
 
2913
- var s$a = {"noEligibility":"_17qNJ","loader":"_2oTJq","scheduleArea":"_2u9rj","verticalLine":"_VRdAU"};
2977
+ var s$b = {"noEligibility":"_17qNJ","loader":"_2oTJq","scheduleArea":"_2u9rj","verticalLine":"_VRdAU"};
2914
2978
 
2915
- var s$b = {"container":"_2G7Ch","logo":"_2779r"};
2979
+ var s$c = {"container":"_2G7Ch","logo":"_2779r"};
2916
2980
 
2917
2981
  var MobileModal = function MobileModal(_ref) {
2918
2982
  var children = _ref.children,
@@ -2920,7 +2984,7 @@ var MobileModal = function MobileModal(_ref) {
2920
2984
  cards = _ref.cards,
2921
2985
  isCurrentPlanP1X = _ref.isCurrentPlanP1X;
2922
2986
  return /*#__PURE__*/React__default.createElement("div", {
2923
- className: cx(s$b.container, STATIC_CUSTOMISATION_CLASSES.mobileModal),
2987
+ className: cx(s$c.container, STATIC_CUSTOMISATION_CLASSES.mobileModal),
2924
2988
  "data-testid": "modal-container"
2925
2989
  }, /*#__PURE__*/React__default.createElement(Title, {
2926
2990
  isSomePlanDeferred: isSomePlanDeferred,
@@ -2930,7 +2994,7 @@ var MobileModal = function MobileModal(_ref) {
2930
2994
  }), cards && /*#__PURE__*/React__default.createElement(Cards, {
2931
2995
  cards: cards
2932
2996
  }), /*#__PURE__*/React__default.createElement(AlmaLogo, {
2933
- className: s$b.logo,
2997
+ className: s$c.logo,
2934
2998
  width: "75"
2935
2999
  }));
2936
3000
  };
@@ -2965,9 +3029,9 @@ var EligibilityModal = function EligibilityModal(_ref) {
2965
3029
  cards: cards,
2966
3030
  isCurrentPlanP1X: isP1X(currentPlan)
2967
3031
  }, status === statusResponse.PENDING && ( /*#__PURE__*/React__default.createElement("div", {
2968
- className: s$a.loader
3032
+ className: s$b.loader
2969
3033
  }, /*#__PURE__*/React__default.createElement(LoadingIndicator, null))), status === statusResponse.SUCCESS && eligiblePlans.length === 0 && ( /*#__PURE__*/React__default.createElement("div", {
2970
- className: s$a.noEligibility
3034
+ className: s$b.noEligibility
2971
3035
  }, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2972
3036
  id: "eligibility-modal.no-eligibility",
2973
3037
  defaultMessage: "Oups, il semblerait que la simulation n'ait pas fonctionn\xE9."
@@ -2976,9 +3040,9 @@ var EligibilityModal = function EligibilityModal(_ref) {
2976
3040
  currentPlanIndex: currentPlanIndex,
2977
3041
  setCurrentPlanIndex: setCurrentPlanIndex
2978
3042
  }), /*#__PURE__*/React__default.createElement("div", {
2979
- className: s$a.scheduleArea
3043
+ className: s$b.scheduleArea
2980
3044
  }, /*#__PURE__*/React__default.createElement("div", {
2981
- className: s$a.verticalLine
3045
+ className: s$b.verticalLine
2982
3046
  }), /*#__PURE__*/React__default.createElement(Schedule, {
2983
3047
  currentPlan: currentPlan
2984
3048
  }), /*#__PURE__*/React__default.createElement(TotalBlock, {
@@ -3009,17 +3073,17 @@ var ModalContainer = function ModalContainer(_ref) {
3009
3073
  });
3010
3074
  };
3011
3075
 
3012
- var s$c = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
3076
+ var s$d = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
3013
3077
 
3014
3078
  var Loader = function Loader(_ref) {
3015
3079
  var className = _ref.className;
3016
3080
  return /*#__PURE__*/React__default.createElement("div", {
3017
- className: cx(s$c.loadingIndicator, className),
3081
+ className: cx(s$d.loadingIndicator, className),
3018
3082
  "data-testid": "loader"
3019
3083
  }, /*#__PURE__*/React__default.createElement("div", {
3020
- className: s$c.line1
3084
+ className: s$d.line1
3021
3085
  }), /*#__PURE__*/React__default.createElement("div", {
3022
- className: s$c.line2
3086
+ className: s$d.line2
3023
3087
  }));
3024
3088
  };
3025
3089
 
@@ -3111,7 +3175,7 @@ var STATIC_CUSTOMISATION_CLASSES$1 = {
3111
3175
  activeOption: prefix$1 + '-active-option'
3112
3176
  };
3113
3177
 
3114
- var s$d = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","monochrome":"_2hx83","notEligible":"_3O1bg","hideBorder":"_3_qcn","info":"_25GrF","loader":"_30j1O","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
3178
+ var s$e = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","monochrome":"_2hx83","notEligible":"_3O1bg","hideBorder":"_3_qcn","info":"_25GrF","loader":"_30j1O","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
3115
3179
 
3116
3180
  var VERY_LONG_TIME_IN_MS = 1000 * 3600;
3117
3181
  var DEFAULT_TRANSITION_TIME = 5500;
@@ -3195,7 +3259,7 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
3195
3259
  };
3196
3260
  if (status === statusResponse.PENDING) {
3197
3261
  return /*#__PURE__*/React__default.createElement("div", {
3198
- className: cx(s$d.widgetButton, s$d.pending)
3262
+ className: cx(s$e.widgetButton, s$e.pending)
3199
3263
  }, /*#__PURE__*/React__default.createElement(Loader, null));
3200
3264
  }
3201
3265
  if (hideIfNotEligible && eligiblePlans.length === 0 || eligibilityPlans.length === 0 || status === statusResponse.FAILED) {
@@ -3209,15 +3273,15 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
3209
3273
  };
3210
3274
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
3211
3275
  onClick: handleOpenModal,
3212
- className: cx(s$d.widgetButton, (_cx = {}, _cx[s$d.clickable] = eligiblePlans.length > 0, _cx[s$d.unClickable] = eligiblePlans.length === 0, _cx[s$d.hideBorder] = hideBorder, _cx), STATIC_CUSTOMISATION_CLASSES$1.container),
3276
+ className: cx(s$e.widgetButton, (_cx = {}, _cx[s$e.clickable] = eligiblePlans.length > 0, _cx[s$e.unClickable] = eligiblePlans.length === 0, _cx[s$e.hideBorder] = hideBorder, _cx), STATIC_CUSTOMISATION_CLASSES$1.container),
3213
3277
  "data-testid": "widget-button"
3214
3278
  }, /*#__PURE__*/React__default.createElement("div", {
3215
- className: cx(s$d.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
3279
+ className: cx(s$e.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
3216
3280
  }, /*#__PURE__*/React__default.createElement(AlmaLogo, {
3217
- className: s$d.logo,
3281
+ className: s$e.logo,
3218
3282
  color: monochrome ? 'var(--off-black)' : undefined
3219
3283
  }), /*#__PURE__*/React__default.createElement("div", {
3220
- className: cx(s$d.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
3284
+ className: cx(s$e.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
3221
3285
  }, eligibilityPlans.map(function (eligibilityPlan, key) {
3222
3286
  var _cx2;
3223
3287
  var isCurrent = key === current;
@@ -3231,10 +3295,10 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
3231
3295
  },
3232
3296
  onMouseOut: onLeave,
3233
3297
  onTouchEnd: onLeave,
3234
- className: cx(s$d.plan, (_cx2 = {}, _cx2[cx(s$d.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = isCurrent, _cx2[s$d.monochrome] = monochrome && isCurrent, _cx2[cx(s$d.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
3298
+ className: cx(s$e.plan, (_cx2 = {}, _cx2[cx(s$e.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = isCurrent, _cx2[s$e.monochrome] = monochrome && isCurrent, _cx2[cx(s$e.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
3235
3299
  }, paymentPlanShorthandName(eligibilityPlan));
3236
3300
  }))), /*#__PURE__*/React__default.createElement("div", {
3237
- className: cx(s$d.info, (_cx3 = {}, _cx3[cx(s$d.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3), STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
3301
+ className: cx(s$e.info, (_cx3 = {}, _cx3[cx(s$e.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3), STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
3238
3302
  }, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && ( /*#__PURE__*/React__default.createElement(EligibilityModal, {
3239
3303
  initialPlanIndex: getIndexWithinEligiblePlans(current),
3240
3304
  onClose: closeModal,