@pelcro/react-pelcro-js 3.2.0-beta.3 → 3.2.0-beta.6
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 +1008 -577
- package/dist/index.esm.js +1003 -578
- package/dist/pelcro.css +22 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3431,9 +3431,9 @@ var paymentMethod_fr = {
|
|
|
3431
3431
|
select: select
|
|
3432
3432
|
};
|
|
3433
3433
|
|
|
3434
|
-
var title$
|
|
3434
|
+
var title$h = "Enter your email to subscribe to our newsletter";
|
|
3435
3435
|
var updateTitle$1 = "Update newsletter selections";
|
|
3436
|
-
var subtitle$
|
|
3436
|
+
var subtitle$9 = "We may use your email for other marketing communication";
|
|
3437
3437
|
var labels$p = {
|
|
3438
3438
|
submit: "Submit",
|
|
3439
3439
|
firstName: "First name",
|
|
@@ -3450,16 +3450,16 @@ var messages$r = {
|
|
|
3450
3450
|
here: "here"
|
|
3451
3451
|
};
|
|
3452
3452
|
var newsletter_en = {
|
|
3453
|
-
title: title$
|
|
3453
|
+
title: title$h,
|
|
3454
3454
|
updateTitle: updateTitle$1,
|
|
3455
|
-
subtitle: subtitle$
|
|
3455
|
+
subtitle: subtitle$9,
|
|
3456
3456
|
labels: labels$p,
|
|
3457
3457
|
messages: messages$r
|
|
3458
3458
|
};
|
|
3459
3459
|
|
|
3460
|
-
var title$
|
|
3460
|
+
var title$g = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
|
|
3461
3461
|
var updateTitle = "Mettre à jour son choix d'infolettres";
|
|
3462
|
-
var subtitle$
|
|
3462
|
+
var subtitle$8 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
|
|
3463
3463
|
var labels$o = {
|
|
3464
3464
|
submit: "Lire l’article !",
|
|
3465
3465
|
firstName: "Prénom",
|
|
@@ -3476,9 +3476,9 @@ var messages$q = {
|
|
|
3476
3476
|
here: "ici"
|
|
3477
3477
|
};
|
|
3478
3478
|
var newsletter_fr = {
|
|
3479
|
-
title: title$
|
|
3479
|
+
title: title$g,
|
|
3480
3480
|
updateTitle: updateTitle,
|
|
3481
|
-
subtitle: subtitle$
|
|
3481
|
+
subtitle: subtitle$8,
|
|
3482
3482
|
labels: labels$o,
|
|
3483
3483
|
messages: messages$q
|
|
3484
3484
|
};
|
|
@@ -3735,8 +3735,8 @@ var login_fr = {
|
|
|
3735
3735
|
errors: errors$4
|
|
3736
3736
|
};
|
|
3737
3737
|
|
|
3738
|
-
var title$
|
|
3739
|
-
var subtitle$
|
|
3738
|
+
var title$f = "Create an account";
|
|
3739
|
+
var subtitle$7 = "Enter your email and password below";
|
|
3740
3740
|
var labels$h = {
|
|
3741
3741
|
signUpFacebook: "Sign up with Facebook",
|
|
3742
3742
|
signUpGoogle: "Sign up with Google",
|
|
@@ -3821,8 +3821,8 @@ var redeem$1 = {
|
|
|
3821
3821
|
}
|
|
3822
3822
|
};
|
|
3823
3823
|
var register_en = {
|
|
3824
|
-
title: title$
|
|
3825
|
-
subtitle: subtitle$
|
|
3824
|
+
title: title$f,
|
|
3825
|
+
subtitle: subtitle$7,
|
|
3826
3826
|
labels: labels$h,
|
|
3827
3827
|
messages: messages$h,
|
|
3828
3828
|
errors: errors$3,
|
|
@@ -3830,8 +3830,8 @@ var register_en = {
|
|
|
3830
3830
|
redeem: redeem$1
|
|
3831
3831
|
};
|
|
3832
3832
|
|
|
3833
|
-
var title$
|
|
3834
|
-
var subtitle$
|
|
3833
|
+
var title$e = "Créer un compte";
|
|
3834
|
+
var subtitle$6 = "Entrez votre courriel et votre mot de passe ci-dessous";
|
|
3835
3835
|
var labels$g = {
|
|
3836
3836
|
signUpFacebook: "Inscrivez-vous avec Facebook",
|
|
3837
3837
|
signUpGoogle: "Inscrivez-vous avec Google",
|
|
@@ -3917,8 +3917,8 @@ var redeem = {
|
|
|
3917
3917
|
}
|
|
3918
3918
|
};
|
|
3919
3919
|
var register_fr = {
|
|
3920
|
-
title: title$
|
|
3921
|
-
subtitle: subtitle$
|
|
3920
|
+
title: title$e,
|
|
3921
|
+
subtitle: subtitle$6,
|
|
3922
3922
|
labels: labels$g,
|
|
3923
3923
|
messages: messages$g,
|
|
3924
3924
|
errors: errors$2,
|
|
@@ -3978,7 +3978,7 @@ var userEdit_fr = {
|
|
|
3978
3978
|
messages: messages$e
|
|
3979
3979
|
};
|
|
3980
3980
|
|
|
3981
|
-
var title$
|
|
3981
|
+
var title$d = "Enter your shipping address";
|
|
3982
3982
|
var selectAddressTitle$1 = "Please select an address";
|
|
3983
3983
|
var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
|
|
3984
3984
|
var labels$d = {
|
|
@@ -4001,7 +4001,7 @@ var messages$d = {
|
|
|
4001
4001
|
subRedeemed: "Your subscription has been redeemed."
|
|
4002
4002
|
};
|
|
4003
4003
|
var address_en = {
|
|
4004
|
-
title: title$
|
|
4004
|
+
title: title$d,
|
|
4005
4005
|
selectAddressTitle: selectAddressTitle$1,
|
|
4006
4006
|
selectAddressSubtitle: selectAddressSubtitle$1,
|
|
4007
4007
|
labels: labels$d,
|
|
@@ -4009,7 +4009,7 @@ var address_en = {
|
|
|
4009
4009
|
messages: messages$d
|
|
4010
4010
|
};
|
|
4011
4011
|
|
|
4012
|
-
var title$
|
|
4012
|
+
var title$c = "Entrez votre adresse de livraison";
|
|
4013
4013
|
var selectAddressTitle = "Veuillez sélectionner une adresse";
|
|
4014
4014
|
var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
|
|
4015
4015
|
var labels$c = {
|
|
@@ -4032,7 +4032,7 @@ var messages$c = {
|
|
|
4032
4032
|
subRedeemed: "Votre abonnement a bien été activé."
|
|
4033
4033
|
};
|
|
4034
4034
|
var address_fr = {
|
|
4035
|
-
title: title$
|
|
4035
|
+
title: title$c,
|
|
4036
4036
|
selectAddressTitle: selectAddressTitle,
|
|
4037
4037
|
selectAddressSubtitle: selectAddressSubtitle,
|
|
4038
4038
|
labels: labels$c,
|
|
@@ -4040,8 +4040,8 @@ var address_fr = {
|
|
|
4040
4040
|
messages: messages$c
|
|
4041
4041
|
};
|
|
4042
4042
|
|
|
4043
|
-
var title$
|
|
4044
|
-
var subtitle$
|
|
4043
|
+
var title$b = "Reset your password";
|
|
4044
|
+
var subtitle$5 = "Enter a new password below";
|
|
4045
4045
|
var email$3 = "Email";
|
|
4046
4046
|
var password$3 = "Password";
|
|
4047
4047
|
var confirmPassword$1 = "Confirm password";
|
|
@@ -4049,8 +4049,8 @@ var submit$5 = "Submit";
|
|
|
4049
4049
|
var required$5 = "Required";
|
|
4050
4050
|
var passwordUpdated$1 = "Password has been updated, please login with the new password";
|
|
4051
4051
|
var passwordReset_en = {
|
|
4052
|
-
title: title$
|
|
4053
|
-
subtitle: subtitle$
|
|
4052
|
+
title: title$b,
|
|
4053
|
+
subtitle: subtitle$5,
|
|
4054
4054
|
email: email$3,
|
|
4055
4055
|
password: password$3,
|
|
4056
4056
|
confirmPassword: confirmPassword$1,
|
|
@@ -4059,8 +4059,8 @@ var passwordReset_en = {
|
|
|
4059
4059
|
passwordUpdated: passwordUpdated$1
|
|
4060
4060
|
};
|
|
4061
4061
|
|
|
4062
|
-
var title$
|
|
4063
|
-
var subtitle$
|
|
4062
|
+
var title$a = "Réinitialiser votre mot de passe";
|
|
4063
|
+
var subtitle$4 = "Entrez un nouveau mot de passe ci-dessous";
|
|
4064
4064
|
var email$2 = "Adresse courriel";
|
|
4065
4065
|
var password$2 = "Mot de passe";
|
|
4066
4066
|
var confirmPassword = "Confirmer le mot de passe";
|
|
@@ -4068,8 +4068,8 @@ var submit$4 = "Soumettre";
|
|
|
4068
4068
|
var required$4 = "Champs obligatoires";
|
|
4069
4069
|
var passwordUpdated = "Votre mot de passe a été mis à jour, veuillez vous connecter avec celui-ci";
|
|
4070
4070
|
var passwordReset_fr = {
|
|
4071
|
-
title: title$
|
|
4072
|
-
subtitle: subtitle$
|
|
4071
|
+
title: title$a,
|
|
4072
|
+
subtitle: subtitle$4,
|
|
4073
4073
|
email: email$2,
|
|
4074
4074
|
password: password$2,
|
|
4075
4075
|
confirmPassword: confirmPassword,
|
|
@@ -4078,7 +4078,7 @@ var passwordReset_fr = {
|
|
|
4078
4078
|
passwordUpdated: passwordUpdated
|
|
4079
4079
|
};
|
|
4080
4080
|
|
|
4081
|
-
var title$
|
|
4081
|
+
var title$9 = "Forgot your password?";
|
|
4082
4082
|
var email$1 = "Email";
|
|
4083
4083
|
var password$1 = "Password";
|
|
4084
4084
|
var submit$3 = "Submit";
|
|
@@ -4089,7 +4089,7 @@ var messages$b = {
|
|
|
4089
4089
|
loginHere: "login here."
|
|
4090
4090
|
};
|
|
4091
4091
|
var passwordForgot_en = {
|
|
4092
|
-
title: title$
|
|
4092
|
+
title: title$9,
|
|
4093
4093
|
email: email$1,
|
|
4094
4094
|
password: password$1,
|
|
4095
4095
|
submit: submit$3,
|
|
@@ -4098,7 +4098,7 @@ var passwordForgot_en = {
|
|
|
4098
4098
|
messages: messages$b
|
|
4099
4099
|
};
|
|
4100
4100
|
|
|
4101
|
-
var title$
|
|
4101
|
+
var title$8 = "Mot de passe oublié ?";
|
|
4102
4102
|
var email = "Courriel";
|
|
4103
4103
|
var password = "Mot de passe";
|
|
4104
4104
|
var submit$2 = "Soumettre";
|
|
@@ -4109,7 +4109,7 @@ var messages$a = {
|
|
|
4109
4109
|
loginHere: "Connectez-vous ici"
|
|
4110
4110
|
};
|
|
4111
4111
|
var passwordForgot_fr = {
|
|
4112
|
-
title: title$
|
|
4112
|
+
title: title$8,
|
|
4113
4113
|
email: email,
|
|
4114
4114
|
password: password,
|
|
4115
4115
|
submit: submit$2,
|
|
@@ -4118,7 +4118,7 @@ var passwordForgot_fr = {
|
|
|
4118
4118
|
messages: messages$a
|
|
4119
4119
|
};
|
|
4120
4120
|
|
|
4121
|
-
var title$
|
|
4121
|
+
var title$7 = "Change your password";
|
|
4122
4122
|
var currentPassword$1 = "Current password";
|
|
4123
4123
|
var newPassword$1 = "New password";
|
|
4124
4124
|
var confirmNewPassword$1 = "Confirm new password";
|
|
@@ -4128,7 +4128,7 @@ var passwordChanged$1 = "Password has been changed, please login with the new pa
|
|
|
4128
4128
|
var passwordsNotMatching$1 = "Passwords don't match";
|
|
4129
4129
|
var weakPassword$1 = "Your password must contain at least 6 characters";
|
|
4130
4130
|
var passwordChange_en = {
|
|
4131
|
-
title: title$
|
|
4131
|
+
title: title$7,
|
|
4132
4132
|
currentPassword: currentPassword$1,
|
|
4133
4133
|
newPassword: newPassword$1,
|
|
4134
4134
|
confirmNewPassword: confirmNewPassword$1,
|
|
@@ -4139,7 +4139,7 @@ var passwordChange_en = {
|
|
|
4139
4139
|
weakPassword: weakPassword$1
|
|
4140
4140
|
};
|
|
4141
4141
|
|
|
4142
|
-
var title$
|
|
4142
|
+
var title$6 = "Changez votre mot de passe";
|
|
4143
4143
|
var currentPassword = "Mot de passe actuel";
|
|
4144
4144
|
var newPassword = "Nouveau mot de passe";
|
|
4145
4145
|
var confirmNewPassword = "Confirmer le nouveau mot de passe";
|
|
@@ -4149,7 +4149,7 @@ var passwordChanged = "Le mot de passe a été modifié, veuillez vous connecter
|
|
|
4149
4149
|
var passwordsNotMatching = "Les mots de passe ne correspondent pas";
|
|
4150
4150
|
var weakPassword = "Votre mot de passe doit contenir au moins 6";
|
|
4151
4151
|
var passwordChange_fr = {
|
|
4152
|
-
title: title$
|
|
4152
|
+
title: title$6,
|
|
4153
4153
|
currentPassword: currentPassword,
|
|
4154
4154
|
newPassword: newPassword,
|
|
4155
4155
|
confirmNewPassword: confirmNewPassword,
|
|
@@ -4160,8 +4160,8 @@ var passwordChange_fr = {
|
|
|
4160
4160
|
weakPassword: weakPassword
|
|
4161
4161
|
};
|
|
4162
4162
|
|
|
4163
|
-
var title$
|
|
4164
|
-
var subtitle$
|
|
4163
|
+
var title$5 = "Votre panier";
|
|
4164
|
+
var subtitle$3 = "Terminez votre achat ci-dessous";
|
|
4165
4165
|
var name$1 = "Produit";
|
|
4166
4166
|
var quantity$1 = "Quantité";
|
|
4167
4167
|
var price$1 = "Prix";
|
|
@@ -4172,8 +4172,8 @@ var confirm$3 = "Passer à la caisse";
|
|
|
4172
4172
|
var empty$1 = "Votre panier est vide.";
|
|
4173
4173
|
var removeAll$1 = "Vider";
|
|
4174
4174
|
var cart_fr = {
|
|
4175
|
-
title: title$
|
|
4176
|
-
subtitle: subtitle$
|
|
4175
|
+
title: title$5,
|
|
4176
|
+
subtitle: subtitle$3,
|
|
4177
4177
|
name: name$1,
|
|
4178
4178
|
quantity: quantity$1,
|
|
4179
4179
|
price: price$1,
|
|
@@ -4185,8 +4185,8 @@ var cart_fr = {
|
|
|
4185
4185
|
removeAll: removeAll$1
|
|
4186
4186
|
};
|
|
4187
4187
|
|
|
4188
|
-
var title$
|
|
4189
|
-
var subtitle = "Comple your purchase below";
|
|
4188
|
+
var title$4 = "Your shopping cart";
|
|
4189
|
+
var subtitle$2 = "Comple your purchase below";
|
|
4190
4190
|
var name = "Name";
|
|
4191
4191
|
var quantity = "Quantity";
|
|
4192
4192
|
var price = "Price";
|
|
@@ -4197,8 +4197,8 @@ var confirm$2 = "Checkout";
|
|
|
4197
4197
|
var empty = "Your cart is empty.";
|
|
4198
4198
|
var removeAll = "Remove all";
|
|
4199
4199
|
var cart_en = {
|
|
4200
|
-
title: title$
|
|
4201
|
-
subtitle: subtitle,
|
|
4200
|
+
title: title$4,
|
|
4201
|
+
subtitle: subtitle$2,
|
|
4202
4202
|
name: name,
|
|
4203
4203
|
quantity: quantity,
|
|
4204
4204
|
price: price,
|
|
@@ -4636,7 +4636,7 @@ var verifyEmail_fr = {
|
|
|
4636
4636
|
messages: messages
|
|
4637
4637
|
};
|
|
4638
4638
|
|
|
4639
|
-
var title$
|
|
4639
|
+
var title$3 = "Invoice details";
|
|
4640
4640
|
var labels$1 = {
|
|
4641
4641
|
summary: "Summary",
|
|
4642
4642
|
total: "Total",
|
|
@@ -4649,12 +4649,12 @@ var buttons$1 = {
|
|
|
4649
4649
|
pay: "Pay now"
|
|
4650
4650
|
};
|
|
4651
4651
|
var invoiceDetails_en = {
|
|
4652
|
-
title: title$
|
|
4652
|
+
title: title$3,
|
|
4653
4653
|
labels: labels$1,
|
|
4654
4654
|
buttons: buttons$1
|
|
4655
4655
|
};
|
|
4656
4656
|
|
|
4657
|
-
var title = "Invoice details";
|
|
4657
|
+
var title$2 = "Invoice details";
|
|
4658
4658
|
var labels = {
|
|
4659
4659
|
summary: "Summary",
|
|
4660
4660
|
total: "Total",
|
|
@@ -4667,11 +4667,37 @@ var buttons = {
|
|
|
4667
4667
|
pay: "Pay now"
|
|
4668
4668
|
};
|
|
4669
4669
|
var invoiceDetails_fr = {
|
|
4670
|
-
title: title,
|
|
4670
|
+
title: title$2,
|
|
4671
4671
|
labels: labels,
|
|
4672
4672
|
buttons: buttons
|
|
4673
4673
|
};
|
|
4674
4674
|
|
|
4675
|
+
var title$1 = "Renewal options";
|
|
4676
|
+
var subtitle$1 = "Select one of the options below to continue";
|
|
4677
|
+
var next$1 = "Next";
|
|
4678
|
+
var addNew$1 = "Add Another Subscription";
|
|
4679
|
+
var renew$1 = "Renew Existing Subscription";
|
|
4680
|
+
var subscriptionOptions_en = {
|
|
4681
|
+
title: title$1,
|
|
4682
|
+
subtitle: subtitle$1,
|
|
4683
|
+
next: next$1,
|
|
4684
|
+
addNew: addNew$1,
|
|
4685
|
+
renew: renew$1
|
|
4686
|
+
};
|
|
4687
|
+
|
|
4688
|
+
var title = "Renewal options";
|
|
4689
|
+
var subtitle = "Select one of the options below to continue";
|
|
4690
|
+
var next = "Next";
|
|
4691
|
+
var addNew = "Add Another Subscription";
|
|
4692
|
+
var renew = "Renew Existing Subscription";
|
|
4693
|
+
var subscriptionOptions_fr = {
|
|
4694
|
+
title: title,
|
|
4695
|
+
subtitle: subtitle,
|
|
4696
|
+
next: next,
|
|
4697
|
+
addNew: addNew,
|
|
4698
|
+
renew: renew
|
|
4699
|
+
};
|
|
4700
|
+
|
|
4675
4701
|
function create$1(createState) {
|
|
4676
4702
|
let state;
|
|
4677
4703
|
const listeners = new Set();
|
|
@@ -6021,7 +6047,7 @@ class PelcroActions {
|
|
|
6021
6047
|
view,
|
|
6022
6048
|
cartItems,
|
|
6023
6049
|
...otherStateFields
|
|
6024
|
-
} = initialState$
|
|
6050
|
+
} = initialState$j;
|
|
6025
6051
|
this.set(otherStateFields);
|
|
6026
6052
|
});
|
|
6027
6053
|
|
|
@@ -6045,6 +6071,16 @@ class PelcroActions {
|
|
|
6045
6071
|
});
|
|
6046
6072
|
}
|
|
6047
6073
|
|
|
6074
|
+
if (view === "subscription-options") {
|
|
6075
|
+
const noRenewableProducts = getRenewableProducts().length === 0;
|
|
6076
|
+
|
|
6077
|
+
if (noRenewableProducts) {
|
|
6078
|
+
return this.set({
|
|
6079
|
+
view: "plan-select"
|
|
6080
|
+
});
|
|
6081
|
+
}
|
|
6082
|
+
}
|
|
6083
|
+
|
|
6048
6084
|
this.set({
|
|
6049
6085
|
view
|
|
6050
6086
|
});
|
|
@@ -6119,6 +6155,26 @@ class PelcroActions {
|
|
|
6119
6155
|
}
|
|
6120
6156
|
});
|
|
6121
6157
|
|
|
6158
|
+
_defineProperty$3(this, "setProductsList", products => {
|
|
6159
|
+
if (!Array.isArray(products)) {
|
|
6160
|
+
return console.error(`setProductsList expects an array of products as an argument, got an argument of type ${typeof products} instead`);
|
|
6161
|
+
}
|
|
6162
|
+
|
|
6163
|
+
const allowedProducts = window.Pelcro.product.list();
|
|
6164
|
+
const validProducts = products.filter(product => {
|
|
6165
|
+
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));
|
|
6166
|
+
|
|
6167
|
+
if (!isValidProduct) {
|
|
6168
|
+
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);
|
|
6169
|
+
}
|
|
6170
|
+
|
|
6171
|
+
return isValidProduct;
|
|
6172
|
+
});
|
|
6173
|
+
this.set({
|
|
6174
|
+
productsList: validProducts
|
|
6175
|
+
});
|
|
6176
|
+
});
|
|
6177
|
+
|
|
6122
6178
|
_defineProperty$3(this, "setProduct", id => {
|
|
6123
6179
|
const product = window.Pelcro.product.getById(id);
|
|
6124
6180
|
if (!product) return console.error("invalid product id");
|
|
@@ -6340,10 +6396,12 @@ class PelcroCallbacks {
|
|
|
6340
6396
|
|
|
6341
6397
|
}
|
|
6342
6398
|
|
|
6343
|
-
|
|
6399
|
+
var _window$Pelcro$produc, _window$Pelcro;
|
|
6400
|
+
const initialState$j = {
|
|
6344
6401
|
// View
|
|
6345
6402
|
view: null,
|
|
6346
6403
|
// Plans
|
|
6404
|
+
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 : [],
|
|
6347
6405
|
product: null,
|
|
6348
6406
|
plan: null,
|
|
6349
6407
|
isGift: false,
|
|
@@ -6370,7 +6428,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
|
|
|
6370
6428
|
return {
|
|
6371
6429
|
// Store setter
|
|
6372
6430
|
set,
|
|
6373
|
-
...initialState$
|
|
6431
|
+
...initialState$j,
|
|
6374
6432
|
// State actions
|
|
6375
6433
|
...actions,
|
|
6376
6434
|
// Callbacks
|
|
@@ -6725,6 +6783,30 @@ function userMustVerifyEmail() {
|
|
|
6725
6783
|
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;
|
|
6726
6784
|
return window.Pelcro.user.isAuthenticated() && isEmailVerificationEnabled && !isUserEmailVerified;
|
|
6727
6785
|
}
|
|
6786
|
+
function getRenewableProducts() {
|
|
6787
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2;
|
|
6788
|
+
|
|
6789
|
+
const renewableSubs = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription.list()) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : _window$Pelcro$subscr2.filter(sub => sub.status === "active" && sub.cancel_at_period_end === 1)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
|
|
6790
|
+
const renewableProductsIds = [...new Set(renewableSubs.map(sub => sub.plan.product.id))];
|
|
6791
|
+
const renewablePlansIds = [...new Set(renewableSubs.map(sub => sub.plan.id))];
|
|
6792
|
+
const {
|
|
6793
|
+
productsList
|
|
6794
|
+
} = usePelcro.getStore();
|
|
6795
|
+
return productsList.map(product => {
|
|
6796
|
+
if (renewableProductsIds.includes(product.id)) {
|
|
6797
|
+
const renewablePlans = getRenewablePlansOnly(product);
|
|
6798
|
+
return { ...product,
|
|
6799
|
+
plans: renewablePlans
|
|
6800
|
+
};
|
|
6801
|
+
}
|
|
6802
|
+
}).filter(product => product);
|
|
6803
|
+
|
|
6804
|
+
function getRenewablePlansOnly(product) {
|
|
6805
|
+
var _product$plans$filter, _product$plans;
|
|
6806
|
+
|
|
6807
|
+
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 : [];
|
|
6808
|
+
}
|
|
6809
|
+
}
|
|
6728
6810
|
|
|
6729
6811
|
const resources = {
|
|
6730
6812
|
en: {
|
|
@@ -6749,7 +6831,8 @@ const resources = {
|
|
|
6749
6831
|
dashboard: dashboard_en,
|
|
6750
6832
|
select: select_en,
|
|
6751
6833
|
notification: notification_en,
|
|
6752
|
-
invoiceDetails: invoiceDetails_en
|
|
6834
|
+
invoiceDetails: invoiceDetails_en,
|
|
6835
|
+
subscriptionOptions: subscriptionOptions_en
|
|
6753
6836
|
},
|
|
6754
6837
|
fr: {
|
|
6755
6838
|
common: common_fr,
|
|
@@ -6773,7 +6856,8 @@ const resources = {
|
|
|
6773
6856
|
dashboard: dashboard_fr,
|
|
6774
6857
|
select: select_fr,
|
|
6775
6858
|
notification: notification_fr,
|
|
6776
|
-
invoiceDetails: invoiceDetails_fr
|
|
6859
|
+
invoiceDetails: invoiceDetails_fr,
|
|
6860
|
+
subscriptionOptions: subscriptionOptions_fr
|
|
6777
6861
|
}
|
|
6778
6862
|
}; // set UI language to the page language or default to the language in site settings
|
|
6779
6863
|
|
|
@@ -7064,8 +7148,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
|
|
|
7064
7148
|
|
|
7065
7149
|
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}}
|
|
7066
7150
|
|
|
7067
|
-
function _extends$
|
|
7068
|
-
_extends$
|
|
7151
|
+
function _extends$A() {
|
|
7152
|
+
_extends$A = Object.assign || function (target) {
|
|
7069
7153
|
for (var i = 1; i < arguments.length; i++) {
|
|
7070
7154
|
var source = arguments[i];
|
|
7071
7155
|
|
|
@@ -7079,7 +7163,7 @@ function _extends$z() {
|
|
|
7079
7163
|
return target;
|
|
7080
7164
|
};
|
|
7081
7165
|
|
|
7082
|
-
return _extends$
|
|
7166
|
+
return _extends$A.apply(this, arguments);
|
|
7083
7167
|
}
|
|
7084
7168
|
|
|
7085
7169
|
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
@@ -7169,7 +7253,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
7169
7253
|
var reducer = function reducer(state, action) {
|
|
7170
7254
|
switch (action.type) {
|
|
7171
7255
|
case ActionType.ADD_TOAST:
|
|
7172
|
-
return _extends$
|
|
7256
|
+
return _extends$A({}, state, {
|
|
7173
7257
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
7174
7258
|
});
|
|
7175
7259
|
|
|
@@ -7179,9 +7263,9 @@ var reducer = function reducer(state, action) {
|
|
|
7179
7263
|
clearFromRemoveQueue(action.toast.id);
|
|
7180
7264
|
}
|
|
7181
7265
|
|
|
7182
|
-
return _extends$
|
|
7266
|
+
return _extends$A({}, state, {
|
|
7183
7267
|
toasts: state.toasts.map(function (t) {
|
|
7184
|
-
return t.id === action.toast.id ? _extends$
|
|
7268
|
+
return t.id === action.toast.id ? _extends$A({}, t, action.toast) : t;
|
|
7185
7269
|
})
|
|
7186
7270
|
});
|
|
7187
7271
|
|
|
@@ -7208,9 +7292,9 @@ var reducer = function reducer(state, action) {
|
|
|
7208
7292
|
});
|
|
7209
7293
|
}
|
|
7210
7294
|
|
|
7211
|
-
return _extends$
|
|
7295
|
+
return _extends$A({}, state, {
|
|
7212
7296
|
toasts: state.toasts.map(function (t) {
|
|
7213
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
7297
|
+
return t.id === toastId || toastId === undefined ? _extends$A({}, t, {
|
|
7214
7298
|
visible: false
|
|
7215
7299
|
}) : t;
|
|
7216
7300
|
})
|
|
@@ -7218,28 +7302,28 @@ var reducer = function reducer(state, action) {
|
|
|
7218
7302
|
|
|
7219
7303
|
case ActionType.REMOVE_TOAST:
|
|
7220
7304
|
if (action.toastId === undefined) {
|
|
7221
|
-
return _extends$
|
|
7305
|
+
return _extends$A({}, state, {
|
|
7222
7306
|
toasts: []
|
|
7223
7307
|
});
|
|
7224
7308
|
}
|
|
7225
7309
|
|
|
7226
|
-
return _extends$
|
|
7310
|
+
return _extends$A({}, state, {
|
|
7227
7311
|
toasts: state.toasts.filter(function (t) {
|
|
7228
7312
|
return t.id !== action.toastId;
|
|
7229
7313
|
})
|
|
7230
7314
|
});
|
|
7231
7315
|
|
|
7232
7316
|
case ActionType.START_PAUSE:
|
|
7233
|
-
return _extends$
|
|
7317
|
+
return _extends$A({}, state, {
|
|
7234
7318
|
pausedAt: action.time
|
|
7235
7319
|
});
|
|
7236
7320
|
|
|
7237
7321
|
case ActionType.END_PAUSE:
|
|
7238
7322
|
var diff = action.time - (state.pausedAt || 0);
|
|
7239
|
-
return _extends$
|
|
7323
|
+
return _extends$A({}, state, {
|
|
7240
7324
|
pausedAt: undefined,
|
|
7241
7325
|
toasts: state.toasts.map(function (t) {
|
|
7242
|
-
return _extends$
|
|
7326
|
+
return _extends$A({}, t, {
|
|
7243
7327
|
pauseDuration: t.pauseDuration + diff
|
|
7244
7328
|
});
|
|
7245
7329
|
})
|
|
@@ -7286,12 +7370,12 @@ var useStore = function useStore(toastOptions) {
|
|
|
7286
7370
|
var mergedToasts = state.toasts.map(function (t) {
|
|
7287
7371
|
var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
|
|
7288
7372
|
|
|
7289
|
-
return _extends$
|
|
7373
|
+
return _extends$A({}, toastOptions, toastOptions[t.type], t, {
|
|
7290
7374
|
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],
|
|
7291
|
-
style: _extends$
|
|
7375
|
+
style: _extends$A({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
|
|
7292
7376
|
});
|
|
7293
7377
|
});
|
|
7294
|
-
return _extends$
|
|
7378
|
+
return _extends$A({}, state, {
|
|
7295
7379
|
toasts: mergedToasts
|
|
7296
7380
|
});
|
|
7297
7381
|
};
|
|
@@ -7301,7 +7385,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
7301
7385
|
type = 'blank';
|
|
7302
7386
|
}
|
|
7303
7387
|
|
|
7304
|
-
return _extends$
|
|
7388
|
+
return _extends$A({
|
|
7305
7389
|
createdAt: Date.now(),
|
|
7306
7390
|
visible: true,
|
|
7307
7391
|
type: type,
|
|
@@ -7351,14 +7435,14 @@ toast.remove = function (toastId) {
|
|
|
7351
7435
|
};
|
|
7352
7436
|
|
|
7353
7437
|
toast.promise = function (promise, msgs, opts) {
|
|
7354
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
7438
|
+
var id = toast.loading(msgs.loading, _extends$A({}, opts, opts == null ? void 0 : opts.loading));
|
|
7355
7439
|
promise.then(function (p) {
|
|
7356
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
7440
|
+
toast.success(resolveValue(msgs.success, p), _extends$A({
|
|
7357
7441
|
id: id
|
|
7358
7442
|
}, opts, opts == null ? void 0 : opts.success));
|
|
7359
7443
|
return p;
|
|
7360
7444
|
})["catch"](function (e) {
|
|
7361
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
7445
|
+
toast.error(resolveValue(msgs.error, e), _extends$A({
|
|
7362
7446
|
id: id
|
|
7363
7447
|
}, opts, opts == null ? void 0 : opts.error));
|
|
7364
7448
|
});
|
|
@@ -7697,7 +7781,7 @@ var ToastBar = /*#__PURE__*/memo(function (_ref2) {
|
|
|
7697
7781
|
var message = createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
|
|
7698
7782
|
return createElement(ToastBarBase, {
|
|
7699
7783
|
className: toast.className,
|
|
7700
|
-
style: _extends$
|
|
7784
|
+
style: _extends$A({}, animationStyle, style, toast.style)
|
|
7701
7785
|
}, typeof children === 'function' ? children({
|
|
7702
7786
|
icon: icon,
|
|
7703
7787
|
message: message
|
|
@@ -7727,7 +7811,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
|
|
|
7727
7811
|
} : position.includes('right') ? {
|
|
7728
7812
|
justifyContent: 'flex-end'
|
|
7729
7813
|
} : {};
|
|
7730
|
-
return _extends$
|
|
7814
|
+
return _extends$A({
|
|
7731
7815
|
left: 0,
|
|
7732
7816
|
right: 0,
|
|
7733
7817
|
display: 'flex',
|
|
@@ -7754,7 +7838,7 @@ var Toaster = function Toaster(_ref) {
|
|
|
7754
7838
|
handlers = _useToaster.handlers;
|
|
7755
7839
|
|
|
7756
7840
|
return createElement("div", {
|
|
7757
|
-
style: _extends$
|
|
7841
|
+
style: _extends$A({
|
|
7758
7842
|
position: 'fixed',
|
|
7759
7843
|
zIndex: 9999,
|
|
7760
7844
|
top: DEFAULT_OFFSET,
|
|
@@ -7789,82 +7873,82 @@ var Toaster = function Toaster(_ref) {
|
|
|
7789
7873
|
}));
|
|
7790
7874
|
};
|
|
7791
7875
|
|
|
7792
|
-
var _path$
|
|
7876
|
+
var _path$x;
|
|
7793
7877
|
|
|
7794
|
-
function _extends$
|
|
7878
|
+
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); }
|
|
7795
7879
|
|
|
7796
7880
|
function SvgCheckSolid(props) {
|
|
7797
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7881
|
+
return /*#__PURE__*/React.createElement("svg", _extends$z({
|
|
7798
7882
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7799
7883
|
className: "h-5 w-5",
|
|
7800
7884
|
viewBox: "0 0 20 20",
|
|
7801
7885
|
fill: "currentColor"
|
|
7802
|
-
}, props), _path$
|
|
7886
|
+
}, props), _path$x || (_path$x = /*#__PURE__*/React.createElement("path", {
|
|
7803
7887
|
fillRule: "evenodd",
|
|
7804
7888
|
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",
|
|
7805
7889
|
clipRule: "evenodd"
|
|
7806
7890
|
})));
|
|
7807
7891
|
}
|
|
7808
7892
|
|
|
7809
|
-
var _path$
|
|
7893
|
+
var _path$w;
|
|
7810
7894
|
|
|
7811
|
-
function _extends$
|
|
7895
|
+
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); }
|
|
7812
7896
|
|
|
7813
7897
|
function SvgXIcon(props) {
|
|
7814
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7898
|
+
return /*#__PURE__*/React.createElement("svg", _extends$y({
|
|
7815
7899
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7816
7900
|
viewBox: "0 0 20 20",
|
|
7817
7901
|
fill: "currentColor"
|
|
7818
|
-
}, props), _path$
|
|
7902
|
+
}, props), _path$w || (_path$w = /*#__PURE__*/React.createElement("path", {
|
|
7819
7903
|
fill: "evenodd",
|
|
7820
7904
|
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",
|
|
7821
7905
|
clipRule: "evenodd"
|
|
7822
7906
|
})));
|
|
7823
7907
|
}
|
|
7824
7908
|
|
|
7825
|
-
var _path$
|
|
7909
|
+
var _path$v;
|
|
7826
7910
|
|
|
7827
|
-
function _extends$
|
|
7911
|
+
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); }
|
|
7828
7912
|
|
|
7829
7913
|
function SvgXIconSolid(props) {
|
|
7830
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7914
|
+
return /*#__PURE__*/React.createElement("svg", _extends$x({
|
|
7831
7915
|
className: "plc-w-4 plc-h-4",
|
|
7832
7916
|
fill: "currentColor",
|
|
7833
7917
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7834
7918
|
viewBox: "0 0 100 100"
|
|
7835
|
-
}, props), _path$
|
|
7919
|
+
}, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
|
|
7836
7920
|
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"
|
|
7837
7921
|
})));
|
|
7838
7922
|
}
|
|
7839
7923
|
|
|
7840
|
-
var _path$
|
|
7924
|
+
var _path$u;
|
|
7841
7925
|
|
|
7842
|
-
function _extends$
|
|
7926
|
+
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); }
|
|
7843
7927
|
|
|
7844
7928
|
function SvgExclamation(props) {
|
|
7845
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7929
|
+
return /*#__PURE__*/React.createElement("svg", _extends$w({
|
|
7846
7930
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
7847
7931
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7848
7932
|
viewBox: "0 0 20 20",
|
|
7849
7933
|
fill: "currentColor"
|
|
7850
|
-
}, props), _path$
|
|
7934
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
|
|
7851
7935
|
fillRule: "evenodd",
|
|
7852
7936
|
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",
|
|
7853
7937
|
clipRule: "evenodd"
|
|
7854
7938
|
})));
|
|
7855
7939
|
}
|
|
7856
7940
|
|
|
7857
|
-
var _path$
|
|
7941
|
+
var _path$t, _path2$4;
|
|
7858
7942
|
|
|
7859
|
-
function _extends$
|
|
7943
|
+
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); }
|
|
7860
7944
|
|
|
7861
7945
|
function SvgSpinner(props) {
|
|
7862
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7946
|
+
return /*#__PURE__*/React.createElement("svg", _extends$v({
|
|
7863
7947
|
className: "plc-animate-spin",
|
|
7864
7948
|
viewBox: "0 0 24 24",
|
|
7865
7949
|
fill: "currentColor",
|
|
7866
7950
|
xmlns: "http://www.w3.org/2000/svg"
|
|
7867
|
-
}, props), _path$
|
|
7951
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
|
|
7868
7952
|
opacity: 0.2,
|
|
7869
7953
|
fill: "evenodd",
|
|
7870
7954
|
clipRule: "evenodd",
|
|
@@ -8154,7 +8238,9 @@ const init$1 = () => {
|
|
|
8154
8238
|
return switchToAddressView();
|
|
8155
8239
|
});
|
|
8156
8240
|
} else {
|
|
8157
|
-
pelcroSubscribeButtonsByClass[j].addEventListener("click", () =>
|
|
8241
|
+
pelcroSubscribeButtonsByClass[j].addEventListener("click", () => {
|
|
8242
|
+
return switchView("subscription-options");
|
|
8243
|
+
});
|
|
8158
8244
|
}
|
|
8159
8245
|
}
|
|
8160
8246
|
}
|
|
@@ -8316,7 +8402,8 @@ function Link({
|
|
|
8316
8402
|
const init = () => {
|
|
8317
8403
|
const {
|
|
8318
8404
|
switchView,
|
|
8319
|
-
set
|
|
8405
|
+
set,
|
|
8406
|
+
setProductsList
|
|
8320
8407
|
} = usePelcro.getStore();
|
|
8321
8408
|
const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
|
|
8322
8409
|
|
|
@@ -8367,7 +8454,8 @@ const init = () => {
|
|
|
8367
8454
|
}
|
|
8368
8455
|
|
|
8369
8456
|
notify.dismiss(NOTIFICATION_ID);
|
|
8370
|
-
|
|
8457
|
+
setProductsList(window.Pelcro.product.getByEntitlements(entitlements));
|
|
8458
|
+
switchView("plan-select");
|
|
8371
8459
|
}
|
|
8372
8460
|
}, "Subscribe"), "now to get full page access.")), {
|
|
8373
8461
|
className: "pelcro-notification-entitlement",
|
|
@@ -8753,7 +8841,7 @@ const loadPaymentSDKs = () => {
|
|
|
8753
8841
|
} // Load Vantiv SDKs
|
|
8754
8842
|
|
|
8755
8843
|
|
|
8756
|
-
const supportsVantiv = Boolean(window.Pelcro.site.read().
|
|
8844
|
+
const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
|
|
8757
8845
|
|
|
8758
8846
|
if (supportsVantiv) {
|
|
8759
8847
|
if (!window.jQuery) {
|
|
@@ -8761,7 +8849,10 @@ const loadPaymentSDKs = () => {
|
|
|
8761
8849
|
}
|
|
8762
8850
|
|
|
8763
8851
|
if (!window.EprotectIframeClient) {
|
|
8764
|
-
|
|
8852
|
+
const PRELIVE_URL = "https://request.eprotect.vantivprelive.com/eProtect/js/eProtect-iframe-client.min.js";
|
|
8853
|
+
const PRODUCTION_URL = "https://request.eprotect.vantivcnp.com/eProtect/js/eProtect-iframe-client4.min.js";
|
|
8854
|
+
const scriptUrlToUse = window.Pelcro.site.read().vantiv_gateway_settings.environment === "production" ? PRODUCTION_URL : PRELIVE_URL;
|
|
8855
|
+
window.Pelcro.helpers.loadSDK(scriptUrlToUse, "vantiv-eprotect-sdk");
|
|
8765
8856
|
}
|
|
8766
8857
|
}
|
|
8767
8858
|
};
|
|
@@ -9195,7 +9286,7 @@ const PelcroModalController = ({
|
|
|
9195
9286
|
type
|
|
9196
9287
|
}) => (type === null || type === void 0 ? void 0 : type.viewId) === "dashboard-open"), React__default.Children.map(children, child => child).find(({
|
|
9197
9288
|
type
|
|
9198
|
-
}) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-
|
|
9289
|
+
}) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-renew" && React__default.Children.map(children, child => child).find(({
|
|
9199
9290
|
type
|
|
9200
9291
|
}) => (type === null || type === void 0 ? void 0 : type.viewId) === "plan-select"), React__default.Children.map(children, child => child).find(({
|
|
9201
9292
|
type
|
|
@@ -9476,8 +9567,10 @@ const LOAD_PAYMENT_METHODS = "LOAD_PAYMENT_METHODS";
|
|
|
9476
9567
|
const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
|
|
9477
9568
|
const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
|
|
9478
9569
|
const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
|
|
9570
|
+
const SWITCH_TO_RENEW = "SWITCH_TO_RENEW";
|
|
9571
|
+
const SWITCH_TO_NEW = "SWITCH_TO_NEW";
|
|
9479
9572
|
|
|
9480
|
-
const initialState$
|
|
9573
|
+
const initialState$i = {
|
|
9481
9574
|
email: "",
|
|
9482
9575
|
password: "",
|
|
9483
9576
|
emailError: null,
|
|
@@ -9488,10 +9581,10 @@ const initialState$h = {
|
|
|
9488
9581
|
content: ""
|
|
9489
9582
|
}
|
|
9490
9583
|
};
|
|
9491
|
-
const store$
|
|
9584
|
+
const store$i = /*#__PURE__*/createContext(initialState$i);
|
|
9492
9585
|
const {
|
|
9493
|
-
Provider: Provider$
|
|
9494
|
-
} = store$
|
|
9586
|
+
Provider: Provider$i
|
|
9587
|
+
} = store$i;
|
|
9495
9588
|
|
|
9496
9589
|
const LoginContainer = ({
|
|
9497
9590
|
style,
|
|
@@ -9598,7 +9691,7 @@ const LoginContainer = ({
|
|
|
9598
9691
|
});
|
|
9599
9692
|
|
|
9600
9693
|
case RESET_LOGIN_FORM:
|
|
9601
|
-
return initialState$
|
|
9694
|
+
return initialState$i;
|
|
9602
9695
|
|
|
9603
9696
|
case DISABLE_LOGIN_BUTTON:
|
|
9604
9697
|
return lib_7({ ...state,
|
|
@@ -9616,12 +9709,12 @@ const LoginContainer = ({
|
|
|
9616
9709
|
default:
|
|
9617
9710
|
return state;
|
|
9618
9711
|
}
|
|
9619
|
-
}, initialState$
|
|
9712
|
+
}, initialState$i);
|
|
9620
9713
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9621
9714
|
style: { ...style
|
|
9622
9715
|
},
|
|
9623
9716
|
className: `pelcro-container pelcro-login-container ${className}`
|
|
9624
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
9717
|
+
}, /*#__PURE__*/React__default.createElement(Provider$i, {
|
|
9625
9718
|
value: {
|
|
9626
9719
|
state,
|
|
9627
9720
|
dispatch
|
|
@@ -9629,12 +9722,12 @@ const LoginContainer = ({
|
|
|
9629
9722
|
}, children.length ? children.map((child, i) => {
|
|
9630
9723
|
if (child) {
|
|
9631
9724
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
9632
|
-
store: store$
|
|
9725
|
+
store: store$i,
|
|
9633
9726
|
key: i
|
|
9634
9727
|
});
|
|
9635
9728
|
}
|
|
9636
9729
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
9637
|
-
store: store$
|
|
9730
|
+
store: store$i
|
|
9638
9731
|
})));
|
|
9639
9732
|
};
|
|
9640
9733
|
|
|
@@ -9879,7 +9972,7 @@ const LoginButton = ({
|
|
|
9879
9972
|
buttonDisabled
|
|
9880
9973
|
},
|
|
9881
9974
|
dispatch
|
|
9882
|
-
} = useContext(store$
|
|
9975
|
+
} = useContext(store$i);
|
|
9883
9976
|
const {
|
|
9884
9977
|
t
|
|
9885
9978
|
} = useTranslation("login");
|
|
@@ -9900,23 +9993,23 @@ const LoginButton = ({
|
|
|
9900
9993
|
};
|
|
9901
9994
|
|
|
9902
9995
|
const LoginEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
9903
|
-
store: store$
|
|
9996
|
+
store: store$i
|
|
9904
9997
|
}, props));
|
|
9905
9998
|
|
|
9906
9999
|
const LoginPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
9907
|
-
store: store$
|
|
10000
|
+
store: store$i
|
|
9908
10001
|
}, props));
|
|
9909
10002
|
|
|
9910
|
-
var _path$
|
|
10003
|
+
var _path$s;
|
|
9911
10004
|
|
|
9912
|
-
function _extends$
|
|
10005
|
+
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); }
|
|
9913
10006
|
|
|
9914
10007
|
function SvgCheck(props) {
|
|
9915
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10008
|
+
return /*#__PURE__*/React.createElement("svg", _extends$u({
|
|
9916
10009
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9917
10010
|
fill: "currentColor",
|
|
9918
10011
|
viewBox: "0 0 20 20"
|
|
9919
|
-
}, props), _path$
|
|
10012
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
|
|
9920
10013
|
fillRule: "evenodd",
|
|
9921
10014
|
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",
|
|
9922
10015
|
clipRule: "evenodd"
|
|
@@ -9981,7 +10074,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
|
|
|
9981
10074
|
var FacebookLogin = unwrapExports(facebookLoginRenderProps);
|
|
9982
10075
|
facebookLoginRenderProps.FacebookLogin;
|
|
9983
10076
|
|
|
9984
|
-
const initialState$
|
|
10077
|
+
const initialState$h = {
|
|
9985
10078
|
email: "",
|
|
9986
10079
|
password: "",
|
|
9987
10080
|
emailError: null,
|
|
@@ -9998,10 +10091,10 @@ const initialState$g = {
|
|
|
9998
10091
|
content: ""
|
|
9999
10092
|
}
|
|
10000
10093
|
};
|
|
10001
|
-
const store$
|
|
10094
|
+
const store$h = /*#__PURE__*/createContext(initialState$h);
|
|
10002
10095
|
const {
|
|
10003
|
-
Provider: Provider$
|
|
10004
|
-
} = store$
|
|
10096
|
+
Provider: Provider$h
|
|
10097
|
+
} = store$h;
|
|
10005
10098
|
|
|
10006
10099
|
const RegisterContainer = ({
|
|
10007
10100
|
style,
|
|
@@ -10184,7 +10277,7 @@ const RegisterContainer = ({
|
|
|
10184
10277
|
});
|
|
10185
10278
|
|
|
10186
10279
|
case RESET_LOGIN_FORM:
|
|
10187
|
-
return initialState$
|
|
10280
|
+
return initialState$h;
|
|
10188
10281
|
|
|
10189
10282
|
case DISABLE_REGISTRATION_BUTTON:
|
|
10190
10283
|
return lib_7({ ...state,
|
|
@@ -10202,12 +10295,12 @@ const RegisterContainer = ({
|
|
|
10202
10295
|
default:
|
|
10203
10296
|
return state;
|
|
10204
10297
|
}
|
|
10205
|
-
}, initialState$
|
|
10298
|
+
}, initialState$h);
|
|
10206
10299
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10207
10300
|
style: { ...style
|
|
10208
10301
|
},
|
|
10209
10302
|
className: `pelcro-container pelcro-register-container ${className}`
|
|
10210
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
10303
|
+
}, /*#__PURE__*/React__default.createElement(Provider$h, {
|
|
10211
10304
|
value: {
|
|
10212
10305
|
state,
|
|
10213
10306
|
dispatch
|
|
@@ -10215,12 +10308,12 @@ const RegisterContainer = ({
|
|
|
10215
10308
|
}, children.length ? children.map((child, i) => {
|
|
10216
10309
|
if (child) {
|
|
10217
10310
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
10218
|
-
store: store$
|
|
10311
|
+
store: store$h,
|
|
10219
10312
|
key: i
|
|
10220
10313
|
});
|
|
10221
10314
|
}
|
|
10222
10315
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
10223
|
-
store: store$
|
|
10316
|
+
store: store$h
|
|
10224
10317
|
})));
|
|
10225
10318
|
};
|
|
10226
10319
|
/**
|
|
@@ -10235,15 +10328,15 @@ function hasSecurityTokenEnabled$1() {
|
|
|
10235
10328
|
return hasSecuritySdkLoaded;
|
|
10236
10329
|
}
|
|
10237
10330
|
|
|
10238
|
-
var _path$
|
|
10331
|
+
var _path$r;
|
|
10239
10332
|
|
|
10240
|
-
function _extends$
|
|
10333
|
+
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); }
|
|
10241
10334
|
|
|
10242
10335
|
function SvgFacebookLogo(props) {
|
|
10243
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10336
|
+
return /*#__PURE__*/React.createElement("svg", _extends$t({
|
|
10244
10337
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10245
10338
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
10246
|
-
}, props), _path$
|
|
10339
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
|
|
10247
10340
|
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",
|
|
10248
10341
|
fill: "#3c5a9a"
|
|
10249
10342
|
})));
|
|
@@ -10260,10 +10353,10 @@ const FacebookLoginButton = ({
|
|
|
10260
10353
|
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;
|
|
10261
10354
|
const {
|
|
10262
10355
|
dispatch: loginDispatch
|
|
10263
|
-
} = useContext(store$
|
|
10356
|
+
} = useContext(store$i);
|
|
10264
10357
|
const {
|
|
10265
10358
|
dispatch: registerDispatch
|
|
10266
|
-
} = useContext(store$
|
|
10359
|
+
} = useContext(store$h);
|
|
10267
10360
|
|
|
10268
10361
|
const onSuccess = facebookUser => {
|
|
10269
10362
|
loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
|
|
@@ -10316,15 +10409,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
10316
10409
|
unwrapExports(googleLogin);
|
|
10317
10410
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
10318
10411
|
|
|
10319
|
-
var _path$
|
|
10412
|
+
var _path$q, _path2$3, _path3$1, _path4;
|
|
10320
10413
|
|
|
10321
|
-
function _extends$
|
|
10414
|
+
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); }
|
|
10322
10415
|
|
|
10323
10416
|
function SvgGoogleLogo(props) {
|
|
10324
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10417
|
+
return /*#__PURE__*/React.createElement("svg", _extends$s({
|
|
10325
10418
|
viewBox: "0 0 24 24",
|
|
10326
10419
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10327
|
-
}, props), _path$
|
|
10420
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
|
|
10328
10421
|
fill: "#4285F4",
|
|
10329
10422
|
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"
|
|
10330
10423
|
})), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
|
|
@@ -10350,10 +10443,10 @@ const GoogleLoginButton = ({
|
|
|
10350
10443
|
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;
|
|
10351
10444
|
const {
|
|
10352
10445
|
dispatch: loginDispatch
|
|
10353
|
-
} = useContext(store$
|
|
10446
|
+
} = useContext(store$i);
|
|
10354
10447
|
const {
|
|
10355
10448
|
dispatch: registerDispatch
|
|
10356
|
-
} = useContext(store$
|
|
10449
|
+
} = useContext(store$h);
|
|
10357
10450
|
|
|
10358
10451
|
const onSuccess = response => {
|
|
10359
10452
|
var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
|
|
@@ -10401,15 +10494,15 @@ const GoogleLoginButton = ({
|
|
|
10401
10494
|
}) : null;
|
|
10402
10495
|
};
|
|
10403
10496
|
|
|
10404
|
-
var _path$
|
|
10497
|
+
var _path$p;
|
|
10405
10498
|
|
|
10406
|
-
function _extends$
|
|
10499
|
+
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); }
|
|
10407
10500
|
|
|
10408
10501
|
function SvgAuth0Logo(props) {
|
|
10409
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10502
|
+
return /*#__PURE__*/React.createElement("svg", _extends$r({
|
|
10410
10503
|
viewBox: "0 0 256 285",
|
|
10411
10504
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10412
|
-
}, props), _path$
|
|
10505
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
|
|
10413
10506
|
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"
|
|
10414
10507
|
})));
|
|
10415
10508
|
}
|
|
@@ -10449,10 +10542,10 @@ const Auth0LoginButton = ({
|
|
|
10449
10542
|
}, [auth0Enabled, auth0Loaded]);
|
|
10450
10543
|
const {
|
|
10451
10544
|
dispatch: loginDispatch
|
|
10452
|
-
} = useContext(store$
|
|
10545
|
+
} = useContext(store$i);
|
|
10453
10546
|
const {
|
|
10454
10547
|
dispatch: registerDispatch
|
|
10455
|
-
} = useContext(store$
|
|
10548
|
+
} = useContext(store$h);
|
|
10456
10549
|
|
|
10457
10550
|
function handleClick() {
|
|
10458
10551
|
var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
|
|
@@ -10585,15 +10678,15 @@ function LoginView(props) {
|
|
|
10585
10678
|
}, /*#__PURE__*/React__default.createElement(GoogleLoginButton, null), /*#__PURE__*/React__default.createElement(FacebookLoginButton, null), /*#__PURE__*/React__default.createElement(Auth0LoginButton, null))))));
|
|
10586
10679
|
}
|
|
10587
10680
|
|
|
10588
|
-
var _path$
|
|
10681
|
+
var _path$o, _path2$2, _path3;
|
|
10589
10682
|
|
|
10590
|
-
function _extends$
|
|
10683
|
+
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); }
|
|
10591
10684
|
|
|
10592
10685
|
function SvgPelcroAuthorship(props) {
|
|
10593
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10686
|
+
return /*#__PURE__*/React.createElement("svg", _extends$q({
|
|
10594
10687
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10595
10688
|
viewBox: "0 -80.652 497.072 179.991"
|
|
10596
|
-
}, props), _path$
|
|
10689
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
|
|
10597
10690
|
fill: "none",
|
|
10598
10691
|
stroke: "#4a4a4a",
|
|
10599
10692
|
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"
|
|
@@ -10740,11 +10833,11 @@ function LoginModal({
|
|
|
10740
10833
|
LoginModal.viewId = "login";
|
|
10741
10834
|
|
|
10742
10835
|
const RegisterEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
10743
|
-
store: store$
|
|
10836
|
+
store: store$h
|
|
10744
10837
|
}, props));
|
|
10745
10838
|
|
|
10746
10839
|
const RegisterPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
10747
|
-
store: store$
|
|
10840
|
+
store: store$h
|
|
10748
10841
|
}, props));
|
|
10749
10842
|
|
|
10750
10843
|
const RegisterButton = ({
|
|
@@ -10764,7 +10857,7 @@ const RegisterButton = ({
|
|
|
10764
10857
|
buttonDisabled
|
|
10765
10858
|
},
|
|
10766
10859
|
dispatch
|
|
10767
|
-
} = useContext(store$
|
|
10860
|
+
} = useContext(store$h);
|
|
10768
10861
|
const {
|
|
10769
10862
|
t
|
|
10770
10863
|
} = useTranslation("register");
|
|
@@ -10902,7 +10995,7 @@ function FirstName({
|
|
|
10902
10995
|
}
|
|
10903
10996
|
|
|
10904
10997
|
const RegisterFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
10905
|
-
store: store$
|
|
10998
|
+
store: store$h
|
|
10906
10999
|
}, props));
|
|
10907
11000
|
|
|
10908
11001
|
function LastName({
|
|
@@ -10933,7 +11026,7 @@ function LastName({
|
|
|
10933
11026
|
}
|
|
10934
11027
|
|
|
10935
11028
|
const RegisterLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
10936
|
-
store: store$
|
|
11029
|
+
store: store$h
|
|
10937
11030
|
}, props));
|
|
10938
11031
|
|
|
10939
11032
|
/**
|
|
@@ -11057,7 +11150,7 @@ function TextInput({
|
|
|
11057
11150
|
|
|
11058
11151
|
const RegisterTextInput = props => {
|
|
11059
11152
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
11060
|
-
store: store$
|
|
11153
|
+
store: store$h
|
|
11061
11154
|
}));
|
|
11062
11155
|
};
|
|
11063
11156
|
|
|
@@ -11204,6 +11297,7 @@ function SelectModalWithHook(props) {
|
|
|
11204
11297
|
(_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
|
|
11205
11298
|
}, []);
|
|
11206
11299
|
const {
|
|
11300
|
+
productsList,
|
|
11207
11301
|
isGift,
|
|
11208
11302
|
plan,
|
|
11209
11303
|
product,
|
|
@@ -11213,11 +11307,12 @@ function SelectModalWithHook(props) {
|
|
|
11213
11307
|
view,
|
|
11214
11308
|
set
|
|
11215
11309
|
} = usePelcro();
|
|
11216
|
-
const
|
|
11217
|
-
const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
|
|
11310
|
+
const isRenewingSub = view === "_plan-select-renew";
|
|
11218
11311
|
return /*#__PURE__*/React__default.createElement(SelectModalWithTrans, {
|
|
11312
|
+
productsList: productsList,
|
|
11219
11313
|
isGift: isGift,
|
|
11220
|
-
disableGifting: isRenewingGift,
|
|
11314
|
+
disableGifting: isRenewingGift || isRenewingSub,
|
|
11315
|
+
isRenewingSub: isRenewingSub,
|
|
11221
11316
|
plan: plan,
|
|
11222
11317
|
product: product,
|
|
11223
11318
|
onClose: () => {
|
|
@@ -11231,8 +11326,10 @@ function SelectModalWithHook(props) {
|
|
|
11231
11326
|
plan,
|
|
11232
11327
|
isGift
|
|
11233
11328
|
}),
|
|
11234
|
-
|
|
11235
|
-
|
|
11329
|
+
setSubscriptionIdToRenew: subscriptionIdToRenew => set({
|
|
11330
|
+
subscriptionIdToRenew
|
|
11331
|
+
}),
|
|
11332
|
+
setView: switchView
|
|
11236
11333
|
});
|
|
11237
11334
|
}
|
|
11238
11335
|
SelectModalWithHook.viewId = "plan-select";
|
|
@@ -11264,10 +11361,10 @@ class SelectModal extends Component {
|
|
|
11264
11361
|
});
|
|
11265
11362
|
}
|
|
11266
11363
|
|
|
11267
|
-
if (this.
|
|
11364
|
+
if (this.props.productsList.length === 1) {
|
|
11268
11365
|
this.setState({
|
|
11269
|
-
product: this.
|
|
11270
|
-
planList: this.
|
|
11366
|
+
product: this.props.productsList[0],
|
|
11367
|
+
planList: this.props.productsList[0].plans,
|
|
11271
11368
|
mode: "plan"
|
|
11272
11369
|
});
|
|
11273
11370
|
}
|
|
@@ -11284,7 +11381,7 @@ class SelectModal extends Component {
|
|
|
11284
11381
|
});
|
|
11285
11382
|
|
|
11286
11383
|
_defineProperty$3(this, "onProductChange", e => {
|
|
11287
|
-
const product =
|
|
11384
|
+
const product = productsList[e.target.selectedIndex];
|
|
11288
11385
|
this.setState({
|
|
11289
11386
|
product: product,
|
|
11290
11387
|
plan: product.plans[0]
|
|
@@ -11350,7 +11447,7 @@ class SelectModal extends Component {
|
|
|
11350
11447
|
|
|
11351
11448
|
_defineProperty$3(this, "renderProducts", () => {
|
|
11352
11449
|
const userDidSelectProduct = Boolean(this.state.mode === "plan");
|
|
11353
|
-
const productsToShow = userDidSelectProduct ? [this.state.product] : this.
|
|
11450
|
+
const productsToShow = userDidSelectProduct ? [this.state.product] : this.props.productsList;
|
|
11354
11451
|
return productsToShow.map((product, index) => {
|
|
11355
11452
|
return this.renderOneProduct(product, index);
|
|
11356
11453
|
});
|
|
@@ -11363,7 +11460,7 @@ class SelectModal extends Component {
|
|
|
11363
11460
|
return this.renderOneProduct(this.state.product);
|
|
11364
11461
|
}
|
|
11365
11462
|
|
|
11366
|
-
const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(); // Render normal products if there are no available matching products
|
|
11463
|
+
const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(this.props.productsList); // Render normal products if there are no available matching products
|
|
11367
11464
|
|
|
11368
11465
|
if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
|
|
11369
11466
|
return this.renderProducts();
|
|
@@ -11379,10 +11476,7 @@ class SelectModal extends Component {
|
|
|
11379
11476
|
className: "plc-text-sm plc-font-semibold"
|
|
11380
11477
|
}, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
|
|
11381
11478
|
|
|
11382
|
-
function productsWithMatchedTaggedFirst() {
|
|
11383
|
-
var _window$Pelcro$produc;
|
|
11384
|
-
|
|
11385
|
-
const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
|
|
11479
|
+
function productsWithMatchedTaggedFirst(allProducts) {
|
|
11386
11480
|
const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
|
|
11387
11481
|
const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
|
|
11388
11482
|
return [productsThatMatchArticleTag, allProductsMinusMatched];
|
|
@@ -11416,7 +11510,7 @@ class SelectModal extends Component {
|
|
|
11416
11510
|
_defineProperty$3(this, "selectProduct", e => {
|
|
11417
11511
|
const id = e.target.dataset.key;
|
|
11418
11512
|
|
|
11419
|
-
for (const product of this.
|
|
11513
|
+
for (const product of this.props.productsList) {
|
|
11420
11514
|
if (+product.id === +id) {
|
|
11421
11515
|
var _this$state$plan;
|
|
11422
11516
|
|
|
@@ -11469,6 +11563,14 @@ class SelectModal extends Component {
|
|
|
11469
11563
|
|
|
11470
11564
|
_defineProperty$3(this, "submitOption", () => {
|
|
11471
11565
|
this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
|
|
11566
|
+
|
|
11567
|
+
if (this.props.isRenewingSub) {
|
|
11568
|
+
var _matchingSub$id;
|
|
11569
|
+
|
|
11570
|
+
const matchingSub = window.Pelcro.subscription.list().find(sub => sub.plan.id === this.state.plan.id && sub.status === "active" && sub.cancel_at_period_end === 1);
|
|
11571
|
+
this.props.setSubscriptionIdToRenew((_matchingSub$id = matchingSub === null || matchingSub === void 0 ? void 0 : matchingSub.id) !== null && _matchingSub$id !== void 0 ? _matchingSub$id : null);
|
|
11572
|
+
}
|
|
11573
|
+
|
|
11472
11574
|
const {
|
|
11473
11575
|
product,
|
|
11474
11576
|
isGift
|
|
@@ -11506,8 +11608,7 @@ class SelectModal extends Component {
|
|
|
11506
11608
|
plan: {},
|
|
11507
11609
|
isGift: props.isGift,
|
|
11508
11610
|
disabled: true,
|
|
11509
|
-
mode: "product"
|
|
11510
|
-
productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
|
|
11611
|
+
mode: "product"
|
|
11511
11612
|
};
|
|
11512
11613
|
this.product = this.props.product || window.Pelcro.paywall.getProduct();
|
|
11513
11614
|
this.locale = this.props.t;
|
|
@@ -11515,7 +11616,7 @@ class SelectModal extends Component {
|
|
|
11515
11616
|
}
|
|
11516
11617
|
|
|
11517
11618
|
render() {
|
|
11518
|
-
var
|
|
11619
|
+
var _this$props$productsL, _this$props$productsL2, _window$Pelcro$site$r;
|
|
11519
11620
|
|
|
11520
11621
|
const {
|
|
11521
11622
|
disableGifting
|
|
@@ -11549,7 +11650,7 @@ class SelectModal extends Component {
|
|
|
11549
11650
|
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
11550
11651
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
11551
11652
|
className: "plc-text-2xl plc-font-semibold"
|
|
11552
|
-
}, this.product && this.product.paywall.select_title || ((
|
|
11653
|
+
}, 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.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.createElement("div", {
|
|
11553
11654
|
className: "pelcro-select-products-wrapper"
|
|
11554
11655
|
}, (_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.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11555
11656
|
className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
|
|
@@ -12713,20 +12814,21 @@ var es_12 = es.injectStripe;
|
|
|
12713
12814
|
var es_13 = es.StripeProvider;
|
|
12714
12815
|
|
|
12715
12816
|
/**
|
|
12716
|
-
* @TODO: All
|
|
12817
|
+
* @TODO: All payment related business logic should end up moving
|
|
12717
12818
|
* to this service, and out of react components.
|
|
12718
12819
|
*/
|
|
12719
12820
|
|
|
12720
12821
|
/**
|
|
12721
|
-
* Enum for
|
|
12822
|
+
* Enum for payment types
|
|
12722
12823
|
* @readonly
|
|
12723
12824
|
* @enum {string}
|
|
12724
12825
|
*/
|
|
12725
|
-
const
|
|
12826
|
+
const PAYMENT_TYPES = {
|
|
12726
12827
|
CREATE_SUBSCRIPTION: "CREATE_SUBSCRIPTION",
|
|
12727
12828
|
CREATE_GIFTED_SUBSCRIPTION: "CREATE_GIFTED_SUBSCRIPTION",
|
|
12728
12829
|
RENEW_SUBSCRIPTION: "RENEW_SUBSCRIPTION",
|
|
12729
12830
|
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION",
|
|
12831
|
+
PURCHASE_ECOMMERCE_ORDER: "PURCHASE_ECOMMERCE_ORDER",
|
|
12730
12832
|
PAY_INVOICE: "PAY_INVOICE"
|
|
12731
12833
|
};
|
|
12732
12834
|
|
|
@@ -12734,9 +12836,8 @@ var _isPaymentGatewayInvalid = /*#__PURE__*/new WeakMap();
|
|
|
12734
12836
|
|
|
12735
12837
|
var _generateUserError = /*#__PURE__*/new WeakMap();
|
|
12736
12838
|
|
|
12737
|
-
class
|
|
12839
|
+
class Payment {
|
|
12738
12840
|
/**
|
|
12739
|
-
* Subscription service constructor
|
|
12740
12841
|
* @param {(StripeGateway|PaypalGateway|VantivGateway)} paymentGateway
|
|
12741
12842
|
*/
|
|
12742
12843
|
constructor(paymentGateway) {
|
|
@@ -12748,7 +12849,7 @@ class Subscription {
|
|
|
12748
12849
|
|
|
12749
12850
|
if (!options.type) {
|
|
12750
12851
|
callback(_classPrivateFieldGet(this, _generateUserError).call(this), null);
|
|
12751
|
-
return console.error("No
|
|
12852
|
+
return console.error("No payment type provided");
|
|
12752
12853
|
} // delegate execution to paymentgateway
|
|
12753
12854
|
|
|
12754
12855
|
|
|
@@ -12766,21 +12867,21 @@ class Subscription {
|
|
|
12766
12867
|
writable: true,
|
|
12767
12868
|
value: () => {
|
|
12768
12869
|
return {
|
|
12769
|
-
error: new Error("An error has occured in the
|
|
12870
|
+
error: new Error("An error has occured in the payment service, please try again later")
|
|
12770
12871
|
};
|
|
12771
12872
|
}
|
|
12772
12873
|
});
|
|
12773
12874
|
|
|
12774
12875
|
if (_classPrivateFieldGet(this, _isPaymentGatewayInvalid).call(this, paymentGateway)) {
|
|
12775
12876
|
this.paymentGateway = null;
|
|
12776
|
-
console.error("Incompatible
|
|
12877
|
+
console.error("Incompatible payment gateway");
|
|
12777
12878
|
} else {
|
|
12778
12879
|
this.paymentGateway = paymentGateway;
|
|
12779
12880
|
}
|
|
12780
12881
|
}
|
|
12781
12882
|
/**
|
|
12782
|
-
* @typedef
|
|
12783
|
-
* @property {
|
|
12883
|
+
* @typedef paymentOptions
|
|
12884
|
+
* @property {PAYMENT_TYPES} type
|
|
12784
12885
|
* @property {string} token
|
|
12785
12886
|
* @property {object} plan
|
|
12786
12887
|
* @property {object} [product]
|
|
@@ -12791,6 +12892,7 @@ class Subscription {
|
|
|
12791
12892
|
* @property {string} addressId
|
|
12792
12893
|
* @property {number} invoiceId
|
|
12793
12894
|
* @property {boolean} isExistingSource
|
|
12895
|
+
* @property {Array} items
|
|
12794
12896
|
*/
|
|
12795
12897
|
|
|
12796
12898
|
/**
|
|
@@ -12801,8 +12903,8 @@ class Subscription {
|
|
|
12801
12903
|
*/
|
|
12802
12904
|
|
|
12803
12905
|
/**
|
|
12804
|
-
*
|
|
12805
|
-
* @param {
|
|
12906
|
+
* Payment execution method
|
|
12907
|
+
* @param {paymentOptions} options payment options
|
|
12806
12908
|
* @param {executeCallback} callback
|
|
12807
12909
|
* @return {void}
|
|
12808
12910
|
*/
|
|
@@ -12815,7 +12917,7 @@ const PAYMENT_GATEWAYS_ENUM = {
|
|
|
12815
12917
|
vantiv: "vantiv"
|
|
12816
12918
|
};
|
|
12817
12919
|
/**
|
|
12818
|
-
*
|
|
12920
|
+
* Payment Strategies
|
|
12819
12921
|
*/
|
|
12820
12922
|
|
|
12821
12923
|
/**
|
|
@@ -12832,6 +12934,8 @@ var _renewSubscription = /*#__PURE__*/new WeakMap();
|
|
|
12832
12934
|
|
|
12833
12935
|
var _renewGiftedSubscription = /*#__PURE__*/new WeakMap();
|
|
12834
12936
|
|
|
12937
|
+
var _purchaseEcommerceOrder = /*#__PURE__*/new WeakMap();
|
|
12938
|
+
|
|
12835
12939
|
var _payInvoice = /*#__PURE__*/new WeakMap();
|
|
12836
12940
|
|
|
12837
12941
|
class StripeGateway {
|
|
@@ -12842,7 +12946,7 @@ class StripeGateway {
|
|
|
12842
12946
|
});
|
|
12843
12947
|
|
|
12844
12948
|
_defineProperty$3(this, "execute", (options, callback) => {
|
|
12845
|
-
const types =
|
|
12949
|
+
const types = PAYMENT_TYPES;
|
|
12846
12950
|
|
|
12847
12951
|
switch (options.type) {
|
|
12848
12952
|
case types.CREATE_SUBSCRIPTION:
|
|
@@ -12857,11 +12961,14 @@ class StripeGateway {
|
|
|
12857
12961
|
case types.RENEW_GIFTED_SUBSCRIPTION:
|
|
12858
12962
|
return _classPrivateFieldGet(this, _renewGiftedSubscription).call(this, options, callback);
|
|
12859
12963
|
|
|
12964
|
+
case types.PURCHASE_ECOMMERCE_ORDER:
|
|
12965
|
+
return _classPrivateFieldGet(this, _purchaseEcommerceOrder).call(this, options, callback);
|
|
12966
|
+
|
|
12860
12967
|
case types.PAY_INVOICE:
|
|
12861
12968
|
return _classPrivateFieldGet(this, _payInvoice).call(this, options, callback);
|
|
12862
12969
|
|
|
12863
12970
|
default:
|
|
12864
|
-
console.error("Unsupported
|
|
12971
|
+
console.error("Unsupported payment method: Stripe Gateway");
|
|
12865
12972
|
}
|
|
12866
12973
|
});
|
|
12867
12974
|
|
|
@@ -12969,6 +13076,35 @@ class StripeGateway {
|
|
|
12969
13076
|
}
|
|
12970
13077
|
});
|
|
12971
13078
|
|
|
13079
|
+
_purchaseEcommerceOrder.set(this, {
|
|
13080
|
+
writable: true,
|
|
13081
|
+
value: (options, callback) => {
|
|
13082
|
+
const {
|
|
13083
|
+
token,
|
|
13084
|
+
items,
|
|
13085
|
+
couponCode,
|
|
13086
|
+
addressId,
|
|
13087
|
+
isExistingSource
|
|
13088
|
+
} = options;
|
|
13089
|
+
const params = isExistingSource ? {
|
|
13090
|
+
source_id: token
|
|
13091
|
+
} : {
|
|
13092
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway),
|
|
13093
|
+
gateway_token: token
|
|
13094
|
+
};
|
|
13095
|
+
window.Pelcro.ecommerce.order.create({
|
|
13096
|
+
items,
|
|
13097
|
+
coupon_code: couponCode,
|
|
13098
|
+
...params,
|
|
13099
|
+
...(addressId && {
|
|
13100
|
+
address_id: addressId
|
|
13101
|
+
})
|
|
13102
|
+
}, (err, res) => {
|
|
13103
|
+
callback(err, res);
|
|
13104
|
+
});
|
|
13105
|
+
}
|
|
13106
|
+
});
|
|
13107
|
+
|
|
12972
13108
|
_payInvoice.set(this, {
|
|
12973
13109
|
writable: true,
|
|
12974
13110
|
value: (options, callback) => {
|
|
@@ -13012,7 +13148,7 @@ class PaypalGateway {
|
|
|
13012
13148
|
});
|
|
13013
13149
|
|
|
13014
13150
|
_defineProperty$3(this, "execute", (options, callback) => {
|
|
13015
|
-
const types =
|
|
13151
|
+
const types = PAYMENT_TYPES;
|
|
13016
13152
|
|
|
13017
13153
|
switch (options.type) {
|
|
13018
13154
|
case types.CREATE_SUBSCRIPTION:
|
|
@@ -13115,6 +13251,10 @@ var _createGiftedSubscription3 = /*#__PURE__*/new WeakMap();
|
|
|
13115
13251
|
|
|
13116
13252
|
var _renewGiftedSubscription2 = /*#__PURE__*/new WeakMap();
|
|
13117
13253
|
|
|
13254
|
+
var _purchaseEcommerceOrder2 = /*#__PURE__*/new WeakMap();
|
|
13255
|
+
|
|
13256
|
+
var _payInvoice3 = /*#__PURE__*/new WeakMap();
|
|
13257
|
+
|
|
13118
13258
|
class VantivGateway {
|
|
13119
13259
|
constructor() {
|
|
13120
13260
|
_paymentGateway3.set(this, {
|
|
@@ -13123,7 +13263,7 @@ class VantivGateway {
|
|
|
13123
13263
|
});
|
|
13124
13264
|
|
|
13125
13265
|
_defineProperty$3(this, "execute", (options, callback) => {
|
|
13126
|
-
const types =
|
|
13266
|
+
const types = PAYMENT_TYPES;
|
|
13127
13267
|
|
|
13128
13268
|
switch (options.type) {
|
|
13129
13269
|
case types.CREATE_SUBSCRIPTION:
|
|
@@ -13137,12 +13277,15 @@ class VantivGateway {
|
|
|
13137
13277
|
|
|
13138
13278
|
case types.RENEW_GIFTED_SUBSCRIPTION:
|
|
13139
13279
|
return _classPrivateFieldGet(this, _renewGiftedSubscription2).call(this, options, callback);
|
|
13140
|
-
|
|
13141
|
-
|
|
13142
|
-
|
|
13280
|
+
|
|
13281
|
+
case types.PURCHASE_ECOMMERCE_ORDER:
|
|
13282
|
+
return _classPrivateFieldGet(this, _purchaseEcommerceOrder2).call(this, options, callback);
|
|
13283
|
+
|
|
13284
|
+
case types.PAY_INVOICE:
|
|
13285
|
+
return _classPrivateFieldGet(this, _payInvoice3).call(this, options, callback);
|
|
13143
13286
|
|
|
13144
13287
|
default:
|
|
13145
|
-
console.error("Unsupported
|
|
13288
|
+
console.error("Unsupported payment method: vantiv Gateway");
|
|
13146
13289
|
}
|
|
13147
13290
|
});
|
|
13148
13291
|
|
|
@@ -13275,13 +13418,63 @@ class VantivGateway {
|
|
|
13275
13418
|
});
|
|
13276
13419
|
}
|
|
13277
13420
|
});
|
|
13278
|
-
}
|
|
13279
13421
|
|
|
13280
|
-
|
|
13422
|
+
_purchaseEcommerceOrder2.set(this, {
|
|
13423
|
+
writable: true,
|
|
13424
|
+
value: (options, callback) => {
|
|
13425
|
+
const {
|
|
13426
|
+
token,
|
|
13427
|
+
items,
|
|
13428
|
+
couponCode,
|
|
13429
|
+
addressId,
|
|
13430
|
+
isExistingSource
|
|
13431
|
+
} = options;
|
|
13432
|
+
const params = isExistingSource ? {
|
|
13433
|
+
source_id: token
|
|
13434
|
+
} : {
|
|
13435
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway3),
|
|
13436
|
+
gateway_token: token
|
|
13437
|
+
};
|
|
13438
|
+
window.Pelcro.ecommerce.order.create({
|
|
13439
|
+
items,
|
|
13440
|
+
coupon_code: couponCode,
|
|
13441
|
+
...params,
|
|
13442
|
+
...(addressId && {
|
|
13443
|
+
address_id: addressId
|
|
13444
|
+
})
|
|
13445
|
+
}, (err, res) => {
|
|
13446
|
+
callback(err, res);
|
|
13447
|
+
});
|
|
13448
|
+
}
|
|
13449
|
+
});
|
|
13281
13450
|
|
|
13282
|
-
|
|
13283
|
-
|
|
13284
|
-
|
|
13451
|
+
_payInvoice3.set(this, {
|
|
13452
|
+
writable: true,
|
|
13453
|
+
value: (options, callback) => {
|
|
13454
|
+
const {
|
|
13455
|
+
token,
|
|
13456
|
+
invoiceId
|
|
13457
|
+
} = options;
|
|
13458
|
+
const params = options.isExistingSource ? {
|
|
13459
|
+
source_id: token,
|
|
13460
|
+
invoice_id: invoiceId
|
|
13461
|
+
} : {
|
|
13462
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway3),
|
|
13463
|
+
gateway_token: token,
|
|
13464
|
+
invoice_id: invoiceId
|
|
13465
|
+
};
|
|
13466
|
+
window.Pelcro.invoice.pay(params, (err, res) => {
|
|
13467
|
+
callback(err, res);
|
|
13468
|
+
});
|
|
13469
|
+
}
|
|
13470
|
+
});
|
|
13471
|
+
}
|
|
13472
|
+
|
|
13473
|
+
}
|
|
13474
|
+
|
|
13475
|
+
/**
|
|
13476
|
+
* @typedef {Object} PaymentStateType
|
|
13477
|
+
* @property {boolean} disableSubmit
|
|
13285
13478
|
* @property {boolean} isLoading
|
|
13286
13479
|
* @property {boolean} disableCouponButton
|
|
13287
13480
|
* @property {object} couponObject
|
|
@@ -13299,7 +13492,7 @@ class VantivGateway {
|
|
|
13299
13492
|
|
|
13300
13493
|
/** @type {PaymentStateType} */
|
|
13301
13494
|
|
|
13302
|
-
const initialState$
|
|
13495
|
+
const initialState$g = {
|
|
13303
13496
|
disableSubmit: false,
|
|
13304
13497
|
isLoading: false,
|
|
13305
13498
|
disableCouponButton: false,
|
|
@@ -13318,10 +13511,10 @@ const initialState$f = {
|
|
|
13318
13511
|
content: ""
|
|
13319
13512
|
}
|
|
13320
13513
|
};
|
|
13321
|
-
const store$
|
|
13514
|
+
const store$g = /*#__PURE__*/createContext(initialState$g);
|
|
13322
13515
|
const {
|
|
13323
|
-
Provider: Provider$
|
|
13324
|
-
} = store$
|
|
13516
|
+
Provider: Provider$g
|
|
13517
|
+
} = store$g;
|
|
13325
13518
|
|
|
13326
13519
|
const PaymentMethodContainerWithoutStripe = ({
|
|
13327
13520
|
style,
|
|
@@ -13367,22 +13560,22 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13367
13560
|
updateTotalAmountWithTax();
|
|
13368
13561
|
}, []);
|
|
13369
13562
|
|
|
13370
|
-
|
|
13371
|
-
if (
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
}
|
|
13375
|
-
|
|
13376
|
-
const orderId = `pelcro-${new Date().getTime()}`; // calls handleVantivPayment
|
|
13563
|
+
const submitVantivPayment = () => {
|
|
13564
|
+
if (selectedPaymentMethodId) {
|
|
13565
|
+
return handleVantivPayment(null);
|
|
13566
|
+
}
|
|
13377
13567
|
|
|
13378
|
-
|
|
13379
|
-
|
|
13380
|
-
orderId: orderId
|
|
13381
|
-
});
|
|
13382
|
-
} else {
|
|
13383
|
-
handleVantivPayment(null);
|
|
13568
|
+
if (!vantivInstanceRef.current) {
|
|
13569
|
+
return console.error("Vantiv sdk script wasn't loaded, you need to load vantiv sdk before rendering the vantiv payment flow");
|
|
13384
13570
|
}
|
|
13385
|
-
|
|
13571
|
+
|
|
13572
|
+
const orderId = `pelcro-${new Date().getTime()}`; // calls handleVantivPayment
|
|
13573
|
+
|
|
13574
|
+
vantivInstanceRef.current.getPaypageRegistrationId({
|
|
13575
|
+
id: orderId,
|
|
13576
|
+
orderId: orderId
|
|
13577
|
+
});
|
|
13578
|
+
};
|
|
13386
13579
|
|
|
13387
13580
|
function handleVantivPayment(paymentRequest) {
|
|
13388
13581
|
if (paymentRequest) {
|
|
@@ -13395,19 +13588,18 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13395
13588
|
}
|
|
13396
13589
|
}
|
|
13397
13590
|
|
|
13398
|
-
const
|
|
13591
|
+
const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
|
|
13399
13592
|
|
|
13400
13593
|
if (type === "createPayment") {
|
|
13401
13594
|
handleVantivSubscription();
|
|
13402
|
-
}
|
|
13403
|
-
|
|
13404
|
-
|
|
13405
|
-
|
|
13406
|
-
|
|
13407
|
-
// }
|
|
13408
|
-
|
|
13595
|
+
} else if (type === "orderCreate") {
|
|
13596
|
+
purchase(new VantivGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, state, dispatch);
|
|
13597
|
+
} else if (type === "invoicePayment") {
|
|
13598
|
+
payInvoice(new VantivGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, dispatch);
|
|
13599
|
+
}
|
|
13409
13600
|
|
|
13410
13601
|
function handleVantivSubscription() {
|
|
13602
|
+
const payment = new Payment(new VantivGateway());
|
|
13411
13603
|
const createSubscription = !isGift && !subscriptionIdToRenew;
|
|
13412
13604
|
const renewSubscription = !isGift && subscriptionIdToRenew;
|
|
13413
13605
|
const giftSubscriprition = isGift && !subscriptionIdToRenew;
|
|
@@ -13415,11 +13607,10 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13415
13607
|
const {
|
|
13416
13608
|
couponCode
|
|
13417
13609
|
} = state;
|
|
13418
|
-
const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
|
|
13419
13610
|
|
|
13420
13611
|
if (renewGift) {
|
|
13421
|
-
return
|
|
13422
|
-
type:
|
|
13612
|
+
return payment.execute({
|
|
13613
|
+
type: PAYMENT_TYPES.RENEW_GIFTED_SUBSCRIPTION,
|
|
13423
13614
|
token: isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest,
|
|
13424
13615
|
plan,
|
|
13425
13616
|
couponCode,
|
|
@@ -13435,8 +13626,8 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13435
13626
|
onSuccess(res);
|
|
13436
13627
|
});
|
|
13437
13628
|
} else if (giftSubscriprition) {
|
|
13438
|
-
return
|
|
13439
|
-
type:
|
|
13629
|
+
return payment.execute({
|
|
13630
|
+
type: PAYMENT_TYPES.CREATE_GIFTED_SUBSCRIPTION,
|
|
13440
13631
|
token: isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest,
|
|
13441
13632
|
quantity: plan.quantity,
|
|
13442
13633
|
plan,
|
|
@@ -13453,8 +13644,8 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13453
13644
|
onSuccess(res);
|
|
13454
13645
|
});
|
|
13455
13646
|
} else if (renewSubscription) {
|
|
13456
|
-
return
|
|
13457
|
-
type:
|
|
13647
|
+
return payment.execute({
|
|
13648
|
+
type: PAYMENT_TYPES.RENEW_SUBSCRIPTION,
|
|
13458
13649
|
token: isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest,
|
|
13459
13650
|
quantity: plan.quantity,
|
|
13460
13651
|
plan,
|
|
@@ -13471,8 +13662,8 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13471
13662
|
onSuccess(res);
|
|
13472
13663
|
});
|
|
13473
13664
|
} else if (createSubscription) {
|
|
13474
|
-
return
|
|
13475
|
-
type:
|
|
13665
|
+
return payment.execute({
|
|
13666
|
+
type: PAYMENT_TYPES.CREATE_SUBSCRIPTION,
|
|
13476
13667
|
token: isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest,
|
|
13477
13668
|
quantity: plan.quantity,
|
|
13478
13669
|
plan,
|
|
@@ -13496,12 +13687,13 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13496
13687
|
const cardProcessor = getSiteCardProcessor();
|
|
13497
13688
|
|
|
13498
13689
|
if (cardProcessor === "vantiv" && !selectedPaymentMethodId) {
|
|
13499
|
-
var _window$Pelcro$site$r;
|
|
13690
|
+
var _window$Pelcro$site$r, _window$Pelcro$site$r2;
|
|
13500
13691
|
|
|
13501
|
-
const payPageId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.
|
|
13692
|
+
const payPageId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings.pay_page_id;
|
|
13693
|
+
const reportGroup = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.vantiv_gateway_settings.report_group;
|
|
13502
13694
|
vantivInstanceRef.current = new window.EprotectIframeClient({
|
|
13503
13695
|
paypageId: payPageId,
|
|
13504
|
-
reportGroup:
|
|
13696
|
+
reportGroup: reportGroup,
|
|
13505
13697
|
style: "pelcro",
|
|
13506
13698
|
height: "245",
|
|
13507
13699
|
timeout: 50000,
|
|
@@ -13590,9 +13782,9 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13590
13782
|
|
|
13591
13783
|
|
|
13592
13784
|
const updateTotalAmountWithTax = () => {
|
|
13593
|
-
var _window$Pelcro$site$
|
|
13785
|
+
var _window$Pelcro$site$r3;
|
|
13594
13786
|
|
|
13595
|
-
const taxesEnabled = (_window$Pelcro$site$
|
|
13787
|
+
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;
|
|
13596
13788
|
|
|
13597
13789
|
if (taxesEnabled && type === "createPayment") {
|
|
13598
13790
|
dispatch({
|
|
@@ -13942,7 +14134,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13942
14134
|
|
|
13943
14135
|
|
|
13944
14136
|
const handlePaypalSubscription = (state, paypalNonce) => {
|
|
13945
|
-
const
|
|
14137
|
+
const payment = new Payment(new PaypalGateway());
|
|
13946
14138
|
const {
|
|
13947
14139
|
couponCode
|
|
13948
14140
|
} = state;
|
|
@@ -13951,8 +14143,8 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13951
14143
|
*/
|
|
13952
14144
|
|
|
13953
14145
|
if (giftRecipient) {
|
|
13954
|
-
return
|
|
13955
|
-
type:
|
|
14146
|
+
return payment.execute({
|
|
14147
|
+
type: PAYMENT_TYPES.CREATE_GIFTED_SUBSCRIPTION,
|
|
13956
14148
|
token: paypalNonce,
|
|
13957
14149
|
quantity: plan.quantity,
|
|
13958
14150
|
plan,
|
|
@@ -13985,8 +14177,8 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13985
14177
|
});
|
|
13986
14178
|
}
|
|
13987
14179
|
|
|
13988
|
-
return
|
|
13989
|
-
type:
|
|
14180
|
+
return payment.execute({
|
|
14181
|
+
type: PAYMENT_TYPES.CREATE_SUBSCRIPTION,
|
|
13990
14182
|
token: paypalNonce,
|
|
13991
14183
|
quantity: plan.quantity,
|
|
13992
14184
|
plan,
|
|
@@ -14018,7 +14210,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
14018
14210
|
});
|
|
14019
14211
|
};
|
|
14020
14212
|
|
|
14021
|
-
const purchase = (
|
|
14213
|
+
const purchase = (gatewayService, gatewayToken, state, dispatch) => {
|
|
14022
14214
|
const isQuickPurchase = !Array.isArray(order);
|
|
14023
14215
|
const mappedOrderItems = isQuickPurchase ? [{
|
|
14024
14216
|
sku_id: order.id,
|
|
@@ -14030,14 +14222,14 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
14030
14222
|
const {
|
|
14031
14223
|
couponCode
|
|
14032
14224
|
} = state;
|
|
14033
|
-
|
|
14034
|
-
|
|
14035
|
-
|
|
14225
|
+
const payment = new Payment(gatewayService);
|
|
14226
|
+
payment.execute({
|
|
14227
|
+
type: PAYMENT_TYPES.PURCHASE_ECOMMERCE_ORDER,
|
|
14228
|
+
token: gatewayToken,
|
|
14229
|
+
isExistingSource: Boolean(selectedPaymentMethodId),
|
|
14036
14230
|
items: mappedOrderItems,
|
|
14037
|
-
|
|
14038
|
-
|
|
14039
|
-
address_id: selectedAddressId
|
|
14040
|
-
})
|
|
14231
|
+
addressId: selectedAddressId,
|
|
14232
|
+
couponCode
|
|
14041
14233
|
}, (err, res) => {
|
|
14042
14234
|
dispatch({
|
|
14043
14235
|
type: DISABLE_SUBMIT,
|
|
@@ -14075,9 +14267,9 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
14075
14267
|
};
|
|
14076
14268
|
|
|
14077
14269
|
const payInvoice = (gatewayService, gatewayToken, dispatch) => {
|
|
14078
|
-
const
|
|
14079
|
-
return
|
|
14080
|
-
type:
|
|
14270
|
+
const payment = new Payment(gatewayService);
|
|
14271
|
+
return payment.execute({
|
|
14272
|
+
type: PAYMENT_TYPES.PAY_INVOICE,
|
|
14081
14273
|
token: gatewayToken,
|
|
14082
14274
|
isExistingSource: Boolean(selectedPaymentMethodId),
|
|
14083
14275
|
invoiceId: invoice.id
|
|
@@ -14237,13 +14429,13 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
14237
14429
|
|
|
14238
14430
|
|
|
14239
14431
|
const resolveTaxCalculation = () => {
|
|
14240
|
-
var _window$Pelcro$site$
|
|
14432
|
+
var _window$Pelcro$site$r4;
|
|
14241
14433
|
|
|
14242
14434
|
if (type === "invoicePayment") {
|
|
14243
14435
|
return new Promise(resolve => resolve());
|
|
14244
14436
|
}
|
|
14245
14437
|
|
|
14246
|
-
const taxesEnabled = (_window$Pelcro$site$
|
|
14438
|
+
const taxesEnabled = (_window$Pelcro$site$r4 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r4 === void 0 ? void 0 : _window$Pelcro$site$r4.taxes_enabled;
|
|
14247
14439
|
return new Promise((resolve, reject) => {
|
|
14248
14440
|
// resolve early if taxes isn't enabled
|
|
14249
14441
|
if (!taxesEnabled) {
|
|
@@ -14315,7 +14507,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
14315
14507
|
if (stripeSource && type === "createPayment") {
|
|
14316
14508
|
subscribe(stripeSource, state, dispatch);
|
|
14317
14509
|
} else if (stripeSource && type === "orderCreate") {
|
|
14318
|
-
purchase(stripeSource, state, dispatch);
|
|
14510
|
+
purchase(new StripeGateway(), stripeSource.id, state, dispatch);
|
|
14319
14511
|
} else if (stripeSource && type === "invoicePayment") {
|
|
14320
14512
|
payInvoice(new StripeGateway(), stripeSource.id, dispatch);
|
|
14321
14513
|
}
|
|
@@ -14521,21 +14713,21 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
14521
14713
|
default:
|
|
14522
14714
|
return state;
|
|
14523
14715
|
}
|
|
14524
|
-
}, initialState$
|
|
14716
|
+
}, initialState$g);
|
|
14525
14717
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
14526
14718
|
style: { ...style
|
|
14527
14719
|
},
|
|
14528
14720
|
className: `pelcro-container pelcro-payment-container ${className}`
|
|
14529
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
14721
|
+
}, /*#__PURE__*/React__default.createElement(Provider$g, {
|
|
14530
14722
|
value: {
|
|
14531
14723
|
state,
|
|
14532
14724
|
dispatch
|
|
14533
14725
|
}
|
|
14534
14726
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
14535
|
-
store: store$
|
|
14727
|
+
store: store$g,
|
|
14536
14728
|
key: i
|
|
14537
14729
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
14538
|
-
store: store$
|
|
14730
|
+
store: store$g
|
|
14539
14731
|
})));
|
|
14540
14732
|
};
|
|
14541
14733
|
|
|
@@ -14557,7 +14749,7 @@ const PaymentMethodContainer = props => {
|
|
|
14557
14749
|
stripeAccount: window.Pelcro.site.read().account_id,
|
|
14558
14750
|
locale: getPageOrDefaultLanguage()
|
|
14559
14751
|
}, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
|
|
14560
|
-
store: store$
|
|
14752
|
+
store: store$g
|
|
14561
14753
|
}, props))));
|
|
14562
14754
|
}
|
|
14563
14755
|
|
|
@@ -14610,7 +14802,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
14610
14802
|
currentPlan,
|
|
14611
14803
|
updatedPrice
|
|
14612
14804
|
}
|
|
14613
|
-
} = useContext(store$
|
|
14805
|
+
} = useContext(store$g);
|
|
14614
14806
|
|
|
14615
14807
|
const updatePaymentRequest = () => {
|
|
14616
14808
|
// Make sure payment request is up to date, eg. user added a coupon code.
|
|
@@ -14686,7 +14878,7 @@ const DiscountedPrice = props => {
|
|
|
14686
14878
|
taxAmount,
|
|
14687
14879
|
percentOff
|
|
14688
14880
|
}
|
|
14689
|
-
} = useContext(store$
|
|
14881
|
+
} = useContext(store$g);
|
|
14690
14882
|
const {
|
|
14691
14883
|
order,
|
|
14692
14884
|
plan
|
|
@@ -14736,7 +14928,7 @@ const SubmitPaymentMethod = ({
|
|
|
14736
14928
|
isLoading,
|
|
14737
14929
|
updatedPrice
|
|
14738
14930
|
}
|
|
14739
|
-
} = useContext(store$
|
|
14931
|
+
} = useContext(store$g);
|
|
14740
14932
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
14741
14933
|
const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
|
|
14742
14934
|
const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -14757,17 +14949,17 @@ const SubmitPaymentMethod = ({
|
|
|
14757
14949
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
14758
14950
|
};
|
|
14759
14951
|
|
|
14760
|
-
var _path$
|
|
14952
|
+
var _path$n;
|
|
14761
14953
|
|
|
14762
|
-
function _extends$
|
|
14954
|
+
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); }
|
|
14763
14955
|
|
|
14764
14956
|
function SvgArrowLeft(props) {
|
|
14765
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14957
|
+
return /*#__PURE__*/React.createElement("svg", _extends$p({
|
|
14766
14958
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14767
14959
|
fill: "none",
|
|
14768
14960
|
viewBox: "0 0 24 24",
|
|
14769
14961
|
stroke: "currentColor"
|
|
14770
|
-
}, props), _path$
|
|
14962
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
|
|
14771
14963
|
strokeLinecap: "round",
|
|
14772
14964
|
strokeLinejoin: "round",
|
|
14773
14965
|
strokeWidth: 2,
|
|
@@ -14786,7 +14978,7 @@ const ApplyCouponButton = ({
|
|
|
14786
14978
|
disableCouponButton
|
|
14787
14979
|
},
|
|
14788
14980
|
dispatch
|
|
14789
|
-
} = useContext(store$
|
|
14981
|
+
} = useContext(store$g);
|
|
14790
14982
|
const {
|
|
14791
14983
|
t
|
|
14792
14984
|
} = useTranslation("checkoutForm");
|
|
@@ -14820,7 +15012,7 @@ const CouponCodeField = props => {
|
|
|
14820
15012
|
couponCode,
|
|
14821
15013
|
couponError
|
|
14822
15014
|
}
|
|
14823
|
-
} = useContext(store$
|
|
15015
|
+
} = useContext(store$g);
|
|
14824
15016
|
|
|
14825
15017
|
const onCouponCodeChange = e => {
|
|
14826
15018
|
dispatch({
|
|
@@ -14849,17 +15041,17 @@ const CouponCodeField = props => {
|
|
|
14849
15041
|
}, props));
|
|
14850
15042
|
};
|
|
14851
15043
|
|
|
14852
|
-
var _path$
|
|
15044
|
+
var _path$m;
|
|
14853
15045
|
|
|
14854
|
-
function _extends$
|
|
15046
|
+
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); }
|
|
14855
15047
|
|
|
14856
15048
|
function SvgTicket(props) {
|
|
14857
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
15049
|
+
return /*#__PURE__*/React.createElement("svg", _extends$o({
|
|
14858
15050
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14859
15051
|
fill: "none",
|
|
14860
15052
|
viewBox: "0 0 24 24",
|
|
14861
15053
|
stroke: "currentColor"
|
|
14862
|
-
}, props), _path$
|
|
15054
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
|
|
14863
15055
|
strokeLinecap: "round",
|
|
14864
15056
|
strokeLinejoin: "round",
|
|
14865
15057
|
strokeWidth: 2,
|
|
@@ -14876,7 +15068,7 @@ const CouponCode = ({
|
|
|
14876
15068
|
state: {
|
|
14877
15069
|
enableCouponField
|
|
14878
15070
|
}
|
|
14879
|
-
} = useContext(store$
|
|
15071
|
+
} = useContext(store$g);
|
|
14880
15072
|
const {
|
|
14881
15073
|
t
|
|
14882
15074
|
} = useTranslation("checkoutForm");
|
|
@@ -15133,7 +15325,7 @@ const PaypalSubscribeButton = props => {
|
|
|
15133
15325
|
const {
|
|
15134
15326
|
dispatch,
|
|
15135
15327
|
state
|
|
15136
|
-
} = useContext(store$
|
|
15328
|
+
} = useContext(store$g);
|
|
15137
15329
|
const {
|
|
15138
15330
|
product,
|
|
15139
15331
|
plan,
|
|
@@ -15219,16 +15411,16 @@ const BankRedirection = () => {
|
|
|
15219
15411
|
}));
|
|
15220
15412
|
};
|
|
15221
15413
|
|
|
15222
|
-
var _path$
|
|
15414
|
+
var _path$l;
|
|
15223
15415
|
|
|
15224
|
-
function _extends$
|
|
15416
|
+
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); }
|
|
15225
15417
|
|
|
15226
15418
|
function SvgLock(props) {
|
|
15227
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
15419
|
+
return /*#__PURE__*/React.createElement("svg", _extends$n({
|
|
15228
15420
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15229
15421
|
viewBox: "0 0 20 20",
|
|
15230
15422
|
fill: "currentColor"
|
|
15231
|
-
}, props), _path$
|
|
15423
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
|
|
15232
15424
|
fillRule: "evenodd",
|
|
15233
15425
|
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",
|
|
15234
15426
|
clipRule: "evenodd"
|
|
@@ -15245,7 +15437,7 @@ const SelectedPaymentMethod = () => {
|
|
|
15245
15437
|
state: {
|
|
15246
15438
|
isLoading
|
|
15247
15439
|
}
|
|
15248
|
-
} = useContext(store$
|
|
15440
|
+
} = useContext(store$g);
|
|
15249
15441
|
const {
|
|
15250
15442
|
switchView,
|
|
15251
15443
|
selectedPaymentMethodId
|
|
@@ -15287,7 +15479,7 @@ const TaxAmount = () => {
|
|
|
15287
15479
|
state: {
|
|
15288
15480
|
taxAmount
|
|
15289
15481
|
}
|
|
15290
|
-
} = useContext(store$
|
|
15482
|
+
} = useContext(store$g);
|
|
15291
15483
|
const {
|
|
15292
15484
|
plan
|
|
15293
15485
|
} = usePelcro();
|
|
@@ -15451,12 +15643,12 @@ function SubscriptionRenewModal({
|
|
|
15451
15643
|
}
|
|
15452
15644
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
15453
15645
|
|
|
15454
|
-
var _path$
|
|
15646
|
+
var _path$k;
|
|
15455
15647
|
|
|
15456
|
-
function _extends$
|
|
15648
|
+
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); }
|
|
15457
15649
|
|
|
15458
15650
|
function SvgGift(props) {
|
|
15459
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
15651
|
+
return /*#__PURE__*/React.createElement("svg", _extends$m({
|
|
15460
15652
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
15461
15653
|
fill: "none",
|
|
15462
15654
|
stroke: "currentColor",
|
|
@@ -15465,7 +15657,7 @@ function SvgGift(props) {
|
|
|
15465
15657
|
strokeWidth: 2,
|
|
15466
15658
|
viewBox: "0 0 24 24",
|
|
15467
15659
|
xmlns: "http://www.w3.org/2000/svg"
|
|
15468
|
-
}, props), _path$
|
|
15660
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
|
|
15469
15661
|
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"
|
|
15470
15662
|
})));
|
|
15471
15663
|
}
|
|
@@ -15806,7 +15998,7 @@ class DefaultNewsLetter extends Component {
|
|
|
15806
15998
|
|
|
15807
15999
|
const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
|
|
15808
16000
|
|
|
15809
|
-
const initialState$
|
|
16001
|
+
const initialState$f = {
|
|
15810
16002
|
didSubToNewslettersBefore: false,
|
|
15811
16003
|
newsletters: [],
|
|
15812
16004
|
isListLoading: true,
|
|
@@ -15816,10 +16008,10 @@ const initialState$e = {
|
|
|
15816
16008
|
content: ""
|
|
15817
16009
|
}
|
|
15818
16010
|
};
|
|
15819
|
-
const store$
|
|
16011
|
+
const store$f = /*#__PURE__*/createContext(initialState$f);
|
|
15820
16012
|
const {
|
|
15821
|
-
Provider: Provider$
|
|
15822
|
-
} = store$
|
|
16013
|
+
Provider: Provider$f
|
|
16014
|
+
} = store$f;
|
|
15823
16015
|
|
|
15824
16016
|
const NewsletterUpdateContainer = ({
|
|
15825
16017
|
style,
|
|
@@ -15932,7 +16124,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15932
16124
|
default:
|
|
15933
16125
|
return state;
|
|
15934
16126
|
}
|
|
15935
|
-
}, initialState$
|
|
16127
|
+
}, initialState$f);
|
|
15936
16128
|
useEffect(() => {
|
|
15937
16129
|
const getUserNewsletters = () => {
|
|
15938
16130
|
var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
|
|
@@ -15976,7 +16168,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15976
16168
|
style: { ...style
|
|
15977
16169
|
},
|
|
15978
16170
|
className: `pelcro-container pelcro-newsletter-update-container ${className}`
|
|
15979
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
16171
|
+
}, /*#__PURE__*/React__default.createElement(Provider$f, {
|
|
15980
16172
|
value: {
|
|
15981
16173
|
state,
|
|
15982
16174
|
dispatch
|
|
@@ -15984,12 +16176,12 @@ const NewsletterUpdateContainer = ({
|
|
|
15984
16176
|
}, children.length ? children.map((child, i) => {
|
|
15985
16177
|
if (child) {
|
|
15986
16178
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
15987
|
-
store: store$
|
|
16179
|
+
store: store$f,
|
|
15988
16180
|
key: i
|
|
15989
16181
|
});
|
|
15990
16182
|
}
|
|
15991
16183
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
15992
|
-
store: store$
|
|
16184
|
+
store: store$f
|
|
15993
16185
|
})));
|
|
15994
16186
|
};
|
|
15995
16187
|
|
|
@@ -16004,7 +16196,7 @@ const NewsletterUpdateButton = ({
|
|
|
16004
16196
|
isSubmitting,
|
|
16005
16197
|
isListLoading
|
|
16006
16198
|
}
|
|
16007
|
-
} = useContext(store$
|
|
16199
|
+
} = useContext(store$f);
|
|
16008
16200
|
const {
|
|
16009
16201
|
t
|
|
16010
16202
|
} = useTranslation("newsletter");
|
|
@@ -16034,7 +16226,7 @@ const NewsletterUpdateList = () => {
|
|
|
16034
16226
|
newsletters,
|
|
16035
16227
|
isListLoading
|
|
16036
16228
|
}
|
|
16037
|
-
} = useContext(store$
|
|
16229
|
+
} = useContext(store$f);
|
|
16038
16230
|
|
|
16039
16231
|
if (isListLoading) {
|
|
16040
16232
|
return /*#__PURE__*/React__default.createElement(Loader, {
|
|
@@ -16238,7 +16430,7 @@ function SubscriptionCreateModal({
|
|
|
16238
16430
|
SubscriptionCreateModal.viewId = "subscription-create";
|
|
16239
16431
|
|
|
16240
16432
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
16241
|
-
const initialState$
|
|
16433
|
+
const initialState$e = {
|
|
16242
16434
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
16243
16435
|
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
16244
16436
|
lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
|
|
@@ -16251,10 +16443,10 @@ const initialState$d = {
|
|
|
16251
16443
|
content: ""
|
|
16252
16444
|
}
|
|
16253
16445
|
};
|
|
16254
|
-
const store$
|
|
16446
|
+
const store$e = /*#__PURE__*/createContext(initialState$e);
|
|
16255
16447
|
const {
|
|
16256
|
-
Provider: Provider$
|
|
16257
|
-
} = store$
|
|
16448
|
+
Provider: Provider$e
|
|
16449
|
+
} = store$e;
|
|
16258
16450
|
|
|
16259
16451
|
const UserUpdateContainer = ({
|
|
16260
16452
|
style,
|
|
@@ -16386,27 +16578,27 @@ const UserUpdateContainer = ({
|
|
|
16386
16578
|
default:
|
|
16387
16579
|
return state;
|
|
16388
16580
|
}
|
|
16389
|
-
}, initialState$
|
|
16581
|
+
}, initialState$e);
|
|
16390
16582
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
16391
16583
|
style: { ...style
|
|
16392
16584
|
},
|
|
16393
16585
|
className: `pelcro-container pelcro-user-update-container ${className}`
|
|
16394
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
16586
|
+
}, /*#__PURE__*/React__default.createElement(Provider$e, {
|
|
16395
16587
|
value: {
|
|
16396
16588
|
state,
|
|
16397
16589
|
dispatch
|
|
16398
16590
|
}
|
|
16399
16591
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
16400
|
-
store: store$
|
|
16592
|
+
store: store$e,
|
|
16401
16593
|
key: i
|
|
16402
16594
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
16403
|
-
store: store$
|
|
16595
|
+
store: store$e
|
|
16404
16596
|
})));
|
|
16405
16597
|
};
|
|
16406
16598
|
|
|
16407
16599
|
const UserUpdateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
16408
16600
|
disabled: true,
|
|
16409
|
-
store: store$
|
|
16601
|
+
store: store$e
|
|
16410
16602
|
}, props));
|
|
16411
16603
|
|
|
16412
16604
|
const UserUpdateButton = ({
|
|
@@ -16419,7 +16611,7 @@ const UserUpdateButton = ({
|
|
|
16419
16611
|
buttonDisabled
|
|
16420
16612
|
},
|
|
16421
16613
|
dispatch
|
|
16422
|
-
} = useContext(store$
|
|
16614
|
+
} = useContext(store$e);
|
|
16423
16615
|
const {
|
|
16424
16616
|
t
|
|
16425
16617
|
} = useTranslation("userEdit");
|
|
@@ -16436,11 +16628,11 @@ const UserUpdateButton = ({
|
|
|
16436
16628
|
};
|
|
16437
16629
|
|
|
16438
16630
|
const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
16439
|
-
store: store$
|
|
16631
|
+
store: store$e
|
|
16440
16632
|
}, props));
|
|
16441
16633
|
|
|
16442
16634
|
const UserUpdateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
16443
|
-
store: store$
|
|
16635
|
+
store: store$e
|
|
16444
16636
|
}, props));
|
|
16445
16637
|
|
|
16446
16638
|
function Phone({
|
|
@@ -16469,22 +16661,22 @@ function Phone({
|
|
|
16469
16661
|
}
|
|
16470
16662
|
|
|
16471
16663
|
const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
|
|
16472
|
-
store: store$
|
|
16664
|
+
store: store$e
|
|
16473
16665
|
}, props));
|
|
16474
16666
|
|
|
16475
16667
|
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";
|
|
16476
16668
|
|
|
16477
|
-
var _path$
|
|
16669
|
+
var _path$j;
|
|
16478
16670
|
|
|
16479
|
-
function _extends$
|
|
16671
|
+
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); }
|
|
16480
16672
|
|
|
16481
16673
|
function SvgEdit(props) {
|
|
16482
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
16674
|
+
return /*#__PURE__*/React.createElement("svg", _extends$l({
|
|
16483
16675
|
className: "plc-w-6 plc-h-6",
|
|
16484
16676
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16485
16677
|
viewBox: "0 0 20 20",
|
|
16486
16678
|
fill: "currentColor"
|
|
16487
|
-
}, props), _path$
|
|
16679
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
|
|
16488
16680
|
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"
|
|
16489
16681
|
})));
|
|
16490
16682
|
}
|
|
@@ -16616,16 +16808,16 @@ function DisplayName({
|
|
|
16616
16808
|
}
|
|
16617
16809
|
|
|
16618
16810
|
const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
|
|
16619
|
-
store: store$
|
|
16811
|
+
store: store$e
|
|
16620
16812
|
}, props));
|
|
16621
16813
|
|
|
16622
16814
|
const UserUpdateTextInput = props => {
|
|
16623
16815
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
16624
|
-
store: store$
|
|
16816
|
+
store: store$e
|
|
16625
16817
|
}));
|
|
16626
16818
|
};
|
|
16627
16819
|
|
|
16628
|
-
const initialState$
|
|
16820
|
+
const initialState$d = {
|
|
16629
16821
|
isSubmitting: false,
|
|
16630
16822
|
firstName: "",
|
|
16631
16823
|
firstNameError: "",
|
|
@@ -16650,10 +16842,10 @@ const initialState$c = {
|
|
|
16650
16842
|
content: ""
|
|
16651
16843
|
}
|
|
16652
16844
|
};
|
|
16653
|
-
const store$
|
|
16845
|
+
const store$d = /*#__PURE__*/createContext(initialState$d);
|
|
16654
16846
|
const {
|
|
16655
|
-
Provider: Provider$
|
|
16656
|
-
} = store$
|
|
16847
|
+
Provider: Provider$d
|
|
16848
|
+
} = store$d;
|
|
16657
16849
|
|
|
16658
16850
|
const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
|
|
16659
16851
|
|
|
@@ -16860,7 +17052,7 @@ const AddressCreateContainer = ({
|
|
|
16860
17052
|
default:
|
|
16861
17053
|
return state;
|
|
16862
17054
|
}
|
|
16863
|
-
}, initialState$
|
|
17055
|
+
}, initialState$d);
|
|
16864
17056
|
useEffect(() => {
|
|
16865
17057
|
const getStates = () => {
|
|
16866
17058
|
dispatch({
|
|
@@ -16892,16 +17084,16 @@ const AddressCreateContainer = ({
|
|
|
16892
17084
|
style: { ...style
|
|
16893
17085
|
},
|
|
16894
17086
|
className: `pelcro-container pelcro-address-create-container ${className}`
|
|
16895
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
17087
|
+
}, /*#__PURE__*/React__default.createElement(Provider$d, {
|
|
16896
17088
|
value: {
|
|
16897
17089
|
state,
|
|
16898
17090
|
dispatch
|
|
16899
17091
|
}
|
|
16900
17092
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
16901
|
-
store: store$
|
|
17093
|
+
store: store$d,
|
|
16902
17094
|
key: i
|
|
16903
17095
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
16904
|
-
store: store$
|
|
17096
|
+
store: store$d
|
|
16905
17097
|
})));
|
|
16906
17098
|
};
|
|
16907
17099
|
|
|
@@ -16912,7 +17104,7 @@ function AddressCreateFirstName(props) {
|
|
|
16912
17104
|
firstName,
|
|
16913
17105
|
firstNameError
|
|
16914
17106
|
}
|
|
16915
|
-
} = useContext(store$
|
|
17107
|
+
} = useContext(store$d);
|
|
16916
17108
|
|
|
16917
17109
|
const handleBlur = () => {
|
|
16918
17110
|
return dispatch({
|
|
@@ -16955,7 +17147,7 @@ function AddressCreateLastName(props) {
|
|
|
16955
17147
|
lastName,
|
|
16956
17148
|
lastNameError
|
|
16957
17149
|
}
|
|
16958
|
-
} = useContext(store$
|
|
17150
|
+
} = useContext(store$d);
|
|
16959
17151
|
|
|
16960
17152
|
const handleBlur = () => {
|
|
16961
17153
|
return dispatch({
|
|
@@ -16998,7 +17190,7 @@ function AddressCreateLine1(props) {
|
|
|
16998
17190
|
line1,
|
|
16999
17191
|
line1Error
|
|
17000
17192
|
}
|
|
17001
|
-
} = useContext(store$
|
|
17193
|
+
} = useContext(store$d);
|
|
17002
17194
|
|
|
17003
17195
|
const handleBlur = () => {
|
|
17004
17196
|
return dispatch({
|
|
@@ -17041,7 +17233,7 @@ function AddressCreateCity(props) {
|
|
|
17041
17233
|
city,
|
|
17042
17234
|
cityError
|
|
17043
17235
|
}
|
|
17044
|
-
} = useContext(store$
|
|
17236
|
+
} = useContext(store$d);
|
|
17045
17237
|
|
|
17046
17238
|
const handleBlur = () => {
|
|
17047
17239
|
return dispatch({
|
|
@@ -17084,7 +17276,7 @@ function AddressCreatePostalCode(props) {
|
|
|
17084
17276
|
postalCode,
|
|
17085
17277
|
postalCodeError
|
|
17086
17278
|
}
|
|
17087
|
-
} = useContext(store$
|
|
17279
|
+
} = useContext(store$d);
|
|
17088
17280
|
|
|
17089
17281
|
const handleBlur = () => {
|
|
17090
17282
|
return dispatch({
|
|
@@ -17130,7 +17322,7 @@ const AddressCreateSubmit = ({
|
|
|
17130
17322
|
state: {
|
|
17131
17323
|
isSubmitting
|
|
17132
17324
|
}
|
|
17133
|
-
} = useContext(store$
|
|
17325
|
+
} = useContext(store$d);
|
|
17134
17326
|
const {
|
|
17135
17327
|
t
|
|
17136
17328
|
} = useTranslation("address");
|
|
@@ -17241,7 +17433,7 @@ function CountrySelect({
|
|
|
17241
17433
|
}
|
|
17242
17434
|
|
|
17243
17435
|
const AddressCreateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
|
|
17244
|
-
store: store$
|
|
17436
|
+
store: store$d
|
|
17245
17437
|
}, props));
|
|
17246
17438
|
|
|
17247
17439
|
function StateSelect({
|
|
@@ -17329,7 +17521,7 @@ function StateSelect({
|
|
|
17329
17521
|
}
|
|
17330
17522
|
|
|
17331
17523
|
const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
|
|
17332
|
-
store: store$
|
|
17524
|
+
store: store$d
|
|
17333
17525
|
}, props));
|
|
17334
17526
|
|
|
17335
17527
|
const AddressCreateView = props => {
|
|
@@ -17434,18 +17626,18 @@ AddressCreateModal.viewId = "address-create";
|
|
|
17434
17626
|
|
|
17435
17627
|
const AddressCreateTextInput = props => {
|
|
17436
17628
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
17437
|
-
store: store$
|
|
17629
|
+
store: store$d
|
|
17438
17630
|
}));
|
|
17439
17631
|
};
|
|
17440
17632
|
|
|
17441
17633
|
const AddressCreateLine2 = props => {
|
|
17442
17634
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
|
|
17443
17635
|
fieldName: "line2",
|
|
17444
|
-
store: store$
|
|
17636
|
+
store: store$d
|
|
17445
17637
|
}, props));
|
|
17446
17638
|
};
|
|
17447
17639
|
|
|
17448
|
-
const initialState$
|
|
17640
|
+
const initialState$c = {
|
|
17449
17641
|
isSubmitting: false,
|
|
17450
17642
|
firstName: "",
|
|
17451
17643
|
firstNameError: "",
|
|
@@ -17470,10 +17662,10 @@ const initialState$b = {
|
|
|
17470
17662
|
content: ""
|
|
17471
17663
|
}
|
|
17472
17664
|
};
|
|
17473
|
-
const store$
|
|
17665
|
+
const store$c = /*#__PURE__*/createContext(initialState$c);
|
|
17474
17666
|
const {
|
|
17475
|
-
Provider: Provider$
|
|
17476
|
-
} = store$
|
|
17667
|
+
Provider: Provider$c
|
|
17668
|
+
} = store$c;
|
|
17477
17669
|
|
|
17478
17670
|
const AddressUpdateContainer = ({
|
|
17479
17671
|
style,
|
|
@@ -17525,7 +17717,7 @@ const AddressUpdateContainer = ({
|
|
|
17525
17717
|
const thisAddress = addresses[address];
|
|
17526
17718
|
|
|
17527
17719
|
if (+thisAddress.id === +addressId) {
|
|
17528
|
-
const newState = { ...initialState$
|
|
17720
|
+
const newState = { ...initialState$c,
|
|
17529
17721
|
firstName: thisAddress.first_name,
|
|
17530
17722
|
lastName: thisAddress.last_name,
|
|
17531
17723
|
line1: thisAddress.line1,
|
|
@@ -17658,7 +17850,7 @@ const AddressUpdateContainer = ({
|
|
|
17658
17850
|
default:
|
|
17659
17851
|
return state;
|
|
17660
17852
|
}
|
|
17661
|
-
}, initialState$
|
|
17853
|
+
}, initialState$c);
|
|
17662
17854
|
useEffect(() => {
|
|
17663
17855
|
const getStates = () => {
|
|
17664
17856
|
dispatch({
|
|
@@ -17690,21 +17882,21 @@ const AddressUpdateContainer = ({
|
|
|
17690
17882
|
style: { ...style
|
|
17691
17883
|
},
|
|
17692
17884
|
className: `pelcro-container pelcro-address-update-container ${className}`
|
|
17693
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
17885
|
+
}, /*#__PURE__*/React__default.createElement(Provider$c, {
|
|
17694
17886
|
value: {
|
|
17695
17887
|
state,
|
|
17696
17888
|
dispatch
|
|
17697
17889
|
}
|
|
17698
17890
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
17699
|
-
store: store$
|
|
17891
|
+
store: store$c,
|
|
17700
17892
|
key: i
|
|
17701
17893
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
17702
|
-
store: store$
|
|
17894
|
+
store: store$c
|
|
17703
17895
|
})));
|
|
17704
17896
|
};
|
|
17705
17897
|
|
|
17706
17898
|
const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
|
|
17707
|
-
store: store$
|
|
17899
|
+
store: store$c
|
|
17708
17900
|
}, props));
|
|
17709
17901
|
|
|
17710
17902
|
function AddressUpdateFirstName(props) {
|
|
@@ -17714,7 +17906,7 @@ function AddressUpdateFirstName(props) {
|
|
|
17714
17906
|
firstName,
|
|
17715
17907
|
firstNameError
|
|
17716
17908
|
}
|
|
17717
|
-
} = useContext(store$
|
|
17909
|
+
} = useContext(store$c);
|
|
17718
17910
|
|
|
17719
17911
|
const handleBlur = () => {
|
|
17720
17912
|
return dispatch({
|
|
@@ -17757,7 +17949,7 @@ function AddressUpdateLastName(props) {
|
|
|
17757
17949
|
lastName,
|
|
17758
17950
|
lastNameError
|
|
17759
17951
|
}
|
|
17760
|
-
} = useContext(store$
|
|
17952
|
+
} = useContext(store$c);
|
|
17761
17953
|
|
|
17762
17954
|
const handleBlur = () => {
|
|
17763
17955
|
return dispatch({
|
|
@@ -17800,7 +17992,7 @@ function AddressUpdateLine1(props) {
|
|
|
17800
17992
|
line1,
|
|
17801
17993
|
line1Error
|
|
17802
17994
|
}
|
|
17803
|
-
} = useContext(store$
|
|
17995
|
+
} = useContext(store$c);
|
|
17804
17996
|
|
|
17805
17997
|
const handleBlur = () => {
|
|
17806
17998
|
return dispatch({
|
|
@@ -17840,7 +18032,7 @@ const AddressUpdateLine2 = props => {
|
|
|
17840
18032
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
|
|
17841
18033
|
fieldName: "line2"
|
|
17842
18034
|
}, props, {
|
|
17843
|
-
store: store$
|
|
18035
|
+
store: store$c
|
|
17844
18036
|
}));
|
|
17845
18037
|
};
|
|
17846
18038
|
|
|
@@ -17851,7 +18043,7 @@ function AddressUpdateCity(props) {
|
|
|
17851
18043
|
city,
|
|
17852
18044
|
cityError
|
|
17853
18045
|
}
|
|
17854
|
-
} = useContext(store$
|
|
18046
|
+
} = useContext(store$c);
|
|
17855
18047
|
|
|
17856
18048
|
const handleBlur = () => {
|
|
17857
18049
|
return dispatch({
|
|
@@ -17894,7 +18086,7 @@ function AddressUpdatePostalCode(props) {
|
|
|
17894
18086
|
postalCode,
|
|
17895
18087
|
postalCodeError
|
|
17896
18088
|
}
|
|
17897
|
-
} = useContext(store$
|
|
18089
|
+
} = useContext(store$c);
|
|
17898
18090
|
|
|
17899
18091
|
const handleBlur = () => {
|
|
17900
18092
|
return dispatch({
|
|
@@ -17940,7 +18132,7 @@ const AddressUpdateSubmit = ({
|
|
|
17940
18132
|
state: {
|
|
17941
18133
|
isSubmitting
|
|
17942
18134
|
}
|
|
17943
|
-
} = useContext(store$
|
|
18135
|
+
} = useContext(store$c);
|
|
17944
18136
|
const {
|
|
17945
18137
|
t
|
|
17946
18138
|
} = useTranslation("address");
|
|
@@ -17956,7 +18148,7 @@ const AddressUpdateSubmit = ({
|
|
|
17956
18148
|
};
|
|
17957
18149
|
|
|
17958
18150
|
const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
|
|
17959
|
-
store: store$
|
|
18151
|
+
store: store$c
|
|
17960
18152
|
}, props));
|
|
17961
18153
|
|
|
17962
18154
|
const AddressUpdateView = props => {
|
|
@@ -18039,7 +18231,7 @@ AddressUpdateModal.viewId = "address-edit";
|
|
|
18039
18231
|
|
|
18040
18232
|
const AddressUpdateTextInput = props => {
|
|
18041
18233
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
18042
|
-
store: store$
|
|
18234
|
+
store: store$c
|
|
18043
18235
|
}));
|
|
18044
18236
|
};
|
|
18045
18237
|
|
|
@@ -18122,7 +18314,7 @@ const PaymentMethodUpdateModal = props => {
|
|
|
18122
18314
|
};
|
|
18123
18315
|
PaymentMethodUpdateModal.viewId = "payment-method-update";
|
|
18124
18316
|
|
|
18125
|
-
const initialState$
|
|
18317
|
+
const initialState$b = {
|
|
18126
18318
|
email: "",
|
|
18127
18319
|
password: "",
|
|
18128
18320
|
passwordError: null,
|
|
@@ -18135,10 +18327,10 @@ const initialState$a = {
|
|
|
18135
18327
|
content: ""
|
|
18136
18328
|
}
|
|
18137
18329
|
};
|
|
18138
|
-
const store$
|
|
18330
|
+
const store$b = /*#__PURE__*/createContext(initialState$b);
|
|
18139
18331
|
const {
|
|
18140
|
-
Provider: Provider$
|
|
18141
|
-
} = store$
|
|
18332
|
+
Provider: Provider$b
|
|
18333
|
+
} = store$b;
|
|
18142
18334
|
|
|
18143
18335
|
const PasswordResetContainer = ({
|
|
18144
18336
|
style,
|
|
@@ -18195,7 +18387,7 @@ const PasswordResetContainer = ({
|
|
|
18195
18387
|
type: SET_EMAIL,
|
|
18196
18388
|
payload: window.Pelcro.helpers.getURLParameter("email")
|
|
18197
18389
|
});
|
|
18198
|
-
initialState$
|
|
18390
|
+
initialState$b.email = window.Pelcro.helpers.getURLParameter("email");
|
|
18199
18391
|
dispatch({
|
|
18200
18392
|
type: SET_TOKEN,
|
|
18201
18393
|
payload: window.Pelcro.helpers.getURLParameter("token")
|
|
@@ -18255,26 +18447,26 @@ const PasswordResetContainer = ({
|
|
|
18255
18447
|
default:
|
|
18256
18448
|
return state;
|
|
18257
18449
|
}
|
|
18258
|
-
}, initialState$
|
|
18450
|
+
}, initialState$b);
|
|
18259
18451
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18260
18452
|
style: { ...style
|
|
18261
18453
|
},
|
|
18262
18454
|
className: `pelcro-container pelcro-password-reset-container ${className}`
|
|
18263
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
18455
|
+
}, /*#__PURE__*/React__default.createElement(Provider$b, {
|
|
18264
18456
|
value: {
|
|
18265
18457
|
state,
|
|
18266
18458
|
dispatch
|
|
18267
18459
|
}
|
|
18268
18460
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
18269
|
-
store: store$
|
|
18461
|
+
store: store$b,
|
|
18270
18462
|
key: i
|
|
18271
18463
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
18272
|
-
store: store$
|
|
18464
|
+
store: store$b
|
|
18273
18465
|
})));
|
|
18274
18466
|
};
|
|
18275
18467
|
|
|
18276
18468
|
const PasswordResetPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
18277
|
-
store: store$
|
|
18469
|
+
store: store$b
|
|
18278
18470
|
}, props));
|
|
18279
18471
|
|
|
18280
18472
|
const PasswordResetButton = ({
|
|
@@ -18287,7 +18479,7 @@ const PasswordResetButton = ({
|
|
|
18287
18479
|
buttonDisabled
|
|
18288
18480
|
},
|
|
18289
18481
|
dispatch
|
|
18290
|
-
} = useContext(store$
|
|
18482
|
+
} = useContext(store$b);
|
|
18291
18483
|
const {
|
|
18292
18484
|
t
|
|
18293
18485
|
} = useTranslation("passwordReset");
|
|
@@ -18304,14 +18496,14 @@ const PasswordResetButton = ({
|
|
|
18304
18496
|
};
|
|
18305
18497
|
|
|
18306
18498
|
const PasswordResetEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
18307
|
-
store: store$
|
|
18499
|
+
store: store$b
|
|
18308
18500
|
}, props, {
|
|
18309
18501
|
value: window.Pelcro.helpers.getURLParameter("email"),
|
|
18310
18502
|
disabled: true
|
|
18311
18503
|
}));
|
|
18312
18504
|
|
|
18313
18505
|
const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.createElement(ConfirmPassword, Object.assign({
|
|
18314
|
-
store: store$
|
|
18506
|
+
store: store$b
|
|
18315
18507
|
}, props));
|
|
18316
18508
|
|
|
18317
18509
|
const PasswordResetView = props => {
|
|
@@ -18363,7 +18555,7 @@ const PasswordResetModal = ({
|
|
|
18363
18555
|
};
|
|
18364
18556
|
PasswordResetModal.viewId = "password-reset";
|
|
18365
18557
|
|
|
18366
|
-
const initialState$
|
|
18558
|
+
const initialState$a = {
|
|
18367
18559
|
email: "",
|
|
18368
18560
|
emailError: null,
|
|
18369
18561
|
buttonDisabled: false,
|
|
@@ -18372,10 +18564,10 @@ const initialState$9 = {
|
|
|
18372
18564
|
content: ""
|
|
18373
18565
|
}
|
|
18374
18566
|
};
|
|
18375
|
-
const store$
|
|
18567
|
+
const store$a = /*#__PURE__*/createContext(initialState$a);
|
|
18376
18568
|
const {
|
|
18377
|
-
Provider: Provider$
|
|
18378
|
-
} = store$
|
|
18569
|
+
Provider: Provider$a
|
|
18570
|
+
} = store$a;
|
|
18379
18571
|
|
|
18380
18572
|
const PasswordForgotContainer = ({
|
|
18381
18573
|
style,
|
|
@@ -18453,21 +18645,21 @@ const PasswordForgotContainer = ({
|
|
|
18453
18645
|
default:
|
|
18454
18646
|
return state;
|
|
18455
18647
|
}
|
|
18456
|
-
}, initialState$
|
|
18648
|
+
}, initialState$a);
|
|
18457
18649
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18458
18650
|
style: { ...style
|
|
18459
18651
|
},
|
|
18460
18652
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
18461
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
18653
|
+
}, /*#__PURE__*/React__default.createElement(Provider$a, {
|
|
18462
18654
|
value: {
|
|
18463
18655
|
state,
|
|
18464
18656
|
dispatch
|
|
18465
18657
|
}
|
|
18466
18658
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
18467
|
-
store: store$
|
|
18659
|
+
store: store$a,
|
|
18468
18660
|
key: i
|
|
18469
18661
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
18470
|
-
store: store$
|
|
18662
|
+
store: store$a
|
|
18471
18663
|
})));
|
|
18472
18664
|
};
|
|
18473
18665
|
|
|
@@ -18483,7 +18675,7 @@ const PasswordForgotButton = ({
|
|
|
18483
18675
|
emailError
|
|
18484
18676
|
},
|
|
18485
18677
|
dispatch
|
|
18486
|
-
} = useContext(store$
|
|
18678
|
+
} = useContext(store$a);
|
|
18487
18679
|
const {
|
|
18488
18680
|
t
|
|
18489
18681
|
} = useTranslation("passwordForgot");
|
|
@@ -18504,7 +18696,7 @@ const PasswordForgotButton = ({
|
|
|
18504
18696
|
};
|
|
18505
18697
|
|
|
18506
18698
|
const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
18507
|
-
store: store$
|
|
18699
|
+
store: store$a
|
|
18508
18700
|
}, props));
|
|
18509
18701
|
|
|
18510
18702
|
const PasswordForgotView = props => {
|
|
@@ -18554,7 +18746,7 @@ const PasswordForgotModal = ({
|
|
|
18554
18746
|
};
|
|
18555
18747
|
PasswordForgotModal.viewId = "password-forgot";
|
|
18556
18748
|
|
|
18557
|
-
const initialState$
|
|
18749
|
+
const initialState$9 = {
|
|
18558
18750
|
currentPassword: "",
|
|
18559
18751
|
newPassword: "",
|
|
18560
18752
|
confirmNewPassword: "",
|
|
@@ -18568,10 +18760,10 @@ const initialState$8 = {
|
|
|
18568
18760
|
content: ""
|
|
18569
18761
|
}
|
|
18570
18762
|
};
|
|
18571
|
-
const store$
|
|
18763
|
+
const store$9 = /*#__PURE__*/createContext(initialState$9);
|
|
18572
18764
|
const {
|
|
18573
|
-
Provider: Provider$
|
|
18574
|
-
} = store$
|
|
18765
|
+
Provider: Provider$9
|
|
18766
|
+
} = store$9;
|
|
18575
18767
|
const PasswordChangeContainer = ({
|
|
18576
18768
|
style,
|
|
18577
18769
|
className = "",
|
|
@@ -18723,21 +18915,21 @@ const PasswordChangeContainer = ({
|
|
|
18723
18915
|
default:
|
|
18724
18916
|
return state;
|
|
18725
18917
|
}
|
|
18726
|
-
}, initialState$
|
|
18918
|
+
}, initialState$9);
|
|
18727
18919
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18728
18920
|
style: { ...style
|
|
18729
18921
|
},
|
|
18730
18922
|
className: `pelcro-container pelcro-password-change-container ${className}`
|
|
18731
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
18923
|
+
}, /*#__PURE__*/React__default.createElement(Provider$9, {
|
|
18732
18924
|
value: {
|
|
18733
18925
|
state,
|
|
18734
18926
|
dispatch
|
|
18735
18927
|
}
|
|
18736
18928
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
18737
|
-
store: store$
|
|
18929
|
+
store: store$9,
|
|
18738
18930
|
key: i
|
|
18739
18931
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
18740
|
-
store: store$
|
|
18932
|
+
store: store$9
|
|
18741
18933
|
})));
|
|
18742
18934
|
};
|
|
18743
18935
|
|
|
@@ -18748,7 +18940,7 @@ function PasswordChangeCurrentPassword(props) {
|
|
|
18748
18940
|
currentPassword,
|
|
18749
18941
|
currentPasswordError
|
|
18750
18942
|
}
|
|
18751
|
-
} = useContext(store$
|
|
18943
|
+
} = useContext(store$9);
|
|
18752
18944
|
const handleBlur = useCallback(() => {
|
|
18753
18945
|
return dispatch({
|
|
18754
18946
|
type: VALIDATE_PASSWORD
|
|
@@ -18782,7 +18974,7 @@ function PasswordChangeNewPassword(props) {
|
|
|
18782
18974
|
newPassword,
|
|
18783
18975
|
newPasswordError
|
|
18784
18976
|
}
|
|
18785
|
-
} = useContext(store$
|
|
18977
|
+
} = useContext(store$9);
|
|
18786
18978
|
const handleBlur = useCallback(() => {
|
|
18787
18979
|
return dispatch({
|
|
18788
18980
|
type: VALIDATE_NEW_PASSWORD
|
|
@@ -18816,7 +19008,7 @@ function PasswordChangeConfirmNewPassword(props) {
|
|
|
18816
19008
|
confirmNewPassword,
|
|
18817
19009
|
confirmNewPasswordError
|
|
18818
19010
|
}
|
|
18819
|
-
} = useContext(store$
|
|
19011
|
+
} = useContext(store$9);
|
|
18820
19012
|
const handleBlur = useCallback(() => {
|
|
18821
19013
|
return dispatch({
|
|
18822
19014
|
type: VALIDATE_CONFIRM_NEW_PASSWORD
|
|
@@ -18857,7 +19049,7 @@ const PasswordChangeButton = ({
|
|
|
18857
19049
|
confirmNewPasswordError
|
|
18858
19050
|
},
|
|
18859
19051
|
dispatch
|
|
18860
|
-
} = useContext(store$
|
|
19052
|
+
} = useContext(store$9);
|
|
18861
19053
|
const {
|
|
18862
19054
|
t
|
|
18863
19055
|
} = useTranslation("passwordChange");
|
|
@@ -18923,17 +19115,17 @@ const PasswordChangeModal = ({
|
|
|
18923
19115
|
};
|
|
18924
19116
|
PasswordChangeModal.viewId = "password-change";
|
|
18925
19117
|
|
|
18926
|
-
const initialState$
|
|
19118
|
+
const initialState$8 = {
|
|
18927
19119
|
buttonDisabled: false,
|
|
18928
19120
|
alert: {
|
|
18929
19121
|
type: "error",
|
|
18930
19122
|
content: ""
|
|
18931
19123
|
}
|
|
18932
19124
|
};
|
|
18933
|
-
const store$
|
|
19125
|
+
const store$8 = /*#__PURE__*/createContext(initialState$8);
|
|
18934
19126
|
const {
|
|
18935
|
-
Provider: Provider$
|
|
18936
|
-
} = store$
|
|
19127
|
+
Provider: Provider$8
|
|
19128
|
+
} = store$8;
|
|
18937
19129
|
|
|
18938
19130
|
const CartContainer = ({
|
|
18939
19131
|
style,
|
|
@@ -19024,21 +19216,21 @@ const CartContainer = ({
|
|
|
19024
19216
|
default:
|
|
19025
19217
|
return state;
|
|
19026
19218
|
}
|
|
19027
|
-
}, initialState$
|
|
19219
|
+
}, initialState$8);
|
|
19028
19220
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
19029
19221
|
style: { ...style
|
|
19030
19222
|
},
|
|
19031
19223
|
className: `pelcro-container pelcro-cart-container ${className}`
|
|
19032
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
19224
|
+
}, /*#__PURE__*/React__default.createElement(Provider$8, {
|
|
19033
19225
|
value: {
|
|
19034
19226
|
state,
|
|
19035
19227
|
dispatch
|
|
19036
19228
|
}
|
|
19037
19229
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
19038
|
-
store: store$
|
|
19230
|
+
store: store$8,
|
|
19039
19231
|
key: i
|
|
19040
19232
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
19041
|
-
store: store$
|
|
19233
|
+
store: store$8
|
|
19042
19234
|
})));
|
|
19043
19235
|
};
|
|
19044
19236
|
|
|
@@ -19075,7 +19267,7 @@ const CartSubmit = ({
|
|
|
19075
19267
|
buttonDisabled
|
|
19076
19268
|
},
|
|
19077
19269
|
dispatch
|
|
19078
|
-
} = useContext(store$
|
|
19270
|
+
} = useContext(store$8);
|
|
19079
19271
|
const {
|
|
19080
19272
|
t
|
|
19081
19273
|
} = useTranslation("cart");
|
|
@@ -19106,7 +19298,7 @@ const CartTotalPrice = () => {
|
|
|
19106
19298
|
state: {
|
|
19107
19299
|
alert
|
|
19108
19300
|
}
|
|
19109
|
-
} = useContext(store$
|
|
19301
|
+
} = useContext(store$8);
|
|
19110
19302
|
const {
|
|
19111
19303
|
cartItems
|
|
19112
19304
|
} = usePelcro();
|
|
@@ -19419,7 +19611,7 @@ const OrderConfirmModal = props => {
|
|
|
19419
19611
|
};
|
|
19420
19612
|
OrderConfirmModal.viewId = "order-confirm";
|
|
19421
19613
|
|
|
19422
|
-
const initialState$
|
|
19614
|
+
const initialState$7 = {
|
|
19423
19615
|
email: "",
|
|
19424
19616
|
firstName: "",
|
|
19425
19617
|
lastName: "",
|
|
@@ -19431,10 +19623,10 @@ const initialState$6 = {
|
|
|
19431
19623
|
content: ""
|
|
19432
19624
|
}
|
|
19433
19625
|
};
|
|
19434
|
-
const store$
|
|
19626
|
+
const store$7 = /*#__PURE__*/createContext(initialState$7);
|
|
19435
19627
|
const {
|
|
19436
|
-
Provider: Provider$
|
|
19437
|
-
} = store$
|
|
19628
|
+
Provider: Provider$7
|
|
19629
|
+
} = store$7;
|
|
19438
19630
|
|
|
19439
19631
|
const GiftCreateContainer = ({
|
|
19440
19632
|
style,
|
|
@@ -19538,21 +19730,21 @@ const GiftCreateContainer = ({
|
|
|
19538
19730
|
default:
|
|
19539
19731
|
return state;
|
|
19540
19732
|
}
|
|
19541
|
-
}, initialState$
|
|
19733
|
+
}, initialState$7);
|
|
19542
19734
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
19543
19735
|
style: { ...style
|
|
19544
19736
|
},
|
|
19545
19737
|
className: `pelcro-container pelcro-gift-create-container ${className}`
|
|
19546
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
19738
|
+
}, /*#__PURE__*/React__default.createElement(Provider$7, {
|
|
19547
19739
|
value: {
|
|
19548
19740
|
state,
|
|
19549
19741
|
dispatch
|
|
19550
19742
|
}
|
|
19551
19743
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
19552
|
-
store: store$
|
|
19744
|
+
store: store$7,
|
|
19553
19745
|
key: i
|
|
19554
19746
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
19555
|
-
store: store$
|
|
19747
|
+
store: store$7
|
|
19556
19748
|
})));
|
|
19557
19749
|
};
|
|
19558
19750
|
|
|
@@ -19566,7 +19758,7 @@ const GiftCreateSubmitButton = ({
|
|
|
19566
19758
|
state: {
|
|
19567
19759
|
disableSubmit
|
|
19568
19760
|
}
|
|
19569
|
-
} = useContext(store$
|
|
19761
|
+
} = useContext(store$7);
|
|
19570
19762
|
const {
|
|
19571
19763
|
t
|
|
19572
19764
|
} = useTranslation("register");
|
|
@@ -19583,29 +19775,29 @@ const GiftCreateSubmitButton = ({
|
|
|
19583
19775
|
|
|
19584
19776
|
const GiftCreateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
19585
19777
|
initWithUserEmail: false,
|
|
19586
|
-
store: store$
|
|
19778
|
+
store: store$7
|
|
19587
19779
|
}, props));
|
|
19588
19780
|
|
|
19589
19781
|
const GiftCreateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
19590
|
-
store: store$
|
|
19782
|
+
store: store$7
|
|
19591
19783
|
}, props));
|
|
19592
19784
|
|
|
19593
19785
|
const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
19594
|
-
store: store$
|
|
19786
|
+
store: store$7
|
|
19595
19787
|
}, props));
|
|
19596
19788
|
|
|
19597
|
-
var _path$
|
|
19789
|
+
var _path$i;
|
|
19598
19790
|
|
|
19599
|
-
function _extends$
|
|
19791
|
+
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); }
|
|
19600
19792
|
|
|
19601
19793
|
function SvgInfoCircle(props) {
|
|
19602
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
19794
|
+
return /*#__PURE__*/React.createElement("svg", _extends$k({
|
|
19603
19795
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19604
19796
|
className: "plc-w-5 plc-h-5",
|
|
19605
19797
|
fill: "none",
|
|
19606
19798
|
viewBox: "0 0 24 24",
|
|
19607
19799
|
stroke: "currentColor"
|
|
19608
|
-
}, props), _path$
|
|
19800
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
|
|
19609
19801
|
strokeLinecap: "round",
|
|
19610
19802
|
strokeLinejoin: "round",
|
|
19611
19803
|
strokeWidth: 2,
|
|
@@ -19676,7 +19868,7 @@ const GiftCreateStartDate = props => {
|
|
|
19676
19868
|
const {
|
|
19677
19869
|
dispatch,
|
|
19678
19870
|
state
|
|
19679
|
-
} = useContext(store$
|
|
19871
|
+
} = useContext(store$7);
|
|
19680
19872
|
|
|
19681
19873
|
const handleInputChange = value => {
|
|
19682
19874
|
dispatch({
|
|
@@ -19749,7 +19941,7 @@ function GiftCreateMessage(props) {
|
|
|
19749
19941
|
const {
|
|
19750
19942
|
dispatch,
|
|
19751
19943
|
state
|
|
19752
|
-
} = useContext(store$
|
|
19944
|
+
} = useContext(store$7);
|
|
19753
19945
|
const MAX_CHARS_COUNT = 200;
|
|
19754
19946
|
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;
|
|
19755
19947
|
|
|
@@ -19873,7 +20065,7 @@ const GiftCreateModal = ({
|
|
|
19873
20065
|
};
|
|
19874
20066
|
GiftCreateModal.viewId = "gift-create";
|
|
19875
20067
|
|
|
19876
|
-
const initialState$
|
|
20068
|
+
const initialState$6 = {
|
|
19877
20069
|
giftCode: "",
|
|
19878
20070
|
buttonDisabled: true,
|
|
19879
20071
|
alert: {
|
|
@@ -19881,10 +20073,10 @@ const initialState$5 = {
|
|
|
19881
20073
|
content: ""
|
|
19882
20074
|
}
|
|
19883
20075
|
};
|
|
19884
|
-
const store$
|
|
20076
|
+
const store$6 = /*#__PURE__*/createContext(initialState$6);
|
|
19885
20077
|
const {
|
|
19886
|
-
Provider: Provider$
|
|
19887
|
-
} = store$
|
|
20078
|
+
Provider: Provider$6
|
|
20079
|
+
} = store$6;
|
|
19888
20080
|
|
|
19889
20081
|
const GiftRedeemContainer = ({
|
|
19890
20082
|
style,
|
|
@@ -19949,21 +20141,21 @@ const GiftRedeemContainer = ({
|
|
|
19949
20141
|
default:
|
|
19950
20142
|
return state;
|
|
19951
20143
|
}
|
|
19952
|
-
}, initialState$
|
|
20144
|
+
}, initialState$6);
|
|
19953
20145
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
19954
20146
|
style: { ...style
|
|
19955
20147
|
},
|
|
19956
20148
|
className: `pelcro-container pelcro-gift-redeem-container ${className}`
|
|
19957
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
20149
|
+
}, /*#__PURE__*/React__default.createElement(Provider$6, {
|
|
19958
20150
|
value: {
|
|
19959
20151
|
state,
|
|
19960
20152
|
dispatch
|
|
19961
20153
|
}
|
|
19962
20154
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
19963
|
-
store: store$
|
|
20155
|
+
store: store$6,
|
|
19964
20156
|
key: i
|
|
19965
20157
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
19966
|
-
store: store$
|
|
20158
|
+
store: store$6
|
|
19967
20159
|
})));
|
|
19968
20160
|
};
|
|
19969
20161
|
|
|
@@ -20000,7 +20192,7 @@ function GiftCode({
|
|
|
20000
20192
|
}
|
|
20001
20193
|
|
|
20002
20194
|
const GiftRedeemCode = props => /*#__PURE__*/React__default.createElement(GiftCode, Object.assign({
|
|
20003
|
-
store: store$
|
|
20195
|
+
store: store$6
|
|
20004
20196
|
}, props));
|
|
20005
20197
|
|
|
20006
20198
|
const GiftRedeemSubmitButton = ({
|
|
@@ -20013,7 +20205,7 @@ const GiftRedeemSubmitButton = ({
|
|
|
20013
20205
|
state: {
|
|
20014
20206
|
disableSubmit
|
|
20015
20207
|
}
|
|
20016
|
-
} = useContext(store$
|
|
20208
|
+
} = useContext(store$6);
|
|
20017
20209
|
const {
|
|
20018
20210
|
t
|
|
20019
20211
|
} = useTranslation("register");
|
|
@@ -20106,7 +20298,7 @@ const moveDefaultAddressToStart = addresses => {
|
|
|
20106
20298
|
return [defaultAddress, ...addressesWithoutDefault];
|
|
20107
20299
|
};
|
|
20108
20300
|
|
|
20109
|
-
const initialState$
|
|
20301
|
+
const initialState$5 = {
|
|
20110
20302
|
addresses: [],
|
|
20111
20303
|
selectedAddressId: null,
|
|
20112
20304
|
isSubmitting: false,
|
|
@@ -20115,10 +20307,10 @@ const initialState$4 = {
|
|
|
20115
20307
|
content: ""
|
|
20116
20308
|
}
|
|
20117
20309
|
};
|
|
20118
|
-
const store$
|
|
20310
|
+
const store$5 = /*#__PURE__*/createContext(initialState$5);
|
|
20119
20311
|
const {
|
|
20120
|
-
Provider: Provider$
|
|
20121
|
-
} = store$
|
|
20312
|
+
Provider: Provider$5
|
|
20313
|
+
} = store$5;
|
|
20122
20314
|
|
|
20123
20315
|
const AddressSelectContainer = ({
|
|
20124
20316
|
style,
|
|
@@ -20213,7 +20405,7 @@ const AddressSelectContainer = ({
|
|
|
20213
20405
|
default:
|
|
20214
20406
|
return state;
|
|
20215
20407
|
}
|
|
20216
|
-
}, initialState$
|
|
20408
|
+
}, initialState$5);
|
|
20217
20409
|
useEffect(() => {
|
|
20218
20410
|
var _window$Pelcro$user$r;
|
|
20219
20411
|
|
|
@@ -20226,16 +20418,16 @@ const AddressSelectContainer = ({
|
|
|
20226
20418
|
style: { ...style
|
|
20227
20419
|
},
|
|
20228
20420
|
className: `pelcro-container pelcro-address-select-container ${className}`
|
|
20229
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
20421
|
+
}, /*#__PURE__*/React__default.createElement(Provider$5, {
|
|
20230
20422
|
value: {
|
|
20231
20423
|
state,
|
|
20232
20424
|
dispatch
|
|
20233
20425
|
}
|
|
20234
20426
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
20235
|
-
store: store$
|
|
20427
|
+
store: store$5,
|
|
20236
20428
|
key: i
|
|
20237
20429
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
20238
|
-
store: store$
|
|
20430
|
+
store: store$5
|
|
20239
20431
|
})));
|
|
20240
20432
|
};
|
|
20241
20433
|
|
|
@@ -20246,7 +20438,7 @@ const AddressSelectList = () => {
|
|
|
20246
20438
|
addresses,
|
|
20247
20439
|
selectedAddressId
|
|
20248
20440
|
}
|
|
20249
|
-
} = useContext(store$
|
|
20441
|
+
} = useContext(store$5);
|
|
20250
20442
|
|
|
20251
20443
|
const handleAddressSelect = event => {
|
|
20252
20444
|
dispatch({
|
|
@@ -20290,7 +20482,7 @@ const AddressSelectSubmit = ({
|
|
|
20290
20482
|
selectedAddressId,
|
|
20291
20483
|
isSubmitting
|
|
20292
20484
|
}
|
|
20293
|
-
} = useContext(store$
|
|
20485
|
+
} = useContext(store$5);
|
|
20294
20486
|
const {
|
|
20295
20487
|
t
|
|
20296
20488
|
} = useTranslation("address");
|
|
@@ -20386,7 +20578,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
|
|
|
20386
20578
|
return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
|
|
20387
20579
|
};
|
|
20388
20580
|
|
|
20389
|
-
const initialState$
|
|
20581
|
+
const initialState$4 = {
|
|
20390
20582
|
paymentMethods: [],
|
|
20391
20583
|
selectedPaymentMethodId: null,
|
|
20392
20584
|
isSubmitting: false,
|
|
@@ -20395,10 +20587,10 @@ const initialState$3 = {
|
|
|
20395
20587
|
content: ""
|
|
20396
20588
|
}
|
|
20397
20589
|
};
|
|
20398
|
-
const store$
|
|
20590
|
+
const store$4 = /*#__PURE__*/createContext(initialState$4);
|
|
20399
20591
|
const {
|
|
20400
|
-
Provider: Provider$
|
|
20401
|
-
} = store$
|
|
20592
|
+
Provider: Provider$4
|
|
20593
|
+
} = store$4;
|
|
20402
20594
|
|
|
20403
20595
|
const PaymentMethodSelectContainer = ({
|
|
20404
20596
|
style,
|
|
@@ -20457,7 +20649,7 @@ const PaymentMethodSelectContainer = ({
|
|
|
20457
20649
|
default:
|
|
20458
20650
|
return state;
|
|
20459
20651
|
}
|
|
20460
|
-
}, initialState$
|
|
20652
|
+
}, initialState$4);
|
|
20461
20653
|
useEffect(() => {
|
|
20462
20654
|
var _window$Pelcro$user$r3;
|
|
20463
20655
|
|
|
@@ -20470,16 +20662,16 @@ const PaymentMethodSelectContainer = ({
|
|
|
20470
20662
|
style: { ...style
|
|
20471
20663
|
},
|
|
20472
20664
|
className: `pelcro-container pelcro-payment-select-container ${className}`
|
|
20473
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
20665
|
+
}, /*#__PURE__*/React__default.createElement(Provider$4, {
|
|
20474
20666
|
value: {
|
|
20475
20667
|
state,
|
|
20476
20668
|
dispatch
|
|
20477
20669
|
}
|
|
20478
20670
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
20479
|
-
store: store$
|
|
20671
|
+
store: store$4,
|
|
20480
20672
|
key: i
|
|
20481
20673
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
20482
|
-
store: store$
|
|
20674
|
+
store: store$4
|
|
20483
20675
|
})));
|
|
20484
20676
|
};
|
|
20485
20677
|
|
|
@@ -20493,7 +20685,7 @@ const PaymentMethodSelectList = () => {
|
|
|
20493
20685
|
paymentMethods,
|
|
20494
20686
|
selectedPaymentMethodId
|
|
20495
20687
|
}
|
|
20496
|
-
} = useContext(store$
|
|
20688
|
+
} = useContext(store$4);
|
|
20497
20689
|
|
|
20498
20690
|
const handlePaymentMethodSelect = event => {
|
|
20499
20691
|
dispatch({
|
|
@@ -20543,7 +20735,7 @@ const PaymentMethodSelectSubmit = ({
|
|
|
20543
20735
|
selectedPaymentMethodId,
|
|
20544
20736
|
isSubmitting
|
|
20545
20737
|
}
|
|
20546
|
-
} = useContext(store$
|
|
20738
|
+
} = useContext(store$4);
|
|
20547
20739
|
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
20548
20740
|
onClick: () => {
|
|
20549
20741
|
dispatch({
|
|
@@ -20617,8 +20809,8 @@ const PaymentMethodSelectModal = ({
|
|
|
20617
20809
|
};
|
|
20618
20810
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
20619
20811
|
|
|
20620
|
-
function _extends$
|
|
20621
|
-
_extends$
|
|
20812
|
+
function _extends$j() {
|
|
20813
|
+
_extends$j = Object.assign || function (target) {
|
|
20622
20814
|
for (var i = 1; i < arguments.length; i++) {
|
|
20623
20815
|
var source = arguments[i];
|
|
20624
20816
|
|
|
@@ -20632,7 +20824,7 @@ function _extends$i() {
|
|
|
20632
20824
|
return target;
|
|
20633
20825
|
};
|
|
20634
20826
|
|
|
20635
|
-
return _extends$
|
|
20827
|
+
return _extends$j.apply(this, arguments);
|
|
20636
20828
|
}
|
|
20637
20829
|
|
|
20638
20830
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -20816,7 +21008,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
20816
21008
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
20817
21009
|
return null;
|
|
20818
21010
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
20819
|
-
return _render(_extends$
|
|
21011
|
+
return _render(_extends$j({}, _rest, {
|
|
20820
21012
|
hidden: true,
|
|
20821
21013
|
style: {
|
|
20822
21014
|
display: 'none'
|
|
@@ -21344,7 +21536,7 @@ function TransitionChild(props) {
|
|
|
21344
21536
|
var passthroughProps = rest;
|
|
21345
21537
|
return React__default.createElement(NestingContext.Provider, {
|
|
21346
21538
|
value: nesting
|
|
21347
|
-
}, render(_extends$
|
|
21539
|
+
}, render(_extends$j({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
21348
21540
|
}
|
|
21349
21541
|
|
|
21350
21542
|
function Transition(props) {
|
|
@@ -21388,7 +21580,7 @@ function Transition(props) {
|
|
|
21388
21580
|
value: nestingBag
|
|
21389
21581
|
}, React__default.createElement(TransitionContext.Provider, {
|
|
21390
21582
|
value: transitionBag
|
|
21391
|
-
}, render(_extends$
|
|
21583
|
+
}, render(_extends$j({}, sharedProps, {
|
|
21392
21584
|
as: Fragment,
|
|
21393
21585
|
children: React__default.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
21394
21586
|
}), propsBag, Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -21515,12 +21707,12 @@ var ActionTypes;
|
|
|
21515
21707
|
})(ActionTypes || (ActionTypes = {}));
|
|
21516
21708
|
|
|
21517
21709
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
21518
|
-
return _extends$
|
|
21710
|
+
return _extends$j({}, state, {
|
|
21519
21711
|
activeItemIndex: null,
|
|
21520
21712
|
menuState: MenuStates.Closed
|
|
21521
21713
|
});
|
|
21522
21714
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
21523
|
-
return _extends$
|
|
21715
|
+
return _extends$j({}, state, {
|
|
21524
21716
|
menuState: MenuStates.Open
|
|
21525
21717
|
});
|
|
21526
21718
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -21539,7 +21731,7 @@ var ActionTypes;
|
|
|
21539
21731
|
}
|
|
21540
21732
|
});
|
|
21541
21733
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
21542
|
-
return _extends$
|
|
21734
|
+
return _extends$j({}, state, {
|
|
21543
21735
|
searchQuery: '',
|
|
21544
21736
|
activeItemIndex: activeItemIndex
|
|
21545
21737
|
});
|
|
@@ -21550,19 +21742,19 @@ var ActionTypes;
|
|
|
21550
21742
|
|
|
21551
21743
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
21552
21744
|
});
|
|
21553
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
21745
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$j({}, state, {
|
|
21554
21746
|
searchQuery: searchQuery
|
|
21555
21747
|
});
|
|
21556
|
-
return _extends$
|
|
21748
|
+
return _extends$j({}, state, {
|
|
21557
21749
|
searchQuery: searchQuery,
|
|
21558
21750
|
activeItemIndex: match
|
|
21559
21751
|
});
|
|
21560
21752
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
21561
|
-
return _extends$
|
|
21753
|
+
return _extends$j({}, state, {
|
|
21562
21754
|
searchQuery: ''
|
|
21563
21755
|
});
|
|
21564
21756
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
21565
|
-
return _extends$
|
|
21757
|
+
return _extends$j({}, state, {
|
|
21566
21758
|
items: [].concat(state.items, [{
|
|
21567
21759
|
id: action.id,
|
|
21568
21760
|
dataRef: action.dataRef
|
|
@@ -21575,7 +21767,7 @@ var ActionTypes;
|
|
|
21575
21767
|
return a.id === action.id;
|
|
21576
21768
|
});
|
|
21577
21769
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
21578
|
-
return _extends$
|
|
21770
|
+
return _extends$j({}, state, {
|
|
21579
21771
|
items: nextItems,
|
|
21580
21772
|
activeItemIndex: function () {
|
|
21581
21773
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -21614,19 +21806,19 @@ var ActionTypes$1;
|
|
|
21614
21806
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
21615
21807
|
if (state.disabled) return state;
|
|
21616
21808
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
21617
|
-
return _extends$
|
|
21809
|
+
return _extends$j({}, state, {
|
|
21618
21810
|
activeOptionIndex: null,
|
|
21619
21811
|
listboxState: ListboxStates.Closed
|
|
21620
21812
|
});
|
|
21621
21813
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
21622
21814
|
if (state.disabled) return state;
|
|
21623
21815
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
21624
|
-
return _extends$
|
|
21816
|
+
return _extends$j({}, state, {
|
|
21625
21817
|
listboxState: ListboxStates.Open
|
|
21626
21818
|
});
|
|
21627
21819
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
21628
21820
|
if (state.disabled === action.disabled) return state;
|
|
21629
|
-
return _extends$
|
|
21821
|
+
return _extends$j({}, state, {
|
|
21630
21822
|
disabled: action.disabled
|
|
21631
21823
|
});
|
|
21632
21824
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -21647,7 +21839,7 @@ var ActionTypes$1;
|
|
|
21647
21839
|
}
|
|
21648
21840
|
});
|
|
21649
21841
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
21650
|
-
return _extends$
|
|
21842
|
+
return _extends$j({}, state, {
|
|
21651
21843
|
searchQuery: '',
|
|
21652
21844
|
activeOptionIndex: activeOptionIndex
|
|
21653
21845
|
});
|
|
@@ -21660,10 +21852,10 @@ var ActionTypes$1;
|
|
|
21660
21852
|
|
|
21661
21853
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
21662
21854
|
});
|
|
21663
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
21855
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$j({}, state, {
|
|
21664
21856
|
searchQuery: searchQuery
|
|
21665
21857
|
});
|
|
21666
|
-
return _extends$
|
|
21858
|
+
return _extends$j({}, state, {
|
|
21667
21859
|
searchQuery: searchQuery,
|
|
21668
21860
|
activeOptionIndex: match
|
|
21669
21861
|
});
|
|
@@ -21671,11 +21863,11 @@ var ActionTypes$1;
|
|
|
21671
21863
|
if (state.disabled) return state;
|
|
21672
21864
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
21673
21865
|
if (state.searchQuery === '') return state;
|
|
21674
|
-
return _extends$
|
|
21866
|
+
return _extends$j({}, state, {
|
|
21675
21867
|
searchQuery: ''
|
|
21676
21868
|
});
|
|
21677
21869
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
21678
|
-
return _extends$
|
|
21870
|
+
return _extends$j({}, state, {
|
|
21679
21871
|
options: [].concat(state.options, [{
|
|
21680
21872
|
id: action.id,
|
|
21681
21873
|
dataRef: action.dataRef
|
|
@@ -21688,7 +21880,7 @@ var ActionTypes$1;
|
|
|
21688
21880
|
return a.id === action.id;
|
|
21689
21881
|
});
|
|
21690
21882
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
21691
|
-
return _extends$
|
|
21883
|
+
return _extends$j({}, state, {
|
|
21692
21884
|
options: nextOptions,
|
|
21693
21885
|
activeOptionIndex: function () {
|
|
21694
21886
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -21749,18 +21941,18 @@ const getPaymentCardIcon = name => {
|
|
|
21749
21941
|
}));
|
|
21750
21942
|
};
|
|
21751
21943
|
|
|
21752
|
-
var _path$
|
|
21944
|
+
var _path$h;
|
|
21753
21945
|
|
|
21754
|
-
function _extends$
|
|
21946
|
+
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); }
|
|
21755
21947
|
|
|
21756
21948
|
function SvgChevronRight(props) {
|
|
21757
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21949
|
+
return /*#__PURE__*/React.createElement("svg", _extends$i({
|
|
21758
21950
|
className: "plc-w-6 plc-h-6",
|
|
21759
21951
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21760
21952
|
fill: "none",
|
|
21761
21953
|
viewBox: "0 0 24 24",
|
|
21762
21954
|
stroke: "currentColor"
|
|
21763
|
-
}, props), _path$
|
|
21955
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
|
|
21764
21956
|
strokeLinecap: "round",
|
|
21765
21957
|
strokeLinejoin: "round",
|
|
21766
21958
|
strokeWidth: 2,
|
|
@@ -21976,18 +22168,18 @@ const SavedItems = ({
|
|
|
21976
22168
|
});
|
|
21977
22169
|
};
|
|
21978
22170
|
|
|
21979
|
-
var _path$
|
|
22171
|
+
var _path$g;
|
|
21980
22172
|
|
|
21981
|
-
function _extends$
|
|
22173
|
+
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); }
|
|
21982
22174
|
|
|
21983
22175
|
function SvgRefresh(props) {
|
|
21984
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22176
|
+
return /*#__PURE__*/React.createElement("svg", _extends$h({
|
|
21985
22177
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21986
22178
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21987
22179
|
fill: "none",
|
|
21988
22180
|
viewBox: "0 0 24 24",
|
|
21989
22181
|
stroke: "currentColor"
|
|
21990
|
-
}, props), _path$
|
|
22182
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
|
|
21991
22183
|
strokeLinecap: "round",
|
|
21992
22184
|
strokeLinejoin: "round",
|
|
21993
22185
|
strokeWidth: 2,
|
|
@@ -21995,35 +22187,35 @@ function SvgRefresh(props) {
|
|
|
21995
22187
|
})));
|
|
21996
22188
|
}
|
|
21997
22189
|
|
|
21998
|
-
var _path$
|
|
22190
|
+
var _path$f;
|
|
21999
22191
|
|
|
22000
|
-
function _extends$
|
|
22192
|
+
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); }
|
|
22001
22193
|
|
|
22002
22194
|
function SvgCalendar(props) {
|
|
22003
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22195
|
+
return /*#__PURE__*/React.createElement("svg", _extends$g({
|
|
22004
22196
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22005
22197
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
22006
22198
|
viewBox: "0 0 20 20",
|
|
22007
22199
|
fill: "currentColor"
|
|
22008
|
-
}, props), _path$
|
|
22200
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
|
|
22009
22201
|
fillRule: "evenodd",
|
|
22010
22202
|
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",
|
|
22011
22203
|
clipRule: "evenodd"
|
|
22012
22204
|
})));
|
|
22013
22205
|
}
|
|
22014
22206
|
|
|
22015
|
-
var _path$
|
|
22207
|
+
var _path$e;
|
|
22016
22208
|
|
|
22017
|
-
function _extends$
|
|
22209
|
+
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); }
|
|
22018
22210
|
|
|
22019
22211
|
function SvgPlus(props) {
|
|
22020
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22212
|
+
return /*#__PURE__*/React.createElement("svg", _extends$f({
|
|
22021
22213
|
className: "plc-w-5 plc-h-5",
|
|
22022
22214
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22023
22215
|
fill: "none",
|
|
22024
22216
|
viewBox: "0 0 24 24",
|
|
22025
22217
|
stroke: "currentColor"
|
|
22026
|
-
}, props), _path$
|
|
22218
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
|
|
22027
22219
|
strokeLinecap: "round",
|
|
22028
22220
|
strokeLinejoin: "round",
|
|
22029
22221
|
strokeWidth: 2,
|
|
@@ -22031,17 +22223,17 @@ function SvgPlus(props) {
|
|
|
22031
22223
|
})));
|
|
22032
22224
|
}
|
|
22033
22225
|
|
|
22034
|
-
var _path$
|
|
22226
|
+
var _path$d;
|
|
22035
22227
|
|
|
22036
|
-
function _extends$
|
|
22228
|
+
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); }
|
|
22037
22229
|
|
|
22038
22230
|
function SvgCheckMark(props) {
|
|
22039
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22231
|
+
return /*#__PURE__*/React.createElement("svg", _extends$e({
|
|
22040
22232
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
22041
22233
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22042
22234
|
viewBox: "0 0 20 20",
|
|
22043
22235
|
fill: "currentColor"
|
|
22044
|
-
}, props), _path$
|
|
22236
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
|
|
22045
22237
|
fillRule: "evenodd",
|
|
22046
22238
|
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",
|
|
22047
22239
|
clipRule: "evenodd"
|
|
@@ -22105,7 +22297,8 @@ const SubscriptionsItems = ({
|
|
|
22105
22297
|
} = useTranslation("dashboard");
|
|
22106
22298
|
const {
|
|
22107
22299
|
switchView,
|
|
22108
|
-
|
|
22300
|
+
switchToAddressView,
|
|
22301
|
+
switchToPaymentView
|
|
22109
22302
|
} = usePelcro();
|
|
22110
22303
|
const subs = getNonDonationSubs();
|
|
22111
22304
|
if (subs.length === 0) return null;
|
|
@@ -22147,7 +22340,12 @@ const SubscriptionsItems = ({
|
|
|
22147
22340
|
const plan = window.Pelcro.plan.getById(plan_id);
|
|
22148
22341
|
setProductAndPlan(product, plan);
|
|
22149
22342
|
setSubscriptionIdToRenew(sub.id);
|
|
22150
|
-
|
|
22343
|
+
|
|
22344
|
+
if (product.address_required) {
|
|
22345
|
+
return switchToAddressView();
|
|
22346
|
+
}
|
|
22347
|
+
|
|
22348
|
+
return switchToPaymentView();
|
|
22151
22349
|
};
|
|
22152
22350
|
|
|
22153
22351
|
const getPhases = () => {
|
|
@@ -22336,18 +22534,18 @@ Accordion.item = function AccordionItem({
|
|
|
22336
22534
|
}, content)) : null;
|
|
22337
22535
|
};
|
|
22338
22536
|
|
|
22339
|
-
var _path$
|
|
22537
|
+
var _path$c;
|
|
22340
22538
|
|
|
22341
|
-
function _extends$
|
|
22539
|
+
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); }
|
|
22342
22540
|
|
|
22343
22541
|
function SvgExit(props) {
|
|
22344
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22542
|
+
return /*#__PURE__*/React.createElement("svg", _extends$d({
|
|
22345
22543
|
className: "plc-w-6 plc-h-6",
|
|
22346
22544
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22347
22545
|
fill: "none",
|
|
22348
22546
|
viewBox: "0 0 24 24",
|
|
22349
22547
|
stroke: "currentColor"
|
|
22350
|
-
}, props), _path$
|
|
22548
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
|
|
22351
22549
|
strokeLinecap: "round",
|
|
22352
22550
|
strokeLinejoin: "round",
|
|
22353
22551
|
strokeWidth: 2,
|
|
@@ -22355,17 +22553,17 @@ function SvgExit(props) {
|
|
|
22355
22553
|
})));
|
|
22356
22554
|
}
|
|
22357
22555
|
|
|
22358
|
-
var _path$
|
|
22556
|
+
var _path$b;
|
|
22359
22557
|
|
|
22360
|
-
function _extends$
|
|
22558
|
+
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); }
|
|
22361
22559
|
|
|
22362
22560
|
function SvgUser(props) {
|
|
22363
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22561
|
+
return /*#__PURE__*/React.createElement("svg", _extends$c({
|
|
22364
22562
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22365
22563
|
fill: "none",
|
|
22366
22564
|
viewBox: "0 0 24 24",
|
|
22367
22565
|
stroke: "currentColor"
|
|
22368
|
-
}, props), _path$
|
|
22566
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
|
|
22369
22567
|
strokeLinecap: "round",
|
|
22370
22568
|
strokeLinejoin: "round",
|
|
22371
22569
|
strokeWidth: 2,
|
|
@@ -22373,18 +22571,18 @@ function SvgUser(props) {
|
|
|
22373
22571
|
})));
|
|
22374
22572
|
}
|
|
22375
22573
|
|
|
22376
|
-
var _path$
|
|
22574
|
+
var _path$a;
|
|
22377
22575
|
|
|
22378
|
-
function _extends$
|
|
22576
|
+
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); }
|
|
22379
22577
|
|
|
22380
22578
|
function SvgNewsletter(props) {
|
|
22381
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22579
|
+
return /*#__PURE__*/React.createElement("svg", _extends$b({
|
|
22382
22580
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22383
22581
|
className: "plc-h-5 plc-w-5",
|
|
22384
22582
|
fill: "none",
|
|
22385
22583
|
viewBox: "0 0 24 24",
|
|
22386
22584
|
stroke: "currentColor"
|
|
22387
|
-
}, props), _path$
|
|
22585
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
|
|
22388
22586
|
strokeLinecap: "round",
|
|
22389
22587
|
strokeLinejoin: "round",
|
|
22390
22588
|
strokeWidth: 2,
|
|
@@ -22392,18 +22590,18 @@ function SvgNewsletter(props) {
|
|
|
22392
22590
|
})));
|
|
22393
22591
|
}
|
|
22394
22592
|
|
|
22395
|
-
var _path$
|
|
22593
|
+
var _path$9;
|
|
22396
22594
|
|
|
22397
|
-
function _extends$
|
|
22595
|
+
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); }
|
|
22398
22596
|
|
|
22399
22597
|
function SvgDocument(props) {
|
|
22400
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22598
|
+
return /*#__PURE__*/React.createElement("svg", _extends$a({
|
|
22401
22599
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22402
22600
|
className: "plc-h-6 plc-w-6 plc-mr-2",
|
|
22403
22601
|
fill: "none",
|
|
22404
22602
|
viewBox: "0 0 24 24",
|
|
22405
22603
|
stroke: "currentColor"
|
|
22406
|
-
}, props), _path$
|
|
22604
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
|
|
22407
22605
|
strokeLinecap: "round",
|
|
22408
22606
|
strokeLinejoin: "round",
|
|
22409
22607
|
strokeWidth: 2,
|
|
@@ -22411,18 +22609,18 @@ function SvgDocument(props) {
|
|
|
22411
22609
|
})));
|
|
22412
22610
|
}
|
|
22413
22611
|
|
|
22414
|
-
var _path$
|
|
22612
|
+
var _path$8;
|
|
22415
22613
|
|
|
22416
|
-
function _extends$
|
|
22614
|
+
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); }
|
|
22417
22615
|
|
|
22418
22616
|
function SvgPaymentCard(props) {
|
|
22419
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22617
|
+
return /*#__PURE__*/React.createElement("svg", _extends$9({
|
|
22420
22618
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
22421
22619
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22422
22620
|
fill: "none",
|
|
22423
22621
|
viewBox: "0 0 24 24",
|
|
22424
22622
|
stroke: "currentColor"
|
|
22425
|
-
}, props), _path$
|
|
22623
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
|
|
22426
22624
|
strokeLinecap: "round",
|
|
22427
22625
|
strokeLinejoin: "round",
|
|
22428
22626
|
strokeWidth: 2,
|
|
@@ -22430,18 +22628,18 @@ function SvgPaymentCard(props) {
|
|
|
22430
22628
|
})));
|
|
22431
22629
|
}
|
|
22432
22630
|
|
|
22433
|
-
var _path$
|
|
22631
|
+
var _path$7, _path2$1;
|
|
22434
22632
|
|
|
22435
|
-
function _extends$
|
|
22633
|
+
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); }
|
|
22436
22634
|
|
|
22437
22635
|
function SvgLocationPin(props) {
|
|
22438
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22636
|
+
return /*#__PURE__*/React.createElement("svg", _extends$8({
|
|
22439
22637
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
22440
22638
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22441
22639
|
fill: "none",
|
|
22442
22640
|
viewBox: "0 0 24 24",
|
|
22443
22641
|
stroke: "currentColor"
|
|
22444
|
-
}, props), _path$
|
|
22642
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
|
|
22445
22643
|
strokeLinecap: "round",
|
|
22446
22644
|
strokeLinejoin: "round",
|
|
22447
22645
|
strokeWidth: 2,
|
|
@@ -22456,10 +22654,10 @@ function SvgLocationPin(props) {
|
|
|
22456
22654
|
|
|
22457
22655
|
var _switch;
|
|
22458
22656
|
|
|
22459
|
-
function _extends$
|
|
22657
|
+
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); }
|
|
22460
22658
|
|
|
22461
22659
|
function SvgSubscription(props) {
|
|
22462
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22660
|
+
return /*#__PURE__*/React.createElement("svg", _extends$7({
|
|
22463
22661
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22464
22662
|
viewBox: "0 0 100 125",
|
|
22465
22663
|
fill: "currentColor"
|
|
@@ -22474,18 +22672,18 @@ function SvgSubscription(props) {
|
|
|
22474
22672
|
}))))));
|
|
22475
22673
|
}
|
|
22476
22674
|
|
|
22477
|
-
var _path$
|
|
22675
|
+
var _path$6;
|
|
22478
22676
|
|
|
22479
|
-
function _extends$
|
|
22677
|
+
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); }
|
|
22480
22678
|
|
|
22481
22679
|
function SvgShopping(props) {
|
|
22482
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22680
|
+
return /*#__PURE__*/React.createElement("svg", _extends$6({
|
|
22483
22681
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
22484
22682
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22485
22683
|
fill: "none",
|
|
22486
22684
|
viewBox: "0 0 24 24",
|
|
22487
22685
|
stroke: "currentColor"
|
|
22488
|
-
}, props), _path$
|
|
22686
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
|
|
22489
22687
|
strokeLinecap: "round",
|
|
22490
22688
|
strokeLinejoin: "round",
|
|
22491
22689
|
strokeWidth: 2,
|
|
@@ -22493,18 +22691,18 @@ function SvgShopping(props) {
|
|
|
22493
22691
|
})));
|
|
22494
22692
|
}
|
|
22495
22693
|
|
|
22496
|
-
var _path$
|
|
22694
|
+
var _path$5;
|
|
22497
22695
|
|
|
22498
|
-
function _extends$
|
|
22696
|
+
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); }
|
|
22499
22697
|
|
|
22500
22698
|
function SvgBookmark(props) {
|
|
22501
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22699
|
+
return /*#__PURE__*/React.createElement("svg", _extends$5({
|
|
22502
22700
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
22503
22701
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22504
22702
|
fill: "none",
|
|
22505
22703
|
viewBox: "0 0 24 24",
|
|
22506
22704
|
stroke: "currentColor"
|
|
22507
|
-
}, props), _path$
|
|
22705
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
|
|
22508
22706
|
strokeLinecap: "round",
|
|
22509
22707
|
strokeLinejoin: "round",
|
|
22510
22708
|
strokeWidth: 2,
|
|
@@ -22512,33 +22710,33 @@ function SvgBookmark(props) {
|
|
|
22512
22710
|
})));
|
|
22513
22711
|
}
|
|
22514
22712
|
|
|
22515
|
-
var _path$
|
|
22713
|
+
var _path$4;
|
|
22516
22714
|
|
|
22517
|
-
function _extends$
|
|
22715
|
+
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); }
|
|
22518
22716
|
|
|
22519
22717
|
function SvgKey(props) {
|
|
22520
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22718
|
+
return /*#__PURE__*/React.createElement("svg", _extends$4({
|
|
22521
22719
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22522
22720
|
viewBox: "0 0 20 20",
|
|
22523
22721
|
fill: "currentColor"
|
|
22524
|
-
}, props), _path$
|
|
22722
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
|
|
22525
22723
|
fillRule: "evenodd",
|
|
22526
22724
|
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",
|
|
22527
22725
|
clipRule: "evenodd"
|
|
22528
22726
|
})));
|
|
22529
22727
|
}
|
|
22530
22728
|
|
|
22531
|
-
var _path$
|
|
22729
|
+
var _path$3;
|
|
22532
22730
|
|
|
22533
|
-
function _extends$
|
|
22731
|
+
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); }
|
|
22534
22732
|
|
|
22535
22733
|
function SvgDonate(props) {
|
|
22536
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
22734
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
22537
22735
|
width: 24,
|
|
22538
22736
|
height: 24,
|
|
22539
22737
|
fill: "currentColor",
|
|
22540
22738
|
xmlns: "http://www.w3.org/2000/svg"
|
|
22541
|
-
}, props), _path$
|
|
22739
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
|
|
22542
22740
|
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"
|
|
22543
22741
|
})));
|
|
22544
22742
|
}
|
|
@@ -22865,9 +23063,10 @@ class Dashboard extends Component {
|
|
|
22865
23063
|
}) => {
|
|
22866
23064
|
if (isGift) {
|
|
22867
23065
|
this.props.setProductAndPlan(null, null, true);
|
|
23066
|
+
return this.props.setView("plan-select");
|
|
22868
23067
|
}
|
|
22869
23068
|
|
|
22870
|
-
return this.props.setView("
|
|
23069
|
+
return this.props.setView("subscription-options");
|
|
22871
23070
|
});
|
|
22872
23071
|
|
|
22873
23072
|
_defineProperty$3(this, "displayAddressCreate", () => {
|
|
@@ -23335,7 +23534,7 @@ const DashboardOpenButton = () => {
|
|
|
23335
23534
|
};
|
|
23336
23535
|
DashboardOpenButton.viewId = "dashboard-open";
|
|
23337
23536
|
|
|
23338
|
-
const initialState$
|
|
23537
|
+
const initialState$3 = {
|
|
23339
23538
|
imageSrc: null,
|
|
23340
23539
|
crop: {
|
|
23341
23540
|
x: 0,
|
|
@@ -23349,10 +23548,10 @@ const initialState$2 = {
|
|
|
23349
23548
|
content: ""
|
|
23350
23549
|
}
|
|
23351
23550
|
};
|
|
23352
|
-
const store$
|
|
23551
|
+
const store$3 = /*#__PURE__*/createContext(initialState$3);
|
|
23353
23552
|
const {
|
|
23354
|
-
Provider: Provider$
|
|
23355
|
-
} = store$
|
|
23553
|
+
Provider: Provider$3
|
|
23554
|
+
} = store$3;
|
|
23356
23555
|
|
|
23357
23556
|
const ProfilePicChangeContainer = ({
|
|
23358
23557
|
style,
|
|
@@ -23486,21 +23685,21 @@ const ProfilePicChangeContainer = ({
|
|
|
23486
23685
|
default:
|
|
23487
23686
|
return state;
|
|
23488
23687
|
}
|
|
23489
|
-
}, initialState$
|
|
23688
|
+
}, initialState$3);
|
|
23490
23689
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
23491
23690
|
style: { ...style
|
|
23492
23691
|
},
|
|
23493
23692
|
className: `pelcro-container pelcro-profile-picture-container ${className}`
|
|
23494
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
23693
|
+
}, /*#__PURE__*/React__default.createElement(Provider$3, {
|
|
23495
23694
|
value: {
|
|
23496
23695
|
state,
|
|
23497
23696
|
dispatch
|
|
23498
23697
|
}
|
|
23499
23698
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
23500
|
-
store: store$
|
|
23699
|
+
store: store$3,
|
|
23501
23700
|
key: i
|
|
23502
23701
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
23503
|
-
store: store$
|
|
23702
|
+
store: store$3
|
|
23504
23703
|
})));
|
|
23505
23704
|
};
|
|
23506
23705
|
/**
|
|
@@ -23562,7 +23761,7 @@ const ProfilePicChangeButton = ({
|
|
|
23562
23761
|
isSubmitting
|
|
23563
23762
|
},
|
|
23564
23763
|
dispatch
|
|
23565
|
-
} = useContext(store$
|
|
23764
|
+
} = useContext(store$3);
|
|
23566
23765
|
const {
|
|
23567
23766
|
t
|
|
23568
23767
|
} = useTranslation("userEdit");
|
|
@@ -24930,7 +25129,7 @@ const ProfilePicChangeCropper = ({
|
|
|
24930
25129
|
zoom
|
|
24931
25130
|
},
|
|
24932
25131
|
dispatch
|
|
24933
|
-
} = useContext(store$
|
|
25132
|
+
} = useContext(store$3);
|
|
24934
25133
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
24935
25134
|
className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
|
|
24936
25135
|
}, /*#__PURE__*/React__default.createElement(Cropper, Object.assign({
|
|
@@ -24972,7 +25171,7 @@ const ProfilePicChangeZoom = ({
|
|
|
24972
25171
|
zoom
|
|
24973
25172
|
},
|
|
24974
25173
|
dispatch
|
|
24975
|
-
} = useContext(store$
|
|
25174
|
+
} = useContext(store$3);
|
|
24976
25175
|
const {
|
|
24977
25176
|
t
|
|
24978
25177
|
} = useTranslation("userEdit");
|
|
@@ -24995,18 +25194,18 @@ const ProfilePicChangeZoom = ({
|
|
|
24995
25194
|
}, otherProps)));
|
|
24996
25195
|
};
|
|
24997
25196
|
|
|
24998
|
-
var _path$
|
|
25197
|
+
var _path$2;
|
|
24999
25198
|
|
|
25000
|
-
function _extends$
|
|
25199
|
+
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); }
|
|
25001
25200
|
|
|
25002
25201
|
function SvgPhotograph(props) {
|
|
25003
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
25202
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
25004
25203
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25005
25204
|
className: "plc-h-6 plc-w-6",
|
|
25006
25205
|
fill: "none",
|
|
25007
25206
|
viewBox: "0 0 24 24",
|
|
25008
25207
|
stroke: "currentColor"
|
|
25009
|
-
}, props), _path$
|
|
25208
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
|
|
25010
25209
|
strokeLinecap: "round",
|
|
25011
25210
|
strokeLinejoin: "round",
|
|
25012
25211
|
strokeWidth: 2,
|
|
@@ -25024,7 +25223,7 @@ const ProfilePicChangeSelectButton = ({
|
|
|
25024
25223
|
state: {
|
|
25025
25224
|
isSubmitting
|
|
25026
25225
|
}
|
|
25027
|
-
} = useContext(store$
|
|
25226
|
+
} = useContext(store$3);
|
|
25028
25227
|
const {
|
|
25029
25228
|
t
|
|
25030
25229
|
} = useTranslation("userEdit");
|
|
@@ -25066,7 +25265,7 @@ const ProfilePicChangeRemoveButton = ({
|
|
|
25066
25265
|
state: {
|
|
25067
25266
|
isSubmitting
|
|
25068
25267
|
}
|
|
25069
|
-
} = useContext(store$
|
|
25268
|
+
} = useContext(store$3);
|
|
25070
25269
|
const {
|
|
25071
25270
|
t
|
|
25072
25271
|
} = useTranslation("userEdit");
|
|
@@ -25089,7 +25288,7 @@ const ProfilePicChangeWrapper = () => {
|
|
|
25089
25288
|
state: {
|
|
25090
25289
|
imageSrc
|
|
25091
25290
|
}
|
|
25092
|
-
} = useContext(store$
|
|
25291
|
+
} = useContext(store$3);
|
|
25093
25292
|
const {
|
|
25094
25293
|
t
|
|
25095
25294
|
} = useTranslation("userEdit");
|
|
@@ -25151,17 +25350,17 @@ function ProfilePicChangeModal({
|
|
|
25151
25350
|
}
|
|
25152
25351
|
ProfilePicChangeModal.viewId = "profile-picture";
|
|
25153
25352
|
|
|
25154
|
-
const initialState$
|
|
25353
|
+
const initialState$2 = {
|
|
25155
25354
|
isSubmitting: false,
|
|
25156
25355
|
alert: {
|
|
25157
25356
|
type: "error",
|
|
25158
25357
|
content: ""
|
|
25159
25358
|
}
|
|
25160
25359
|
};
|
|
25161
|
-
const store$
|
|
25360
|
+
const store$2 = /*#__PURE__*/createContext(initialState$2);
|
|
25162
25361
|
const {
|
|
25163
|
-
Provider: Provider$
|
|
25164
|
-
} = store$
|
|
25362
|
+
Provider: Provider$2
|
|
25363
|
+
} = store$2;
|
|
25165
25364
|
|
|
25166
25365
|
const EmailVerifyContainer = ({
|
|
25167
25366
|
style,
|
|
@@ -25224,21 +25423,21 @@ const EmailVerifyContainer = ({
|
|
|
25224
25423
|
default:
|
|
25225
25424
|
return state;
|
|
25226
25425
|
}
|
|
25227
|
-
}, initialState$
|
|
25426
|
+
}, initialState$2);
|
|
25228
25427
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
25229
25428
|
style: { ...style
|
|
25230
25429
|
},
|
|
25231
25430
|
className: `pelcro-container pelcro-email-verify-container ${className}`
|
|
25232
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
25431
|
+
}, /*#__PURE__*/React__default.createElement(Provider$2, {
|
|
25233
25432
|
value: {
|
|
25234
25433
|
state,
|
|
25235
25434
|
dispatch
|
|
25236
25435
|
}
|
|
25237
25436
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
25238
|
-
store: store$
|
|
25437
|
+
store: store$2,
|
|
25239
25438
|
key: i
|
|
25240
25439
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
25241
|
-
store: store$
|
|
25440
|
+
store: store$2
|
|
25242
25441
|
})));
|
|
25243
25442
|
};
|
|
25244
25443
|
|
|
@@ -25252,7 +25451,7 @@ const EmailVerifyResendButton = ({
|
|
|
25252
25451
|
state: {
|
|
25253
25452
|
isSubmitting
|
|
25254
25453
|
}
|
|
25255
|
-
} = useContext(store$
|
|
25454
|
+
} = useContext(store$2);
|
|
25256
25455
|
const {
|
|
25257
25456
|
t
|
|
25258
25457
|
} = useTranslation("verifyEmail");
|
|
@@ -25267,16 +25466,16 @@ const EmailVerifyResendButton = ({
|
|
|
25267
25466
|
}, otherProps), name !== null && name !== void 0 ? name : t("labels.resend"));
|
|
25268
25467
|
};
|
|
25269
25468
|
|
|
25270
|
-
var _path, _path2;
|
|
25469
|
+
var _path$1, _path2;
|
|
25271
25470
|
|
|
25272
|
-
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); }
|
|
25471
|
+
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); }
|
|
25273
25472
|
|
|
25274
25473
|
function SvgEmailVerify(props) {
|
|
25275
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
25474
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
25276
25475
|
className: "plc-w-6 plc-h-6",
|
|
25277
25476
|
viewBox: "0 0 700 700",
|
|
25278
25477
|
xmlns: "http://www.w3.org/2000/svg"
|
|
25279
|
-
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
25478
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
25280
25479
|
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"
|
|
25281
25480
|
})), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
|
|
25282
25481
|
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"
|
|
@@ -25380,11 +25579,11 @@ const invoicePaymentSubmitButton = props => {
|
|
|
25380
25579
|
return /*#__PURE__*/React__default.createElement(SubmitPaymentMethod, props);
|
|
25381
25580
|
};
|
|
25382
25581
|
|
|
25383
|
-
const initialState = {};
|
|
25384
|
-
const store = /*#__PURE__*/createContext(initialState);
|
|
25582
|
+
const initialState$1 = {};
|
|
25583
|
+
const store$1 = /*#__PURE__*/createContext(initialState$1);
|
|
25385
25584
|
const {
|
|
25386
|
-
Provider
|
|
25387
|
-
} = store;
|
|
25585
|
+
Provider: Provider$1
|
|
25586
|
+
} = store$1;
|
|
25388
25587
|
|
|
25389
25588
|
const InvoiceDetailsContainer = ({
|
|
25390
25589
|
style,
|
|
@@ -25405,21 +25604,21 @@ const InvoiceDetailsContainer = ({
|
|
|
25405
25604
|
default:
|
|
25406
25605
|
return state;
|
|
25407
25606
|
}
|
|
25408
|
-
}, initialState);
|
|
25607
|
+
}, initialState$1);
|
|
25409
25608
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
25410
25609
|
style: { ...style
|
|
25411
25610
|
},
|
|
25412
25611
|
className: `pelcro-container pelcro-invoice-details-container ${className}`
|
|
25413
|
-
}, /*#__PURE__*/React__default.createElement(Provider, {
|
|
25612
|
+
}, /*#__PURE__*/React__default.createElement(Provider$1, {
|
|
25414
25613
|
value: {
|
|
25415
25614
|
state,
|
|
25416
25615
|
dispatch
|
|
25417
25616
|
}
|
|
25418
25617
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
25419
|
-
store,
|
|
25618
|
+
store: store$1,
|
|
25420
25619
|
key: i
|
|
25421
25620
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
25422
|
-
store
|
|
25621
|
+
store: store$1
|
|
25423
25622
|
})));
|
|
25424
25623
|
};
|
|
25425
25624
|
|
|
@@ -25451,7 +25650,7 @@ const InvoiceDetailsPayButton = ({
|
|
|
25451
25650
|
}) => {
|
|
25452
25651
|
const {
|
|
25453
25652
|
dispatch
|
|
25454
|
-
} = useContext(store);
|
|
25653
|
+
} = useContext(store$1);
|
|
25455
25654
|
const {
|
|
25456
25655
|
t
|
|
25457
25656
|
} = useTranslation("invoiceDetails");
|
|
@@ -25556,4 +25755,230 @@ const InvoiceDetailsModal = ({
|
|
|
25556
25755
|
};
|
|
25557
25756
|
InvoiceDetailsModal.viewId = "invoice-details";
|
|
25558
25757
|
|
|
25559
|
-
|
|
25758
|
+
const initialState = {
|
|
25759
|
+
selectedOption: ""
|
|
25760
|
+
};
|
|
25761
|
+
const store = /*#__PURE__*/createContext(initialState);
|
|
25762
|
+
const {
|
|
25763
|
+
Provider
|
|
25764
|
+
} = store;
|
|
25765
|
+
|
|
25766
|
+
const SubscriptionOptionsContainer = ({
|
|
25767
|
+
style,
|
|
25768
|
+
className = "",
|
|
25769
|
+
onRenewSubSuccess = () => {},
|
|
25770
|
+
onNewSubSuccess = () => {},
|
|
25771
|
+
children,
|
|
25772
|
+
...props
|
|
25773
|
+
}) => {
|
|
25774
|
+
const submit = ({
|
|
25775
|
+
selectedOption
|
|
25776
|
+
}, dispatch) => {
|
|
25777
|
+
if (selectedOption === "renew") return onRenewSubSuccess();
|
|
25778
|
+
if (selectedOption === "new") return onNewSubSuccess();
|
|
25779
|
+
};
|
|
25780
|
+
|
|
25781
|
+
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
25782
|
+
switch (action.type) {
|
|
25783
|
+
case SWITCH_TO_NEW:
|
|
25784
|
+
return lib_7({ ...state,
|
|
25785
|
+
selectedOption: "new"
|
|
25786
|
+
});
|
|
25787
|
+
|
|
25788
|
+
case SWITCH_TO_RENEW:
|
|
25789
|
+
return lib_7({ ...state,
|
|
25790
|
+
selectedOption: "renew"
|
|
25791
|
+
});
|
|
25792
|
+
|
|
25793
|
+
case HANDLE_SUBMIT:
|
|
25794
|
+
return lib_4((state, dispatch) => submit(state));
|
|
25795
|
+
|
|
25796
|
+
default:
|
|
25797
|
+
return state;
|
|
25798
|
+
}
|
|
25799
|
+
}, initialState);
|
|
25800
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
25801
|
+
style: { ...style
|
|
25802
|
+
},
|
|
25803
|
+
className: `pelcro-container pelcro-subscription-options-container ${className}`
|
|
25804
|
+
}, /*#__PURE__*/React__default.createElement(Provider, {
|
|
25805
|
+
value: {
|
|
25806
|
+
state,
|
|
25807
|
+
dispatch
|
|
25808
|
+
}
|
|
25809
|
+
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
25810
|
+
store,
|
|
25811
|
+
key: i
|
|
25812
|
+
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
25813
|
+
store
|
|
25814
|
+
})));
|
|
25815
|
+
};
|
|
25816
|
+
|
|
25817
|
+
var _path;
|
|
25818
|
+
|
|
25819
|
+
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); }
|
|
25820
|
+
|
|
25821
|
+
function SvgPlusCircle(props) {
|
|
25822
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
25823
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25824
|
+
className: "plc-h-6 plc-w-6",
|
|
25825
|
+
fill: "none",
|
|
25826
|
+
viewBox: "0 0 24 24",
|
|
25827
|
+
stroke: "currentColor",
|
|
25828
|
+
strokeWidth: 2
|
|
25829
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
25830
|
+
strokeLinecap: "round",
|
|
25831
|
+
strokeLinejoin: "round",
|
|
25832
|
+
d: "M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
25833
|
+
})));
|
|
25834
|
+
}
|
|
25835
|
+
|
|
25836
|
+
const SubscriptionOptionsNewButton = ({
|
|
25837
|
+
name,
|
|
25838
|
+
onClick,
|
|
25839
|
+
...otherProps
|
|
25840
|
+
}) => {
|
|
25841
|
+
const {
|
|
25842
|
+
dispatch,
|
|
25843
|
+
state: {
|
|
25844
|
+
selectedOption
|
|
25845
|
+
}
|
|
25846
|
+
} = useContext(store);
|
|
25847
|
+
const {
|
|
25848
|
+
t
|
|
25849
|
+
} = useTranslation("subscriptionOptions");
|
|
25850
|
+
const isChecked = selectedOption === "new";
|
|
25851
|
+
return /*#__PURE__*/React__default.createElement(Radio, Object.assign({
|
|
25852
|
+
className: "plc-hidden pelcro-new-sub-option",
|
|
25853
|
+
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"}`,
|
|
25854
|
+
id: "pelcro-new-sub-option",
|
|
25855
|
+
name: "option",
|
|
25856
|
+
onChange: () => {
|
|
25857
|
+
dispatch({
|
|
25858
|
+
type: SWITCH_TO_NEW
|
|
25859
|
+
});
|
|
25860
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
25861
|
+
},
|
|
25862
|
+
checked: isChecked
|
|
25863
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("addNew"), /*#__PURE__*/React__default.createElement(SvgPlusCircle, {
|
|
25864
|
+
className: "plc-w-full plc-h-full plc-mr-0"
|
|
25865
|
+
}));
|
|
25866
|
+
};
|
|
25867
|
+
|
|
25868
|
+
const SubscriptionOptionsRenewButton = ({
|
|
25869
|
+
name,
|
|
25870
|
+
onClick,
|
|
25871
|
+
...otherProps
|
|
25872
|
+
}) => {
|
|
25873
|
+
const {
|
|
25874
|
+
dispatch,
|
|
25875
|
+
state: {
|
|
25876
|
+
selectedOption
|
|
25877
|
+
}
|
|
25878
|
+
} = useContext(store);
|
|
25879
|
+
const {
|
|
25880
|
+
t
|
|
25881
|
+
} = useTranslation("subscriptionOptions");
|
|
25882
|
+
const isChecked = selectedOption === "renew";
|
|
25883
|
+
return /*#__PURE__*/React__default.createElement(Radio, Object.assign({
|
|
25884
|
+
className: "plc-hidden pelcro-renew-sub-option",
|
|
25885
|
+
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"}`,
|
|
25886
|
+
id: "pelcro-renew-sub-option",
|
|
25887
|
+
name: "option",
|
|
25888
|
+
onChange: () => {
|
|
25889
|
+
dispatch({
|
|
25890
|
+
type: SWITCH_TO_RENEW
|
|
25891
|
+
});
|
|
25892
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
25893
|
+
},
|
|
25894
|
+
checked: isChecked
|
|
25895
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("renew"), /*#__PURE__*/React__default.createElement(SvgRefresh, {
|
|
25896
|
+
className: "plc-w-full plc-h-full plc-mr-0"
|
|
25897
|
+
}));
|
|
25898
|
+
};
|
|
25899
|
+
|
|
25900
|
+
const SubscriptionOptionsSubmit = ({
|
|
25901
|
+
name,
|
|
25902
|
+
onClick,
|
|
25903
|
+
...otherProps
|
|
25904
|
+
}) => {
|
|
25905
|
+
const {
|
|
25906
|
+
dispatch,
|
|
25907
|
+
state: {
|
|
25908
|
+
selectedOption
|
|
25909
|
+
}
|
|
25910
|
+
} = useContext(store);
|
|
25911
|
+
const {
|
|
25912
|
+
t
|
|
25913
|
+
} = useTranslation("subscriptionOptions");
|
|
25914
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
25915
|
+
onClick: () => {
|
|
25916
|
+
dispatch({
|
|
25917
|
+
type: HANDLE_SUBMIT
|
|
25918
|
+
});
|
|
25919
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
25920
|
+
},
|
|
25921
|
+
disabled: !selectedOption
|
|
25922
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("next"));
|
|
25923
|
+
};
|
|
25924
|
+
|
|
25925
|
+
const SubscriptionOptionsView = props => {
|
|
25926
|
+
const {
|
|
25927
|
+
t
|
|
25928
|
+
} = useTranslation("subscriptionOptions");
|
|
25929
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
25930
|
+
id: "pelcro-subscription-options-view"
|
|
25931
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
25932
|
+
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
25933
|
+
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
25934
|
+
className: "plc-text-2xl plc-font-semibold"
|
|
25935
|
+
}, t("title")), /*#__PURE__*/React__default.createElement("p", null, t("subtitle"))), /*#__PURE__*/React__default.createElement("form", {
|
|
25936
|
+
action: "javascript:void(0);",
|
|
25937
|
+
className: "plc-mt-2 pelcro-form"
|
|
25938
|
+
}, /*#__PURE__*/React__default.createElement(SubscriptionOptionsContainer, props, /*#__PURE__*/React__default.createElement("div", {
|
|
25939
|
+
className: "plc-flex plc-justify-between plc-items-center"
|
|
25940
|
+
}, /*#__PURE__*/React__default.createElement(SubscriptionOptionsRenewButton, null), /*#__PURE__*/React__default.createElement(SubscriptionOptionsNewButton, null)), /*#__PURE__*/React__default.createElement(SubscriptionOptionsSubmit, {
|
|
25941
|
+
role: "submit",
|
|
25942
|
+
className: "plc-mt-4 plc-w-full",
|
|
25943
|
+
name: t("next"),
|
|
25944
|
+
id: "pelcro-submit"
|
|
25945
|
+
}))));
|
|
25946
|
+
};
|
|
25947
|
+
|
|
25948
|
+
const SubscriptionOptionsModal = ({
|
|
25949
|
+
onDisplay,
|
|
25950
|
+
onClose,
|
|
25951
|
+
...otherProps
|
|
25952
|
+
}) => {
|
|
25953
|
+
const {
|
|
25954
|
+
switchView,
|
|
25955
|
+
setProductsList
|
|
25956
|
+
} = usePelcro();
|
|
25957
|
+
|
|
25958
|
+
const onRenewSubSuccess = () => {
|
|
25959
|
+
var _otherProps$onRenewSu;
|
|
25960
|
+
|
|
25961
|
+
(_otherProps$onRenewSu = otherProps.onRenewSubSuccess) === null || _otherProps$onRenewSu === void 0 ? void 0 : _otherProps$onRenewSu.call(otherProps);
|
|
25962
|
+
setProductsList(getRenewableProducts());
|
|
25963
|
+
switchView("_plan-select-renew");
|
|
25964
|
+
};
|
|
25965
|
+
|
|
25966
|
+
const onNewSubSuccess = () => {
|
|
25967
|
+
var _otherProps$onNewSubS;
|
|
25968
|
+
|
|
25969
|
+
(_otherProps$onNewSubS = otherProps.onNewSubSuccess) === null || _otherProps$onNewSubS === void 0 ? void 0 : _otherProps$onNewSubS.call(otherProps);
|
|
25970
|
+
switchView("plan-select");
|
|
25971
|
+
};
|
|
25972
|
+
|
|
25973
|
+
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
25974
|
+
onDisplay: onDisplay,
|
|
25975
|
+
onClose: onClose,
|
|
25976
|
+
id: "pelcro-subscription-options-modal"
|
|
25977
|
+
}, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(SubscriptionOptionsView, Object.assign({}, otherProps, {
|
|
25978
|
+
onNewSubSuccess: onNewSubSuccess,
|
|
25979
|
+
onRenewSubSuccess: onRenewSubSuccess
|
|
25980
|
+
}))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
|
|
25981
|
+
};
|
|
25982
|
+
SubscriptionOptionsModal.viewId = "subscription-options";
|
|
25983
|
+
|
|
25984
|
+
export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionOptionsContainer, SubscriptionOptionsModal, SubscriptionOptionsNewButton, SubscriptionOptionsRenewButton, SubscriptionOptionsSubmit, SubscriptionOptionsView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
|