@mj-biz-apps/orders-ng 5.32.0 → 5.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/checkout-element/main.js +344 -50
  2. package/dist/lib/checkout-widget/checkout-public-host.component.d.ts +19 -1
  3. package/dist/lib/checkout-widget/checkout-public-host.component.d.ts.map +1 -1
  4. package/dist/lib/checkout-widget/checkout-public-host.component.js +249 -43
  5. package/dist/lib/checkout-widget/checkout-public-host.component.js.map +1 -1
  6. package/dist/lib/checkout-widget/checkout-renewal.d.ts +22 -0
  7. package/dist/lib/checkout-widget/checkout-renewal.d.ts.map +1 -0
  8. package/dist/lib/checkout-widget/checkout-renewal.js +33 -0
  9. package/dist/lib/checkout-widget/checkout-renewal.js.map +1 -0
  10. package/dist/lib/custom/OrderHeader/line-extension-fields.d.ts +5 -0
  11. package/dist/lib/custom/OrderHeader/line-extension-fields.d.ts.map +1 -1
  12. package/dist/lib/custom/OrderHeader/line-extension-fields.js +8 -0
  13. package/dist/lib/custom/OrderHeader/line-extension-fields.js.map +1 -1
  14. package/dist/lib/custom/OrderHeader/line-stamped-tags.d.ts +44 -0
  15. package/dist/lib/custom/OrderHeader/line-stamped-tags.d.ts.map +1 -0
  16. package/dist/lib/custom/OrderHeader/line-stamped-tags.js +49 -0
  17. package/dist/lib/custom/OrderHeader/line-stamped-tags.js.map +1 -0
  18. package/dist/lib/custom/OrderHeader/order-line-details-panel.component.d.ts +51 -2
  19. package/dist/lib/custom/OrderHeader/order-line-details-panel.component.d.ts.map +1 -1
  20. package/dist/lib/custom/OrderHeader/order-line-details-panel.component.js +277 -67
  21. package/dist/lib/custom/OrderHeader/order-line-details-panel.component.js.map +1 -1
  22. package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts +41 -2
  23. package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts.map +1 -1
  24. package/dist/lib/custom/OrderHeader/order-lines-editor.component.js +413 -251
  25. package/dist/lib/custom/OrderHeader/order-lines-editor.component.js.map +1 -1
  26. package/dist/lib/custom/Product/product-save-guard-form.component.js +81 -62
  27. package/dist/lib/custom/Product/product-save-guard-form.component.js.map +1 -1
  28. package/dist/lib/data/entity-names.d.ts +1 -0
  29. package/dist/lib/data/entity-names.d.ts.map +1 -1
  30. package/dist/lib/data/entity-names.js +1 -0
  31. package/dist/lib/data/entity-names.js.map +1 -1
  32. package/dist/lib/data/orders-queries.d.ts +23 -0
  33. package/dist/lib/data/orders-queries.d.ts.map +1 -1
  34. package/dist/lib/data/orders-queries.js +44 -0
  35. package/dist/lib/data/orders-queries.js.map +1 -1
  36. package/dist/lib/form-panels/charge-exception-order.panel.d.ts +59 -0
  37. package/dist/lib/form-panels/charge-exception-order.panel.d.ts.map +1 -0
  38. package/dist/lib/form-panels/charge-exception-order.panel.js +330 -0
  39. package/dist/lib/form-panels/charge-exception-order.panel.js.map +1 -0
  40. package/dist/lib/form-panels/document-forms.module.d.ts +9 -8
  41. package/dist/lib/form-panels/document-forms.module.d.ts.map +1 -1
  42. package/dist/lib/form-panels/document-forms.module.js +10 -3
  43. package/dist/lib/form-panels/document-forms.module.js.map +1 -1
  44. package/dist/lib/form-panels/subscription-terms.panel.d.ts +2 -0
  45. package/dist/lib/form-panels/subscription-terms.panel.d.ts.map +1 -1
  46. package/dist/lib/form-panels/subscription-terms.panel.js +18 -8
  47. package/dist/lib/form-panels/subscription-terms.panel.js.map +1 -1
  48. package/dist/lib/generated/Entities/mjBizAppsOrdersChargeType/mjbizappsorderschargetype.form.component.d.ts.map +1 -1
  49. package/dist/lib/generated/Entities/mjBizAppsOrdersChargeType/mjbizappsorderschargetype.form.component.js +23 -5
  50. package/dist/lib/generated/Entities/mjBizAppsOrdersChargeType/mjbizappsorderschargetype.form.component.js.map +1 -1
  51. package/dist/lib/generated/Entities/mjBizAppsOrdersEventOrderLine/mjbizappsorderseventorderline.form.component.js +14 -6
  52. package/dist/lib/generated/Entities/mjBizAppsOrdersEventOrderLine/mjbizappsorderseventorderline.form.component.js.map +1 -1
  53. package/dist/lib/generated/Entities/mjBizAppsOrdersEventProduct/mjbizappsorderseventproduct.form.component.js +8 -6
  54. package/dist/lib/generated/Entities/mjBizAppsOrdersEventProduct/mjbizappsorderseventproduct.form.component.js.map +1 -1
  55. package/dist/lib/generated/Entities/mjBizAppsOrdersInstalmentLineBilling/mjbizappsordersinstalmentlinebilling.form.component.d.ts +10 -0
  56. package/dist/lib/generated/Entities/mjBizAppsOrdersInstalmentLineBilling/mjbizappsordersinstalmentlinebilling.form.component.d.ts.map +1 -0
  57. package/dist/lib/generated/Entities/mjBizAppsOrdersInstalmentLineBilling/mjbizappsordersinstalmentlinebilling.form.component.js +80 -0
  58. package/dist/lib/generated/Entities/mjBizAppsOrdersInstalmentLineBilling/mjbizappsordersinstalmentlinebilling.form.component.js.map +1 -0
  59. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderConcession/mjbizappsordersorderconcession.form.component.d.ts.map +1 -1
  60. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderConcession/mjbizappsordersorderconcession.form.component.js +35 -14
  61. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderConcession/mjbizappsordersorderconcession.form.component.js.map +1 -1
  62. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeader/mjbizappsordersorderheader.form.component.js +97 -93
  63. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeader/mjbizappsordersorderheader.form.component.js.map +1 -1
  64. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeaderPaymentSchedule/mjbizappsordersorderheaderpaymentschedule.form.component.d.ts.map +1 -1
  65. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeaderPaymentSchedule/mjbizappsordersorderheaderpaymentschedule.form.component.js +58 -20
  66. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeaderPaymentSchedule/mjbizappsordersorderheaderpaymentschedule.form.component.js.map +1 -1
  67. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderLine/mjbizappsordersorderline.form.component.js +127 -105
  68. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderLine/mjbizappsordersorderline.form.component.js.map +1 -1
  69. package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProvider/mjbizappsorderspaymentprovider.form.component.d.ts.map +1 -1
  70. package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProvider/mjbizappsorderspaymentprovider.form.component.js +31 -13
  71. package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProvider/mjbizappsorderspaymentprovider.form.component.js.map +1 -1
  72. package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProviderPrice/mjbizappsorderspaymentproviderprice.form.component.d.ts +10 -0
  73. package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProviderPrice/mjbizappsorderspaymentproviderprice.form.component.d.ts.map +1 -0
  74. package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProviderPrice/mjbizappsorderspaymentproviderprice.form.component.js +80 -0
  75. package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentProviderPrice/mjbizappsorderspaymentproviderprice.form.component.js.map +1 -0
  76. package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentTermsType/mjbizappsorderspaymenttermstype.form.component.js +2 -2
  77. package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.d.ts.map +1 -1
  78. package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.js +83 -63
  79. package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.js.map +1 -1
  80. package/dist/lib/generated/Entities/mjBizAppsOrdersProductCategory/mjbizappsordersproductcategory.form.component.js +33 -31
  81. package/dist/lib/generated/Entities/mjBizAppsOrdersProductCategory/mjbizappsordersproductcategory.form.component.js.map +1 -1
  82. package/dist/lib/generated/Entities/mjBizAppsOrdersProductType/mjbizappsordersproducttype.form.component.js +15 -13
  83. package/dist/lib/generated/Entities/mjBizAppsOrdersProductType/mjbizappsordersproducttype.form.component.js.map +1 -1
  84. package/dist/lib/generated/Entities/mjBizAppsOrdersPromotion/mjbizappsorderspromotion.form.component.js +33 -31
  85. package/dist/lib/generated/Entities/mjBizAppsOrdersPromotion/mjbizappsorderspromotion.form.component.js.map +1 -1
  86. package/dist/lib/generated/Entities/mjBizAppsOrdersReferralProgram/mjbizappsordersreferralprogram.form.component.d.ts +10 -0
  87. package/dist/lib/generated/Entities/mjBizAppsOrdersReferralProgram/mjbizappsordersreferralprogram.form.component.d.ts.map +1 -0
  88. package/dist/lib/generated/Entities/mjBizAppsOrdersReferralProgram/mjbizappsordersreferralprogram.form.component.js +93 -0
  89. package/dist/lib/generated/Entities/mjBizAppsOrdersReferralProgram/mjbizappsordersreferralprogram.form.component.js.map +1 -0
  90. package/dist/lib/generated/Entities/mjBizAppsOrdersSalesAuthority/mjbizappsorderssalesauthority.form.component.js +2 -2
  91. package/dist/lib/generated/Entities/mjBizAppsOrdersSalesRule/mjbizappsorderssalesrule.form.component.d.ts.map +1 -1
  92. package/dist/lib/generated/Entities/mjBizAppsOrdersSalesRule/mjbizappsorderssalesrule.form.component.js +27 -11
  93. package/dist/lib/generated/Entities/mjBizAppsOrdersSalesRule/mjbizappsorderssalesrule.form.component.js.map +1 -1
  94. package/dist/lib/generated/Entities/mjBizAppsOrdersSubscriptionTerm/mjbizappsorderssubscriptionterm.form.component.d.ts.map +1 -1
  95. package/dist/lib/generated/Entities/mjBizAppsOrdersSubscriptionTerm/mjbizappsorderssubscriptionterm.form.component.js +11 -13
  96. package/dist/lib/generated/Entities/mjBizAppsOrdersSubscriptionTerm/mjbizappsorderssubscriptionterm.form.component.js.map +1 -1
  97. package/dist/lib/generated/generated-forms.module.d.ts +73 -70
  98. package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
  99. package/dist/lib/generated/generated-forms.module.js +11 -2
  100. package/dist/lib/generated/generated-forms.module.js.map +1 -1
  101. package/dist/lib/panels/charge-exception-view.d.ts +30 -0
  102. package/dist/lib/panels/charge-exception-view.d.ts.map +1 -0
  103. package/dist/lib/panels/charge-exception-view.js +42 -0
  104. package/dist/lib/panels/charge-exception-view.js.map +1 -0
  105. package/package.json +3 -3
@@ -39770,6 +39770,33 @@ var TurnstileWidget = class {
39770
39770
  }
39771
39771
  };
39772
39772
 
39773
+ // dist/lib/checkout-widget/checkout-renewal.js
39774
+ function ReadRenewalPayment(response) {
39775
+ if (!response || typeof response !== "object")
39776
+ return null;
39777
+ const renewal = response["RenewalPayment"];
39778
+ if (!renewal || typeof renewal !== "object")
39779
+ return null;
39780
+ const r = renewal;
39781
+ const amount = Number(r["Amount"]);
39782
+ if (typeof r["OrderNumber"] !== "string" || !r["OrderNumber"] || !Number.isFinite(amount) || amount <= 0)
39783
+ return null;
39784
+ return {
39785
+ OrderNumber: r["OrderNumber"],
39786
+ Amount: Math.round(amount * 100) / 100,
39787
+ Description: typeof r["Description"] === "string" ? r["Description"] : "",
39788
+ SubscriptionNumber: typeof r["SubscriptionNumber"] === "string" && r["SubscriptionNumber"] ? r["SubscriptionNumber"] : null,
39789
+ DueDate: typeof r["DueDate"] === "string" && r["DueDate"] ? r["DueDate"] : null
39790
+ };
39791
+ }
39792
+ function FormatRenewalAmount(amount, currency) {
39793
+ const value = amount.toFixed(2);
39794
+ return currency ? `${value} ${currency.toUpperCase()}` : value;
39795
+ }
39796
+ function RenewalPaidMessage(view) {
39797
+ return `Thank you. Renewal ${view.OrderNumber} is paid, and the card you used will be charged for future renewals.`;
39798
+ }
39799
+
39773
39800
  // dist/lib/checkout-widget/checkout-public-host.component.js
39774
39801
  var _c0 = (a0) => [a0];
39775
39802
  function CheckoutPublicHostComponent_Conditional_1_Template(rf, ctx) {
@@ -39786,7 +39813,7 @@ function CheckoutPublicHostComponent_Conditional_1_Template(rf, ctx) {
39786
39813
  }
39787
39814
  function CheckoutPublicHostComponent_Conditional_2_Conditional_7_Template(rf, ctx) {
39788
39815
  if (rf & 1) {
39789
- \u0275\u0275elementStart(0, "p", 8);
39816
+ \u0275\u0275elementStart(0, "p", 9);
39790
39817
  \u0275\u0275text(1);
39791
39818
  \u0275\u0275elementEnd();
39792
39819
  }
@@ -39798,7 +39825,7 @@ function CheckoutPublicHostComponent_Conditional_2_Conditional_7_Template(rf, ct
39798
39825
  }
39799
39826
  function CheckoutPublicHostComponent_Conditional_2_Conditional_8_Template(rf, ctx) {
39800
39827
  if (rf & 1) {
39801
- \u0275\u0275elementStart(0, "p", 12);
39828
+ \u0275\u0275elementStart(0, "p", 13);
39802
39829
  \u0275\u0275text(1);
39803
39830
  \u0275\u0275elementEnd();
39804
39831
  }
@@ -39811,14 +39838,14 @@ function CheckoutPublicHostComponent_Conditional_2_Conditional_8_Template(rf, ct
39811
39838
  }
39812
39839
  function CheckoutPublicHostComponent_Conditional_2_Conditional_9_Template(rf, ctx) {
39813
39840
  if (rf & 1) {
39814
- \u0275\u0275elementStart(0, "p", 10);
39841
+ \u0275\u0275elementStart(0, "p", 11);
39815
39842
  \u0275\u0275text(1, "Setting up your account\u2026");
39816
39843
  \u0275\u0275elementEnd();
39817
39844
  }
39818
39845
  }
39819
39846
  function CheckoutPublicHostComponent_Conditional_2_Conditional_10_Conditional_3_Template(rf, ctx) {
39820
39847
  if (rf & 1) {
39821
- \u0275\u0275elementStart(0, "p", 15);
39848
+ \u0275\u0275elementStart(0, "p", 16);
39822
39849
  \u0275\u0275text(1);
39823
39850
  \u0275\u0275elementEnd();
39824
39851
  }
@@ -39830,7 +39857,7 @@ function CheckoutPublicHostComponent_Conditional_2_Conditional_10_Conditional_3_
39830
39857
  }
39831
39858
  function CheckoutPublicHostComponent_Conditional_2_Conditional_10_Conditional_10_Template(rf, ctx) {
39832
39859
  if (rf & 1) {
39833
- \u0275\u0275elementStart(0, "p", 20);
39860
+ \u0275\u0275elementStart(0, "p", 21);
39834
39861
  \u0275\u0275text(1);
39835
39862
  \u0275\u0275elementEnd();
39836
39863
  }
@@ -39843,42 +39870,42 @@ function CheckoutPublicHostComponent_Conditional_2_Conditional_10_Conditional_10
39843
39870
  function CheckoutPublicHostComponent_Conditional_2_Conditional_10_Template(rf, ctx) {
39844
39871
  if (rf & 1) {
39845
39872
  const _r2 = \u0275\u0275getCurrentView();
39846
- \u0275\u0275elementStart(0, "form", 13);
39873
+ \u0275\u0275elementStart(0, "form", 14);
39847
39874
  \u0275\u0275listener("submit", function CheckoutPublicHostComponent_Conditional_2_Conditional_10_Template_form_submit_0_listener($event) {
39848
39875
  \u0275\u0275restoreView(_r2);
39849
39876
  const ctx_r0 = \u0275\u0275nextContext(2);
39850
39877
  $event.preventDefault();
39851
39878
  return \u0275\u0275resetView(ctx_r0.submitPassword());
39852
39879
  });
39853
- \u0275\u0275elementStart(1, "h2", 14);
39880
+ \u0275\u0275elementStart(1, "h2", 15);
39854
39881
  \u0275\u0275text(2, "Set a password for your account");
39855
39882
  \u0275\u0275elementEnd();
39856
- \u0275\u0275conditionalCreate(3, CheckoutPublicHostComponent_Conditional_2_Conditional_10_Conditional_3_Template, 2, 1, "p", 15);
39857
- \u0275\u0275elementStart(4, "label", 16);
39883
+ \u0275\u0275conditionalCreate(3, CheckoutPublicHostComponent_Conditional_2_Conditional_10_Conditional_3_Template, 2, 1, "p", 16);
39884
+ \u0275\u0275elementStart(4, "label", 17);
39858
39885
  \u0275\u0275text(5, "Password");
39859
39886
  \u0275\u0275elementEnd();
39860
- \u0275\u0275elementStart(6, "input", 17);
39887
+ \u0275\u0275elementStart(6, "input", 18);
39861
39888
  \u0275\u0275listener("input", function CheckoutPublicHostComponent_Conditional_2_Conditional_10_Template_input_input_6_listener($event) {
39862
39889
  \u0275\u0275restoreView(_r2);
39863
39890
  const ctx_r0 = \u0275\u0275nextContext(2);
39864
39891
  return \u0275\u0275resetView(ctx_r0.password = $event.target.value);
39865
39892
  });
39866
39893
  \u0275\u0275elementEnd();
39867
- \u0275\u0275elementStart(7, "label", 18);
39894
+ \u0275\u0275elementStart(7, "label", 19);
39868
39895
  \u0275\u0275text(8, "Confirm password");
39869
39896
  \u0275\u0275elementEnd();
39870
- \u0275\u0275elementStart(9, "input", 19);
39897
+ \u0275\u0275elementStart(9, "input", 20);
39871
39898
  \u0275\u0275listener("input", function CheckoutPublicHostComponent_Conditional_2_Conditional_10_Template_input_input_9_listener($event) {
39872
39899
  \u0275\u0275restoreView(_r2);
39873
39900
  const ctx_r0 = \u0275\u0275nextContext(2);
39874
39901
  return \u0275\u0275resetView(ctx_r0.passwordConfirmation = $event.target.value);
39875
39902
  });
39876
39903
  \u0275\u0275elementEnd();
39877
- \u0275\u0275conditionalCreate(10, CheckoutPublicHostComponent_Conditional_2_Conditional_10_Conditional_10_Template, 2, 1, "p", 20);
39878
- \u0275\u0275elementStart(11, "button", 21);
39904
+ \u0275\u0275conditionalCreate(10, CheckoutPublicHostComponent_Conditional_2_Conditional_10_Conditional_10_Template, 2, 1, "p", 21);
39905
+ \u0275\u0275elementStart(11, "button", 22);
39879
39906
  \u0275\u0275text(12);
39880
39907
  \u0275\u0275elementEnd();
39881
- \u0275\u0275elementStart(13, "button", 22);
39908
+ \u0275\u0275elementStart(13, "button", 23);
39882
39909
  \u0275\u0275listener("click", function CheckoutPublicHostComponent_Conditional_2_Conditional_10_Template_button_click_13_listener() {
39883
39910
  \u0275\u0275restoreView(_r2);
39884
39911
  const ctx_r0 = \u0275\u0275nextContext(2);
@@ -39908,7 +39935,7 @@ function CheckoutPublicHostComponent_Conditional_2_Conditional_10_Template(rf, c
39908
39935
  function CheckoutPublicHostComponent_Conditional_2_Conditional_11_Conditional_2_Conditional_3_Template(rf, ctx) {
39909
39936
  if (rf & 1) {
39910
39937
  const _r4 = \u0275\u0275getCurrentView();
39911
- \u0275\u0275elementStart(0, "button", 26);
39938
+ \u0275\u0275elementStart(0, "button", 27);
39912
39939
  \u0275\u0275listener("click", function CheckoutPublicHostComponent_Conditional_2_Conditional_11_Conditional_2_Conditional_3_Template_button_click_0_listener() {
39913
39940
  \u0275\u0275restoreView(_r4);
39914
39941
  const ctx_r0 = \u0275\u0275nextContext(4);
@@ -39921,7 +39948,7 @@ function CheckoutPublicHostComponent_Conditional_2_Conditional_11_Conditional_2_
39921
39948
  function CheckoutPublicHostComponent_Conditional_2_Conditional_11_Conditional_2_Template(rf, ctx) {
39922
39949
  if (rf & 1) {
39923
39950
  const _r3 = \u0275\u0275getCurrentView();
39924
- \u0275\u0275elementStart(0, "div", 23)(1, "button", 24);
39951
+ \u0275\u0275elementStart(0, "div", 24)(1, "button", 25);
39925
39952
  \u0275\u0275listener("click", function CheckoutPublicHostComponent_Conditional_2_Conditional_11_Conditional_2_Template_button_click_1_listener() {
39926
39953
  \u0275\u0275restoreView(_r3);
39927
39954
  const ctx_r0 = \u0275\u0275nextContext(3);
@@ -39929,7 +39956,7 @@ function CheckoutPublicHostComponent_Conditional_2_Conditional_11_Conditional_2_
39929
39956
  });
39930
39957
  \u0275\u0275text(2, "Try again");
39931
39958
  \u0275\u0275elementEnd();
39932
- \u0275\u0275conditionalCreate(3, CheckoutPublicHostComponent_Conditional_2_Conditional_11_Conditional_2_Conditional_3_Template, 2, 0, "button", 25);
39959
+ \u0275\u0275conditionalCreate(3, CheckoutPublicHostComponent_Conditional_2_Conditional_11_Conditional_2_Conditional_3_Template, 2, 0, "button", 26);
39933
39960
  \u0275\u0275elementEnd();
39934
39961
  }
39935
39962
  if (rf & 2) {
@@ -39940,10 +39967,10 @@ function CheckoutPublicHostComponent_Conditional_2_Conditional_11_Conditional_2_
39940
39967
  }
39941
39968
  function CheckoutPublicHostComponent_Conditional_2_Conditional_11_Template(rf, ctx) {
39942
39969
  if (rf & 1) {
39943
- \u0275\u0275elementStart(0, "p", 10);
39970
+ \u0275\u0275elementStart(0, "p", 11);
39944
39971
  \u0275\u0275text(1);
39945
39972
  \u0275\u0275elementEnd();
39946
- \u0275\u0275conditionalCreate(2, CheckoutPublicHostComponent_Conditional_2_Conditional_11_Conditional_2_Template, 4, 1, "div", 23);
39973
+ \u0275\u0275conditionalCreate(2, CheckoutPublicHostComponent_Conditional_2_Conditional_11_Conditional_2_Template, 4, 1, "div", 24);
39947
39974
  }
39948
39975
  if (rf & 2) {
39949
39976
  const ctx_r0 = \u0275\u0275nextContext(2);
@@ -39955,18 +39982,18 @@ function CheckoutPublicHostComponent_Conditional_2_Conditional_11_Template(rf, c
39955
39982
  }
39956
39983
  function CheckoutPublicHostComponent_Conditional_2_Template(rf, ctx) {
39957
39984
  if (rf & 1) {
39958
- \u0275\u0275elementStart(0, "div", 2)(1, "div", 5);
39985
+ \u0275\u0275elementStart(0, "div", 2)(1, "div", 6);
39959
39986
  \u0275\u0275text(2, "\u2713");
39960
39987
  \u0275\u0275elementEnd();
39961
- \u0275\u0275elementStart(3, "h1", 6);
39988
+ \u0275\u0275elementStart(3, "h1", 7);
39962
39989
  \u0275\u0275text(4, "You're all set");
39963
39990
  \u0275\u0275elementEnd();
39964
- \u0275\u0275elementStart(5, "p", 7);
39991
+ \u0275\u0275elementStart(5, "p", 8);
39965
39992
  \u0275\u0275text(6);
39966
39993
  \u0275\u0275elementEnd();
39967
- \u0275\u0275conditionalCreate(7, CheckoutPublicHostComponent_Conditional_2_Conditional_7_Template, 2, 1, "p", 8);
39968
- \u0275\u0275conditionalCreate(8, CheckoutPublicHostComponent_Conditional_2_Conditional_8_Template, 2, 3, "p", 9);
39969
- \u0275\u0275conditionalCreate(9, CheckoutPublicHostComponent_Conditional_2_Conditional_9_Template, 2, 0, "p", 10)(10, CheckoutPublicHostComponent_Conditional_2_Conditional_10_Template, 15, 7, "form", 11)(11, CheckoutPublicHostComponent_Conditional_2_Conditional_11_Template, 3, 2);
39994
+ \u0275\u0275conditionalCreate(7, CheckoutPublicHostComponent_Conditional_2_Conditional_7_Template, 2, 1, "p", 9);
39995
+ \u0275\u0275conditionalCreate(8, CheckoutPublicHostComponent_Conditional_2_Conditional_8_Template, 2, 3, "p", 10);
39996
+ \u0275\u0275conditionalCreate(9, CheckoutPublicHostComponent_Conditional_2_Conditional_9_Template, 2, 0, "p", 11)(10, CheckoutPublicHostComponent_Conditional_2_Conditional_10_Template, 15, 7, "form", 12)(11, CheckoutPublicHostComponent_Conditional_2_Conditional_11_Template, 3, 2);
39970
39997
  \u0275\u0275elementEnd();
39971
39998
  }
39972
39999
  if (rf & 2) {
@@ -39988,24 +40015,152 @@ function CheckoutPublicHostComponent_Conditional_3_Template(rf, ctx) {
39988
40015
  \u0275\u0275elementEnd();
39989
40016
  }
39990
40017
  }
39991
- function CheckoutPublicHostComponent_Conditional_4_For_1_Template(rf, ctx) {
40018
+ function CheckoutPublicHostComponent_Conditional_4_Conditional_6_Template(rf, ctx) {
40019
+ if (rf & 1) {
40020
+ \u0275\u0275elementStart(0, "div", 32)(1, "dt");
40021
+ \u0275\u0275text(2, "Renewal of");
40022
+ \u0275\u0275elementEnd();
40023
+ \u0275\u0275elementStart(3, "dd");
40024
+ \u0275\u0275text(4);
40025
+ \u0275\u0275elementEnd()();
40026
+ }
40027
+ if (rf & 2) {
40028
+ const ctx_r0 = \u0275\u0275nextContext(2);
40029
+ \u0275\u0275advance(4);
40030
+ \u0275\u0275textInterpolate(ctx_r0.renewal.Description);
40031
+ }
40032
+ }
40033
+ function CheckoutPublicHostComponent_Conditional_4_Conditional_7_Template(rf, ctx) {
40034
+ if (rf & 1) {
40035
+ \u0275\u0275elementStart(0, "div", 32)(1, "dt");
40036
+ \u0275\u0275text(2, "Subscription");
40037
+ \u0275\u0275elementEnd();
40038
+ \u0275\u0275elementStart(3, "dd");
40039
+ \u0275\u0275text(4);
40040
+ \u0275\u0275elementEnd()();
40041
+ }
40042
+ if (rf & 2) {
40043
+ const ctx_r0 = \u0275\u0275nextContext(2);
40044
+ \u0275\u0275advance(4);
40045
+ \u0275\u0275textInterpolate(ctx_r0.renewal.SubscriptionNumber);
40046
+ }
40047
+ }
40048
+ function CheckoutPublicHostComponent_Conditional_4_Conditional_13_Template(rf, ctx) {
40049
+ if (rf & 1) {
40050
+ \u0275\u0275elementStart(0, "div", 32)(1, "dt");
40051
+ \u0275\u0275text(2, "Due");
40052
+ \u0275\u0275elementEnd();
40053
+ \u0275\u0275elementStart(3, "dd");
40054
+ \u0275\u0275text(4);
40055
+ \u0275\u0275elementEnd()();
40056
+ }
40057
+ if (rf & 2) {
40058
+ const ctx_r0 = \u0275\u0275nextContext(2);
40059
+ \u0275\u0275advance(4);
40060
+ \u0275\u0275textInterpolate(ctx_r0.renewal.DueDate);
40061
+ }
40062
+ }
40063
+ function CheckoutPublicHostComponent_Conditional_4_Conditional_19_Template(rf, ctx) {
40064
+ if (rf & 1) {
40065
+ \u0275\u0275elementStart(0, "label", 36);
40066
+ \u0275\u0275text(1, "Card");
40067
+ \u0275\u0275elementEnd();
40068
+ \u0275\u0275element(2, "div", 37);
40069
+ }
40070
+ }
40071
+ function CheckoutPublicHostComponent_Conditional_4_Conditional_22_Template(rf, ctx) {
40072
+ if (rf & 1) {
40073
+ \u0275\u0275elementStart(0, "div", 1);
40074
+ \u0275\u0275text(1);
40075
+ \u0275\u0275elementEnd();
40076
+ }
40077
+ if (rf & 2) {
40078
+ const ctx_r0 = \u0275\u0275nextContext(2);
40079
+ \u0275\u0275advance();
40080
+ \u0275\u0275textInterpolate(ctx_r0.errorMessage);
40081
+ }
40082
+ }
40083
+ function CheckoutPublicHostComponent_Conditional_4_Template(rf, ctx) {
39992
40084
  if (rf & 1) {
39993
40085
  const _r5 = \u0275\u0275getCurrentView();
39994
- \u0275\u0275elementStart(0, "mj-checkout-widget", 28);
39995
- \u0275\u0275listener("promotionCodeApplied", function CheckoutPublicHostComponent_Conditional_4_For_1_Template_mj_checkout_widget_promotionCodeApplied_0_listener($event) {
40086
+ \u0275\u0275elementStart(0, "form", 28);
40087
+ \u0275\u0275listener("submit", function CheckoutPublicHostComponent_Conditional_4_Template_form_submit_0_listener($event) {
39996
40088
  \u0275\u0275restoreView(_r5);
40089
+ const ctx_r0 = \u0275\u0275nextContext();
40090
+ $event.preventDefault();
40091
+ return \u0275\u0275resetView(ctx_r0.payRenewal());
40092
+ });
40093
+ \u0275\u0275elementStart(1, "h1", 29);
40094
+ \u0275\u0275text(2, "Renew your subscription");
40095
+ \u0275\u0275elementEnd();
40096
+ \u0275\u0275elementStart(3, "p", 30);
40097
+ \u0275\u0275text(4, "Your saved card could not be charged. Pay with a new card to keep your subscription active.");
40098
+ \u0275\u0275elementEnd();
40099
+ \u0275\u0275elementStart(5, "dl", 31);
40100
+ \u0275\u0275conditionalCreate(6, CheckoutPublicHostComponent_Conditional_4_Conditional_6_Template, 5, 1, "div", 32);
40101
+ \u0275\u0275conditionalCreate(7, CheckoutPublicHostComponent_Conditional_4_Conditional_7_Template, 5, 1, "div", 32);
40102
+ \u0275\u0275elementStart(8, "div", 32)(9, "dt");
40103
+ \u0275\u0275text(10, "Renewal order");
40104
+ \u0275\u0275elementEnd();
40105
+ \u0275\u0275elementStart(11, "dd");
40106
+ \u0275\u0275text(12);
40107
+ \u0275\u0275elementEnd()();
40108
+ \u0275\u0275conditionalCreate(13, CheckoutPublicHostComponent_Conditional_4_Conditional_13_Template, 5, 1, "div", 32);
40109
+ \u0275\u0275elementStart(14, "div", 33)(15, "dt");
40110
+ \u0275\u0275text(16, "Amount due");
40111
+ \u0275\u0275elementEnd();
40112
+ \u0275\u0275elementStart(17, "dd");
40113
+ \u0275\u0275text(18);
40114
+ \u0275\u0275elementEnd()()();
40115
+ \u0275\u0275conditionalCreate(19, CheckoutPublicHostComponent_Conditional_4_Conditional_19_Template, 3, 0);
40116
+ \u0275\u0275elementStart(20, "p", 34);
40117
+ \u0275\u0275text(21, "The card you pay with will be charged for future renewals.");
40118
+ \u0275\u0275elementEnd();
40119
+ \u0275\u0275conditionalCreate(22, CheckoutPublicHostComponent_Conditional_4_Conditional_22_Template, 2, 1, "div", 1);
40120
+ \u0275\u0275elementStart(23, "button", 35);
40121
+ \u0275\u0275text(24);
40122
+ \u0275\u0275elementEnd()();
40123
+ }
40124
+ if (rf & 2) {
40125
+ const ctx_r0 = \u0275\u0275nextContext();
40126
+ \u0275\u0275advance(6);
40127
+ \u0275\u0275conditional(ctx_r0.renewal.Description ? 6 : -1);
40128
+ \u0275\u0275advance();
40129
+ \u0275\u0275conditional(ctx_r0.renewal.SubscriptionNumber ? 7 : -1);
40130
+ \u0275\u0275advance(5);
40131
+ \u0275\u0275textInterpolate(ctx_r0.renewal.OrderNumber);
40132
+ \u0275\u0275advance();
40133
+ \u0275\u0275conditional(ctx_r0.renewal.DueDate ? 13 : -1);
40134
+ \u0275\u0275advance(5);
40135
+ \u0275\u0275textInterpolate(ctx_r0.renewalAmount);
40136
+ \u0275\u0275advance();
40137
+ \u0275\u0275conditional(ctx_r0.config.stripePublishableKey ? 19 : -1);
40138
+ \u0275\u0275advance(3);
40139
+ \u0275\u0275conditional(ctx_r0.errorMessage ? 22 : -1);
40140
+ \u0275\u0275advance();
40141
+ \u0275\u0275property("disabled", ctx_r0.processing || !ctx_r0.isPaymentReady);
40142
+ \u0275\u0275advance();
40143
+ \u0275\u0275textInterpolate1(" ", ctx_r0.processing ? "Processing\u2026" : "Pay " + ctx_r0.renewalAmount, " ");
40144
+ }
40145
+ }
40146
+ function CheckoutPublicHostComponent_Conditional_5_For_1_Template(rf, ctx) {
40147
+ if (rf & 1) {
40148
+ const _r6 = \u0275\u0275getCurrentView();
40149
+ \u0275\u0275elementStart(0, "mj-checkout-widget", 39);
40150
+ \u0275\u0275listener("promotionCodeApplied", function CheckoutPublicHostComponent_Conditional_5_For_1_Template_mj_checkout_widget_promotionCodeApplied_0_listener($event) {
40151
+ \u0275\u0275restoreView(_r6);
39997
40152
  const ctx_r0 = \u0275\u0275nextContext(2);
39998
40153
  return \u0275\u0275resetView(ctx_r0.onPromotionCodeApplied($event));
39999
- })("submitted", function CheckoutPublicHostComponent_Conditional_4_For_1_Template_mj_checkout_widget_submitted_0_listener($event) {
40000
- \u0275\u0275restoreView(_r5);
40154
+ })("submitted", function CheckoutPublicHostComponent_Conditional_5_For_1_Template_mj_checkout_widget_submitted_0_listener($event) {
40155
+ \u0275\u0275restoreView(_r6);
40001
40156
  const ctx_r0 = \u0275\u0275nextContext(2);
40002
40157
  return \u0275\u0275resetView(ctx_r0.onSubmitted($event));
40003
- })("cancelled", function CheckoutPublicHostComponent_Conditional_4_For_1_Template_mj_checkout_widget_cancelled_0_listener() {
40004
- \u0275\u0275restoreView(_r5);
40158
+ })("cancelled", function CheckoutPublicHostComponent_Conditional_5_For_1_Template_mj_checkout_widget_cancelled_0_listener() {
40159
+ \u0275\u0275restoreView(_r6);
40005
40160
  const ctx_r0 = \u0275\u0275nextContext(2);
40006
40161
  return \u0275\u0275resetView(ctx_r0.onCancelled());
40007
- })("quoteInvalidated", function CheckoutPublicHostComponent_Conditional_4_For_1_Template_mj_checkout_widget_quoteInvalidated_0_listener() {
40008
- \u0275\u0275restoreView(_r5);
40162
+ })("quoteInvalidated", function CheckoutPublicHostComponent_Conditional_5_For_1_Template_mj_checkout_widget_quoteInvalidated_0_listener() {
40163
+ \u0275\u0275restoreView(_r6);
40009
40164
  const ctx_r0 = \u0275\u0275nextContext(2);
40010
40165
  return \u0275\u0275resetView(ctx_r0.onQuoteInvalidated());
40011
40166
  });
@@ -40016,9 +40171,9 @@ function CheckoutPublicHostComponent_Conditional_4_For_1_Template(rf, ctx) {
40016
40171
  \u0275\u0275property("config", ctx_r0.config)("distributionSlug", ctx_r0.slug)("sessionKey", ctx_r0.sessionKey)("isProcessing", ctx_r0.processing)("isPaymentReady", ctx_r0.isPaymentReady)("stripePaymentMethodId", ctx_r0.stripePaymentMethodId)("prefillEmail", ctx_r0.prefillEmail)("errorMessage", ctx_r0.errorMessage)("appliedPromotion", ctx_r0.appliedPromotion)("serverPricedTotal", ctx_r0.serverPricedTotal)("promotionError", ctx_r0.promotionError)("quotedTotal", ctx_r0.quotedTotal)("quotedTax", ctx_r0.quotedTax);
40017
40172
  }
40018
40173
  }
40019
- function CheckoutPublicHostComponent_Conditional_4_Template(rf, ctx) {
40174
+ function CheckoutPublicHostComponent_Conditional_5_Template(rf, ctx) {
40020
40175
  if (rf & 1) {
40021
- \u0275\u0275repeaterCreate(0, CheckoutPublicHostComponent_Conditional_4_For_1_Template, 1, 13, "mj-checkout-widget", 27, \u0275\u0275repeaterTrackByIdentity);
40176
+ \u0275\u0275repeaterCreate(0, CheckoutPublicHostComponent_Conditional_5_For_1_Template, 1, 13, "mj-checkout-widget", 38, \u0275\u0275repeaterTrackByIdentity);
40022
40177
  }
40023
40178
  if (rf & 2) {
40024
40179
  const ctx_r0 = \u0275\u0275nextContext();
@@ -40032,6 +40187,17 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
40032
40187
  apiRoot = "/checkout";
40033
40188
  /** A host-signed membership token, verified server-side on /draft and never stored (#324). */
40034
40189
  memberToken = "";
40190
+ /**
40191
+ * A signed update-card link token (#289). Set, the checkout pays the open renewal order the token
40192
+ * names — no product, no re-pricing — and keeps the card it is paid with for future renewals.
40193
+ */
40194
+ renewalToken = "";
40195
+ /** The renewal order being paid, in the pay-renewal mode; null for an ordinary checkout. */
40196
+ renewal = null;
40197
+ /** The renewal's amount as the page shows it. */
40198
+ get renewalAmount() {
40199
+ return this.renewal ? FormatRenewalAmount(this.renewal.Amount, this.config?.currency) : "";
40200
+ }
40035
40201
  /**
40036
40202
  * The buyer already subscribes to what they tried to buy (#323). As the `<mj-orders-checkout>`
40037
40203
  * element this is a DOM `CustomEvent` of the same name, with the detail as `event.detail`.
@@ -40114,14 +40280,15 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
40114
40280
  this.loadError = "Checkout requires a secure random source. Open this page over HTTPS.";
40115
40281
  return;
40116
40282
  }
40117
- if (await this.resumeAccountStep()) {
40283
+ if (!this.renewalToken && await this.resumeAccountStep()) {
40118
40284
  return;
40119
40285
  }
40120
40286
  this.setState("LOADING");
40121
40287
  try {
40122
40288
  const init = await this.postGated("/initialize", {
40123
40289
  slug: this.slug,
40124
- clientSessionKey: this.sessionKey
40290
+ clientSessionKey: this.sessionKey,
40291
+ ...this.renewalToken ? { renewalToken: this.renewalToken } : {}
40125
40292
  });
40126
40293
  if (!init?.Success) {
40127
40294
  this.loadError = this.str(init?.ErrorMessage, "This checkout is not available.");
@@ -40135,7 +40302,13 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
40135
40302
  if (typeof init.CustomJS === "string" && init.CustomJS && !cfg.customUI?.js) {
40136
40303
  cfg.customUI = { ...cfg.customUI || {}, js: init.CustomJS };
40137
40304
  }
40138
- if (!cfg.productId) {
40305
+ if (this.renewalToken) {
40306
+ this.renewal = ReadRenewalPayment(init);
40307
+ if (!this.renewal) {
40308
+ this.loadError = "This renewal cannot be paid here.";
40309
+ return;
40310
+ }
40311
+ } else if (!cfg.productId) {
40139
40312
  this.loadError = "This checkout is not configured with a product.";
40140
40313
  return;
40141
40314
  }
@@ -40397,6 +40570,73 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
40397
40570
  this.cdr.detectChanges();
40398
40571
  }
40399
40572
  }
40573
+ /**
40574
+ * Pay the open renewal order (#289): an intent for its balance, confirmed with the card entered
40575
+ * here, then `/complete`, which books the payment against the renewal order and makes this card
40576
+ * the subscription's renewal card.
40577
+ */
40578
+ async payRenewal() {
40579
+ if (this.processing || !this.renewal) {
40580
+ return;
40581
+ }
40582
+ this.processing = true;
40583
+ this.errorMessage = null;
40584
+ this.setState("PROCESSING");
40585
+ try {
40586
+ const intent = await this.post("/payment-intent", {
40587
+ sessionId: this.sessionId,
40588
+ clientSessionKey: this.sessionKey
40589
+ });
40590
+ if (!intent?.Success) {
40591
+ throw new Error(this.str(intent?.ErrorMessage, "Could not start payment."));
40592
+ }
40593
+ if (!intentAlreadyCollected(intent.Status)) {
40594
+ if (!intent.ClientSecret) {
40595
+ throw new Error("Could not start payment.");
40596
+ }
40597
+ if (!this.stripe || !this.card) {
40598
+ throw new Error("Card entry is not ready.");
40599
+ }
40600
+ const result = await this.stripe.confirmCardPayment(String(intent.ClientSecret), {
40601
+ payment_method: { card: this.card }
40602
+ });
40603
+ if (result.error) {
40604
+ if (!stripeConfirmAlreadyCollected(result.error)) {
40605
+ throw new Error(formatStripeError(result.error));
40606
+ }
40607
+ } else {
40608
+ const stripeStatus = (result.paymentIntent?.status || "").toLowerCase();
40609
+ if (stripeStatus && stripeStatus !== "succeeded" && stripeStatus !== "processing") {
40610
+ throw new Error(`Payment was not confirmed (Stripe status: ${result.paymentIntent?.status}).`);
40611
+ }
40612
+ }
40613
+ }
40614
+ const done = await this.post("/complete", {
40615
+ sessionId: this.sessionId,
40616
+ clientSessionKey: this.sessionKey
40617
+ });
40618
+ if (!done?.Success) {
40619
+ throw new Error(this.str(done?.ErrorMessage, "Could not complete the payment."));
40620
+ }
40621
+ this.orderNumber = this.renewal.OrderNumber;
40622
+ this.successMessage = RenewalPaidMessage(this.renewal);
40623
+ this.setState("SUCCESS");
40624
+ this.dispatch(CHECKOUT_COMPLETE_EVENT, BuildCheckoutCompleteDetail({
40625
+ sessionId: this.sessionId,
40626
+ productName: this.renewal.Description,
40627
+ productId: void 0,
40628
+ totalGross: this.renewal.Amount,
40629
+ currency: this.config?.currency,
40630
+ coupon: null
40631
+ }));
40632
+ } catch (err) {
40633
+ this.errorMessage = err instanceof Error ? err.message : "Payment failed.";
40634
+ this.reportError(this.errorMessage);
40635
+ } finally {
40636
+ this.processing = false;
40637
+ this.cdr.detectChanges();
40638
+ }
40639
+ }
40400
40640
  emitIfAlreadySubscribed(response) {
40401
40641
  const detail = alreadySubscribedDetail(response);
40402
40642
  if (detail) {
@@ -40678,6 +40918,10 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
40678
40918
  if (memberToken) {
40679
40919
  this.memberToken = memberToken;
40680
40920
  }
40921
+ const renewalToken = el.getAttribute("renewal-token") || el.getAttribute("data-renewal-token");
40922
+ if (renewalToken) {
40923
+ this.renewalToken = renewalToken;
40924
+ }
40681
40925
  this.readConversationAttributes();
40682
40926
  el.addEventListener?.(CHECKOUT_RESET_REQUEST_EVENT, this.onResetRequested);
40683
40927
  }
@@ -40694,14 +40938,18 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
40694
40938
  this.attributionSource = el.getAttribute("source") || el.getAttribute("data-source") || null;
40695
40939
  this.attributionReference = el.getAttribute("source-ref") || el.getAttribute("data-source-ref") || null;
40696
40940
  }
40941
+ /** Session storage is scoped per slug, and apart for the pay-renewal mode so the two never share a session. */
40942
+ get storageScope() {
40943
+ return this.renewalToken ? `renew:${this.slug}` : this.slug;
40944
+ }
40697
40945
  forgetClientKey() {
40698
40946
  try {
40699
- sessionStorage.removeItem(`mj-checkout-key:${this.slug}`);
40947
+ sessionStorage.removeItem(`mj-checkout-key:${this.storageScope}`);
40700
40948
  } catch {
40701
40949
  }
40702
40950
  }
40703
40951
  clientKey() {
40704
- const storageKey = `mj-checkout-key:${this.slug}`;
40952
+ const storageKey = `mj-checkout-key:${this.storageScope}`;
40705
40953
  try {
40706
40954
  const existing = sessionStorage.getItem(storageKey);
40707
40955
  if (existing) {
@@ -40729,7 +40977,7 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
40729
40977
  return key;
40730
40978
  }
40731
40979
  get completingKey() {
40732
- return `mj-checkout-completing:${this.slug}`;
40980
+ return `mj-checkout-completing:${this.storageScope}`;
40733
40981
  }
40734
40982
  rememberCompleting(sessionId) {
40735
40983
  try {
@@ -40786,18 +41034,18 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
40786
41034
  static \u0275fac = function CheckoutPublicHostComponent_Factory(__ngFactoryType__) {
40787
41035
  return new (__ngFactoryType__ || _CheckoutPublicHostComponent)();
40788
41036
  };
40789
- static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _CheckoutPublicHostComponent, selectors: [["mj-orders-checkout"]], inputs: { slug: "slug", apiRoot: "apiRoot", memberToken: "memberToken" }, outputs: { alreadySubscribed: "checkout-already-subscribed" }, decls: 6, vars: 1, consts: [[1, "mj-checkout-public"], ["role", "alert", 1, "mj-widget-error-banner"], ["role", "status", 1, "mj-checkout-success"], ["role", "status", 1, "mj-checkout-public__status"], [1, "mj-checkout-public__turnstile"], ["aria-hidden", "true", 1, "mj-checkout-success__icon"], [1, "mj-checkout-success__title"], [1, "mj-checkout-success__msg"], [1, "mj-checkout-success__order"], ["role", "status", 1, "mj-checkout-success__access", 3, "is-failed"], ["role", "status", 1, "mj-checkout-account__msg"], [1, "mj-checkout-account"], ["role", "status", 1, "mj-checkout-success__access"], [1, "mj-checkout-account", 3, "submit"], [1, "mj-checkout-account__title"], [1, "mj-checkout-account__note"], ["for", "mj-checkout-password", 1, "mj-checkout-account__label"], ["id", "mj-checkout-password", "type", "password", "autocomplete", "new-password", 1, "mj-checkout-account__input", 3, "input", "value"], ["for", "mj-checkout-password-confirm", 1, "mj-checkout-account__label"], ["id", "mj-checkout-password-confirm", "type", "password", "autocomplete", "new-password", 1, "mj-checkout-account__input", 3, "input", "value"], ["role", "alert", 1, "mj-checkout-account__error"], ["type", "submit", 1, "mj-checkout-account__submit", 3, "disabled"], ["type", "button", 1, "mj-checkout-account__skip", 3, "click", "disabled"], [1, "mj-checkout-account", "mj-checkout-account--actions"], ["type", "button", 1, "mj-checkout-account__submit", 3, "click"], ["type", "button", 1, "mj-checkout-account__skip"], ["type", "button", 1, "mj-checkout-account__skip", 3, "click"], [3, "config", "distributionSlug", "sessionKey", "isProcessing", "isPaymentReady", "stripePaymentMethodId", "prefillEmail", "errorMessage", "appliedPromotion", "serverPricedTotal", "promotionError", "quotedTotal", "quotedTax"], [3, "promotionCodeApplied", "submitted", "cancelled", "quoteInvalidated", "config", "distributionSlug", "sessionKey", "isProcessing", "isPaymentReady", "stripePaymentMethodId", "prefillEmail", "errorMessage", "appliedPromotion", "serverPricedTotal", "promotionError", "quotedTotal", "quotedTax"]], template: function CheckoutPublicHostComponent_Template(rf, ctx) {
41037
+ static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _CheckoutPublicHostComponent, selectors: [["mj-orders-checkout"]], inputs: { slug: "slug", apiRoot: "apiRoot", memberToken: "memberToken", renewalToken: "renewalToken" }, outputs: { alreadySubscribed: "checkout-already-subscribed" }, decls: 7, vars: 1, consts: [[1, "mj-checkout-public"], ["role", "alert", 1, "mj-widget-error-banner"], ["role", "status", 1, "mj-checkout-success"], ["role", "status", 1, "mj-checkout-public__status"], [1, "mj-checkout-renewal"], [1, "mj-checkout-public__turnstile"], ["aria-hidden", "true", 1, "mj-checkout-success__icon"], [1, "mj-checkout-success__title"], [1, "mj-checkout-success__msg"], [1, "mj-checkout-success__order"], ["role", "status", 1, "mj-checkout-success__access", 3, "is-failed"], ["role", "status", 1, "mj-checkout-account__msg"], [1, "mj-checkout-account"], ["role", "status", 1, "mj-checkout-success__access"], [1, "mj-checkout-account", 3, "submit"], [1, "mj-checkout-account__title"], [1, "mj-checkout-account__note"], ["for", "mj-checkout-password", 1, "mj-checkout-account__label"], ["id", "mj-checkout-password", "type", "password", "autocomplete", "new-password", 1, "mj-checkout-account__input", 3, "input", "value"], ["for", "mj-checkout-password-confirm", 1, "mj-checkout-account__label"], ["id", "mj-checkout-password-confirm", "type", "password", "autocomplete", "new-password", 1, "mj-checkout-account__input", 3, "input", "value"], ["role", "alert", 1, "mj-checkout-account__error"], ["type", "submit", 1, "mj-checkout-account__submit", 3, "disabled"], ["type", "button", 1, "mj-checkout-account__skip", 3, "click", "disabled"], [1, "mj-checkout-account", "mj-checkout-account--actions"], ["type", "button", 1, "mj-checkout-account__submit", 3, "click"], ["type", "button", 1, "mj-checkout-account__skip"], ["type", "button", 1, "mj-checkout-account__skip", 3, "click"], [1, "mj-checkout-renewal", 3, "submit"], [1, "mj-checkout-renewal__title"], [1, "mj-checkout-renewal__lead"], [1, "mj-checkout-renewal__summary"], [1, "mj-checkout-renewal__row"], [1, "mj-checkout-renewal__row", "mj-checkout-renewal__row--total"], [1, "mj-checkout-renewal__note"], ["type", "submit", 1, "mj-checkout-renewal__pay", 3, "disabled"], ["for", "stripe-card-element", 1, "mj-checkout-renewal__label"], ["id", "stripe-card-element", 1, "mj-checkout-renewal__card"], [3, "config", "distributionSlug", "sessionKey", "isProcessing", "isPaymentReady", "stripePaymentMethodId", "prefillEmail", "errorMessage", "appliedPromotion", "serverPricedTotal", "promotionError", "quotedTotal", "quotedTax"], [3, "promotionCodeApplied", "submitted", "cancelled", "quoteInvalidated", "config", "distributionSlug", "sessionKey", "isProcessing", "isPaymentReady", "stripePaymentMethodId", "prefillEmail", "errorMessage", "appliedPromotion", "serverPricedTotal", "promotionError", "quotedTotal", "quotedTax"]], template: function CheckoutPublicHostComponent_Template(rf, ctx) {
40790
41038
  if (rf & 1) {
40791
41039
  \u0275\u0275elementStart(0, "div", 0);
40792
- \u0275\u0275conditionalCreate(1, CheckoutPublicHostComponent_Conditional_1_Template, 2, 1, "div", 1)(2, CheckoutPublicHostComponent_Conditional_2_Template, 12, 4, "div", 2)(3, CheckoutPublicHostComponent_Conditional_3_Template, 2, 0, "p", 3)(4, CheckoutPublicHostComponent_Conditional_4_Template, 2, 2);
40793
- \u0275\u0275element(5, "div", 4);
41040
+ \u0275\u0275conditionalCreate(1, CheckoutPublicHostComponent_Conditional_1_Template, 2, 1, "div", 1)(2, CheckoutPublicHostComponent_Conditional_2_Template, 12, 4, "div", 2)(3, CheckoutPublicHostComponent_Conditional_3_Template, 2, 0, "p", 3)(4, CheckoutPublicHostComponent_Conditional_4_Template, 25, 9, "form", 4)(5, CheckoutPublicHostComponent_Conditional_5_Template, 2, 2);
41041
+ \u0275\u0275element(6, "div", 5);
40794
41042
  \u0275\u0275elementEnd();
40795
41043
  }
40796
41044
  if (rf & 2) {
40797
41045
  \u0275\u0275advance();
40798
- \u0275\u0275conditional(ctx.loadError ? 1 : ctx.successMessage ? 2 : !ctx.config ? 3 : 4);
41046
+ \u0275\u0275conditional(ctx.loadError ? 1 : ctx.successMessage ? 2 : !ctx.config ? 3 : ctx.renewal ? 4 : 5);
40799
41047
  }
40800
- }, dependencies: [CommonModule, MJCheckoutWidgetComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n}\n\n.mj-checkout-public[_ngcontent-%COMP%] {\n max-width: 580px;\n margin: 0 auto;\n}\n\n.mj-checkout-public__status[_ngcontent-%COMP%] {\n text-align: center;\n color: #64748b;\n font-size: 0.95rem;\n padding: 2rem 0;\n}\n\n.mj-widget-error-banner[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 0.875rem;\n}\n\n.mj-checkout-success[_ngcontent-%COMP%] {\n text-align: center;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 2rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n}\n\n.mj-checkout-success__icon[_ngcontent-%COMP%] {\n width: 3rem;\n height: 3rem;\n margin: 0 auto 1rem;\n border-radius: 50%;\n background: #dcfce7;\n color: #16a34a;\n font-size: 1.5rem;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-checkout-success__title[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n font-size: 1.5rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-success__msg[_ngcontent-%COMP%], \n.mj-checkout-success__order[_ngcontent-%COMP%] {\n margin: 0;\n color: #64748b;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-success__order[_ngcontent-%COMP%] {\n margin-top: 0.75rem;\n font-weight: 600;\n color: #334155;\n}\n\n\n\n.mj-checkout-success__access[_ngcontent-%COMP%] {\n margin: 0.75rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n}\n\n.mj-checkout-success__access.is-failed[_ngcontent-%COMP%] {\n color: #991b1b;\n}\n\n\n\n.mj-checkout-account[_ngcontent-%COMP%] {\n margin: 1.5rem auto 0;\n max-width: 320px;\n text-align: left;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mj-checkout-account__title[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n font-size: 1.05rem;\n font-weight: 700;\n color: #0f172a;\n text-align: center;\n}\n\n.mj-checkout-account__label[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-account__input[_ngcontent-%COMP%] {\n padding: 8px 10px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n font-size: 0.95rem;\n font-family: inherit;\n}\n\n.mj-checkout-account__input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n.mj-checkout-account__error[_ngcontent-%COMP%] {\n margin: 4px 0 0;\n color: #991b1b;\n font-size: 0.85rem;\n}\n\n.mj-checkout-account__submit[_ngcontent-%COMP%] {\n margin-top: 10px;\n padding: 10px;\n border: 0;\n border-radius: 6px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-weight: 600;\n cursor: pointer;\n}\n\n.mj-checkout-account__skip[_ngcontent-%COMP%] {\n padding: 6px;\n border: 0;\n background: none;\n color: #64748b;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.mj-checkout-account__submit[_ngcontent-%COMP%]:disabled, \n.mj-checkout-account__skip[_ngcontent-%COMP%]:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-checkout-account__msg[_ngcontent-%COMP%] {\n margin: 1rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-account__note[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n color: #475569;\n font-size: 0.85rem;\n line-height: 1.45;\n text-align: center;\n}\n\n.mj-checkout-account--actions[_ngcontent-%COMP%] {\n margin-top: 0.75rem;\n}\n\n\n\n.mj-checkout-public__turnstile[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n margin-top: 0.75rem;\n}"] });
41048
+ }, dependencies: [CommonModule, MJCheckoutWidgetComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n}\n\n.mj-checkout-public[_ngcontent-%COMP%] {\n max-width: 580px;\n margin: 0 auto;\n}\n\n.mj-checkout-public__status[_ngcontent-%COMP%] {\n text-align: center;\n color: #64748b;\n font-size: 0.95rem;\n padding: 2rem 0;\n}\n\n.mj-widget-error-banner[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 0.875rem;\n}\n\n.mj-checkout-success[_ngcontent-%COMP%] {\n text-align: center;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 2rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n}\n\n.mj-checkout-success__icon[_ngcontent-%COMP%] {\n width: 3rem;\n height: 3rem;\n margin: 0 auto 1rem;\n border-radius: 50%;\n background: #dcfce7;\n color: #16a34a;\n font-size: 1.5rem;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-checkout-success__title[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n font-size: 1.5rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-success__msg[_ngcontent-%COMP%], \n.mj-checkout-success__order[_ngcontent-%COMP%] {\n margin: 0;\n color: #64748b;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-success__order[_ngcontent-%COMP%] {\n margin-top: 0.75rem;\n font-weight: 600;\n color: #334155;\n}\n\n\n\n.mj-checkout-success__access[_ngcontent-%COMP%] {\n margin: 0.75rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n}\n\n.mj-checkout-success__access.is-failed[_ngcontent-%COMP%] {\n color: #991b1b;\n}\n\n\n\n.mj-checkout-account[_ngcontent-%COMP%] {\n margin: 1.5rem auto 0;\n max-width: 320px;\n text-align: left;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mj-checkout-account__title[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n font-size: 1.05rem;\n font-weight: 700;\n color: #0f172a;\n text-align: center;\n}\n\n.mj-checkout-account__label[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-account__input[_ngcontent-%COMP%] {\n padding: 8px 10px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n font-size: 0.95rem;\n font-family: inherit;\n}\n\n.mj-checkout-account__input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n.mj-checkout-account__error[_ngcontent-%COMP%] {\n margin: 4px 0 0;\n color: #991b1b;\n font-size: 0.85rem;\n}\n\n.mj-checkout-account__submit[_ngcontent-%COMP%] {\n margin-top: 10px;\n padding: 10px;\n border: 0;\n border-radius: 6px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-weight: 600;\n cursor: pointer;\n}\n\n.mj-checkout-account__skip[_ngcontent-%COMP%] {\n padding: 6px;\n border: 0;\n background: none;\n color: #64748b;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.mj-checkout-account__submit[_ngcontent-%COMP%]:disabled, \n.mj-checkout-account__skip[_ngcontent-%COMP%]:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-checkout-account__msg[_ngcontent-%COMP%] {\n margin: 1rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-account__note[_ngcontent-%COMP%] {\n margin: 0 0 0.5rem;\n color: #475569;\n font-size: 0.85rem;\n line-height: 1.45;\n text-align: center;\n}\n\n.mj-checkout-account--actions[_ngcontent-%COMP%] {\n margin-top: 0.75rem;\n}\n\n\n\n.mj-checkout-public__turnstile[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n margin-top: 0.75rem;\n}\n\n\n\n\n.mj-checkout-renewal[_ngcontent-%COMP%] {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 1.75rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n display: flex;\n flex-direction: column;\n gap: 0.85rem;\n}\n\n.mj-checkout-renewal__title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 1.4rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__lead[_ngcontent-%COMP%], \n.mj-checkout-renewal__note[_ngcontent-%COMP%] {\n margin: 0;\n color: #475569;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-renewal__note[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n}\n\n.mj-checkout-renewal__summary[_ngcontent-%COMP%] {\n margin: 0.25rem 0;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n padding: 0.25rem 0.9rem;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.55rem 0;\n border-bottom: 1px solid #f1f5f9;\n font-size: 0.92rem;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] dt[_ngcontent-%COMP%] {\n color: #64748b;\n}\n\n.mj-checkout-renewal__row[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] {\n margin: 0;\n color: #0f172a;\n text-align: right;\n}\n\n.mj-checkout-renewal__row--total[_ngcontent-%COMP%] dt[_ngcontent-%COMP%], \n.mj-checkout-renewal__row--total[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] {\n font-weight: 700;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__label[_ngcontent-%COMP%] {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-renewal__card[_ngcontent-%COMP%] {\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n padding: 0.75rem;\n background: #ffffff;\n}\n\n.mj-checkout-renewal__pay[_ngcontent-%COMP%] {\n margin-top: 0.25rem;\n padding: 0.8rem 1rem;\n border: none;\n border-radius: 6px;\n background: var(--mj-checkout-primary, #2563eb);\n color: #ffffff;\n font-size: 1rem;\n font-weight: 700;\n cursor: pointer;\n}\n\n.mj-checkout-renewal__pay[_ngcontent-%COMP%]:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}"] });
40801
41049
  };
40802
41050
  (() => {
40803
41051
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(CheckoutPublicHostComponent, [{
@@ -40864,6 +41112,50 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
40864
41112
  </div>
40865
41113
  } @else if (!config) {
40866
41114
  <p class="mj-checkout-public__status" role="status">Loading checkout\u2026</p>
41115
+ } @else if (renewal) {
41116
+ <form class="mj-checkout-renewal" (submit)="$event.preventDefault(); payRenewal()">
41117
+ <h1 class="mj-checkout-renewal__title">Renew your subscription</h1>
41118
+ <p class="mj-checkout-renewal__lead">Your saved card could not be charged. Pay with a new card to keep your subscription active.</p>
41119
+ <dl class="mj-checkout-renewal__summary">
41120
+ @if (renewal.Description) {
41121
+ <div class="mj-checkout-renewal__row">
41122
+ <dt>Renewal of</dt>
41123
+ <dd>{{ renewal.Description }}</dd>
41124
+ </div>
41125
+ }
41126
+ @if (renewal.SubscriptionNumber) {
41127
+ <div class="mj-checkout-renewal__row">
41128
+ <dt>Subscription</dt>
41129
+ <dd>{{ renewal.SubscriptionNumber }}</dd>
41130
+ </div>
41131
+ }
41132
+ <div class="mj-checkout-renewal__row">
41133
+ <dt>Renewal order</dt>
41134
+ <dd>{{ renewal.OrderNumber }}</dd>
41135
+ </div>
41136
+ @if (renewal.DueDate) {
41137
+ <div class="mj-checkout-renewal__row">
41138
+ <dt>Due</dt>
41139
+ <dd>{{ renewal.DueDate }}</dd>
41140
+ </div>
41141
+ }
41142
+ <div class="mj-checkout-renewal__row mj-checkout-renewal__row--total">
41143
+ <dt>Amount due</dt>
41144
+ <dd>{{ renewalAmount }}</dd>
41145
+ </div>
41146
+ </dl>
41147
+ @if (config.stripePublishableKey) {
41148
+ <label class="mj-checkout-renewal__label" for="stripe-card-element">Card</label>
41149
+ <div id="stripe-card-element" class="mj-checkout-renewal__card"></div>
41150
+ }
41151
+ <p class="mj-checkout-renewal__note">The card you pay with will be charged for future renewals.</p>
41152
+ @if (errorMessage) {
41153
+ <div class="mj-widget-error-banner" role="alert">{{ errorMessage }}</div>
41154
+ }
41155
+ <button class="mj-checkout-renewal__pay" type="submit" [disabled]="processing || !isPaymentReady">
41156
+ {{ processing ? 'Processing\u2026' : 'Pay ' + renewalAmount }}
41157
+ </button>
41158
+ </form>
40867
41159
  } @else {
40868
41160
  @for (generation of [formGeneration]; track generation) {
40869
41161
  <mj-checkout-widget
@@ -40889,20 +41181,22 @@ var CheckoutPublicHostComponent = class _CheckoutPublicHostComponent {
40889
41181
  }
40890
41182
  <div class="mj-checkout-public__turnstile"></div>
40891
41183
  </div>
40892
- `, styles: [":host {\n display: block;\n}\n\n.mj-checkout-public {\n max-width: 580px;\n margin: 0 auto;\n}\n\n.mj-checkout-public__status {\n text-align: center;\n color: #64748b;\n font-size: 0.95rem;\n padding: 2rem 0;\n}\n\n.mj-widget-error-banner {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 0.875rem;\n}\n\n.mj-checkout-success {\n text-align: center;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 2rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n}\n\n.mj-checkout-success__icon {\n width: 3rem;\n height: 3rem;\n margin: 0 auto 1rem;\n border-radius: 50%;\n background: #dcfce7;\n color: #16a34a;\n font-size: 1.5rem;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-checkout-success__title {\n margin: 0 0 0.5rem;\n font-size: 1.5rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-success__msg,\n.mj-checkout-success__order {\n margin: 0;\n color: #64748b;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-success__order {\n margin-top: 0.75rem;\n font-weight: 600;\n color: #334155;\n}\n\n/* Whether the buyer's access is ready yet (#325). */\n.mj-checkout-success__access {\n margin: 0.75rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n}\n\n.mj-checkout-success__access.is-failed {\n color: #991b1b;\n}\n\n/* Post-payment account step: set a password for the account the host created (#292). */\n.mj-checkout-account {\n margin: 1.5rem auto 0;\n max-width: 320px;\n text-align: left;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mj-checkout-account__title {\n margin: 0 0 0.5rem;\n font-size: 1.05rem;\n font-weight: 700;\n color: #0f172a;\n text-align: center;\n}\n\n.mj-checkout-account__label {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-account__input {\n padding: 8px 10px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n font-size: 0.95rem;\n font-family: inherit;\n}\n\n.mj-checkout-account__input:focus {\n outline: none;\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n.mj-checkout-account__error {\n margin: 4px 0 0;\n color: #991b1b;\n font-size: 0.85rem;\n}\n\n.mj-checkout-account__submit {\n margin-top: 10px;\n padding: 10px;\n border: 0;\n border-radius: 6px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-weight: 600;\n cursor: pointer;\n}\n\n.mj-checkout-account__skip {\n padding: 6px;\n border: 0;\n background: none;\n color: #64748b;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.mj-checkout-account__submit:disabled,\n.mj-checkout-account__skip:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-checkout-account__msg {\n margin: 1rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-account__note {\n margin: 0 0 0.5rem;\n color: #475569;\n font-size: 0.85rem;\n line-height: 1.45;\n text-align: center;\n}\n\n.mj-checkout-account--actions {\n margin-top: 0.75rem;\n}\n\n/* Cloudflare Turnstile renders here only when it needs the buyer to interact (#592). */\n.mj-checkout-public__turnstile {\n display: flex;\n justify-content: center;\n margin-top: 0.75rem;\n}\n"] }]
41184
+ `, styles: [":host {\n display: block;\n}\n\n.mj-checkout-public {\n max-width: 580px;\n margin: 0 auto;\n}\n\n.mj-checkout-public__status {\n text-align: center;\n color: #64748b;\n font-size: 0.95rem;\n padding: 2rem 0;\n}\n\n.mj-widget-error-banner {\n display: flex;\n align-items: center;\n gap: 8px;\n background: #fef2f2;\n border: 1px solid #f87171;\n color: #991b1b;\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 0.875rem;\n}\n\n.mj-checkout-success {\n text-align: center;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 2rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n}\n\n.mj-checkout-success__icon {\n width: 3rem;\n height: 3rem;\n margin: 0 auto 1rem;\n border-radius: 50%;\n background: #dcfce7;\n color: #16a34a;\n font-size: 1.5rem;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.mj-checkout-success__title {\n margin: 0 0 0.5rem;\n font-size: 1.5rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-success__msg,\n.mj-checkout-success__order {\n margin: 0;\n color: #64748b;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-success__order {\n margin-top: 0.75rem;\n font-weight: 600;\n color: #334155;\n}\n\n/* Whether the buyer's access is ready yet (#325). */\n.mj-checkout-success__access {\n margin: 0.75rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n}\n\n.mj-checkout-success__access.is-failed {\n color: #991b1b;\n}\n\n/* Post-payment account step: set a password for the account the host created (#292). */\n.mj-checkout-account {\n margin: 1.5rem auto 0;\n max-width: 320px;\n text-align: left;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mj-checkout-account__title {\n margin: 0 0 0.5rem;\n font-size: 1.05rem;\n font-weight: 700;\n color: #0f172a;\n text-align: center;\n}\n\n.mj-checkout-account__label {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-account__input {\n padding: 8px 10px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n font-size: 0.95rem;\n font-family: inherit;\n}\n\n.mj-checkout-account__input:focus {\n outline: none;\n border-color: var(--mj-primary-color, #2563eb);\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n}\n\n.mj-checkout-account__error {\n margin: 4px 0 0;\n color: #991b1b;\n font-size: 0.85rem;\n}\n\n.mj-checkout-account__submit {\n margin-top: 10px;\n padding: 10px;\n border: 0;\n border-radius: 6px;\n background: var(--mj-primary-color, #2563eb);\n color: #ffffff;\n font-weight: 600;\n cursor: pointer;\n}\n\n.mj-checkout-account__skip {\n padding: 6px;\n border: 0;\n background: none;\n color: #64748b;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.mj-checkout-account__submit:disabled,\n.mj-checkout-account__skip:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.mj-checkout-account__msg {\n margin: 1rem 0 0;\n color: #334155;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-account__note {\n margin: 0 0 0.5rem;\n color: #475569;\n font-size: 0.85rem;\n line-height: 1.45;\n text-align: center;\n}\n\n.mj-checkout-account--actions {\n margin-top: 0.75rem;\n}\n\n/* Cloudflare Turnstile renders here only when it needs the buyer to interact (#592). */\n.mj-checkout-public__turnstile {\n display: flex;\n justify-content: center;\n margin-top: 0.75rem;\n}\n\n/* \u2500\u2500\u2500 Pay-renewal mode (#289) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-checkout-renewal {\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 10px;\n padding: 1.75rem 1.5rem;\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);\n display: flex;\n flex-direction: column;\n gap: 0.85rem;\n}\n\n.mj-checkout-renewal__title {\n margin: 0;\n font-size: 1.4rem;\n font-weight: 800;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__lead,\n.mj-checkout-renewal__note {\n margin: 0;\n color: #475569;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n\n.mj-checkout-renewal__note {\n font-size: 0.85rem;\n}\n\n.mj-checkout-renewal__summary {\n margin: 0.25rem 0;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n padding: 0.25rem 0.9rem;\n}\n\n.mj-checkout-renewal__row {\n display: flex;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.55rem 0;\n border-bottom: 1px solid #f1f5f9;\n font-size: 0.92rem;\n}\n\n.mj-checkout-renewal__row:last-child {\n border-bottom: none;\n}\n\n.mj-checkout-renewal__row dt {\n color: #64748b;\n}\n\n.mj-checkout-renewal__row dd {\n margin: 0;\n color: #0f172a;\n text-align: right;\n}\n\n.mj-checkout-renewal__row--total dt,\n.mj-checkout-renewal__row--total dd {\n font-weight: 700;\n color: #0f172a;\n}\n\n.mj-checkout-renewal__label {\n font-size: 0.85rem;\n font-weight: 600;\n color: #334155;\n}\n\n.mj-checkout-renewal__card {\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n padding: 0.75rem;\n background: #ffffff;\n}\n\n.mj-checkout-renewal__pay {\n margin-top: 0.25rem;\n padding: 0.8rem 1rem;\n border: none;\n border-radius: 6px;\n background: var(--mj-checkout-primary, #2563eb);\n color: #ffffff;\n font-size: 1rem;\n font-weight: 700;\n cursor: pointer;\n}\n\n.mj-checkout-renewal__pay:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n"] }]
40893
41185
  }], null, { slug: [{
40894
41186
  type: Input
40895
41187
  }], apiRoot: [{
40896
41188
  type: Input
40897
41189
  }], memberToken: [{
40898
41190
  type: Input
41191
+ }], renewalToken: [{
41192
+ type: Input
40899
41193
  }], alreadySubscribed: [{
40900
41194
  type: Output,
40901
41195
  args: ["checkout-already-subscribed"]
40902
41196
  }] });
40903
41197
  })();
40904
41198
  (() => {
40905
- (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(CheckoutPublicHostComponent, { className: "CheckoutPublicHostComponent", filePath: "lib/checkout-widget/checkout-public-host.component.ts", lineNumber: 110 });
41199
+ (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(CheckoutPublicHostComponent, { className: "CheckoutPublicHostComponent", filePath: "lib/checkout-widget/checkout-public-host.component.ts", lineNumber: 112 });
40906
41200
  })();
40907
41201
 
40908
41202
  // scripts/checkout-element-entry.ts