@pelcro/react-pelcro-js 3.0.0-beta.3 → 3.0.0-beta.4

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.esm.js CHANGED
@@ -3216,7 +3216,7 @@ var validation$1 = {
3216
3216
  enterEmail: "Un courriel est requis.",
3217
3217
  enterPassword: "Mot de passe requis."
3218
3218
  };
3219
- var buttons$7 = {
3219
+ var buttons$9 = {
3220
3220
  account: "Accès abonné(e)s",
3221
3221
  login: "Se connecter"
3222
3222
  };
@@ -3293,7 +3293,7 @@ var confirm$5 = {
3293
3293
  };
3294
3294
  var common_fr = {
3295
3295
  validation: validation$1,
3296
- buttons: buttons$7,
3296
+ buttons: buttons$9,
3297
3297
  dashboard: dashboard$1,
3298
3298
  select: select$3,
3299
3299
  confirm: confirm$5
@@ -3304,7 +3304,7 @@ var validation = {
3304
3304
  enterEmail: "Email address is required.",
3305
3305
  enterPassword: "Password is required."
3306
3306
  };
3307
- var buttons$6 = {
3307
+ var buttons$8 = {
3308
3308
  account: "My account",
3309
3309
  login: "Login"
3310
3310
  };
@@ -3381,7 +3381,7 @@ var confirm$4 = {
3381
3381
  };
3382
3382
  var common_en = {
3383
3383
  validation: validation,
3384
- buttons: buttons$6,
3384
+ buttons: buttons$8,
3385
3385
  dashboard: dashboard,
3386
3386
  select: select$2,
3387
3387
  confirm: confirm$4
@@ -3431,10 +3431,10 @@ var paymentMethod_fr = {
3431
3431
  select: select
3432
3432
  };
3433
3433
 
3434
- var title$d = "Enter your email to subscribe to our newsletter";
3434
+ var title$f = "Enter your email to subscribe to our newsletter";
3435
3435
  var updateTitle$1 = "Update newsletter selections";
3436
3436
  var subtitle$7 = "We may use your email for other marketing communication";
3437
- var labels$n = {
3437
+ var labels$p = {
3438
3438
  submit: "Submit",
3439
3439
  firstName: "First name",
3440
3440
  lastName: "Last name",
@@ -3450,17 +3450,17 @@ var messages$r = {
3450
3450
  here: "here"
3451
3451
  };
3452
3452
  var newsletter_en = {
3453
- title: title$d,
3453
+ title: title$f,
3454
3454
  updateTitle: updateTitle$1,
3455
3455
  subtitle: subtitle$7,
3456
- labels: labels$n,
3456
+ labels: labels$p,
3457
3457
  messages: messages$r
3458
3458
  };
3459
3459
 
3460
- var title$c = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3460
+ var title$e = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3461
3461
  var updateTitle = "Mettre à jour son choix d'infolettres";
3462
3462
  var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3463
- var labels$m = {
3463
+ var labels$o = {
3464
3464
  submit: "Lire l’article !",
3465
3465
  firstName: "Prénom",
3466
3466
  lastName: "Nom de famille",
@@ -3476,14 +3476,14 @@ var messages$q = {
3476
3476
  here: "ici"
3477
3477
  };
3478
3478
  var newsletter_fr = {
3479
- title: title$c,
3479
+ title: title$e,
3480
3480
  updateTitle: updateTitle,
3481
3481
  subtitle: subtitle$6,
3482
- labels: labels$m,
3482
+ labels: labels$o,
3483
3483
  messages: messages$q
3484
3484
  };
3485
3485
 
3486
- var labels$l = {
3486
+ var labels$n = {
3487
3487
  "continue": "Continue to content"
3488
3488
  };
3489
3489
  var messages$p = {
@@ -3502,18 +3502,22 @@ var messages$p = {
3502
3502
  giftRedeem: {
3503
3503
  title: "Congratulations",
3504
3504
  content: "You have successfully redeemed your gift subscription. Enjoy!"
3505
+ },
3506
+ invoicePayment: {
3507
+ title: "Invoice paid successfully",
3508
+ content: "Please contact us if you have any questions or concerns."
3505
3509
  }
3506
3510
  };
3507
3511
  var errors$9 = {
3508
3512
  "": ""
3509
3513
  };
3510
3514
  var success_en = {
3511
- labels: labels$l,
3515
+ labels: labels$n,
3512
3516
  messages: messages$p,
3513
3517
  errors: errors$9
3514
3518
  };
3515
3519
 
3516
- var labels$k = {
3520
+ var labels$m = {
3517
3521
  "continue": "Abonnement réussi !"
3518
3522
  };
3519
3523
  var messages$o = {
@@ -3532,13 +3536,17 @@ var messages$o = {
3532
3536
  giftRedeem: {
3533
3537
  title: "Félicitations",
3534
3538
  content: "Vous avez validé votre abonnement cadeau. Profitez-en!"
3539
+ },
3540
+ invoicePayment: {
3541
+ title: "Invoice paid successfully",
3542
+ content: "Please contact us if you have any questions or concerns."
3535
3543
  }
3536
3544
  };
3537
3545
  var errors$8 = {
3538
3546
  "": ""
3539
3547
  };
3540
3548
  var success_fr = {
3541
- labels: labels$k,
3549
+ labels: labels$m,
3542
3550
  messages: messages$o,
3543
3551
  errors: errors$8
3544
3552
  };
@@ -3575,7 +3583,7 @@ var messages$l = {
3575
3583
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
3576
3584
  bankRedirection: "Please hold, redirecting you to your bank."
3577
3585
  };
3578
- var labels$j = {
3586
+ var labels$l = {
3579
3587
  card: "Enter card number",
3580
3588
  date: "Expiration date",
3581
3589
  CVC: "CVC",
@@ -3595,14 +3603,14 @@ var labels$j = {
3595
3603
  };
3596
3604
  var checkoutForm_en = {
3597
3605
  messages: messages$l,
3598
- labels: labels$j
3606
+ labels: labels$l
3599
3607
  };
3600
3608
 
3601
3609
  var messages$k = {
3602
3610
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
3603
3611
  bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque."
3604
3612
  };
3605
- var labels$i = {
3613
+ var labels$k = {
3606
3614
  card: "Entrez le numéro de carte",
3607
3615
  date: "Date d’expiration",
3608
3616
  CVC: "CVC",
@@ -3622,7 +3630,7 @@ var labels$i = {
3622
3630
  };
3623
3631
  var checkoutForm_fr = {
3624
3632
  messages: messages$k,
3625
- labels: labels$i
3633
+ labels: labels$k
3626
3634
  };
3627
3635
 
3628
3636
  var youAreSafe$1 = "You're safe - PCI compliant 128 SSL by";
@@ -3631,13 +3639,15 @@ var giftSent$1 = "Subscription gift has been sent to";
3631
3639
  var successfully$1 = "successfully";
3632
3640
  var entitlement$1 = "Some of the content on this page is available with one or more of our plans. <1>Subscribe</1> now to get full page access.";
3633
3641
  var recaptcha$1 = "This site is protected by reCAPTCHA and the Google <1>Privacy Policy</1> and <3>Terms of Service</3> apply.";
3642
+ var invalidInvoice$1 = "Invalid invoice ID, please contact support";
3634
3643
  var messages_en = {
3635
3644
  youAreSafe: youAreSafe$1,
3636
3645
  cancel: cancel$1,
3637
3646
  giftSent: giftSent$1,
3638
3647
  successfully: successfully$1,
3639
3648
  entitlement: entitlement$1,
3640
- recaptcha: recaptcha$1
3649
+ recaptcha: recaptcha$1,
3650
+ invalidInvoice: invalidInvoice$1
3641
3651
  };
3642
3652
 
3643
3653
  var youAreSafe = "Vous êtes en sécurité - PCI conforme 128 SSL par";
@@ -3646,16 +3656,18 @@ var giftSent = "Le cadeau d’abonnement a été envoyé à";
3646
3656
  var successfully = "avec succès.";
3647
3657
  var entitlement = "Une partie du contenu de cette page est disponible sous un ou plusieurs de nos plans. <1>Abonnez-vous</1> à l'un de nos plans disponibles pour accéder à plus de contenu";
3648
3658
  var recaptcha = "Ce site est protégé par reCAPTCHA - les <1>règles de confidentialité</1> Google ainsi que les <3>conditions d'utilisation</3> s'appliquent.";
3659
+ var invalidInvoice = "Invalid invoice ID, please contact support";
3649
3660
  var messages_fr = {
3650
3661
  youAreSafe: youAreSafe,
3651
3662
  cancel: cancel,
3652
3663
  giftSent: giftSent,
3653
3664
  successfully: successfully,
3654
3665
  entitlement: entitlement,
3655
- recaptcha: recaptcha
3666
+ recaptcha: recaptcha,
3667
+ invalidInvoice: invalidInvoice
3656
3668
  };
3657
3669
 
3658
- var labels$h = {
3670
+ var labels$j = {
3659
3671
  email: "Enter email",
3660
3672
  password: "Enter password",
3661
3673
  required: "required",
@@ -3682,12 +3694,12 @@ var errors$5 = {
3682
3694
  "": ""
3683
3695
  };
3684
3696
  var login_en = {
3685
- labels: labels$h,
3697
+ labels: labels$j,
3686
3698
  messages: messages$j,
3687
3699
  errors: errors$5
3688
3700
  };
3689
3701
 
3690
- var labels$g = {
3702
+ var labels$i = {
3691
3703
  email: "Entrez votre adresse courriel",
3692
3704
  password: "Entrez votre mot de passe",
3693
3705
  required: "Champs obligatoires",
@@ -3714,14 +3726,14 @@ var errors$4 = {
3714
3726
  "": ""
3715
3727
  };
3716
3728
  var login_fr = {
3717
- labels: labels$g,
3729
+ labels: labels$i,
3718
3730
  messages: messages$i,
3719
3731
  errors: errors$4
3720
3732
  };
3721
3733
 
3722
- var title$b = "Create an account";
3734
+ var title$d = "Create an account";
3723
3735
  var subtitle$5 = "Enter your email and password below";
3724
- var labels$f = {
3736
+ var labels$h = {
3725
3737
  signUpFacebook: "Sign up with Facebook",
3726
3738
  signUpGoogle: "Sign up with Google",
3727
3739
  signUpEmail: "Sign up with Email",
@@ -3805,18 +3817,18 @@ var redeem$1 = {
3805
3817
  }
3806
3818
  };
3807
3819
  var register_en = {
3808
- title: title$b,
3820
+ title: title$d,
3809
3821
  subtitle: subtitle$5,
3810
- labels: labels$f,
3822
+ labels: labels$h,
3811
3823
  messages: messages$h,
3812
3824
  errors: errors$3,
3813
3825
  gift: gift$1,
3814
3826
  redeem: redeem$1
3815
3827
  };
3816
3828
 
3817
- var title$a = "Créer un compte";
3829
+ var title$c = "Créer un compte";
3818
3830
  var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
3819
- var labels$e = {
3831
+ var labels$g = {
3820
3832
  signUpFacebook: "Inscrivez-vous avec Facebook",
3821
3833
  signUpGoogle: "Inscrivez-vous avec Google",
3822
3834
  signUpEmail: "Inscrivez-vous avec votre courriel",
@@ -3901,16 +3913,16 @@ var redeem = {
3901
3913
  }
3902
3914
  };
3903
3915
  var register_fr = {
3904
- title: title$a,
3916
+ title: title$c,
3905
3917
  subtitle: subtitle$4,
3906
- labels: labels$e,
3918
+ labels: labels$g,
3907
3919
  messages: messages$g,
3908
3920
  errors: errors$2,
3909
3921
  gift: gift,
3910
3922
  redeem: redeem
3911
3923
  };
3912
3924
 
3913
- var labels$d = {
3925
+ var labels$f = {
3914
3926
  title: "Want to update your profile?",
3915
3927
  subtitle: "Enter your information below to update your profile",
3916
3928
  email: "Email",
@@ -3932,11 +3944,11 @@ var messages$f = {
3932
3944
  pictureUpdated: "Your profile picture was updated successfully."
3933
3945
  };
3934
3946
  var userEdit_en = {
3935
- labels: labels$d,
3947
+ labels: labels$f,
3936
3948
  messages: messages$f
3937
3949
  };
3938
3950
 
3939
- var labels$c = {
3951
+ var labels$e = {
3940
3952
  title: "Voulez-vous mettre à jour votre profil ?",
3941
3953
  subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
3942
3954
  email: "Address courriel",
@@ -3958,14 +3970,14 @@ var messages$e = {
3958
3970
  pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
3959
3971
  };
3960
3972
  var userEdit_fr = {
3961
- labels: labels$c,
3973
+ labels: labels$e,
3962
3974
  messages: messages$e
3963
3975
  };
3964
3976
 
3965
- var title$9 = "Enter your shipping address";
3977
+ var title$b = "Enter your shipping address";
3966
3978
  var selectAddressTitle$1 = "Please select an address";
3967
3979
  var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
3968
- var labels$b = {
3980
+ var labels$d = {
3969
3981
  address: "Address",
3970
3982
  code: "Postal Code/Zip",
3971
3983
  city: "City",
@@ -3975,7 +3987,7 @@ var labels$b = {
3975
3987
  lastName: "Last name",
3976
3988
  required: "required"
3977
3989
  };
3978
- var buttons$5 = {
3990
+ var buttons$7 = {
3979
3991
  submit: "Submit",
3980
3992
  selectAddress: "Select address",
3981
3993
  addAddress: "Add new address"
@@ -3985,18 +3997,18 @@ var messages$d = {
3985
3997
  subRedeemed: "Your subscription has been redeemed."
3986
3998
  };
3987
3999
  var address_en = {
3988
- title: title$9,
4000
+ title: title$b,
3989
4001
  selectAddressTitle: selectAddressTitle$1,
3990
4002
  selectAddressSubtitle: selectAddressSubtitle$1,
3991
- labels: labels$b,
3992
- buttons: buttons$5,
4003
+ labels: labels$d,
4004
+ buttons: buttons$7,
3993
4005
  messages: messages$d
3994
4006
  };
3995
4007
 
3996
- var title$8 = "Entrez votre adresse de livraison";
4008
+ var title$a = "Entrez votre adresse de livraison";
3997
4009
  var selectAddressTitle = "Veuillez sélectionner une adresse";
3998
4010
  var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
3999
- var labels$a = {
4011
+ var labels$c = {
4000
4012
  address: "Adresse",
4001
4013
  code: "Code postal / Zip",
4002
4014
  city: "Ville",
@@ -4006,7 +4018,7 @@ var labels$a = {
4006
4018
  lastName: "Nom de famille",
4007
4019
  required: "Champs obligatoires"
4008
4020
  };
4009
- var buttons$4 = {
4021
+ var buttons$6 = {
4010
4022
  submit: "Valider",
4011
4023
  selectAddress: "Choisir cette adresse",
4012
4024
  addAddress: "Ajouter une nouvelle adresse"
@@ -4016,15 +4028,15 @@ var messages$c = {
4016
4028
  subRedeemed: "Votre abonnement a bien été activé."
4017
4029
  };
4018
4030
  var address_fr = {
4019
- title: title$8,
4031
+ title: title$a,
4020
4032
  selectAddressTitle: selectAddressTitle,
4021
4033
  selectAddressSubtitle: selectAddressSubtitle,
4022
- labels: labels$a,
4023
- buttons: buttons$4,
4034
+ labels: labels$c,
4035
+ buttons: buttons$6,
4024
4036
  messages: messages$c
4025
4037
  };
4026
4038
 
4027
- var title$7 = "Reset your password";
4039
+ var title$9 = "Reset your password";
4028
4040
  var subtitle$3 = "Enter a new password below";
4029
4041
  var email$3 = "Email";
4030
4042
  var password$3 = "Password";
@@ -4033,7 +4045,7 @@ var submit$5 = "Submit";
4033
4045
  var required$5 = "Required";
4034
4046
  var passwordUpdated$1 = "Password has been updated, please login with the new password";
4035
4047
  var passwordReset_en = {
4036
- title: title$7,
4048
+ title: title$9,
4037
4049
  subtitle: subtitle$3,
4038
4050
  email: email$3,
4039
4051
  password: password$3,
@@ -4043,7 +4055,7 @@ var passwordReset_en = {
4043
4055
  passwordUpdated: passwordUpdated$1
4044
4056
  };
4045
4057
 
4046
- var title$6 = "Réinitialiser votre mot de passe";
4058
+ var title$8 = "Réinitialiser votre mot de passe";
4047
4059
  var subtitle$2 = "Entrez un nouveau mot de passe ci-dessous";
4048
4060
  var email$2 = "Adresse courriel";
4049
4061
  var password$2 = "Mot de passe";
@@ -4052,7 +4064,7 @@ var submit$4 = "Soumettre";
4052
4064
  var required$4 = "Champs obligatoires";
4053
4065
  var passwordUpdated = "Votre mot de passe a été mis à jour, veuillez vous connecter avec celui-ci";
4054
4066
  var passwordReset_fr = {
4055
- title: title$6,
4067
+ title: title$8,
4056
4068
  subtitle: subtitle$2,
4057
4069
  email: email$2,
4058
4070
  password: password$2,
@@ -4062,7 +4074,7 @@ var passwordReset_fr = {
4062
4074
  passwordUpdated: passwordUpdated
4063
4075
  };
4064
4076
 
4065
- var title$5 = "Forgot your password?";
4077
+ var title$7 = "Forgot your password?";
4066
4078
  var email$1 = "Email";
4067
4079
  var password$1 = "Password";
4068
4080
  var submit$3 = "Submit";
@@ -4073,7 +4085,7 @@ var messages$b = {
4073
4085
  loginHere: "login here."
4074
4086
  };
4075
4087
  var passwordForgot_en = {
4076
- title: title$5,
4088
+ title: title$7,
4077
4089
  email: email$1,
4078
4090
  password: password$1,
4079
4091
  submit: submit$3,
@@ -4082,7 +4094,7 @@ var passwordForgot_en = {
4082
4094
  messages: messages$b
4083
4095
  };
4084
4096
 
4085
- var title$4 = "Mot de passe oublié ?";
4097
+ var title$6 = "Mot de passe oublié ?";
4086
4098
  var email = "Courriel";
4087
4099
  var password = "Mot de passe";
4088
4100
  var submit$2 = "Soumettre";
@@ -4093,7 +4105,7 @@ var messages$a = {
4093
4105
  loginHere: "Connectez-vous ici"
4094
4106
  };
4095
4107
  var passwordForgot_fr = {
4096
- title: title$4,
4108
+ title: title$6,
4097
4109
  email: email,
4098
4110
  password: password,
4099
4111
  submit: submit$2,
@@ -4102,7 +4114,7 @@ var passwordForgot_fr = {
4102
4114
  messages: messages$a
4103
4115
  };
4104
4116
 
4105
- var title$3 = "Change your password";
4117
+ var title$5 = "Change your password";
4106
4118
  var currentPassword$1 = "Current password";
4107
4119
  var newPassword$1 = "New password";
4108
4120
  var confirmNewPassword$1 = "Confirm new password";
@@ -4112,7 +4124,7 @@ var passwordChanged$1 = "Password has been changed, please login with the new pa
4112
4124
  var passwordsNotMatching$1 = "Passwords don't match";
4113
4125
  var weakPassword$1 = "Your password must contain at least 6 characters";
4114
4126
  var passwordChange_en = {
4115
- title: title$3,
4127
+ title: title$5,
4116
4128
  currentPassword: currentPassword$1,
4117
4129
  newPassword: newPassword$1,
4118
4130
  confirmNewPassword: confirmNewPassword$1,
@@ -4123,7 +4135,7 @@ var passwordChange_en = {
4123
4135
  weakPassword: weakPassword$1
4124
4136
  };
4125
4137
 
4126
- var title$2 = "Changez votre mot de passe";
4138
+ var title$4 = "Changez votre mot de passe";
4127
4139
  var currentPassword = "Mot de passe actuel";
4128
4140
  var newPassword = "Nouveau mot de passe";
4129
4141
  var confirmNewPassword = "Confirmer le nouveau mot de passe";
@@ -4133,7 +4145,7 @@ var passwordChanged = "Le mot de passe a été modifié, veuillez vous connecter
4133
4145
  var passwordsNotMatching = "Les mots de passe ne correspondent pas";
4134
4146
  var weakPassword = "Votre mot de passe doit contenir au moins 6";
4135
4147
  var passwordChange_fr = {
4136
- title: title$2,
4148
+ title: title$4,
4137
4149
  currentPassword: currentPassword,
4138
4150
  newPassword: newPassword,
4139
4151
  confirmNewPassword: confirmNewPassword,
@@ -4144,7 +4156,7 @@ var passwordChange_fr = {
4144
4156
  weakPassword: weakPassword
4145
4157
  };
4146
4158
 
4147
- var title$1 = "Votre panier";
4159
+ var title$3 = "Votre panier";
4148
4160
  var subtitle$1 = "Terminez votre achat ci-dessous";
4149
4161
  var name$1 = "Produit";
4150
4162
  var quantity$1 = "Quantité";
@@ -4156,7 +4168,7 @@ var confirm$3 = "Passer à la caisse";
4156
4168
  var empty$1 = "Votre panier est vide.";
4157
4169
  var removeAll$1 = "Vider";
4158
4170
  var cart_fr = {
4159
- title: title$1,
4171
+ title: title$3,
4160
4172
  subtitle: subtitle$1,
4161
4173
  name: name$1,
4162
4174
  quantity: quantity$1,
@@ -4169,7 +4181,7 @@ var cart_fr = {
4169
4181
  removeAll: removeAll$1
4170
4182
  };
4171
4183
 
4172
- var title = "Your shopping cart";
4184
+ var title$2 = "Your shopping cart";
4173
4185
  var subtitle = "Comple your purchase below";
4174
4186
  var name = "Name";
4175
4187
  var quantity = "Quantity";
@@ -4181,7 +4193,7 @@ var confirm$2 = "Checkout";
4181
4193
  var empty = "Your cart is empty.";
4182
4194
  var removeAll = "Remove all";
4183
4195
  var cart_en = {
4184
- title: title,
4196
+ title: title$2,
4185
4197
  subtitle: subtitle,
4186
4198
  name: name,
4187
4199
  quantity: quantity,
@@ -4194,7 +4206,7 @@ var cart_en = {
4194
4206
  removeAll: removeAll
4195
4207
  };
4196
4208
 
4197
- var buttons$3 = {
4209
+ var buttons$5 = {
4198
4210
  select: "Select",
4199
4211
  added: "Added to cart",
4200
4212
  purchase: "Purchase",
@@ -4209,17 +4221,17 @@ var messages$9 = {
4209
4221
  multipleCurrencies: "Your cart currently contains items which are available in different currencies. In order to proceed with the checkout, please make sure that all items have the same currency.",
4210
4222
  currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
4211
4223
  };
4212
- var labels$9 = {
4224
+ var labels$b = {
4213
4225
  summary: "Order summary",
4214
4226
  total: "total"
4215
4227
  };
4216
4228
  var shop_en = {
4217
- buttons: buttons$3,
4229
+ buttons: buttons$5,
4218
4230
  messages: messages$9,
4219
- labels: labels$9
4231
+ labels: labels$b
4220
4232
  };
4221
4233
 
4222
- var buttons$2 = {
4234
+ var buttons$4 = {
4223
4235
  select: "Choisir",
4224
4236
  added: "Ajouté au panier",
4225
4237
  purchase: "Acheter",
@@ -4234,17 +4246,17 @@ var messages$8 = {
4234
4246
  multipleCurrencies: "Votre panier contient des articles disponibles dans différentes devises. Avant de passer à la caisse, veuillez vous assurer que tous les articles ont la même devise.",
4235
4247
  currencyMismatch: "Les articles sélectionnés ne sont pas compatibles avec la devise associée à votre compte ({{currency}}). Veuillez choisir des articles uniquement offerts dans cette devise."
4236
4248
  };
4237
- var labels$8 = {
4249
+ var labels$a = {
4238
4250
  summary: "récapitulatif de commande",
4239
4251
  total: "total"
4240
4252
  };
4241
4253
  var shop_fr = {
4242
- buttons: buttons$2,
4254
+ buttons: buttons$4,
4243
4255
  messages: messages$8,
4244
- labels: labels$8
4256
+ labels: labels$a
4245
4257
  };
4246
4258
 
4247
- var labels$7 = {
4259
+ var labels$9 = {
4248
4260
  cardNumber: "Numéro de carte",
4249
4261
  securityCode: "Code de sécurité",
4250
4262
  submit: "Soumettre",
@@ -4279,12 +4291,12 @@ var errors$1 = {
4279
4291
  "": ""
4280
4292
  };
4281
4293
  var payment_fr = {
4282
- labels: labels$7,
4294
+ labels: labels$9,
4283
4295
  messages: messages$7,
4284
4296
  errors: errors$1
4285
4297
  };
4286
4298
 
4287
- var labels$6 = {
4299
+ var labels$8 = {
4288
4300
  cardNumber: "Card number",
4289
4301
  securityCode: "Security Code",
4290
4302
  submit: "Submit",
@@ -4319,12 +4331,12 @@ var errors = {
4319
4331
  "": ""
4320
4332
  };
4321
4333
  var payment_en = {
4322
- labels: labels$6,
4334
+ labels: labels$8,
4323
4335
  messages: messages$6,
4324
4336
  errors: errors
4325
4337
  };
4326
4338
 
4327
- var labels$5 = {
4339
+ var labels$7 = {
4328
4340
  menu: "Pelcro Menu",
4329
4341
  name: "Name",
4330
4342
  email: "Email",
@@ -4349,6 +4361,15 @@ var labels$5 = {
4349
4361
  purchases: "Purchases",
4350
4362
  subscriptions: "Subscriptions",
4351
4363
  donations: "Donations",
4364
+ invoices: "Invoices",
4365
+ details: "Details",
4366
+ view: "View",
4367
+ paid: "Paid",
4368
+ open: "Open",
4369
+ draft: "Draft",
4370
+ uncollectible: "Uncollectible",
4371
+ "void": "Void",
4372
+ pastDue: "Past due",
4352
4373
  updatePaymentSource: "Update",
4353
4374
  profile: "Profile",
4354
4375
  updateProfile: "Edit profile",
@@ -4401,11 +4422,11 @@ var messages$5 = {
4401
4422
  }
4402
4423
  };
4403
4424
  var dashboard_en = {
4404
- labels: labels$5,
4425
+ labels: labels$7,
4405
4426
  messages: messages$5
4406
4427
  };
4407
4428
 
4408
- var labels$4 = {
4429
+ var labels$6 = {
4409
4430
  menu: "Menu Pelcro",
4410
4431
  name: "Nom",
4411
4432
  email: "Courriel",
@@ -4430,6 +4451,15 @@ var labels$4 = {
4430
4451
  purchases: "Achats",
4431
4452
  subscriptions: "Abonnements",
4432
4453
  donations: "Des dons",
4454
+ invoices: "Invoices",
4455
+ details: "Details",
4456
+ view: "View",
4457
+ paid: "Paid",
4458
+ open: "open",
4459
+ draft: "Draft",
4460
+ uncollectible: "Uncollectible",
4461
+ "void": "Void",
4462
+ pastDue: "Past due",
4433
4463
  updatePaymentSource: "Mettre à jour la source de paiement",
4434
4464
  profile: "Profil",
4435
4465
  updateProfile: "Mettre à jour le profil",
@@ -4482,7 +4512,7 @@ var messages$4 = {
4482
4512
  }
4483
4513
  };
4484
4514
  var dashboard_fr = {
4485
- labels: labels$4,
4515
+ labels: labels$6,
4486
4516
  messages: messages$4
4487
4517
  };
4488
4518
 
@@ -4491,7 +4521,7 @@ var messages$3 = {
4491
4521
  loginHere: "Login here",
4492
4522
  checkbox: "Check this box to gift this subscription"
4493
4523
  };
4494
- var labels$3 = {
4524
+ var labels$5 = {
4495
4525
  plan: {
4496
4526
  title: "Subscribe to a plan",
4497
4527
  subtitle: "Select one of the plans below and click on next."
@@ -4508,15 +4538,15 @@ var labels$3 = {
4508
4538
  or: "Or take a look at some of our other options below"
4509
4539
  }
4510
4540
  };
4511
- var buttons$1 = {
4541
+ var buttons$3 = {
4512
4542
  next: "Next",
4513
4543
  select: "Select",
4514
4544
  back: "Back"
4515
4545
  };
4516
4546
  var select_en = {
4517
4547
  messages: messages$3,
4518
- labels: labels$3,
4519
- buttons: buttons$1
4548
+ labels: labels$5,
4549
+ buttons: buttons$3
4520
4550
  };
4521
4551
 
4522
4552
  var messages$2 = {
@@ -4524,7 +4554,7 @@ var messages$2 = {
4524
4554
  loginHere: "Connectez-vous ici",
4525
4555
  checkbox: "Cochez cette case pour offrir cet abonnement"
4526
4556
  };
4527
- var labels$2 = {
4557
+ var labels$4 = {
4528
4558
  plan: {
4529
4559
  title: "Abonnez-vous à un plan",
4530
4560
  subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
@@ -4541,15 +4571,15 @@ var labels$2 = {
4541
4571
  or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
4542
4572
  }
4543
4573
  };
4544
- var buttons = {
4574
+ var buttons$2 = {
4545
4575
  next: "Prochain",
4546
4576
  select: "Choisir",
4547
4577
  back: "Retour"
4548
4578
  };
4549
4579
  var select_fr = {
4550
4580
  messages: messages$2,
4551
- labels: labels$2,
4552
- buttons: buttons
4581
+ labels: labels$4,
4582
+ buttons: buttons$2
4553
4583
  };
4554
4584
 
4555
4585
  var confirm$1 = {
@@ -4572,7 +4602,7 @@ var notification_fr = {
4572
4602
  confirm: confirm
4573
4603
  };
4574
4604
 
4575
- var labels$1 = {
4605
+ var labels$3 = {
4576
4606
  title: "Verify your email",
4577
4607
  instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
4578
4608
  resend: "Resend email"
@@ -4582,11 +4612,11 @@ var messages$1 = {
4582
4612
  success: "Email verified successfully!"
4583
4613
  };
4584
4614
  var verifyEmail_en = {
4585
- labels: labels$1,
4615
+ labels: labels$3,
4586
4616
  messages: messages$1
4587
4617
  };
4588
4618
 
4589
- var labels = {
4619
+ var labels$2 = {
4590
4620
  title: "Vérifiez votre e-mail",
4591
4621
  instructions: "Vous êtes en route!\nConfirmons votre adresse e-mail.\nCliquez sur le lien de vérification que nous vous avons envoyé par e-mail:",
4592
4622
  resend: "Ré-envoyer l'email"
@@ -4596,10 +4626,46 @@ var messages = {
4596
4626
  success: "Email vérifié avec succès!"
4597
4627
  };
4598
4628
  var verifyEmail_fr = {
4599
- labels: labels,
4629
+ labels: labels$2,
4600
4630
  messages: messages
4601
4631
  };
4602
4632
 
4633
+ var title$1 = "Invoice details";
4634
+ var labels$1 = {
4635
+ summary: "Summary",
4636
+ total: "Total",
4637
+ amountPaid: "Amount paid",
4638
+ amountDue: "Amount due",
4639
+ creationDate: "Created on:"
4640
+ };
4641
+ var buttons$1 = {
4642
+ download: "Download",
4643
+ pay: "Pay now"
4644
+ };
4645
+ var invoiceDetails_en = {
4646
+ title: title$1,
4647
+ labels: labels$1,
4648
+ buttons: buttons$1
4649
+ };
4650
+
4651
+ var title = "Invoice details";
4652
+ var labels = {
4653
+ summary: "Summary",
4654
+ total: "Total",
4655
+ amountPaid: "Amount paid",
4656
+ amountDue: "Amount due",
4657
+ creationDate: "Created on:"
4658
+ };
4659
+ var buttons = {
4660
+ download: "Download",
4661
+ pay: "Pay now"
4662
+ };
4663
+ var invoiceDetails_fr = {
4664
+ title: title,
4665
+ labels: labels,
4666
+ buttons: buttons
4667
+ };
4668
+
4603
4669
  function create$1(createState) {
4604
4670
  let state;
4605
4671
  const listeners = new Set();
@@ -5949,7 +6015,7 @@ class PelcroActions {
5949
6015
  view,
5950
6016
  cartItems,
5951
6017
  ...otherStateFields
5952
- } = initialState$h;
6018
+ } = initialState$i;
5953
6019
  this.set(otherStateFields);
5954
6020
  });
5955
6021
 
@@ -5993,10 +6059,11 @@ class PelcroActions {
5993
6059
  resetView,
5994
6060
  switchToCheckoutForm,
5995
6061
  product,
5996
- order
6062
+ order,
6063
+ invoice
5997
6064
  } = this.get();
5998
6065
 
5999
- if (product || order) {
6066
+ if (product || order || invoice) {
6000
6067
  // direct user to stripe checkout form when there are no existing cards
6001
6068
  if (!userHasPaymentMethod()) {
6002
6069
  return switchToCheckoutForm();
@@ -6013,7 +6080,8 @@ class PelcroActions {
6013
6080
  switchView,
6014
6081
  product,
6015
6082
  subscriptionIdToRenew,
6016
- order
6083
+ order,
6084
+ invoice
6017
6085
  } = this.get();
6018
6086
 
6019
6087
  if (product && subscriptionIdToRenew) {
@@ -6027,6 +6095,10 @@ class PelcroActions {
6027
6095
  if (order) {
6028
6096
  return switchView("order-create");
6029
6097
  }
6098
+
6099
+ if (invoice) {
6100
+ return switchView("invoice-payment");
6101
+ }
6030
6102
  });
6031
6103
 
6032
6104
  _defineProperty$3(this, "switchToAddressView", () => {
@@ -6057,6 +6129,23 @@ class PelcroActions {
6057
6129
  });
6058
6130
  });
6059
6131
 
6132
+ _defineProperty$3(this, "setInvoice", id => {
6133
+ var _window$Pelcro$invoic;
6134
+
6135
+ const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
6136
+ const invoice = invoices.find(inv => String(inv.id) === String(id));
6137
+
6138
+ if (!invoice) {
6139
+ console.error("invalid invoice id");
6140
+ return false;
6141
+ }
6142
+
6143
+ this.set({
6144
+ invoice
6145
+ });
6146
+ return true;
6147
+ });
6148
+
6060
6149
  _defineProperty$3(this, "logout", () => {
6061
6150
  var _ReactGA$event;
6062
6151
 
@@ -6245,7 +6334,7 @@ class PelcroCallbacks {
6245
6334
 
6246
6335
  }
6247
6336
 
6248
- const initialState$h = {
6337
+ const initialState$i = {
6249
6338
  // View
6250
6339
  view: null,
6251
6340
  // Plans
@@ -6260,6 +6349,8 @@ const initialState$h = {
6260
6349
  cartItems: [],
6261
6350
  order: null,
6262
6351
  // null | SKU[] | SKU,
6352
+ // invoices
6353
+ invoice: null,
6263
6354
  // User
6264
6355
  isAuthenticated: () => window.Pelcro.user.isAuthenticated(),
6265
6356
  selectedPaymentMethodId: null,
@@ -6273,7 +6364,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
6273
6364
  return {
6274
6365
  // Store setter
6275
6366
  set,
6276
- ...initialState$h,
6367
+ ...initialState$i,
6277
6368
  // State actions
6278
6369
  ...actions,
6279
6370
  // Callbacks
@@ -6424,7 +6515,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
6424
6515
  */
6425
6516
 
6426
6517
  const isValidViewFromURL = viewID => {
6427
- if (["login", "register", "plan-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart", "email-verify"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
6518
+ if (["login", "register", "plan-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart", "email-verify", "invoice-details"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
6428
6519
  return true;
6429
6520
  }
6430
6521
 
@@ -6651,7 +6742,8 @@ const resources = {
6651
6742
  payment: payment_en,
6652
6743
  dashboard: dashboard_en,
6653
6744
  select: select_en,
6654
- notification: notification_en
6745
+ notification: notification_en,
6746
+ invoiceDetails: invoiceDetails_en
6655
6747
  },
6656
6748
  fr: {
6657
6749
  common: common_fr,
@@ -6674,7 +6766,8 @@ const resources = {
6674
6766
  payment: payment_fr,
6675
6767
  dashboard: dashboard_fr,
6676
6768
  select: select_fr,
6677
- notification: notification_fr
6769
+ notification: notification_fr,
6770
+ invoiceDetails: invoiceDetails_fr
6678
6771
  }
6679
6772
  }; // set UI language to the page language or default to the language in site settings
6680
6773
 
@@ -6965,8 +7058,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
6965
7058
 
6966
7059
  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}}
6967
7060
 
6968
- function _extends$y() {
6969
- _extends$y = Object.assign || function (target) {
7061
+ function _extends$z() {
7062
+ _extends$z = Object.assign || function (target) {
6970
7063
  for (var i = 1; i < arguments.length; i++) {
6971
7064
  var source = arguments[i];
6972
7065
 
@@ -6980,7 +7073,7 @@ function _extends$y() {
6980
7073
  return target;
6981
7074
  };
6982
7075
 
6983
- return _extends$y.apply(this, arguments);
7076
+ return _extends$z.apply(this, arguments);
6984
7077
  }
6985
7078
 
6986
7079
  function _taggedTemplateLiteralLoose(strings, raw) {
@@ -7070,7 +7163,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
7070
7163
  var reducer = function reducer(state, action) {
7071
7164
  switch (action.type) {
7072
7165
  case ActionType.ADD_TOAST:
7073
- return _extends$y({}, state, {
7166
+ return _extends$z({}, state, {
7074
7167
  toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
7075
7168
  });
7076
7169
 
@@ -7080,9 +7173,9 @@ var reducer = function reducer(state, action) {
7080
7173
  clearFromRemoveQueue(action.toast.id);
7081
7174
  }
7082
7175
 
7083
- return _extends$y({}, state, {
7176
+ return _extends$z({}, state, {
7084
7177
  toasts: state.toasts.map(function (t) {
7085
- return t.id === action.toast.id ? _extends$y({}, t, action.toast) : t;
7178
+ return t.id === action.toast.id ? _extends$z({}, t, action.toast) : t;
7086
7179
  })
7087
7180
  });
7088
7181
 
@@ -7109,9 +7202,9 @@ var reducer = function reducer(state, action) {
7109
7202
  });
7110
7203
  }
7111
7204
 
7112
- return _extends$y({}, state, {
7205
+ return _extends$z({}, state, {
7113
7206
  toasts: state.toasts.map(function (t) {
7114
- return t.id === toastId || toastId === undefined ? _extends$y({}, t, {
7207
+ return t.id === toastId || toastId === undefined ? _extends$z({}, t, {
7115
7208
  visible: false
7116
7209
  }) : t;
7117
7210
  })
@@ -7119,28 +7212,28 @@ var reducer = function reducer(state, action) {
7119
7212
 
7120
7213
  case ActionType.REMOVE_TOAST:
7121
7214
  if (action.toastId === undefined) {
7122
- return _extends$y({}, state, {
7215
+ return _extends$z({}, state, {
7123
7216
  toasts: []
7124
7217
  });
7125
7218
  }
7126
7219
 
7127
- return _extends$y({}, state, {
7220
+ return _extends$z({}, state, {
7128
7221
  toasts: state.toasts.filter(function (t) {
7129
7222
  return t.id !== action.toastId;
7130
7223
  })
7131
7224
  });
7132
7225
 
7133
7226
  case ActionType.START_PAUSE:
7134
- return _extends$y({}, state, {
7227
+ return _extends$z({}, state, {
7135
7228
  pausedAt: action.time
7136
7229
  });
7137
7230
 
7138
7231
  case ActionType.END_PAUSE:
7139
7232
  var diff = action.time - (state.pausedAt || 0);
7140
- return _extends$y({}, state, {
7233
+ return _extends$z({}, state, {
7141
7234
  pausedAt: undefined,
7142
7235
  toasts: state.toasts.map(function (t) {
7143
- return _extends$y({}, t, {
7236
+ return _extends$z({}, t, {
7144
7237
  pauseDuration: t.pauseDuration + diff
7145
7238
  });
7146
7239
  })
@@ -7187,12 +7280,12 @@ var useStore = function useStore(toastOptions) {
7187
7280
  var mergedToasts = state.toasts.map(function (t) {
7188
7281
  var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
7189
7282
 
7190
- return _extends$y({}, toastOptions, toastOptions[t.type], t, {
7283
+ return _extends$z({}, toastOptions, toastOptions[t.type], t, {
7191
7284
  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],
7192
- style: _extends$y({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7285
+ style: _extends$z({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7193
7286
  });
7194
7287
  });
7195
- return _extends$y({}, state, {
7288
+ return _extends$z({}, state, {
7196
7289
  toasts: mergedToasts
7197
7290
  });
7198
7291
  };
@@ -7202,7 +7295,7 @@ var createToast = function createToast(message, type, opts) {
7202
7295
  type = 'blank';
7203
7296
  }
7204
7297
 
7205
- return _extends$y({
7298
+ return _extends$z({
7206
7299
  createdAt: Date.now(),
7207
7300
  visible: true,
7208
7301
  type: type,
@@ -7252,14 +7345,14 @@ toast.remove = function (toastId) {
7252
7345
  };
7253
7346
 
7254
7347
  toast.promise = function (promise, msgs, opts) {
7255
- var id = toast.loading(msgs.loading, _extends$y({}, opts, opts == null ? void 0 : opts.loading));
7348
+ var id = toast.loading(msgs.loading, _extends$z({}, opts, opts == null ? void 0 : opts.loading));
7256
7349
  promise.then(function (p) {
7257
- toast.success(resolveValue(msgs.success, p), _extends$y({
7350
+ toast.success(resolveValue(msgs.success, p), _extends$z({
7258
7351
  id: id
7259
7352
  }, opts, opts == null ? void 0 : opts.success));
7260
7353
  return p;
7261
7354
  })["catch"](function (e) {
7262
- toast.error(resolveValue(msgs.error, e), _extends$y({
7355
+ toast.error(resolveValue(msgs.error, e), _extends$z({
7263
7356
  id: id
7264
7357
  }, opts, opts == null ? void 0 : opts.error));
7265
7358
  });
@@ -7598,7 +7691,7 @@ var ToastBar = /*#__PURE__*/memo(function (_ref2) {
7598
7691
  var message = createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
7599
7692
  return createElement(ToastBarBase, {
7600
7693
  className: toast.className,
7601
- style: _extends$y({}, animationStyle, style, toast.style)
7694
+ style: _extends$z({}, animationStyle, style, toast.style)
7602
7695
  }, typeof children === 'function' ? children({
7603
7696
  icon: icon,
7604
7697
  message: message
@@ -7628,7 +7721,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
7628
7721
  } : position.includes('right') ? {
7629
7722
  justifyContent: 'flex-end'
7630
7723
  } : {};
7631
- return _extends$y({
7724
+ return _extends$z({
7632
7725
  left: 0,
7633
7726
  right: 0,
7634
7727
  display: 'flex',
@@ -7655,7 +7748,7 @@ var Toaster = function Toaster(_ref) {
7655
7748
  handlers = _useToaster.handlers;
7656
7749
 
7657
7750
  return createElement("div", {
7658
- style: _extends$y({
7751
+ style: _extends$z({
7659
7752
  position: 'fixed',
7660
7753
  zIndex: 9999,
7661
7754
  top: DEFAULT_OFFSET,
@@ -7690,82 +7783,82 @@ var Toaster = function Toaster(_ref) {
7690
7783
  }));
7691
7784
  };
7692
7785
 
7693
- var _path$v;
7786
+ var _path$w;
7694
7787
 
7695
- 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); }
7788
+ 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); }
7696
7789
 
7697
7790
  function SvgCheckSolid(props) {
7698
- return /*#__PURE__*/React.createElement("svg", _extends$x({
7791
+ return /*#__PURE__*/React.createElement("svg", _extends$y({
7699
7792
  xmlns: "http://www.w3.org/2000/svg",
7700
7793
  className: "h-5 w-5",
7701
7794
  viewBox: "0 0 20 20",
7702
7795
  fill: "currentColor"
7703
- }, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
7796
+ }, props), _path$w || (_path$w = /*#__PURE__*/React.createElement("path", {
7704
7797
  fillRule: "evenodd",
7705
7798
  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",
7706
7799
  clipRule: "evenodd"
7707
7800
  })));
7708
7801
  }
7709
7802
 
7710
- var _path$u;
7803
+ var _path$v;
7711
7804
 
7712
- 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); }
7805
+ 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); }
7713
7806
 
7714
7807
  function SvgXIcon(props) {
7715
- return /*#__PURE__*/React.createElement("svg", _extends$w({
7808
+ return /*#__PURE__*/React.createElement("svg", _extends$x({
7716
7809
  xmlns: "http://www.w3.org/2000/svg",
7717
7810
  viewBox: "0 0 20 20",
7718
7811
  fill: "currentColor"
7719
- }, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
7812
+ }, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
7720
7813
  fill: "evenodd",
7721
7814
  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",
7722
7815
  clipRule: "evenodd"
7723
7816
  })));
7724
7817
  }
7725
7818
 
7726
- var _path$t;
7819
+ var _path$u;
7727
7820
 
7728
- 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); }
7821
+ 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); }
7729
7822
 
7730
7823
  function SvgXIconSolid(props) {
7731
- return /*#__PURE__*/React.createElement("svg", _extends$v({
7824
+ return /*#__PURE__*/React.createElement("svg", _extends$w({
7732
7825
  className: "plc-w-4 plc-h-4",
7733
7826
  fill: "currentColor",
7734
7827
  xmlns: "http://www.w3.org/2000/svg",
7735
7828
  viewBox: "0 0 100 100"
7736
- }, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
7829
+ }, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
7737
7830
  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"
7738
7831
  })));
7739
7832
  }
7740
7833
 
7741
- var _path$s;
7834
+ var _path$t;
7742
7835
 
7743
- 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); }
7836
+ 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); }
7744
7837
 
7745
7838
  function SvgExclamation(props) {
7746
- return /*#__PURE__*/React.createElement("svg", _extends$u({
7839
+ return /*#__PURE__*/React.createElement("svg", _extends$v({
7747
7840
  className: "plc-w-4 plc-h-4 plc-mr-1",
7748
7841
  xmlns: "http://www.w3.org/2000/svg",
7749
7842
  viewBox: "0 0 20 20",
7750
7843
  fill: "currentColor"
7751
- }, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
7844
+ }, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
7752
7845
  fillRule: "evenodd",
7753
7846
  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",
7754
7847
  clipRule: "evenodd"
7755
7848
  })));
7756
7849
  }
7757
7850
 
7758
- var _path$r, _path2$4;
7851
+ var _path$s, _path2$4;
7759
7852
 
7760
- 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); }
7853
+ 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); }
7761
7854
 
7762
7855
  function SvgSpinner(props) {
7763
- return /*#__PURE__*/React.createElement("svg", _extends$t({
7856
+ return /*#__PURE__*/React.createElement("svg", _extends$u({
7764
7857
  className: "plc-animate-spin",
7765
7858
  viewBox: "0 0 24 24",
7766
7859
  fill: "currentColor",
7767
7860
  xmlns: "http://www.w3.org/2000/svg"
7768
- }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
7861
+ }, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
7769
7862
  opacity: 0.2,
7770
7863
  fill: "evenodd",
7771
7864
  clipRule: "evenodd",
@@ -8799,6 +8892,10 @@ const initViewFromURL = () => {
8799
8892
  return verifyEmailTokenFromUrl();
8800
8893
  }
8801
8894
 
8895
+ if (view === "invoice-details") {
8896
+ return showInvoiceDetailsFromUrl();
8897
+ }
8898
+
8802
8899
  switchView(view);
8803
8900
  });
8804
8901
  }
@@ -8975,6 +9072,28 @@ const verifyEmailTokenFromUrl = () => {
8975
9072
  });
8976
9073
  };
8977
9074
 
9075
+ const showInvoiceDetailsFromUrl = () => {
9076
+ const {
9077
+ isAuthenticated,
9078
+ setInvoice,
9079
+ switchView
9080
+ } = usePelcro.getStore();
9081
+
9082
+ if (!isAuthenticated()) {
9083
+ return switchView("login");
9084
+ }
9085
+
9086
+ const invoiceId = window.Pelcro.helpers.getURLParameter("id");
9087
+ const wasSetSuccessfully = setInvoice(invoiceId);
9088
+
9089
+ if (!wasSetSuccessfully) {
9090
+ const translations = i18next.t("messages", {
9091
+ returnObjects: true
9092
+ });
9093
+ notify.error(translations.invalidInvoice);
9094
+ }
9095
+ };
9096
+
8978
9097
  const defaultOptions = {
8979
9098
  loadPaymentSDKs: true,
8980
9099
  loadAuth0SDK: true,
@@ -9314,7 +9433,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
9314
9433
  const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
9315
9434
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
9316
9435
 
9317
- const initialState$g = {
9436
+ const initialState$h = {
9318
9437
  email: "",
9319
9438
  password: "",
9320
9439
  emailError: null,
@@ -9325,10 +9444,10 @@ const initialState$g = {
9325
9444
  content: ""
9326
9445
  }
9327
9446
  };
9328
- const store$g = /*#__PURE__*/createContext(initialState$g);
9447
+ const store$h = /*#__PURE__*/createContext(initialState$h);
9329
9448
  const {
9330
- Provider: Provider$g
9331
- } = store$g;
9449
+ Provider: Provider$h
9450
+ } = store$h;
9332
9451
 
9333
9452
  const LoginContainer = ({
9334
9453
  style,
@@ -9435,7 +9554,7 @@ const LoginContainer = ({
9435
9554
  });
9436
9555
 
9437
9556
  case RESET_LOGIN_FORM:
9438
- return initialState$g;
9557
+ return initialState$h;
9439
9558
 
9440
9559
  case DISABLE_LOGIN_BUTTON:
9441
9560
  return lib_7({ ...state,
@@ -9453,12 +9572,12 @@ const LoginContainer = ({
9453
9572
  default:
9454
9573
  return state;
9455
9574
  }
9456
- }, initialState$g);
9575
+ }, initialState$h);
9457
9576
  return /*#__PURE__*/React__default.createElement("div", {
9458
9577
  style: { ...style
9459
9578
  },
9460
9579
  className: `pelcro-container pelcro-login-container ${className}`
9461
- }, /*#__PURE__*/React__default.createElement(Provider$g, {
9580
+ }, /*#__PURE__*/React__default.createElement(Provider$h, {
9462
9581
  value: {
9463
9582
  state,
9464
9583
  dispatch
@@ -9466,12 +9585,12 @@ const LoginContainer = ({
9466
9585
  }, children.length ? children.map((child, i) => {
9467
9586
  if (child) {
9468
9587
  return /*#__PURE__*/React__default.cloneElement(child, {
9469
- store: store$g,
9588
+ store: store$h,
9470
9589
  key: i
9471
9590
  });
9472
9591
  }
9473
9592
  }) : /*#__PURE__*/React__default.cloneElement(children, {
9474
- store: store$g
9593
+ store: store$h
9475
9594
  })));
9476
9595
  };
9477
9596
 
@@ -9716,7 +9835,7 @@ const LoginButton = ({
9716
9835
  buttonDisabled
9717
9836
  },
9718
9837
  dispatch
9719
- } = useContext(store$g);
9838
+ } = useContext(store$h);
9720
9839
  const {
9721
9840
  t
9722
9841
  } = useTranslation("login");
@@ -9737,23 +9856,23 @@ const LoginButton = ({
9737
9856
  };
9738
9857
 
9739
9858
  const LoginEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
9740
- store: store$g
9859
+ store: store$h
9741
9860
  }, props));
9742
9861
 
9743
9862
  const LoginPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
9744
- store: store$g
9863
+ store: store$h
9745
9864
  }, props));
9746
9865
 
9747
- var _path$q;
9866
+ var _path$r;
9748
9867
 
9749
- 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); }
9868
+ 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); }
9750
9869
 
9751
9870
  function SvgCheck(props) {
9752
- return /*#__PURE__*/React.createElement("svg", _extends$s({
9871
+ return /*#__PURE__*/React.createElement("svg", _extends$t({
9753
9872
  xmlns: "http://www.w3.org/2000/svg",
9754
9873
  fill: "currentColor",
9755
9874
  viewBox: "0 0 20 20"
9756
- }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
9875
+ }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
9757
9876
  fillRule: "evenodd",
9758
9877
  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",
9759
9878
  clipRule: "evenodd"
@@ -9818,7 +9937,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
9818
9937
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
9819
9938
  facebookLoginRenderProps.FacebookLogin;
9820
9939
 
9821
- const initialState$f = {
9940
+ const initialState$g = {
9822
9941
  email: "",
9823
9942
  password: "",
9824
9943
  emailError: null,
@@ -9835,10 +9954,10 @@ const initialState$f = {
9835
9954
  content: ""
9836
9955
  }
9837
9956
  };
9838
- const store$f = /*#__PURE__*/createContext(initialState$f);
9957
+ const store$g = /*#__PURE__*/createContext(initialState$g);
9839
9958
  const {
9840
- Provider: Provider$f
9841
- } = store$f;
9959
+ Provider: Provider$g
9960
+ } = store$g;
9842
9961
 
9843
9962
  const RegisterContainer = ({
9844
9963
  style,
@@ -10021,7 +10140,7 @@ const RegisterContainer = ({
10021
10140
  });
10022
10141
 
10023
10142
  case RESET_LOGIN_FORM:
10024
- return initialState$f;
10143
+ return initialState$g;
10025
10144
 
10026
10145
  case DISABLE_REGISTRATION_BUTTON:
10027
10146
  return lib_7({ ...state,
@@ -10039,12 +10158,12 @@ const RegisterContainer = ({
10039
10158
  default:
10040
10159
  return state;
10041
10160
  }
10042
- }, initialState$f);
10161
+ }, initialState$g);
10043
10162
  return /*#__PURE__*/React__default.createElement("div", {
10044
10163
  style: { ...style
10045
10164
  },
10046
10165
  className: `pelcro-container pelcro-register-container ${className}`
10047
- }, /*#__PURE__*/React__default.createElement(Provider$f, {
10166
+ }, /*#__PURE__*/React__default.createElement(Provider$g, {
10048
10167
  value: {
10049
10168
  state,
10050
10169
  dispatch
@@ -10052,12 +10171,12 @@ const RegisterContainer = ({
10052
10171
  }, children.length ? children.map((child, i) => {
10053
10172
  if (child) {
10054
10173
  return /*#__PURE__*/React__default.cloneElement(child, {
10055
- store: store$f,
10174
+ store: store$g,
10056
10175
  key: i
10057
10176
  });
10058
10177
  }
10059
10178
  }) : /*#__PURE__*/React__default.cloneElement(children, {
10060
- store: store$f
10179
+ store: store$g
10061
10180
  })));
10062
10181
  };
10063
10182
  /**
@@ -10072,15 +10191,15 @@ function hasSecurityTokenEnabled$1() {
10072
10191
  return hasSecuritySdkLoaded;
10073
10192
  }
10074
10193
 
10075
- var _path$p;
10194
+ var _path$q;
10076
10195
 
10077
- 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); }
10196
+ 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); }
10078
10197
 
10079
10198
  function SvgFacebookLogo(props) {
10080
- return /*#__PURE__*/React.createElement("svg", _extends$r({
10199
+ return /*#__PURE__*/React.createElement("svg", _extends$s({
10081
10200
  xmlns: "http://www.w3.org/2000/svg",
10082
10201
  viewBox: "88.428 12.828 107.543 207.085"
10083
- }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
10202
+ }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
10084
10203
  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",
10085
10204
  fill: "#3c5a9a"
10086
10205
  })));
@@ -10097,10 +10216,10 @@ const FacebookLoginButton = ({
10097
10216
  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;
10098
10217
  const {
10099
10218
  dispatch: loginDispatch
10100
- } = useContext(store$g);
10219
+ } = useContext(store$h);
10101
10220
  const {
10102
10221
  dispatch: registerDispatch
10103
- } = useContext(store$f);
10222
+ } = useContext(store$g);
10104
10223
 
10105
10224
  const onSuccess = facebookUser => {
10106
10225
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -10153,15 +10272,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
10153
10272
  unwrapExports(googleLogin);
10154
10273
  var googleLogin_1 = googleLogin.GoogleLogin;
10155
10274
 
10156
- var _path$o, _path2$3, _path3$1, _path4;
10275
+ var _path$p, _path2$3, _path3$1, _path4;
10157
10276
 
10158
- 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); }
10277
+ 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); }
10159
10278
 
10160
10279
  function SvgGoogleLogo(props) {
10161
- return /*#__PURE__*/React.createElement("svg", _extends$q({
10280
+ return /*#__PURE__*/React.createElement("svg", _extends$r({
10162
10281
  viewBox: "0 0 24 24",
10163
10282
  xmlns: "http://www.w3.org/2000/svg"
10164
- }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10283
+ }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
10165
10284
  fill: "#4285F4",
10166
10285
  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"
10167
10286
  })), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
@@ -10187,10 +10306,10 @@ const GoogleLoginButton = ({
10187
10306
  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;
10188
10307
  const {
10189
10308
  dispatch: loginDispatch
10190
- } = useContext(store$g);
10309
+ } = useContext(store$h);
10191
10310
  const {
10192
10311
  dispatch: registerDispatch
10193
- } = useContext(store$f);
10312
+ } = useContext(store$g);
10194
10313
 
10195
10314
  const onSuccess = response => {
10196
10315
  var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
@@ -10238,15 +10357,15 @@ const GoogleLoginButton = ({
10238
10357
  }) : null;
10239
10358
  };
10240
10359
 
10241
- var _path$n;
10360
+ var _path$o;
10242
10361
 
10243
- 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); }
10362
+ 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); }
10244
10363
 
10245
10364
  function SvgAuth0Logo(props) {
10246
- return /*#__PURE__*/React.createElement("svg", _extends$p({
10365
+ return /*#__PURE__*/React.createElement("svg", _extends$q({
10247
10366
  viewBox: "0 0 256 285",
10248
10367
  xmlns: "http://www.w3.org/2000/svg"
10249
- }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
10368
+ }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10250
10369
  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"
10251
10370
  })));
10252
10371
  }
@@ -10286,10 +10405,10 @@ const Auth0LoginButton = ({
10286
10405
  }, [auth0Enabled, auth0Loaded]);
10287
10406
  const {
10288
10407
  dispatch: loginDispatch
10289
- } = useContext(store$g);
10408
+ } = useContext(store$h);
10290
10409
  const {
10291
10410
  dispatch: registerDispatch
10292
- } = useContext(store$f);
10411
+ } = useContext(store$g);
10293
10412
 
10294
10413
  function handleClick() {
10295
10414
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
@@ -10422,15 +10541,15 @@ function LoginView(props) {
10422
10541
  }, /*#__PURE__*/React__default.createElement(GoogleLoginButton, null), /*#__PURE__*/React__default.createElement(FacebookLoginButton, null), /*#__PURE__*/React__default.createElement(Auth0LoginButton, null))))));
10423
10542
  }
10424
10543
 
10425
- var _path$m, _path2$2, _path3;
10544
+ var _path$n, _path2$2, _path3;
10426
10545
 
10427
- 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); }
10546
+ 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); }
10428
10547
 
10429
10548
  function SvgPelcroAuthorship(props) {
10430
- return /*#__PURE__*/React.createElement("svg", _extends$o({
10549
+ return /*#__PURE__*/React.createElement("svg", _extends$p({
10431
10550
  xmlns: "http://www.w3.org/2000/svg",
10432
10551
  viewBox: "0 -80.652 497.072 179.991"
10433
- }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
10552
+ }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
10434
10553
  fill: "none",
10435
10554
  stroke: "#4a4a4a",
10436
10555
  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"
@@ -10577,11 +10696,11 @@ function LoginModal({
10577
10696
  LoginModal.viewId = "login";
10578
10697
 
10579
10698
  const RegisterEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
10580
- store: store$f
10699
+ store: store$g
10581
10700
  }, props));
10582
10701
 
10583
10702
  const RegisterPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
10584
- store: store$f
10703
+ store: store$g
10585
10704
  }, props));
10586
10705
 
10587
10706
  const RegisterButton = ({
@@ -10601,7 +10720,7 @@ const RegisterButton = ({
10601
10720
  buttonDisabled
10602
10721
  },
10603
10722
  dispatch
10604
- } = useContext(store$f);
10723
+ } = useContext(store$g);
10605
10724
  const {
10606
10725
  t
10607
10726
  } = useTranslation("register");
@@ -10739,7 +10858,7 @@ function FirstName({
10739
10858
  }
10740
10859
 
10741
10860
  const RegisterFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
10742
- store: store$f
10861
+ store: store$g
10743
10862
  }, props));
10744
10863
 
10745
10864
  function LastName({
@@ -10770,7 +10889,7 @@ function LastName({
10770
10889
  }
10771
10890
 
10772
10891
  const RegisterLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
10773
- store: store$f
10892
+ store: store$g
10774
10893
  }, props));
10775
10894
 
10776
10895
  /**
@@ -10894,7 +11013,7 @@ function TextInput({
10894
11013
 
10895
11014
  const RegisterTextInput = props => {
10896
11015
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
10897
- store: store$f
11016
+ store: store$g
10898
11017
  }));
10899
11018
  };
10900
11019
 
@@ -12563,7 +12682,8 @@ const SUBSCRIPTION_TYPES = {
12563
12682
  CREATE_SUBSCRIPTION: "CREATE_SUBSCRIPTION",
12564
12683
  CREATE_GIFTED_SUBSCRIPTION: "CREATE_GIFTED_SUBSCRIPTION",
12565
12684
  RENEW_SUBSCRIPTION: "RENEW_SUBSCRIPTION",
12566
- RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION"
12685
+ RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION",
12686
+ PAY_INVOICE: "PAY_INVOICE"
12567
12687
  };
12568
12688
 
12569
12689
  var _isPaymentGatewayInvalid = /*#__PURE__*/new WeakMap();
@@ -12625,6 +12745,7 @@ class Subscription {
12625
12745
  * @property {number} [subscriptionIdToRenew]
12626
12746
  * @property {number} [quantity]
12627
12747
  * @property {string} addressId
12748
+ * @property {number} invoiceId
12628
12749
  */
12629
12750
 
12630
12751
  /**
@@ -12665,6 +12786,8 @@ var _renewSubscription = /*#__PURE__*/new WeakMap();
12665
12786
 
12666
12787
  var _renewGiftedSubscription = /*#__PURE__*/new WeakMap();
12667
12788
 
12789
+ var _payInvoice = /*#__PURE__*/new WeakMap();
12790
+
12668
12791
  class StripeGateway {
12669
12792
  constructor() {
12670
12793
  _paymentGateway.set(this, {
@@ -12688,6 +12811,9 @@ class StripeGateway {
12688
12811
  case types.RENEW_GIFTED_SUBSCRIPTION:
12689
12812
  return _classPrivateFieldGet(this, _renewGiftedSubscription).call(this, options, callback);
12690
12813
 
12814
+ case types.PAY_INVOICE:
12815
+ return _classPrivateFieldGet(this, _payInvoice).call(this, options, callback);
12816
+
12691
12817
  default:
12692
12818
  console.error("Unsupported subscriptiion method: Stripe Gateway");
12693
12819
  }
@@ -12796,6 +12922,23 @@ class StripeGateway {
12796
12922
  });
12797
12923
  }
12798
12924
  });
12925
+
12926
+ _payInvoice.set(this, {
12927
+ writable: true,
12928
+ value: (options, callback) => {
12929
+ const {
12930
+ token,
12931
+ invoiceId
12932
+ } = options;
12933
+ window.Pelcro.invoice.pay({
12934
+ payment_gateway: _classPrivateFieldGet(this, _paymentGateway),
12935
+ gateway_token: token,
12936
+ invoice_id: invoiceId
12937
+ }, (err, res) => {
12938
+ callback(err, res);
12939
+ });
12940
+ }
12941
+ });
12799
12942
  }
12800
12943
 
12801
12944
  }
@@ -12809,6 +12952,8 @@ var _createSubscription2 = /*#__PURE__*/new WeakMap();
12809
12952
 
12810
12953
  var _createGiftedSubscription2 = /*#__PURE__*/new WeakMap();
12811
12954
 
12955
+ var _payInvoice2 = /*#__PURE__*/new WeakMap();
12956
+
12812
12957
  class PaypalGateWay {
12813
12958
  constructor() {
12814
12959
  _paymentGateway2.set(this, {
@@ -12826,6 +12971,9 @@ class PaypalGateWay {
12826
12971
  case types.CREATE_GIFTED_SUBSCRIPTION:
12827
12972
  return _classPrivateFieldGet(this, _createGiftedSubscription2).call(this, options, callback);
12828
12973
 
12974
+ case types.PAY_INVOICE:
12975
+ return _classPrivateFieldGet(this, _payInvoice2).call(this, options, callback);
12976
+
12829
12977
  default:
12830
12978
  console.error("Unsupported subscriptiion method: PayPal Gateway");
12831
12979
  }
@@ -12886,6 +13034,23 @@ class PaypalGateWay {
12886
13034
  });
12887
13035
  }
12888
13036
  });
13037
+
13038
+ _payInvoice2.set(this, {
13039
+ writable: true,
13040
+ value: (options, callback) => {
13041
+ const {
13042
+ token,
13043
+ invoiceId
13044
+ } = options;
13045
+ window.Pelcro.invoice.pay({
13046
+ payment_gateway: _classPrivateFieldGet(this, _paymentGateway2),
13047
+ gateway_token: token,
13048
+ invoice_id: invoiceId
13049
+ }, (err, res) => {
13050
+ callback(err, res);
13051
+ });
13052
+ }
13053
+ });
12889
13054
  }
12890
13055
 
12891
13056
  }
@@ -12910,7 +13075,7 @@ class PaypalGateWay {
12910
13075
 
12911
13076
  /** @type {PaymentStateType} */
12912
13077
 
12913
- const initialState$e = {
13078
+ const initialState$f = {
12914
13079
  disableSubmit: false,
12915
13080
  isLoading: false,
12916
13081
  disableCouponButton: false,
@@ -12929,10 +13094,10 @@ const initialState$e = {
12929
13094
  content: ""
12930
13095
  }
12931
13096
  };
12932
- const store$e = /*#__PURE__*/createContext(initialState$e);
13097
+ const store$f = /*#__PURE__*/createContext(initialState$f);
12933
13098
  const {
12934
- Provider: Provider$e
12935
- } = store$e;
13099
+ Provider: Provider$f
13100
+ } = store$f;
12936
13101
 
12937
13102
  const PaymentMethodContainerWithoutStripe = ({
12938
13103
  style,
@@ -12945,7 +13110,7 @@ const PaymentMethodContainerWithoutStripe = ({
12945
13110
  onFailure = () => {},
12946
13111
  ...props
12947
13112
  }) => {
12948
- var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift;
13113
+ var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift, _props$invoice;
12949
13114
 
12950
13115
  const {
12951
13116
  t
@@ -12962,6 +13127,7 @@ const PaymentMethodContainerWithoutStripe = ({
12962
13127
  const selectedAddressId = (_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : pelcroStore.selectedAddressId;
12963
13128
  const giftRecipient = (_props$giftRecipient = props.giftRecipient) !== null && _props$giftRecipient !== void 0 ? _props$giftRecipient : pelcroStore.giftRecipient;
12964
13129
  const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
13130
+ const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
12965
13131
  useEffect(() => {
12966
13132
  if (window.Pelcro.coupon.getFromUrl()) {
12967
13133
  dispatch({
@@ -13530,6 +13696,40 @@ const PaymentMethodContainerWithoutStripe = ({
13530
13696
  });
13531
13697
  };
13532
13698
 
13699
+ const payInvoice = (gatewayService, gatewayToken, dispatch) => {
13700
+ const subscription = new Subscription(gatewayService);
13701
+ return subscription.execute({
13702
+ type: SUBSCRIPTION_TYPES.PAY_INVOICE,
13703
+ token: gatewayToken,
13704
+ invoiceId: invoice.id
13705
+ }, (err, res) => {
13706
+ dispatch({
13707
+ type: DISABLE_SUBMIT,
13708
+ payload: false
13709
+ });
13710
+ dispatch({
13711
+ type: LOADING,
13712
+ payload: false
13713
+ });
13714
+
13715
+ if (err) {
13716
+ onFailure(err);
13717
+ return dispatch({
13718
+ type: SHOW_ALERT,
13719
+ payload: {
13720
+ type: "error",
13721
+ content: getErrorMessages(err)
13722
+ }
13723
+ });
13724
+ }
13725
+
13726
+ set({
13727
+ invoice: null
13728
+ });
13729
+ onSuccess(res);
13730
+ });
13731
+ };
13732
+
13533
13733
  const updatePaymentSource = (state, dispatch) => {
13534
13734
  return stripe.createSource({
13535
13735
  type: "card"
@@ -13604,13 +13804,17 @@ const PaymentMethodContainerWithoutStripe = ({
13604
13804
  source,
13605
13805
  error
13606
13806
  }) => {
13607
- var _ref, _state$updatedPrice, _source$card3;
13807
+ var _ref, _ref2, _state$updatedPrice, _source$card3;
13608
13808
 
13609
13809
  if (error) {
13610
13810
  return handlePaymentError(error);
13611
13811
  }
13612
13812
 
13613
13813
  const getOrderItemsTotal = () => {
13814
+ if (!order) {
13815
+ return null;
13816
+ }
13817
+
13614
13818
  const isQuickPurchase = !Array.isArray(order);
13615
13819
 
13616
13820
  if (isQuickPurchase) {
@@ -13626,7 +13830,7 @@ const PaymentMethodContainerWithoutStripe = ({
13626
13830
  }, 0);
13627
13831
  };
13628
13832
 
13629
- const totalAmount = (_ref = (_state$updatedPrice = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref !== void 0 ? _ref : getOrderItemsTotal();
13833
+ const totalAmount = (_ref = (_ref2 = (_state$updatedPrice = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref2 !== void 0 ? _ref2 : invoice.amount_remaining) !== null && _ref !== void 0 ? _ref : getOrderItemsTotal();
13630
13834
 
13631
13835
  if ((source === null || source === void 0 ? void 0 : (_source$card3 = source.card) === null || _source$card3 === void 0 ? void 0 : _source$card3.three_d_secure) === "required" && totalAmount > 0) {
13632
13836
  return resolveTaxCalculation().then(res => {
@@ -13659,6 +13863,10 @@ const PaymentMethodContainerWithoutStripe = ({
13659
13863
  const resolveTaxCalculation = () => {
13660
13864
  var _window$Pelcro$site$r2;
13661
13865
 
13866
+ if (type === "invoicePayment") {
13867
+ return new Promise(resolve => resolve());
13868
+ }
13869
+
13662
13870
  const taxesEnabled = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.taxes_enabled;
13663
13871
  return new Promise((resolve, reject) => {
13664
13872
  // resolve early if taxes isn't enabled
@@ -13732,6 +13940,8 @@ const PaymentMethodContainerWithoutStripe = ({
13732
13940
  subscribe(stripeSource, state, dispatch);
13733
13941
  } else if (stripeSource && type === "orderCreate") {
13734
13942
  purchase(stripeSource, state, dispatch);
13943
+ } else if (stripeSource && type === "invoicePayment") {
13944
+ payInvoice(new StripeGateway(), stripeSource.id, dispatch);
13735
13945
  }
13736
13946
  };
13737
13947
 
@@ -13865,7 +14075,13 @@ const PaymentMethodContainerWithoutStripe = ({
13865
14075
  });
13866
14076
 
13867
14077
  case HANDLE_PAYPAL_SUBSCRIPTION:
13868
- return lib_5(state, () => handlePaypalSubscription(state, action.payload));
14078
+ return lib_5(state, (state, dispatch) => {
14079
+ if (type === "invoicePayment") {
14080
+ payInvoice(new PaypalGateWay(), action.payload, dispatch);
14081
+ } else {
14082
+ handlePaypalSubscription(state, action.payload);
14083
+ }
14084
+ });
13869
14085
 
13870
14086
  case SET_UPDATED_PRICE:
13871
14087
  return lib_7({ ...state,
@@ -13923,21 +14139,21 @@ const PaymentMethodContainerWithoutStripe = ({
13923
14139
  default:
13924
14140
  return state;
13925
14141
  }
13926
- }, initialState$e);
14142
+ }, initialState$f);
13927
14143
  return /*#__PURE__*/React__default.createElement("div", {
13928
14144
  style: { ...style
13929
14145
  },
13930
14146
  className: `pelcro-container pelcro-payment-container ${className}`
13931
- }, /*#__PURE__*/React__default.createElement(Provider$e, {
14147
+ }, /*#__PURE__*/React__default.createElement(Provider$f, {
13932
14148
  value: {
13933
14149
  state,
13934
14150
  dispatch
13935
14151
  }
13936
14152
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
13937
- store: store$e,
14153
+ store: store$f,
13938
14154
  key: i
13939
14155
  })) : /*#__PURE__*/React__default.cloneElement(children, {
13940
- store: store$e
14156
+ store: store$f
13941
14157
  })));
13942
14158
  };
13943
14159
 
@@ -13959,7 +14175,7 @@ const PaymentMethodContainer = props => {
13959
14175
  stripeAccount: window.Pelcro.site.read().account_id,
13960
14176
  locale: getPageOrDefaultLanguage()
13961
14177
  }, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
13962
- store: store$e
14178
+ store: store$f
13963
14179
  }, props))));
13964
14180
  }
13965
14181
 
@@ -14012,7 +14228,7 @@ const PelcroPaymentRequestButton = props => {
14012
14228
  currentPlan,
14013
14229
  updatedPrice
14014
14230
  }
14015
- } = useContext(store$e);
14231
+ } = useContext(store$f);
14016
14232
 
14017
14233
  const updatePaymentRequest = () => {
14018
14234
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -14072,7 +14288,7 @@ const DiscountedPrice = props => {
14072
14288
  taxAmount,
14073
14289
  percentOff
14074
14290
  }
14075
- } = useContext(store$e);
14291
+ } = useContext(store$f);
14076
14292
  const {
14077
14293
  order,
14078
14294
  plan
@@ -14122,7 +14338,7 @@ const SubmitPaymentMethod = ({
14122
14338
  isLoading,
14123
14339
  updatedPrice
14124
14340
  }
14125
- } = useContext(store$e);
14341
+ } = useContext(store$f);
14126
14342
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
14127
14343
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
14128
14344
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -14143,17 +14359,17 @@ const SubmitPaymentMethod = ({
14143
14359
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
14144
14360
  };
14145
14361
 
14146
- var _path$l;
14362
+ var _path$m;
14147
14363
 
14148
- 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); }
14364
+ 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); }
14149
14365
 
14150
14366
  function SvgArrowLeft(props) {
14151
- return /*#__PURE__*/React.createElement("svg", _extends$n({
14367
+ return /*#__PURE__*/React.createElement("svg", _extends$o({
14152
14368
  xmlns: "http://www.w3.org/2000/svg",
14153
14369
  fill: "none",
14154
14370
  viewBox: "0 0 24 24",
14155
14371
  stroke: "currentColor"
14156
- }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
14372
+ }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
14157
14373
  strokeLinecap: "round",
14158
14374
  strokeLinejoin: "round",
14159
14375
  strokeWidth: 2,
@@ -14172,7 +14388,7 @@ const ApplyCouponButton = ({
14172
14388
  disableCouponButton
14173
14389
  },
14174
14390
  dispatch
14175
- } = useContext(store$e);
14391
+ } = useContext(store$f);
14176
14392
  const {
14177
14393
  t
14178
14394
  } = useTranslation("checkoutForm");
@@ -14206,7 +14422,7 @@ const CouponCodeField = props => {
14206
14422
  couponCode,
14207
14423
  couponError
14208
14424
  }
14209
- } = useContext(store$e);
14425
+ } = useContext(store$f);
14210
14426
 
14211
14427
  const onCouponCodeChange = e => {
14212
14428
  dispatch({
@@ -14235,17 +14451,17 @@ const CouponCodeField = props => {
14235
14451
  }, props));
14236
14452
  };
14237
14453
 
14238
- var _path$k;
14454
+ var _path$l;
14239
14455
 
14240
- 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); }
14456
+ 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); }
14241
14457
 
14242
14458
  function SvgTicket(props) {
14243
- return /*#__PURE__*/React.createElement("svg", _extends$m({
14459
+ return /*#__PURE__*/React.createElement("svg", _extends$n({
14244
14460
  xmlns: "http://www.w3.org/2000/svg",
14245
14461
  fill: "none",
14246
14462
  viewBox: "0 0 24 24",
14247
14463
  stroke: "currentColor"
14248
- }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
14464
+ }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
14249
14465
  strokeLinecap: "round",
14250
14466
  strokeLinejoin: "round",
14251
14467
  strokeWidth: 2,
@@ -14262,7 +14478,7 @@ const CouponCode = ({
14262
14478
  state: {
14263
14479
  enableCouponField
14264
14480
  }
14265
- } = useContext(store$e);
14481
+ } = useContext(store$f);
14266
14482
  const {
14267
14483
  t
14268
14484
  } = useTranslation("checkoutForm");
@@ -14519,17 +14735,18 @@ const PaypalSubscribeButton = props => {
14519
14735
  const {
14520
14736
  dispatch,
14521
14737
  state
14522
- } = useContext(store$e);
14738
+ } = useContext(store$f);
14523
14739
  const {
14524
14740
  product,
14525
14741
  plan,
14742
+ invoice,
14526
14743
  selectedAddressId
14527
14744
  } = usePelcro();
14528
14745
  useEffect(() => {
14529
- var _ref, _state$updatedPrice, _props$plan, _props$selectedAddres;
14746
+ var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
14530
14747
 
14531
14748
  // sometimes, price is updated. eg. Coupon codes.
14532
- const updatedPrice = (_ref = (_state$updatedPrice = state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : (_props$plan = props.plan) === null || _props$plan === void 0 ? void 0 : _props$plan.amount) !== null && _ref !== void 0 ? _ref : plan.amount;
14749
+ const updatedPrice = (_ref = (_ref2 = (_state$updatedPrice = state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : (_props$plan = props.plan) === null || _props$plan === void 0 ? void 0 : _props$plan.amount) !== null && _ref2 !== void 0 ? _ref2 : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref !== void 0 ? _ref : invoice.amount_remaining;
14533
14750
  const selectedAddress = getAddressById((_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : selectedAddressId); // initialize paypal client, then render paypal button.
14534
14751
 
14535
14752
  const initializePaypal = async () => {
@@ -14538,7 +14755,7 @@ const PaypalSubscribeButton = props => {
14538
14755
  const paypalCheckoutInstance = new PaypalClient({
14539
14756
  buttonElementID: (_props$buttonElementI = props.buttonElementID) !== null && _props$buttonElementI !== void 0 ? _props$buttonElementI : "pelcro-paypal-button",
14540
14757
  style: props.buttonStyle,
14541
- enableShippingAddress: (_props$product$addres = (_props$product = props.product) === null || _props$product === void 0 ? void 0 : _props$product.address_required) !== null && _props$product$addres !== void 0 ? _props$product$addres : product.address_required,
14758
+ enableShippingAddress: (_props$product$addres = (_props$product = props.product) === null || _props$product === void 0 ? void 0 : _props$product.address_required) !== null && _props$product$addres !== void 0 ? _props$product$addres : product === null || product === void 0 ? void 0 : product.address_required,
14542
14759
  shippingAddressEditable: props.makeAddressEditable,
14543
14760
  displayName: props.merchantDisplayName,
14544
14761
  locale: props.locale,
@@ -14548,9 +14765,9 @@ const PaypalSubscribeButton = props => {
14548
14765
  await paypalCheckoutInstance.build(); // Create paypal payment
14549
14766
 
14550
14767
  paypalCheckoutInstance.createPayment({
14551
- product: (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
14768
+ product: invoice ? invoice.plan : (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
14552
14769
  amount: updatedPrice,
14553
- address: selectedAddress,
14770
+ address: invoice ? null : selectedAddress,
14554
14771
  onButtonClick: () => {
14555
14772
  dispatch({
14556
14773
  type: DISABLE_SUBMIT,
@@ -14604,16 +14821,16 @@ const BankRedirection = () => {
14604
14821
  }));
14605
14822
  };
14606
14823
 
14607
- var _path$j;
14824
+ var _path$k;
14608
14825
 
14609
- 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); }
14826
+ 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); }
14610
14827
 
14611
14828
  function SvgLock(props) {
14612
- return /*#__PURE__*/React.createElement("svg", _extends$l({
14829
+ return /*#__PURE__*/React.createElement("svg", _extends$m({
14613
14830
  xmlns: "http://www.w3.org/2000/svg",
14614
14831
  viewBox: "0 0 20 20",
14615
14832
  fill: "currentColor"
14616
- }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
14833
+ }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
14617
14834
  fillRule: "evenodd",
14618
14835
  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",
14619
14836
  clipRule: "evenodd"
@@ -14630,7 +14847,7 @@ const SelectedPaymentMethod = () => {
14630
14847
  state: {
14631
14848
  isLoading
14632
14849
  }
14633
- } = useContext(store$e);
14850
+ } = useContext(store$f);
14634
14851
  const {
14635
14852
  switchView,
14636
14853
  selectedPaymentMethodId
@@ -14672,7 +14889,7 @@ const TaxAmount = () => {
14672
14889
  state: {
14673
14890
  taxAmount
14674
14891
  }
14675
- } = useContext(store$e);
14892
+ } = useContext(store$f);
14676
14893
  const {
14677
14894
  plan
14678
14895
  } = usePelcro();
@@ -14835,12 +15052,12 @@ function SubscriptionRenewModal({
14835
15052
  }
14836
15053
  SubscriptionRenewModal.viewId = "subscription-renew";
14837
15054
 
14838
- var _path$i;
15055
+ var _path$j;
14839
15056
 
14840
- 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); }
15057
+ 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); }
14841
15058
 
14842
15059
  function SvgGift(props) {
14843
- return /*#__PURE__*/React.createElement("svg", _extends$k({
15060
+ return /*#__PURE__*/React.createElement("svg", _extends$l({
14844
15061
  className: "plc-w-6 plc-h-6 plc-mr-2",
14845
15062
  fill: "none",
14846
15063
  stroke: "currentColor",
@@ -14849,7 +15066,7 @@ function SvgGift(props) {
14849
15066
  strokeWidth: 2,
14850
15067
  viewBox: "0 0 24 24",
14851
15068
  xmlns: "http://www.w3.org/2000/svg"
14852
- }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
15069
+ }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
14853
15070
  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"
14854
15071
  })));
14855
15072
  }
@@ -14887,10 +15104,13 @@ const getCurrentFlow = () => {
14887
15104
  const {
14888
15105
  product,
14889
15106
  giftRecipient,
14890
- giftCode
15107
+ giftCode,
15108
+ invoice
14891
15109
  } = usePelcro.getStore();
14892
15110
 
14893
- if (giftRecipient) {
15111
+ if (invoice) {
15112
+ return "invoicePayment";
15113
+ } else if (giftRecipient) {
14894
15114
  return "giftCreate";
14895
15115
  } else if (giftCode) {
14896
15116
  return "giftRedeem";
@@ -14927,6 +15147,13 @@ const getSuccessContent = i18n => {
14927
15147
  }),
14928
15148
  successTitle: i18n("messages.giftRedeem.title"),
14929
15149
  successContent: i18n("messages.giftRedeem.content")
15150
+ },
15151
+ invoicePayment: {
15152
+ successIcon: /*#__PURE__*/React__default.createElement(SvgCheckSolid, {
15153
+ className: "plc-w-32 plc-my-4 plc-text-green-500"
15154
+ }),
15155
+ successTitle: i18n("messages.invoicePayment.title"),
15156
+ successContent: i18n("messages.invoicePayment.title")
14930
15157
  }
14931
15158
  };
14932
15159
  return wordingDictionary[flow];
@@ -15180,7 +15407,7 @@ class DefaultNewsLetter extends Component {
15180
15407
 
15181
15408
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
15182
15409
 
15183
- const initialState$d = {
15410
+ const initialState$e = {
15184
15411
  didSubToNewslettersBefore: false,
15185
15412
  newsletters: [],
15186
15413
  isListLoading: true,
@@ -15190,10 +15417,10 @@ const initialState$d = {
15190
15417
  content: ""
15191
15418
  }
15192
15419
  };
15193
- const store$d = /*#__PURE__*/createContext(initialState$d);
15420
+ const store$e = /*#__PURE__*/createContext(initialState$e);
15194
15421
  const {
15195
- Provider: Provider$d
15196
- } = store$d;
15422
+ Provider: Provider$e
15423
+ } = store$e;
15197
15424
 
15198
15425
  const NewsletterUpdateContainer = ({
15199
15426
  style,
@@ -15306,7 +15533,7 @@ const NewsletterUpdateContainer = ({
15306
15533
  default:
15307
15534
  return state;
15308
15535
  }
15309
- }, initialState$d);
15536
+ }, initialState$e);
15310
15537
  useEffect(() => {
15311
15538
  const getUserNewsletters = () => {
15312
15539
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -15350,7 +15577,7 @@ const NewsletterUpdateContainer = ({
15350
15577
  style: { ...style
15351
15578
  },
15352
15579
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
15353
- }, /*#__PURE__*/React__default.createElement(Provider$d, {
15580
+ }, /*#__PURE__*/React__default.createElement(Provider$e, {
15354
15581
  value: {
15355
15582
  state,
15356
15583
  dispatch
@@ -15358,12 +15585,12 @@ const NewsletterUpdateContainer = ({
15358
15585
  }, children.length ? children.map((child, i) => {
15359
15586
  if (child) {
15360
15587
  return /*#__PURE__*/React__default.cloneElement(child, {
15361
- store: store$d,
15588
+ store: store$e,
15362
15589
  key: i
15363
15590
  });
15364
15591
  }
15365
15592
  }) : /*#__PURE__*/React__default.cloneElement(children, {
15366
- store: store$d
15593
+ store: store$e
15367
15594
  })));
15368
15595
  };
15369
15596
 
@@ -15378,7 +15605,7 @@ const NewsletterUpdateButton = ({
15378
15605
  isSubmitting,
15379
15606
  isListLoading
15380
15607
  }
15381
- } = useContext(store$d);
15608
+ } = useContext(store$e);
15382
15609
  const {
15383
15610
  t
15384
15611
  } = useTranslation("newsletter");
@@ -15408,7 +15635,7 @@ const NewsletterUpdateList = () => {
15408
15635
  newsletters,
15409
15636
  isListLoading
15410
15637
  }
15411
- } = useContext(store$d);
15638
+ } = useContext(store$e);
15412
15639
 
15413
15640
  if (isListLoading) {
15414
15641
  return /*#__PURE__*/React__default.createElement(Loader, {
@@ -15612,7 +15839,7 @@ function SubscriptionCreateModal({
15612
15839
  SubscriptionCreateModal.viewId = "subscription-create";
15613
15840
 
15614
15841
  var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
15615
- const initialState$c = {
15842
+ const initialState$d = {
15616
15843
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
15617
15844
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
15618
15845
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
@@ -15625,10 +15852,10 @@ const initialState$c = {
15625
15852
  content: ""
15626
15853
  }
15627
15854
  };
15628
- const store$c = /*#__PURE__*/createContext(initialState$c);
15855
+ const store$d = /*#__PURE__*/createContext(initialState$d);
15629
15856
  const {
15630
- Provider: Provider$c
15631
- } = store$c;
15857
+ Provider: Provider$d
15858
+ } = store$d;
15632
15859
 
15633
15860
  const UserUpdateContainer = ({
15634
15861
  style,
@@ -15760,27 +15987,27 @@ const UserUpdateContainer = ({
15760
15987
  default:
15761
15988
  return state;
15762
15989
  }
15763
- }, initialState$c);
15990
+ }, initialState$d);
15764
15991
  return /*#__PURE__*/React__default.createElement("div", {
15765
15992
  style: { ...style
15766
15993
  },
15767
15994
  className: `pelcro-container pelcro-user-update-container ${className}`
15768
- }, /*#__PURE__*/React__default.createElement(Provider$c, {
15995
+ }, /*#__PURE__*/React__default.createElement(Provider$d, {
15769
15996
  value: {
15770
15997
  state,
15771
15998
  dispatch
15772
15999
  }
15773
16000
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
15774
- store: store$c,
16001
+ store: store$d,
15775
16002
  key: i
15776
16003
  })) : /*#__PURE__*/React__default.cloneElement(children, {
15777
- store: store$c
16004
+ store: store$d
15778
16005
  })));
15779
16006
  };
15780
16007
 
15781
16008
  const UserUpdateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
15782
16009
  disabled: true,
15783
- store: store$c
16010
+ store: store$d
15784
16011
  }, props));
15785
16012
 
15786
16013
  const UserUpdateButton = ({
@@ -15793,7 +16020,7 @@ const UserUpdateButton = ({
15793
16020
  buttonDisabled
15794
16021
  },
15795
16022
  dispatch
15796
- } = useContext(store$c);
16023
+ } = useContext(store$d);
15797
16024
  const {
15798
16025
  t
15799
16026
  } = useTranslation("userEdit");
@@ -15810,11 +16037,11 @@ const UserUpdateButton = ({
15810
16037
  };
15811
16038
 
15812
16039
  const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
15813
- store: store$c
16040
+ store: store$d
15814
16041
  }, props));
15815
16042
 
15816
16043
  const UserUpdateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
15817
- store: store$c
16044
+ store: store$d
15818
16045
  }, props));
15819
16046
 
15820
16047
  function Phone({
@@ -15843,22 +16070,22 @@ function Phone({
15843
16070
  }
15844
16071
 
15845
16072
  const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
15846
- store: store$c
16073
+ store: store$d
15847
16074
  }, props));
15848
16075
 
15849
16076
  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";
15850
16077
 
15851
- var _path$h;
16078
+ var _path$i;
15852
16079
 
15853
- function _extends$j() { _extends$j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
16080
+ 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); }
15854
16081
 
15855
16082
  function SvgEdit(props) {
15856
- return /*#__PURE__*/React.createElement("svg", _extends$j({
16083
+ return /*#__PURE__*/React.createElement("svg", _extends$k({
15857
16084
  className: "plc-w-6 plc-h-6",
15858
16085
  xmlns: "http://www.w3.org/2000/svg",
15859
16086
  viewBox: "0 0 20 20",
15860
16087
  fill: "currentColor"
15861
- }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
16088
+ }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
15862
16089
  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"
15863
16090
  })));
15864
16091
  }
@@ -15990,16 +16217,16 @@ function DisplayName({
15990
16217
  }
15991
16218
 
15992
16219
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
15993
- store: store$c
16220
+ store: store$d
15994
16221
  }, props));
15995
16222
 
15996
16223
  const UserUpdateTextInput = props => {
15997
16224
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
15998
- store: store$c
16225
+ store: store$d
15999
16226
  }));
16000
16227
  };
16001
16228
 
16002
- const initialState$b = {
16229
+ const initialState$c = {
16003
16230
  isSubmitting: false,
16004
16231
  firstName: "",
16005
16232
  firstNameError: "",
@@ -16024,10 +16251,10 @@ const initialState$b = {
16024
16251
  content: ""
16025
16252
  }
16026
16253
  };
16027
- const store$b = /*#__PURE__*/createContext(initialState$b);
16254
+ const store$c = /*#__PURE__*/createContext(initialState$c);
16028
16255
  const {
16029
- Provider: Provider$b
16030
- } = store$b;
16256
+ Provider: Provider$c
16257
+ } = store$c;
16031
16258
 
16032
16259
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
16033
16260
 
@@ -16234,7 +16461,7 @@ const AddressCreateContainer = ({
16234
16461
  default:
16235
16462
  return state;
16236
16463
  }
16237
- }, initialState$b);
16464
+ }, initialState$c);
16238
16465
  useEffect(() => {
16239
16466
  const getStates = () => {
16240
16467
  dispatch({
@@ -16266,16 +16493,16 @@ const AddressCreateContainer = ({
16266
16493
  style: { ...style
16267
16494
  },
16268
16495
  className: `pelcro-container pelcro-address-create-container ${className}`
16269
- }, /*#__PURE__*/React__default.createElement(Provider$b, {
16496
+ }, /*#__PURE__*/React__default.createElement(Provider$c, {
16270
16497
  value: {
16271
16498
  state,
16272
16499
  dispatch
16273
16500
  }
16274
16501
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
16275
- store: store$b,
16502
+ store: store$c,
16276
16503
  key: i
16277
16504
  })) : /*#__PURE__*/React__default.cloneElement(children, {
16278
- store: store$b
16505
+ store: store$c
16279
16506
  })));
16280
16507
  };
16281
16508
 
@@ -16286,7 +16513,7 @@ function AddressCreateFirstName(props) {
16286
16513
  firstName,
16287
16514
  firstNameError
16288
16515
  }
16289
- } = useContext(store$b);
16516
+ } = useContext(store$c);
16290
16517
 
16291
16518
  const handleBlur = () => {
16292
16519
  return dispatch({
@@ -16329,7 +16556,7 @@ function AddressCreateLastName(props) {
16329
16556
  lastName,
16330
16557
  lastNameError
16331
16558
  }
16332
- } = useContext(store$b);
16559
+ } = useContext(store$c);
16333
16560
 
16334
16561
  const handleBlur = () => {
16335
16562
  return dispatch({
@@ -16372,7 +16599,7 @@ function AddressCreateLine1(props) {
16372
16599
  line1,
16373
16600
  line1Error
16374
16601
  }
16375
- } = useContext(store$b);
16602
+ } = useContext(store$c);
16376
16603
 
16377
16604
  const handleBlur = () => {
16378
16605
  return dispatch({
@@ -16415,7 +16642,7 @@ function AddressCreateCity(props) {
16415
16642
  city,
16416
16643
  cityError
16417
16644
  }
16418
- } = useContext(store$b);
16645
+ } = useContext(store$c);
16419
16646
 
16420
16647
  const handleBlur = () => {
16421
16648
  return dispatch({
@@ -16458,7 +16685,7 @@ function AddressCreatePostalCode(props) {
16458
16685
  postalCode,
16459
16686
  postalCodeError
16460
16687
  }
16461
- } = useContext(store$b);
16688
+ } = useContext(store$c);
16462
16689
 
16463
16690
  const handleBlur = () => {
16464
16691
  return dispatch({
@@ -16504,7 +16731,7 @@ const AddressCreateSubmit = ({
16504
16731
  state: {
16505
16732
  isSubmitting
16506
16733
  }
16507
- } = useContext(store$b);
16734
+ } = useContext(store$c);
16508
16735
  const {
16509
16736
  t
16510
16737
  } = useTranslation("address");
@@ -16615,7 +16842,7 @@ function CountrySelect({
16615
16842
  }
16616
16843
 
16617
16844
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
16618
- store: store$b
16845
+ store: store$c
16619
16846
  }, props));
16620
16847
 
16621
16848
  function StateSelect({
@@ -16703,7 +16930,7 @@ function StateSelect({
16703
16930
  }
16704
16931
 
16705
16932
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
16706
- store: store$b
16933
+ store: store$c
16707
16934
  }, props));
16708
16935
 
16709
16936
  const AddressCreateView = props => {
@@ -16808,18 +17035,18 @@ AddressCreateModal.viewId = "address-create";
16808
17035
 
16809
17036
  const AddressCreateTextInput = props => {
16810
17037
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
16811
- store: store$b
17038
+ store: store$c
16812
17039
  }));
16813
17040
  };
16814
17041
 
16815
17042
  const AddressCreateLine2 = props => {
16816
17043
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
16817
17044
  fieldName: "line2",
16818
- store: store$b
17045
+ store: store$c
16819
17046
  }, props));
16820
17047
  };
16821
17048
 
16822
- const initialState$a = {
17049
+ const initialState$b = {
16823
17050
  isSubmitting: false,
16824
17051
  firstName: "",
16825
17052
  firstNameError: "",
@@ -16844,10 +17071,10 @@ const initialState$a = {
16844
17071
  content: ""
16845
17072
  }
16846
17073
  };
16847
- const store$a = /*#__PURE__*/createContext(initialState$a);
17074
+ const store$b = /*#__PURE__*/createContext(initialState$b);
16848
17075
  const {
16849
- Provider: Provider$a
16850
- } = store$a;
17076
+ Provider: Provider$b
17077
+ } = store$b;
16851
17078
 
16852
17079
  const AddressUpdateContainer = ({
16853
17080
  style,
@@ -16899,7 +17126,7 @@ const AddressUpdateContainer = ({
16899
17126
  const thisAddress = addresses[address];
16900
17127
 
16901
17128
  if (+thisAddress.id === +addressId) {
16902
- const newState = { ...initialState$a,
17129
+ const newState = { ...initialState$b,
16903
17130
  firstName: thisAddress.first_name,
16904
17131
  lastName: thisAddress.last_name,
16905
17132
  line1: thisAddress.line1,
@@ -17032,7 +17259,7 @@ const AddressUpdateContainer = ({
17032
17259
  default:
17033
17260
  return state;
17034
17261
  }
17035
- }, initialState$a);
17262
+ }, initialState$b);
17036
17263
  useEffect(() => {
17037
17264
  const getStates = () => {
17038
17265
  dispatch({
@@ -17064,21 +17291,21 @@ const AddressUpdateContainer = ({
17064
17291
  style: { ...style
17065
17292
  },
17066
17293
  className: `pelcro-container pelcro-address-update-container ${className}`
17067
- }, /*#__PURE__*/React__default.createElement(Provider$a, {
17294
+ }, /*#__PURE__*/React__default.createElement(Provider$b, {
17068
17295
  value: {
17069
17296
  state,
17070
17297
  dispatch
17071
17298
  }
17072
17299
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17073
- store: store$a,
17300
+ store: store$b,
17074
17301
  key: i
17075
17302
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17076
- store: store$a
17303
+ store: store$b
17077
17304
  })));
17078
17305
  };
17079
17306
 
17080
17307
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
17081
- store: store$a
17308
+ store: store$b
17082
17309
  }, props));
17083
17310
 
17084
17311
  function AddressUpdateFirstName(props) {
@@ -17088,7 +17315,7 @@ function AddressUpdateFirstName(props) {
17088
17315
  firstName,
17089
17316
  firstNameError
17090
17317
  }
17091
- } = useContext(store$a);
17318
+ } = useContext(store$b);
17092
17319
 
17093
17320
  const handleBlur = () => {
17094
17321
  return dispatch({
@@ -17131,7 +17358,7 @@ function AddressUpdateLastName(props) {
17131
17358
  lastName,
17132
17359
  lastNameError
17133
17360
  }
17134
- } = useContext(store$a);
17361
+ } = useContext(store$b);
17135
17362
 
17136
17363
  const handleBlur = () => {
17137
17364
  return dispatch({
@@ -17174,7 +17401,7 @@ function AddressUpdateLine1(props) {
17174
17401
  line1,
17175
17402
  line1Error
17176
17403
  }
17177
- } = useContext(store$a);
17404
+ } = useContext(store$b);
17178
17405
 
17179
17406
  const handleBlur = () => {
17180
17407
  return dispatch({
@@ -17214,7 +17441,7 @@ const AddressUpdateLine2 = props => {
17214
17441
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
17215
17442
  fieldName: "line2"
17216
17443
  }, props, {
17217
- store: store$a
17444
+ store: store$b
17218
17445
  }));
17219
17446
  };
17220
17447
 
@@ -17225,7 +17452,7 @@ function AddressUpdateCity(props) {
17225
17452
  city,
17226
17453
  cityError
17227
17454
  }
17228
- } = useContext(store$a);
17455
+ } = useContext(store$b);
17229
17456
 
17230
17457
  const handleBlur = () => {
17231
17458
  return dispatch({
@@ -17268,7 +17495,7 @@ function AddressUpdatePostalCode(props) {
17268
17495
  postalCode,
17269
17496
  postalCodeError
17270
17497
  }
17271
- } = useContext(store$a);
17498
+ } = useContext(store$b);
17272
17499
 
17273
17500
  const handleBlur = () => {
17274
17501
  return dispatch({
@@ -17314,7 +17541,7 @@ const AddressUpdateSubmit = ({
17314
17541
  state: {
17315
17542
  isSubmitting
17316
17543
  }
17317
- } = useContext(store$a);
17544
+ } = useContext(store$b);
17318
17545
  const {
17319
17546
  t
17320
17547
  } = useTranslation("address");
@@ -17330,7 +17557,7 @@ const AddressUpdateSubmit = ({
17330
17557
  };
17331
17558
 
17332
17559
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
17333
- store: store$a
17560
+ store: store$b
17334
17561
  }, props));
17335
17562
 
17336
17563
  const AddressUpdateView = props => {
@@ -17413,7 +17640,7 @@ AddressUpdateModal.viewId = "address-edit";
17413
17640
 
17414
17641
  const AddressUpdateTextInput = props => {
17415
17642
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
17416
- store: store$a
17643
+ store: store$b
17417
17644
  }));
17418
17645
  };
17419
17646
 
@@ -17496,7 +17723,7 @@ const PaymentMethodUpdateModal = props => {
17496
17723
  };
17497
17724
  PaymentMethodUpdateModal.viewId = "payment-method-update";
17498
17725
 
17499
- const initialState$9 = {
17726
+ const initialState$a = {
17500
17727
  email: "",
17501
17728
  password: "",
17502
17729
  passwordError: null,
@@ -17509,10 +17736,10 @@ const initialState$9 = {
17509
17736
  content: ""
17510
17737
  }
17511
17738
  };
17512
- const store$9 = /*#__PURE__*/createContext(initialState$9);
17739
+ const store$a = /*#__PURE__*/createContext(initialState$a);
17513
17740
  const {
17514
- Provider: Provider$9
17515
- } = store$9;
17741
+ Provider: Provider$a
17742
+ } = store$a;
17516
17743
 
17517
17744
  const PasswordResetContainer = ({
17518
17745
  style,
@@ -17569,7 +17796,7 @@ const PasswordResetContainer = ({
17569
17796
  type: SET_EMAIL,
17570
17797
  payload: window.Pelcro.helpers.getURLParameter("email")
17571
17798
  });
17572
- initialState$9.email = window.Pelcro.helpers.getURLParameter("email");
17799
+ initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
17573
17800
  dispatch({
17574
17801
  type: SET_TOKEN,
17575
17802
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -17629,26 +17856,26 @@ const PasswordResetContainer = ({
17629
17856
  default:
17630
17857
  return state;
17631
17858
  }
17632
- }, initialState$9);
17859
+ }, initialState$a);
17633
17860
  return /*#__PURE__*/React__default.createElement("div", {
17634
17861
  style: { ...style
17635
17862
  },
17636
17863
  className: `pelcro-container pelcro-password-reset-container ${className}`
17637
- }, /*#__PURE__*/React__default.createElement(Provider$9, {
17864
+ }, /*#__PURE__*/React__default.createElement(Provider$a, {
17638
17865
  value: {
17639
17866
  state,
17640
17867
  dispatch
17641
17868
  }
17642
17869
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17643
- store: store$9,
17870
+ store: store$a,
17644
17871
  key: i
17645
17872
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17646
- store: store$9
17873
+ store: store$a
17647
17874
  })));
17648
17875
  };
17649
17876
 
17650
17877
  const PasswordResetPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
17651
- store: store$9
17878
+ store: store$a
17652
17879
  }, props));
17653
17880
 
17654
17881
  const PasswordResetButton = ({
@@ -17661,7 +17888,7 @@ const PasswordResetButton = ({
17661
17888
  buttonDisabled
17662
17889
  },
17663
17890
  dispatch
17664
- } = useContext(store$9);
17891
+ } = useContext(store$a);
17665
17892
  const {
17666
17893
  t
17667
17894
  } = useTranslation("passwordReset");
@@ -17678,14 +17905,14 @@ const PasswordResetButton = ({
17678
17905
  };
17679
17906
 
17680
17907
  const PasswordResetEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
17681
- store: store$9
17908
+ store: store$a
17682
17909
  }, props, {
17683
17910
  value: window.Pelcro.helpers.getURLParameter("email"),
17684
17911
  disabled: true
17685
17912
  }));
17686
17913
 
17687
17914
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.createElement(ConfirmPassword, Object.assign({
17688
- store: store$9
17915
+ store: store$a
17689
17916
  }, props));
17690
17917
 
17691
17918
  const PasswordResetView = props => {
@@ -17737,7 +17964,7 @@ const PasswordResetModal = ({
17737
17964
  };
17738
17965
  PasswordResetModal.viewId = "password-reset";
17739
17966
 
17740
- const initialState$8 = {
17967
+ const initialState$9 = {
17741
17968
  email: "",
17742
17969
  emailError: null,
17743
17970
  buttonDisabled: false,
@@ -17746,10 +17973,10 @@ const initialState$8 = {
17746
17973
  content: ""
17747
17974
  }
17748
17975
  };
17749
- const store$8 = /*#__PURE__*/createContext(initialState$8);
17976
+ const store$9 = /*#__PURE__*/createContext(initialState$9);
17750
17977
  const {
17751
- Provider: Provider$8
17752
- } = store$8;
17978
+ Provider: Provider$9
17979
+ } = store$9;
17753
17980
 
17754
17981
  const PasswordForgotContainer = ({
17755
17982
  style,
@@ -17827,21 +18054,21 @@ const PasswordForgotContainer = ({
17827
18054
  default:
17828
18055
  return state;
17829
18056
  }
17830
- }, initialState$8);
18057
+ }, initialState$9);
17831
18058
  return /*#__PURE__*/React__default.createElement("div", {
17832
18059
  style: { ...style
17833
18060
  },
17834
18061
  className: `pelcro-container pelcro-password-forgot-container ${className}`
17835
- }, /*#__PURE__*/React__default.createElement(Provider$8, {
18062
+ }, /*#__PURE__*/React__default.createElement(Provider$9, {
17836
18063
  value: {
17837
18064
  state,
17838
18065
  dispatch
17839
18066
  }
17840
18067
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17841
- store: store$8,
18068
+ store: store$9,
17842
18069
  key: i
17843
18070
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17844
- store: store$8
18071
+ store: store$9
17845
18072
  })));
17846
18073
  };
17847
18074
 
@@ -17857,7 +18084,7 @@ const PasswordForgotButton = ({
17857
18084
  emailError
17858
18085
  },
17859
18086
  dispatch
17860
- } = useContext(store$8);
18087
+ } = useContext(store$9);
17861
18088
  const {
17862
18089
  t
17863
18090
  } = useTranslation("passwordForgot");
@@ -17878,7 +18105,7 @@ const PasswordForgotButton = ({
17878
18105
  };
17879
18106
 
17880
18107
  const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
17881
- store: store$8
18108
+ store: store$9
17882
18109
  }, props));
17883
18110
 
17884
18111
  const PasswordForgotView = props => {
@@ -17928,7 +18155,7 @@ const PasswordForgotModal = ({
17928
18155
  };
17929
18156
  PasswordForgotModal.viewId = "password-forgot";
17930
18157
 
17931
- const initialState$7 = {
18158
+ const initialState$8 = {
17932
18159
  currentPassword: "",
17933
18160
  newPassword: "",
17934
18161
  confirmNewPassword: "",
@@ -17942,10 +18169,10 @@ const initialState$7 = {
17942
18169
  content: ""
17943
18170
  }
17944
18171
  };
17945
- const store$7 = /*#__PURE__*/createContext(initialState$7);
18172
+ const store$8 = /*#__PURE__*/createContext(initialState$8);
17946
18173
  const {
17947
- Provider: Provider$7
17948
- } = store$7;
18174
+ Provider: Provider$8
18175
+ } = store$8;
17949
18176
  const PasswordChangeContainer = ({
17950
18177
  style,
17951
18178
  className = "",
@@ -18097,21 +18324,21 @@ const PasswordChangeContainer = ({
18097
18324
  default:
18098
18325
  return state;
18099
18326
  }
18100
- }, initialState$7);
18327
+ }, initialState$8);
18101
18328
  return /*#__PURE__*/React__default.createElement("div", {
18102
18329
  style: { ...style
18103
18330
  },
18104
18331
  className: `pelcro-container pelcro-password-change-container ${className}`
18105
- }, /*#__PURE__*/React__default.createElement(Provider$7, {
18332
+ }, /*#__PURE__*/React__default.createElement(Provider$8, {
18106
18333
  value: {
18107
18334
  state,
18108
18335
  dispatch
18109
18336
  }
18110
18337
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18111
- store: store$7,
18338
+ store: store$8,
18112
18339
  key: i
18113
18340
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18114
- store: store$7
18341
+ store: store$8
18115
18342
  })));
18116
18343
  };
18117
18344
 
@@ -18122,7 +18349,7 @@ function PasswordChangeCurrentPassword(props) {
18122
18349
  currentPassword,
18123
18350
  currentPasswordError
18124
18351
  }
18125
- } = useContext(store$7);
18352
+ } = useContext(store$8);
18126
18353
  const handleBlur = useCallback(() => {
18127
18354
  return dispatch({
18128
18355
  type: VALIDATE_PASSWORD
@@ -18156,7 +18383,7 @@ function PasswordChangeNewPassword(props) {
18156
18383
  newPassword,
18157
18384
  newPasswordError
18158
18385
  }
18159
- } = useContext(store$7);
18386
+ } = useContext(store$8);
18160
18387
  const handleBlur = useCallback(() => {
18161
18388
  return dispatch({
18162
18389
  type: VALIDATE_NEW_PASSWORD
@@ -18190,7 +18417,7 @@ function PasswordChangeConfirmNewPassword(props) {
18190
18417
  confirmNewPassword,
18191
18418
  confirmNewPasswordError
18192
18419
  }
18193
- } = useContext(store$7);
18420
+ } = useContext(store$8);
18194
18421
  const handleBlur = useCallback(() => {
18195
18422
  return dispatch({
18196
18423
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -18231,7 +18458,7 @@ const PasswordChangeButton = ({
18231
18458
  confirmNewPasswordError
18232
18459
  },
18233
18460
  dispatch
18234
- } = useContext(store$7);
18461
+ } = useContext(store$8);
18235
18462
  const {
18236
18463
  t
18237
18464
  } = useTranslation("passwordChange");
@@ -18297,17 +18524,17 @@ const PasswordChangeModal = ({
18297
18524
  };
18298
18525
  PasswordChangeModal.viewId = "password-change";
18299
18526
 
18300
- const initialState$6 = {
18527
+ const initialState$7 = {
18301
18528
  buttonDisabled: false,
18302
18529
  alert: {
18303
18530
  type: "error",
18304
18531
  content: ""
18305
18532
  }
18306
18533
  };
18307
- const store$6 = /*#__PURE__*/createContext(initialState$6);
18534
+ const store$7 = /*#__PURE__*/createContext(initialState$7);
18308
18535
  const {
18309
- Provider: Provider$6
18310
- } = store$6;
18536
+ Provider: Provider$7
18537
+ } = store$7;
18311
18538
 
18312
18539
  const CartContainer = ({
18313
18540
  style,
@@ -18398,21 +18625,21 @@ const CartContainer = ({
18398
18625
  default:
18399
18626
  return state;
18400
18627
  }
18401
- }, initialState$6);
18628
+ }, initialState$7);
18402
18629
  return /*#__PURE__*/React__default.createElement("div", {
18403
18630
  style: { ...style
18404
18631
  },
18405
18632
  className: `pelcro-container pelcro-cart-container ${className}`
18406
- }, /*#__PURE__*/React__default.createElement(Provider$6, {
18633
+ }, /*#__PURE__*/React__default.createElement(Provider$7, {
18407
18634
  value: {
18408
18635
  state,
18409
18636
  dispatch
18410
18637
  }
18411
18638
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18412
- store: store$6,
18639
+ store: store$7,
18413
18640
  key: i
18414
18641
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18415
- store: store$6
18642
+ store: store$7
18416
18643
  })));
18417
18644
  };
18418
18645
 
@@ -18449,7 +18676,7 @@ const CartSubmit = ({
18449
18676
  buttonDisabled
18450
18677
  },
18451
18678
  dispatch
18452
- } = useContext(store$6);
18679
+ } = useContext(store$7);
18453
18680
  const {
18454
18681
  t
18455
18682
  } = useTranslation("cart");
@@ -18480,7 +18707,7 @@ const CartTotalPrice = () => {
18480
18707
  state: {
18481
18708
  alert
18482
18709
  }
18483
- } = useContext(store$6);
18710
+ } = useContext(store$7);
18484
18711
  const {
18485
18712
  cartItems
18486
18713
  } = usePelcro();
@@ -18793,7 +19020,7 @@ const OrderConfirmModal = props => {
18793
19020
  };
18794
19021
  OrderConfirmModal.viewId = "order-confirm";
18795
19022
 
18796
- const initialState$5 = {
19023
+ const initialState$6 = {
18797
19024
  email: "",
18798
19025
  firstName: "",
18799
19026
  lastName: "",
@@ -18805,10 +19032,10 @@ const initialState$5 = {
18805
19032
  content: ""
18806
19033
  }
18807
19034
  };
18808
- const store$5 = /*#__PURE__*/createContext(initialState$5);
19035
+ const store$6 = /*#__PURE__*/createContext(initialState$6);
18809
19036
  const {
18810
- Provider: Provider$5
18811
- } = store$5;
19037
+ Provider: Provider$6
19038
+ } = store$6;
18812
19039
 
18813
19040
  const GiftCreateContainer = ({
18814
19041
  style,
@@ -18912,21 +19139,21 @@ const GiftCreateContainer = ({
18912
19139
  default:
18913
19140
  return state;
18914
19141
  }
18915
- }, initialState$5);
19142
+ }, initialState$6);
18916
19143
  return /*#__PURE__*/React__default.createElement("div", {
18917
19144
  style: { ...style
18918
19145
  },
18919
19146
  className: `pelcro-container pelcro-gift-create-container ${className}`
18920
- }, /*#__PURE__*/React__default.createElement(Provider$5, {
19147
+ }, /*#__PURE__*/React__default.createElement(Provider$6, {
18921
19148
  value: {
18922
19149
  state,
18923
19150
  dispatch
18924
19151
  }
18925
19152
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18926
- store: store$5,
19153
+ store: store$6,
18927
19154
  key: i
18928
19155
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18929
- store: store$5
19156
+ store: store$6
18930
19157
  })));
18931
19158
  };
18932
19159
 
@@ -18940,7 +19167,7 @@ const GiftCreateSubmitButton = ({
18940
19167
  state: {
18941
19168
  disableSubmit
18942
19169
  }
18943
- } = useContext(store$5);
19170
+ } = useContext(store$6);
18944
19171
  const {
18945
19172
  t
18946
19173
  } = useTranslation("register");
@@ -18957,29 +19184,29 @@ const GiftCreateSubmitButton = ({
18957
19184
 
18958
19185
  const GiftCreateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
18959
19186
  initWithUserEmail: false,
18960
- store: store$5
19187
+ store: store$6
18961
19188
  }, props));
18962
19189
 
18963
19190
  const GiftCreateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
18964
- store: store$5
19191
+ store: store$6
18965
19192
  }, props));
18966
19193
 
18967
19194
  const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
18968
- store: store$5
19195
+ store: store$6
18969
19196
  }, props));
18970
19197
 
18971
- var _path$g;
19198
+ var _path$h;
18972
19199
 
18973
- 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); }
19200
+ function _extends$j() { _extends$j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
18974
19201
 
18975
19202
  function SvgInfoCircle(props) {
18976
- return /*#__PURE__*/React.createElement("svg", _extends$i({
19203
+ return /*#__PURE__*/React.createElement("svg", _extends$j({
18977
19204
  xmlns: "http://www.w3.org/2000/svg",
18978
19205
  className: "plc-w-5 plc-h-5",
18979
19206
  fill: "none",
18980
19207
  viewBox: "0 0 24 24",
18981
19208
  stroke: "currentColor"
18982
- }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
19209
+ }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
18983
19210
  strokeLinecap: "round",
18984
19211
  strokeLinejoin: "round",
18985
19212
  strokeWidth: 2,
@@ -19050,7 +19277,7 @@ const GiftCreateStartDate = props => {
19050
19277
  const {
19051
19278
  dispatch,
19052
19279
  state
19053
- } = useContext(store$5);
19280
+ } = useContext(store$6);
19054
19281
 
19055
19282
  const handleInputChange = value => {
19056
19283
  dispatch({
@@ -19121,7 +19348,7 @@ function GiftCreateMessage(props) {
19121
19348
  const {
19122
19349
  dispatch,
19123
19350
  state
19124
- } = useContext(store$5);
19351
+ } = useContext(store$6);
19125
19352
 
19126
19353
  const handleInputChange = value => {
19127
19354
  dispatch({
@@ -19241,7 +19468,7 @@ const GiftCreateModal = ({
19241
19468
  };
19242
19469
  GiftCreateModal.viewId = "gift-create";
19243
19470
 
19244
- const initialState$4 = {
19471
+ const initialState$5 = {
19245
19472
  giftCode: "",
19246
19473
  buttonDisabled: true,
19247
19474
  alert: {
@@ -19249,10 +19476,10 @@ const initialState$4 = {
19249
19476
  content: ""
19250
19477
  }
19251
19478
  };
19252
- const store$4 = /*#__PURE__*/createContext(initialState$4);
19479
+ const store$5 = /*#__PURE__*/createContext(initialState$5);
19253
19480
  const {
19254
- Provider: Provider$4
19255
- } = store$4;
19481
+ Provider: Provider$5
19482
+ } = store$5;
19256
19483
 
19257
19484
  const GiftRedeemContainer = ({
19258
19485
  style,
@@ -19317,21 +19544,21 @@ const GiftRedeemContainer = ({
19317
19544
  default:
19318
19545
  return state;
19319
19546
  }
19320
- }, initialState$4);
19547
+ }, initialState$5);
19321
19548
  return /*#__PURE__*/React__default.createElement("div", {
19322
19549
  style: { ...style
19323
19550
  },
19324
19551
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
19325
- }, /*#__PURE__*/React__default.createElement(Provider$4, {
19552
+ }, /*#__PURE__*/React__default.createElement(Provider$5, {
19326
19553
  value: {
19327
19554
  state,
19328
19555
  dispatch
19329
19556
  }
19330
19557
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19331
- store: store$4,
19558
+ store: store$5,
19332
19559
  key: i
19333
19560
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19334
- store: store$4
19561
+ store: store$5
19335
19562
  })));
19336
19563
  };
19337
19564
 
@@ -19368,7 +19595,7 @@ function GiftCode({
19368
19595
  }
19369
19596
 
19370
19597
  const GiftRedeemCode = props => /*#__PURE__*/React__default.createElement(GiftCode, Object.assign({
19371
- store: store$4
19598
+ store: store$5
19372
19599
  }, props));
19373
19600
 
19374
19601
  const GiftRedeemSubmitButton = ({
@@ -19381,7 +19608,7 @@ const GiftRedeemSubmitButton = ({
19381
19608
  state: {
19382
19609
  disableSubmit
19383
19610
  }
19384
- } = useContext(store$4);
19611
+ } = useContext(store$5);
19385
19612
  const {
19386
19613
  t
19387
19614
  } = useTranslation("register");
@@ -19474,7 +19701,7 @@ const moveDefaultAddressToStart = addresses => {
19474
19701
  return [defaultAddress, ...addressesWithoutDefault];
19475
19702
  };
19476
19703
 
19477
- const initialState$3 = {
19704
+ const initialState$4 = {
19478
19705
  addresses: [],
19479
19706
  selectedAddressId: null,
19480
19707
  isSubmitting: false,
@@ -19483,10 +19710,10 @@ const initialState$3 = {
19483
19710
  content: ""
19484
19711
  }
19485
19712
  };
19486
- const store$3 = /*#__PURE__*/createContext(initialState$3);
19713
+ const store$4 = /*#__PURE__*/createContext(initialState$4);
19487
19714
  const {
19488
- Provider: Provider$3
19489
- } = store$3;
19715
+ Provider: Provider$4
19716
+ } = store$4;
19490
19717
 
19491
19718
  const AddressSelectContainer = ({
19492
19719
  style,
@@ -19581,7 +19808,7 @@ const AddressSelectContainer = ({
19581
19808
  default:
19582
19809
  return state;
19583
19810
  }
19584
- }, initialState$3);
19811
+ }, initialState$4);
19585
19812
  useEffect(() => {
19586
19813
  var _window$Pelcro$user$r;
19587
19814
 
@@ -19594,16 +19821,16 @@ const AddressSelectContainer = ({
19594
19821
  style: { ...style
19595
19822
  },
19596
19823
  className: `pelcro-container pelcro-address-select-container ${className}`
19597
- }, /*#__PURE__*/React__default.createElement(Provider$3, {
19824
+ }, /*#__PURE__*/React__default.createElement(Provider$4, {
19598
19825
  value: {
19599
19826
  state,
19600
19827
  dispatch
19601
19828
  }
19602
19829
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19603
- store: store$3,
19830
+ store: store$4,
19604
19831
  key: i
19605
19832
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19606
- store: store$3
19833
+ store: store$4
19607
19834
  })));
19608
19835
  };
19609
19836
 
@@ -19614,7 +19841,7 @@ const AddressSelectList = () => {
19614
19841
  addresses,
19615
19842
  selectedAddressId
19616
19843
  }
19617
- } = useContext(store$3);
19844
+ } = useContext(store$4);
19618
19845
 
19619
19846
  const handleAddressSelect = event => {
19620
19847
  dispatch({
@@ -19658,7 +19885,7 @@ const AddressSelectSubmit = ({
19658
19885
  selectedAddressId,
19659
19886
  isSubmitting
19660
19887
  }
19661
- } = useContext(store$3);
19888
+ } = useContext(store$4);
19662
19889
  const {
19663
19890
  t
19664
19891
  } = useTranslation("address");
@@ -19754,7 +19981,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
19754
19981
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
19755
19982
  };
19756
19983
 
19757
- const initialState$2 = {
19984
+ const initialState$3 = {
19758
19985
  paymentMethods: [],
19759
19986
  selectedPaymentMethodId: null,
19760
19987
  isSubmitting: false,
@@ -19763,10 +19990,10 @@ const initialState$2 = {
19763
19990
  content: ""
19764
19991
  }
19765
19992
  };
19766
- const store$2 = /*#__PURE__*/createContext(initialState$2);
19993
+ const store$3 = /*#__PURE__*/createContext(initialState$3);
19767
19994
  const {
19768
- Provider: Provider$2
19769
- } = store$2;
19995
+ Provider: Provider$3
19996
+ } = store$3;
19770
19997
 
19771
19998
  const PaymentMethodSelectContainer = ({
19772
19999
  style,
@@ -19811,7 +20038,7 @@ const PaymentMethodSelectContainer = ({
19811
20038
  default:
19812
20039
  return state;
19813
20040
  }
19814
- }, initialState$2);
20041
+ }, initialState$3);
19815
20042
  useEffect(() => {
19816
20043
  var _window$Pelcro$user$r4;
19817
20044
 
@@ -19824,16 +20051,16 @@ const PaymentMethodSelectContainer = ({
19824
20051
  style: { ...style
19825
20052
  },
19826
20053
  className: `pelcro-container pelcro-payment-select-container ${className}`
19827
- }, /*#__PURE__*/React__default.createElement(Provider$2, {
20054
+ }, /*#__PURE__*/React__default.createElement(Provider$3, {
19828
20055
  value: {
19829
20056
  state,
19830
20057
  dispatch
19831
20058
  }
19832
20059
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19833
- store: store$2,
20060
+ store: store$3,
19834
20061
  key: i
19835
20062
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19836
- store: store$2
20063
+ store: store$3
19837
20064
  })));
19838
20065
  };
19839
20066
 
@@ -19847,7 +20074,7 @@ const PaymentMethodSelectList = () => {
19847
20074
  paymentMethods,
19848
20075
  selectedPaymentMethodId
19849
20076
  }
19850
- } = useContext(store$2);
20077
+ } = useContext(store$3);
19851
20078
 
19852
20079
  const handlePaymentMethodSelect = event => {
19853
20080
  dispatch({
@@ -19897,7 +20124,7 @@ const PaymentMethodSelectSubmit = ({
19897
20124
  selectedPaymentMethodId,
19898
20125
  isSubmitting
19899
20126
  }
19900
- } = useContext(store$2);
20127
+ } = useContext(store$3);
19901
20128
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
19902
20129
  onClick: () => {
19903
20130
  dispatch({
@@ -19971,8 +20198,8 @@ const PaymentMethodSelectModal = ({
19971
20198
  };
19972
20199
  PaymentMethodSelectModal.viewId = "payment-method-select";
19973
20200
 
19974
- function _extends$h() {
19975
- _extends$h = Object.assign || function (target) {
20201
+ function _extends$i() {
20202
+ _extends$i = Object.assign || function (target) {
19976
20203
  for (var i = 1; i < arguments.length; i++) {
19977
20204
  var source = arguments[i];
19978
20205
 
@@ -19986,7 +20213,7 @@ function _extends$h() {
19986
20213
  return target;
19987
20214
  };
19988
20215
 
19989
- return _extends$h.apply(this, arguments);
20216
+ return _extends$i.apply(this, arguments);
19990
20217
  }
19991
20218
 
19992
20219
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -20170,7 +20397,7 @@ function render(props, propsBag, defaultTag, features, visible) {
20170
20397
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
20171
20398
  return null;
20172
20399
  }, _match[RenderStrategy.Hidden] = function () {
20173
- return _render(_extends$h({}, _rest, {
20400
+ return _render(_extends$i({}, _rest, {
20174
20401
  hidden: true,
20175
20402
  style: {
20176
20403
  display: 'none'
@@ -20698,7 +20925,7 @@ function TransitionChild(props) {
20698
20925
  var passthroughProps = rest;
20699
20926
  return React__default.createElement(NestingContext.Provider, {
20700
20927
  value: nesting
20701
- }, render(_extends$h({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
20928
+ }, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
20702
20929
  }
20703
20930
 
20704
20931
  function Transition(props) {
@@ -20742,7 +20969,7 @@ function Transition(props) {
20742
20969
  value: nestingBag
20743
20970
  }, React__default.createElement(TransitionContext.Provider, {
20744
20971
  value: transitionBag
20745
- }, render(_extends$h({}, sharedProps, {
20972
+ }, render(_extends$i({}, sharedProps, {
20746
20973
  as: Fragment,
20747
20974
  children: React__default.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
20748
20975
  }), propsBag, Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -20869,12 +21096,12 @@ var ActionTypes;
20869
21096
  })(ActionTypes || (ActionTypes = {}));
20870
21097
 
20871
21098
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
20872
- return _extends$h({}, state, {
21099
+ return _extends$i({}, state, {
20873
21100
  activeItemIndex: null,
20874
21101
  menuState: MenuStates.Closed
20875
21102
  });
20876
21103
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
20877
- return _extends$h({}, state, {
21104
+ return _extends$i({}, state, {
20878
21105
  menuState: MenuStates.Open
20879
21106
  });
20880
21107
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -20893,7 +21120,7 @@ var ActionTypes;
20893
21120
  }
20894
21121
  });
20895
21122
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
20896
- return _extends$h({}, state, {
21123
+ return _extends$i({}, state, {
20897
21124
  searchQuery: '',
20898
21125
  activeItemIndex: activeItemIndex
20899
21126
  });
@@ -20904,19 +21131,19 @@ var ActionTypes;
20904
21131
 
20905
21132
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
20906
21133
  });
20907
- if (match === -1 || match === state.activeItemIndex) return _extends$h({}, state, {
21134
+ if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
20908
21135
  searchQuery: searchQuery
20909
21136
  });
20910
- return _extends$h({}, state, {
21137
+ return _extends$i({}, state, {
20911
21138
  searchQuery: searchQuery,
20912
21139
  activeItemIndex: match
20913
21140
  });
20914
21141
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
20915
- return _extends$h({}, state, {
21142
+ return _extends$i({}, state, {
20916
21143
  searchQuery: ''
20917
21144
  });
20918
21145
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
20919
- return _extends$h({}, state, {
21146
+ return _extends$i({}, state, {
20920
21147
  items: [].concat(state.items, [{
20921
21148
  id: action.id,
20922
21149
  dataRef: action.dataRef
@@ -20929,7 +21156,7 @@ var ActionTypes;
20929
21156
  return a.id === action.id;
20930
21157
  });
20931
21158
  if (idx !== -1) nextItems.splice(idx, 1);
20932
- return _extends$h({}, state, {
21159
+ return _extends$i({}, state, {
20933
21160
  items: nextItems,
20934
21161
  activeItemIndex: function () {
20935
21162
  if (idx === state.activeItemIndex) return null;
@@ -20968,19 +21195,19 @@ var ActionTypes$1;
20968
21195
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
20969
21196
  if (state.disabled) return state;
20970
21197
  if (state.listboxState === ListboxStates.Closed) return state;
20971
- return _extends$h({}, state, {
21198
+ return _extends$i({}, state, {
20972
21199
  activeOptionIndex: null,
20973
21200
  listboxState: ListboxStates.Closed
20974
21201
  });
20975
21202
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
20976
21203
  if (state.disabled) return state;
20977
21204
  if (state.listboxState === ListboxStates.Open) return state;
20978
- return _extends$h({}, state, {
21205
+ return _extends$i({}, state, {
20979
21206
  listboxState: ListboxStates.Open
20980
21207
  });
20981
21208
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
20982
21209
  if (state.disabled === action.disabled) return state;
20983
- return _extends$h({}, state, {
21210
+ return _extends$i({}, state, {
20984
21211
  disabled: action.disabled
20985
21212
  });
20986
21213
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -21001,7 +21228,7 @@ var ActionTypes$1;
21001
21228
  }
21002
21229
  });
21003
21230
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
21004
- return _extends$h({}, state, {
21231
+ return _extends$i({}, state, {
21005
21232
  searchQuery: '',
21006
21233
  activeOptionIndex: activeOptionIndex
21007
21234
  });
@@ -21014,10 +21241,10 @@ var ActionTypes$1;
21014
21241
 
21015
21242
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
21016
21243
  });
21017
- if (match === -1 || match === state.activeOptionIndex) return _extends$h({}, state, {
21244
+ if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
21018
21245
  searchQuery: searchQuery
21019
21246
  });
21020
- return _extends$h({}, state, {
21247
+ return _extends$i({}, state, {
21021
21248
  searchQuery: searchQuery,
21022
21249
  activeOptionIndex: match
21023
21250
  });
@@ -21025,11 +21252,11 @@ var ActionTypes$1;
21025
21252
  if (state.disabled) return state;
21026
21253
  if (state.listboxState === ListboxStates.Closed) return state;
21027
21254
  if (state.searchQuery === '') return state;
21028
- return _extends$h({}, state, {
21255
+ return _extends$i({}, state, {
21029
21256
  searchQuery: ''
21030
21257
  });
21031
21258
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
21032
- return _extends$h({}, state, {
21259
+ return _extends$i({}, state, {
21033
21260
  options: [].concat(state.options, [{
21034
21261
  id: action.id,
21035
21262
  dataRef: action.dataRef
@@ -21042,7 +21269,7 @@ var ActionTypes$1;
21042
21269
  return a.id === action.id;
21043
21270
  });
21044
21271
  if (idx !== -1) nextOptions.splice(idx, 1);
21045
- return _extends$h({}, state, {
21272
+ return _extends$i({}, state, {
21046
21273
  options: nextOptions,
21047
21274
  activeOptionIndex: function () {
21048
21275
  if (idx === state.activeOptionIndex) return null;
@@ -21103,18 +21330,18 @@ const getPaymentCardIcon = name => {
21103
21330
  }));
21104
21331
  };
21105
21332
 
21106
- var _path$f;
21333
+ var _path$g;
21107
21334
 
21108
- 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); }
21335
+ 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); }
21109
21336
 
21110
21337
  function SvgChevronRight(props) {
21111
- return /*#__PURE__*/React.createElement("svg", _extends$g({
21338
+ return /*#__PURE__*/React.createElement("svg", _extends$h({
21112
21339
  className: "plc-w-6 plc-h-6",
21113
21340
  xmlns: "http://www.w3.org/2000/svg",
21114
21341
  fill: "none",
21115
21342
  viewBox: "0 0 24 24",
21116
21343
  stroke: "currentColor"
21117
- }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
21344
+ }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
21118
21345
  strokeLinecap: "round",
21119
21346
  strokeLinejoin: "round",
21120
21347
  strokeWidth: 2,
@@ -21330,18 +21557,18 @@ const SavedItems = ({
21330
21557
  });
21331
21558
  };
21332
21559
 
21333
- var _path$e;
21560
+ var _path$f;
21334
21561
 
21335
- 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); }
21562
+ 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); }
21336
21563
 
21337
21564
  function SvgRefresh(props) {
21338
- return /*#__PURE__*/React.createElement("svg", _extends$f({
21565
+ return /*#__PURE__*/React.createElement("svg", _extends$g({
21339
21566
  className: "plc-w-4 plc-h-4 plc-mr-1",
21340
21567
  xmlns: "http://www.w3.org/2000/svg",
21341
21568
  fill: "none",
21342
21569
  viewBox: "0 0 24 24",
21343
21570
  stroke: "currentColor"
21344
- }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
21571
+ }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
21345
21572
  strokeLinecap: "round",
21346
21573
  strokeLinejoin: "round",
21347
21574
  strokeWidth: 2,
@@ -21349,35 +21576,35 @@ function SvgRefresh(props) {
21349
21576
  })));
21350
21577
  }
21351
21578
 
21352
- var _path$d;
21579
+ var _path$e;
21353
21580
 
21354
- 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); }
21581
+ 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); }
21355
21582
 
21356
21583
  function SvgCalendar(props) {
21357
- return /*#__PURE__*/React.createElement("svg", _extends$e({
21584
+ return /*#__PURE__*/React.createElement("svg", _extends$f({
21358
21585
  xmlns: "http://www.w3.org/2000/svg",
21359
21586
  className: "plc-h-4 plc-w-4 plc-mr-1",
21360
21587
  viewBox: "0 0 20 20",
21361
21588
  fill: "currentColor"
21362
- }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
21589
+ }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
21363
21590
  fillRule: "evenodd",
21364
21591
  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",
21365
21592
  clipRule: "evenodd"
21366
21593
  })));
21367
21594
  }
21368
21595
 
21369
- var _path$c;
21596
+ var _path$d;
21370
21597
 
21371
- 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); }
21598
+ 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); }
21372
21599
 
21373
21600
  function SvgPlus(props) {
21374
- return /*#__PURE__*/React.createElement("svg", _extends$d({
21601
+ return /*#__PURE__*/React.createElement("svg", _extends$e({
21375
21602
  className: "plc-w-5 plc-h-5",
21376
21603
  xmlns: "http://www.w3.org/2000/svg",
21377
21604
  fill: "none",
21378
21605
  viewBox: "0 0 24 24",
21379
21606
  stroke: "currentColor"
21380
- }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
21607
+ }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
21381
21608
  strokeLinecap: "round",
21382
21609
  strokeLinejoin: "round",
21383
21610
  strokeWidth: 2,
@@ -21385,17 +21612,17 @@ function SvgPlus(props) {
21385
21612
  })));
21386
21613
  }
21387
21614
 
21388
- var _path$b;
21615
+ var _path$c;
21389
21616
 
21390
- 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); }
21617
+ 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); }
21391
21618
 
21392
21619
  function SvgCheckMark(props) {
21393
- return /*#__PURE__*/React.createElement("svg", _extends$c({
21620
+ return /*#__PURE__*/React.createElement("svg", _extends$d({
21394
21621
  className: "plc-w-4 plc-h-4 plc-mr-1",
21395
21622
  xmlns: "http://www.w3.org/2000/svg",
21396
21623
  viewBox: "0 0 20 20",
21397
21624
  fill: "currentColor"
21398
- }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
21625
+ }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
21399
21626
  fillRule: "evenodd",
21400
21627
  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",
21401
21628
  clipRule: "evenodd"
@@ -21690,18 +21917,18 @@ Accordion.item = function AccordionItem({
21690
21917
  }, content)) : null;
21691
21918
  };
21692
21919
 
21693
- var _path$a;
21920
+ var _path$b;
21694
21921
 
21695
- 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); }
21922
+ 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); }
21696
21923
 
21697
21924
  function SvgExit(props) {
21698
- return /*#__PURE__*/React.createElement("svg", _extends$b({
21925
+ return /*#__PURE__*/React.createElement("svg", _extends$c({
21699
21926
  className: "plc-w-6 plc-h-6",
21700
21927
  xmlns: "http://www.w3.org/2000/svg",
21701
21928
  fill: "none",
21702
21929
  viewBox: "0 0 24 24",
21703
21930
  stroke: "currentColor"
21704
- }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
21931
+ }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
21705
21932
  strokeLinecap: "round",
21706
21933
  strokeLinejoin: "round",
21707
21934
  strokeWidth: 2,
@@ -21709,13 +21936,32 @@ function SvgExit(props) {
21709
21936
  })));
21710
21937
  }
21711
21938
 
21712
- var _path$9;
21939
+ var _path$a;
21713
21940
 
21714
- 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); }
21941
+ 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); }
21715
21942
 
21716
21943
  function SvgUser(props) {
21944
+ return /*#__PURE__*/React.createElement("svg", _extends$b({
21945
+ xmlns: "http://www.w3.org/2000/svg",
21946
+ fill: "none",
21947
+ viewBox: "0 0 24 24",
21948
+ stroke: "currentColor"
21949
+ }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
21950
+ strokeLinecap: "round",
21951
+ strokeLinejoin: "round",
21952
+ strokeWidth: 2,
21953
+ d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zm-4 7a7 7 0 00-7 7h14a7 7 0 00-7-7z"
21954
+ })));
21955
+ }
21956
+
21957
+ var _path$9;
21958
+
21959
+ 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); }
21960
+
21961
+ function SvgNewsletter(props) {
21717
21962
  return /*#__PURE__*/React.createElement("svg", _extends$a({
21718
21963
  xmlns: "http://www.w3.org/2000/svg",
21964
+ className: "plc-h-5 plc-w-5",
21719
21965
  fill: "none",
21720
21966
  viewBox: "0 0 24 24",
21721
21967
  stroke: "currentColor"
@@ -21723,7 +21969,7 @@ function SvgUser(props) {
21723
21969
  strokeLinecap: "round",
21724
21970
  strokeLinejoin: "round",
21725
21971
  strokeWidth: 2,
21726
- d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zm-4 7a7 7 0 00-7 7h14a7 7 0 00-7-7z"
21972
+ d: "M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"
21727
21973
  })));
21728
21974
  }
21729
21975
 
@@ -21731,10 +21977,10 @@ var _path$8;
21731
21977
 
21732
21978
  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); }
21733
21979
 
21734
- function SvgNewsletter(props) {
21980
+ function SvgDocument(props) {
21735
21981
  return /*#__PURE__*/React.createElement("svg", _extends$9({
21736
21982
  xmlns: "http://www.w3.org/2000/svg",
21737
- className: "plc-h-5 plc-w-5",
21983
+ className: "plc-h-6 plc-w-6 plc-mr-2",
21738
21984
  fill: "none",
21739
21985
  viewBox: "0 0 24 24",
21740
21986
  stroke: "currentColor"
@@ -21742,7 +21988,7 @@ function SvgNewsletter(props) {
21742
21988
  strokeLinecap: "round",
21743
21989
  strokeLinejoin: "round",
21744
21990
  strokeWidth: 2,
21745
- d: "M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"
21991
+ d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
21746
21992
  })));
21747
21993
  }
21748
21994
 
@@ -21920,6 +22166,130 @@ function formatStartDate(date) {
21920
22166
  return new Intl.DateTimeFormat("en-CA").format(startDate);
21921
22167
  }
21922
22168
 
22169
+ const InvoicesMenu = props => {
22170
+ const {
22171
+ t
22172
+ } = useTranslation("dashboard");
22173
+ return /*#__PURE__*/React__default.createElement("table", {
22174
+ className: "plc-w-full plc-table-fixed"
22175
+ }, /*#__PURE__*/React__default.createElement("thead", {
22176
+ className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
22177
+ }, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
22178
+ className: "plc-w-4/12 "
22179
+ }, t("labels.details")), /*#__PURE__*/React__default.createElement("th", {
22180
+ className: "plc-w-4/12 "
22181
+ }, t("labels.status.title")), /*#__PURE__*/React__default.createElement("th", {
22182
+ className: "plc-w-3/12 "
22183
+ }, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
22184
+ className: "plc-h-4"
22185
+ }), /*#__PURE__*/React__default.createElement(InvoicesItems, props)));
22186
+ };
22187
+
22188
+ const InvoicesItems = () => {
22189
+ var _window$Pelcro$invoic;
22190
+
22191
+ const {
22192
+ t
22193
+ } = useTranslation("dashboard");
22194
+ const {
22195
+ setInvoice,
22196
+ switchView
22197
+ } = usePelcro();
22198
+ const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
22199
+
22200
+ const showInvoiceDetails = event => {
22201
+ if (setInvoice(event.target.dataset.id)) {
22202
+ switchView("invoice-details");
22203
+ }
22204
+ };
22205
+
22206
+ if (invoices.length === 0) return null;
22207
+ return invoices.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()).map(invoice => {
22208
+ const invoiceStatus = getInvoiceStatus(invoice);
22209
+ const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(new Date(invoice.created_at));
22210
+ return /*#__PURE__*/React__default.createElement("tr", {
22211
+ key: invoice.id,
22212
+ className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50`
22213
+ }, /*#__PURE__*/React__default.createElement("td", {
22214
+ className: "plc-truncate"
22215
+ }, /*#__PURE__*/React__default.createElement("span", {
22216
+ className: "plc-font-semibold plc-text-gray-500"
22217
+ }, `#${invoice.id}`), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
22218
+ className: "plc-text-sm plc-text-gray-500"
22219
+ }, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
22220
+ className: "plc-text-sm plc-text-gray-500"
22221
+ }, formattedCreationDate)), /*#__PURE__*/React__default.createElement("td", {
22222
+ className: "plc-py-2"
22223
+ }, /*#__PURE__*/React__default.createElement("span", {
22224
+ className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${invoiceStatus.bgColor} plc-uppercase ${invoiceStatus.textColor} plc-rounded-lg`
22225
+ }, invoiceStatus.icon, invoiceStatus.title)), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button, {
22226
+ variant: "ghost",
22227
+ className: "plc-text-blue-400 focus:plc-ring-blue-400 pelcro-dashboard-view-invoice-button",
22228
+ icon: /*#__PURE__*/React__default.createElement(SvgDocument, {
22229
+ className: "plc-w-4 plc-h-4"
22230
+ }),
22231
+ onClick: showInvoiceDetails,
22232
+ "data-id": invoice.id
22233
+ }, t("labels.view"))));
22234
+ });
22235
+ };
22236
+
22237
+ function getInvoiceStatus(invoice) {
22238
+ const translations = i18next.t("dashboard:labels", {
22239
+ returnObjects: true
22240
+ });
22241
+
22242
+ switch (invoice.status) {
22243
+ case "paid":
22244
+ return {
22245
+ textColor: "plc-text-green-700",
22246
+ bgColor: "plc-bg-green-100",
22247
+ icon: /*#__PURE__*/React__default.createElement(SvgCheckMark, null),
22248
+ title: translations.paid
22249
+ };
22250
+
22251
+ case "past_due":
22252
+ return {
22253
+ textColor: "plc-text-orange-700",
22254
+ bgColor: "plc-bg-orange-100",
22255
+ icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null),
22256
+ title: translations.pastDue
22257
+ };
22258
+
22259
+ case "open":
22260
+ return {
22261
+ textColor: "plc-text-yellow-700",
22262
+ bgColor: "plc-bg-yellow-100",
22263
+ icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null),
22264
+ title: translations.open
22265
+ };
22266
+
22267
+ case "draft":
22268
+ return {
22269
+ textColor: "plc-text-blue-700",
22270
+ bgColor: "plc-bg-blue-100",
22271
+ icon: /*#__PURE__*/React__default.createElement(SvgEdit, null),
22272
+ title: translations.draft
22273
+ };
22274
+
22275
+ case "uncollectible":
22276
+ return {
22277
+ textColor: "plc-text-red-700",
22278
+ bgColor: "plc-bg-red-100",
22279
+ icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
22280
+ title: translations.uncollectible
22281
+ };
22282
+
22283
+ case "void":
22284
+ return {
22285
+ textColor: "plc-text-gray-700",
22286
+ bgColor: "plc-bg-gray-100",
22287
+ icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
22288
+ title: translations.void
22289
+ };
22290
+ }
22291
+ }
22292
+
21923
22293
  const SUB_MENUS = {
21924
22294
  PROFILE: "profile",
21925
22295
  SUBSCRIPTIONS: "subscriptions",
@@ -21928,6 +22298,7 @@ const SUB_MENUS = {
21928
22298
  ADDRESSES: "addresses",
21929
22299
  GIFTS: "gifts",
21930
22300
  ORDERS: "orders",
22301
+ INVOICES: "invoices",
21931
22302
  SAVED_ITEMS: "saved-items"
21932
22303
  };
21933
22304
  /**
@@ -22470,6 +22841,12 @@ class Dashboard extends Component {
22470
22841
  icon: /*#__PURE__*/React__default.createElement(SvgShopping, null),
22471
22842
  title: this.locale("labels.orders.label"),
22472
22843
  content: /*#__PURE__*/React__default.createElement(OrdersMenu, null)
22844
+ }), /*#__PURE__*/React__default.createElement(Accordion.item, {
22845
+ show: hasInvoices(),
22846
+ name: SUB_MENUS.INVOICES,
22847
+ icon: /*#__PURE__*/React__default.createElement(SvgDocument, null),
22848
+ title: this.locale("labels.invoices"),
22849
+ content: /*#__PURE__*/React__default.createElement(InvoicesMenu, null)
22473
22850
  }), /*#__PURE__*/React__default.createElement(Accordion.item, {
22474
22851
  name: SUB_MENUS.SAVED_ITEMS,
22475
22852
  icon: /*#__PURE__*/React__default.createElement(SvgBookmark, null),
@@ -22485,6 +22862,13 @@ class Dashboard extends Component {
22485
22862
 
22486
22863
  }
22487
22864
 
22865
+ function hasInvoices() {
22866
+ var _window$Pelcro$invoic;
22867
+
22868
+ const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
22869
+ return invoices.length > 0;
22870
+ }
22871
+
22488
22872
  function hasDonationSubs() {
22489
22873
  var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
22490
22874
 
@@ -22519,7 +22903,7 @@ const DashboardOpenButton = () => {
22519
22903
  };
22520
22904
  DashboardOpenButton.viewId = "dashboard-open";
22521
22905
 
22522
- const initialState$1 = {
22906
+ const initialState$2 = {
22523
22907
  imageSrc: null,
22524
22908
  crop: {
22525
22909
  x: 0,
@@ -22533,10 +22917,10 @@ const initialState$1 = {
22533
22917
  content: ""
22534
22918
  }
22535
22919
  };
22536
- const store$1 = /*#__PURE__*/createContext(initialState$1);
22920
+ const store$2 = /*#__PURE__*/createContext(initialState$2);
22537
22921
  const {
22538
- Provider: Provider$1
22539
- } = store$1;
22922
+ Provider: Provider$2
22923
+ } = store$2;
22540
22924
 
22541
22925
  const ProfilePicChangeContainer = ({
22542
22926
  style,
@@ -22670,21 +23054,21 @@ const ProfilePicChangeContainer = ({
22670
23054
  default:
22671
23055
  return state;
22672
23056
  }
22673
- }, initialState$1);
23057
+ }, initialState$2);
22674
23058
  return /*#__PURE__*/React__default.createElement("div", {
22675
23059
  style: { ...style
22676
23060
  },
22677
23061
  className: `pelcro-container pelcro-profile-picture-container ${className}`
22678
- }, /*#__PURE__*/React__default.createElement(Provider$1, {
23062
+ }, /*#__PURE__*/React__default.createElement(Provider$2, {
22679
23063
  value: {
22680
23064
  state,
22681
23065
  dispatch
22682
23066
  }
22683
23067
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
22684
- store: store$1,
23068
+ store: store$2,
22685
23069
  key: i
22686
23070
  })) : /*#__PURE__*/React__default.cloneElement(children, {
22687
- store: store$1
23071
+ store: store$2
22688
23072
  })));
22689
23073
  };
22690
23074
  /**
@@ -22746,7 +23130,7 @@ const ProfilePicChangeButton = ({
22746
23130
  isSubmitting
22747
23131
  },
22748
23132
  dispatch
22749
- } = useContext(store$1);
23133
+ } = useContext(store$2);
22750
23134
  const {
22751
23135
  t
22752
23136
  } = useTranslation("userEdit");
@@ -24114,7 +24498,7 @@ const ProfilePicChangeCropper = ({
24114
24498
  zoom
24115
24499
  },
24116
24500
  dispatch
24117
- } = useContext(store$1);
24501
+ } = useContext(store$2);
24118
24502
  return /*#__PURE__*/React__default.createElement("div", {
24119
24503
  className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
24120
24504
  }, /*#__PURE__*/React__default.createElement(Cropper, Object.assign({
@@ -24156,7 +24540,7 @@ const ProfilePicChangeZoom = ({
24156
24540
  zoom
24157
24541
  },
24158
24542
  dispatch
24159
- } = useContext(store$1);
24543
+ } = useContext(store$2);
24160
24544
  const {
24161
24545
  t
24162
24546
  } = useTranslation("userEdit");
@@ -24208,7 +24592,7 @@ const ProfilePicChangeSelectButton = ({
24208
24592
  state: {
24209
24593
  isSubmitting
24210
24594
  }
24211
- } = useContext(store$1);
24595
+ } = useContext(store$2);
24212
24596
  const {
24213
24597
  t
24214
24598
  } = useTranslation("userEdit");
@@ -24250,7 +24634,7 @@ const ProfilePicChangeRemoveButton = ({
24250
24634
  state: {
24251
24635
  isSubmitting
24252
24636
  }
24253
- } = useContext(store$1);
24637
+ } = useContext(store$2);
24254
24638
  const {
24255
24639
  t
24256
24640
  } = useTranslation("userEdit");
@@ -24273,7 +24657,7 @@ const ProfilePicChangeWrapper = () => {
24273
24657
  state: {
24274
24658
  imageSrc
24275
24659
  }
24276
- } = useContext(store$1);
24660
+ } = useContext(store$2);
24277
24661
  const {
24278
24662
  t
24279
24663
  } = useTranslation("userEdit");
@@ -24335,17 +24719,17 @@ function ProfilePicChangeModal({
24335
24719
  }
24336
24720
  ProfilePicChangeModal.viewId = "profile-picture";
24337
24721
 
24338
- const initialState = {
24722
+ const initialState$1 = {
24339
24723
  isSubmitting: false,
24340
24724
  alert: {
24341
24725
  type: "error",
24342
24726
  content: ""
24343
24727
  }
24344
24728
  };
24345
- const store = /*#__PURE__*/createContext(initialState);
24729
+ const store$1 = /*#__PURE__*/createContext(initialState$1);
24346
24730
  const {
24347
- Provider
24348
- } = store;
24731
+ Provider: Provider$1
24732
+ } = store$1;
24349
24733
 
24350
24734
  const EmailVerifyContainer = ({
24351
24735
  style,
@@ -24408,21 +24792,21 @@ const EmailVerifyContainer = ({
24408
24792
  default:
24409
24793
  return state;
24410
24794
  }
24411
- }, initialState);
24795
+ }, initialState$1);
24412
24796
  return /*#__PURE__*/React__default.createElement("div", {
24413
24797
  style: { ...style
24414
24798
  },
24415
24799
  className: `pelcro-container pelcro-email-verify-container ${className}`
24416
- }, /*#__PURE__*/React__default.createElement(Provider, {
24800
+ }, /*#__PURE__*/React__default.createElement(Provider$1, {
24417
24801
  value: {
24418
24802
  state,
24419
24803
  dispatch
24420
24804
  }
24421
24805
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
24422
- store,
24806
+ store: store$1,
24423
24807
  key: i
24424
24808
  })) : /*#__PURE__*/React__default.cloneElement(children, {
24425
- store
24809
+ store: store$1
24426
24810
  })));
24427
24811
  };
24428
24812
 
@@ -24436,7 +24820,7 @@ const EmailVerifyResendButton = ({
24436
24820
  state: {
24437
24821
  isSubmitting
24438
24822
  }
24439
- } = useContext(store);
24823
+ } = useContext(store$1);
24440
24824
  const {
24441
24825
  t
24442
24826
  } = useTranslation("verifyEmail");
@@ -24511,4 +24895,233 @@ const EmailVerifyModal = ({
24511
24895
  };
24512
24896
  EmailVerifyModal.viewId = "email-verify";
24513
24897
 
24514
- 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, 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, 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, notify, unauthenticatedButtons, usePelcro };
24898
+ const InvoicePaymentContainer = props => /*#__PURE__*/React__default.createElement(PaymentMethodContainer, Object.assign({
24899
+ type: "invoicePayment",
24900
+ className: "pelcro-invoice-payment-container"
24901
+ }, props));
24902
+
24903
+ const InvoicePaymentView = props => {
24904
+ const {
24905
+ t
24906
+ } = useTranslation("payment");
24907
+ return /*#__PURE__*/React__default.createElement("div", {
24908
+ id: "pelcro-invoice-payment-view"
24909
+ }, /*#__PURE__*/React__default.createElement("div", {
24910
+ className: "plc-mb-6 plc-text-2xl plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
24911
+ }, /*#__PURE__*/React__default.createElement("h4", null, t("labels.checkout.title"))), /*#__PURE__*/React__default.createElement("form", {
24912
+ action: "javascript:void(0);",
24913
+ className: "plc-mt-2 pelcro-form"
24914
+ }, /*#__PURE__*/React__default.createElement(PaymentMethodView, Object.assign({
24915
+ type: "invoicePayment",
24916
+ showCoupon: false,
24917
+ showExternalPaymentMethods: true
24918
+ }, props))));
24919
+ };
24920
+
24921
+ const InvoicePaymentModal = ({
24922
+ onDisplay,
24923
+ onClose,
24924
+ ...otherProps
24925
+ }) => {
24926
+ const {
24927
+ switchView
24928
+ } = usePelcro();
24929
+
24930
+ const onSuccess = () => {
24931
+ var _otherProps$onSuccess;
24932
+
24933
+ (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
24934
+ return switchView("subscription-success");
24935
+ };
24936
+
24937
+ return /*#__PURE__*/React__default.createElement(Modal, {
24938
+ id: "pelcro-invoice-payment-modal",
24939
+ onDisplay: onDisplay,
24940
+ onClose: onClose
24941
+ }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(InvoicePaymentView, Object.assign({}, otherProps, {
24942
+ onSuccess: onSuccess
24943
+ }))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
24944
+ };
24945
+ InvoicePaymentModal.viewId = "invoice-payment";
24946
+
24947
+ const invoicePaymentSubmitButton = props => {
24948
+ return /*#__PURE__*/React__default.createElement(SubmitPaymentMethod, props);
24949
+ };
24950
+
24951
+ const initialState = {};
24952
+ const store = /*#__PURE__*/createContext(initialState);
24953
+ const {
24954
+ Provider
24955
+ } = store;
24956
+
24957
+ const InvoiceDetailsContainer = ({
24958
+ style,
24959
+ className = "",
24960
+ onSuccess = () => {},
24961
+ children,
24962
+ ...props
24963
+ }) => {
24964
+ const onPayButtonClick = () => {
24965
+ return onSuccess();
24966
+ };
24967
+
24968
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
24969
+ switch (action.type) {
24970
+ case HANDLE_SUBMIT:
24971
+ return lib_4((state, dispatch) => onPayButtonClick());
24972
+
24973
+ default:
24974
+ return state;
24975
+ }
24976
+ }, initialState);
24977
+ return /*#__PURE__*/React__default.createElement("div", {
24978
+ style: { ...style
24979
+ },
24980
+ className: `pelcro-container pelcro-invoice-details-container ${className}`
24981
+ }, /*#__PURE__*/React__default.createElement(Provider, {
24982
+ value: {
24983
+ state,
24984
+ dispatch
24985
+ }
24986
+ }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
24987
+ store,
24988
+ key: i
24989
+ })) : /*#__PURE__*/React__default.cloneElement(children, {
24990
+ store
24991
+ })));
24992
+ };
24993
+
24994
+ const InvoiceDetailsDownloadButton = ({
24995
+ name,
24996
+ url,
24997
+ className,
24998
+ ...otherProps
24999
+ }) => {
25000
+ const {
25001
+ t
25002
+ } = useTranslation("invoiceDetails");
25003
+ const {
25004
+ invoice
25005
+ } = usePelcro();
25006
+ return /*#__PURE__*/React__default.createElement(Link, Object.assign({
25007
+ className: `plc-px-6 plc-py-2 plc-uppercase plc-bg-transparent plc-text-primary-500 plc-border plc-border-primary-500 plc-rounded focus:plc-outline-none focus:plc-ring-2 focus:plc-ring-primary-300 plc-tracking-wider hover:plc-bg-primary-600 focus:plc-bg-primary-600 hover:plc-text-white focus:plc-text-white hover:plc-shadow-none plc-no-underline ${className}`,
25008
+ id: "pelcro-download-invoice-link",
25009
+ href: url !== null && url !== void 0 ? url : invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
25010
+ target: "_blank",
25011
+ rel: "noopener noreferrer"
25012
+ }, otherProps), name !== null && name !== void 0 ? name : t("buttons.download"));
25013
+ };
25014
+
25015
+ const InvoiceDetailsPayButton = ({
25016
+ name,
25017
+ onClick,
25018
+ ...otherProps
25019
+ }) => {
25020
+ const {
25021
+ dispatch
25022
+ } = useContext(store);
25023
+ const {
25024
+ t
25025
+ } = useTranslation("invoiceDetails");
25026
+ return /*#__PURE__*/React__default.createElement(Button, Object.assign({
25027
+ onClick: () => {
25028
+ dispatch({
25029
+ type: HANDLE_SUBMIT
25030
+ });
25031
+ onClick === null || onClick === void 0 ? void 0 : onClick();
25032
+ }
25033
+ }, otherProps), name !== null && name !== void 0 ? name : t("buttons.pay"));
25034
+ };
25035
+
25036
+ const InvoiceDetailsView = props => {
25037
+ const {
25038
+ t
25039
+ } = useTranslation("invoiceDetails");
25040
+ const {
25041
+ invoice
25042
+ } = usePelcro();
25043
+ const showPayButton = canPayInvoice(invoice);
25044
+ const creationDate = new Date(invoice === null || invoice === void 0 ? void 0 : invoice.created_at);
25045
+ const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(creationDate);
25046
+ return /*#__PURE__*/React__default.createElement("div", {
25047
+ id: "pelcro-invoice-details-view"
25048
+ }, /*#__PURE__*/React__default.createElement("div", {
25049
+ className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
25050
+ }, /*#__PURE__*/React__default.createElement("h4", {
25051
+ className: "plc-text-2xl plc-font-semibold"
25052
+ }, t("title"))), /*#__PURE__*/React__default.createElement("form", {
25053
+ action: "javascript:void(0);",
25054
+ className: "plc-mt-2 pelcro-form"
25055
+ }, /*#__PURE__*/React__default.createElement(InvoiceDetailsContainer, props, /*#__PURE__*/React__default.createElement("div", {
25056
+ className: "plc-mt-5 pelcro-invoice-summary-wrapper"
25057
+ }, /*#__PURE__*/React__default.createElement("p", {
25058
+ className: "plc-font-bold pelcro-invoice-summary-title"
25059
+ }, t("labels.summary")), invoice && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
25060
+ className: "plc-mr-2 pelcro-invoice-creation-date"
25061
+ }, `${t("labels.creationDate")} ${formattedCreationDate}`), /*#__PURE__*/React__default.createElement("div", {
25062
+ className: "plc-flex plc-items-center plc-pt-2 plc-mt-2 plc-border-t plc-border-gray-400 plc-min-h-12 plc-justify-evenly pelcro-invoice-plan-wrapper"
25063
+ }, /*#__PURE__*/React__default.createElement("div", {
25064
+ className: "plc-w-1/2 plc-break-words pelcro-invoice-plan-name"
25065
+ }, invoice.plan.nickname), /*#__PURE__*/React__default.createElement("div", {
25066
+ className: "plc-w-1/5 plc-text-center pelcro-invoice-summary-price"
25067
+ }, calcAndFormatItemsTotal([invoice.plan], invoice.currency))), /*#__PURE__*/React__default.createElement("div", {
25068
+ className: "plc-flex plc-justify-end plc-pt-2 plc-mt-2 plc-font-bold plc-border-t plc-border-gray-400 pelcro-invoice-total-wrapper"
25069
+ }, /*#__PURE__*/React__default.createElement("div", {
25070
+ className: "plc-mr-2 plc-flex plc-flex-col"
25071
+ }, /*#__PURE__*/React__default.createElement("p", {
25072
+ className: "pelcro-invoice-total-text"
25073
+ }, t("labels.total")), /*#__PURE__*/React__default.createElement("p", {
25074
+ className: "pelcro-invoice-total-text"
25075
+ }, t("labels.amountPaid")), /*#__PURE__*/React__default.createElement("p", {
25076
+ className: "plc-font-semibold pelcro-invoice-total-text"
25077
+ }, t("labels.amountDue"))), /*#__PURE__*/React__default.createElement("div", {
25078
+ className: "plc-flex plc-flex-col"
25079
+ }, /*#__PURE__*/React__default.createElement("p", {
25080
+ className: "pelcro-invoice-total"
25081
+ }, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default.createElement("p", {
25082
+ className: "pelcro-invoice-total"
25083
+ }, getFormattedPriceByLocal(invoice.amount_paid, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default.createElement("p", {
25084
+ className: "plc-font-semibold pelcro-invoice-total"
25085
+ }, getFormattedPriceByLocal(invoice.amount_remaining, invoice.currency, getPageOrDefaultLanguage())))))), /*#__PURE__*/React__default.createElement("div", {
25086
+ className: "plc-flex plc-items-center plc-justify-center plc-mt-4"
25087
+ }, /*#__PURE__*/React__default.createElement(InvoiceDetailsDownloadButton, {
25088
+ url: invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
25089
+ className: "plc-w-full plc-text-center"
25090
+ }), showPayButton && /*#__PURE__*/React__default.createElement(InvoiceDetailsPayButton, {
25091
+ role: "submit",
25092
+ className: "plc-ml-4 plc-w-full",
25093
+ id: "pelcro-submit"
25094
+ })))));
25095
+ };
25096
+
25097
+ function canPayInvoice(invoice) {
25098
+ return (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "open" || (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "past_due";
25099
+ }
25100
+
25101
+ const InvoiceDetailsModal = ({
25102
+ onDisplay,
25103
+ onClose,
25104
+ ...otherProps
25105
+ }) => {
25106
+ const {
25107
+ switchToPaymentView
25108
+ } = usePelcro();
25109
+
25110
+ const onSuccess = () => {
25111
+ var _otherProps$onSuccess;
25112
+
25113
+ (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
25114
+ switchToPaymentView();
25115
+ };
25116
+
25117
+ return /*#__PURE__*/React__default.createElement(Modal, {
25118
+ onDisplay: onDisplay,
25119
+ onClose: onClose,
25120
+ id: "pelcro-invoice-details-modal"
25121
+ }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(InvoiceDetailsView, Object.assign({}, otherProps, {
25122
+ onSuccess: onSuccess
25123
+ }))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
25124
+ };
25125
+ InvoiceDetailsModal.viewId = "invoice-details";
25126
+
25127
+ 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, 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 };