@pelcro/react-pelcro-js 3.1.0-beta.2 → 3.1.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -3461,9 +3461,9 @@ var paymentMethod_fr = {
3461
3461
  select: select
3462
3462
  };
3463
3463
 
3464
- var title$h = "Enter your email to subscribe to our newsletter";
3464
+ var title$f = "Enter your email to subscribe to our newsletter";
3465
3465
  var updateTitle$1 = "Update newsletter selections";
3466
- var subtitle$9 = "We may use your email for other marketing communication";
3466
+ var subtitle$7 = "We may use your email for other marketing communication";
3467
3467
  var labels$p = {
3468
3468
  submit: "Submit",
3469
3469
  firstName: "First name",
@@ -3480,16 +3480,16 @@ var messages$r = {
3480
3480
  here: "here"
3481
3481
  };
3482
3482
  var newsletter_en = {
3483
- title: title$h,
3483
+ title: title$f,
3484
3484
  updateTitle: updateTitle$1,
3485
- subtitle: subtitle$9,
3485
+ subtitle: subtitle$7,
3486
3486
  labels: labels$p,
3487
3487
  messages: messages$r
3488
3488
  };
3489
3489
 
3490
- var title$g = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3490
+ var title$e = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3491
3491
  var updateTitle = "Mettre à jour son choix d'infolettres";
3492
- var subtitle$8 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3492
+ var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3493
3493
  var labels$o = {
3494
3494
  submit: "Lire l’article !",
3495
3495
  firstName: "Prénom",
@@ -3506,9 +3506,9 @@ var messages$q = {
3506
3506
  here: "ici"
3507
3507
  };
3508
3508
  var newsletter_fr = {
3509
- title: title$g,
3509
+ title: title$e,
3510
3510
  updateTitle: updateTitle,
3511
- subtitle: subtitle$8,
3511
+ subtitle: subtitle$6,
3512
3512
  labels: labels$o,
3513
3513
  messages: messages$q
3514
3514
  };
@@ -3765,8 +3765,8 @@ var login_fr = {
3765
3765
  errors: errors$4
3766
3766
  };
3767
3767
 
3768
- var title$f = "Create an account";
3769
- var subtitle$7 = "Enter your email and password below";
3768
+ var title$d = "Create an account";
3769
+ var subtitle$5 = "Enter your email and password below";
3770
3770
  var labels$h = {
3771
3771
  signUpFacebook: "Sign up with Facebook",
3772
3772
  signUpGoogle: "Sign up with Google",
@@ -3851,8 +3851,8 @@ var redeem$1 = {
3851
3851
  }
3852
3852
  };
3853
3853
  var register_en = {
3854
- title: title$f,
3855
- subtitle: subtitle$7,
3854
+ title: title$d,
3855
+ subtitle: subtitle$5,
3856
3856
  labels: labels$h,
3857
3857
  messages: messages$h,
3858
3858
  errors: errors$3,
@@ -3860,8 +3860,8 @@ var register_en = {
3860
3860
  redeem: redeem$1
3861
3861
  };
3862
3862
 
3863
- var title$e = "Créer un compte";
3864
- var subtitle$6 = "Entrez votre courriel et votre mot de passe ci-dessous";
3863
+ var title$c = "Créer un compte";
3864
+ var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
3865
3865
  var labels$g = {
3866
3866
  signUpFacebook: "Inscrivez-vous avec Facebook",
3867
3867
  signUpGoogle: "Inscrivez-vous avec Google",
@@ -3947,8 +3947,8 @@ var redeem = {
3947
3947
  }
3948
3948
  };
3949
3949
  var register_fr = {
3950
- title: title$e,
3951
- subtitle: subtitle$6,
3950
+ title: title$c,
3951
+ subtitle: subtitle$4,
3952
3952
  labels: labels$g,
3953
3953
  messages: messages$g,
3954
3954
  errors: errors$2,
@@ -4008,7 +4008,7 @@ var userEdit_fr = {
4008
4008
  messages: messages$e
4009
4009
  };
4010
4010
 
4011
- var title$d = "Enter your shipping address";
4011
+ var title$b = "Enter your shipping address";
4012
4012
  var selectAddressTitle$1 = "Please select an address";
4013
4013
  var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
4014
4014
  var labels$d = {
@@ -4031,7 +4031,7 @@ var messages$d = {
4031
4031
  subRedeemed: "Your subscription has been redeemed."
4032
4032
  };
4033
4033
  var address_en = {
4034
- title: title$d,
4034
+ title: title$b,
4035
4035
  selectAddressTitle: selectAddressTitle$1,
4036
4036
  selectAddressSubtitle: selectAddressSubtitle$1,
4037
4037
  labels: labels$d,
@@ -4039,7 +4039,7 @@ var address_en = {
4039
4039
  messages: messages$d
4040
4040
  };
4041
4041
 
4042
- var title$c = "Entrez votre adresse de livraison";
4042
+ var title$a = "Entrez votre adresse de livraison";
4043
4043
  var selectAddressTitle = "Veuillez sélectionner une adresse";
4044
4044
  var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
4045
4045
  var labels$c = {
@@ -4062,7 +4062,7 @@ var messages$c = {
4062
4062
  subRedeemed: "Votre abonnement a bien été activé."
4063
4063
  };
4064
4064
  var address_fr = {
4065
- title: title$c,
4065
+ title: title$a,
4066
4066
  selectAddressTitle: selectAddressTitle,
4067
4067
  selectAddressSubtitle: selectAddressSubtitle,
4068
4068
  labels: labels$c,
@@ -4070,8 +4070,8 @@ var address_fr = {
4070
4070
  messages: messages$c
4071
4071
  };
4072
4072
 
4073
- var title$b = "Reset your password";
4074
- var subtitle$5 = "Enter a new password below";
4073
+ var title$9 = "Reset your password";
4074
+ var subtitle$3 = "Enter a new password below";
4075
4075
  var email$3 = "Email";
4076
4076
  var password$3 = "Password";
4077
4077
  var confirmPassword$1 = "Confirm password";
@@ -4079,8 +4079,8 @@ var submit$5 = "Submit";
4079
4079
  var required$5 = "Required";
4080
4080
  var passwordUpdated$1 = "Password has been updated, please login with the new password";
4081
4081
  var passwordReset_en = {
4082
- title: title$b,
4083
- subtitle: subtitle$5,
4082
+ title: title$9,
4083
+ subtitle: subtitle$3,
4084
4084
  email: email$3,
4085
4085
  password: password$3,
4086
4086
  confirmPassword: confirmPassword$1,
@@ -4089,8 +4089,8 @@ var passwordReset_en = {
4089
4089
  passwordUpdated: passwordUpdated$1
4090
4090
  };
4091
4091
 
4092
- var title$a = "Réinitialiser votre mot de passe";
4093
- var subtitle$4 = "Entrez un nouveau mot de passe ci-dessous";
4092
+ var title$8 = "Réinitialiser votre mot de passe";
4093
+ var subtitle$2 = "Entrez un nouveau mot de passe ci-dessous";
4094
4094
  var email$2 = "Adresse courriel";
4095
4095
  var password$2 = "Mot de passe";
4096
4096
  var confirmPassword = "Confirmer le mot de passe";
@@ -4098,8 +4098,8 @@ var submit$4 = "Soumettre";
4098
4098
  var required$4 = "Champs obligatoires";
4099
4099
  var passwordUpdated = "Votre mot de passe a été mis à jour, veuillez vous connecter avec celui-ci";
4100
4100
  var passwordReset_fr = {
4101
- title: title$a,
4102
- subtitle: subtitle$4,
4101
+ title: title$8,
4102
+ subtitle: subtitle$2,
4103
4103
  email: email$2,
4104
4104
  password: password$2,
4105
4105
  confirmPassword: confirmPassword,
@@ -4108,7 +4108,7 @@ var passwordReset_fr = {
4108
4108
  passwordUpdated: passwordUpdated
4109
4109
  };
4110
4110
 
4111
- var title$9 = "Forgot your password?";
4111
+ var title$7 = "Forgot your password?";
4112
4112
  var email$1 = "Email";
4113
4113
  var password$1 = "Password";
4114
4114
  var submit$3 = "Submit";
@@ -4119,7 +4119,7 @@ var messages$b = {
4119
4119
  loginHere: "login here."
4120
4120
  };
4121
4121
  var passwordForgot_en = {
4122
- title: title$9,
4122
+ title: title$7,
4123
4123
  email: email$1,
4124
4124
  password: password$1,
4125
4125
  submit: submit$3,
@@ -4128,7 +4128,7 @@ var passwordForgot_en = {
4128
4128
  messages: messages$b
4129
4129
  };
4130
4130
 
4131
- var title$8 = "Mot de passe oublié ?";
4131
+ var title$6 = "Mot de passe oublié ?";
4132
4132
  var email = "Courriel";
4133
4133
  var password = "Mot de passe";
4134
4134
  var submit$2 = "Soumettre";
@@ -4139,7 +4139,7 @@ var messages$a = {
4139
4139
  loginHere: "Connectez-vous ici"
4140
4140
  };
4141
4141
  var passwordForgot_fr = {
4142
- title: title$8,
4142
+ title: title$6,
4143
4143
  email: email,
4144
4144
  password: password,
4145
4145
  submit: submit$2,
@@ -4148,7 +4148,7 @@ var passwordForgot_fr = {
4148
4148
  messages: messages$a
4149
4149
  };
4150
4150
 
4151
- var title$7 = "Change your password";
4151
+ var title$5 = "Change your password";
4152
4152
  var currentPassword$1 = "Current password";
4153
4153
  var newPassword$1 = "New password";
4154
4154
  var confirmNewPassword$1 = "Confirm new password";
@@ -4158,7 +4158,7 @@ var passwordChanged$1 = "Password has been changed, please login with the new pa
4158
4158
  var passwordsNotMatching$1 = "Passwords don't match";
4159
4159
  var weakPassword$1 = "Your password must contain at least 6 characters";
4160
4160
  var passwordChange_en = {
4161
- title: title$7,
4161
+ title: title$5,
4162
4162
  currentPassword: currentPassword$1,
4163
4163
  newPassword: newPassword$1,
4164
4164
  confirmNewPassword: confirmNewPassword$1,
@@ -4169,7 +4169,7 @@ var passwordChange_en = {
4169
4169
  weakPassword: weakPassword$1
4170
4170
  };
4171
4171
 
4172
- var title$6 = "Changez votre mot de passe";
4172
+ var title$4 = "Changez votre mot de passe";
4173
4173
  var currentPassword = "Mot de passe actuel";
4174
4174
  var newPassword = "Nouveau mot de passe";
4175
4175
  var confirmNewPassword = "Confirmer le nouveau mot de passe";
@@ -4179,7 +4179,7 @@ var passwordChanged = "Le mot de passe a été modifié, veuillez vous connecter
4179
4179
  var passwordsNotMatching = "Les mots de passe ne correspondent pas";
4180
4180
  var weakPassword = "Votre mot de passe doit contenir au moins 6";
4181
4181
  var passwordChange_fr = {
4182
- title: title$6,
4182
+ title: title$4,
4183
4183
  currentPassword: currentPassword,
4184
4184
  newPassword: newPassword,
4185
4185
  confirmNewPassword: confirmNewPassword,
@@ -4190,8 +4190,8 @@ var passwordChange_fr = {
4190
4190
  weakPassword: weakPassword
4191
4191
  };
4192
4192
 
4193
- var title$5 = "Votre panier";
4194
- var subtitle$3 = "Terminez votre achat ci-dessous";
4193
+ var title$3 = "Votre panier";
4194
+ var subtitle$1 = "Terminez votre achat ci-dessous";
4195
4195
  var name$1 = "Produit";
4196
4196
  var quantity$1 = "Quantité";
4197
4197
  var price$1 = "Prix";
@@ -4202,8 +4202,8 @@ var confirm$3 = "Passer à la caisse";
4202
4202
  var empty$1 = "Votre panier est vide.";
4203
4203
  var removeAll$1 = "Vider";
4204
4204
  var cart_fr = {
4205
- title: title$5,
4206
- subtitle: subtitle$3,
4205
+ title: title$3,
4206
+ subtitle: subtitle$1,
4207
4207
  name: name$1,
4208
4208
  quantity: quantity$1,
4209
4209
  price: price$1,
@@ -4215,8 +4215,8 @@ var cart_fr = {
4215
4215
  removeAll: removeAll$1
4216
4216
  };
4217
4217
 
4218
- var title$4 = "Your shopping cart";
4219
- var subtitle$2 = "Comple your purchase below";
4218
+ var title$2 = "Your shopping cart";
4219
+ var subtitle = "Comple your purchase below";
4220
4220
  var name = "Name";
4221
4221
  var quantity = "Quantity";
4222
4222
  var price = "Price";
@@ -4227,8 +4227,8 @@ var confirm$2 = "Checkout";
4227
4227
  var empty = "Your cart is empty.";
4228
4228
  var removeAll = "Remove all";
4229
4229
  var cart_en = {
4230
- title: title$4,
4231
- subtitle: subtitle$2,
4230
+ title: title$2,
4231
+ subtitle: subtitle,
4232
4232
  name: name,
4233
4233
  quantity: quantity,
4234
4234
  price: price,
@@ -4666,7 +4666,7 @@ var verifyEmail_fr = {
4666
4666
  messages: messages
4667
4667
  };
4668
4668
 
4669
- var title$3 = "Invoice details";
4669
+ var title$1 = "Invoice details";
4670
4670
  var labels$1 = {
4671
4671
  summary: "Summary",
4672
4672
  total: "Total",
@@ -4679,12 +4679,12 @@ var buttons$1 = {
4679
4679
  pay: "Pay now"
4680
4680
  };
4681
4681
  var invoiceDetails_en = {
4682
- title: title$3,
4682
+ title: title$1,
4683
4683
  labels: labels$1,
4684
4684
  buttons: buttons$1
4685
4685
  };
4686
4686
 
4687
- var title$2 = "Invoice details";
4687
+ var title = "Invoice details";
4688
4688
  var labels = {
4689
4689
  summary: "Summary",
4690
4690
  total: "Total",
@@ -4697,37 +4697,11 @@ var buttons = {
4697
4697
  pay: "Pay now"
4698
4698
  };
4699
4699
  var invoiceDetails_fr = {
4700
- title: title$2,
4700
+ title: title,
4701
4701
  labels: labels,
4702
4702
  buttons: buttons
4703
4703
  };
4704
4704
 
4705
- var title$1 = "Renewal options";
4706
- var subtitle$1 = "Select one of the options below to continue";
4707
- var next$1 = "Next";
4708
- var addNew$1 = "Add Another Subscription";
4709
- var renew$1 = "Renew Existing Subscription";
4710
- var subscriptionOptions_en = {
4711
- title: title$1,
4712
- subtitle: subtitle$1,
4713
- next: next$1,
4714
- addNew: addNew$1,
4715
- renew: renew$1
4716
- };
4717
-
4718
- var title = "Renewal options";
4719
- var subtitle = "Select one of the options below to continue";
4720
- var next = "Next";
4721
- var addNew = "Add Another Subscription";
4722
- var renew = "Renew Existing Subscription";
4723
- var subscriptionOptions_fr = {
4724
- title: title,
4725
- subtitle: subtitle,
4726
- next: next,
4727
- addNew: addNew,
4728
- renew: renew
4729
- };
4730
-
4731
4705
  function create$1(createState) {
4732
4706
  let state;
4733
4707
  const listeners = new Set();
@@ -6077,7 +6051,7 @@ class PelcroActions {
6077
6051
  view,
6078
6052
  cartItems,
6079
6053
  ...otherStateFields
6080
- } = initialState$j;
6054
+ } = initialState$i;
6081
6055
  this.set(otherStateFields);
6082
6056
  });
6083
6057
 
@@ -6101,16 +6075,6 @@ class PelcroActions {
6101
6075
  });
6102
6076
  }
6103
6077
 
6104
- if (view === "subscription-options") {
6105
- const noRenewableProducts = getRenewableProducts().length === 0;
6106
-
6107
- if (noRenewableProducts) {
6108
- return this.set({
6109
- view: "plan-select"
6110
- });
6111
- }
6112
- }
6113
-
6114
6078
  this.set({
6115
6079
  view
6116
6080
  });
@@ -6185,26 +6149,6 @@ class PelcroActions {
6185
6149
  }
6186
6150
  });
6187
6151
 
6188
- _defineProperty$3(this, "setProductsList", products => {
6189
- if (!Array.isArray(products)) {
6190
- return console.error(`setProductsList expects an array of products as an argument, got an argument of type ${typeof products} instead`);
6191
- }
6192
-
6193
- const allowedProducts = window.Pelcro.product.list();
6194
- const validProducts = products.filter(product => {
6195
- const isValidProduct = allowedProducts.some(allowedProduct => allowedProduct.id === (product === null || product === void 0 ? void 0 : product.id) && allowedProduct.name === (product === null || product === void 0 ? void 0 : product.name));
6196
-
6197
- if (!isValidProduct) {
6198
- console.warn(`setProductsList expects an array of products that exist in the list of valid products (window.Pelcro.product.list()), but it recieved a product which doesn't exist in that list:`, product);
6199
- }
6200
-
6201
- return isValidProduct;
6202
- });
6203
- this.set({
6204
- productsList: validProducts
6205
- });
6206
- });
6207
-
6208
6152
  _defineProperty$3(this, "setProduct", id => {
6209
6153
  const product = window.Pelcro.product.getById(id);
6210
6154
  if (!product) return console.error("invalid product id");
@@ -6426,12 +6370,10 @@ class PelcroCallbacks {
6426
6370
 
6427
6371
  }
6428
6372
 
6429
- var _window$Pelcro$produc, _window$Pelcro;
6430
- const initialState$j = {
6373
+ const initialState$i = {
6431
6374
  // View
6432
6375
  view: null,
6433
6376
  // Plans
6434
- productsList: (_window$Pelcro$produc = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : _window$Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [],
6435
6377
  product: null,
6436
6378
  plan: null,
6437
6379
  isGift: false,
@@ -6458,7 +6400,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
6458
6400
  return {
6459
6401
  // Store setter
6460
6402
  set,
6461
- ...initialState$j,
6403
+ ...initialState$i,
6462
6404
  // State actions
6463
6405
  ...actions,
6464
6406
  // Callbacks
@@ -6813,28 +6755,6 @@ function userMustVerifyEmail() {
6813
6755
  const isUserEmailVerified = (_window$Pelcro$user$r9 = (_window$Pelcro$user$r10 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r10 === void 0 ? void 0 : _window$Pelcro$user$r10.email_confirm) !== null && _window$Pelcro$user$r9 !== void 0 ? _window$Pelcro$user$r9 : false;
6814
6756
  return window.Pelcro.user.isAuthenticated() && isEmailVerificationEnabled && !isUserEmailVerified;
6815
6757
  }
6816
- function getRenewableProducts() {
6817
- const renewableSubs = window.Pelcro.subscription.list().filter(sub => sub.status === "active" && sub.cancel_at_period_end === 1);
6818
- const renewableProductsIds = [...new Set(renewableSubs.map(sub => sub.plan.product.id))];
6819
- const renewablePlansIds = [...new Set(renewableSubs.map(sub => sub.plan.id))];
6820
- const {
6821
- productsList
6822
- } = usePelcro.getStore();
6823
- return productsList.map(product => {
6824
- if (renewableProductsIds.includes(product.id)) {
6825
- const renewablePlans = getRenewablePlansOnly(product);
6826
- return { ...product,
6827
- plans: renewablePlans
6828
- };
6829
- }
6830
- }).filter(product => product);
6831
-
6832
- function getRenewablePlansOnly(product) {
6833
- var _product$plans$filter, _product$plans;
6834
-
6835
- return (_product$plans$filter = product === null || product === void 0 ? void 0 : (_product$plans = product.plans) === null || _product$plans === void 0 ? void 0 : _product$plans.filter(plan => renewablePlansIds.includes(plan.id))) !== null && _product$plans$filter !== void 0 ? _product$plans$filter : [];
6836
- }
6837
- }
6838
6758
 
6839
6759
  const resources = {
6840
6760
  en: {
@@ -6859,8 +6779,7 @@ const resources = {
6859
6779
  dashboard: dashboard_en,
6860
6780
  select: select_en,
6861
6781
  notification: notification_en,
6862
- invoiceDetails: invoiceDetails_en,
6863
- subscriptionOptions: subscriptionOptions_en
6782
+ invoiceDetails: invoiceDetails_en
6864
6783
  },
6865
6784
  fr: {
6866
6785
  common: common_fr,
@@ -6884,8 +6803,7 @@ const resources = {
6884
6803
  dashboard: dashboard_fr,
6885
6804
  select: select_fr,
6886
6805
  notification: notification_fr,
6887
- invoiceDetails: invoiceDetails_fr,
6888
- subscriptionOptions: subscriptionOptions_fr
6806
+ invoiceDetails: invoiceDetails_fr
6889
6807
  }
6890
6808
  }; // set UI language to the page language or default to the language in site settings
6891
6809
 
@@ -7176,8 +7094,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
7176
7094
 
7177
7095
  let e={data:""},t=t=>"undefined"!=typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(})/g,a=/\/\*[^]*?\*\/|\s\s+|\n/g,n=(e,t)=>{let r,l="",a="",o="";for(let c in e){let s=e[c];"object"==typeof s?(r=t?t.replace(/([^,])+/g,e=>c.replace(/([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):c,a+="@"==c[0]?"f"==c[1]?n(s,c):c+"{"+n(s,"k"==c[1]?"":t)+"}":n(s,r)):"@"==c[0]&&"i"==c[1]?l=c+" "+s+";":(c=c.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=n.p?n.p(c,s):c+":"+s+";");}return o[0]?(r=t?t+"{"+o+"}":o,l+r+a):l+a},o={},c=e=>{let t="";for(let r in e)t+=r+("object"==typeof e[r]?c(e[r]):e[r]);return t},s=(e,t,r,s,i)=>{let p="object"==typeof e?c(e):e,u=o[p]||(o[p]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(p));if(!o[u]){let t="object"==typeof e?e:(e=>{let t,r=[{}];for(;t=l.exec(e.replace(a,""));)t[4]&&r.shift(),t[3]?r.unshift(r[0][t[3]]=r[0][t[3]]||{}):t[4]||(r[0][t[1]]=t[2]);return r[0]})(e);o[u]=n(i?{["@keyframes "+u]:t}:t,r?"":"."+u);}return ((e,t,r)=>{-1==t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(o[u],t,s),u},i=(e,t,r)=>e.reduce((e,l,a)=>{let o=t[a];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":n(e,""):e;}return e+l+(null==o?"":o)},"");function p(e){let r=this||{},l=e.call?e(r.p):e;return s(l.unshift?l.raw?i(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>t?Object.assign(e,t.call?t(r.p):t):e,{}):l,t(r.target),r.g,r.o,r.k)}let u,f,d;p.bind({g:1});let b=p.bind({k:1});function h(e,t,r,l){n.p=t,u=e,f=r,d=l;}function y(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\d+/.test(s),c.className=p.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=c.as||e;return d&&i[0]&&d(c),u(i,c)}return t?t(a):a}}
7178
7096
 
7179
- function _extends$A() {
7180
- _extends$A = Object.assign || function (target) {
7097
+ function _extends$z() {
7098
+ _extends$z = Object.assign || function (target) {
7181
7099
  for (var i = 1; i < arguments.length; i++) {
7182
7100
  var source = arguments[i];
7183
7101
 
@@ -7191,7 +7109,7 @@ function _extends$A() {
7191
7109
  return target;
7192
7110
  };
7193
7111
 
7194
- return _extends$A.apply(this, arguments);
7112
+ return _extends$z.apply(this, arguments);
7195
7113
  }
7196
7114
 
7197
7115
  function _taggedTemplateLiteralLoose(strings, raw) {
@@ -7281,7 +7199,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
7281
7199
  var reducer = function reducer(state, action) {
7282
7200
  switch (action.type) {
7283
7201
  case ActionType.ADD_TOAST:
7284
- return _extends$A({}, state, {
7202
+ return _extends$z({}, state, {
7285
7203
  toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
7286
7204
  });
7287
7205
 
@@ -7291,9 +7209,9 @@ var reducer = function reducer(state, action) {
7291
7209
  clearFromRemoveQueue(action.toast.id);
7292
7210
  }
7293
7211
 
7294
- return _extends$A({}, state, {
7212
+ return _extends$z({}, state, {
7295
7213
  toasts: state.toasts.map(function (t) {
7296
- return t.id === action.toast.id ? _extends$A({}, t, action.toast) : t;
7214
+ return t.id === action.toast.id ? _extends$z({}, t, action.toast) : t;
7297
7215
  })
7298
7216
  });
7299
7217
 
@@ -7320,9 +7238,9 @@ var reducer = function reducer(state, action) {
7320
7238
  });
7321
7239
  }
7322
7240
 
7323
- return _extends$A({}, state, {
7241
+ return _extends$z({}, state, {
7324
7242
  toasts: state.toasts.map(function (t) {
7325
- return t.id === toastId || toastId === undefined ? _extends$A({}, t, {
7243
+ return t.id === toastId || toastId === undefined ? _extends$z({}, t, {
7326
7244
  visible: false
7327
7245
  }) : t;
7328
7246
  })
@@ -7330,28 +7248,28 @@ var reducer = function reducer(state, action) {
7330
7248
 
7331
7249
  case ActionType.REMOVE_TOAST:
7332
7250
  if (action.toastId === undefined) {
7333
- return _extends$A({}, state, {
7251
+ return _extends$z({}, state, {
7334
7252
  toasts: []
7335
7253
  });
7336
7254
  }
7337
7255
 
7338
- return _extends$A({}, state, {
7256
+ return _extends$z({}, state, {
7339
7257
  toasts: state.toasts.filter(function (t) {
7340
7258
  return t.id !== action.toastId;
7341
7259
  })
7342
7260
  });
7343
7261
 
7344
7262
  case ActionType.START_PAUSE:
7345
- return _extends$A({}, state, {
7263
+ return _extends$z({}, state, {
7346
7264
  pausedAt: action.time
7347
7265
  });
7348
7266
 
7349
7267
  case ActionType.END_PAUSE:
7350
7268
  var diff = action.time - (state.pausedAt || 0);
7351
- return _extends$A({}, state, {
7269
+ return _extends$z({}, state, {
7352
7270
  pausedAt: undefined,
7353
7271
  toasts: state.toasts.map(function (t) {
7354
- return _extends$A({}, t, {
7272
+ return _extends$z({}, t, {
7355
7273
  pauseDuration: t.pauseDuration + diff
7356
7274
  });
7357
7275
  })
@@ -7398,12 +7316,12 @@ var useStore = function useStore(toastOptions) {
7398
7316
  var mergedToasts = state.toasts.map(function (t) {
7399
7317
  var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
7400
7318
 
7401
- return _extends$A({}, toastOptions, toastOptions[t.type], t, {
7319
+ return _extends$z({}, toastOptions, toastOptions[t.type], t, {
7402
7320
  duration: t.duration || ((_toastOptions$t$type = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type.duration) || ((_toastOptions = toastOptions) == null ? void 0 : _toastOptions.duration) || defaultTimeouts[t.type],
7403
- style: _extends$A({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7321
+ style: _extends$z({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7404
7322
  });
7405
7323
  });
7406
- return _extends$A({}, state, {
7324
+ return _extends$z({}, state, {
7407
7325
  toasts: mergedToasts
7408
7326
  });
7409
7327
  };
@@ -7413,7 +7331,7 @@ var createToast = function createToast(message, type, opts) {
7413
7331
  type = 'blank';
7414
7332
  }
7415
7333
 
7416
- return _extends$A({
7334
+ return _extends$z({
7417
7335
  createdAt: Date.now(),
7418
7336
  visible: true,
7419
7337
  type: type,
@@ -7463,14 +7381,14 @@ toast.remove = function (toastId) {
7463
7381
  };
7464
7382
 
7465
7383
  toast.promise = function (promise, msgs, opts) {
7466
- var id = toast.loading(msgs.loading, _extends$A({}, opts, opts == null ? void 0 : opts.loading));
7384
+ var id = toast.loading(msgs.loading, _extends$z({}, opts, opts == null ? void 0 : opts.loading));
7467
7385
  promise.then(function (p) {
7468
- toast.success(resolveValue(msgs.success, p), _extends$A({
7386
+ toast.success(resolveValue(msgs.success, p), _extends$z({
7469
7387
  id: id
7470
7388
  }, opts, opts == null ? void 0 : opts.success));
7471
7389
  return p;
7472
7390
  })["catch"](function (e) {
7473
- toast.error(resolveValue(msgs.error, e), _extends$A({
7391
+ toast.error(resolveValue(msgs.error, e), _extends$z({
7474
7392
  id: id
7475
7393
  }, opts, opts == null ? void 0 : opts.error));
7476
7394
  });
@@ -7809,7 +7727,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
7809
7727
  var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
7810
7728
  return React.createElement(ToastBarBase, {
7811
7729
  className: toast.className,
7812
- style: _extends$A({}, animationStyle, style, toast.style)
7730
+ style: _extends$z({}, animationStyle, style, toast.style)
7813
7731
  }, typeof children === 'function' ? children({
7814
7732
  icon: icon,
7815
7733
  message: message
@@ -7839,7 +7757,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
7839
7757
  } : position.includes('right') ? {
7840
7758
  justifyContent: 'flex-end'
7841
7759
  } : {};
7842
- return _extends$A({
7760
+ return _extends$z({
7843
7761
  left: 0,
7844
7762
  right: 0,
7845
7763
  display: 'flex',
@@ -7866,7 +7784,7 @@ var Toaster = function Toaster(_ref) {
7866
7784
  handlers = _useToaster.handlers;
7867
7785
 
7868
7786
  return React.createElement("div", {
7869
- style: _extends$A({
7787
+ style: _extends$z({
7870
7788
  position: 'fixed',
7871
7789
  zIndex: 9999,
7872
7790
  top: DEFAULT_OFFSET,
@@ -7901,82 +7819,82 @@ var Toaster = function Toaster(_ref) {
7901
7819
  }));
7902
7820
  };
7903
7821
 
7904
- var _path$x;
7822
+ var _path$w;
7905
7823
 
7906
- function _extends$z() { _extends$z = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$z.apply(this, arguments); }
7824
+ function _extends$y() { _extends$y = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
7907
7825
 
7908
7826
  function SvgCheckSolid(props) {
7909
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$z({
7827
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
7910
7828
  xmlns: "http://www.w3.org/2000/svg",
7911
7829
  className: "h-5 w-5",
7912
7830
  viewBox: "0 0 20 20",
7913
7831
  fill: "currentColor"
7914
- }, props), _path$x || (_path$x = /*#__PURE__*/React__namespace.createElement("path", {
7832
+ }, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
7915
7833
  fillRule: "evenodd",
7916
7834
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
7917
7835
  clipRule: "evenodd"
7918
7836
  })));
7919
7837
  }
7920
7838
 
7921
- var _path$w;
7839
+ var _path$v;
7922
7840
 
7923
- function _extends$y() { _extends$y = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
7841
+ function _extends$x() { _extends$x = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
7924
7842
 
7925
7843
  function SvgXIcon(props) {
7926
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
7844
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
7927
7845
  xmlns: "http://www.w3.org/2000/svg",
7928
7846
  viewBox: "0 0 20 20",
7929
7847
  fill: "currentColor"
7930
- }, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
7848
+ }, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
7931
7849
  fill: "evenodd",
7932
7850
  d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
7933
7851
  clipRule: "evenodd"
7934
7852
  })));
7935
7853
  }
7936
7854
 
7937
- var _path$v;
7855
+ var _path$u;
7938
7856
 
7939
- function _extends$x() { _extends$x = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
7857
+ function _extends$w() { _extends$w = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
7940
7858
 
7941
7859
  function SvgXIconSolid(props) {
7942
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
7860
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
7943
7861
  className: "plc-w-4 plc-h-4",
7944
7862
  fill: "currentColor",
7945
7863
  xmlns: "http://www.w3.org/2000/svg",
7946
7864
  viewBox: "0 0 100 100"
7947
- }, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
7865
+ }, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
7948
7866
  d: "M94.842 48.408c0 24.852-20.148 44.999-45.002 44.999-24.851 0-44.997-20.146-44.997-44.999 0-24.854 20.146-45 44.997-45 24.853 0 45.002 20.146 45.002 45zM71.073 64.841L54.73 48.497l16.344-16.344-4.979-4.979-16.343 16.345-16.343-16.344-4.799 4.799 16.344 16.344L28.61 64.661l4.979 4.978 16.344-16.344 16.343 16.344 4.797-4.798z"
7949
7867
  })));
7950
7868
  }
7951
7869
 
7952
- var _path$u;
7870
+ var _path$t;
7953
7871
 
7954
- function _extends$w() { _extends$w = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
7872
+ function _extends$v() { _extends$v = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
7955
7873
 
7956
7874
  function SvgExclamation(props) {
7957
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
7875
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
7958
7876
  className: "plc-w-4 plc-h-4 plc-mr-1",
7959
7877
  xmlns: "http://www.w3.org/2000/svg",
7960
7878
  viewBox: "0 0 20 20",
7961
7879
  fill: "currentColor"
7962
- }, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
7880
+ }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
7963
7881
  fillRule: "evenodd",
7964
7882
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",
7965
7883
  clipRule: "evenodd"
7966
7884
  })));
7967
7885
  }
7968
7886
 
7969
- var _path$t, _path2$4;
7887
+ var _path$s, _path2$4;
7970
7888
 
7971
- function _extends$v() { _extends$v = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
7889
+ function _extends$u() { _extends$u = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
7972
7890
 
7973
7891
  function SvgSpinner(props) {
7974
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
7892
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
7975
7893
  className: "plc-animate-spin",
7976
7894
  viewBox: "0 0 24 24",
7977
7895
  fill: "currentColor",
7978
7896
  xmlns: "http://www.w3.org/2000/svg"
7979
- }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
7897
+ }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
7980
7898
  opacity: 0.2,
7981
7899
  fill: "evenodd",
7982
7900
  clipRule: "evenodd",
@@ -8266,9 +8184,7 @@ const init$1 = () => {
8266
8184
  return switchToAddressView();
8267
8185
  });
8268
8186
  } else {
8269
- pelcroSubscribeButtonsByClass[j].addEventListener("click", () => {
8270
- return switchView("subscription-options");
8271
- });
8187
+ pelcroSubscribeButtonsByClass[j].addEventListener("click", () => switchView("plan-select"));
8272
8188
  }
8273
8189
  }
8274
8190
  }
@@ -8430,8 +8346,7 @@ function Link({
8430
8346
  const init = () => {
8431
8347
  const {
8432
8348
  switchView,
8433
- set,
8434
- setProductsList
8349
+ set
8435
8350
  } = usePelcro.getStore();
8436
8351
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
8437
8352
 
@@ -8482,8 +8397,7 @@ const init = () => {
8482
8397
  }
8483
8398
 
8484
8399
  notify.dismiss(NOTIFICATION_ID);
8485
- setProductsList(window.Pelcro.product.getByEntitlements(entitlements));
8486
- switchView("plan-select");
8400
+ switchView("_plan-select-entitlements");
8487
8401
  }
8488
8402
  }, "Subscribe"), "now to get full page access.")), {
8489
8403
  className: "pelcro-notification-entitlement",
@@ -8715,6 +8629,7 @@ var pure_1 = pure.loadStripe;
8715
8629
  * @param {Object} error Error object
8716
8630
  * @return {string}
8717
8631
  */
8632
+
8718
8633
  const getErrorMessages = error => {
8719
8634
  var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
8720
8635
 
@@ -8769,6 +8684,20 @@ const debounce = (func, waitTime) => {
8769
8684
  timeout = setTimeout(later, waitTime);
8770
8685
  };
8771
8686
  };
8687
+ function getSiteCardProcessor() {
8688
+ var _window$Pelcro$site$r;
8689
+
8690
+ const {
8691
+ view
8692
+ } = usePelcro.getStore();
8693
+ const temp_ONLY_USE_VANTIV_WITH_SUBSCRIPTION_CREATE = view === "subscription-create";
8694
+
8695
+ if (temp_ONLY_USE_VANTIV_WITH_SUBSCRIPTION_CREATE && (_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.vantiv_pay_page_id) {
8696
+ return "vantiv";
8697
+ }
8698
+
8699
+ return "stripe";
8700
+ }
8772
8701
 
8773
8702
  /**
8774
8703
  * @typedef {Object} OptionsType
@@ -8849,13 +8778,26 @@ const loadPaymentSDKs = () => {
8849
8778
  if (!window.Stripe) {
8850
8779
  pure_1(window.Pelcro.environment.stripe);
8851
8780
  }
8852
- }); // Load PayPal SDK's
8781
+ }); // Load PayPal SDKs
8853
8782
 
8854
8783
  const supportsPaypal = Boolean(window.Pelcro.site.read().braintree_tokenization);
8855
8784
 
8856
8785
  if (supportsPaypal) {
8857
8786
  window.Pelcro.helpers.loadSDK("https://js.braintreegateway.com/web/3.69.0/js/client.min.js", "braintree-sdk");
8858
8787
  window.Pelcro.helpers.loadSDK("https://js.braintreegateway.com/web/3.69.0/js/paypal-checkout.min.js", "braintree-paypal-sdk");
8788
+ } // Load Vantiv SDKs
8789
+
8790
+
8791
+ const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_pay_page_id);
8792
+
8793
+ if (supportsVantiv) {
8794
+ if (!window.jQuery) {
8795
+ window.Pelcro.helpers.loadSDK("https://code.jquery.com/jquery-3.6.0.slim.min.js", "vantiv-jquery-sdk");
8796
+ }
8797
+
8798
+ if (!window.EprotectIframeClient) {
8799
+ window.Pelcro.helpers.loadSDK("https://request.eprotect.vantivprelive.com/eProtect/js/eProtect-iframe-client.min.js", "vantiv-eprotect-sdk");
8800
+ }
8859
8801
  }
8860
8802
  };
8861
8803
  const loadAuth0SDK = () => {
@@ -9288,7 +9230,7 @@ const PelcroModalController = ({
9288
9230
  type
9289
9231
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "dashboard-open"), React__default['default'].Children.map(children, child => child).find(({
9290
9232
  type
9291
- }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-renew" && React__default['default'].Children.map(children, child => child).find(({
9233
+ }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-entitlements" && React__default['default'].Children.map(children, child => child).find(({
9292
9234
  type
9293
9235
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "plan-select"), React__default['default'].Children.map(children, child => child).find(({
9294
9236
  type
@@ -9569,10 +9511,8 @@ const LOAD_PAYMENT_METHODS = "LOAD_PAYMENT_METHODS";
9569
9511
  const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
9570
9512
  const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
9571
9513
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
9572
- const SWITCH_TO_RENEW = "SWITCH_TO_RENEW";
9573
- const SWITCH_TO_NEW = "SWITCH_TO_NEW";
9574
9514
 
9575
- const initialState$i = {
9515
+ const initialState$h = {
9576
9516
  email: "",
9577
9517
  password: "",
9578
9518
  emailError: null,
@@ -9583,10 +9523,10 @@ const initialState$i = {
9583
9523
  content: ""
9584
9524
  }
9585
9525
  };
9586
- const store$i = /*#__PURE__*/React.createContext(initialState$i);
9526
+ const store$h = /*#__PURE__*/React.createContext(initialState$h);
9587
9527
  const {
9588
- Provider: Provider$i
9589
- } = store$i;
9528
+ Provider: Provider$h
9529
+ } = store$h;
9590
9530
 
9591
9531
  const LoginContainer = ({
9592
9532
  style,
@@ -9693,7 +9633,7 @@ const LoginContainer = ({
9693
9633
  });
9694
9634
 
9695
9635
  case RESET_LOGIN_FORM:
9696
- return initialState$i;
9636
+ return initialState$h;
9697
9637
 
9698
9638
  case DISABLE_LOGIN_BUTTON:
9699
9639
  return lib_7({ ...state,
@@ -9711,12 +9651,12 @@ const LoginContainer = ({
9711
9651
  default:
9712
9652
  return state;
9713
9653
  }
9714
- }, initialState$i);
9654
+ }, initialState$h);
9715
9655
  return /*#__PURE__*/React__default['default'].createElement("div", {
9716
9656
  style: { ...style
9717
9657
  },
9718
9658
  className: `pelcro-container pelcro-login-container ${className}`
9719
- }, /*#__PURE__*/React__default['default'].createElement(Provider$i, {
9659
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
9720
9660
  value: {
9721
9661
  state,
9722
9662
  dispatch
@@ -9724,12 +9664,12 @@ const LoginContainer = ({
9724
9664
  }, children.length ? children.map((child, i) => {
9725
9665
  if (child) {
9726
9666
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
9727
- store: store$i,
9667
+ store: store$h,
9728
9668
  key: i
9729
9669
  });
9730
9670
  }
9731
9671
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
9732
- store: store$i
9672
+ store: store$h
9733
9673
  })));
9734
9674
  };
9735
9675
 
@@ -9974,7 +9914,7 @@ const LoginButton = ({
9974
9914
  buttonDisabled
9975
9915
  },
9976
9916
  dispatch
9977
- } = React.useContext(store$i);
9917
+ } = React.useContext(store$h);
9978
9918
  const {
9979
9919
  t
9980
9920
  } = useTranslation("login");
@@ -9995,23 +9935,23 @@ const LoginButton = ({
9995
9935
  };
9996
9936
 
9997
9937
  const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
9998
- store: store$i
9938
+ store: store$h
9999
9939
  }, props));
10000
9940
 
10001
9941
  const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
10002
- store: store$i
9942
+ store: store$h
10003
9943
  }, props));
10004
9944
 
10005
- var _path$s;
9945
+ var _path$r;
10006
9946
 
10007
- function _extends$u() { _extends$u = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
9947
+ function _extends$t() { _extends$t = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
10008
9948
 
10009
9949
  function SvgCheck(props) {
10010
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
9950
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
10011
9951
  xmlns: "http://www.w3.org/2000/svg",
10012
9952
  fill: "currentColor",
10013
9953
  viewBox: "0 0 20 20"
10014
- }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
9954
+ }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
10015
9955
  fillRule: "evenodd",
10016
9956
  d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
10017
9957
  clipRule: "evenodd"
@@ -10076,7 +10016,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
10076
10016
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
10077
10017
  facebookLoginRenderProps.FacebookLogin;
10078
10018
 
10079
- const initialState$h = {
10019
+ const initialState$g = {
10080
10020
  email: "",
10081
10021
  password: "",
10082
10022
  emailError: null,
@@ -10093,10 +10033,10 @@ const initialState$h = {
10093
10033
  content: ""
10094
10034
  }
10095
10035
  };
10096
- const store$h = /*#__PURE__*/React.createContext(initialState$h);
10036
+ const store$g = /*#__PURE__*/React.createContext(initialState$g);
10097
10037
  const {
10098
- Provider: Provider$h
10099
- } = store$h;
10038
+ Provider: Provider$g
10039
+ } = store$g;
10100
10040
 
10101
10041
  const RegisterContainer = ({
10102
10042
  style,
@@ -10279,7 +10219,7 @@ const RegisterContainer = ({
10279
10219
  });
10280
10220
 
10281
10221
  case RESET_LOGIN_FORM:
10282
- return initialState$h;
10222
+ return initialState$g;
10283
10223
 
10284
10224
  case DISABLE_REGISTRATION_BUTTON:
10285
10225
  return lib_7({ ...state,
@@ -10297,12 +10237,12 @@ const RegisterContainer = ({
10297
10237
  default:
10298
10238
  return state;
10299
10239
  }
10300
- }, initialState$h);
10240
+ }, initialState$g);
10301
10241
  return /*#__PURE__*/React__default['default'].createElement("div", {
10302
10242
  style: { ...style
10303
10243
  },
10304
10244
  className: `pelcro-container pelcro-register-container ${className}`
10305
- }, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
10245
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
10306
10246
  value: {
10307
10247
  state,
10308
10248
  dispatch
@@ -10310,12 +10250,12 @@ const RegisterContainer = ({
10310
10250
  }, children.length ? children.map((child, i) => {
10311
10251
  if (child) {
10312
10252
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
10313
- store: store$h,
10253
+ store: store$g,
10314
10254
  key: i
10315
10255
  });
10316
10256
  }
10317
10257
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
10318
- store: store$h
10258
+ store: store$g
10319
10259
  })));
10320
10260
  };
10321
10261
  /**
@@ -10330,15 +10270,15 @@ function hasSecurityTokenEnabled$1() {
10330
10270
  return hasSecuritySdkLoaded;
10331
10271
  }
10332
10272
 
10333
- var _path$r;
10273
+ var _path$q;
10334
10274
 
10335
- function _extends$t() { _extends$t = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
10275
+ function _extends$s() { _extends$s = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
10336
10276
 
10337
10277
  function SvgFacebookLogo(props) {
10338
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
10278
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
10339
10279
  xmlns: "http://www.w3.org/2000/svg",
10340
10280
  viewBox: "88.428 12.828 107.543 207.085"
10341
- }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
10281
+ }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
10342
10282
  d: "M158.232 219.912v-94.461h31.707l4.747-36.813h-36.454V65.134c0-10.658 2.96-17.922 18.245-17.922l19.494-.009V14.278c-3.373-.447-14.944-1.449-28.406-1.449-28.106 0-47.348 17.155-47.348 48.661v27.149H88.428v36.813h31.788v94.461l38.016-.001z",
10343
10283
  fill: "#3c5a9a"
10344
10284
  })));
@@ -10355,10 +10295,10 @@ const FacebookLoginButton = ({
10355
10295
  const facebookLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id;
10356
10296
  const {
10357
10297
  dispatch: loginDispatch
10358
- } = React.useContext(store$i);
10298
+ } = React.useContext(store$h);
10359
10299
  const {
10360
10300
  dispatch: registerDispatch
10361
- } = React.useContext(store$h);
10301
+ } = React.useContext(store$g);
10362
10302
 
10363
10303
  const onSuccess = facebookUser => {
10364
10304
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -10411,15 +10351,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
10411
10351
  unwrapExports(googleLogin);
10412
10352
  var googleLogin_1 = googleLogin.GoogleLogin;
10413
10353
 
10414
- var _path$q, _path2$3, _path3$1, _path4;
10354
+ var _path$p, _path2$3, _path3$1, _path4;
10415
10355
 
10416
- function _extends$s() { _extends$s = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
10356
+ function _extends$r() { _extends$r = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
10417
10357
 
10418
10358
  function SvgGoogleLogo(props) {
10419
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
10359
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
10420
10360
  viewBox: "0 0 24 24",
10421
10361
  xmlns: "http://www.w3.org/2000/svg"
10422
- }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
10362
+ }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
10423
10363
  fill: "#4285F4",
10424
10364
  d: "M23.745 12.27c0-.79-.07-1.54-.19-2.27h-11.3v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"
10425
10365
  })), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
@@ -10445,10 +10385,10 @@ const GoogleLoginButton = ({
10445
10385
  const googleLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.google_app_id;
10446
10386
  const {
10447
10387
  dispatch: loginDispatch
10448
- } = React.useContext(store$i);
10388
+ } = React.useContext(store$h);
10449
10389
  const {
10450
10390
  dispatch: registerDispatch
10451
- } = React.useContext(store$h);
10391
+ } = React.useContext(store$g);
10452
10392
 
10453
10393
  const onSuccess = response => {
10454
10394
  var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
@@ -10496,15 +10436,15 @@ const GoogleLoginButton = ({
10496
10436
  }) : null;
10497
10437
  };
10498
10438
 
10499
- var _path$p;
10439
+ var _path$o;
10500
10440
 
10501
- function _extends$r() { _extends$r = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
10441
+ function _extends$q() { _extends$q = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
10502
10442
 
10503
10443
  function SvgAuth0Logo(props) {
10504
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
10444
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
10505
10445
  viewBox: "0 0 256 285",
10506
10446
  xmlns: "http://www.w3.org/2000/svg"
10507
- }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
10447
+ }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
10508
10448
  d: "M220.412 0h-92.415l28.562 89.006h92.416l-74.77 53.077 28.57 89.511c48.128-35.06 63.854-88.12 46.208-142.588L220.413 0zM7.018 89.006h92.416L127.997 0H35.589L7.019 89.006c-17.655 54.468-1.92 107.529 46.207 142.588l28.563-89.51-74.77-53.078zm46.208 142.588l74.77 52.97 74.77-52.97-74.77-53.847-74.77 53.847z"
10509
10449
  })));
10510
10450
  }
@@ -10544,10 +10484,10 @@ const Auth0LoginButton = ({
10544
10484
  }, [auth0Enabled, auth0Loaded]);
10545
10485
  const {
10546
10486
  dispatch: loginDispatch
10547
- } = React.useContext(store$i);
10487
+ } = React.useContext(store$h);
10548
10488
  const {
10549
10489
  dispatch: registerDispatch
10550
- } = React.useContext(store$h);
10490
+ } = React.useContext(store$g);
10551
10491
 
10552
10492
  function handleClick() {
10553
10493
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
@@ -10680,15 +10620,15 @@ function LoginView(props) {
10680
10620
  }, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
10681
10621
  }
10682
10622
 
10683
- var _path$o, _path2$2, _path3;
10623
+ var _path$n, _path2$2, _path3;
10684
10624
 
10685
- function _extends$q() { _extends$q = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
10625
+ function _extends$p() { _extends$p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
10686
10626
 
10687
10627
  function SvgPelcroAuthorship(props) {
10688
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
10628
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
10689
10629
  xmlns: "http://www.w3.org/2000/svg",
10690
10630
  viewBox: "0 -80.652 497.072 179.991"
10691
- }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
10631
+ }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
10692
10632
  fill: "none",
10693
10633
  stroke: "#4a4a4a",
10694
10634
  d: "M487.89 42.299c0 13.158-10.671 23.829-23.829 23.829H37.074c-13.162 0-23.832-10.671-23.832-23.829v-63.552c0-13.158 10.67-23.831 23.832-23.831H464.06c13.158 0 23.829 10.672 23.829 23.831l.001 63.552z"
@@ -10835,11 +10775,11 @@ function LoginModal({
10835
10775
  LoginModal.viewId = "login";
10836
10776
 
10837
10777
  const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
10838
- store: store$h
10778
+ store: store$g
10839
10779
  }, props));
10840
10780
 
10841
10781
  const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
10842
- store: store$h
10782
+ store: store$g
10843
10783
  }, props));
10844
10784
 
10845
10785
  const RegisterButton = ({
@@ -10859,7 +10799,7 @@ const RegisterButton = ({
10859
10799
  buttonDisabled
10860
10800
  },
10861
10801
  dispatch
10862
- } = React.useContext(store$h);
10802
+ } = React.useContext(store$g);
10863
10803
  const {
10864
10804
  t
10865
10805
  } = useTranslation("register");
@@ -10997,7 +10937,7 @@ function FirstName({
10997
10937
  }
10998
10938
 
10999
10939
  const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
11000
- store: store$h
10940
+ store: store$g
11001
10941
  }, props));
11002
10942
 
11003
10943
  function LastName({
@@ -11028,7 +10968,7 @@ function LastName({
11028
10968
  }
11029
10969
 
11030
10970
  const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
11031
- store: store$h
10971
+ store: store$g
11032
10972
  }, props));
11033
10973
 
11034
10974
  /**
@@ -11152,7 +11092,7 @@ function TextInput({
11152
11092
 
11153
11093
  const RegisterTextInput = props => {
11154
11094
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
11155
- store: store$h
11095
+ store: store$g
11156
11096
  }));
11157
11097
  };
11158
11098
 
@@ -11299,7 +11239,6 @@ function SelectModalWithHook(props) {
11299
11239
  (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
11300
11240
  }, []);
11301
11241
  const {
11302
- productsList,
11303
11242
  isGift,
11304
11243
  plan,
11305
11244
  product,
@@ -11309,12 +11248,11 @@ function SelectModalWithHook(props) {
11309
11248
  view,
11310
11249
  set
11311
11250
  } = usePelcro();
11312
- const isRenewingSub = view === "_plan-select-renew";
11251
+ const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
11252
+ const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
11313
11253
  return /*#__PURE__*/React__default['default'].createElement(SelectModalWithTrans, {
11314
- productsList: productsList,
11315
11254
  isGift: isGift,
11316
- disableGifting: isRenewingGift || isRenewingSub,
11317
- isRenewingSub: isRenewingSub,
11255
+ disableGifting: isRenewingGift,
11318
11256
  plan: plan,
11319
11257
  product: product,
11320
11258
  onClose: () => {
@@ -11328,10 +11266,8 @@ function SelectModalWithHook(props) {
11328
11266
  plan,
11329
11267
  isGift
11330
11268
  }),
11331
- setSubscriptionIdToRenew: subscriptionIdToRenew => set({
11332
- subscriptionIdToRenew
11333
- }),
11334
- setView: switchView
11269
+ setView: switchView,
11270
+ matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
11335
11271
  });
11336
11272
  }
11337
11273
  SelectModalWithHook.viewId = "plan-select";
@@ -11363,10 +11299,10 @@ class SelectModal extends React.Component {
11363
11299
  });
11364
11300
  }
11365
11301
 
11366
- if (this.props.productsList.length === 1) {
11302
+ if (this.state.productList.length === 1) {
11367
11303
  this.setState({
11368
- product: this.props.productsList[0],
11369
- planList: this.props.productsList[0].plans,
11304
+ product: this.state.productList[0],
11305
+ planList: this.state.productList[0].plans,
11370
11306
  mode: "plan"
11371
11307
  });
11372
11308
  }
@@ -11383,7 +11319,7 @@ class SelectModal extends React.Component {
11383
11319
  });
11384
11320
 
11385
11321
  _defineProperty$3(this, "onProductChange", e => {
11386
- const product = productsList[e.target.selectedIndex];
11322
+ const product = window.Pelcro.product.list()[e.target.selectedIndex];
11387
11323
  this.setState({
11388
11324
  product: product,
11389
11325
  plan: product.plans[0]
@@ -11449,7 +11385,7 @@ class SelectModal extends React.Component {
11449
11385
 
11450
11386
  _defineProperty$3(this, "renderProducts", () => {
11451
11387
  const userDidSelectProduct = Boolean(this.state.mode === "plan");
11452
- const productsToShow = userDidSelectProduct ? [this.state.product] : this.props.productsList;
11388
+ const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
11453
11389
  return productsToShow.map((product, index) => {
11454
11390
  return this.renderOneProduct(product, index);
11455
11391
  });
@@ -11462,7 +11398,7 @@ class SelectModal extends React.Component {
11462
11398
  return this.renderOneProduct(this.state.product);
11463
11399
  }
11464
11400
 
11465
- const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(this.props.productsList); // Render normal products if there are no available matching products
11401
+ const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(); // Render normal products if there are no available matching products
11466
11402
 
11467
11403
  if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
11468
11404
  return this.renderProducts();
@@ -11478,7 +11414,10 @@ class SelectModal extends React.Component {
11478
11414
  className: "plc-text-sm plc-font-semibold"
11479
11415
  }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
11480
11416
 
11481
- function productsWithMatchedTaggedFirst(allProducts) {
11417
+ function productsWithMatchedTaggedFirst() {
11418
+ var _window$Pelcro$produc;
11419
+
11420
+ const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
11482
11421
  const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
11483
11422
  const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
11484
11423
  return [productsThatMatchArticleTag, allProductsMinusMatched];
@@ -11512,7 +11451,7 @@ class SelectModal extends React.Component {
11512
11451
  _defineProperty$3(this, "selectProduct", e => {
11513
11452
  const id = e.target.dataset.key;
11514
11453
 
11515
- for (const product of this.props.productsList) {
11454
+ for (const product of this.state.productList) {
11516
11455
  if (+product.id === +id) {
11517
11456
  var _this$state$plan;
11518
11457
 
@@ -11565,14 +11504,6 @@ class SelectModal extends React.Component {
11565
11504
 
11566
11505
  _defineProperty$3(this, "submitOption", () => {
11567
11506
  this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
11568
-
11569
- if (this.props.isRenewingSub) {
11570
- var _matchingSub$id;
11571
-
11572
- const matchingSub = window.Pelcro.subscription.list().find(sub => sub.plan.id === this.state.plan.id && sub.status === "active" && sub.cancel_at_period_end === 1);
11573
- this.props.setSubscriptionIdToRenew((_matchingSub$id = matchingSub === null || matchingSub === void 0 ? void 0 : matchingSub.id) !== null && _matchingSub$id !== void 0 ? _matchingSub$id : null);
11574
- }
11575
-
11576
11507
  const {
11577
11508
  product,
11578
11509
  isGift
@@ -11610,7 +11541,8 @@ class SelectModal extends React.Component {
11610
11541
  plan: {},
11611
11542
  isGift: props.isGift,
11612
11543
  disabled: true,
11613
- mode: "product"
11544
+ mode: "product",
11545
+ productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
11614
11546
  };
11615
11547
  this.product = this.props.product || window.Pelcro.paywall.getProduct();
11616
11548
  this.locale = this.props.t;
@@ -11618,7 +11550,7 @@ class SelectModal extends React.Component {
11618
11550
  }
11619
11551
 
11620
11552
  render() {
11621
- var _this$props$productsL, _this$props$productsL2, _window$Pelcro$site$r;
11553
+ var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
11622
11554
 
11623
11555
  const {
11624
11556
  disableGifting
@@ -11652,7 +11584,7 @@ class SelectModal extends React.Component {
11652
11584
  className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
11653
11585
  }, /*#__PURE__*/React__default['default'].createElement("h4", {
11654
11586
  className: "plc-text-2xl plc-font-semibold"
11655
- }, this.product && this.product.paywall.select_title || ((_this$props$productsL = this.props.productsList[0]) === null || _this$props$productsL === void 0 ? void 0 : _this$props$productsL.paywall.select_title)), /*#__PURE__*/React__default['default'].createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_this$props$productsL2 = this.props.productsList[0]) === null || _this$props$productsL2 === void 0 ? void 0 : _this$props$productsL2.paywall.select_subtitle))), /*#__PURE__*/React__default['default'].createElement("div", {
11587
+ }, this.product && this.product.paywall.select_title || ((_window$Pelcro$produc2 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc2 === void 0 ? void 0 : _window$Pelcro$produc2.paywall.select_title)), /*#__PURE__*/React__default['default'].createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_window$Pelcro$produc3 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc3 === void 0 ? void 0 : _window$Pelcro$produc3.paywall.select_subtitle))), /*#__PURE__*/React__default['default'].createElement("div", {
11656
11588
  className: "pelcro-select-products-wrapper"
11657
11589
  }, (_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.restrictive_paywall_metatags_enabled ? this.renderMatchingProductsFirst() : this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
11658
11590
  className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
@@ -12840,7 +12772,7 @@ var _generateUserError = /*#__PURE__*/new WeakMap();
12840
12772
  class Subscription {
12841
12773
  /**
12842
12774
  * Subscription service constructor
12843
- * @param {(StripeGateway|PaypalGateWay)} paymentGateway
12775
+ * @param {(StripeGateway|PaypalGateway|VantivGateway)} paymentGateway
12844
12776
  */
12845
12777
  constructor(paymentGateway) {
12846
12778
  _defineProperty$3(this, "execute", (options, callback) => {
@@ -12861,7 +12793,7 @@ class Subscription {
12861
12793
  _isPaymentGatewayInvalid.set(this, {
12862
12794
  writable: true,
12863
12795
  value: gateway => {
12864
- return gateway && !(gateway instanceof StripeGateway) && gateway && !(gateway instanceof PaypalGateWay);
12796
+ return gateway && !(gateway instanceof StripeGateway || gateway instanceof PaypalGateway || gateway instanceof VantivGateway);
12865
12797
  }
12866
12798
  });
12867
12799
 
@@ -12914,7 +12846,8 @@ class Subscription {
12914
12846
  }
12915
12847
  const PAYMENT_GATEWAYS_ENUM = {
12916
12848
  stripe: "stripe",
12917
- paypal: "braintree"
12849
+ paypal: "braintree",
12850
+ vantiv: "vantiv"
12918
12851
  };
12919
12852
  /**
12920
12853
  * Subscription Strategies
@@ -13106,7 +13039,7 @@ var _createGiftedSubscription2 = /*#__PURE__*/new WeakMap();
13106
13039
 
13107
13040
  var _payInvoice2 = /*#__PURE__*/new WeakMap();
13108
13041
 
13109
- class PaypalGateWay {
13042
+ class PaypalGateway {
13110
13043
  constructor() {
13111
13044
  _paymentGateway2.set(this, {
13112
13045
  writable: true,
@@ -13207,49 +13140,100 @@ class PaypalGateWay {
13207
13140
 
13208
13141
  }
13209
13142
 
13210
- /**
13211
- * @typedef {Object} PaymentStateType
13212
- * @property {boolean} disableSubmit
13213
- * @property {boolean} isLoading
13214
- * @property {boolean} disableCouponButton
13215
- * @property {object} couponObject
13216
- * @property {string} couponCode
13217
- * @property {string} couponError
13218
- * @property {boolean} enableCouponField
13219
- * @property {string} percentOff
13220
- * @property {unknown} canMakePayment
13221
- * @property {unknown} paymentRequest
13222
- * @property {number} updatedPrice
13223
- * @property {number} taxAmount
13224
- * @property {object} currentPlan
13225
- * @property {object} alert
13226
- */
13143
+ var _paymentGateway3 = /*#__PURE__*/new WeakMap();
13227
13144
 
13228
- /** @type {PaymentStateType} */
13145
+ var _createSubscription3 = /*#__PURE__*/new WeakMap();
13229
13146
 
13230
- const initialState$g = {
13231
- disableSubmit: false,
13232
- isLoading: false,
13233
- disableCouponButton: false,
13234
- couponObject: null,
13235
- couponCode: "",
13236
- couponError: "",
13237
- enableCouponField: false,
13238
- percentOff: "",
13239
- canMakePayment: false,
13240
- paymentRequest: null,
13241
- updatedPrice: null,
13242
- taxAmount: null,
13243
- currentPlan: null,
13244
- alert: {
13245
- type: "error",
13246
- content: ""
13247
- }
13248
- };
13249
- const store$g = /*#__PURE__*/React.createContext(initialState$g);
13250
- const {
13251
- Provider: Provider$g
13252
- } = store$g;
13147
+ class VantivGateway {
13148
+ constructor() {
13149
+ _paymentGateway3.set(this, {
13150
+ writable: true,
13151
+ value: PAYMENT_GATEWAYS_ENUM["vantiv"]
13152
+ });
13153
+
13154
+ _defineProperty$3(this, "execute", (options, callback) => {
13155
+ const types = SUBSCRIPTION_TYPES;
13156
+
13157
+ switch (options.type) {
13158
+ case types.CREATE_SUBSCRIPTION:
13159
+ return _classPrivateFieldGet(this, _createSubscription3).call(this, options, callback);
13160
+
13161
+ default:
13162
+ console.error("Unsupported subscriptiion method: vantiv Gateway");
13163
+ }
13164
+ });
13165
+
13166
+ _createSubscription3.set(this, {
13167
+ writable: true,
13168
+ value: (options, callback) => {
13169
+ const {
13170
+ token,
13171
+ plan,
13172
+ couponCode,
13173
+ product,
13174
+ quantity = 1,
13175
+ addressId
13176
+ } = options;
13177
+ window.Pelcro.subscription.create({
13178
+ quantity,
13179
+ gateway_token: token,
13180
+ payment_gateway: _classPrivateFieldGet(this, _paymentGateway3),
13181
+ auth_token: window.Pelcro.user.read().auth_token,
13182
+ plan_id: plan.id,
13183
+ coupon_code: couponCode,
13184
+ address_id: product.address_required ? addressId : null
13185
+ }, (err, res) => {
13186
+ callback(err, res);
13187
+ });
13188
+ }
13189
+ });
13190
+ }
13191
+
13192
+ }
13193
+
13194
+ /**
13195
+ * @typedef {Object} PaymentStateType
13196
+ * @property {boolean} disableSubmit
13197
+ * @property {boolean} isLoading
13198
+ * @property {boolean} disableCouponButton
13199
+ * @property {object} couponObject
13200
+ * @property {string} couponCode
13201
+ * @property {string} couponError
13202
+ * @property {boolean} enableCouponField
13203
+ * @property {string} percentOff
13204
+ * @property {unknown} canMakePayment
13205
+ * @property {unknown} paymentRequest
13206
+ * @property {number} updatedPrice
13207
+ * @property {number} taxAmount
13208
+ * @property {object} currentPlan
13209
+ * @property {object} alert
13210
+ */
13211
+
13212
+ /** @type {PaymentStateType} */
13213
+
13214
+ const initialState$f = {
13215
+ disableSubmit: false,
13216
+ isLoading: false,
13217
+ disableCouponButton: false,
13218
+ couponObject: null,
13219
+ couponCode: "",
13220
+ couponError: "",
13221
+ enableCouponField: false,
13222
+ percentOff: "",
13223
+ canMakePayment: false,
13224
+ paymentRequest: null,
13225
+ updatedPrice: null,
13226
+ taxAmount: null,
13227
+ currentPlan: null,
13228
+ alert: {
13229
+ type: "error",
13230
+ content: ""
13231
+ }
13232
+ };
13233
+ const store$f = /*#__PURE__*/React.createContext(initialState$f);
13234
+ const {
13235
+ Provider: Provider$f
13236
+ } = store$f;
13253
13237
 
13254
13238
  const PaymentMethodContainerWithoutStripe = ({
13255
13239
  style,
@@ -13294,6 +13278,78 @@ const PaymentMethodContainerWithoutStripe = ({
13294
13278
  updateTotalAmountWithTax();
13295
13279
  }, []);
13296
13280
 
13281
+ function submitVantivPayment() {
13282
+ if (!vantivInstanceRef.current) {
13283
+ return console.error("Vantiv sdk script wasn't loaded, you need to load vantiv sdk before rendering the vantiv payment flow");
13284
+ }
13285
+
13286
+ const orderId = `pelcro-${new Date().getTime()}`; // calls handleVantivPayment
13287
+
13288
+ vantivInstanceRef.current.getPaypageRegistrationId({
13289
+ id: orderId,
13290
+ orderId: orderId
13291
+ });
13292
+ }
13293
+
13294
+ function handleVantivPayment(paymentRequest) {
13295
+ const SUCCESS_STATUS = "870";
13296
+
13297
+ if (paymentRequest.response !== SUCCESS_STATUS) {
13298
+ return handlePaymentError({
13299
+ error: new Error(paymentRequest.message)
13300
+ });
13301
+ }
13302
+
13303
+ const subscription = new Subscription(new VantivGateway());
13304
+ const {
13305
+ couponCode
13306
+ } = state;
13307
+ return subscription.execute({
13308
+ type: SUBSCRIPTION_TYPES.CREATE_SUBSCRIPTION,
13309
+ token: paymentRequest,
13310
+ quantity: plan.quantity,
13311
+ plan,
13312
+ couponCode,
13313
+ product,
13314
+ addressId: selectedAddressId
13315
+ }, (err, res) => {
13316
+ if (err) {
13317
+ return handlePaymentError(err);
13318
+ }
13319
+
13320
+ onSuccess(res);
13321
+ });
13322
+ }
13323
+
13324
+ const vantivInstanceRef = React__default['default'].useRef(null);
13325
+ React.useEffect(() => {
13326
+ const cardProcessor = getSiteCardProcessor();
13327
+
13328
+ if (cardProcessor === "vantiv") {
13329
+ var _window$Pelcro$site$r;
13330
+
13331
+ const payPageId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_pay_page_id;
13332
+ vantivInstanceRef.current = new window.EprotectIframeClient({
13333
+ paypageId: payPageId,
13334
+ reportGroup: payPageId,
13335
+ style: "pelcro",
13336
+ height: "245",
13337
+ timeout: 50000,
13338
+ div: "eProtectiframe",
13339
+ callback: handleVantivPayment,
13340
+ showCvv: true,
13341
+ numYears: 8,
13342
+ placeholderText: {
13343
+ cvv: "CVV",
13344
+ accountNumber: "1234 1234 1234 1234"
13345
+ },
13346
+ enhancedUxFeatures: {
13347
+ inlineFieldValidations: true
13348
+ }
13349
+ });
13350
+ }
13351
+ }, []);
13352
+
13297
13353
  const initPaymentRequest = (state, dispatch) => {
13298
13354
  try {
13299
13355
  const paymentRequest = stripe.paymentRequest({
@@ -13364,9 +13420,9 @@ const PaymentMethodContainerWithoutStripe = ({
13364
13420
 
13365
13421
 
13366
13422
  const updateTotalAmountWithTax = () => {
13367
- var _window$Pelcro$site$r;
13423
+ var _window$Pelcro$site$r2;
13368
13424
 
13369
- const taxesEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.taxes_enabled;
13425
+ const taxesEnabled = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.taxes_enabled;
13370
13426
 
13371
13427
  if (taxesEnabled && type === "createPayment") {
13372
13428
  dispatch({
@@ -13716,7 +13772,7 @@ const PaymentMethodContainerWithoutStripe = ({
13716
13772
 
13717
13773
 
13718
13774
  const handlePaypalSubscription = (state, paypalNonce) => {
13719
- const subscription = new Subscription(new PaypalGateWay());
13775
+ const subscription = new Subscription(new PaypalGateway());
13720
13776
  const {
13721
13777
  couponCode
13722
13778
  } = state;
@@ -14011,13 +14067,13 @@ const PaymentMethodContainerWithoutStripe = ({
14011
14067
 
14012
14068
 
14013
14069
  const resolveTaxCalculation = () => {
14014
- var _window$Pelcro$site$r2;
14070
+ var _window$Pelcro$site$r3;
14015
14071
 
14016
14072
  if (type === "invoicePayment") {
14017
14073
  return new Promise(resolve => resolve());
14018
14074
  }
14019
14075
 
14020
- const taxesEnabled = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.taxes_enabled;
14076
+ const taxesEnabled = (_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.taxes_enabled;
14021
14077
  return new Promise((resolve, reject) => {
14022
14078
  // resolve early if taxes isn't enabled
14023
14079
  if (!taxesEnabled) {
@@ -14096,6 +14152,8 @@ const PaymentMethodContainerWithoutStripe = ({
14096
14152
  };
14097
14153
 
14098
14154
  const handlePaymentError = error => {
14155
+ var _getErrorMessages;
14156
+
14099
14157
  if (error.type === "validation_error" && // Subscription creation & renewal
14100
14158
  type === "createPayment") {
14101
14159
  var _state$couponObject;
@@ -14114,7 +14172,7 @@ const PaymentMethodContainerWithoutStripe = ({
14114
14172
  type: SHOW_ALERT,
14115
14173
  payload: {
14116
14174
  type: "error",
14117
- content: error === null || error === void 0 ? void 0 : error.message
14175
+ content: (_getErrorMessages = getErrorMessages(error)) !== null && _getErrorMessages !== void 0 ? _getErrorMessages : error === null || error === void 0 ? void 0 : error.message
14118
14176
  }
14119
14177
  });
14120
14178
  dispatch({
@@ -14218,10 +14276,14 @@ const PaymentMethodContainerWithoutStripe = ({
14218
14276
  }
14219
14277
 
14220
14278
  if (type === "updatePaymentSource") {
14221
- updatePaymentSource(state, dispatch);
14222
- } else {
14223
- submitPayment(state);
14279
+ return updatePaymentSource(state, dispatch);
14280
+ }
14281
+
14282
+ if (getSiteCardProcessor() === "vantiv") {
14283
+ return submitVantivPayment();
14224
14284
  }
14285
+
14286
+ submitPayment(state);
14225
14287
  });
14226
14288
 
14227
14289
  case HANDLE_PAYPAL_SUBSCRIPTION:
@@ -14289,21 +14351,21 @@ const PaymentMethodContainerWithoutStripe = ({
14289
14351
  default:
14290
14352
  return state;
14291
14353
  }
14292
- }, initialState$g);
14354
+ }, initialState$f);
14293
14355
  return /*#__PURE__*/React__default['default'].createElement("div", {
14294
14356
  style: { ...style
14295
14357
  },
14296
14358
  className: `pelcro-container pelcro-payment-container ${className}`
14297
- }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
14359
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
14298
14360
  value: {
14299
14361
  state,
14300
14362
  dispatch
14301
14363
  }
14302
14364
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
14303
- store: store$g,
14365
+ store: store$f,
14304
14366
  key: i
14305
14367
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
14306
- store: store$g
14368
+ store: store$f
14307
14369
  })));
14308
14370
  };
14309
14371
 
@@ -14325,7 +14387,7 @@ const PaymentMethodContainer = props => {
14325
14387
  stripeAccount: window.Pelcro.site.read().account_id,
14326
14388
  locale: getPageOrDefaultLanguage()
14327
14389
  }, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
14328
- store: store$g
14390
+ store: store$f
14329
14391
  }, props))));
14330
14392
  }
14331
14393
 
@@ -14378,7 +14440,7 @@ const PelcroPaymentRequestButton = props => {
14378
14440
  currentPlan,
14379
14441
  updatedPrice
14380
14442
  }
14381
- } = React.useContext(store$g);
14443
+ } = React.useContext(store$f);
14382
14444
 
14383
14445
  const updatePaymentRequest = () => {
14384
14446
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -14410,19 +14472,35 @@ const CheckoutForm = () => {
14410
14472
  const {
14411
14473
  selectedPaymentMethodId
14412
14474
  } = usePelcro();
14413
- return !selectedPaymentMethodId && /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(PelcroCardNumber, {
14414
- autoFocus: true
14415
- }), /*#__PURE__*/React__default['default'].createElement("img", {
14416
- alt: "credit_cards",
14417
- className: "plc-h-4 plc-w-auto plc-mt-2",
14418
- src: "https://js.pelcro.com/ui/plugin/main/images/credit_cards.png"
14419
- }), /*#__PURE__*/React__default['default'].createElement("div", {
14420
- className: "plc-flex plc-justify-between plc-my-2 plc-items-end"
14421
- }, /*#__PURE__*/React__default['default'].createElement("div", {
14422
- className: "plc-w-6/12 plc-pr-4"
14423
- }, /*#__PURE__*/React__default['default'].createElement(PelcroCardExpiry, null)), /*#__PURE__*/React__default['default'].createElement("div", {
14424
- className: "plc-w-6/12 plc-pl-4"
14425
- }, /*#__PURE__*/React__default['default'].createElement(PelcroCardCVC, null))));
14475
+ const cardProcessor = getSiteCardProcessor();
14476
+
14477
+ if (selectedPaymentMethodId) {
14478
+ return null;
14479
+ }
14480
+
14481
+ if (cardProcessor === "vantiv") {
14482
+ return /*#__PURE__*/React__default['default'].createElement("div", {
14483
+ id: "eProtectiframe"
14484
+ });
14485
+ }
14486
+
14487
+ if (cardProcessor === "stripe") {
14488
+ return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(PelcroCardNumber, {
14489
+ autoFocus: true
14490
+ }), /*#__PURE__*/React__default['default'].createElement("img", {
14491
+ alt: "credit_cards",
14492
+ className: "plc-w-auto plc-h-4 plc-mt-2",
14493
+ src: "https://js.pelcro.com/ui/plugin/main/images/credit_cards.png"
14494
+ }), /*#__PURE__*/React__default['default'].createElement("div", {
14495
+ className: "plc-flex plc-items-end plc-justify-between plc-my-2"
14496
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
14497
+ className: "plc-w-6/12 plc-pr-4"
14498
+ }, /*#__PURE__*/React__default['default'].createElement(PelcroCardExpiry, null)), /*#__PURE__*/React__default['default'].createElement("div", {
14499
+ className: "plc-w-6/12 plc-pl-4"
14500
+ }, /*#__PURE__*/React__default['default'].createElement(PelcroCardCVC, null))));
14501
+ }
14502
+
14503
+ return null;
14426
14504
  };
14427
14505
 
14428
14506
  const DiscountedPrice = props => {
@@ -14438,7 +14516,7 @@ const DiscountedPrice = props => {
14438
14516
  taxAmount,
14439
14517
  percentOff
14440
14518
  }
14441
- } = React.useContext(store$g);
14519
+ } = React.useContext(store$f);
14442
14520
  const {
14443
14521
  order,
14444
14522
  plan
@@ -14488,7 +14566,7 @@ const SubmitPaymentMethod = ({
14488
14566
  isLoading,
14489
14567
  updatedPrice
14490
14568
  }
14491
- } = React.useContext(store$g);
14569
+ } = React.useContext(store$f);
14492
14570
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
14493
14571
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
14494
14572
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -14509,17 +14587,17 @@ const SubmitPaymentMethod = ({
14509
14587
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
14510
14588
  };
14511
14589
 
14512
- var _path$n;
14590
+ var _path$m;
14513
14591
 
14514
- function _extends$p() { _extends$p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
14592
+ function _extends$o() { _extends$o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
14515
14593
 
14516
14594
  function SvgArrowLeft(props) {
14517
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
14595
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
14518
14596
  xmlns: "http://www.w3.org/2000/svg",
14519
14597
  fill: "none",
14520
14598
  viewBox: "0 0 24 24",
14521
14599
  stroke: "currentColor"
14522
- }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
14600
+ }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
14523
14601
  strokeLinecap: "round",
14524
14602
  strokeLinejoin: "round",
14525
14603
  strokeWidth: 2,
@@ -14538,7 +14616,7 @@ const ApplyCouponButton = ({
14538
14616
  disableCouponButton
14539
14617
  },
14540
14618
  dispatch
14541
- } = React.useContext(store$g);
14619
+ } = React.useContext(store$f);
14542
14620
  const {
14543
14621
  t
14544
14622
  } = useTranslation("checkoutForm");
@@ -14572,7 +14650,7 @@ const CouponCodeField = props => {
14572
14650
  couponCode,
14573
14651
  couponError
14574
14652
  }
14575
- } = React.useContext(store$g);
14653
+ } = React.useContext(store$f);
14576
14654
 
14577
14655
  const onCouponCodeChange = e => {
14578
14656
  dispatch({
@@ -14601,17 +14679,17 @@ const CouponCodeField = props => {
14601
14679
  }, props));
14602
14680
  };
14603
14681
 
14604
- var _path$m;
14682
+ var _path$l;
14605
14683
 
14606
- function _extends$o() { _extends$o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
14684
+ function _extends$n() { _extends$n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
14607
14685
 
14608
14686
  function SvgTicket(props) {
14609
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
14687
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
14610
14688
  xmlns: "http://www.w3.org/2000/svg",
14611
14689
  fill: "none",
14612
14690
  viewBox: "0 0 24 24",
14613
14691
  stroke: "currentColor"
14614
- }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
14692
+ }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
14615
14693
  strokeLinecap: "round",
14616
14694
  strokeLinejoin: "round",
14617
14695
  strokeWidth: 2,
@@ -14628,7 +14706,7 @@ const CouponCode = ({
14628
14706
  state: {
14629
14707
  enableCouponField
14630
14708
  }
14631
- } = React.useContext(store$g);
14709
+ } = React.useContext(store$f);
14632
14710
  const {
14633
14711
  t
14634
14712
  } = useTranslation("checkoutForm");
@@ -14885,7 +14963,7 @@ const PaypalSubscribeButton = props => {
14885
14963
  const {
14886
14964
  dispatch,
14887
14965
  state
14888
- } = React.useContext(store$g);
14966
+ } = React.useContext(store$f);
14889
14967
  const {
14890
14968
  product,
14891
14969
  plan,
@@ -14971,16 +15049,16 @@ const BankRedirection = () => {
14971
15049
  }));
14972
15050
  };
14973
15051
 
14974
- var _path$l;
15052
+ var _path$k;
14975
15053
 
14976
- function _extends$n() { _extends$n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
15054
+ function _extends$m() { _extends$m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
14977
15055
 
14978
15056
  function SvgLock(props) {
14979
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
15057
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
14980
15058
  xmlns: "http://www.w3.org/2000/svg",
14981
15059
  viewBox: "0 0 20 20",
14982
15060
  fill: "currentColor"
14983
- }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
15061
+ }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
14984
15062
  fillRule: "evenodd",
14985
15063
  d: "M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",
14986
15064
  clipRule: "evenodd"
@@ -14997,7 +15075,7 @@ const SelectedPaymentMethod = () => {
14997
15075
  state: {
14998
15076
  isLoading
14999
15077
  }
15000
- } = React.useContext(store$g);
15078
+ } = React.useContext(store$f);
15001
15079
  const {
15002
15080
  switchView,
15003
15081
  selectedPaymentMethodId
@@ -15039,7 +15117,7 @@ const TaxAmount = () => {
15039
15117
  state: {
15040
15118
  taxAmount
15041
15119
  }
15042
- } = React.useContext(store$g);
15120
+ } = React.useContext(store$f);
15043
15121
  const {
15044
15122
  plan
15045
15123
  } = usePelcro();
@@ -15072,9 +15150,10 @@ function PaymentMethodView({
15072
15150
  const {
15073
15151
  t
15074
15152
  } = useTranslation("checkoutForm");
15153
+ const cardProcessor = getSiteCardProcessor();
15075
15154
  return /*#__PURE__*/React__default['default'].createElement("div", {
15076
15155
  className: "plc-flex plc-flex-col plc-items-center plc-mt-4 sm:plc-px-8 pelcro-payment-block"
15077
- }, /*#__PURE__*/React__default['default'].createElement("div", {
15156
+ }, cardProcessor === "stripe" && /*#__PURE__*/React__default['default'].createElement("div", {
15078
15157
  className: "plc-flex plc-items-center plc-w-full plc-px-4 plc-py-2 plc-text-center plc-text-green-600 plc-border plc-border-green-400 plc-rounded plc-bg-green-50"
15079
15158
  }, /*#__PURE__*/React__default['default'].createElement(SvgLock, {
15080
15159
  className: "plc-w-5 plc-h-5 plc-mr-1"
@@ -15202,12 +15281,12 @@ function SubscriptionRenewModal({
15202
15281
  }
15203
15282
  SubscriptionRenewModal.viewId = "subscription-renew";
15204
15283
 
15205
- var _path$k;
15284
+ var _path$j;
15206
15285
 
15207
- function _extends$m() { _extends$m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
15286
+ function _extends$l() { _extends$l = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
15208
15287
 
15209
15288
  function SvgGift(props) {
15210
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
15289
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
15211
15290
  className: "plc-w-6 plc-h-6 plc-mr-2",
15212
15291
  fill: "none",
15213
15292
  stroke: "currentColor",
@@ -15216,7 +15295,7 @@ function SvgGift(props) {
15216
15295
  strokeWidth: 2,
15217
15296
  viewBox: "0 0 24 24",
15218
15297
  xmlns: "http://www.w3.org/2000/svg"
15219
- }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
15298
+ }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
15220
15299
  d: "M20 12v10H4V12M2 7h20v5H2zM12 22V7M12 7H7.5a2.5 2.5 0 010-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z"
15221
15300
  })));
15222
15301
  }
@@ -15303,7 +15382,7 @@ const getSuccessContent = i18n => {
15303
15382
  className: "plc-w-32 plc-my-4 plc-text-green-500"
15304
15383
  }),
15305
15384
  successTitle: i18n("messages.invoicePayment.title"),
15306
- successContent: i18n("messages.invoicePayment.title")
15385
+ successContent: i18n("messages.invoicePayment.content")
15307
15386
  }
15308
15387
  };
15309
15388
  return wordingDictionary[flow];
@@ -15557,7 +15636,7 @@ class DefaultNewsLetter extends React.Component {
15557
15636
 
15558
15637
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
15559
15638
 
15560
- const initialState$f = {
15639
+ const initialState$e = {
15561
15640
  didSubToNewslettersBefore: false,
15562
15641
  newsletters: [],
15563
15642
  isListLoading: true,
@@ -15567,10 +15646,10 @@ const initialState$f = {
15567
15646
  content: ""
15568
15647
  }
15569
15648
  };
15570
- const store$f = /*#__PURE__*/React.createContext(initialState$f);
15649
+ const store$e = /*#__PURE__*/React.createContext(initialState$e);
15571
15650
  const {
15572
- Provider: Provider$f
15573
- } = store$f;
15651
+ Provider: Provider$e
15652
+ } = store$e;
15574
15653
 
15575
15654
  const NewsletterUpdateContainer = ({
15576
15655
  style,
@@ -15683,7 +15762,7 @@ const NewsletterUpdateContainer = ({
15683
15762
  default:
15684
15763
  return state;
15685
15764
  }
15686
- }, initialState$f);
15765
+ }, initialState$e);
15687
15766
  React.useEffect(() => {
15688
15767
  const getUserNewsletters = () => {
15689
15768
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -15727,7 +15806,7 @@ const NewsletterUpdateContainer = ({
15727
15806
  style: { ...style
15728
15807
  },
15729
15808
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
15730
- }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
15809
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
15731
15810
  value: {
15732
15811
  state,
15733
15812
  dispatch
@@ -15735,12 +15814,12 @@ const NewsletterUpdateContainer = ({
15735
15814
  }, children.length ? children.map((child, i) => {
15736
15815
  if (child) {
15737
15816
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
15738
- store: store$f,
15817
+ store: store$e,
15739
15818
  key: i
15740
15819
  });
15741
15820
  }
15742
15821
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
15743
- store: store$f
15822
+ store: store$e
15744
15823
  })));
15745
15824
  };
15746
15825
 
@@ -15755,7 +15834,7 @@ const NewsletterUpdateButton = ({
15755
15834
  isSubmitting,
15756
15835
  isListLoading
15757
15836
  }
15758
- } = React.useContext(store$f);
15837
+ } = React.useContext(store$e);
15759
15838
  const {
15760
15839
  t
15761
15840
  } = useTranslation("newsletter");
@@ -15785,7 +15864,7 @@ const NewsletterUpdateList = () => {
15785
15864
  newsletters,
15786
15865
  isListLoading
15787
15866
  }
15788
- } = React.useContext(store$f);
15867
+ } = React.useContext(store$e);
15789
15868
 
15790
15869
  if (isListLoading) {
15791
15870
  return /*#__PURE__*/React__default['default'].createElement(Loader, {
@@ -15989,7 +16068,7 @@ function SubscriptionCreateModal({
15989
16068
  SubscriptionCreateModal.viewId = "subscription-create";
15990
16069
 
15991
16070
  var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
15992
- const initialState$e = {
16071
+ const initialState$d = {
15993
16072
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
15994
16073
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
15995
16074
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
@@ -16002,10 +16081,10 @@ const initialState$e = {
16002
16081
  content: ""
16003
16082
  }
16004
16083
  };
16005
- const store$e = /*#__PURE__*/React.createContext(initialState$e);
16084
+ const store$d = /*#__PURE__*/React.createContext(initialState$d);
16006
16085
  const {
16007
- Provider: Provider$e
16008
- } = store$e;
16086
+ Provider: Provider$d
16087
+ } = store$d;
16009
16088
 
16010
16089
  const UserUpdateContainer = ({
16011
16090
  style,
@@ -16137,27 +16216,27 @@ const UserUpdateContainer = ({
16137
16216
  default:
16138
16217
  return state;
16139
16218
  }
16140
- }, initialState$e);
16219
+ }, initialState$d);
16141
16220
  return /*#__PURE__*/React__default['default'].createElement("div", {
16142
16221
  style: { ...style
16143
16222
  },
16144
16223
  className: `pelcro-container pelcro-user-update-container ${className}`
16145
- }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
16224
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
16146
16225
  value: {
16147
16226
  state,
16148
16227
  dispatch
16149
16228
  }
16150
16229
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
16151
- store: store$e,
16230
+ store: store$d,
16152
16231
  key: i
16153
16232
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
16154
- store: store$e
16233
+ store: store$d
16155
16234
  })));
16156
16235
  };
16157
16236
 
16158
16237
  const UserUpdateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
16159
16238
  disabled: true,
16160
- store: store$e
16239
+ store: store$d
16161
16240
  }, props));
16162
16241
 
16163
16242
  const UserUpdateButton = ({
@@ -16170,7 +16249,7 @@ const UserUpdateButton = ({
16170
16249
  buttonDisabled
16171
16250
  },
16172
16251
  dispatch
16173
- } = React.useContext(store$e);
16252
+ } = React.useContext(store$d);
16174
16253
  const {
16175
16254
  t
16176
16255
  } = useTranslation("userEdit");
@@ -16187,11 +16266,11 @@ const UserUpdateButton = ({
16187
16266
  };
16188
16267
 
16189
16268
  const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
16190
- store: store$e
16269
+ store: store$d
16191
16270
  }, props));
16192
16271
 
16193
16272
  const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
16194
- store: store$e
16273
+ store: store$d
16195
16274
  }, props));
16196
16275
 
16197
16276
  function Phone({
@@ -16220,22 +16299,22 @@ function Phone({
16220
16299
  }
16221
16300
 
16222
16301
  const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
16223
- store: store$e
16302
+ store: store$d
16224
16303
  }, props));
16225
16304
 
16226
16305
  var userSolidIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22plc-h-5%20plc-w-5%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22white%22%3E%20%20%3Cpath%20transform%3D%22translate%280%2C2%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M10%209a3%203%200%20100-6%203%203%200%20000%206zm-7%209a7%207%200%201114%200H3z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E";
16227
16306
 
16228
- var _path$j;
16307
+ var _path$i;
16229
16308
 
16230
- function _extends$l() { _extends$l = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
16309
+ function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
16231
16310
 
16232
16311
  function SvgEdit(props) {
16233
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
16312
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
16234
16313
  className: "plc-w-6 plc-h-6",
16235
16314
  xmlns: "http://www.w3.org/2000/svg",
16236
16315
  viewBox: "0 0 20 20",
16237
16316
  fill: "currentColor"
16238
- }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
16317
+ }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
16239
16318
  d: "M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zm-2.207 2.207L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"
16240
16319
  })));
16241
16320
  }
@@ -16367,16 +16446,16 @@ function DisplayName({
16367
16446
  }
16368
16447
 
16369
16448
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
16370
- store: store$e
16449
+ store: store$d
16371
16450
  }, props));
16372
16451
 
16373
16452
  const UserUpdateTextInput = props => {
16374
16453
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
16375
- store: store$e
16454
+ store: store$d
16376
16455
  }));
16377
16456
  };
16378
16457
 
16379
- const initialState$d = {
16458
+ const initialState$c = {
16380
16459
  isSubmitting: false,
16381
16460
  firstName: "",
16382
16461
  firstNameError: "",
@@ -16401,10 +16480,10 @@ const initialState$d = {
16401
16480
  content: ""
16402
16481
  }
16403
16482
  };
16404
- const store$d = /*#__PURE__*/React.createContext(initialState$d);
16483
+ const store$c = /*#__PURE__*/React.createContext(initialState$c);
16405
16484
  const {
16406
- Provider: Provider$d
16407
- } = store$d;
16485
+ Provider: Provider$c
16486
+ } = store$c;
16408
16487
 
16409
16488
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
16410
16489
 
@@ -16611,7 +16690,7 @@ const AddressCreateContainer = ({
16611
16690
  default:
16612
16691
  return state;
16613
16692
  }
16614
- }, initialState$d);
16693
+ }, initialState$c);
16615
16694
  React.useEffect(() => {
16616
16695
  const getStates = () => {
16617
16696
  dispatch({
@@ -16643,16 +16722,16 @@ const AddressCreateContainer = ({
16643
16722
  style: { ...style
16644
16723
  },
16645
16724
  className: `pelcro-container pelcro-address-create-container ${className}`
16646
- }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
16725
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
16647
16726
  value: {
16648
16727
  state,
16649
16728
  dispatch
16650
16729
  }
16651
16730
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
16652
- store: store$d,
16731
+ store: store$c,
16653
16732
  key: i
16654
16733
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
16655
- store: store$d
16734
+ store: store$c
16656
16735
  })));
16657
16736
  };
16658
16737
 
@@ -16663,7 +16742,7 @@ function AddressCreateFirstName(props) {
16663
16742
  firstName,
16664
16743
  firstNameError
16665
16744
  }
16666
- } = React.useContext(store$d);
16745
+ } = React.useContext(store$c);
16667
16746
 
16668
16747
  const handleBlur = () => {
16669
16748
  return dispatch({
@@ -16706,7 +16785,7 @@ function AddressCreateLastName(props) {
16706
16785
  lastName,
16707
16786
  lastNameError
16708
16787
  }
16709
- } = React.useContext(store$d);
16788
+ } = React.useContext(store$c);
16710
16789
 
16711
16790
  const handleBlur = () => {
16712
16791
  return dispatch({
@@ -16749,7 +16828,7 @@ function AddressCreateLine1(props) {
16749
16828
  line1,
16750
16829
  line1Error
16751
16830
  }
16752
- } = React.useContext(store$d);
16831
+ } = React.useContext(store$c);
16753
16832
 
16754
16833
  const handleBlur = () => {
16755
16834
  return dispatch({
@@ -16792,7 +16871,7 @@ function AddressCreateCity(props) {
16792
16871
  city,
16793
16872
  cityError
16794
16873
  }
16795
- } = React.useContext(store$d);
16874
+ } = React.useContext(store$c);
16796
16875
 
16797
16876
  const handleBlur = () => {
16798
16877
  return dispatch({
@@ -16835,7 +16914,7 @@ function AddressCreatePostalCode(props) {
16835
16914
  postalCode,
16836
16915
  postalCodeError
16837
16916
  }
16838
- } = React.useContext(store$d);
16917
+ } = React.useContext(store$c);
16839
16918
 
16840
16919
  const handleBlur = () => {
16841
16920
  return dispatch({
@@ -16881,7 +16960,7 @@ const AddressCreateSubmit = ({
16881
16960
  state: {
16882
16961
  isSubmitting
16883
16962
  }
16884
- } = React.useContext(store$d);
16963
+ } = React.useContext(store$c);
16885
16964
  const {
16886
16965
  t
16887
16966
  } = useTranslation("address");
@@ -16992,7 +17071,7 @@ function CountrySelect({
16992
17071
  }
16993
17072
 
16994
17073
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
16995
- store: store$d
17074
+ store: store$c
16996
17075
  }, props));
16997
17076
 
16998
17077
  function StateSelect({
@@ -17080,7 +17159,7 @@ function StateSelect({
17080
17159
  }
17081
17160
 
17082
17161
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
17083
- store: store$d
17162
+ store: store$c
17084
17163
  }, props));
17085
17164
 
17086
17165
  const AddressCreateView = props => {
@@ -17185,18 +17264,18 @@ AddressCreateModal.viewId = "address-create";
17185
17264
 
17186
17265
  const AddressCreateTextInput = props => {
17187
17266
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
17188
- store: store$d
17267
+ store: store$c
17189
17268
  }));
17190
17269
  };
17191
17270
 
17192
17271
  const AddressCreateLine2 = props => {
17193
17272
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
17194
17273
  fieldName: "line2",
17195
- store: store$d
17274
+ store: store$c
17196
17275
  }, props));
17197
17276
  };
17198
17277
 
17199
- const initialState$c = {
17278
+ const initialState$b = {
17200
17279
  isSubmitting: false,
17201
17280
  firstName: "",
17202
17281
  firstNameError: "",
@@ -17221,10 +17300,10 @@ const initialState$c = {
17221
17300
  content: ""
17222
17301
  }
17223
17302
  };
17224
- const store$c = /*#__PURE__*/React.createContext(initialState$c);
17303
+ const store$b = /*#__PURE__*/React.createContext(initialState$b);
17225
17304
  const {
17226
- Provider: Provider$c
17227
- } = store$c;
17305
+ Provider: Provider$b
17306
+ } = store$b;
17228
17307
 
17229
17308
  const AddressUpdateContainer = ({
17230
17309
  style,
@@ -17276,7 +17355,7 @@ const AddressUpdateContainer = ({
17276
17355
  const thisAddress = addresses[address];
17277
17356
 
17278
17357
  if (+thisAddress.id === +addressId) {
17279
- const newState = { ...initialState$c,
17358
+ const newState = { ...initialState$b,
17280
17359
  firstName: thisAddress.first_name,
17281
17360
  lastName: thisAddress.last_name,
17282
17361
  line1: thisAddress.line1,
@@ -17409,7 +17488,7 @@ const AddressUpdateContainer = ({
17409
17488
  default:
17410
17489
  return state;
17411
17490
  }
17412
- }, initialState$c);
17491
+ }, initialState$b);
17413
17492
  React.useEffect(() => {
17414
17493
  const getStates = () => {
17415
17494
  dispatch({
@@ -17441,21 +17520,21 @@ const AddressUpdateContainer = ({
17441
17520
  style: { ...style
17442
17521
  },
17443
17522
  className: `pelcro-container pelcro-address-update-container ${className}`
17444
- }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
17523
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
17445
17524
  value: {
17446
17525
  state,
17447
17526
  dispatch
17448
17527
  }
17449
17528
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
17450
- store: store$c,
17529
+ store: store$b,
17451
17530
  key: i
17452
17531
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
17453
- store: store$c
17532
+ store: store$b
17454
17533
  })));
17455
17534
  };
17456
17535
 
17457
17536
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
17458
- store: store$c
17537
+ store: store$b
17459
17538
  }, props));
17460
17539
 
17461
17540
  function AddressUpdateFirstName(props) {
@@ -17465,7 +17544,7 @@ function AddressUpdateFirstName(props) {
17465
17544
  firstName,
17466
17545
  firstNameError
17467
17546
  }
17468
- } = React.useContext(store$c);
17547
+ } = React.useContext(store$b);
17469
17548
 
17470
17549
  const handleBlur = () => {
17471
17550
  return dispatch({
@@ -17508,7 +17587,7 @@ function AddressUpdateLastName(props) {
17508
17587
  lastName,
17509
17588
  lastNameError
17510
17589
  }
17511
- } = React.useContext(store$c);
17590
+ } = React.useContext(store$b);
17512
17591
 
17513
17592
  const handleBlur = () => {
17514
17593
  return dispatch({
@@ -17551,7 +17630,7 @@ function AddressUpdateLine1(props) {
17551
17630
  line1,
17552
17631
  line1Error
17553
17632
  }
17554
- } = React.useContext(store$c);
17633
+ } = React.useContext(store$b);
17555
17634
 
17556
17635
  const handleBlur = () => {
17557
17636
  return dispatch({
@@ -17591,7 +17670,7 @@ const AddressUpdateLine2 = props => {
17591
17670
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
17592
17671
  fieldName: "line2"
17593
17672
  }, props, {
17594
- store: store$c
17673
+ store: store$b
17595
17674
  }));
17596
17675
  };
17597
17676
 
@@ -17602,7 +17681,7 @@ function AddressUpdateCity(props) {
17602
17681
  city,
17603
17682
  cityError
17604
17683
  }
17605
- } = React.useContext(store$c);
17684
+ } = React.useContext(store$b);
17606
17685
 
17607
17686
  const handleBlur = () => {
17608
17687
  return dispatch({
@@ -17645,7 +17724,7 @@ function AddressUpdatePostalCode(props) {
17645
17724
  postalCode,
17646
17725
  postalCodeError
17647
17726
  }
17648
- } = React.useContext(store$c);
17727
+ } = React.useContext(store$b);
17649
17728
 
17650
17729
  const handleBlur = () => {
17651
17730
  return dispatch({
@@ -17691,7 +17770,7 @@ const AddressUpdateSubmit = ({
17691
17770
  state: {
17692
17771
  isSubmitting
17693
17772
  }
17694
- } = React.useContext(store$c);
17773
+ } = React.useContext(store$b);
17695
17774
  const {
17696
17775
  t
17697
17776
  } = useTranslation("address");
@@ -17707,7 +17786,7 @@ const AddressUpdateSubmit = ({
17707
17786
  };
17708
17787
 
17709
17788
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
17710
- store: store$c
17789
+ store: store$b
17711
17790
  }, props));
17712
17791
 
17713
17792
  const AddressUpdateView = props => {
@@ -17790,7 +17869,7 @@ AddressUpdateModal.viewId = "address-edit";
17790
17869
 
17791
17870
  const AddressUpdateTextInput = props => {
17792
17871
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
17793
- store: store$c
17872
+ store: store$b
17794
17873
  }));
17795
17874
  };
17796
17875
 
@@ -17873,7 +17952,7 @@ const PaymentMethodUpdateModal = props => {
17873
17952
  };
17874
17953
  PaymentMethodUpdateModal.viewId = "payment-method-update";
17875
17954
 
17876
- const initialState$b = {
17955
+ const initialState$a = {
17877
17956
  email: "",
17878
17957
  password: "",
17879
17958
  passwordError: null,
@@ -17886,10 +17965,10 @@ const initialState$b = {
17886
17965
  content: ""
17887
17966
  }
17888
17967
  };
17889
- const store$b = /*#__PURE__*/React.createContext(initialState$b);
17968
+ const store$a = /*#__PURE__*/React.createContext(initialState$a);
17890
17969
  const {
17891
- Provider: Provider$b
17892
- } = store$b;
17970
+ Provider: Provider$a
17971
+ } = store$a;
17893
17972
 
17894
17973
  const PasswordResetContainer = ({
17895
17974
  style,
@@ -17946,7 +18025,7 @@ const PasswordResetContainer = ({
17946
18025
  type: SET_EMAIL,
17947
18026
  payload: window.Pelcro.helpers.getURLParameter("email")
17948
18027
  });
17949
- initialState$b.email = window.Pelcro.helpers.getURLParameter("email");
18028
+ initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
17950
18029
  dispatch({
17951
18030
  type: SET_TOKEN,
17952
18031
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -18006,26 +18085,26 @@ const PasswordResetContainer = ({
18006
18085
  default:
18007
18086
  return state;
18008
18087
  }
18009
- }, initialState$b);
18088
+ }, initialState$a);
18010
18089
  return /*#__PURE__*/React__default['default'].createElement("div", {
18011
18090
  style: { ...style
18012
18091
  },
18013
18092
  className: `pelcro-container pelcro-password-reset-container ${className}`
18014
- }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
18093
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
18015
18094
  value: {
18016
18095
  state,
18017
18096
  dispatch
18018
18097
  }
18019
18098
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18020
- store: store$b,
18099
+ store: store$a,
18021
18100
  key: i
18022
18101
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18023
- store: store$b
18102
+ store: store$a
18024
18103
  })));
18025
18104
  };
18026
18105
 
18027
18106
  const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
18028
- store: store$b
18107
+ store: store$a
18029
18108
  }, props));
18030
18109
 
18031
18110
  const PasswordResetButton = ({
@@ -18038,7 +18117,7 @@ const PasswordResetButton = ({
18038
18117
  buttonDisabled
18039
18118
  },
18040
18119
  dispatch
18041
- } = React.useContext(store$b);
18120
+ } = React.useContext(store$a);
18042
18121
  const {
18043
18122
  t
18044
18123
  } = useTranslation("passwordReset");
@@ -18055,14 +18134,14 @@ const PasswordResetButton = ({
18055
18134
  };
18056
18135
 
18057
18136
  const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
18058
- store: store$b
18137
+ store: store$a
18059
18138
  }, props, {
18060
18139
  value: window.Pelcro.helpers.getURLParameter("email"),
18061
18140
  disabled: true
18062
18141
  }));
18063
18142
 
18064
18143
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
18065
- store: store$b
18144
+ store: store$a
18066
18145
  }, props));
18067
18146
 
18068
18147
  const PasswordResetView = props => {
@@ -18114,7 +18193,7 @@ const PasswordResetModal = ({
18114
18193
  };
18115
18194
  PasswordResetModal.viewId = "password-reset";
18116
18195
 
18117
- const initialState$a = {
18196
+ const initialState$9 = {
18118
18197
  email: "",
18119
18198
  emailError: null,
18120
18199
  buttonDisabled: false,
@@ -18123,10 +18202,10 @@ const initialState$a = {
18123
18202
  content: ""
18124
18203
  }
18125
18204
  };
18126
- const store$a = /*#__PURE__*/React.createContext(initialState$a);
18205
+ const store$9 = /*#__PURE__*/React.createContext(initialState$9);
18127
18206
  const {
18128
- Provider: Provider$a
18129
- } = store$a;
18207
+ Provider: Provider$9
18208
+ } = store$9;
18130
18209
 
18131
18210
  const PasswordForgotContainer = ({
18132
18211
  style,
@@ -18204,21 +18283,21 @@ const PasswordForgotContainer = ({
18204
18283
  default:
18205
18284
  return state;
18206
18285
  }
18207
- }, initialState$a);
18286
+ }, initialState$9);
18208
18287
  return /*#__PURE__*/React__default['default'].createElement("div", {
18209
18288
  style: { ...style
18210
18289
  },
18211
18290
  className: `pelcro-container pelcro-password-forgot-container ${className}`
18212
- }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
18291
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
18213
18292
  value: {
18214
18293
  state,
18215
18294
  dispatch
18216
18295
  }
18217
18296
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18218
- store: store$a,
18297
+ store: store$9,
18219
18298
  key: i
18220
18299
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18221
- store: store$a
18300
+ store: store$9
18222
18301
  })));
18223
18302
  };
18224
18303
 
@@ -18234,7 +18313,7 @@ const PasswordForgotButton = ({
18234
18313
  emailError
18235
18314
  },
18236
18315
  dispatch
18237
- } = React.useContext(store$a);
18316
+ } = React.useContext(store$9);
18238
18317
  const {
18239
18318
  t
18240
18319
  } = useTranslation("passwordForgot");
@@ -18255,7 +18334,7 @@ const PasswordForgotButton = ({
18255
18334
  };
18256
18335
 
18257
18336
  const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
18258
- store: store$a
18337
+ store: store$9
18259
18338
  }, props));
18260
18339
 
18261
18340
  const PasswordForgotView = props => {
@@ -18305,7 +18384,7 @@ const PasswordForgotModal = ({
18305
18384
  };
18306
18385
  PasswordForgotModal.viewId = "password-forgot";
18307
18386
 
18308
- const initialState$9 = {
18387
+ const initialState$8 = {
18309
18388
  currentPassword: "",
18310
18389
  newPassword: "",
18311
18390
  confirmNewPassword: "",
@@ -18319,10 +18398,10 @@ const initialState$9 = {
18319
18398
  content: ""
18320
18399
  }
18321
18400
  };
18322
- const store$9 = /*#__PURE__*/React.createContext(initialState$9);
18401
+ const store$8 = /*#__PURE__*/React.createContext(initialState$8);
18323
18402
  const {
18324
- Provider: Provider$9
18325
- } = store$9;
18403
+ Provider: Provider$8
18404
+ } = store$8;
18326
18405
  const PasswordChangeContainer = ({
18327
18406
  style,
18328
18407
  className = "",
@@ -18474,21 +18553,21 @@ const PasswordChangeContainer = ({
18474
18553
  default:
18475
18554
  return state;
18476
18555
  }
18477
- }, initialState$9);
18556
+ }, initialState$8);
18478
18557
  return /*#__PURE__*/React__default['default'].createElement("div", {
18479
18558
  style: { ...style
18480
18559
  },
18481
18560
  className: `pelcro-container pelcro-password-change-container ${className}`
18482
- }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
18561
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
18483
18562
  value: {
18484
18563
  state,
18485
18564
  dispatch
18486
18565
  }
18487
18566
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18488
- store: store$9,
18567
+ store: store$8,
18489
18568
  key: i
18490
18569
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18491
- store: store$9
18570
+ store: store$8
18492
18571
  })));
18493
18572
  };
18494
18573
 
@@ -18499,7 +18578,7 @@ function PasswordChangeCurrentPassword(props) {
18499
18578
  currentPassword,
18500
18579
  currentPasswordError
18501
18580
  }
18502
- } = React.useContext(store$9);
18581
+ } = React.useContext(store$8);
18503
18582
  const handleBlur = React.useCallback(() => {
18504
18583
  return dispatch({
18505
18584
  type: VALIDATE_PASSWORD
@@ -18533,7 +18612,7 @@ function PasswordChangeNewPassword(props) {
18533
18612
  newPassword,
18534
18613
  newPasswordError
18535
18614
  }
18536
- } = React.useContext(store$9);
18615
+ } = React.useContext(store$8);
18537
18616
  const handleBlur = React.useCallback(() => {
18538
18617
  return dispatch({
18539
18618
  type: VALIDATE_NEW_PASSWORD
@@ -18567,7 +18646,7 @@ function PasswordChangeConfirmNewPassword(props) {
18567
18646
  confirmNewPassword,
18568
18647
  confirmNewPasswordError
18569
18648
  }
18570
- } = React.useContext(store$9);
18649
+ } = React.useContext(store$8);
18571
18650
  const handleBlur = React.useCallback(() => {
18572
18651
  return dispatch({
18573
18652
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -18608,7 +18687,7 @@ const PasswordChangeButton = ({
18608
18687
  confirmNewPasswordError
18609
18688
  },
18610
18689
  dispatch
18611
- } = React.useContext(store$9);
18690
+ } = React.useContext(store$8);
18612
18691
  const {
18613
18692
  t
18614
18693
  } = useTranslation("passwordChange");
@@ -18674,17 +18753,17 @@ const PasswordChangeModal = ({
18674
18753
  };
18675
18754
  PasswordChangeModal.viewId = "password-change";
18676
18755
 
18677
- const initialState$8 = {
18756
+ const initialState$7 = {
18678
18757
  buttonDisabled: false,
18679
18758
  alert: {
18680
18759
  type: "error",
18681
18760
  content: ""
18682
18761
  }
18683
18762
  };
18684
- const store$8 = /*#__PURE__*/React.createContext(initialState$8);
18763
+ const store$7 = /*#__PURE__*/React.createContext(initialState$7);
18685
18764
  const {
18686
- Provider: Provider$8
18687
- } = store$8;
18765
+ Provider: Provider$7
18766
+ } = store$7;
18688
18767
 
18689
18768
  const CartContainer = ({
18690
18769
  style,
@@ -18775,21 +18854,21 @@ const CartContainer = ({
18775
18854
  default:
18776
18855
  return state;
18777
18856
  }
18778
- }, initialState$8);
18857
+ }, initialState$7);
18779
18858
  return /*#__PURE__*/React__default['default'].createElement("div", {
18780
18859
  style: { ...style
18781
18860
  },
18782
18861
  className: `pelcro-container pelcro-cart-container ${className}`
18783
- }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
18862
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
18784
18863
  value: {
18785
18864
  state,
18786
18865
  dispatch
18787
18866
  }
18788
18867
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18789
- store: store$8,
18868
+ store: store$7,
18790
18869
  key: i
18791
18870
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18792
- store: store$8
18871
+ store: store$7
18793
18872
  })));
18794
18873
  };
18795
18874
 
@@ -18826,7 +18905,7 @@ const CartSubmit = ({
18826
18905
  buttonDisabled
18827
18906
  },
18828
18907
  dispatch
18829
- } = React.useContext(store$8);
18908
+ } = React.useContext(store$7);
18830
18909
  const {
18831
18910
  t
18832
18911
  } = useTranslation("cart");
@@ -18857,7 +18936,7 @@ const CartTotalPrice = () => {
18857
18936
  state: {
18858
18937
  alert
18859
18938
  }
18860
- } = React.useContext(store$8);
18939
+ } = React.useContext(store$7);
18861
18940
  const {
18862
18941
  cartItems
18863
18942
  } = usePelcro();
@@ -19170,7 +19249,7 @@ const OrderConfirmModal = props => {
19170
19249
  };
19171
19250
  OrderConfirmModal.viewId = "order-confirm";
19172
19251
 
19173
- const initialState$7 = {
19252
+ const initialState$6 = {
19174
19253
  email: "",
19175
19254
  firstName: "",
19176
19255
  lastName: "",
@@ -19182,10 +19261,10 @@ const initialState$7 = {
19182
19261
  content: ""
19183
19262
  }
19184
19263
  };
19185
- const store$7 = /*#__PURE__*/React.createContext(initialState$7);
19264
+ const store$6 = /*#__PURE__*/React.createContext(initialState$6);
19186
19265
  const {
19187
- Provider: Provider$7
19188
- } = store$7;
19266
+ Provider: Provider$6
19267
+ } = store$6;
19189
19268
 
19190
19269
  const GiftCreateContainer = ({
19191
19270
  style,
@@ -19289,21 +19368,21 @@ const GiftCreateContainer = ({
19289
19368
  default:
19290
19369
  return state;
19291
19370
  }
19292
- }, initialState$7);
19371
+ }, initialState$6);
19293
19372
  return /*#__PURE__*/React__default['default'].createElement("div", {
19294
19373
  style: { ...style
19295
19374
  },
19296
19375
  className: `pelcro-container pelcro-gift-create-container ${className}`
19297
- }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
19376
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
19298
19377
  value: {
19299
19378
  state,
19300
19379
  dispatch
19301
19380
  }
19302
19381
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19303
- store: store$7,
19382
+ store: store$6,
19304
19383
  key: i
19305
19384
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19306
- store: store$7
19385
+ store: store$6
19307
19386
  })));
19308
19387
  };
19309
19388
 
@@ -19317,7 +19396,7 @@ const GiftCreateSubmitButton = ({
19317
19396
  state: {
19318
19397
  disableSubmit
19319
19398
  }
19320
- } = React.useContext(store$7);
19399
+ } = React.useContext(store$6);
19321
19400
  const {
19322
19401
  t
19323
19402
  } = useTranslation("register");
@@ -19334,29 +19413,29 @@ const GiftCreateSubmitButton = ({
19334
19413
 
19335
19414
  const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
19336
19415
  initWithUserEmail: false,
19337
- store: store$7
19416
+ store: store$6
19338
19417
  }, props));
19339
19418
 
19340
19419
  const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
19341
- store: store$7
19420
+ store: store$6
19342
19421
  }, props));
19343
19422
 
19344
19423
  const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
19345
- store: store$7
19424
+ store: store$6
19346
19425
  }, props));
19347
19426
 
19348
- var _path$i;
19427
+ var _path$h;
19349
19428
 
19350
- function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
19429
+ function _extends$j() { _extends$j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
19351
19430
 
19352
19431
  function SvgInfoCircle(props) {
19353
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
19432
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
19354
19433
  xmlns: "http://www.w3.org/2000/svg",
19355
19434
  className: "plc-w-5 plc-h-5",
19356
19435
  fill: "none",
19357
19436
  viewBox: "0 0 24 24",
19358
19437
  stroke: "currentColor"
19359
- }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
19438
+ }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
19360
19439
  strokeLinecap: "round",
19361
19440
  strokeLinejoin: "round",
19362
19441
  strokeWidth: 2,
@@ -19427,7 +19506,7 @@ const GiftCreateStartDate = props => {
19427
19506
  const {
19428
19507
  dispatch,
19429
19508
  state
19430
- } = React.useContext(store$7);
19509
+ } = React.useContext(store$6);
19431
19510
 
19432
19511
  const handleInputChange = value => {
19433
19512
  dispatch({
@@ -19500,7 +19579,7 @@ function GiftCreateMessage(props) {
19500
19579
  const {
19501
19580
  dispatch,
19502
19581
  state
19503
- } = React.useContext(store$7);
19582
+ } = React.useContext(store$6);
19504
19583
  const MAX_CHARS_COUNT = 200;
19505
19584
  const remainingCharsCount = (_ref = MAX_CHARS_COUNT - ((_state$giftMessage = state.giftMessage) === null || _state$giftMessage === void 0 ? void 0 : _state$giftMessage.length)) !== null && _ref !== void 0 ? _ref : 0;
19506
19585
 
@@ -19624,7 +19703,7 @@ const GiftCreateModal = ({
19624
19703
  };
19625
19704
  GiftCreateModal.viewId = "gift-create";
19626
19705
 
19627
- const initialState$6 = {
19706
+ const initialState$5 = {
19628
19707
  giftCode: "",
19629
19708
  buttonDisabled: true,
19630
19709
  alert: {
@@ -19632,10 +19711,10 @@ const initialState$6 = {
19632
19711
  content: ""
19633
19712
  }
19634
19713
  };
19635
- const store$6 = /*#__PURE__*/React.createContext(initialState$6);
19714
+ const store$5 = /*#__PURE__*/React.createContext(initialState$5);
19636
19715
  const {
19637
- Provider: Provider$6
19638
- } = store$6;
19716
+ Provider: Provider$5
19717
+ } = store$5;
19639
19718
 
19640
19719
  const GiftRedeemContainer = ({
19641
19720
  style,
@@ -19700,21 +19779,21 @@ const GiftRedeemContainer = ({
19700
19779
  default:
19701
19780
  return state;
19702
19781
  }
19703
- }, initialState$6);
19782
+ }, initialState$5);
19704
19783
  return /*#__PURE__*/React__default['default'].createElement("div", {
19705
19784
  style: { ...style
19706
19785
  },
19707
19786
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
19708
- }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
19787
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
19709
19788
  value: {
19710
19789
  state,
19711
19790
  dispatch
19712
19791
  }
19713
19792
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19714
- store: store$6,
19793
+ store: store$5,
19715
19794
  key: i
19716
19795
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19717
- store: store$6
19796
+ store: store$5
19718
19797
  })));
19719
19798
  };
19720
19799
 
@@ -19751,7 +19830,7 @@ function GiftCode({
19751
19830
  }
19752
19831
 
19753
19832
  const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
19754
- store: store$6
19833
+ store: store$5
19755
19834
  }, props));
19756
19835
 
19757
19836
  const GiftRedeemSubmitButton = ({
@@ -19764,7 +19843,7 @@ const GiftRedeemSubmitButton = ({
19764
19843
  state: {
19765
19844
  disableSubmit
19766
19845
  }
19767
- } = React.useContext(store$6);
19846
+ } = React.useContext(store$5);
19768
19847
  const {
19769
19848
  t
19770
19849
  } = useTranslation("register");
@@ -19857,7 +19936,7 @@ const moveDefaultAddressToStart = addresses => {
19857
19936
  return [defaultAddress, ...addressesWithoutDefault];
19858
19937
  };
19859
19938
 
19860
- const initialState$5 = {
19939
+ const initialState$4 = {
19861
19940
  addresses: [],
19862
19941
  selectedAddressId: null,
19863
19942
  isSubmitting: false,
@@ -19866,10 +19945,10 @@ const initialState$5 = {
19866
19945
  content: ""
19867
19946
  }
19868
19947
  };
19869
- const store$5 = /*#__PURE__*/React.createContext(initialState$5);
19948
+ const store$4 = /*#__PURE__*/React.createContext(initialState$4);
19870
19949
  const {
19871
- Provider: Provider$5
19872
- } = store$5;
19950
+ Provider: Provider$4
19951
+ } = store$4;
19873
19952
 
19874
19953
  const AddressSelectContainer = ({
19875
19954
  style,
@@ -19964,7 +20043,7 @@ const AddressSelectContainer = ({
19964
20043
  default:
19965
20044
  return state;
19966
20045
  }
19967
- }, initialState$5);
20046
+ }, initialState$4);
19968
20047
  React.useEffect(() => {
19969
20048
  var _window$Pelcro$user$r;
19970
20049
 
@@ -19977,16 +20056,16 @@ const AddressSelectContainer = ({
19977
20056
  style: { ...style
19978
20057
  },
19979
20058
  className: `pelcro-container pelcro-address-select-container ${className}`
19980
- }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
20059
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
19981
20060
  value: {
19982
20061
  state,
19983
20062
  dispatch
19984
20063
  }
19985
20064
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19986
- store: store$5,
20065
+ store: store$4,
19987
20066
  key: i
19988
20067
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19989
- store: store$5
20068
+ store: store$4
19990
20069
  })));
19991
20070
  };
19992
20071
 
@@ -19997,7 +20076,7 @@ const AddressSelectList = () => {
19997
20076
  addresses,
19998
20077
  selectedAddressId
19999
20078
  }
20000
- } = React.useContext(store$5);
20079
+ } = React.useContext(store$4);
20001
20080
 
20002
20081
  const handleAddressSelect = event => {
20003
20082
  dispatch({
@@ -20041,7 +20120,7 @@ const AddressSelectSubmit = ({
20041
20120
  selectedAddressId,
20042
20121
  isSubmitting
20043
20122
  }
20044
- } = React.useContext(store$5);
20123
+ } = React.useContext(store$4);
20045
20124
  const {
20046
20125
  t
20047
20126
  } = useTranslation("address");
@@ -20137,7 +20216,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
20137
20216
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
20138
20217
  };
20139
20218
 
20140
- const initialState$4 = {
20219
+ const initialState$3 = {
20141
20220
  paymentMethods: [],
20142
20221
  selectedPaymentMethodId: null,
20143
20222
  isSubmitting: false,
@@ -20146,10 +20225,10 @@ const initialState$4 = {
20146
20225
  content: ""
20147
20226
  }
20148
20227
  };
20149
- const store$4 = /*#__PURE__*/React.createContext(initialState$4);
20228
+ const store$3 = /*#__PURE__*/React.createContext(initialState$3);
20150
20229
  const {
20151
- Provider: Provider$4
20152
- } = store$4;
20230
+ Provider: Provider$3
20231
+ } = store$3;
20153
20232
 
20154
20233
  const PaymentMethodSelectContainer = ({
20155
20234
  style,
@@ -20171,9 +20250,23 @@ const PaymentMethodSelectContainer = ({
20171
20250
  return onSuccess(selectedPaymentMethodId);
20172
20251
  };
20173
20252
 
20174
- const [state, dispatch] = useReducerWithSideEffects((state, action) => {
20175
- var _window$Pelcro$user$r2, _window$Pelcro$user$r3;
20253
+ const getInitialSelectedMethodId = () => {
20254
+ var _window$Pelcro$user$r2;
20255
+
20256
+ if (selectedPaymentMethodIdFromStore) {
20257
+ return selectedPaymentMethodIdFromStore;
20258
+ }
20259
+
20260
+ const defaultMethod = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.source;
20261
+
20262
+ if (defaultMethod && defaultMethod.status === "chargeable") {
20263
+ return String(defaultMethod.id);
20264
+ }
20176
20265
 
20266
+ return null;
20267
+ };
20268
+
20269
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
20177
20270
  switch (action.type) {
20178
20271
  case SELECT_PAYMENT_METHOD:
20179
20272
  return lib_7({ ...state,
@@ -20183,7 +20276,7 @@ const PaymentMethodSelectContainer = ({
20183
20276
  case LOAD_PAYMENT_METHODS:
20184
20277
  return lib_7({ ...state,
20185
20278
  paymentMethods: moveDefaultPaymentMethodToStart(action.payload),
20186
- selectedPaymentMethodId: selectedPaymentMethodIdFromStore !== null && selectedPaymentMethodIdFromStore !== void 0 ? selectedPaymentMethodIdFromStore : String((_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : (_window$Pelcro$user$r3 = _window$Pelcro$user$r2.source) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.id)
20279
+ selectedPaymentMethodId: getInitialSelectedMethodId()
20187
20280
  });
20188
20281
 
20189
20282
  case HANDLE_SUBMIT:
@@ -20194,29 +20287,29 @@ const PaymentMethodSelectContainer = ({
20194
20287
  default:
20195
20288
  return state;
20196
20289
  }
20197
- }, initialState$4);
20290
+ }, initialState$3);
20198
20291
  React.useEffect(() => {
20199
- var _window$Pelcro$user$r4;
20292
+ var _window$Pelcro$user$r3;
20200
20293
 
20201
20294
  dispatch({
20202
20295
  type: LOAD_PAYMENT_METHODS,
20203
- payload: (_window$Pelcro$user$r4 = window.Pelcro.user.read().sources) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : []
20296
+ payload: (_window$Pelcro$user$r3 = window.Pelcro.user.read().sources) !== null && _window$Pelcro$user$r3 !== void 0 ? _window$Pelcro$user$r3 : []
20204
20297
  });
20205
20298
  }, []);
20206
20299
  return /*#__PURE__*/React__default['default'].createElement("div", {
20207
20300
  style: { ...style
20208
20301
  },
20209
20302
  className: `pelcro-container pelcro-payment-select-container ${className}`
20210
- }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
20303
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
20211
20304
  value: {
20212
20305
  state,
20213
20306
  dispatch
20214
20307
  }
20215
20308
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
20216
- store: store$4,
20309
+ store: store$3,
20217
20310
  key: i
20218
20311
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
20219
- store: store$4
20312
+ store: store$3
20220
20313
  })));
20221
20314
  };
20222
20315
 
@@ -20230,7 +20323,7 @@ const PaymentMethodSelectList = () => {
20230
20323
  paymentMethods,
20231
20324
  selectedPaymentMethodId
20232
20325
  }
20233
- } = React.useContext(store$4);
20326
+ } = React.useContext(store$3);
20234
20327
 
20235
20328
  const handlePaymentMethodSelect = event => {
20236
20329
  dispatch({
@@ -20280,7 +20373,7 @@ const PaymentMethodSelectSubmit = ({
20280
20373
  selectedPaymentMethodId,
20281
20374
  isSubmitting
20282
20375
  }
20283
- } = React.useContext(store$4);
20376
+ } = React.useContext(store$3);
20284
20377
  return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
20285
20378
  onClick: () => {
20286
20379
  dispatch({
@@ -20354,8 +20447,8 @@ const PaymentMethodSelectModal = ({
20354
20447
  };
20355
20448
  PaymentMethodSelectModal.viewId = "payment-method-select";
20356
20449
 
20357
- function _extends$j() {
20358
- _extends$j = Object.assign || function (target) {
20450
+ function _extends$i() {
20451
+ _extends$i = Object.assign || function (target) {
20359
20452
  for (var i = 1; i < arguments.length; i++) {
20360
20453
  var source = arguments[i];
20361
20454
 
@@ -20369,7 +20462,7 @@ function _extends$j() {
20369
20462
  return target;
20370
20463
  };
20371
20464
 
20372
- return _extends$j.apply(this, arguments);
20465
+ return _extends$i.apply(this, arguments);
20373
20466
  }
20374
20467
 
20375
20468
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -20553,7 +20646,7 @@ function render(props, propsBag, defaultTag, features, visible) {
20553
20646
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
20554
20647
  return null;
20555
20648
  }, _match[RenderStrategy.Hidden] = function () {
20556
- return _render(_extends$j({}, _rest, {
20649
+ return _render(_extends$i({}, _rest, {
20557
20650
  hidden: true,
20558
20651
  style: {
20559
20652
  display: 'none'
@@ -21081,7 +21174,7 @@ function TransitionChild(props) {
21081
21174
  var passthroughProps = rest;
21082
21175
  return React__default['default'].createElement(NestingContext.Provider, {
21083
21176
  value: nesting
21084
- }, render(_extends$j({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
21177
+ }, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
21085
21178
  }
21086
21179
 
21087
21180
  function Transition(props) {
@@ -21125,7 +21218,7 @@ function Transition(props) {
21125
21218
  value: nestingBag
21126
21219
  }, React__default['default'].createElement(TransitionContext.Provider, {
21127
21220
  value: transitionBag
21128
- }, render(_extends$j({}, sharedProps, {
21221
+ }, render(_extends$i({}, sharedProps, {
21129
21222
  as: React.Fragment,
21130
21223
  children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
21131
21224
  }), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -21252,12 +21345,12 @@ var ActionTypes;
21252
21345
  })(ActionTypes || (ActionTypes = {}));
21253
21346
 
21254
21347
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
21255
- return _extends$j({}, state, {
21348
+ return _extends$i({}, state, {
21256
21349
  activeItemIndex: null,
21257
21350
  menuState: MenuStates.Closed
21258
21351
  });
21259
21352
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
21260
- return _extends$j({}, state, {
21353
+ return _extends$i({}, state, {
21261
21354
  menuState: MenuStates.Open
21262
21355
  });
21263
21356
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -21276,7 +21369,7 @@ var ActionTypes;
21276
21369
  }
21277
21370
  });
21278
21371
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
21279
- return _extends$j({}, state, {
21372
+ return _extends$i({}, state, {
21280
21373
  searchQuery: '',
21281
21374
  activeItemIndex: activeItemIndex
21282
21375
  });
@@ -21287,19 +21380,19 @@ var ActionTypes;
21287
21380
 
21288
21381
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
21289
21382
  });
21290
- if (match === -1 || match === state.activeItemIndex) return _extends$j({}, state, {
21383
+ if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
21291
21384
  searchQuery: searchQuery
21292
21385
  });
21293
- return _extends$j({}, state, {
21386
+ return _extends$i({}, state, {
21294
21387
  searchQuery: searchQuery,
21295
21388
  activeItemIndex: match
21296
21389
  });
21297
21390
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
21298
- return _extends$j({}, state, {
21391
+ return _extends$i({}, state, {
21299
21392
  searchQuery: ''
21300
21393
  });
21301
21394
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
21302
- return _extends$j({}, state, {
21395
+ return _extends$i({}, state, {
21303
21396
  items: [].concat(state.items, [{
21304
21397
  id: action.id,
21305
21398
  dataRef: action.dataRef
@@ -21312,7 +21405,7 @@ var ActionTypes;
21312
21405
  return a.id === action.id;
21313
21406
  });
21314
21407
  if (idx !== -1) nextItems.splice(idx, 1);
21315
- return _extends$j({}, state, {
21408
+ return _extends$i({}, state, {
21316
21409
  items: nextItems,
21317
21410
  activeItemIndex: function () {
21318
21411
  if (idx === state.activeItemIndex) return null;
@@ -21351,19 +21444,19 @@ var ActionTypes$1;
21351
21444
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
21352
21445
  if (state.disabled) return state;
21353
21446
  if (state.listboxState === ListboxStates.Closed) return state;
21354
- return _extends$j({}, state, {
21447
+ return _extends$i({}, state, {
21355
21448
  activeOptionIndex: null,
21356
21449
  listboxState: ListboxStates.Closed
21357
21450
  });
21358
21451
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
21359
21452
  if (state.disabled) return state;
21360
21453
  if (state.listboxState === ListboxStates.Open) return state;
21361
- return _extends$j({}, state, {
21454
+ return _extends$i({}, state, {
21362
21455
  listboxState: ListboxStates.Open
21363
21456
  });
21364
21457
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
21365
21458
  if (state.disabled === action.disabled) return state;
21366
- return _extends$j({}, state, {
21459
+ return _extends$i({}, state, {
21367
21460
  disabled: action.disabled
21368
21461
  });
21369
21462
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -21384,7 +21477,7 @@ var ActionTypes$1;
21384
21477
  }
21385
21478
  });
21386
21479
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
21387
- return _extends$j({}, state, {
21480
+ return _extends$i({}, state, {
21388
21481
  searchQuery: '',
21389
21482
  activeOptionIndex: activeOptionIndex
21390
21483
  });
@@ -21397,10 +21490,10 @@ var ActionTypes$1;
21397
21490
 
21398
21491
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
21399
21492
  });
21400
- if (match === -1 || match === state.activeOptionIndex) return _extends$j({}, state, {
21493
+ if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
21401
21494
  searchQuery: searchQuery
21402
21495
  });
21403
- return _extends$j({}, state, {
21496
+ return _extends$i({}, state, {
21404
21497
  searchQuery: searchQuery,
21405
21498
  activeOptionIndex: match
21406
21499
  });
@@ -21408,11 +21501,11 @@ var ActionTypes$1;
21408
21501
  if (state.disabled) return state;
21409
21502
  if (state.listboxState === ListboxStates.Closed) return state;
21410
21503
  if (state.searchQuery === '') return state;
21411
- return _extends$j({}, state, {
21504
+ return _extends$i({}, state, {
21412
21505
  searchQuery: ''
21413
21506
  });
21414
21507
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
21415
- return _extends$j({}, state, {
21508
+ return _extends$i({}, state, {
21416
21509
  options: [].concat(state.options, [{
21417
21510
  id: action.id,
21418
21511
  dataRef: action.dataRef
@@ -21425,7 +21518,7 @@ var ActionTypes$1;
21425
21518
  return a.id === action.id;
21426
21519
  });
21427
21520
  if (idx !== -1) nextOptions.splice(idx, 1);
21428
- return _extends$j({}, state, {
21521
+ return _extends$i({}, state, {
21429
21522
  options: nextOptions,
21430
21523
  activeOptionIndex: function () {
21431
21524
  if (idx === state.activeOptionIndex) return null;
@@ -21486,18 +21579,18 @@ const getPaymentCardIcon = name => {
21486
21579
  }));
21487
21580
  };
21488
21581
 
21489
- var _path$h;
21582
+ var _path$g;
21490
21583
 
21491
- function _extends$i() { _extends$i = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
21584
+ function _extends$h() { _extends$h = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
21492
21585
 
21493
21586
  function SvgChevronRight(props) {
21494
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
21587
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
21495
21588
  className: "plc-w-6 plc-h-6",
21496
21589
  xmlns: "http://www.w3.org/2000/svg",
21497
21590
  fill: "none",
21498
21591
  viewBox: "0 0 24 24",
21499
21592
  stroke: "currentColor"
21500
- }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
21593
+ }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
21501
21594
  strokeLinecap: "round",
21502
21595
  strokeLinejoin: "round",
21503
21596
  strokeWidth: 2,
@@ -21713,18 +21806,18 @@ const SavedItems = ({
21713
21806
  });
21714
21807
  };
21715
21808
 
21716
- var _path$g;
21809
+ var _path$f;
21717
21810
 
21718
- function _extends$h() { _extends$h = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
21811
+ function _extends$g() { _extends$g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
21719
21812
 
21720
21813
  function SvgRefresh(props) {
21721
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
21814
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
21722
21815
  className: "plc-w-4 plc-h-4 plc-mr-1",
21723
21816
  xmlns: "http://www.w3.org/2000/svg",
21724
21817
  fill: "none",
21725
21818
  viewBox: "0 0 24 24",
21726
21819
  stroke: "currentColor"
21727
- }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
21820
+ }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
21728
21821
  strokeLinecap: "round",
21729
21822
  strokeLinejoin: "round",
21730
21823
  strokeWidth: 2,
@@ -21732,35 +21825,35 @@ function SvgRefresh(props) {
21732
21825
  })));
21733
21826
  }
21734
21827
 
21735
- var _path$f;
21828
+ var _path$e;
21736
21829
 
21737
- function _extends$g() { _extends$g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
21830
+ function _extends$f() { _extends$f = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
21738
21831
 
21739
21832
  function SvgCalendar(props) {
21740
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
21833
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
21741
21834
  xmlns: "http://www.w3.org/2000/svg",
21742
21835
  className: "plc-h-4 plc-w-4 plc-mr-1",
21743
21836
  viewBox: "0 0 20 20",
21744
21837
  fill: "currentColor"
21745
- }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
21838
+ }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
21746
21839
  fillRule: "evenodd",
21747
21840
  d: "M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",
21748
21841
  clipRule: "evenodd"
21749
21842
  })));
21750
21843
  }
21751
21844
 
21752
- var _path$e;
21845
+ var _path$d;
21753
21846
 
21754
- function _extends$f() { _extends$f = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
21847
+ function _extends$e() { _extends$e = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
21755
21848
 
21756
21849
  function SvgPlus(props) {
21757
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
21850
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
21758
21851
  className: "plc-w-5 plc-h-5",
21759
21852
  xmlns: "http://www.w3.org/2000/svg",
21760
21853
  fill: "none",
21761
21854
  viewBox: "0 0 24 24",
21762
21855
  stroke: "currentColor"
21763
- }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
21856
+ }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
21764
21857
  strokeLinecap: "round",
21765
21858
  strokeLinejoin: "round",
21766
21859
  strokeWidth: 2,
@@ -21768,17 +21861,17 @@ function SvgPlus(props) {
21768
21861
  })));
21769
21862
  }
21770
21863
 
21771
- var _path$d;
21864
+ var _path$c;
21772
21865
 
21773
- function _extends$e() { _extends$e = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
21866
+ function _extends$d() { _extends$d = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
21774
21867
 
21775
21868
  function SvgCheckMark(props) {
21776
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
21869
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
21777
21870
  className: "plc-w-4 plc-h-4 plc-mr-1",
21778
21871
  xmlns: "http://www.w3.org/2000/svg",
21779
21872
  viewBox: "0 0 20 20",
21780
21873
  fill: "currentColor"
21781
- }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
21874
+ }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
21782
21875
  fillRule: "evenodd",
21783
21876
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
21784
21877
  clipRule: "evenodd"
@@ -21842,8 +21935,7 @@ const SubscriptionsItems = ({
21842
21935
  } = useTranslation("dashboard");
21843
21936
  const {
21844
21937
  switchView,
21845
- switchToAddressView,
21846
- switchToPaymentView
21938
+ isAuthenticated
21847
21939
  } = usePelcro();
21848
21940
  const subs = getNonDonationSubs();
21849
21941
  if (subs.length === 0) return null;
@@ -21885,12 +21977,7 @@ const SubscriptionsItems = ({
21885
21977
  const plan = window.Pelcro.plan.getById(plan_id);
21886
21978
  setProductAndPlan(product, plan);
21887
21979
  setSubscriptionIdToRenew(sub.id);
21888
-
21889
- if (product.address_required) {
21890
- return switchToAddressView();
21891
- }
21892
-
21893
- return switchToPaymentView();
21980
+ setView("plan-select");
21894
21981
  };
21895
21982
 
21896
21983
  const getPhases = () => {
@@ -22079,18 +22166,18 @@ Accordion.item = function AccordionItem({
22079
22166
  }, content)) : null;
22080
22167
  };
22081
22168
 
22082
- var _path$c;
22169
+ var _path$b;
22083
22170
 
22084
- function _extends$d() { _extends$d = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
22171
+ function _extends$c() { _extends$c = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
22085
22172
 
22086
22173
  function SvgExit(props) {
22087
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
22174
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
22088
22175
  className: "plc-w-6 plc-h-6",
22089
22176
  xmlns: "http://www.w3.org/2000/svg",
22090
22177
  fill: "none",
22091
22178
  viewBox: "0 0 24 24",
22092
22179
  stroke: "currentColor"
22093
- }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
22180
+ }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
22094
22181
  strokeLinecap: "round",
22095
22182
  strokeLinejoin: "round",
22096
22183
  strokeWidth: 2,
@@ -22098,17 +22185,17 @@ function SvgExit(props) {
22098
22185
  })));
22099
22186
  }
22100
22187
 
22101
- var _path$b;
22188
+ var _path$a;
22102
22189
 
22103
- function _extends$c() { _extends$c = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
22190
+ function _extends$b() { _extends$b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
22104
22191
 
22105
22192
  function SvgUser(props) {
22106
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
22193
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
22107
22194
  xmlns: "http://www.w3.org/2000/svg",
22108
22195
  fill: "none",
22109
22196
  viewBox: "0 0 24 24",
22110
22197
  stroke: "currentColor"
22111
- }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
22198
+ }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
22112
22199
  strokeLinecap: "round",
22113
22200
  strokeLinejoin: "round",
22114
22201
  strokeWidth: 2,
@@ -22116,18 +22203,18 @@ function SvgUser(props) {
22116
22203
  })));
22117
22204
  }
22118
22205
 
22119
- var _path$a;
22206
+ var _path$9;
22120
22207
 
22121
- function _extends$b() { _extends$b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
22208
+ function _extends$a() { _extends$a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
22122
22209
 
22123
22210
  function SvgNewsletter(props) {
22124
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
22211
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
22125
22212
  xmlns: "http://www.w3.org/2000/svg",
22126
22213
  className: "plc-h-5 plc-w-5",
22127
22214
  fill: "none",
22128
22215
  viewBox: "0 0 24 24",
22129
22216
  stroke: "currentColor"
22130
- }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
22217
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
22131
22218
  strokeLinecap: "round",
22132
22219
  strokeLinejoin: "round",
22133
22220
  strokeWidth: 2,
@@ -22135,18 +22222,18 @@ function SvgNewsletter(props) {
22135
22222
  })));
22136
22223
  }
22137
22224
 
22138
- var _path$9;
22225
+ var _path$8;
22139
22226
 
22140
- function _extends$a() { _extends$a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
22227
+ function _extends$9() { _extends$9 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
22141
22228
 
22142
22229
  function SvgDocument(props) {
22143
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
22230
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
22144
22231
  xmlns: "http://www.w3.org/2000/svg",
22145
22232
  className: "plc-h-6 plc-w-6 plc-mr-2",
22146
22233
  fill: "none",
22147
22234
  viewBox: "0 0 24 24",
22148
22235
  stroke: "currentColor"
22149
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
22236
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
22150
22237
  strokeLinecap: "round",
22151
22238
  strokeLinejoin: "round",
22152
22239
  strokeWidth: 2,
@@ -22154,18 +22241,18 @@ function SvgDocument(props) {
22154
22241
  })));
22155
22242
  }
22156
22243
 
22157
- var _path$8;
22244
+ var _path$7;
22158
22245
 
22159
- function _extends$9() { _extends$9 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
22246
+ function _extends$8() { _extends$8 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
22160
22247
 
22161
22248
  function SvgPaymentCard(props) {
22162
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
22249
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
22163
22250
  className: "plc-w-6 plc-h-6 plc-mr-2",
22164
22251
  xmlns: "http://www.w3.org/2000/svg",
22165
22252
  fill: "none",
22166
22253
  viewBox: "0 0 24 24",
22167
22254
  stroke: "currentColor"
22168
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
22255
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
22169
22256
  strokeLinecap: "round",
22170
22257
  strokeLinejoin: "round",
22171
22258
  strokeWidth: 2,
@@ -22173,18 +22260,18 @@ function SvgPaymentCard(props) {
22173
22260
  })));
22174
22261
  }
22175
22262
 
22176
- var _path$7, _path2$1;
22263
+ var _path$6, _path2$1;
22177
22264
 
22178
- function _extends$8() { _extends$8 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
22265
+ function _extends$7() { _extends$7 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
22179
22266
 
22180
22267
  function SvgLocationPin(props) {
22181
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
22268
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
22182
22269
  className: "plc-w-6 plc-h-6 plc-mr-2",
22183
22270
  xmlns: "http://www.w3.org/2000/svg",
22184
22271
  fill: "none",
22185
22272
  viewBox: "0 0 24 24",
22186
22273
  stroke: "currentColor"
22187
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
22274
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
22188
22275
  strokeLinecap: "round",
22189
22276
  strokeLinejoin: "round",
22190
22277
  strokeWidth: 2,
@@ -22199,10 +22286,10 @@ function SvgLocationPin(props) {
22199
22286
 
22200
22287
  var _switch;
22201
22288
 
22202
- function _extends$7() { _extends$7 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
22289
+ function _extends$6() { _extends$6 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
22203
22290
 
22204
22291
  function SvgSubscription(props) {
22205
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
22292
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
22206
22293
  xmlns: "http://www.w3.org/2000/svg",
22207
22294
  viewBox: "0 0 100 125",
22208
22295
  fill: "currentColor"
@@ -22217,18 +22304,18 @@ function SvgSubscription(props) {
22217
22304
  }))))));
22218
22305
  }
22219
22306
 
22220
- var _path$6;
22307
+ var _path$5;
22221
22308
 
22222
- function _extends$6() { _extends$6 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
22309
+ function _extends$5() { _extends$5 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
22223
22310
 
22224
22311
  function SvgShopping(props) {
22225
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
22312
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
22226
22313
  className: "plc-w-6 plc-h-6 plc-mr-2",
22227
22314
  xmlns: "http://www.w3.org/2000/svg",
22228
22315
  fill: "none",
22229
22316
  viewBox: "0 0 24 24",
22230
22317
  stroke: "currentColor"
22231
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
22318
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
22232
22319
  strokeLinecap: "round",
22233
22320
  strokeLinejoin: "round",
22234
22321
  strokeWidth: 2,
@@ -22236,18 +22323,18 @@ function SvgShopping(props) {
22236
22323
  })));
22237
22324
  }
22238
22325
 
22239
- var _path$5;
22326
+ var _path$4;
22240
22327
 
22241
- function _extends$5() { _extends$5 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
22328
+ function _extends$4() { _extends$4 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
22242
22329
 
22243
22330
  function SvgBookmark(props) {
22244
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
22331
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
22245
22332
  className: "plc-w-6 plc-h-6 plc-mr-2",
22246
22333
  xmlns: "http://www.w3.org/2000/svg",
22247
22334
  fill: "none",
22248
22335
  viewBox: "0 0 24 24",
22249
22336
  stroke: "currentColor"
22250
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
22337
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
22251
22338
  strokeLinecap: "round",
22252
22339
  strokeLinejoin: "round",
22253
22340
  strokeWidth: 2,
@@ -22255,33 +22342,33 @@ function SvgBookmark(props) {
22255
22342
  })));
22256
22343
  }
22257
22344
 
22258
- var _path$4;
22345
+ var _path$3;
22259
22346
 
22260
- function _extends$4() { _extends$4 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
22347
+ function _extends$3() { _extends$3 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
22261
22348
 
22262
22349
  function SvgKey(props) {
22263
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
22350
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
22264
22351
  xmlns: "http://www.w3.org/2000/svg",
22265
22352
  viewBox: "0 0 20 20",
22266
22353
  fill: "currentColor"
22267
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
22354
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
22268
22355
  fillRule: "evenodd",
22269
22356
  d: "M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z",
22270
22357
  clipRule: "evenodd"
22271
22358
  })));
22272
22359
  }
22273
22360
 
22274
- var _path$3;
22361
+ var _path$2;
22275
22362
 
22276
- function _extends$3() { _extends$3 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
22363
+ function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
22277
22364
 
22278
22365
  function SvgDonate(props) {
22279
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
22366
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
22280
22367
  width: 24,
22281
22368
  height: 24,
22282
22369
  fill: "currentColor",
22283
22370
  xmlns: "http://www.w3.org/2000/svg"
22284
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
22371
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
22285
22372
  d: "M4 21h9.62a3.995 3.995 0 003.037-1.397l5.102-5.952a1 1 0 00-.442-1.6l-1.968-.656a3.043 3.043 0 00-2.823.503l-3.185 2.547-.617-1.235A3.98 3.98 0 009.146 11H4c-1.103 0-2 .897-2 2v6c0 1.103.897 2 2 2zm0-8h5.146c.763 0 1.448.423 1.789 1.105l.447.895H7v2h6.014a.996.996 0 00.442-.11l.003-.001.004-.002h.003l.002-.001h.004l.001-.001c.009.003.003-.001.003-.001.01 0 .002-.001.002-.001h.001l.002-.001.003-.001.002-.001.002-.001.003-.001.002-.001c.003 0 .001-.001.002-.001l.003-.002.002-.001.002-.001.003-.001.002-.001h.001l.002-.001h.001l.002-.001.002-.001c.009-.001.003-.001.003-.001l.002-.001a.915.915 0 00.11-.078l4.146-3.317c.262-.208.623-.273.94-.167l.557.186-4.133 4.823a2.029 2.029 0 01-1.52.688H4v-6zM16 2h-.017c-.163.002-1.006.039-1.983.705-.951-.648-1.774-.7-1.968-.704L12.002 2h-.004c-.801 0-1.555.313-2.119.878C9.313 3.445 9 4.198 9 5s.313 1.555.861 2.104l3.414 3.586a1.006 1.006 0 001.45-.001l3.396-3.568C18.688 6.555 19 5.802 19 5s-.313-1.555-.878-2.121A2.978 2.978 0 0016.002 2H16zm1 3c0 .267-.104.518-.311.725L14 8.55l-2.707-2.843C11.104 5.518 11 5.267 11 5s.104-.518.294-.708A.977.977 0 0111.979 4c.025.001.502.032 1.067.485.081.065.163.139.247.222l.707.707.707-.707c.084-.083.166-.157.247-.222.529-.425.976-.478 1.052-.484a.987.987 0 01.701.292c.189.189.293.44.293.707z"
22286
22373
  })));
22287
22374
  }
@@ -22608,10 +22695,9 @@ class Dashboard extends React.Component {
22608
22695
  }) => {
22609
22696
  if (isGift) {
22610
22697
  this.props.setProductAndPlan(null, null, true);
22611
- return this.props.setView("plan-select");
22612
22698
  }
22613
22699
 
22614
- return this.props.setView("subscription-options");
22700
+ return this.props.setView("plan-select");
22615
22701
  });
22616
22702
 
22617
22703
  _defineProperty$3(this, "displayAddressCreate", () => {
@@ -23077,7 +23163,7 @@ const DashboardOpenButton = () => {
23077
23163
  };
23078
23164
  DashboardOpenButton.viewId = "dashboard-open";
23079
23165
 
23080
- const initialState$3 = {
23166
+ const initialState$2 = {
23081
23167
  imageSrc: null,
23082
23168
  crop: {
23083
23169
  x: 0,
@@ -23091,10 +23177,10 @@ const initialState$3 = {
23091
23177
  content: ""
23092
23178
  }
23093
23179
  };
23094
- const store$3 = /*#__PURE__*/React.createContext(initialState$3);
23180
+ const store$2 = /*#__PURE__*/React.createContext(initialState$2);
23095
23181
  const {
23096
- Provider: Provider$3
23097
- } = store$3;
23182
+ Provider: Provider$2
23183
+ } = store$2;
23098
23184
 
23099
23185
  const ProfilePicChangeContainer = ({
23100
23186
  style,
@@ -23228,21 +23314,21 @@ const ProfilePicChangeContainer = ({
23228
23314
  default:
23229
23315
  return state;
23230
23316
  }
23231
- }, initialState$3);
23317
+ }, initialState$2);
23232
23318
  return /*#__PURE__*/React__default['default'].createElement("div", {
23233
23319
  style: { ...style
23234
23320
  },
23235
23321
  className: `pelcro-container pelcro-profile-picture-container ${className}`
23236
- }, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
23322
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
23237
23323
  value: {
23238
23324
  state,
23239
23325
  dispatch
23240
23326
  }
23241
23327
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
23242
- store: store$3,
23328
+ store: store$2,
23243
23329
  key: i
23244
23330
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
23245
- store: store$3
23331
+ store: store$2
23246
23332
  })));
23247
23333
  };
23248
23334
  /**
@@ -23304,7 +23390,7 @@ const ProfilePicChangeButton = ({
23304
23390
  isSubmitting
23305
23391
  },
23306
23392
  dispatch
23307
- } = React.useContext(store$3);
23393
+ } = React.useContext(store$2);
23308
23394
  const {
23309
23395
  t
23310
23396
  } = useTranslation("userEdit");
@@ -24672,7 +24758,7 @@ const ProfilePicChangeCropper = ({
24672
24758
  zoom
24673
24759
  },
24674
24760
  dispatch
24675
- } = React.useContext(store$3);
24761
+ } = React.useContext(store$2);
24676
24762
  return /*#__PURE__*/React__default['default'].createElement("div", {
24677
24763
  className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
24678
24764
  }, /*#__PURE__*/React__default['default'].createElement(Cropper, Object.assign({
@@ -24714,7 +24800,7 @@ const ProfilePicChangeZoom = ({
24714
24800
  zoom
24715
24801
  },
24716
24802
  dispatch
24717
- } = React.useContext(store$3);
24803
+ } = React.useContext(store$2);
24718
24804
  const {
24719
24805
  t
24720
24806
  } = useTranslation("userEdit");
@@ -24737,18 +24823,18 @@ const ProfilePicChangeZoom = ({
24737
24823
  }, otherProps)));
24738
24824
  };
24739
24825
 
24740
- var _path$2;
24826
+ var _path$1;
24741
24827
 
24742
- function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
24828
+ function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
24743
24829
 
24744
24830
  function SvgPhotograph(props) {
24745
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
24831
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
24746
24832
  xmlns: "http://www.w3.org/2000/svg",
24747
24833
  className: "plc-h-6 plc-w-6",
24748
24834
  fill: "none",
24749
24835
  viewBox: "0 0 24 24",
24750
24836
  stroke: "currentColor"
24751
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
24837
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
24752
24838
  strokeLinecap: "round",
24753
24839
  strokeLinejoin: "round",
24754
24840
  strokeWidth: 2,
@@ -24766,7 +24852,7 @@ const ProfilePicChangeSelectButton = ({
24766
24852
  state: {
24767
24853
  isSubmitting
24768
24854
  }
24769
- } = React.useContext(store$3);
24855
+ } = React.useContext(store$2);
24770
24856
  const {
24771
24857
  t
24772
24858
  } = useTranslation("userEdit");
@@ -24808,7 +24894,7 @@ const ProfilePicChangeRemoveButton = ({
24808
24894
  state: {
24809
24895
  isSubmitting
24810
24896
  }
24811
- } = React.useContext(store$3);
24897
+ } = React.useContext(store$2);
24812
24898
  const {
24813
24899
  t
24814
24900
  } = useTranslation("userEdit");
@@ -24831,7 +24917,7 @@ const ProfilePicChangeWrapper = () => {
24831
24917
  state: {
24832
24918
  imageSrc
24833
24919
  }
24834
- } = React.useContext(store$3);
24920
+ } = React.useContext(store$2);
24835
24921
  const {
24836
24922
  t
24837
24923
  } = useTranslation("userEdit");
@@ -24893,17 +24979,17 @@ function ProfilePicChangeModal({
24893
24979
  }
24894
24980
  ProfilePicChangeModal.viewId = "profile-picture";
24895
24981
 
24896
- const initialState$2 = {
24982
+ const initialState$1 = {
24897
24983
  isSubmitting: false,
24898
24984
  alert: {
24899
24985
  type: "error",
24900
24986
  content: ""
24901
24987
  }
24902
24988
  };
24903
- const store$2 = /*#__PURE__*/React.createContext(initialState$2);
24989
+ const store$1 = /*#__PURE__*/React.createContext(initialState$1);
24904
24990
  const {
24905
- Provider: Provider$2
24906
- } = store$2;
24991
+ Provider: Provider$1
24992
+ } = store$1;
24907
24993
 
24908
24994
  const EmailVerifyContainer = ({
24909
24995
  style,
@@ -24966,21 +25052,21 @@ const EmailVerifyContainer = ({
24966
25052
  default:
24967
25053
  return state;
24968
25054
  }
24969
- }, initialState$2);
25055
+ }, initialState$1);
24970
25056
  return /*#__PURE__*/React__default['default'].createElement("div", {
24971
25057
  style: { ...style
24972
25058
  },
24973
25059
  className: `pelcro-container pelcro-email-verify-container ${className}`
24974
- }, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
25060
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
24975
25061
  value: {
24976
25062
  state,
24977
25063
  dispatch
24978
25064
  }
24979
25065
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
24980
- store: store$2,
25066
+ store: store$1,
24981
25067
  key: i
24982
25068
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
24983
- store: store$2
25069
+ store: store$1
24984
25070
  })));
24985
25071
  };
24986
25072
 
@@ -24994,7 +25080,7 @@ const EmailVerifyResendButton = ({
24994
25080
  state: {
24995
25081
  isSubmitting
24996
25082
  }
24997
- } = React.useContext(store$2);
25083
+ } = React.useContext(store$1);
24998
25084
  const {
24999
25085
  t
25000
25086
  } = useTranslation("verifyEmail");
@@ -25009,16 +25095,16 @@ const EmailVerifyResendButton = ({
25009
25095
  }, otherProps), name !== null && name !== void 0 ? name : t("labels.resend"));
25010
25096
  };
25011
25097
 
25012
- var _path$1, _path2;
25098
+ var _path, _path2;
25013
25099
 
25014
- function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
25100
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25015
25101
 
25016
25102
  function SvgEmailVerify(props) {
25017
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
25103
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
25018
25104
  className: "plc-w-6 plc-h-6",
25019
25105
  viewBox: "0 0 700 700",
25020
25106
  xmlns: "http://www.w3.org/2000/svg"
25021
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
25107
+ }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
25022
25108
  d: "M583.01 231.93a15.008 15.008 0 00-.887-3.875c-.562-1.254-1.129-2.508-1.695-3.762a14.686 14.686 0 00-1.898-1.789c-.438-.437-.653-1.027-1.153-1.414l-56.266-44.164v-52.484a15.555 15.555 0 00-15.554-15.555H434.56l-74.945-58.895a15.547 15.547 0 00-19.227 0l-74.945 58.895h-70.996a15.555 15.555 0 00-15.555 15.555v52.484l-56.266 44.16c-.496.39-.715.996-1.152 1.43v.004a13.37 13.37 0 00-1.898 1.773c-.22.426-.414.86-.59 1.305a14.158 14.158 0 00-1.106 2.457 15.009 15.009 0 00-.886 3.875c0 .48-.329.918-.329 1.398l.004 264.45a15.555 15.555 0 0015.555 15.555h435.55a15.555 15.555 0 0015.555-15.555v-264.45c0-.48-.278-.918-.325-1.398zm-41.176.809l-20.723 14.809v-31.11zm-191.83-150.73l34.223 26.883h-68.445zm-140 57.992h280v124.45c.07 1.593.383 3.168.934 4.664l-140.93 100.66-140.46-100.33c.214-.77.37-1.555.464-2.348zm-31.109 107.55l-20.719-14.81 20.719-16.27zm-31.113 234.67V263.56l193.18 137.99a15.562 15.562 0 0018.078 0l193.18-137.99v218.66z"
25023
25109
  })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
25024
25110
  d: "M324.33 291.81a15.56 15.56 0 0020.582-.297l85.555-77.777a15.56 15.56 0 00-20.938-23.023l-75.398 68.539-44.023-37.723a15.54 15.54 0 00-11.46-4.106 15.553 15.553 0 00-8.758 27.718z"
@@ -25122,11 +25208,11 @@ const invoicePaymentSubmitButton = props => {
25122
25208
  return /*#__PURE__*/React__default['default'].createElement(SubmitPaymentMethod, props);
25123
25209
  };
25124
25210
 
25125
- const initialState$1 = {};
25126
- const store$1 = /*#__PURE__*/React.createContext(initialState$1);
25211
+ const initialState = {};
25212
+ const store = /*#__PURE__*/React.createContext(initialState);
25127
25213
  const {
25128
- Provider: Provider$1
25129
- } = store$1;
25214
+ Provider
25215
+ } = store;
25130
25216
 
25131
25217
  const InvoiceDetailsContainer = ({
25132
25218
  style,
@@ -25147,21 +25233,21 @@ const InvoiceDetailsContainer = ({
25147
25233
  default:
25148
25234
  return state;
25149
25235
  }
25150
- }, initialState$1);
25236
+ }, initialState);
25151
25237
  return /*#__PURE__*/React__default['default'].createElement("div", {
25152
25238
  style: { ...style
25153
25239
  },
25154
25240
  className: `pelcro-container pelcro-invoice-details-container ${className}`
25155
- }, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
25241
+ }, /*#__PURE__*/React__default['default'].createElement(Provider, {
25156
25242
  value: {
25157
25243
  state,
25158
25244
  dispatch
25159
25245
  }
25160
25246
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
25161
- store: store$1,
25247
+ store,
25162
25248
  key: i
25163
25249
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25164
- store: store$1
25250
+ store
25165
25251
  })));
25166
25252
  };
25167
25253
 
@@ -25193,7 +25279,7 @@ const InvoiceDetailsPayButton = ({
25193
25279
  }) => {
25194
25280
  const {
25195
25281
  dispatch
25196
- } = React.useContext(store$1);
25282
+ } = React.useContext(store);
25197
25283
  const {
25198
25284
  t
25199
25285
  } = useTranslation("invoiceDetails");
@@ -25249,7 +25335,7 @@ const InvoiceDetailsView = props => {
25249
25335
  }, t("labels.amountPaid")), /*#__PURE__*/React__default['default'].createElement("p", {
25250
25336
  className: "plc-font-semibold pelcro-invoice-total-text"
25251
25337
  }, t("labels.amountDue"))), /*#__PURE__*/React__default['default'].createElement("div", {
25252
- className: "plc-flex plc-flex-col"
25338
+ className: "plc-flex plc-flex-col plc-items-end"
25253
25339
  }, /*#__PURE__*/React__default['default'].createElement("p", {
25254
25340
  className: "pelcro-invoice-total"
25255
25341
  }, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("p", {
@@ -25298,232 +25384,6 @@ const InvoiceDetailsModal = ({
25298
25384
  };
25299
25385
  InvoiceDetailsModal.viewId = "invoice-details";
25300
25386
 
25301
- const initialState = {
25302
- selectedOption: ""
25303
- };
25304
- const store = /*#__PURE__*/React.createContext(initialState);
25305
- const {
25306
- Provider
25307
- } = store;
25308
-
25309
- const SubscriptionOptionsContainer = ({
25310
- style,
25311
- className = "",
25312
- onRenewSubSuccess = () => {},
25313
- onNewSubSuccess = () => {},
25314
- children,
25315
- ...props
25316
- }) => {
25317
- const submit = ({
25318
- selectedOption
25319
- }, dispatch) => {
25320
- if (selectedOption === "renew") return onRenewSubSuccess();
25321
- if (selectedOption === "new") return onNewSubSuccess();
25322
- };
25323
-
25324
- const [state, dispatch] = useReducerWithSideEffects((state, action) => {
25325
- switch (action.type) {
25326
- case SWITCH_TO_NEW:
25327
- return lib_7({ ...state,
25328
- selectedOption: "new"
25329
- });
25330
-
25331
- case SWITCH_TO_RENEW:
25332
- return lib_7({ ...state,
25333
- selectedOption: "renew"
25334
- });
25335
-
25336
- case HANDLE_SUBMIT:
25337
- return lib_4((state, dispatch) => submit(state));
25338
-
25339
- default:
25340
- return state;
25341
- }
25342
- }, initialState);
25343
- return /*#__PURE__*/React__default['default'].createElement("div", {
25344
- style: { ...style
25345
- },
25346
- className: `pelcro-container pelcro-subscription-options-container ${className}`
25347
- }, /*#__PURE__*/React__default['default'].createElement(Provider, {
25348
- value: {
25349
- state,
25350
- dispatch
25351
- }
25352
- }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
25353
- store,
25354
- key: i
25355
- })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25356
- store
25357
- })));
25358
- };
25359
-
25360
- var _path;
25361
-
25362
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25363
-
25364
- function SvgPlusCircle(props) {
25365
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
25366
- xmlns: "http://www.w3.org/2000/svg",
25367
- className: "plc-h-6 plc-w-6",
25368
- fill: "none",
25369
- viewBox: "0 0 24 24",
25370
- stroke: "currentColor",
25371
- strokeWidth: 2
25372
- }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
25373
- strokeLinecap: "round",
25374
- strokeLinejoin: "round",
25375
- d: "M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"
25376
- })));
25377
- }
25378
-
25379
- const SubscriptionOptionsNewButton = ({
25380
- name,
25381
- onClick,
25382
- ...otherProps
25383
- }) => {
25384
- const {
25385
- dispatch,
25386
- state: {
25387
- selectedOption
25388
- }
25389
- } = React.useContext(store);
25390
- const {
25391
- t
25392
- } = useTranslation("subscriptionOptions");
25393
- const isChecked = selectedOption === "new";
25394
- return /*#__PURE__*/React__default['default'].createElement(Radio, Object.assign({
25395
- className: "plc-hidden pelcro-new-sub-option",
25396
- labelClassName: `plc-flex plc-flex-col plc-items-center plc-justify-center plc-text-lg plc-font-semibold plc-ml-0 plc-w-52 plc-h-52 plc-text-black plc-p-2 hover:plc-bg-gray-200 pelcro-new-sub-option-label plc-border-2 plc-text-center ${isChecked ? "plc-border-black" : "plc-border-gray-300"}`,
25397
- id: "pelcro-new-sub-option",
25398
- name: "option",
25399
- onChange: () => {
25400
- dispatch({
25401
- type: SWITCH_TO_NEW
25402
- });
25403
- onClick === null || onClick === void 0 ? void 0 : onClick();
25404
- },
25405
- checked: isChecked
25406
- }, otherProps), name !== null && name !== void 0 ? name : t("addNew"), /*#__PURE__*/React__default['default'].createElement(SvgPlusCircle, {
25407
- className: "plc-w-full plc-h-full plc-mr-0"
25408
- }));
25409
- };
25410
-
25411
- const SubscriptionOptionsRenewButton = ({
25412
- name,
25413
- onClick,
25414
- ...otherProps
25415
- }) => {
25416
- const {
25417
- dispatch,
25418
- state: {
25419
- selectedOption
25420
- }
25421
- } = React.useContext(store);
25422
- const {
25423
- t
25424
- } = useTranslation("subscriptionOptions");
25425
- const isChecked = selectedOption === "renew";
25426
- return /*#__PURE__*/React__default['default'].createElement(Radio, Object.assign({
25427
- className: "plc-hidden pelcro-renew-sub-option",
25428
- labelClassName: `plc-flex plc-flex-col plc-items-center plc-justify-center plc-text-lg plc-font-semibold plc-ml-0 plc-w-52 plc-h-52 plc-text-black plc-p-2 hover:plc-bg-gray-200 pelcro-renew-sub-option-label plc-border-2 plc-text-center ${isChecked ? "plc-border-black" : "plc-border-gray-300"}`,
25429
- id: "pelcro-renew-sub-option",
25430
- name: "option",
25431
- onChange: () => {
25432
- dispatch({
25433
- type: SWITCH_TO_RENEW
25434
- });
25435
- onClick === null || onClick === void 0 ? void 0 : onClick();
25436
- },
25437
- checked: isChecked
25438
- }, otherProps), name !== null && name !== void 0 ? name : t("renew"), /*#__PURE__*/React__default['default'].createElement(SvgRefresh, {
25439
- className: "plc-w-full plc-h-full plc-mr-0"
25440
- }));
25441
- };
25442
-
25443
- const SubscriptionOptionsSubmit = ({
25444
- name,
25445
- onClick,
25446
- ...otherProps
25447
- }) => {
25448
- const {
25449
- dispatch,
25450
- state: {
25451
- selectedOption
25452
- }
25453
- } = React.useContext(store);
25454
- const {
25455
- t
25456
- } = useTranslation("subscriptionOptions");
25457
- return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
25458
- onClick: () => {
25459
- dispatch({
25460
- type: HANDLE_SUBMIT
25461
- });
25462
- onClick === null || onClick === void 0 ? void 0 : onClick();
25463
- },
25464
- disabled: !selectedOption
25465
- }, otherProps), name !== null && name !== void 0 ? name : t("next"));
25466
- };
25467
-
25468
- const SubscriptionOptionsView = props => {
25469
- const {
25470
- t
25471
- } = useTranslation("subscriptionOptions");
25472
- return /*#__PURE__*/React__default['default'].createElement("div", {
25473
- id: "pelcro-subscription-options-view"
25474
- }, /*#__PURE__*/React__default['default'].createElement("div", {
25475
- className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
25476
- }, /*#__PURE__*/React__default['default'].createElement("h4", {
25477
- className: "plc-text-2xl plc-font-semibold"
25478
- }, t("title")), /*#__PURE__*/React__default['default'].createElement("p", null, t("subtitle"))), /*#__PURE__*/React__default['default'].createElement("form", {
25479
- action: "javascript:void(0);",
25480
- className: "plc-mt-2 pelcro-form"
25481
- }, /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsContainer, props, /*#__PURE__*/React__default['default'].createElement("div", {
25482
- className: "plc-flex plc-justify-between plc-items-center"
25483
- }, /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsRenewButton, null), /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsNewButton, null)), /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsSubmit, {
25484
- role: "submit",
25485
- className: "plc-mt-4 plc-w-full",
25486
- name: t("next"),
25487
- id: "pelcro-submit"
25488
- }))));
25489
- };
25490
-
25491
- const SubscriptionOptionsModal = ({
25492
- onDisplay,
25493
- onClose,
25494
- ...otherProps
25495
- }) => {
25496
- const {
25497
- switchView,
25498
- setProductsList
25499
- } = usePelcro();
25500
-
25501
- const onRenewSubSuccess = () => {
25502
- var _otherProps$onRenewSu;
25503
-
25504
- (_otherProps$onRenewSu = otherProps.onRenewSubSuccess) === null || _otherProps$onRenewSu === void 0 ? void 0 : _otherProps$onRenewSu.call(otherProps);
25505
- setProductsList(getRenewableProducts());
25506
- switchView("_plan-select-renew");
25507
- };
25508
-
25509
- const onNewSubSuccess = () => {
25510
- var _otherProps$onNewSubS;
25511
-
25512
- (_otherProps$onNewSubS = otherProps.onNewSubSuccess) === null || _otherProps$onNewSubS === void 0 ? void 0 : _otherProps$onNewSubS.call(otherProps);
25513
- switchView("plan-select");
25514
- };
25515
-
25516
- return /*#__PURE__*/React__default['default'].createElement(Modal, {
25517
- onDisplay: onDisplay,
25518
- onClose: onClose,
25519
- id: "pelcro-subscription-options-modal"
25520
- }, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsView, Object.assign({}, otherProps, {
25521
- onNewSubSuccess: onNewSubSuccess,
25522
- onRenewSubSuccess: onRenewSubSuccess
25523
- }))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
25524
- };
25525
- SubscriptionOptionsModal.viewId = "subscription-options";
25526
-
25527
25387
  exports.AddressCreateCity = AddressCreateCity;
25528
25388
  exports.AddressCreateContainer = AddressCreateContainer;
25529
25389
  exports.AddressCreateCountrySelect = AddressCreateCountrySelect;
@@ -25701,12 +25561,6 @@ exports.SubmitPaymentMethod = SubmitPaymentMethod;
25701
25561
  exports.SubscriptionCreateContainer = SubscriptionCreateContainer;
25702
25562
  exports.SubscriptionCreateModal = SubscriptionCreateModal;
25703
25563
  exports.SubscriptionCreateView = SubscriptionCreateView;
25704
- exports.SubscriptionOptionsContainer = SubscriptionOptionsContainer;
25705
- exports.SubscriptionOptionsModal = SubscriptionOptionsModal;
25706
- exports.SubscriptionOptionsNewButton = SubscriptionOptionsNewButton;
25707
- exports.SubscriptionOptionsRenewButton = SubscriptionOptionsRenewButton;
25708
- exports.SubscriptionOptionsSubmit = SubscriptionOptionsSubmit;
25709
- exports.SubscriptionOptionsView = SubscriptionOptionsView;
25710
25564
  exports.SubscriptionRenewContainer = SubscriptionRenewContainer;
25711
25565
  exports.SubscriptionRenewModal = SubscriptionRenewModal;
25712
25566
  exports.SubscriptionRenewView = SubscriptionRenewView;