@pelcro/react-pelcro-js 3.22.0 → 3.23.0-beta.1

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
@@ -3223,7 +3223,7 @@ var validation$3 = {
3223
3223
  enterLastName: "Last name is required.",
3224
3224
  enterPhone: "Phone number is required."
3225
3225
  };
3226
- var buttons$j = {
3226
+ var buttons$n = {
3227
3227
  account: "My account",
3228
3228
  login: "Login",
3229
3229
  subscribe: "Subscribe"
@@ -3301,7 +3301,7 @@ var confirm$b = {
3301
3301
  };
3302
3302
  var common_en = {
3303
3303
  validation: validation$3,
3304
- buttons: buttons$j,
3304
+ buttons: buttons$n,
3305
3305
  dashboard: dashboard$4,
3306
3306
  select: select$7,
3307
3307
  confirm: confirm$b
@@ -3332,7 +3332,7 @@ var paymentMethod_en = {
3332
3332
  var title$z = "Enter your email to subscribe to our newsletter";
3333
3333
  var updateTitle$3 = "Update newsletter selections";
3334
3334
  var subtitle$f = "We may use your email for other marketing communication";
3335
- var labels$12 = {
3335
+ var labels$16 = {
3336
3336
  submit: "Submit",
3337
3337
  firstName: "First name",
3338
3338
  lastName: "Last name",
@@ -3340,7 +3340,7 @@ var labels$12 = {
3340
3340
  postalCode: "Postal code",
3341
3341
  required: "required"
3342
3342
  };
3343
- var messages$17 = {
3343
+ var messages$1b = {
3344
3344
  alreadyHaveAccount: "Already have an account?",
3345
3345
  success: "Newsletters were successfully updated",
3346
3346
  loginHere: "Login here.",
@@ -3351,14 +3351,14 @@ var newsletter_en = {
3351
3351
  title: title$z,
3352
3352
  updateTitle: updateTitle$3,
3353
3353
  subtitle: subtitle$f,
3354
- labels: labels$12,
3355
- messages: messages$17
3354
+ labels: labels$16,
3355
+ messages: messages$1b
3356
3356
  };
3357
3357
 
3358
- var labels$11 = {
3358
+ var labels$15 = {
3359
3359
  "continue": "Continue to content"
3360
3360
  };
3361
- var messages$16 = {
3361
+ var messages$1a = {
3362
3362
  yourFreeTrial: "Subscription successful!",
3363
3363
  youHaveAccess: "Hope you enjoy the subscription. Please contact us if you have any questions or concerns.",
3364
3364
  clickToLearn: {
@@ -3384,12 +3384,12 @@ var errors$j = {
3384
3384
  "": ""
3385
3385
  };
3386
3386
  var success_en = {
3387
- labels: labels$11,
3388
- messages: messages$16,
3387
+ labels: labels$15,
3388
+ messages: messages$1a,
3389
3389
  errors: errors$j
3390
3390
  };
3391
3391
 
3392
- var messages$15 = {
3392
+ var messages$19 = {
3393
3393
  freeVisits: "Free visits left:",
3394
3394
  subscribeNow: "Subscribe",
3395
3395
  alreadyHaveAccount: "Already have an account?",
@@ -3399,16 +3399,16 @@ var errors$i = {
3399
3399
  "": ""
3400
3400
  };
3401
3401
  var meter_en = {
3402
- messages: messages$15,
3402
+ messages: messages$19,
3403
3403
  errors: errors$i
3404
3404
  };
3405
3405
 
3406
- var messages$14 = {
3406
+ var messages$18 = {
3407
3407
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
3408
3408
  bankRedirection: "Please hold, redirecting you to your bank.",
3409
3409
  bankAuthenticationSuccess: "Please wait while we process your request."
3410
3410
  };
3411
- var labels$10 = {
3411
+ var labels$14 = {
3412
3412
  card: "Enter card number",
3413
3413
  date: "Expiration date",
3414
3414
  CVC: "CVC",
@@ -3428,11 +3428,13 @@ var labels$10 = {
3428
3428
  firstName: "First name",
3429
3429
  lastName: "Last name",
3430
3430
  phone: "Phone",
3431
- freeItems: "Free Items"
3431
+ freeItems: "Free Items",
3432
+ email: "Email",
3433
+ password: "Password"
3432
3434
  };
3433
3435
  var checkoutForm_en = {
3434
- messages: messages$14,
3435
- labels: labels$10
3436
+ messages: messages$18,
3437
+ labels: labels$14
3436
3438
  };
3437
3439
 
3438
3440
  var youAreSafe$3 = "You're safe - PCI compliant 128 SSL by";
@@ -3456,7 +3458,7 @@ var messages_en = {
3456
3458
  zeroTotalInvoice: zeroTotalInvoice$3
3457
3459
  };
3458
3460
 
3459
- var labels$$ = {
3461
+ var labels$13 = {
3460
3462
  email: "Enter email",
3461
3463
  username: "Enter username",
3462
3464
  password: "Enter password",
@@ -3465,7 +3467,7 @@ var labels$$ = {
3465
3467
  passwordPlaceholder: "Password",
3466
3468
  login: "Login"
3467
3469
  };
3468
- var messages$13 = {
3470
+ var messages$17 = {
3469
3471
  loginTo: "Login to your account",
3470
3472
  welcome: "Welcome back, sign in with your existing account.",
3471
3473
  dontHaveAccount: "Don't have an account yet?",
@@ -3484,28 +3486,28 @@ var errors$h = {
3484
3486
  "": ""
3485
3487
  };
3486
3488
  var login_en = {
3487
- labels: labels$$,
3488
- messages: messages$13,
3489
+ labels: labels$13,
3490
+ messages: messages$17,
3489
3491
  errors: errors$h
3490
3492
  };
3491
3493
 
3492
- var labels$_ = {
3494
+ var labels$12 = {
3493
3495
  title: "Verifying Passwordless Link",
3494
3496
  instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
3495
3497
  resend: "Resend email"
3496
3498
  };
3497
- var messages$12 = {
3499
+ var messages$16 = {
3498
3500
  resent: "Resent successfully",
3499
3501
  success: "You have logged in successfully"
3500
3502
  };
3501
3503
  var verifyLinkToken_en = {
3502
- labels: labels$_,
3503
- messages: messages$12
3504
+ labels: labels$12,
3505
+ messages: messages$16
3504
3506
  };
3505
3507
 
3506
3508
  var title$y = "Create an account";
3507
3509
  var subtitle$e = "Enter your email and password below";
3508
- var labels$Z = {
3510
+ var labels$11 = {
3509
3511
  signUpFacebook: "Sign up with Facebook",
3510
3512
  signUpGoogle: "Sign up with Google",
3511
3513
  signUpEmail: "Sign up with Email",
@@ -3518,7 +3520,7 @@ var labels$Z = {
3518
3520
  lastName: "Last name",
3519
3521
  phone: "Phone"
3520
3522
  };
3521
- var messages$11 = {
3523
+ var messages$15 = {
3522
3524
  alreadyHaveAccount: "Already have an account?",
3523
3525
  createAccount: "Create account",
3524
3526
  loginHere: "login here. ",
@@ -3564,7 +3566,8 @@ var gift$3 = {
3564
3566
  enterEmail: "Please enter the gift recipient's email.",
3565
3567
  invalidDate: "The gift date needs to be between today and a year from now.",
3566
3568
  giftDateInfo: "The recipient will receive a gift email notification with your message on the date you select in order to redeem the gift.",
3567
- giftMessageInfo: "Leave a message to the recipient and don't forget to sign your name."
3569
+ giftMessageInfo: "Leave a message to the recipient and don't forget to sign your name.",
3570
+ giftMessageAllowedCharacters: "Special characters and emojis are not allowed."
3568
3571
  }
3569
3572
  };
3570
3573
  var redeem$3 = {
@@ -3592,14 +3595,14 @@ var redeem$3 = {
3592
3595
  var register_en = {
3593
3596
  title: title$y,
3594
3597
  subtitle: subtitle$e,
3595
- labels: labels$Z,
3596
- messages: messages$11,
3598
+ labels: labels$11,
3599
+ messages: messages$15,
3597
3600
  errors: errors$g,
3598
3601
  gift: gift$3,
3599
3602
  redeem: redeem$3
3600
3603
  };
3601
3604
 
3602
- var labels$Y = {
3605
+ var labels$10 = {
3603
3606
  title: "Want to update your profile?",
3604
3607
  subtitle: "Enter your information below to update your profile",
3605
3608
  email: "Email",
@@ -3618,21 +3621,21 @@ var labels$Y = {
3618
3621
  zoom: "Zoom",
3619
3622
  tin: "Tax Identification Number"
3620
3623
  };
3621
- var messages$10 = {
3624
+ var messages$14 = {
3622
3625
  userUpdated: "Thanks! Your profile was updated successfully.",
3623
3626
  pictureRemoved: "Your profile picture was removed successfully.",
3624
3627
  pictureUpdated: "Your profile picture was updated successfully."
3625
3628
  };
3626
3629
  var userEdit_en = {
3627
- labels: labels$Y,
3628
- messages: messages$10
3630
+ labels: labels$10,
3631
+ messages: messages$14
3629
3632
  };
3630
3633
 
3631
3634
  var title$x = "Enter your shipping address";
3632
3635
  var titleGifting$3 = "Enter your address";
3633
3636
  var selectAddressTitle$3 = "Please select an address";
3634
3637
  var selectAddressSubtitle$3 = "Select one of your saved addresses, or add a new one";
3635
- var labels$X = {
3638
+ var labels$$ = {
3636
3639
  address: "Address",
3637
3640
  code: "Postal Code/Zip",
3638
3641
  city: "City",
@@ -3643,12 +3646,12 @@ var labels$X = {
3643
3646
  required: "required",
3644
3647
  isDefault: "Set as default"
3645
3648
  };
3646
- var buttons$i = {
3649
+ var buttons$m = {
3647
3650
  submit: "Submit",
3648
3651
  selectAddress: "Select address",
3649
3652
  addAddress: "Add new address"
3650
3653
  };
3651
- var messages$$ = {
3654
+ var messages$13 = {
3652
3655
  addressUpdated: "The address was successfully updated!",
3653
3656
  subRedeemed: "Your subscription has been redeemed."
3654
3657
  };
@@ -3657,9 +3660,9 @@ var address_en = {
3657
3660
  titleGifting: titleGifting$3,
3658
3661
  selectAddressTitle: selectAddressTitle$3,
3659
3662
  selectAddressSubtitle: selectAddressSubtitle$3,
3660
- labels: labels$X,
3661
- buttons: buttons$i,
3662
- messages: messages$$
3663
+ labels: labels$$,
3664
+ buttons: buttons$m,
3665
+ messages: messages$13
3663
3666
  };
3664
3667
 
3665
3668
  var title$w = "Reset your password";
@@ -3687,7 +3690,7 @@ var password$6 = "Password";
3687
3690
  var submit$e = "Submit";
3688
3691
  var required$e = "Required";
3689
3692
  var passwordResetEmailSent$3 = "Password reset instructions have been sent to your email";
3690
- var messages$_ = {
3693
+ var messages$12 = {
3691
3694
  alreadyHaveAccount: "Already have an account?",
3692
3695
  loginHere: "login here."
3693
3696
  };
@@ -3698,7 +3701,7 @@ var passwordForgot_en = {
3698
3701
  submit: submit$e,
3699
3702
  required: required$e,
3700
3703
  passwordResetEmailSent: passwordResetEmailSent$3,
3701
- messages: messages$_
3704
+ messages: messages$12
3702
3705
  };
3703
3706
 
3704
3707
  var title$u = "Change your password";
@@ -3726,7 +3729,7 @@ var title$t = "Passwordless Login";
3726
3729
  var email$9 = "Enter email";
3727
3730
  var submit$c = "Submit";
3728
3731
  var required$c = "Required";
3729
- var messages$Z = {
3732
+ var messages$11 = {
3730
3733
  PasswordlessLoginSuccess: "Please check your email and follow the instructions there"
3731
3734
  };
3732
3735
  var passwordlessRequest_en = {
@@ -3734,7 +3737,7 @@ var passwordlessRequest_en = {
3734
3737
  email: email$9,
3735
3738
  submit: submit$c,
3736
3739
  required: required$c,
3737
- messages: messages$Z
3740
+ messages: messages$11
3738
3741
  };
3739
3742
 
3740
3743
  var title$s = "Your shopping cart";
@@ -3762,13 +3765,13 @@ var cart_en = {
3762
3765
  removeAll: removeAll$3
3763
3766
  };
3764
3767
 
3765
- var buttons$h = {
3768
+ var buttons$l = {
3766
3769
  select: "Select",
3767
3770
  added: "Added to cart",
3768
3771
  purchase: "Purchase",
3769
3772
  "continue": "Continue"
3770
3773
  };
3771
- var messages$Y = {
3774
+ var messages$10 = {
3772
3775
  orderConfirmed: {
3773
3776
  title: "Order confirmed!",
3774
3777
  body: "Your order has been confirmed and will be shipped within the next few days. You'll shortly receive an email confirmation of this order."
@@ -3777,17 +3780,17 @@ var messages$Y = {
3777
3780
  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.",
3778
3781
  currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
3779
3782
  };
3780
- var labels$W = {
3783
+ var labels$_ = {
3781
3784
  summary: "Order summary",
3782
3785
  total: "total"
3783
3786
  };
3784
3787
  var shop_en = {
3785
- buttons: buttons$h,
3786
- messages: messages$Y,
3787
- labels: labels$W
3788
+ buttons: buttons$l,
3789
+ messages: messages$10,
3790
+ labels: labels$_
3788
3791
  };
3789
3792
 
3790
- var labels$V = {
3793
+ var labels$Z = {
3791
3794
  cardNumber: "Card number",
3792
3795
  securityCode: "Security Code",
3793
3796
  submit: "Submit",
@@ -3809,7 +3812,7 @@ var labels$V = {
3809
3812
  title: "Payment Information"
3810
3813
  }
3811
3814
  };
3812
- var messages$X = {
3815
+ var messages$$ = {
3813
3816
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
3814
3817
  cancel: "Cancel your subscription online at anytime.",
3815
3818
  giftSent: "Subscription gift has been sent to",
@@ -3823,12 +3826,12 @@ var errors$f = {
3823
3826
  "": ""
3824
3827
  };
3825
3828
  var payment_en = {
3826
- labels: labels$V,
3827
- messages: messages$X,
3829
+ labels: labels$Z,
3830
+ messages: messages$$,
3828
3831
  errors: errors$f
3829
3832
  };
3830
3833
 
3831
- var labels$U = {
3834
+ var labels$Y = {
3832
3835
  menu: "Pelcro Menu",
3833
3836
  name: "Name",
3834
3837
  email: "Email",
@@ -3914,9 +3917,12 @@ var labels$U = {
3914
3917
  },
3915
3918
  subCancellation: {
3916
3919
  goBack: "Go back"
3920
+ },
3921
+ donationCancellation: {
3922
+ goBack: "Go back"
3917
3923
  }
3918
3924
  };
3919
- var messages$W = {
3925
+ var messages$_ = {
3920
3926
  noCard: "You don't have a card",
3921
3927
  subCancellation: {
3922
3928
  isSureToCancel: "Are you sure you want to cancel your subscription?",
@@ -3933,19 +3939,35 @@ var messages$W = {
3933
3939
  loading: "Unsuspending your subscription",
3934
3940
  success: "Subscription is successfully unsuspended",
3935
3941
  error: "Error while unsuspending your subscription"
3942
+ },
3943
+ donationCancellation: {
3944
+ isSureToCancel: "Are you sure you want to cancel your donation?",
3945
+ loading: "Cancelling your donation",
3946
+ success: "Donation is successfully cancelled",
3947
+ error: "Error while cancelling your donation"
3948
+ },
3949
+ donationReactivation: {
3950
+ success: "Donation is successfully reactivated",
3951
+ error: "Error while reactivating your donation"
3952
+ },
3953
+ donationUnSuspend: {
3954
+ isSureToUnSuspend: "Are you sure you want to unsuspend your donation?",
3955
+ loading: "Unsuspending your donation",
3956
+ success: "Donation is successfully unsuspended",
3957
+ error: "Error while unsuspending your donation"
3936
3958
  }
3937
3959
  };
3938
3960
  var dashboard_en = {
3939
- labels: labels$U,
3940
- messages: messages$W
3961
+ labels: labels$Y,
3962
+ messages: messages$_
3941
3963
  };
3942
3964
 
3943
- var messages$V = {
3965
+ var messages$Z = {
3944
3966
  alreadyHaveAccount: "Already have an account?",
3945
3967
  loginHere: "Login here",
3946
3968
  checkbox: "Check this box to gift this subscription"
3947
3969
  };
3948
- var labels$T = {
3970
+ var labels$X = {
3949
3971
  plan: {
3950
3972
  title: "Subscribe to a plan",
3951
3973
  subtitle: "Select one of the plans below and click on next."
@@ -3962,15 +3984,49 @@ var labels$T = {
3962
3984
  or: "Or take a look at some of our other options below"
3963
3985
  }
3964
3986
  };
3965
- var buttons$g = {
3987
+ var buttons$k = {
3966
3988
  next: "Next",
3967
3989
  select: "Select",
3968
3990
  back: "Back"
3969
3991
  };
3970
3992
  var select_en = {
3971
- messages: messages$V,
3972
- labels: labels$T,
3973
- buttons: buttons$g
3993
+ messages: messages$Z,
3994
+ labels: labels$X,
3995
+ buttons: buttons$k
3996
+ };
3997
+
3998
+ var messages$Y = {
3999
+ alreadyHaveAccount: "Already have an account?",
4000
+ loginHere: "Login here",
4001
+ checkbox: "Check this box to gift this subscription"
4002
+ };
4003
+ var labels$W = {
4004
+ plan: {
4005
+ title: "Subscribe to a plan",
4006
+ subtitle: "Select one of the plans below and click on next."
4007
+ },
4008
+ product: {
4009
+ title: "Subscribe to a product",
4010
+ subtitle: "Select one of the products below and click on next."
4011
+ },
4012
+ selectProduct: "Select a product",
4013
+ selectPlan: "Select a plan",
4014
+ startingAt: "Starting at",
4015
+ restrictiveArticles: {
4016
+ subscribeTo: "Subscribe to one of the following options to get access to this page",
4017
+ or: "Or take a look at some of our other options below"
4018
+ }
4019
+ };
4020
+ var buttons$j = {
4021
+ signupAndDonate: "Sign up & donate",
4022
+ donate: "Donate",
4023
+ select: "Select",
4024
+ back: "Back"
4025
+ };
4026
+ var donation_en = {
4027
+ messages: messages$Y,
4028
+ labels: labels$W,
4029
+ buttons: buttons$j
3974
4030
  };
3975
4031
 
3976
4032
  var confirm$9 = {
@@ -3983,46 +4039,46 @@ var notification_en = {
3983
4039
  confirm: confirm$9
3984
4040
  };
3985
4041
 
3986
- var labels$S = {
4042
+ var labels$V = {
3987
4043
  title: "Verify your email",
3988
4044
  instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
3989
4045
  resend: "Resend email"
3990
4046
  };
3991
- var messages$U = {
4047
+ var messages$X = {
3992
4048
  resent: "Resent successfully",
3993
4049
  success: "Email verified successfully!"
3994
4050
  };
3995
4051
  var verifyEmail_en = {
3996
- labels: labels$S,
3997
- messages: messages$U
4052
+ labels: labels$V,
4053
+ messages: messages$X
3998
4054
  };
3999
4055
 
4000
4056
  var title$r = "Invoice details";
4001
- var labels$R = {
4057
+ var labels$U = {
4002
4058
  summary: "Summary",
4003
4059
  total: "Total",
4004
4060
  amountPaid: "Amount paid",
4005
4061
  amountDue: "Amount due",
4006
4062
  creationDate: "Created on:"
4007
4063
  };
4008
- var buttons$f = {
4064
+ var buttons$i = {
4009
4065
  download: "Download",
4010
4066
  pay: "Pay now"
4011
4067
  };
4012
4068
  var invoiceDetails_en = {
4013
4069
  title: title$r,
4014
- labels: labels$R,
4015
- buttons: buttons$f
4070
+ labels: labels$U,
4071
+ buttons: buttons$i
4016
4072
  };
4017
4073
 
4018
- var labels$Q = {
4074
+ var labels$T = {
4019
4075
  title: "Cancel subscription",
4020
4076
  cancelReason: "Cancellation reason",
4021
4077
  subCancellation: {
4022
4078
  goBack: "Go back"
4023
4079
  }
4024
4080
  };
4025
- var messages$T = {
4081
+ var messages$W = {
4026
4082
  subscriptionEnd: "This subscription is set to expire on",
4027
4083
  cancelNow: "Cancel Subscription Now",
4028
4084
  cancelLater: "Cancel at Period End",
@@ -4035,18 +4091,18 @@ var messages$T = {
4035
4091
  }
4036
4092
  };
4037
4093
  var subscriptionCancel_en = {
4038
- labels: labels$Q,
4039
- messages: messages$T
4094
+ labels: labels$T,
4095
+ messages: messages$W
4040
4096
  };
4041
4097
 
4042
- var labels$P = {
4098
+ var labels$S = {
4043
4099
  title: "Annuler l'abonnement",
4044
4100
  cancelReason: "Motif d'annulation",
4045
4101
  subCancellation: {
4046
4102
  goBack: "Retourner"
4047
4103
  }
4048
4104
  };
4049
- var messages$S = {
4105
+ var messages$V = {
4050
4106
  subscriptionEnd: "Cet abonnement doit expirer le",
4051
4107
  cancelNow: "Cancel Subscription Now",
4052
4108
  cancelLater: "Annuler l'abonnement maintenant",
@@ -4059,18 +4115,18 @@ var messages$S = {
4059
4115
  }
4060
4116
  };
4061
4117
  var subscriptionCancel_fr = {
4062
- labels: labels$P,
4063
- messages: messages$S
4118
+ labels: labels$S,
4119
+ messages: messages$V
4064
4120
  };
4065
4121
 
4066
- var labels$O = {
4122
+ var labels$R = {
4067
4123
  title: "구독 취소",
4068
4124
  cancelReason: "취소 사유",
4069
4125
  subCancellation: {
4070
4126
  goBack: "돌아가기"
4071
4127
  }
4072
4128
  };
4073
- var messages$R = {
4129
+ var messages$U = {
4074
4130
  subscriptionEnd: "이 구독은 다음 날짜에 만료되도록 설정되었습니다.",
4075
4131
  cancelNow: "지금 구독 취소",
4076
4132
  cancelLater: "기간 종료 시 취소",
@@ -4083,11 +4139,11 @@ var messages$R = {
4083
4139
  }
4084
4140
  };
4085
4141
  var subscriptionCancel_ko = {
4086
- labels: labels$O,
4087
- messages: messages$R
4142
+ labels: labels$R,
4143
+ messages: messages$U
4088
4144
  };
4089
4145
 
4090
- var labels$N = {
4146
+ var labels$Q = {
4091
4147
  inviteMembers: "Invite Members",
4092
4148
  listOfMembers: "List of members",
4093
4149
  invite: "Invite",
@@ -4098,10 +4154,10 @@ var labels$N = {
4098
4154
  email: "Email"
4099
4155
  };
4100
4156
  var subscriptionManageMembers_en = {
4101
- labels: labels$N
4157
+ labels: labels$Q
4102
4158
  };
4103
4159
 
4104
- var labels$M = {
4160
+ var labels$P = {
4105
4161
  inviteMembers: "Inviter des membres",
4106
4162
  listOfMembers: "Liste des membres",
4107
4163
  invite: "Inviter",
@@ -4112,10 +4168,10 @@ var labels$M = {
4112
4168
  email: "E-mail"
4113
4169
  };
4114
4170
  var subscriptionManageMembers_fr = {
4115
- labels: labels$M
4171
+ labels: labels$P
4116
4172
  };
4117
4173
 
4118
- var labels$L = {
4174
+ var labels$O = {
4119
4175
  inviteMembers: "회원 초대",
4120
4176
  listOfMembers: "구성원 목록",
4121
4177
  invite: "초대",
@@ -4126,17 +4182,17 @@ var labels$L = {
4126
4182
  email: "이메일"
4127
4183
  };
4128
4184
  var subscriptionManageMembers_ko = {
4129
- labels: labels$L
4185
+ labels: labels$O
4130
4186
  };
4131
4187
 
4132
- var labels$K = {
4188
+ var labels$N = {
4133
4189
  title: "Suspend subscription",
4134
4190
  suspensionDate: "Suspension date",
4135
4191
  subCancellation: {
4136
4192
  goBack: "Go back"
4137
4193
  }
4138
4194
  };
4139
- var messages$Q = {
4195
+ var messages$T = {
4140
4196
  suspensionEnd: "The suspension is set to expire on",
4141
4197
  suspendNow: "Suspend Subscription Now",
4142
4198
  suspendLater: "Suspend at Period End",
@@ -4149,8 +4205,8 @@ var messages$Q = {
4149
4205
  }
4150
4206
  };
4151
4207
  var subscriptionSuspend_en = {
4152
- labels: labels$K,
4153
- messages: messages$Q
4208
+ labels: labels$N,
4209
+ messages: messages$T
4154
4210
  };
4155
4211
 
4156
4212
  var validation$2 = {
@@ -4165,7 +4221,7 @@ var validation$2 = {
4165
4221
  enterLastName: "Le nom de famille est requis.",
4166
4222
  enterPhone: "Le numéro de téléphone est requis."
4167
4223
  };
4168
- var buttons$e = {
4224
+ var buttons$h = {
4169
4225
  account: "Accès abonné(e)s",
4170
4226
  login: "Se connecter",
4171
4227
  subscribe: "S'abonner"
@@ -4243,7 +4299,7 @@ var confirm$8 = {
4243
4299
  };
4244
4300
  var common_fr = {
4245
4301
  validation: validation$2,
4246
- buttons: buttons$e,
4302
+ buttons: buttons$h,
4247
4303
  dashboard: dashboard$3,
4248
4304
  select: select$5,
4249
4305
  confirm: confirm$8
@@ -4274,7 +4330,7 @@ var paymentMethod_fr = {
4274
4330
  var title$q = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
4275
4331
  var updateTitle$2 = "Mettre à jour son choix d'infolettres";
4276
4332
  var subtitle$b = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
4277
- var labels$J = {
4333
+ var labels$M = {
4278
4334
  submit: "Lire l’article !",
4279
4335
  firstName: "Prénom",
4280
4336
  lastName: "Nom de famille",
@@ -4282,7 +4338,7 @@ var labels$J = {
4282
4338
  postalCode: "Code postal",
4283
4339
  required: "Champs obligatoires"
4284
4340
  };
4285
- var messages$P = {
4341
+ var messages$S = {
4286
4342
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4287
4343
  success: "Votre choix d'infolettres à été mis à jour",
4288
4344
  loginHere: "Connectez-vous ici",
@@ -4293,14 +4349,14 @@ var newsletter_fr = {
4293
4349
  title: title$q,
4294
4350
  updateTitle: updateTitle$2,
4295
4351
  subtitle: subtitle$b,
4296
- labels: labels$J,
4297
- messages: messages$P
4352
+ labels: labels$M,
4353
+ messages: messages$S
4298
4354
  };
4299
4355
 
4300
- var labels$I = {
4356
+ var labels$L = {
4301
4357
  "continue": "Abonnement réussi !"
4302
4358
  };
4303
- var messages$O = {
4359
+ var messages$R = {
4304
4360
  yourFreeTrial: "Votre essai gratuit vient de débuter",
4305
4361
  youHaveAccess: "Nous espérons que vous allez apprécier votre abonnement. Veuillez nous contacter si vous avez des questions ou des préoccupations.",
4306
4362
  clickToLearn: {
@@ -4326,12 +4382,12 @@ var errors$e = {
4326
4382
  "": ""
4327
4383
  };
4328
4384
  var success_fr = {
4329
- labels: labels$I,
4330
- messages: messages$O,
4385
+ labels: labels$L,
4386
+ messages: messages$R,
4331
4387
  errors: errors$e
4332
4388
  };
4333
4389
 
4334
- var messages$N = {
4390
+ var messages$Q = {
4335
4391
  freeVisits: "Visites gratuites restantes:",
4336
4392
  subscribeNow: "Abonnez-vous maintenant !",
4337
4393
  alreadyHaveAccount: "Vous avez déjà un compte ?",
@@ -4341,16 +4397,16 @@ var errors$d = {
4341
4397
  "": ""
4342
4398
  };
4343
4399
  var meter_fr = {
4344
- messages: messages$N,
4400
+ messages: messages$Q,
4345
4401
  errors: errors$d
4346
4402
  };
4347
4403
 
4348
- var messages$M = {
4404
+ var messages$P = {
4349
4405
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
4350
4406
  bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque.",
4351
4407
  bankAuthenticationSuccess: "Veuillez patienter pendant que nous accédons à votre requête."
4352
4408
  };
4353
- var labels$H = {
4409
+ var labels$K = {
4354
4410
  card: "Entrez le numéro de carte",
4355
4411
  date: "Date d’expiration",
4356
4412
  CVC: "CVC",
@@ -4370,11 +4426,13 @@ var labels$H = {
4370
4426
  firstName: "Prénom",
4371
4427
  lastName: "Nom de famille",
4372
4428
  phone: "Téléphoner",
4373
- freeItems: "Articles gratuits"
4429
+ freeItems: "Articles gratuits",
4430
+ email: "Courriel",
4431
+ password: "Créer un mot de passe"
4374
4432
  };
4375
4433
  var checkoutForm_fr = {
4376
- messages: messages$M,
4377
- labels: labels$H
4434
+ messages: messages$P,
4435
+ labels: labels$K
4378
4436
  };
4379
4437
 
4380
4438
  var youAreSafe$2 = "Vous êtes en sécurité - PCI conforme 128 SSL par";
@@ -4398,7 +4456,7 @@ var messages_fr = {
4398
4456
  zeroTotalInvoice: zeroTotalInvoice$2
4399
4457
  };
4400
4458
 
4401
- var labels$G = {
4459
+ var labels$J = {
4402
4460
  email: "Entrez votre adresse courriel",
4403
4461
  username: "Saisissez votre nom d'utilisateur",
4404
4462
  password: "Entrez votre mot de passe",
@@ -4407,7 +4465,7 @@ var labels$G = {
4407
4465
  passwordPlaceholder: "Mot de passe",
4408
4466
  login: "Connexion"
4409
4467
  };
4410
- var messages$L = {
4468
+ var messages$O = {
4411
4469
  loginTo: "Connectez-vous à votre compte",
4412
4470
  welcome: "Bienvenue, connectez-vous avec votre compte existant.",
4413
4471
  dontHaveAccount: "Vous n’avez pas encore de compte ?",
@@ -4426,28 +4484,28 @@ var errors$c = {
4426
4484
  "": ""
4427
4485
  };
4428
4486
  var login_fr = {
4429
- labels: labels$G,
4430
- messages: messages$L,
4487
+ labels: labels$J,
4488
+ messages: messages$O,
4431
4489
  errors: errors$c
4432
4490
  };
4433
4491
 
4434
- var labels$F = {
4492
+ var labels$I = {
4435
4493
  title: "Confirmez votre courriel",
4436
4494
  instructions: "Confirmez votre courriel.\nVeuillez cliquer sur le lien de vérification, qui vous a été envoyé à:",
4437
4495
  resend: "Renvoyer le courriel"
4438
4496
  };
4439
- var messages$K = {
4497
+ var messages$N = {
4440
4498
  resent: "Renvoyé avec succès",
4441
4499
  success: "Vous vous êtes connecté avec succès"
4442
4500
  };
4443
4501
  var verifyLinkToken_fr = {
4444
- labels: labels$F,
4445
- messages: messages$K
4502
+ labels: labels$I,
4503
+ messages: messages$N
4446
4504
  };
4447
4505
 
4448
4506
  var title$p = "Créer un compte";
4449
4507
  var subtitle$a = "Entrez votre courriel et votre mot de passe ci-dessous";
4450
- var labels$E = {
4508
+ var labels$H = {
4451
4509
  signUpFacebook: "Inscrivez-vous avec Facebook",
4452
4510
  signUpGoogle: "Inscrivez-vous avec Google",
4453
4511
  signUpEmail: "Inscrivez-vous avec votre courriel",
@@ -4460,7 +4518,7 @@ var labels$E = {
4460
4518
  lastName: "Nom de famille",
4461
4519
  phone: "Téléphoner"
4462
4520
  };
4463
- var messages$J = {
4521
+ var messages$M = {
4464
4522
  alreadyHaveAccount: "Vous avez déjà un compte?",
4465
4523
  createAccount: "Créer un compte",
4466
4524
  loginHere: "Connectez-vous ici",
@@ -4507,7 +4565,8 @@ var gift$2 = {
4507
4565
  enterEmail: "Veuillez entrer l’adresse courriel du destinataire du cadeau.",
4508
4566
  invalidDate: "La date du cadeau doit être comprise entre aujourd'hui et un an.",
4509
4567
  giftDateInfo: "Le destinataire recevra un courriel à la date déterminée afin d'activer leur abonnement cadeau.",
4510
- giftMessageInfo: "Laissez un message au destinataire sans oublier de signer votre nom."
4568
+ giftMessageInfo: "Laissez un message au destinataire sans oublier de signer votre nom.",
4569
+ giftMessageAllowedCharacters: "Les caractères spéciaux et les emojis ne sont pas autorisés."
4511
4570
  }
4512
4571
  };
4513
4572
  var redeem$2 = {
@@ -4535,14 +4594,14 @@ var redeem$2 = {
4535
4594
  var register_fr = {
4536
4595
  title: title$p,
4537
4596
  subtitle: subtitle$a,
4538
- labels: labels$E,
4539
- messages: messages$J,
4597
+ labels: labels$H,
4598
+ messages: messages$M,
4540
4599
  errors: errors$b,
4541
4600
  gift: gift$2,
4542
4601
  redeem: redeem$2
4543
4602
  };
4544
4603
 
4545
- var labels$D = {
4604
+ var labels$G = {
4546
4605
  title: "Voulez-vous mettre à jour votre profil ?",
4547
4606
  subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
4548
4607
  email: "Address courriel",
@@ -4561,21 +4620,21 @@ var labels$D = {
4561
4620
  zoom: "Zoom",
4562
4621
  tin: "Numéro d'identification fiscale"
4563
4622
  };
4564
- var messages$I = {
4623
+ var messages$L = {
4565
4624
  userUpdated: "Votre profil a été mis à jour avec succès.",
4566
4625
  pictureRemoved: "Votre photo de profil a été supprimée avec succès.",
4567
4626
  pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
4568
4627
  };
4569
4628
  var userEdit_fr = {
4570
- labels: labels$D,
4571
- messages: messages$I
4629
+ labels: labels$G,
4630
+ messages: messages$L
4572
4631
  };
4573
4632
 
4574
4633
  var title$o = "Entrez votre adresse de livraison";
4575
4634
  var titleGifting$2 = "Entrez votre adresse";
4576
4635
  var selectAddressTitle$2 = "Veuillez sélectionner une adresse";
4577
4636
  var selectAddressSubtitle$2 = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
4578
- var labels$C = {
4637
+ var labels$F = {
4579
4638
  address: "Adresse",
4580
4639
  code: "Code postal / Zip",
4581
4640
  city: "Ville",
@@ -4586,12 +4645,12 @@ var labels$C = {
4586
4645
  required: "Champs obligatoires",
4587
4646
  isDefault: "Définir par défaut"
4588
4647
  };
4589
- var buttons$d = {
4648
+ var buttons$g = {
4590
4649
  submit: "Valider",
4591
4650
  selectAddress: "Choisir cette adresse",
4592
4651
  addAddress: "Ajouter une nouvelle adresse"
4593
4652
  };
4594
- var messages$H = {
4653
+ var messages$K = {
4595
4654
  addressUpdated: "Votre adresse a été mise à jour avec succès",
4596
4655
  subRedeemed: "Votre abonnement a bien été activé."
4597
4656
  };
@@ -4600,9 +4659,9 @@ var address_fr = {
4600
4659
  titleGifting: titleGifting$2,
4601
4660
  selectAddressTitle: selectAddressTitle$2,
4602
4661
  selectAddressSubtitle: selectAddressSubtitle$2,
4603
- labels: labels$C,
4604
- buttons: buttons$d,
4605
- messages: messages$H
4662
+ labels: labels$F,
4663
+ buttons: buttons$g,
4664
+ messages: messages$K
4606
4665
  };
4607
4666
 
4608
4667
  var title$n = "Réinitialiser votre mot de passe";
@@ -4630,7 +4689,7 @@ var password$4 = "Mot de passe";
4630
4689
  var submit$a = "Soumettre";
4631
4690
  var required$a = "Champs obligatoires";
4632
4691
  var passwordResetEmailSent$2 = "Un lien pour réinitialiser votre mot de passe vous a été envoyé. Si vous ne le recevez pas, vérifier votre courrier indésirable.";
4633
- var messages$G = {
4692
+ var messages$J = {
4634
4693
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4635
4694
  loginHere: "Connectez-vous ici"
4636
4695
  };
@@ -4641,7 +4700,7 @@ var passwordForgot_fr = {
4641
4700
  submit: submit$a,
4642
4701
  required: required$a,
4643
4702
  passwordResetEmailSent: passwordResetEmailSent$2,
4644
- messages: messages$G
4703
+ messages: messages$J
4645
4704
  };
4646
4705
 
4647
4706
  var title$l = "Changez votre mot de passe";
@@ -4669,7 +4728,7 @@ var title$k = "Connexion sans mot de passe";
4669
4728
  var email$6 = "Entrez votre adresse courriel";
4670
4729
  var submit$8 = "Soumettre";
4671
4730
  var required$8 = "Champs obligatoires";
4672
- var messages$F = {
4731
+ var messages$I = {
4673
4732
  PasswordlessLoginSuccess: "Vous avez été authentifié avec succès avec la connexion sans mot de passe"
4674
4733
  };
4675
4734
  var passwordlessRequest_fr = {
@@ -4677,7 +4736,7 @@ var passwordlessRequest_fr = {
4677
4736
  email: email$6,
4678
4737
  submit: submit$8,
4679
4738
  required: required$8,
4680
- messages: messages$F
4739
+ messages: messages$I
4681
4740
  };
4682
4741
 
4683
4742
  var title$j = "Votre panier";
@@ -4705,13 +4764,13 @@ var cart_fr = {
4705
4764
  removeAll: removeAll$2
4706
4765
  };
4707
4766
 
4708
- var buttons$c = {
4767
+ var buttons$f = {
4709
4768
  select: "Choisir",
4710
4769
  added: "Ajouté au panier",
4711
4770
  purchase: "Acheter",
4712
4771
  "continue": "Continuer au contenu"
4713
4772
  };
4714
- var messages$E = {
4773
+ var messages$H = {
4715
4774
  orderConfirmed: {
4716
4775
  title: "Votre commande est confirmée !",
4717
4776
  body: "Votre commande a été confirmée et vous sera expédiée dans les prochains jours. Vous recevrez un courriel de confirmation sous peu."
@@ -4720,17 +4779,17 @@ var messages$E = {
4720
4779
  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.",
4721
4780
  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."
4722
4781
  };
4723
- var labels$B = {
4782
+ var labels$E = {
4724
4783
  summary: "récapitulatif de commande",
4725
4784
  total: "total"
4726
4785
  };
4727
4786
  var shop_fr = {
4728
- buttons: buttons$c,
4729
- messages: messages$E,
4730
- labels: labels$B
4787
+ buttons: buttons$f,
4788
+ messages: messages$H,
4789
+ labels: labels$E
4731
4790
  };
4732
4791
 
4733
- var labels$A = {
4792
+ var labels$D = {
4734
4793
  cardNumber: "Numéro de carte",
4735
4794
  securityCode: "Code de sécurité",
4736
4795
  submit: "Soumettre",
@@ -4752,7 +4811,7 @@ var labels$A = {
4752
4811
  title: "Informations de paiement"
4753
4812
  }
4754
4813
  };
4755
- var messages$D = {
4814
+ var messages$G = {
4756
4815
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
4757
4816
  cancel: "Annuler votre abonnement en ligne à tout moment.",
4758
4817
  giftSent: "Le cadeau d’abonnement a été envoyé à",
@@ -4766,12 +4825,12 @@ var errors$a = {
4766
4825
  "": ""
4767
4826
  };
4768
4827
  var payment_fr = {
4769
- labels: labels$A,
4770
- messages: messages$D,
4828
+ labels: labels$D,
4829
+ messages: messages$G,
4771
4830
  errors: errors$a
4772
4831
  };
4773
4832
 
4774
- var labels$z = {
4833
+ var labels$C = {
4775
4834
  menu: "Menu Pelcro",
4776
4835
  name: "Nom",
4777
4836
  email: "Courriel",
@@ -4857,9 +4916,12 @@ var labels$z = {
4857
4916
  },
4858
4917
  subCancellation: {
4859
4918
  goBack: "Retourner"
4919
+ },
4920
+ donationCancellation: {
4921
+ goBack: "Go back"
4860
4922
  }
4861
4923
  };
4862
- var messages$C = {
4924
+ var messages$F = {
4863
4925
  noCard: "Vous n’avez pas une carte",
4864
4926
  subCancellation: {
4865
4927
  isSureToCancel: "Êtes-vous certain de vouloir annuler votre abonnement?",
@@ -4876,19 +4938,35 @@ var messages$C = {
4876
4938
  loading: "Annulation de la suspension de votre abonnement",
4877
4939
  success: "L'abonnement a été suspendu avec succès",
4878
4940
  error: "Erreur lors de l'annulation de la suspension de votre abonnement"
4941
+ },
4942
+ donationCancellation: {
4943
+ isSureToCancel: "Êtes-vous certain de vouloir annuler votre don?",
4944
+ loading: "Annulation de l'don",
4945
+ success: "L'don a été annulé avec succès",
4946
+ error: "Une erreur s'est produite lors de l'annulation de l'don"
4947
+ },
4948
+ donationReactivation: {
4949
+ success: "L'don a été réactivé avec succès",
4950
+ error: "Erreur lors de la réactivation de votre don"
4951
+ },
4952
+ donationUnSuspend: {
4953
+ isSureToUnSuspend: "Êtes-vous sûr de vouloir annuler la suspension de votre don ?",
4954
+ loading: "Annulation de la suspension de votre don",
4955
+ success: "L'don a été suspendu avec succès",
4956
+ error: "Erreur lors de l'annulation de la suspension de votre don"
4879
4957
  }
4880
4958
  };
4881
4959
  var dashboard_fr = {
4882
- labels: labels$z,
4883
- messages: messages$C
4960
+ labels: labels$C,
4961
+ messages: messages$F
4884
4962
  };
4885
4963
 
4886
- var messages$B = {
4964
+ var messages$E = {
4887
4965
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4888
4966
  loginHere: "Connectez-vous ici",
4889
4967
  checkbox: "Cochez cette case pour offrir cet abonnement"
4890
4968
  };
4891
- var labels$y = {
4969
+ var labels$B = {
4892
4970
  plan: {
4893
4971
  title: "Abonnez-vous à un plan",
4894
4972
  subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
@@ -4905,67 +4983,100 @@ var labels$y = {
4905
4983
  or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
4906
4984
  }
4907
4985
  };
4908
- var buttons$b = {
4986
+ var buttons$e = {
4909
4987
  next: "Prochain",
4910
4988
  select: "Choisir",
4911
4989
  back: "Retour"
4912
4990
  };
4913
4991
  var select_fr = {
4914
- messages: messages$B,
4915
- labels: labels$y,
4916
- buttons: buttons$b
4992
+ messages: messages$E,
4993
+ labels: labels$B,
4994
+ buttons: buttons$e
4917
4995
  };
4918
4996
 
4919
- var confirm$6 = {
4920
- labels: {
4921
- confirm: "Confirmer",
4922
- close: "Fermer"
4923
- }
4997
+ var messages$D = {
4998
+ alreadyHaveAccount: "Vous avez déjà un compte ?",
4999
+ loginHere: "Connectez-vous ici",
5000
+ checkbox: "Cochez cette case pour offrir cet abonnement"
5001
+ };
5002
+ var labels$A = {
5003
+ plan: {
5004
+ title: "Abonnez-vous à un plan",
5005
+ subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
5006
+ },
5007
+ product: {
5008
+ title: "Abonnez-vous à un produit",
5009
+ subtitle: "Sélectionnez l’un des produits ci-dessous et cliquez sur suivant."
5010
+ },
5011
+ selectProduct: "Sélectionnez un produit",
5012
+ selectPlan: "Sélectionnez un plan",
5013
+ starningAt: "À partir de",
5014
+ restrictiveArticles: {
5015
+ subscribeTo: "Abonnez-vous à une des options suivantes pour accéder au contenu de cette page",
5016
+ or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
5017
+ }
5018
+ };
5019
+ var buttons$d = {
5020
+ next: "Prochain",
5021
+ select: "Choisir",
5022
+ back: "Retour"
5023
+ };
5024
+ var donation_fr = {
5025
+ messages: messages$D,
5026
+ labels: labels$A,
5027
+ buttons: buttons$d
5028
+ };
5029
+
5030
+ var confirm$6 = {
5031
+ labels: {
5032
+ confirm: "Confirmer",
5033
+ close: "Fermer"
5034
+ }
4924
5035
  };
4925
5036
  var notification_fr = {
4926
5037
  confirm: confirm$6
4927
5038
  };
4928
5039
 
4929
- var labels$x = {
5040
+ var labels$z = {
4930
5041
  title: "Confirmez votre courriel",
4931
5042
  instructions: "Confirmez votre courriel.\nVeuillez cliquer sur le lien de vérification, qui vous a été envoyé à:",
4932
5043
  resend: "Renvoyer le courriel"
4933
5044
  };
4934
- var messages$A = {
5045
+ var messages$C = {
4935
5046
  resent: "Renvoyé avec succès",
4936
5047
  success: "Adresse courriel vérifiée avec succès"
4937
5048
  };
4938
5049
  var verifyEmail_fr = {
4939
- labels: labels$x,
4940
- messages: messages$A
5050
+ labels: labels$z,
5051
+ messages: messages$C
4941
5052
  };
4942
5053
 
4943
5054
  var title$i = "Détails de la facture";
4944
- var labels$w = {
5055
+ var labels$y = {
4945
5056
  summary: "Résumé",
4946
5057
  total: "Total",
4947
5058
  amountPaid: "Montant payé",
4948
5059
  amountDue: "Montant dû",
4949
5060
  creationDate: "Créé le:"
4950
5061
  };
4951
- var buttons$a = {
5062
+ var buttons$c = {
4952
5063
  download: "Télécharger",
4953
5064
  pay: "Payer"
4954
5065
  };
4955
5066
  var invoiceDetails_fr = {
4956
5067
  title: title$i,
4957
- labels: labels$w,
4958
- buttons: buttons$a
5068
+ labels: labels$y,
5069
+ buttons: buttons$c
4959
5070
  };
4960
5071
 
4961
- var labels$v = {
5072
+ var labels$x = {
4962
5073
  title: "Suspendre l'abonnement",
4963
5074
  suspensionDate: "Date de suspension",
4964
5075
  subCancellation: {
4965
5076
  goBack: "Revenir en arrière"
4966
5077
  }
4967
5078
  };
4968
- var messages$z = {
5079
+ var messages$B = {
4969
5080
  suspensionEnd: "La suspension doit expirer le",
4970
5081
  suspendNow: "Suspendre l'abonnement maintenant",
4971
5082
  suspendLater: "Suspendre à la fin de la période",
@@ -4978,8 +5089,8 @@ var messages$z = {
4978
5089
  }
4979
5090
  };
4980
5091
  var subscriptionSuspend_fr = {
4981
- labels: labels$v,
4982
- messages: messages$z
5092
+ labels: labels$x,
5093
+ messages: messages$B
4983
5094
  };
4984
5095
 
4985
5096
  var validation$1 = {
@@ -4993,7 +5104,7 @@ var validation$1 = {
4993
5104
  enterLastName: "성은 필수 항목입니다.",
4994
5105
  enterPhone: "전화번호는 필수 항목입니다."
4995
5106
  };
4996
- var buttons$9 = {
5107
+ var buttons$b = {
4997
5108
  account: "내 계정",
4998
5109
  login: "로그인",
4999
5110
  subscribe: "구독하다"
@@ -5071,7 +5182,7 @@ var confirm$5 = {
5071
5182
  };
5072
5183
  var common_ko = {
5073
5184
  validation: validation$1,
5074
- buttons: buttons$9,
5185
+ buttons: buttons$b,
5075
5186
  dashboard: dashboard$2,
5076
5187
  select: select$3,
5077
5188
  confirm: confirm$5
@@ -5102,7 +5213,7 @@ var paymentMethod_ko = {
5102
5213
  var title$h = "Frieze 뉴스레터를 구독하려면 이메일을 입력하세요.";
5103
5214
  var updateTitle$1 = "뉴스레터 선택 업데이트";
5104
5215
  var subtitle$7 = "귀하의 이메일은 다른 마케팅 용도로도 사용됩니다.";
5105
- var labels$u = {
5216
+ var labels$w = {
5106
5217
  submit: "제출",
5107
5218
  firstName: "이름",
5108
5219
  lastName: "성",
@@ -5110,7 +5221,7 @@ var labels$u = {
5110
5221
  postalCode: "우편번호",
5111
5222
  required: "필수 항목"
5112
5223
  };
5113
- var messages$y = {
5224
+ var messages$A = {
5114
5225
  alreadyHaveAccount: "이미 계정이 있습니까?",
5115
5226
  success: "뉴스레터가 성공적으로 업데이트되었습니다.",
5116
5227
  loginHere: "여기에서 로그인하세요.",
@@ -5121,14 +5232,14 @@ var newsletter_ko = {
5121
5232
  title: title$h,
5122
5233
  updateTitle: updateTitle$1,
5123
5234
  subtitle: subtitle$7,
5124
- labels: labels$u,
5125
- messages: messages$y
5235
+ labels: labels$w,
5236
+ messages: messages$A
5126
5237
  };
5127
5238
 
5128
- var labels$t = {
5239
+ var labels$v = {
5129
5240
  "continue": "콘텐츠로 돌아가기"
5130
5241
  };
5131
- var messages$x = {
5242
+ var messages$z = {
5132
5243
  yourFreeTrial: "유료 멤버십에 가입하셨습니다!",
5133
5244
  youHaveAccess: "멤버십 혜택을 즐기시기를 바라며, 질문이나 문의 사항이 있으면 저희에게 연락주십시오.",
5134
5245
  clickToLearn: {
@@ -5154,12 +5265,12 @@ var errors$9 = {
5154
5265
  "": ""
5155
5266
  };
5156
5267
  var success_ko = {
5157
- labels: labels$t,
5158
- messages: messages$x,
5268
+ labels: labels$v,
5269
+ messages: messages$z,
5159
5270
  errors: errors$9
5160
5271
  };
5161
5272
 
5162
- var messages$w = {
5273
+ var messages$y = {
5163
5274
  freeVisits: "남은 무료 방문 기간:",
5164
5275
  subscribeNow: "멤버십 가입",
5165
5276
  alreadyHaveAccount: "이미 계정이 있습니까?",
@@ -5169,16 +5280,16 @@ var errors$8 = {
5169
5280
  "": ""
5170
5281
  };
5171
5282
  var meter_ko = {
5172
- messages: messages$w,
5283
+ messages: messages$y,
5173
5284
  errors: errors$8
5174
5285
  };
5175
5286
 
5176
- var messages$v = {
5287
+ var messages$x = {
5177
5288
  youAreSafe: "PCI 준수 128비트 SSL 인증서로 보호됩니다. 제공: ",
5178
5289
  bankRedirection: "잠시만 기다려 주십시오. 결제 은행으로 연결 중입니다.",
5179
5290
  bankAuthenticationSuccess: "요청을 처리하는 동안 기다려 주십시오."
5180
5291
  };
5181
- var labels$s = {
5292
+ var labels$u = {
5182
5293
  card: "카드 번호 입력",
5183
5294
  date: "만료일",
5184
5295
  CVC: "CVC",
@@ -5198,11 +5309,13 @@ var labels$s = {
5198
5309
  firstName: "이름",
5199
5310
  lastName: "성",
5200
5311
  phone: "핸드폰",
5201
- freeItems: "무료 아이템"
5312
+ freeItems: "무료 아이템",
5313
+ email: "이메일",
5314
+ password: "비밀번호"
5202
5315
  };
5203
5316
  var checkoutForm_ko = {
5204
- messages: messages$v,
5205
- labels: labels$s
5317
+ messages: messages$x,
5318
+ labels: labels$u
5206
5319
  };
5207
5320
 
5208
5321
  var youAreSafe$1 = "PCI 준수 128비트 SSL 인증서로 보호됩니다. 제공: ";
@@ -5226,7 +5339,7 @@ var messages_ko = {
5226
5339
  zeroTotalInvoice: zeroTotalInvoice$1
5227
5340
  };
5228
5341
 
5229
- var labels$r = {
5342
+ var labels$t = {
5230
5343
  email: "이메일 입력",
5231
5344
  username: "사용자 이름 입력",
5232
5345
  password: "비밀번호 입력",
@@ -5235,7 +5348,7 @@ var labels$r = {
5235
5348
  passwordPlaceholder: "비밀번호",
5236
5349
  login: "로그인"
5237
5350
  };
5238
- var messages$u = {
5351
+ var messages$w = {
5239
5352
  loginTo: "귀하의 계정에 로그인",
5240
5353
  welcome: "반갑습니다. 귀하의 기존 계정으로 로그인하세요.",
5241
5354
  dontHaveAccount: "아직 계정이 없으신가요?",
@@ -5254,28 +5367,28 @@ var errors$7 = {
5254
5367
  "": ""
5255
5368
  };
5256
5369
  var login_ko = {
5257
- labels: labels$r,
5258
- messages: messages$u,
5370
+ labels: labels$t,
5371
+ messages: messages$w,
5259
5372
  errors: errors$7
5260
5373
  };
5261
5374
 
5262
- var labels$q = {
5375
+ var labels$s = {
5263
5376
  title: "비밀번호 없는 링크 확인",
5264
5377
  instructions: "가는 중입니다!\n이메일 주소를 확인하겠습니다.\n이메일로 전송된 확인 링크를 클릭하세요.",
5265
5378
  resend: "이메일 재전송"
5266
5379
  };
5267
- var messages$t = {
5380
+ var messages$v = {
5268
5381
  resent: "성공적으로 재전송",
5269
5382
  success: "성공적으로 로그인했습니다"
5270
5383
  };
5271
5384
  var verifyLinkToken_ko = {
5272
- labels: labels$q,
5273
- messages: messages$t
5385
+ labels: labels$s,
5386
+ messages: messages$v
5274
5387
  };
5275
5388
 
5276
5389
  var title$g = "계정 만들기";
5277
5390
  var subtitle$6 = "아래에 이메일과 비밀번호를 입력하세요.";
5278
- var labels$p = {
5391
+ var labels$r = {
5279
5392
  signUpFacebook: "Facebook으로 가입하기",
5280
5393
  signUpGoogle: "Google로 가입하기",
5281
5394
  signUpEmail: "이메일로 가입하기",
@@ -5288,7 +5401,7 @@ var labels$p = {
5288
5401
  lastName: "성",
5289
5402
  phone: "핸드폰"
5290
5403
  };
5291
- var messages$s = {
5404
+ var messages$u = {
5292
5405
  alreadyHaveAccount: "이미 계정이 있습니까?",
5293
5406
  createAccount: "계정 만들기",
5294
5407
  loginHere: "여기에서 로그인하세요.",
@@ -5334,7 +5447,8 @@ var gift$1 = {
5334
5447
  enterEmail: "선물을 받을 분의 이메일을 입력해주세요.",
5335
5448
  invalidDate: "선물 날짜는 오늘로부터 1년 이내여야 합니다.",
5336
5449
  giftDateInfo: "받는 분이 선물을 사용하실 수 있도록, 선택된 날짜에 귀하의 선물 메시지가 담겨 있는 이메일 알림이 전송됩니다.",
5337
- giftMessageInfo: "받는 분을 위한 선물 메시지와 서명을 남기는 것을 잊지 마시기 바랍니다."
5450
+ giftMessageInfo: "받는 분을 위한 선물 메시지와 서명을 남기는 것을 잊지 마시기 바랍니다.",
5451
+ giftMessageAllowedCharacters: "특수문자 및 이모티콘 사용 불가."
5338
5452
  }
5339
5453
  };
5340
5454
  var redeem$1 = {
@@ -5362,14 +5476,14 @@ var redeem$1 = {
5362
5476
  var register_ko = {
5363
5477
  title: title$g,
5364
5478
  subtitle: subtitle$6,
5365
- labels: labels$p,
5366
- messages: messages$s,
5479
+ labels: labels$r,
5480
+ messages: messages$u,
5367
5481
  errors: errors$6,
5368
5482
  gift: gift$1,
5369
5483
  redeem: redeem$1
5370
5484
  };
5371
5485
 
5372
- var labels$o = {
5486
+ var labels$q = {
5373
5487
  title: "프로파일을 업데이트하시겠습니까?",
5374
5488
  subtitle: "프로필을 업데이트하려면 아래 정보를 입력하세요.",
5375
5489
  email: "이메일",
@@ -5388,21 +5502,21 @@ var labels$o = {
5388
5502
  zoom: "확대",
5389
5503
  tin: "세금 식별 번호"
5390
5504
  };
5391
- var messages$r = {
5505
+ var messages$t = {
5392
5506
  userUpdated: "감사합니다! 프로필이 성공적으로 업데이트되었습니다.",
5393
5507
  pictureRemoved: "귀하의 프로필 사진이 제거되었습니다.",
5394
5508
  pictureUpdated: "귀하의 프로필 사진이 업데이트되었습니다."
5395
5509
  };
5396
5510
  var userEdit_ko = {
5397
- labels: labels$o,
5398
- messages: messages$r
5511
+ labels: labels$q,
5512
+ messages: messages$t
5399
5513
  };
5400
5514
 
5401
5515
  var title$f = "배송 주소를 입력하십시오.";
5402
5516
  var titleGifting$1 = "주소를 입력하세요";
5403
5517
  var selectAddressTitle$1 = "주소를 선택하십시오.";
5404
5518
  var selectAddressSubtitle$1 = "저장된 주소에서 선택하거나 새 주소를 추가하십시오.";
5405
- var labels$n = {
5519
+ var labels$p = {
5406
5520
  address: "주소",
5407
5521
  code: "우편번호",
5408
5522
  city: "도시",
@@ -5413,12 +5527,12 @@ var labels$n = {
5413
5527
  required: "필수 항목",
5414
5528
  isDefault: "기본값으로 설정"
5415
5529
  };
5416
- var buttons$8 = {
5530
+ var buttons$a = {
5417
5531
  submit: "제출",
5418
5532
  selectAddress: "주소 선택",
5419
5533
  addAddress: "새 주소 추가"
5420
5534
  };
5421
- var messages$q = {
5535
+ var messages$s = {
5422
5536
  addressUpdated: "주소가 성공적으로 업데이트되었습니다!",
5423
5537
  subRedeemed: "귀하의 유료 멤버십이 사용되었습니다."
5424
5538
  };
@@ -5427,9 +5541,9 @@ var address_ko = {
5427
5541
  titleGifting: titleGifting$1,
5428
5542
  selectAddressTitle: selectAddressTitle$1,
5429
5543
  selectAddressSubtitle: selectAddressSubtitle$1,
5430
- labels: labels$n,
5431
- buttons: buttons$8,
5432
- messages: messages$q
5544
+ labels: labels$p,
5545
+ buttons: buttons$a,
5546
+ messages: messages$s
5433
5547
  };
5434
5548
 
5435
5549
  var title$e = "비밀번호 재설정";
@@ -5457,7 +5571,7 @@ var password$2 = "비밀번호";
5457
5571
  var submit$6 = "제출";
5458
5572
  var required$6 = "필수 항목";
5459
5573
  var passwordResetEmailSent$1 = "비밀번호 재설정 안내가 귀하의 이메일로 발송되었습니다.";
5460
- var messages$p = {
5574
+ var messages$r = {
5461
5575
  alreadyHaveAccount: "이미 계정이 있습니까?",
5462
5576
  loginHere: "여기에서 로그인하세요."
5463
5577
  };
@@ -5468,7 +5582,7 @@ var passwordForgot_ko = {
5468
5582
  submit: submit$6,
5469
5583
  required: required$6,
5470
5584
  passwordResetEmailSent: passwordResetEmailSent$1,
5471
- messages: messages$p
5585
+ messages: messages$r
5472
5586
  };
5473
5587
 
5474
5588
  var title$c = "비밀번호를 변경합니다.";
@@ -5496,7 +5610,7 @@ var title$b = "비밀번호 없는 로그인";
5496
5610
  var email$3 = "이메일 입력";
5497
5611
  var submit$4 = "제출";
5498
5612
  var required$4 = "필수 항목";
5499
- var messages$o = {
5613
+ var messages$q = {
5500
5614
  PasswordlessLoginSuccess: "비밀번호 없는 로그인으로 성공적으로 인증되었습니다."
5501
5615
  };
5502
5616
  var passwordlessRequest_ko = {
@@ -5504,7 +5618,7 @@ var passwordlessRequest_ko = {
5504
5618
  email: email$3,
5505
5619
  submit: submit$4,
5506
5620
  required: required$4,
5507
- messages: messages$o
5621
+ messages: messages$q
5508
5622
  };
5509
5623
 
5510
5624
  var title$a = "귀하의 장바구니";
@@ -5532,13 +5646,13 @@ var cart_ko = {
5532
5646
  removeAll: removeAll$1
5533
5647
  };
5534
5648
 
5535
- var buttons$7 = {
5649
+ var buttons$9 = {
5536
5650
  select: "선택",
5537
5651
  added: "장바구니에 추가",
5538
5652
  purchase: "구매",
5539
5653
  "continue": "계속"
5540
5654
  };
5541
- var messages$n = {
5655
+ var messages$p = {
5542
5656
  orderConfirmed: {
5543
5657
  title: "주문이 확인되었습니다!",
5544
5658
  body: "귀하의 주문이 확인되었으며 며칠 안에 배송될 예정입니다. 이 주문의 확인 이메일이 귀하에게 전송됩니다."
@@ -5547,17 +5661,17 @@ var messages$n = {
5547
5661
  multipleCurrencies: "장바구니에 다른 통화로만 결제가 가능한 아이템이 있습니다. 결제를 계속 진행하려면 모든 아이템의 결제 통화가 동일한지 확인하십시오.",
5548
5662
  currencyMismatch: "선택하신 아이템(들)이 귀하가 설정한 기본 통화({{currency}})와 일치하지 않습니다. 기본 통화와 일치하는 아이템(들)만 선택하십시오."
5549
5663
  };
5550
- var labels$m = {
5664
+ var labels$o = {
5551
5665
  summary: "주문 요약",
5552
5666
  total: "총계"
5553
5667
  };
5554
5668
  var shop_ko = {
5555
- buttons: buttons$7,
5556
- messages: messages$n,
5557
- labels: labels$m
5669
+ buttons: buttons$9,
5670
+ messages: messages$p,
5671
+ labels: labels$o
5558
5672
  };
5559
5673
 
5560
- var labels$l = {
5674
+ var labels$n = {
5561
5675
  cardNumber: "카드 번호",
5562
5676
  securityCode: "보안 코드",
5563
5677
  submit: "제출",
@@ -5579,7 +5693,7 @@ var labels$l = {
5579
5693
  title: "결제 정보"
5580
5694
  }
5581
5695
  };
5582
- var messages$m = {
5696
+ var messages$o = {
5583
5697
  youAreSafe: "PCI 준수 128비트 SSL 인증서로 보호됩니다. 제공: ",
5584
5698
  cancel: "유료 멤버십은 언제든 온라인으로 취소가 가능합니다.",
5585
5699
  giftSent: "유료 멤버십 선물이 ",
@@ -5593,12 +5707,12 @@ var errors$5 = {
5593
5707
  "": ""
5594
5708
  };
5595
5709
  var payment_ko = {
5596
- labels: labels$l,
5597
- messages: messages$m,
5710
+ labels: labels$n,
5711
+ messages: messages$o,
5598
5712
  errors: errors$5
5599
5713
  };
5600
5714
 
5601
- var labels$k = {
5715
+ var labels$m = {
5602
5716
  menu: "Pelcro 메뉴",
5603
5717
  name: "이름",
5604
5718
  email: "이메일",
@@ -5746,7 +5860,10 @@ var savedItems = {
5746
5860
  var subCancellation = {
5747
5861
  goBack: "뒤로 가기"
5748
5862
  };
5749
- var messages$l = {
5863
+ var donationCancellation = {
5864
+ goBack: "뒤로 가기"
5865
+ };
5866
+ var messages$n = {
5750
5867
  noCard: "등록된 카드가 없습니다.",
5751
5868
  subCancellation: {
5752
5869
  isSureToCancel: "정말로 유료 멤버십을 취소하시겠습니까?",
@@ -5763,10 +5880,26 @@ var messages$l = {
5763
5880
  loading: "구독 일시 중단 해제",
5764
5881
  success: "구독이 성공적으로 일시 중단 해제되었습니다",
5765
5882
  error: "구독 일시 중단을 해제하는 동안 오류가 발생했습니다."
5883
+ },
5884
+ donationCancellation: {
5885
+ isSureToCancel: "정말로 유료 멤버십을 취소하시겠습니까?",
5886
+ loading: "귀하의 유료 멤버십을 취소합니다.",
5887
+ success: "유료 멤버십이 성공적으로 취소되었습니다.",
5888
+ error: "유료 멤버십 취소 과정에서 오류가 발생했습니다."
5889
+ },
5890
+ donationReactivation: {
5891
+ success: "구독이 성공적으로 재활성화되었습니다.",
5892
+ error: "구독을 재활성화하는 동안 오류가 발생했습니다."
5893
+ },
5894
+ donationUnSuspend: {
5895
+ isSureToUnSuspend: "구독 일시 중단을 해제하시겠습니까?",
5896
+ loading: "구독 일시 중단 해제",
5897
+ success: "구독이 성공적으로 일시 중단 해제되었습니다",
5898
+ error: "구독 일시 중단을 해제하는 동안 오류가 발생했습니다."
5766
5899
  }
5767
5900
  };
5768
5901
  var dashboard_ko = {
5769
- labels: labels$k,
5902
+ labels: labels$m,
5770
5903
  shipments: shipments,
5771
5904
  logout: logout,
5772
5905
  dashboard: dashboard$1,
@@ -5815,15 +5948,16 @@ var dashboard_ko = {
5815
5948
  orders: orders,
5816
5949
  savedItems: savedItems,
5817
5950
  subCancellation: subCancellation,
5818
- messages: messages$l
5951
+ donationCancellation: donationCancellation,
5952
+ messages: messages$n
5819
5953
  };
5820
5954
 
5821
- var messages$k = {
5955
+ var messages$m = {
5822
5956
  alreadyHaveAccount: "이미 계정이 있습니까?",
5823
5957
  loginHere: "여기에서 로그인하세요.",
5824
5958
  checkbox: "이 유료 멤버십을 선물하려면 체크하세요."
5825
5959
  };
5826
- var labels$j = {
5960
+ var labels$l = {
5827
5961
  plan: {
5828
5962
  title: "요금제 가입하기",
5829
5963
  subtitle: "아래 요금제 중 하나를 선택하고 다음을 클릭하세요."
@@ -5840,15 +5974,48 @@ var labels$j = {
5840
5974
  or: "아래에서 다른 상품을 선택해주시기 바랍니다."
5841
5975
  }
5842
5976
  };
5843
- var buttons$6 = {
5977
+ var buttons$8 = {
5844
5978
  next: "다음",
5845
5979
  select: "선택",
5846
5980
  back: "뒤로"
5847
5981
  };
5848
5982
  var select_ko = {
5849
- messages: messages$k,
5850
- labels: labels$j,
5851
- buttons: buttons$6
5983
+ messages: messages$m,
5984
+ labels: labels$l,
5985
+ buttons: buttons$8
5986
+ };
5987
+
5988
+ var messages$l = {
5989
+ alreadyHaveAccount: "이미 계정이 있습니까?",
5990
+ loginHere: "여기에서 로그인하세요.",
5991
+ checkbox: "이 유료 멤버십을 선물하려면 체크하세요."
5992
+ };
5993
+ var labels$k = {
5994
+ plan: {
5995
+ title: "요금제 가입하기",
5996
+ subtitle: "아래 요금제 중 하나를 선택하고 다음을 클릭하세요."
5997
+ },
5998
+ product: {
5999
+ title: "상품 가입하기",
6000
+ subtitle: "아래 상품 중 하나를 선택하고 다음을 클릭하세요."
6001
+ },
6002
+ selectProduct: "상품 선택",
6003
+ selectPlan: "요금제 선택",
6004
+ startingAt: "시작일:",
6005
+ restrictiveArticles: {
6006
+ subscribeTo: "이 페이지에 액세스하려면 다음 요금제 중 하나에 가입하거나",
6007
+ or: "아래에서 다른 상품을 선택해주시기 바랍니다."
6008
+ }
6009
+ };
6010
+ var buttons$7 = {
6011
+ next: "다음",
6012
+ select: "선택",
6013
+ back: "뒤로"
6014
+ };
6015
+ var donation_ko = {
6016
+ messages: messages$l,
6017
+ labels: labels$k,
6018
+ buttons: buttons$7
5852
6019
  };
5853
6020
 
5854
6021
  var confirm$3 = {
@@ -5861,46 +6028,46 @@ var notification_ko = {
5861
6028
  confirm: confirm$3
5862
6029
  };
5863
6030
 
5864
- var labels$i = {
6031
+ var labels$j = {
5865
6032
  title: "이메일 주소를 인증하세요.",
5866
6033
  instructions: "거의 완료되었습니다!\n이메일 주소만 인증하면 됩니다.\n다음 이메일 주소로 전송된 인증 링크를 클릭해 주십시오:",
5867
6034
  resend: "이메일 재전송"
5868
6035
  };
5869
- var messages$j = {
6036
+ var messages$k = {
5870
6037
  resent: "재전송 완료",
5871
6038
  success: "이메일 주소가 인증되었습니다!"
5872
6039
  };
5873
6040
  var verifyEmail_ko = {
5874
- labels: labels$i,
5875
- messages: messages$j
6041
+ labels: labels$j,
6042
+ messages: messages$k
5876
6043
  };
5877
6044
 
5878
6045
  var title$9 = "인보이스 세부 정보";
5879
- var labels$h = {
6046
+ var labels$i = {
5880
6047
  summary: "요약",
5881
6048
  total: "총계",
5882
6049
  amountPaid: "지불된 금액",
5883
6050
  amountDue: "지불액",
5884
6051
  creationDate: "생성일:"
5885
6052
  };
5886
- var buttons$5 = {
6053
+ var buttons$6 = {
5887
6054
  download: "다운로드",
5888
6055
  pay: "지금 지불"
5889
6056
  };
5890
6057
  var invoiceDetails_ko = {
5891
6058
  title: title$9,
5892
- labels: labels$h,
5893
- buttons: buttons$5
6059
+ labels: labels$i,
6060
+ buttons: buttons$6
5894
6061
  };
5895
6062
 
5896
- var labels$g = {
6063
+ var labels$h = {
5897
6064
  title: "구독 중단",
5898
6065
  suspensionDate: "중단 날짜",
5899
6066
  subCancellation: {
5900
6067
  goBack: "돌아가기"
5901
6068
  }
5902
6069
  };
5903
- var messages$i = {
6070
+ var messages$j = {
5904
6071
  suspensionEnd: "일시 중지가 만료되도록 설정되었습니다.",
5905
6072
  suspendNow: "지금 구독 일시 중단",
5906
6073
  suspendLater: "기간 종료 시 일시 중단",
@@ -5913,8 +6080,8 @@ var messages$i = {
5913
6080
  }
5914
6081
  };
5915
6082
  var subscriptionSuspend_ko = {
5916
- labels: labels$g,
5917
- messages: messages$i
6083
+ labels: labels$h,
6084
+ messages: messages$j
5918
6085
  };
5919
6086
 
5920
6087
  var validation = {
@@ -5926,7 +6093,7 @@ var validation = {
5926
6093
  enterLastName: "El apellido es obligatorio.",
5927
6094
  enterPhone: "El número de teléfono es obligatorio."
5928
6095
  };
5929
- var buttons$4 = {
6096
+ var buttons$5 = {
5930
6097
  account: "Mi cuenta",
5931
6098
  login: "Iniciar Sesión"
5932
6099
  };
@@ -6003,7 +6170,7 @@ var confirm$2 = {
6003
6170
  };
6004
6171
  var common_es = {
6005
6172
  validation: validation,
6006
- buttons: buttons$4,
6173
+ buttons: buttons$5,
6007
6174
  dashboard: dashboard,
6008
6175
  select: select$1,
6009
6176
  confirm: confirm$2
@@ -6034,7 +6201,7 @@ var paymentMethod_es = {
6034
6201
  var title$8 = "Ingresa tu correo para suscribirte a nuestro boletín";
6035
6202
  var updateTitle = "Actualizar selecciones del boletín";
6036
6203
  var subtitle$3 = "Podríamos usar tu dirección de correo para otras comunicaciones de marketing";
6037
- var labels$f = {
6204
+ var labels$g = {
6038
6205
  submit: "Enviar",
6039
6206
  firstName: "Nombre",
6040
6207
  lastName: "Apellido",
@@ -6042,7 +6209,7 @@ var labels$f = {
6042
6209
  postalCode: "Código postal",
6043
6210
  required: "obligatorio"
6044
6211
  };
6045
- var messages$h = {
6212
+ var messages$i = {
6046
6213
  alreadyHaveAccount: "¿Ya tienes una cuenta?",
6047
6214
  success: "El boletín se actualizó con éxito",
6048
6215
  loginHere: "Inicia sesión aquí.",
@@ -6053,14 +6220,14 @@ var newsletter_es = {
6053
6220
  title: title$8,
6054
6221
  updateTitle: updateTitle,
6055
6222
  subtitle: subtitle$3,
6056
- labels: labels$f,
6057
- messages: messages$h
6223
+ labels: labels$g,
6224
+ messages: messages$i
6058
6225
  };
6059
6226
 
6060
- var labels$e = {
6227
+ var labels$f = {
6061
6228
  "continue": "Continuar al contenido"
6062
6229
  };
6063
- var messages$g = {
6230
+ var messages$h = {
6064
6231
  yourFreeTrial: "¡Suscripción exitosa!",
6065
6232
  youHaveAccess: "Esperamos que disfrutes de tu suscripción. Por favor, contáctanos si tienes alguna pregunta o inquietud.",
6066
6233
  clickToLearn: {
@@ -6086,12 +6253,12 @@ var errors$4 = {
6086
6253
  "": ""
6087
6254
  };
6088
6255
  var success_es = {
6089
- labels: labels$e,
6090
- messages: messages$g,
6256
+ labels: labels$f,
6257
+ messages: messages$h,
6091
6258
  errors: errors$4
6092
6259
  };
6093
6260
 
6094
- var messages$f = {
6261
+ var messages$g = {
6095
6262
  freeVisits: "Visitas gratuitas restantes:",
6096
6263
  subscribeNow: "Suscribir",
6097
6264
  alreadyHaveAccount: "¿Ya tienes una cuenta?",
@@ -6101,16 +6268,16 @@ var errors$3 = {
6101
6268
  "": ""
6102
6269
  };
6103
6270
  var meter_es = {
6104
- messages: messages$f,
6271
+ messages: messages$g,
6105
6272
  errors: errors$3
6106
6273
  };
6107
6274
 
6108
- var messages$e = {
6275
+ var messages$f = {
6109
6276
  youAreSafe: "Estás seguro - PCI compliance 128 SSL por",
6110
6277
  bankRedirection: "Por favor, espera, estamos redireccionando a tu banco.",
6111
6278
  bankAuthenticationSuccess: "Por favor, espera un momento mientras procesamos tu solicitud."
6112
6279
  };
6113
- var labels$d = {
6280
+ var labels$e = {
6114
6281
  card: "Ingresar número de tarjeta",
6115
6282
  date: "Vencimiento",
6116
6283
  CVC: "CVC",
@@ -6130,11 +6297,13 @@ var labels$d = {
6130
6297
  firstName: "Nombre",
6131
6298
  lastName: "Apellido",
6132
6299
  phone: "Teléfono",
6133
- freeItems: "Artículos gratis"
6300
+ freeItems: "Artículos gratis",
6301
+ email: "Correo",
6302
+ password: "Contraseña"
6134
6303
  };
6135
6304
  var checkoutForm_es = {
6136
- messages: messages$e,
6137
- labels: labels$d
6305
+ messages: messages$f,
6306
+ labels: labels$e
6138
6307
  };
6139
6308
 
6140
6309
  var youAreSafe = "Estás seguro - PCI compliance 128 SSL por";
@@ -6156,7 +6325,7 @@ var messages_es = {
6156
6325
  zeroTotalInvoice: zeroTotalInvoice
6157
6326
  };
6158
6327
 
6159
- var labels$c = {
6328
+ var labels$d = {
6160
6329
  email: "Ingresar correo",
6161
6330
  password: "Ingresar contraseña",
6162
6331
  required: "obligatorio",
@@ -6164,7 +6333,7 @@ var labels$c = {
6164
6333
  passwordPlaceholder: "Contraseña",
6165
6334
  login: "Iniciar Sesión"
6166
6335
  };
6167
- var messages$d = {
6336
+ var messages$e = {
6168
6337
  loginTo: "Inicia sesión en tu cuenta",
6169
6338
  welcome: "Bienvenido de vuelta, inicia sesión con tu cuenta existente.",
6170
6339
  dontHaveAccount: "¿Aún no tienes una cuenta?",
@@ -6183,28 +6352,28 @@ var errors$2 = {
6183
6352
  "": ""
6184
6353
  };
6185
6354
  var login_es = {
6186
- labels: labels$c,
6187
- messages: messages$d,
6355
+ labels: labels$d,
6356
+ messages: messages$e,
6188
6357
  errors: errors$2
6189
6358
  };
6190
6359
 
6191
- var labels$b = {
6360
+ var labels$c = {
6192
6361
  title: "Verificando Enlace Sin Contraseña",
6193
6362
  instructions: "¡Ya casi terminas!\nVamos a confirmar tu dirección de correo.\nPulsa el enlace de verificación que hemos enviado a tu correo:",
6194
6363
  resend: "Reenviar correo"
6195
6364
  };
6196
- var messages$c = {
6365
+ var messages$d = {
6197
6366
  resent: "Reenvío exitoso",
6198
6367
  success: "Inicio de sesión exitoso"
6199
6368
  };
6200
6369
  var verifyLinkToken_es = {
6201
- labels: labels$b,
6202
- messages: messages$c
6370
+ labels: labels$c,
6371
+ messages: messages$d
6203
6372
  };
6204
6373
 
6205
6374
  var title$7 = "Crear una cuenta";
6206
6375
  var subtitle$2 = "Ingresa tu correo y contraseña a continuación";
6207
- var labels$a = {
6376
+ var labels$b = {
6208
6377
  signUpFacebook: "Regístrate con Facebook",
6209
6378
  signUpGoogle: "Regístrate con Google",
6210
6379
  signUpEmail: "Regístrate con Correo",
@@ -6217,7 +6386,7 @@ var labels$a = {
6217
6386
  lastName: "Apellido",
6218
6387
  phone: "Teléfono"
6219
6388
  };
6220
- var messages$b = {
6389
+ var messages$c = {
6221
6390
  alreadyHaveAccount: " ¿Ya tienes una cuenta?",
6222
6391
  createAccount: "Crear cuenta",
6223
6392
  loginHere: "inicia sesión aquí",
@@ -6263,7 +6432,8 @@ var gift = {
6263
6432
  enterEmail: "Por favor, ingresa el correo del destinatario del regalo",
6264
6433
  invalidDate: "La fecha del regalo debe ser entre hoy y un año a partir de ahora.",
6265
6434
  giftDateInfo: "El destinatario recibirá un correo de notificación del regalo con tu mensaje en la fecha que seleccionaste en la orden para redimir el regalo.",
6266
- giftMessageInfo: "Deja un mensaje para el destinatario y no olvides firmar con tu nombre."
6435
+ giftMessageInfo: "Deja un mensaje para el destinatario y no olvides firmar con tu nombre.",
6436
+ giftMessageAllowedCharacters: "No se permiten caracteres especiales ni emojis."
6267
6437
  }
6268
6438
  };
6269
6439
  var redeem = {
@@ -6291,14 +6461,14 @@ var redeem = {
6291
6461
  var register_es = {
6292
6462
  title: title$7,
6293
6463
  subtitle: subtitle$2,
6294
- labels: labels$a,
6295
- messages: messages$b,
6464
+ labels: labels$b,
6465
+ messages: messages$c,
6296
6466
  errors: errors$1,
6297
6467
  gift: gift,
6298
6468
  redeem: redeem
6299
6469
  };
6300
6470
 
6301
- var labels$9 = {
6471
+ var labels$a = {
6302
6472
  title: "¿Quieres actualizar tu perfil?",
6303
6473
  subtitle: "Ingresa tu información a continuación para actualizar tu perfil",
6304
6474
  email: "Correo",
@@ -6317,21 +6487,21 @@ var labels$9 = {
6317
6487
  zoom: "Acercar",
6318
6488
  tin: "Número de Identificación Fiscal"
6319
6489
  };
6320
- var messages$a = {
6490
+ var messages$b = {
6321
6491
  userUpdated: "¡Gracias! Tu perfil se actualizó con éxito.",
6322
6492
  pictureRemoved: "Tu foto de perfil se eliminó con éxito.",
6323
6493
  pictureUpdated: "Tu foto de perfil se actualizó con éxito."
6324
6494
  };
6325
6495
  var userEdit_es = {
6326
- labels: labels$9,
6327
- messages: messages$a
6496
+ labels: labels$a,
6497
+ messages: messages$b
6328
6498
  };
6329
6499
 
6330
6500
  var title$6 = "Ingresa tu dirección de envío";
6331
6501
  var titleGifting = "Introduce tu dirección";
6332
6502
  var selectAddressTitle = "Por favor, selecciona una dirección";
6333
6503
  var selectAddressSubtitle = "Selecciona una de tus direcciones guardadas o añade una nueva";
6334
- var labels$8 = {
6504
+ var labels$9 = {
6335
6505
  address: "Dirección",
6336
6506
  code: "Código Postal/Área",
6337
6507
  city: "Ciudad",
@@ -6342,12 +6512,12 @@ var labels$8 = {
6342
6512
  required: "obligatorio",
6343
6513
  isDefault: "Configurar como dirección Principal"
6344
6514
  };
6345
- var buttons$3 = {
6515
+ var buttons$4 = {
6346
6516
  submit: "Enviar",
6347
6517
  selectAddress: "Seleccionar dirección",
6348
6518
  addAddress: "Añadir nueva dirección"
6349
6519
  };
6350
- var messages$9 = {
6520
+ var messages$a = {
6351
6521
  addressUpdated: "¡La dirección se actualizó con éxito!",
6352
6522
  subRedeemed: "Tu suscripción ha sido redimida."
6353
6523
  };
@@ -6356,9 +6526,9 @@ var address_es = {
6356
6526
  titleGifting: titleGifting,
6357
6527
  selectAddressTitle: selectAddressTitle,
6358
6528
  selectAddressSubtitle: selectAddressSubtitle,
6359
- labels: labels$8,
6360
- buttons: buttons$3,
6361
- messages: messages$9
6529
+ labels: labels$9,
6530
+ buttons: buttons$4,
6531
+ messages: messages$a
6362
6532
  };
6363
6533
 
6364
6534
  var title$5 = "Restablecer tu contraseña";
@@ -6386,7 +6556,7 @@ var password = "Contraseña";
6386
6556
  var submit$2 = "Enviar";
6387
6557
  var required$2 = "Obligatorio";
6388
6558
  var passwordResetEmailSent = "Las instrucciones de restablecimiento de la contraseña se han enviado a tu correo";
6389
- var messages$8 = {
6559
+ var messages$9 = {
6390
6560
  alreadyHaveAccount: "¿Ya tienes una cuenta?",
6391
6561
  loginHere: "Inicia sesión aquí."
6392
6562
  };
@@ -6397,7 +6567,7 @@ var passwordForgot_es = {
6397
6567
  submit: submit$2,
6398
6568
  required: required$2,
6399
6569
  passwordResetEmailSent: passwordResetEmailSent,
6400
- messages: messages$8
6570
+ messages: messages$9
6401
6571
  };
6402
6572
 
6403
6573
  var title$3 = "Cambiar tu contraseña";
@@ -6425,7 +6595,7 @@ var title$2 = "Acceso sin contraseña";
6425
6595
  var email = "Ingresar correo";
6426
6596
  var submit = "Enviar";
6427
6597
  var required = "obligatorio";
6428
- var messages$7 = {
6598
+ var messages$8 = {
6429
6599
  PasswordlessLoginSuccess: "Por favor, revisa tu correo y sigue las instrucciones que se indican"
6430
6600
  };
6431
6601
  var passwordlessRequest_es = {
@@ -6433,7 +6603,7 @@ var passwordlessRequest_es = {
6433
6603
  email: email,
6434
6604
  submit: submit,
6435
6605
  required: required,
6436
- messages: messages$7
6606
+ messages: messages$8
6437
6607
  };
6438
6608
 
6439
6609
  var title$1 = "Tu carrito de compras";
@@ -6461,13 +6631,13 @@ var cart_es = {
6461
6631
  removeAll: removeAll
6462
6632
  };
6463
6633
 
6464
- var buttons$2 = {
6634
+ var buttons$3 = {
6465
6635
  select: "Seleccionar",
6466
6636
  added: "Añadido al carrito",
6467
6637
  purchase: "Compra",
6468
6638
  "continue": "Continuar"
6469
6639
  };
6470
- var messages$6 = {
6640
+ var messages$7 = {
6471
6641
  orderConfirmed: {
6472
6642
  title: "¡Orden confirmada!",
6473
6643
  body: "Tu orden ha sido confirmada y será enviada en los próximos días. En breve recibirás un correo electrónico de confirmación de esta orden."
@@ -6476,17 +6646,17 @@ var messages$6 = {
6476
6646
  multipleCurrencies: "Tu carrito actualmente contiene artículos que están disponibles en diferentes divisas. Para proceder a la compra, asegúrate de que todos los artículos tengan la misma divisa.",
6477
6647
  currencyMismatch: "El siguiente artículo(s) no coincide con tu divisa predeterminada actual ({{currency}}). Por favor, solo elige artículos que coincidan con esta divisa."
6478
6648
  };
6479
- var labels$7 = {
6649
+ var labels$8 = {
6480
6650
  summary: "Resumen de la orden",
6481
6651
  total: "total"
6482
6652
  };
6483
6653
  var shop_es = {
6484
- buttons: buttons$2,
6485
- messages: messages$6,
6486
- labels: labels$7
6654
+ buttons: buttons$3,
6655
+ messages: messages$7,
6656
+ labels: labels$8
6487
6657
  };
6488
6658
 
6489
- var labels$6 = {
6659
+ var labels$7 = {
6490
6660
  cardNumber: "Número de Tarjeta",
6491
6661
  securityCode: "Código de Seguridad",
6492
6662
  submit: "Enviar",
@@ -6508,7 +6678,7 @@ var labels$6 = {
6508
6678
  title: "Información de Pago"
6509
6679
  }
6510
6680
  };
6511
- var messages$5 = {
6681
+ var messages$6 = {
6512
6682
  youAreSafe: "Estás seguro - PCI compliance 128 SSL por",
6513
6683
  cancel: "Cancela tu suscripción en línea en cualquier momento.",
6514
6684
  giftSent: "La suscripción de regalo se ha enviado a",
@@ -6522,12 +6692,12 @@ var errors = {
6522
6692
  "": ""
6523
6693
  };
6524
6694
  var payment_es = {
6525
- labels: labels$6,
6526
- messages: messages$5,
6695
+ labels: labels$7,
6696
+ messages: messages$6,
6527
6697
  errors: errors
6528
6698
  };
6529
6699
 
6530
- var labels$5 = {
6700
+ var labels$6 = {
6531
6701
  menu: "Menú de Pelcro",
6532
6702
  name: "Nombre",
6533
6703
  email: "Correo",
@@ -6612,9 +6782,12 @@ var labels$5 = {
6612
6782
  },
6613
6783
  subCancellation: {
6614
6784
  goBack: "Volver"
6785
+ },
6786
+ donationCancellation: {
6787
+ goBack: "Go back"
6615
6788
  }
6616
6789
  };
6617
- var messages$4 = {
6790
+ var messages$5 = {
6618
6791
  noCard: "No tienes una tarjeta",
6619
6792
  subCancellation: {
6620
6793
  isSureToCancel: "¿Estás seguro de que quieres cancelar tu suscripción?",
@@ -6631,11 +6804,60 @@ var messages$4 = {
6631
6804
  loading: "Reanudando tu suscripción",
6632
6805
  success: "La suscripción se reanudó con éxito",
6633
6806
  error: "Error al reanudar tu suscripción"
6807
+ },
6808
+ donationCancellation: {
6809
+ isSureToCancel: "¿Estás seguro de que quieres cancelar tu donación?",
6810
+ loading: "Cancelando tu donación",
6811
+ success: "La donación se canceló con éxito",
6812
+ error: "Error al cancelar tu donación"
6813
+ },
6814
+ donationReactivation: {
6815
+ success: "La donación se reactivó con éxito",
6816
+ error: "Error al reactivar su donación"
6817
+ },
6818
+ donationUnSuspend: {
6819
+ isSureToUnSuspend: "¿Estás seguro de que quieres reanudar tu donación?",
6820
+ loading: "Reanudando tu donación",
6821
+ success: "La donación se reanudó con éxito",
6822
+ error: "Error al reanudar tu donación"
6634
6823
  }
6635
6824
  };
6636
6825
  var dashboard_es = {
6826
+ labels: labels$6,
6827
+ messages: messages$5
6828
+ };
6829
+
6830
+ var messages$4 = {
6831
+ alreadyHaveAccount: "¿Ya tienes una cuenta?",
6832
+ loginHere: "Inicia sesión aquí",
6833
+ checkbox: "Marca esta casilla para regalar esta suscripción"
6834
+ };
6835
+ var labels$5 = {
6836
+ plan: {
6837
+ title: "Suscribirse a un plan",
6838
+ subtitle: "Selecciona uno de los planes a continuación y pulsa en siguiente."
6839
+ },
6840
+ product: {
6841
+ title: "Suscribirse a un producto",
6842
+ subtitle: "Selecciona uno de los productos a continuación y pulsa en siguiente."
6843
+ },
6844
+ selectProduct: "Selecciona un producto",
6845
+ selectPlan: "Selecciona un plan",
6846
+ startingAt: "Inicia el",
6847
+ restrictiveArticles: {
6848
+ subscribeTo: "Suscríbete a una de las siguientes opciones para obtener acceso a esta página",
6849
+ or: "O revisa algunas de nuestras otras opciones a continuación"
6850
+ }
6851
+ };
6852
+ var buttons$2 = {
6853
+ next: "Siguiente",
6854
+ select: "Seleccionar",
6855
+ back: "Volver"
6856
+ };
6857
+ var select_es = {
6858
+ messages: messages$4,
6637
6859
  labels: labels$5,
6638
- messages: messages$4
6860
+ buttons: buttons$2
6639
6861
  };
6640
6862
 
6641
6863
  var messages$3 = {
@@ -6665,7 +6887,7 @@ var buttons$1 = {
6665
6887
  select: "Seleccionar",
6666
6888
  back: "Volver"
6667
6889
  };
6668
- var select_es = {
6890
+ var donation_es = {
6669
6891
  messages: messages$3,
6670
6892
  labels: labels$4,
6671
6893
  buttons: buttons$1
@@ -8099,7 +8321,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
8099
8321
  OutboundLink$1.origTrackLink = OutboundLink$1.trackLink;
8100
8322
  OutboundLink$1.trackLink = outboundLink;
8101
8323
  var OutboundLink = OutboundLink$1;
8102
- var ReactGA = _objectSpread({}, Defaults, {
8324
+ var ReactGA$1 = _objectSpread({}, Defaults, {
8103
8325
  OutboundLink: OutboundLink
8104
8326
  });
8105
8327
 
@@ -8339,7 +8561,7 @@ class PelcroActions {
8339
8561
  return console.warn("You are already logged out.");
8340
8562
  }
8341
8563
  window.Pelcro.user.logout();
8342
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
8564
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
8343
8565
  category: "ACTIONS",
8344
8566
  action: "Logged out",
8345
8567
  nonInteraction: true
@@ -8509,6 +8731,9 @@ const initialState$n = {
8509
8731
  giftCode: "",
8510
8732
  subscriptionIdToRenew: null,
8511
8733
  subscriptionToManageMembers: null,
8734
+ isDonation: false,
8735
+ selectedDonationAmount: null,
8736
+ customDonationAmount: null,
8512
8737
  // E-commerce
8513
8738
  cartItems: [],
8514
8739
  order: null,
@@ -8692,7 +8917,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
8692
8917
  * @return {boolean}
8693
8918
  */
8694
8919
  const isValidViewFromURL = viewID => {
8695
- if (["login", "register", "plan-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "passwordless-request", "passwordless-login", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart", "email-verify", "invoice-details", "manage-members"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
8920
+ if (["login", "register", "plan-select", "donation-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "passwordless-request", "passwordless-login", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart", "email-verify", "invoice-details", "manage-members"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
8696
8921
  return true;
8697
8922
  }
8698
8923
  return false;
@@ -8768,16 +8993,16 @@ const trackSubscriptionOnGA = () => {
8768
8993
  return;
8769
8994
  }
8770
8995
  const currencyCode = (_window$Pelcro$user$r5 = (_window$Pelcro$user$r6 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r6 === void 0 ? void 0 : _window$Pelcro$user$r6.currency) !== null && _window$Pelcro$user$r5 !== void 0 ? _window$Pelcro$user$r5 : plan.currency;
8771
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$set = ReactGA.set) === null || _ReactGA$set === void 0 ? void 0 : _ReactGA$set.call(ReactGA, {
8996
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$set = ReactGA$1.set) === null || _ReactGA$set === void 0 ? void 0 : _ReactGA$set.call(ReactGA$1, {
8772
8997
  currencyCode: currencyCode
8773
8998
  });
8774
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$plugin = ReactGA.plugin) === null || _ReactGA$plugin === void 0 ? void 0 : (_ReactGA$plugin$execu = _ReactGA$plugin.execute) === null || _ReactGA$plugin$execu === void 0 ? void 0 : _ReactGA$plugin$execu.call(_ReactGA$plugin, "ecommerce", "addTransaction", {
8999
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$plugin = ReactGA$1.plugin) === null || _ReactGA$plugin === void 0 ? void 0 : (_ReactGA$plugin$execu = _ReactGA$plugin.execute) === null || _ReactGA$plugin$execu === void 0 ? void 0 : _ReactGA$plugin$execu.call(_ReactGA$plugin, "ecommerce", "addTransaction", {
8775
9000
  id: lastSubscriptionId,
8776
9001
  affiliation: "Pelcro",
8777
9002
  revenue: plan !== null && plan !== void 0 && plan.amount ? isCurrencyZeroDecimal(currencyCode) ? plan.amount : plan.amount / 100 : 0,
8778
9003
  coupon: couponCode
8779
9004
  });
8780
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$plugin2 = ReactGA.plugin) === null || _ReactGA$plugin2 === void 0 ? void 0 : (_ReactGA$plugin2$exec = _ReactGA$plugin2.execute) === null || _ReactGA$plugin2$exec === void 0 ? void 0 : _ReactGA$plugin2$exec.call(_ReactGA$plugin2, "ecommerce", "addItem", {
9005
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$plugin2 = ReactGA$1.plugin) === null || _ReactGA$plugin2 === void 0 ? void 0 : (_ReactGA$plugin2$exec = _ReactGA$plugin2.execute) === null || _ReactGA$plugin2$exec === void 0 ? void 0 : _ReactGA$plugin2$exec.call(_ReactGA$plugin2, "ecommerce", "addItem", {
8781
9006
  id: lastSubscriptionId,
8782
9007
  name: product.name,
8783
9008
  category: product.description,
@@ -8785,8 +9010,8 @@ const trackSubscriptionOnGA = () => {
8785
9010
  price: plan !== null && plan !== void 0 && plan.amount ? isCurrencyZeroDecimal(currencyCode) ? plan.amount : plan.amount / 100 : 0,
8786
9011
  quantity: 1
8787
9012
  });
8788
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$plugin3 = ReactGA.plugin) === null || _ReactGA$plugin3 === void 0 ? void 0 : (_ReactGA$plugin3$exec = _ReactGA$plugin3.execute) === null || _ReactGA$plugin3$exec === void 0 ? void 0 : _ReactGA$plugin3$exec.call(_ReactGA$plugin3, "ecommerce", "send");
8789
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
9013
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$plugin3 = ReactGA$1.plugin) === null || _ReactGA$plugin3 === void 0 ? void 0 : (_ReactGA$plugin3$exec = _ReactGA$plugin3.execute) === null || _ReactGA$plugin3$exec === void 0 ? void 0 : _ReactGA$plugin3$exec.call(_ReactGA$plugin3, "ecommerce", "send");
9014
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
8790
9015
  category: "ACTIONS",
8791
9016
  action: "Subscribed",
8792
9017
  nonInteraction: true
@@ -8898,6 +9123,13 @@ function notifyBugsnag(callback, startOptions) {
8898
9123
  }
8899
9124
  callback();
8900
9125
  }
9126
+ function isStringValid(str) {
9127
+ // Define the regular expression to match only letters, numbers and spaces
9128
+ var regex = /^[a-zA-Z0-9\s]+$/;
9129
+
9130
+ // Test the string against the regular expression
9131
+ return regex.test(str);
9132
+ }
8901
9133
 
8902
9134
  const resources = {
8903
9135
  en: {
@@ -8923,6 +9155,7 @@ const resources = {
8923
9155
  payment: payment_en,
8924
9156
  dashboard: dashboard_en,
8925
9157
  select: select_en,
9158
+ donation: donation_en,
8926
9159
  notification: notification_en,
8927
9160
  invoiceDetails: invoiceDetails_en,
8928
9161
  subscriptionCancel: subscriptionCancel_en,
@@ -8952,6 +9185,7 @@ const resources = {
8952
9185
  payment: payment_fr,
8953
9186
  dashboard: dashboard_fr,
8954
9187
  select: select_fr,
9188
+ donation: donation_fr,
8955
9189
  notification: notification_fr,
8956
9190
  invoiceDetails: invoiceDetails_fr,
8957
9191
  subscriptionCancel: subscriptionCancel_fr,
@@ -8981,6 +9215,7 @@ const resources = {
8981
9215
  payment: payment_ko,
8982
9216
  dashboard: dashboard_ko,
8983
9217
  select: select_ko,
9218
+ donation: donation_ko,
8984
9219
  notification: notification_ko,
8985
9220
  invoiceDetails: invoiceDetails_ko,
8986
9221
  subscriptionCancel: subscriptionCancel_ko,
@@ -9010,6 +9245,7 @@ const resources = {
9010
9245
  payment: payment_es,
9011
9246
  dashboard: dashboard_es,
9012
9247
  select: select_es,
9248
+ donation: donation_es,
9013
9249
  notification: notification_es,
9014
9250
  invoiceDetails: invoiceDetails_es,
9015
9251
  subscriptionCancel: subscriptionCancel_es,
@@ -9045,88 +9281,257 @@ pageLanguageObserver.observe(document.documentElement, {
9045
9281
  attributes: true
9046
9282
  });
9047
9283
 
9048
- function _classPrivateFieldGet(receiver, privateMap) {
9049
- var descriptor = privateMap.get(receiver);
9284
+ var pure$1 = createCommonjsModule(function (module, exports) {
9050
9285
 
9051
- if (!descriptor) {
9052
- throw new TypeError("attempted to get private field on non-instance");
9053
- }
9286
+ Object.defineProperty(exports, '__esModule', { value: true });
9054
9287
 
9055
- if (descriptor.get) {
9056
- return descriptor.get.call(receiver);
9288
+ function _typeof(obj) {
9289
+ "@babel/helpers - typeof";
9290
+
9291
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
9292
+ _typeof = function (obj) {
9293
+ return typeof obj;
9294
+ };
9295
+ } else {
9296
+ _typeof = function (obj) {
9297
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
9298
+ };
9057
9299
  }
9058
9300
 
9059
- return descriptor.value;
9301
+ return _typeof(obj);
9060
9302
  }
9061
9303
 
9062
- function _classPrivateFieldInitSpec$2(obj, privateMap, value) { _checkPrivateRedeclaration$2(obj, privateMap); privateMap.set(obj, value); }
9063
- function _checkPrivateRedeclaration$2(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9064
- var _isAlreadySaved = /*#__PURE__*/new WeakMap();
9065
- var _markButtonAsLoading = /*#__PURE__*/new WeakMap();
9066
- var _removeLoadingState = /*#__PURE__*/new WeakMap();
9067
- var _markButtonAsSaved = /*#__PURE__*/new WeakMap();
9068
- var _unmarkSavedButton = /*#__PURE__*/new WeakMap();
9069
- var _markAllSavedButtons = /*#__PURE__*/new WeakMap();
9070
- var _unmarkAllSavedButtons = /*#__PURE__*/new WeakMap();
9071
- var _saveToMetadata = /*#__PURE__*/new WeakMap();
9072
- var _removeMetaData = /*#__PURE__*/new WeakMap();
9073
- var _onClick = /*#__PURE__*/new WeakMap();
9074
- class SaveToMetadataButtonClass {
9075
- constructor() {
9076
- _defineProperty$3(this, "authenticated", () => {
9077
- _classPrivateFieldGet(this, _onClick).call(this, _classPrivateFieldGet(this, _saveToMetadata));
9078
- _classPrivateFieldGet(this, _markAllSavedButtons).call(this);
9079
- });
9080
- _defineProperty$3(this, "unauthenticated", () => {
9081
- const {
9082
- switchView
9083
- } = usePelcro.getStore();
9084
- _classPrivateFieldGet(this, _onClick).call(this, () => switchView("login"));
9085
- _classPrivateFieldGet(this, _unmarkAllSavedButtons).call(this);
9086
- });
9087
- _classPrivateFieldInitSpec$2(this, _isAlreadySaved, {
9088
- writable: true,
9089
- value: button => {
9090
- return button.classList.contains("pelcro-is-active");
9091
- }
9092
- });
9093
- _classPrivateFieldInitSpec$2(this, _markButtonAsLoading, {
9094
- writable: true,
9095
- value: button => {
9096
- button.classList.add("pelcro-is-loading");
9097
- button.disabled = true;
9098
- }
9099
- });
9100
- _classPrivateFieldInitSpec$2(this, _removeLoadingState, {
9101
- writable: true,
9102
- value: button => {
9103
- button.classList.remove("pelcro-is-loading");
9104
- button.disabled = false;
9105
- }
9106
- });
9107
- _classPrivateFieldInitSpec$2(this, _markButtonAsSaved, {
9108
- writable: true,
9109
- value: button => {
9110
- button.classList.add("pelcro-is-active");
9111
- _classPrivateFieldGet(this, _removeLoadingState).call(this, button);
9112
- }
9113
- });
9114
- _classPrivateFieldInitSpec$2(this, _unmarkSavedButton, {
9115
- writable: true,
9116
- value: button => {
9117
- button.classList.remove("pelcro-is-active");
9118
- _classPrivateFieldGet(this, _removeLoadingState).call(this, button);
9304
+ var V3_URL = 'https://js.stripe.com/v3';
9305
+ var V3_URL_REGEX = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;
9306
+ var EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';
9307
+ var findScript = function findScript() {
9308
+ var scripts = document.querySelectorAll("script[src^=\"".concat(V3_URL, "\"]"));
9309
+
9310
+ for (var i = 0; i < scripts.length; i++) {
9311
+ var script = scripts[i];
9312
+
9313
+ if (!V3_URL_REGEX.test(script.src)) {
9314
+ continue;
9315
+ }
9316
+
9317
+ return script;
9318
+ }
9319
+
9320
+ return null;
9321
+ };
9322
+
9323
+ var injectScript = function injectScript(params) {
9324
+ var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';
9325
+ var script = document.createElement('script');
9326
+ script.src = "".concat(V3_URL).concat(queryString);
9327
+ var headOrBody = document.head || document.body;
9328
+
9329
+ if (!headOrBody) {
9330
+ throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');
9331
+ }
9332
+
9333
+ headOrBody.appendChild(script);
9334
+ return script;
9335
+ };
9336
+
9337
+ var registerWrapper = function registerWrapper(stripe, startTime) {
9338
+ if (!stripe || !stripe._registerWrapper) {
9339
+ return;
9340
+ }
9341
+
9342
+ stripe._registerWrapper({
9343
+ name: 'stripe-js',
9344
+ version: "1.21.1",
9345
+ startTime: startTime
9346
+ });
9347
+ };
9348
+
9349
+ var stripePromise = null;
9350
+ var loadScript = function loadScript(params) {
9351
+ // Ensure that we only attempt to load Stripe.js at most once
9352
+ if (stripePromise !== null) {
9353
+ return stripePromise;
9354
+ }
9355
+
9356
+ stripePromise = new Promise(function (resolve, reject) {
9357
+ if (typeof window === 'undefined') {
9358
+ // Resolve to null when imported server side. This makes the module
9359
+ // safe to import in an isomorphic code base.
9360
+ resolve(null);
9361
+ return;
9362
+ }
9363
+
9364
+ if (window.Stripe && params) {
9365
+ console.warn(EXISTING_SCRIPT_MESSAGE);
9366
+ }
9367
+
9368
+ if (window.Stripe) {
9369
+ resolve(window.Stripe);
9370
+ return;
9371
+ }
9372
+
9373
+ try {
9374
+ var script = findScript();
9375
+
9376
+ if (script && params) {
9377
+ console.warn(EXISTING_SCRIPT_MESSAGE);
9378
+ } else if (!script) {
9379
+ script = injectScript(params);
9119
9380
  }
9120
- });
9121
- _classPrivateFieldInitSpec$2(this, _markAllSavedButtons, {
9122
- writable: true,
9123
- value: () => {
9124
- var _Object$values, _window$Pelcro$user$r;
9125
- const userMetadataArray = (_Object$values = Object.values((_window$Pelcro$user$r = window.Pelcro.user.read().metadata) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : {})) === null || _Object$values === void 0 ? void 0 : _Object$values.flat();
9126
- this.saveButtons.forEach(button => {
9127
- const buttonMetadata = button.dataset;
9128
- userMetadataArray === null || userMetadataArray === void 0 ? void 0 : userMetadataArray.forEach(value => {
9129
- if ((value === null || value === void 0 ? void 0 : value.title) === (buttonMetadata === null || buttonMetadata === void 0 ? void 0 : buttonMetadata.title)) {
9381
+
9382
+ script.addEventListener('load', function () {
9383
+ if (window.Stripe) {
9384
+ resolve(window.Stripe);
9385
+ } else {
9386
+ reject(new Error('Stripe.js not available'));
9387
+ }
9388
+ });
9389
+ script.addEventListener('error', function () {
9390
+ reject(new Error('Failed to load Stripe.js'));
9391
+ });
9392
+ } catch (error) {
9393
+ reject(error);
9394
+ return;
9395
+ }
9396
+ });
9397
+ return stripePromise;
9398
+ };
9399
+ var initStripe = function initStripe(maybeStripe, args, startTime) {
9400
+ if (maybeStripe === null) {
9401
+ return null;
9402
+ }
9403
+
9404
+ var stripe = maybeStripe.apply(undefined, args);
9405
+ registerWrapper(stripe, startTime);
9406
+ return stripe;
9407
+ };
9408
+ var validateLoadParams = function validateLoadParams(params) {
9409
+ var errorMessage = "invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(params), "\n");
9410
+
9411
+ if (params === null || _typeof(params) !== 'object') {
9412
+ throw new Error(errorMessage);
9413
+ }
9414
+
9415
+ if (Object.keys(params).length === 1 && typeof params.advancedFraudSignals === 'boolean') {
9416
+ return params;
9417
+ }
9418
+
9419
+ throw new Error(errorMessage);
9420
+ };
9421
+
9422
+ var loadParams;
9423
+ var loadStripeCalled = false;
9424
+ var loadStripe = function loadStripe() {
9425
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
9426
+ args[_key] = arguments[_key];
9427
+ }
9428
+
9429
+ loadStripeCalled = true;
9430
+ var startTime = Date.now();
9431
+ return loadScript(loadParams).then(function (maybeStripe) {
9432
+ return initStripe(maybeStripe, args, startTime);
9433
+ });
9434
+ };
9435
+
9436
+ loadStripe.setLoadParameters = function (params) {
9437
+ if (loadStripeCalled) {
9438
+ throw new Error('You cannot change load parameters after calling loadStripe');
9439
+ }
9440
+
9441
+ loadParams = validateLoadParams(params);
9442
+ };
9443
+
9444
+ exports.loadStripe = loadStripe;
9445
+ });
9446
+
9447
+ unwrapExports(pure$1);
9448
+ pure$1.loadStripe;
9449
+
9450
+ var pure = pure$1;
9451
+ var pure_1 = pure.loadStripe;
9452
+
9453
+ function _classPrivateFieldGet(receiver, privateMap) {
9454
+ var descriptor = privateMap.get(receiver);
9455
+
9456
+ if (!descriptor) {
9457
+ throw new TypeError("attempted to get private field on non-instance");
9458
+ }
9459
+
9460
+ if (descriptor.get) {
9461
+ return descriptor.get.call(receiver);
9462
+ }
9463
+
9464
+ return descriptor.value;
9465
+ }
9466
+
9467
+ function _classPrivateFieldInitSpec$2(obj, privateMap, value) { _checkPrivateRedeclaration$2(obj, privateMap); privateMap.set(obj, value); }
9468
+ function _checkPrivateRedeclaration$2(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9469
+ var _isAlreadySaved = /*#__PURE__*/new WeakMap();
9470
+ var _markButtonAsLoading = /*#__PURE__*/new WeakMap();
9471
+ var _removeLoadingState = /*#__PURE__*/new WeakMap();
9472
+ var _markButtonAsSaved = /*#__PURE__*/new WeakMap();
9473
+ var _unmarkSavedButton = /*#__PURE__*/new WeakMap();
9474
+ var _markAllSavedButtons = /*#__PURE__*/new WeakMap();
9475
+ var _unmarkAllSavedButtons = /*#__PURE__*/new WeakMap();
9476
+ var _saveToMetadata = /*#__PURE__*/new WeakMap();
9477
+ var _removeMetaData = /*#__PURE__*/new WeakMap();
9478
+ var _onClick = /*#__PURE__*/new WeakMap();
9479
+ class SaveToMetadataButtonClass {
9480
+ constructor() {
9481
+ _defineProperty$3(this, "authenticated", () => {
9482
+ _classPrivateFieldGet(this, _onClick).call(this, _classPrivateFieldGet(this, _saveToMetadata));
9483
+ _classPrivateFieldGet(this, _markAllSavedButtons).call(this);
9484
+ });
9485
+ _defineProperty$3(this, "unauthenticated", () => {
9486
+ const {
9487
+ switchView
9488
+ } = usePelcro.getStore();
9489
+ _classPrivateFieldGet(this, _onClick).call(this, () => switchView("login"));
9490
+ _classPrivateFieldGet(this, _unmarkAllSavedButtons).call(this);
9491
+ });
9492
+ _classPrivateFieldInitSpec$2(this, _isAlreadySaved, {
9493
+ writable: true,
9494
+ value: button => {
9495
+ return button.classList.contains("pelcro-is-active");
9496
+ }
9497
+ });
9498
+ _classPrivateFieldInitSpec$2(this, _markButtonAsLoading, {
9499
+ writable: true,
9500
+ value: button => {
9501
+ button.classList.add("pelcro-is-loading");
9502
+ button.disabled = true;
9503
+ }
9504
+ });
9505
+ _classPrivateFieldInitSpec$2(this, _removeLoadingState, {
9506
+ writable: true,
9507
+ value: button => {
9508
+ button.classList.remove("pelcro-is-loading");
9509
+ button.disabled = false;
9510
+ }
9511
+ });
9512
+ _classPrivateFieldInitSpec$2(this, _markButtonAsSaved, {
9513
+ writable: true,
9514
+ value: button => {
9515
+ button.classList.add("pelcro-is-active");
9516
+ _classPrivateFieldGet(this, _removeLoadingState).call(this, button);
9517
+ }
9518
+ });
9519
+ _classPrivateFieldInitSpec$2(this, _unmarkSavedButton, {
9520
+ writable: true,
9521
+ value: button => {
9522
+ button.classList.remove("pelcro-is-active");
9523
+ _classPrivateFieldGet(this, _removeLoadingState).call(this, button);
9524
+ }
9525
+ });
9526
+ _classPrivateFieldInitSpec$2(this, _markAllSavedButtons, {
9527
+ writable: true,
9528
+ value: () => {
9529
+ var _Object$values, _window$Pelcro$user$r;
9530
+ const userMetadataArray = (_Object$values = Object.values((_window$Pelcro$user$r = window.Pelcro.user.read().metadata) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : {})) === null || _Object$values === void 0 ? void 0 : _Object$values.flat();
9531
+ this.saveButtons.forEach(button => {
9532
+ const buttonMetadata = button.dataset;
9533
+ userMetadataArray === null || userMetadataArray === void 0 ? void 0 : userMetadataArray.forEach(value => {
9534
+ if ((value === null || value === void 0 ? void 0 : value.title) === (buttonMetadata === null || buttonMetadata === void 0 ? void 0 : buttonMetadata.title)) {
9130
9535
  _classPrivateFieldGet(this, _markButtonAsSaved).call(this, button);
9131
9536
  }
9132
9537
  });
@@ -9183,7 +9588,7 @@ class SaveToMetadataButtonClass {
9183
9588
  return _classPrivateFieldGet(this, _removeLoadingState).call(this, button);
9184
9589
  }
9185
9590
  _classPrivateFieldGet(this, _markButtonAsSaved).call(this, button);
9186
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
9591
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
9187
9592
  category: "ACTIONS",
9188
9593
  action: "Save/Follow",
9189
9594
  label: buttonMetadata === null || buttonMetadata === void 0 ? void 0 : buttonMetadata.title
@@ -9215,7 +9620,7 @@ class SaveToMetadataButtonClass {
9215
9620
  return _classPrivateFieldGet(this, _removeLoadingState).call(this, button);
9216
9621
  }
9217
9622
  _classPrivateFieldGet(this, _unmarkSavedButton).call(this, button);
9218
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
9623
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$1, {
9219
9624
  category: "ACTIONS",
9220
9625
  action: "Unsave/Unfollow",
9221
9626
  label: title
@@ -10220,7 +10625,7 @@ toast.confirm = function (onConfirm, _ref3) {
10220
10625
  ...options
10221
10626
  });
10222
10627
  setTimeout(() => {
10223
- notify$1.dismiss(id);
10628
+ notify.dismiss(id);
10224
10629
  }, 3000);
10225
10630
  };
10226
10631
  const onFailure = errorValue => {
@@ -10229,11 +10634,11 @@ toast.confirm = function (onConfirm, _ref3) {
10229
10634
  ...options
10230
10635
  });
10231
10636
  setTimeout(() => {
10232
- notify$1.dismiss(id);
10637
+ notify.dismiss(id);
10233
10638
  }, 3000);
10234
10639
  };
10235
10640
  };
10236
- const notify$1 = toast;
10641
+ const notify = toast;
10237
10642
 
10238
10643
  const translations = i18next.t("common:buttons", {
10239
10644
  returnObjects: true
@@ -10294,7 +10699,7 @@ const init$1 = () => {
10294
10699
  const errorMessage = i18next.t("messages:invalidSubscription", {
10295
10700
  returnObjects: true
10296
10701
  });
10297
- return notify$1.error(errorMessage);
10702
+ return notify.error(errorMessage);
10298
10703
  }
10299
10704
  switchView("manage-members");
10300
10705
  });
@@ -10302,7 +10707,7 @@ const init$1 = () => {
10302
10707
  const errorMessage = i18next.t("messages:invalidSubscription", {
10303
10708
  returnObjects: true
10304
10709
  });
10305
- return notify$1.error(errorMessage);
10710
+ return notify.error(errorMessage);
10306
10711
  }
10307
10712
  }
10308
10713
  }
@@ -10360,6 +10765,57 @@ const init$1 = () => {
10360
10765
  }
10361
10766
  }
10362
10767
  }
10768
+ const pelcroDonateButtonsByClass = document.getElementsByClassName("pelcro-donate-button");
10769
+ if (pelcroDonateButtonsByClass.length !== 0) {
10770
+ for (let j = 0; j < pelcroDonateButtonsByClass.length; j++) {
10771
+ if (pelcroDonateButtonsByClass[j].dataset && "productId" in pelcroDonateButtonsByClass[j].dataset) {
10772
+ pelcroDonateButtonsByClass[j].addEventListener("click", e => {
10773
+ var _selectedProduct$plan2;
10774
+ set({
10775
+ isDonation: true
10776
+ });
10777
+ const productsList = window.Pelcro.product.list();
10778
+ if (!(productsList !== null && productsList !== void 0 && productsList.length)) return;
10779
+ const [productId, planId, isGift] = [e.target.dataset.productId, e.target.dataset.planId, e.target.dataset.isGift];
10780
+ const selectedProduct = productsList.find(product => product.id === Number(productId));
10781
+ const selectedPlan = selectedProduct === null || selectedProduct === void 0 ? void 0 : (_selectedProduct$plan2 = selectedProduct.plans) === null || _selectedProduct$plan2 === void 0 ? void 0 : _selectedProduct$plan2.find(plan => plan.id === Number(planId));
10782
+ set({
10783
+ product: selectedProduct,
10784
+ plan: selectedPlan,
10785
+ isGift: Boolean(isGift)
10786
+ });
10787
+ if (!selectedProduct || !selectedPlan) {
10788
+ return switchView("plan-select");
10789
+ }
10790
+
10791
+ // if (!isAuthenticated()) {
10792
+ // return switchView("register");
10793
+ // }
10794
+
10795
+ if (isGift) {
10796
+ return switchView("gift-create");
10797
+ }
10798
+
10799
+ // const requiresAddress = Boolean(
10800
+ // selectedProduct.address_required
10801
+ // );
10802
+
10803
+ // if (requiresAddress) {
10804
+ // return switchToAddressView();
10805
+ // }
10806
+
10807
+ return switchToPaymentView();
10808
+ });
10809
+ } else {
10810
+ pelcroDonateButtonsByClass[j].addEventListener("click", () => {
10811
+ set({
10812
+ isDonation: true
10813
+ });
10814
+ switchView("donation-select");
10815
+ });
10816
+ }
10817
+ }
10818
+ }
10363
10819
  const pelcroOfflineSubButtonsByClass = document.getElementsByClassName("pelcro-offline-subscribe-button");
10364
10820
  if (pelcroOfflineSubButtonsByClass.length !== 0) {
10365
10821
  for (let j = 0; j < pelcroOfflineSubButtonsByClass.length; j++) {
@@ -10439,7 +10895,7 @@ const init$1 = () => {
10439
10895
  const errorMsg = i18next.t("shop:messages.currencyMismatch", {
10440
10896
  currency: userCurrency
10441
10897
  });
10442
- notify$1.error(errorMsg);
10898
+ notify.error(errorMsg);
10443
10899
  }
10444
10900
  });
10445
10901
  }
@@ -10532,7 +10988,7 @@ const init = () => {
10532
10988
  unblurElemWhenUserLogsIn(elemDeepClone, entitlements);
10533
10989
  unblurElemWhenUserLogsOut(elemDeepClone, entitlements);
10534
10990
  const NOTIFICATION_ID = "entitlement";
10535
- notify$1( /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(Trans, {
10991
+ notify( /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(Trans, {
10536
10992
  i18nKey: "messages:entitlement"
10537
10993
  }, "Some of the content on this page is available with one or more of our plans.", /*#__PURE__*/React__default.createElement(Link, {
10538
10994
  onClick: () => {
@@ -10547,7 +11003,7 @@ const init = () => {
10547
11003
  plan: selectedPlan
10548
11004
  });
10549
11005
  }
10550
- notify$1.dismiss(NOTIFICATION_ID);
11006
+ notify.dismiss(NOTIFICATION_ID);
10551
11007
  switchView("_plan-select-entitlements");
10552
11008
  }
10553
11009
  }, "Subscribe"), "now to get full page access.")), {
@@ -10612,208 +11068,39 @@ function shouldBlurContent(entitlements) {
10612
11068
  return entitlements.every(entitlement => !window.Pelcro.user.isEntitledTo(entitlement));
10613
11069
  }
10614
11070
 
10615
- var pure$1 = createCommonjsModule(function (module, exports) {
10616
-
10617
- Object.defineProperty(exports, '__esModule', { value: true });
10618
-
10619
- function _typeof(obj) {
10620
- "@babel/helpers - typeof";
10621
-
10622
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
10623
- _typeof = function (obj) {
10624
- return typeof obj;
10625
- };
10626
- } else {
10627
- _typeof = function (obj) {
10628
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10629
- };
11071
+ /**
11072
+ * Extracts error message from the response error object
11073
+ * @param {Object} error Error object
11074
+ * @return {string}
11075
+ */
11076
+ const getErrorMessages = error => {
11077
+ var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
11078
+ if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
11079
+ return error.error.message;
10630
11080
  }
11081
+ if (error !== null && error !== void 0 && (_error$response = error.response) !== null && _error$response !== void 0 && (_error$response$data = _error$response.data) !== null && _error$response$data !== void 0 && _error$response$data.message) {
11082
+ var _error$response2, _error$response2$data;
11083
+ return error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : _error$response2$data.message;
11084
+ }
11085
+ if (error !== null && error !== void 0 && (_error$response3 = error.response) !== null && _error$response3 !== void 0 && (_error$response3$data = _error$response3.data) !== null && _error$response3$data !== void 0 && (_error$response3$data2 = _error$response3$data.error) !== null && _error$response3$data2 !== void 0 && _error$response3$data2.message) {
11086
+ var _error$response4, _error$response4$data, _error$response4$data2;
11087
+ return error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.error) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2.message;
11088
+ }
11089
+ if (error !== null && error !== void 0 && (_error$response5 = error.response) !== null && _error$response5 !== void 0 && (_error$response5$data = _error$response5.data) !== null && _error$response5$data !== void 0 && _error$response5$data.errors) {
11090
+ var _error$response6, _error$response6$data;
11091
+ const errorMessages = [];
10631
11092
 
10632
- return _typeof(obj);
10633
- }
10634
-
10635
- var V3_URL = 'https://js.stripe.com/v3';
10636
- var V3_URL_REGEX = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;
10637
- var EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';
10638
- var findScript = function findScript() {
10639
- var scripts = document.querySelectorAll("script[src^=\"".concat(V3_URL, "\"]"));
10640
-
10641
- for (var i = 0; i < scripts.length; i++) {
10642
- var script = scripts[i];
10643
-
10644
- if (!V3_URL_REGEX.test(script.src)) {
10645
- continue;
10646
- }
11093
+ // enumerable error (ex: validation errors)
11094
+ Object.values(error === null || error === void 0 ? void 0 : (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : _error$response6$data.errors).forEach(_ref => {
11095
+ let [errorMessage] = _ref;
11096
+ errorMessages.push(errorMessage);
11097
+ });
10647
11098
 
10648
- return script;
10649
- }
10650
-
10651
- return null;
10652
- };
10653
-
10654
- var injectScript = function injectScript(params) {
10655
- var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';
10656
- var script = document.createElement('script');
10657
- script.src = "".concat(V3_URL).concat(queryString);
10658
- var headOrBody = document.head || document.body;
10659
-
10660
- if (!headOrBody) {
10661
- throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');
10662
- }
10663
-
10664
- headOrBody.appendChild(script);
10665
- return script;
10666
- };
10667
-
10668
- var registerWrapper = function registerWrapper(stripe, startTime) {
10669
- if (!stripe || !stripe._registerWrapper) {
10670
- return;
10671
- }
10672
-
10673
- stripe._registerWrapper({
10674
- name: 'stripe-js',
10675
- version: "1.21.1",
10676
- startTime: startTime
10677
- });
10678
- };
10679
-
10680
- var stripePromise = null;
10681
- var loadScript = function loadScript(params) {
10682
- // Ensure that we only attempt to load Stripe.js at most once
10683
- if (stripePromise !== null) {
10684
- return stripePromise;
10685
- }
10686
-
10687
- stripePromise = new Promise(function (resolve, reject) {
10688
- if (typeof window === 'undefined') {
10689
- // Resolve to null when imported server side. This makes the module
10690
- // safe to import in an isomorphic code base.
10691
- resolve(null);
10692
- return;
10693
- }
10694
-
10695
- if (window.Stripe && params) {
10696
- console.warn(EXISTING_SCRIPT_MESSAGE);
10697
- }
10698
-
10699
- if (window.Stripe) {
10700
- resolve(window.Stripe);
10701
- return;
10702
- }
10703
-
10704
- try {
10705
- var script = findScript();
10706
-
10707
- if (script && params) {
10708
- console.warn(EXISTING_SCRIPT_MESSAGE);
10709
- } else if (!script) {
10710
- script = injectScript(params);
10711
- }
10712
-
10713
- script.addEventListener('load', function () {
10714
- if (window.Stripe) {
10715
- resolve(window.Stripe);
10716
- } else {
10717
- reject(new Error('Stripe.js not available'));
10718
- }
10719
- });
10720
- script.addEventListener('error', function () {
10721
- reject(new Error('Failed to load Stripe.js'));
10722
- });
10723
- } catch (error) {
10724
- reject(error);
10725
- return;
10726
- }
10727
- });
10728
- return stripePromise;
10729
- };
10730
- var initStripe = function initStripe(maybeStripe, args, startTime) {
10731
- if (maybeStripe === null) {
10732
- return null;
10733
- }
10734
-
10735
- var stripe = maybeStripe.apply(undefined, args);
10736
- registerWrapper(stripe, startTime);
10737
- return stripe;
10738
- };
10739
- var validateLoadParams = function validateLoadParams(params) {
10740
- var errorMessage = "invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(params), "\n");
10741
-
10742
- if (params === null || _typeof(params) !== 'object') {
10743
- throw new Error(errorMessage);
10744
- }
10745
-
10746
- if (Object.keys(params).length === 1 && typeof params.advancedFraudSignals === 'boolean') {
10747
- return params;
10748
- }
10749
-
10750
- throw new Error(errorMessage);
10751
- };
10752
-
10753
- var loadParams;
10754
- var loadStripeCalled = false;
10755
- var loadStripe = function loadStripe() {
10756
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
10757
- args[_key] = arguments[_key];
10758
- }
10759
-
10760
- loadStripeCalled = true;
10761
- var startTime = Date.now();
10762
- return loadScript(loadParams).then(function (maybeStripe) {
10763
- return initStripe(maybeStripe, args, startTime);
10764
- });
10765
- };
10766
-
10767
- loadStripe.setLoadParameters = function (params) {
10768
- if (loadStripeCalled) {
10769
- throw new Error('You cannot change load parameters after calling loadStripe');
10770
- }
10771
-
10772
- loadParams = validateLoadParams(params);
10773
- };
10774
-
10775
- exports.loadStripe = loadStripe;
10776
- });
10777
-
10778
- unwrapExports(pure$1);
10779
- pure$1.loadStripe;
10780
-
10781
- var pure = pure$1;
10782
- var pure_1 = pure.loadStripe;
10783
-
10784
- /**
10785
- * Extracts error message from the response error object
10786
- * @param {Object} error Error object
10787
- * @return {string}
10788
- */
10789
- const getErrorMessages = error => {
10790
- var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
10791
- if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
10792
- return error.error.message;
10793
- }
10794
- if (error !== null && error !== void 0 && (_error$response = error.response) !== null && _error$response !== void 0 && (_error$response$data = _error$response.data) !== null && _error$response$data !== void 0 && _error$response$data.message) {
10795
- var _error$response2, _error$response2$data;
10796
- return error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : _error$response2$data.message;
10797
- }
10798
- if (error !== null && error !== void 0 && (_error$response3 = error.response) !== null && _error$response3 !== void 0 && (_error$response3$data = _error$response3.data) !== null && _error$response3$data !== void 0 && (_error$response3$data2 = _error$response3$data.error) !== null && _error$response3$data2 !== void 0 && _error$response3$data2.message) {
10799
- var _error$response4, _error$response4$data, _error$response4$data2;
10800
- return error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.error) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2.message;
10801
- }
10802
- if (error !== null && error !== void 0 && (_error$response5 = error.response) !== null && _error$response5 !== void 0 && (_error$response5$data = _error$response5.data) !== null && _error$response5$data !== void 0 && _error$response5$data.errors) {
10803
- var _error$response6, _error$response6$data;
10804
- const errorMessages = [];
10805
-
10806
- // enumerable error (ex: validation errors)
10807
- Object.values(error === null || error === void 0 ? void 0 : (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : _error$response6$data.errors).forEach(_ref => {
10808
- let [errorMessage] = _ref;
10809
- errorMessages.push(errorMessage);
10810
- });
10811
-
10812
- // convert to multiline string
10813
- return errorMessages.join("\n");
10814
- }
10815
- if (error !== null && error !== void 0 && error.message) {
10816
- return error.message;
11099
+ // convert to multiline string
11100
+ return errorMessages.join("\n");
11101
+ }
11102
+ if (error !== null && error !== void 0 && error.message) {
11103
+ return error.message;
10817
11104
  }
10818
11105
  };
10819
11106
 
@@ -10931,16 +11218,12 @@ const initPaywalls = () => {
10931
11218
  };
10932
11219
  const loadPaymentSDKs = () => {
10933
11220
  // Lazy load stripe's SDK
10934
- const {
10935
- whenUserReady
10936
- } = usePelcro.getStore();
11221
+ usePelcro.getStore();
10937
11222
  const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
10938
11223
  const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
10939
- whenUserReady(() => {
10940
- if (!window.Stripe && !supportsVantiv && !supportsTap) {
10941
- pure_1(window.Pelcro.environment.stripe);
10942
- }
10943
- });
11224
+ if (!window.Stripe && !supportsVantiv && !supportsTap) {
11225
+ pure_1(window.Pelcro.environment.stripe);
11226
+ }
10944
11227
 
10945
11228
  // Load PayPal SDKs
10946
11229
  const supportsPaypal = Boolean(window.Pelcro.site.read().braintree_tokenization);
@@ -10987,12 +11270,12 @@ const initSecuritySdk = () => {
10987
11270
  };
10988
11271
  const initGATracking = () => {
10989
11272
  var _ReactGA$initialize, _ReactGA$plugin, _ReactGA$plugin$requi;
10990
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$initialize = ReactGA.initialize) === null || _ReactGA$initialize === void 0 ? void 0 : _ReactGA$initialize.call(ReactGA, window.Pelcro.site.read().google_analytics_id);
10991
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$plugin = ReactGA.plugin) === null || _ReactGA$plugin === void 0 ? void 0 : (_ReactGA$plugin$requi = _ReactGA$plugin.require) === null || _ReactGA$plugin$requi === void 0 ? void 0 : _ReactGA$plugin$requi.call(_ReactGA$plugin, "ecommerce");
11273
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$initialize = ReactGA$1.initialize) === null || _ReactGA$initialize === void 0 ? void 0 : _ReactGA$initialize.call(ReactGA$1, window.Pelcro.site.read().google_analytics_id);
11274
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$plugin = ReactGA$1.plugin) === null || _ReactGA$plugin === void 0 ? void 0 : (_ReactGA$plugin$requi = _ReactGA$plugin.require) === null || _ReactGA$plugin$requi === void 0 ? void 0 : _ReactGA$plugin$requi.call(_ReactGA$plugin, "ecommerce");
10992
11275
  };
10993
11276
  const dispatchModalDisplayEvents = modalName => {
10994
11277
  var _ReactGA$event, _modalName$replace, _modalName$replace2;
10995
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
11278
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
10996
11279
  category: "VIEWS",
10997
11280
  action: `${modalName === null || modalName === void 0 ? void 0 : (_modalName$replace = modalName.replace("pelcro-", "")) === null || _modalName$replace === void 0 ? void 0 : _modalName$replace.replaceAll("-", " ")} viewed`,
10998
11281
  nonInteraction: true
@@ -11091,6 +11374,9 @@ const initViewFromURL = () => {
11091
11374
  if (view === "plan-select") {
11092
11375
  return initSubscriptionFromURL();
11093
11376
  }
11377
+ if (view === "donation-select") {
11378
+ return initDonationFromURL();
11379
+ }
11094
11380
  if (view === "register") {
11095
11381
  const offlinePlanId = window.Pelcro.helpers.getURLParameter("plan_id");
11096
11382
  if (offlinePlanId) {
@@ -11173,6 +11459,61 @@ const initSubscriptionFromURL = () => {
11173
11459
  });
11174
11460
  };
11175
11461
 
11462
+ /**
11463
+ * Initializes the donation flow if 'product_id' & 'plan_id' params exist
11464
+ * with valid IDs. Otherwise, switches to the donation selection flow
11465
+ */
11466
+ const initDonationFromURL = () => {
11467
+ const {
11468
+ switchView,
11469
+ whenSiteReady,
11470
+ set
11471
+ } = usePelcro.getStore();
11472
+ whenSiteReady(() => {
11473
+ var _selectedProduct$plan2;
11474
+ const productsList = window.Pelcro.product.list();
11475
+ if (!(productsList !== null && productsList !== void 0 && productsList.length)) {
11476
+ return;
11477
+ }
11478
+ const [productId, planId, isGiftParam] = [window.Pelcro.helpers.getURLParameter("product_id"), window.Pelcro.helpers.getURLParameter("plan_id"), window.Pelcro.helpers.getURLParameter("is_gift")];
11479
+ const isGift = (isGiftParam === null || isGiftParam === void 0 ? void 0 : isGiftParam.toLowerCase()) === "true";
11480
+ const selectedProduct = productsList.find(product => product.id === Number(productId));
11481
+ const selectedPlan = selectedProduct === null || selectedProduct === void 0 ? void 0 : (_selectedProduct$plan2 = selectedProduct.plans) === null || _selectedProduct$plan2 === void 0 ? void 0 : _selectedProduct$plan2.find(plan => plan.id === Number(planId));
11482
+ set({
11483
+ product: selectedProduct,
11484
+ plan: selectedPlan,
11485
+ isGift
11486
+ });
11487
+ if (!selectedProduct || !selectedPlan) {
11488
+ set({
11489
+ isDonation: true
11490
+ });
11491
+ return switchView("donation-select");
11492
+ }
11493
+ const {
11494
+ isAuthenticated,
11495
+ switchToAddressView,
11496
+ switchToPaymentView
11497
+ } = usePelcro.getStore();
11498
+
11499
+ // if (!isAuthenticated()) {
11500
+ // return switchView("register");
11501
+ // }
11502
+
11503
+ // if (isGift) {
11504
+ // return switchView("gift-create");
11505
+ // }
11506
+
11507
+ // const requiresAddress = Boolean(selectedProduct.address_required);
11508
+ //
11509
+ // if (requiresAddress) {
11510
+ // return switchToAddressView();
11511
+ // }
11512
+
11513
+ return switchToPaymentView();
11514
+ });
11515
+ };
11516
+
11176
11517
  /**
11177
11518
  * Initializes offline subscription flow if 'plan_id' params exist
11178
11519
  * with valid IDs, Otherwise, ignore the param
@@ -11272,9 +11613,9 @@ const verifyEmailTokenFromUrl = () => {
11272
11613
  token: emailToken
11273
11614
  }, (err, res) => {
11274
11615
  if (err) {
11275
- return notify$1.error(getErrorMessages(err));
11616
+ return notify.error(getErrorMessages(err));
11276
11617
  }
11277
- return notify$1.success(translations.success);
11618
+ return notify.success(translations.success);
11278
11619
  });
11279
11620
  }, {
11280
11621
  once: true
@@ -11298,7 +11639,7 @@ const verifyLinkTokenFromUrl = () => {
11298
11639
  token: loginToken
11299
11640
  }, (err, res) => {
11300
11641
  if (err) {
11301
- return notify$1.error(getErrorMessages(err));
11642
+ return notify.error(getErrorMessages(err));
11302
11643
  }
11303
11644
  const {
11304
11645
  auth_token
@@ -11307,10 +11648,10 @@ const verifyLinkTokenFromUrl = () => {
11307
11648
  auth_token
11308
11649
  }, (err, res) => {
11309
11650
  if (err) {
11310
- return notify$1.error(getErrorMessages(err));
11651
+ return notify.error(getErrorMessages(err));
11311
11652
  }
11312
11653
  resetView();
11313
- return notify$1.success(translations.success);
11654
+ return notify.success(translations.success);
11314
11655
  });
11315
11656
  });
11316
11657
  }, {
@@ -11385,7 +11726,7 @@ const showInvoiceDetailsFromUrl = () => {
11385
11726
  const errorMessage = i18next.t("messages:invalidInvoice", {
11386
11727
  returnObjects: true
11387
11728
  });
11388
- return notify$1.error(errorMessage);
11729
+ return notify.error(errorMessage);
11389
11730
  }
11390
11731
  const {
11391
11732
  invoice
@@ -11394,7 +11735,7 @@ const showInvoiceDetailsFromUrl = () => {
11394
11735
  const errorMessage = i18next.t("messages:zeroTotalInvoice", {
11395
11736
  returnObjects: true
11396
11737
  });
11397
- return notify$1.error(errorMessage);
11738
+ return notify.error(errorMessage);
11398
11739
  }
11399
11740
  return switchView("invoice-details");
11400
11741
  });
@@ -11419,7 +11760,7 @@ const showSubscriptionManageMembersFromUrl = () => {
11419
11760
  const errorMessage = i18next.t("messages:invalidSubscription", {
11420
11761
  returnObjects: true
11421
11762
  });
11422
- return notify$1.error(errorMessage);
11763
+ return notify.error(errorMessage);
11423
11764
  }
11424
11765
  return switchView("manage-members");
11425
11766
  });
@@ -11444,8 +11785,18 @@ const PelcroModalController = _ref => {
11444
11785
  const {
11445
11786
  view,
11446
11787
  isAuthenticated,
11447
- whenSiteReady
11788
+ whenSiteReady,
11789
+ isDonation
11448
11790
  } = usePelcro();
11791
+ const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
11792
+ const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
11793
+ React__default.useEffect(() => {
11794
+ if (isDonation) {
11795
+ if (!window.Stripe && !supportsVantiv && !supportsTap) {
11796
+ pure_1(window.Pelcro.environment.stripe);
11797
+ }
11798
+ }
11799
+ }, [isDonation]);
11449
11800
  React__default.useEffect(() => {
11450
11801
  init$1();
11451
11802
  renderShopView(React__default.Children.map(children, child => child).find(_ref2 => {
@@ -11856,7 +12207,13 @@ const LoginContainer = _ref => {
11856
12207
  });
11857
12208
  onFailure(err);
11858
12209
  } else {
12210
+ var _ReactGA, _ReactGA$event;
11859
12211
  onSuccess(res);
12212
+ (_ReactGA = ReactGA) === null || _ReactGA === void 0 ? void 0 : (_ReactGA$event = _ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(_ReactGA, {
12213
+ category: "ACTIONS",
12214
+ action: "Logged in",
12215
+ nonInteraction: true
12216
+ });
11860
12217
  }
11861
12218
  });
11862
12219
  };
@@ -12246,7 +12603,7 @@ const Logout = props => {
12246
12603
  const handleLogout = () => {
12247
12604
  var _ReactGA$event;
12248
12605
  window.Pelcro.user.logout();
12249
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
12606
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
12250
12607
  category: "ACTIONS",
12251
12608
  action: "Logged out",
12252
12609
  nonInteraction: true
@@ -13833,7 +14190,7 @@ function RegisterModal(props) {
13833
14190
  };
13834
14191
  const handleAfterRegistrationLogic = () => {
13835
14192
  var _ReactGA$event, _window$Pelcro$site$r, _window$Pelcro$site$r2;
13836
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
14193
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
13837
14194
  category: "ACTIONS",
13838
14195
  action: "Registered",
13839
14196
  nonInteraction: true
@@ -13927,7 +14284,400 @@ function Radio(_ref) {
13927
14284
  /**
13928
14285
  *
13929
14286
  */
13930
- function SelectModalWithHook(props) {
14287
+ function SelectModalWithHook(props) {
14288
+ React__default.useEffect(() => {
14289
+ var _props$onDisplay;
14290
+ (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
14291
+ }, []);
14292
+ const {
14293
+ isGift,
14294
+ plan,
14295
+ product,
14296
+ isRenewingGift,
14297
+ switchView,
14298
+ resetView,
14299
+ view,
14300
+ set
14301
+ } = usePelcro();
14302
+ const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
14303
+ const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
14304
+ return /*#__PURE__*/React__default.createElement(SelectModalWithTrans, {
14305
+ isGift: isGift,
14306
+ disableGifting: isRenewingGift,
14307
+ plan: plan,
14308
+ product: product,
14309
+ onClose: () => {
14310
+ var _props$onClose;
14311
+ (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
14312
+ resetView();
14313
+ },
14314
+ setProductAndPlan: (product, plan, isGift) => set({
14315
+ product,
14316
+ plan,
14317
+ isGift
14318
+ }),
14319
+ setView: switchView,
14320
+ matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
14321
+ });
14322
+ }
14323
+ function productsWithMatchedTaggedFirst$1() {
14324
+ var _window$Pelcro$produc;
14325
+ const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
14326
+ const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
14327
+ const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
14328
+ return [productsThatMatchArticleTag, allProductsMinusMatched];
14329
+ }
14330
+ function productMatchPageLanguage(product) {
14331
+ if (!product) {
14332
+ return false;
14333
+ }
14334
+ if (product.language === null) {
14335
+ return true;
14336
+ }
14337
+ const siteLanguage = window.Pelcro.helpers.getHtmlLanguageAttribute();
14338
+ return product.language === siteLanguage;
14339
+ }
14340
+ SelectModalWithHook.viewId = "plan-select";
14341
+ class SelectModal extends Component {
14342
+ constructor(props) {
14343
+ super(props);
14344
+ _defineProperty$3(this, "componentDidMount", () => {
14345
+ if (this.props.product) {
14346
+ const {
14347
+ product
14348
+ } = this.props;
14349
+ const planList = product.plans;
14350
+ this.setState({
14351
+ product,
14352
+ planList,
14353
+ mode: "plan"
14354
+ });
14355
+ }
14356
+ if (this.props.plan) {
14357
+ const {
14358
+ plan
14359
+ } = this.props;
14360
+ this.setState({
14361
+ plan,
14362
+ disabled: false
14363
+ });
14364
+ }
14365
+ if (this.state.productList.length === 1) {
14366
+ this.setState({
14367
+ product: this.state.productList[0],
14368
+ planList: this.state.productList[0].plans,
14369
+ mode: "plan"
14370
+ });
14371
+ }
14372
+ if (this.state.productList.length === 0 && !window.Pelcro.user.isAuthenticated()) {
14373
+ this.props.setView("register");
14374
+ }
14375
+ document.addEventListener("keydown", this.handleSubmit);
14376
+ if (!document.querySelector("#pelcro-selection-view") || !document.querySelector(".pelcro-select-product-wrapper")) {
14377
+ var _window$Pelcro, _window$Pelcro$user, _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$user, _window$Pelcro4, _window$Pelcro4$site;
14378
+ const userCurrency = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$user = _window$Pelcro.user) === null || _window$Pelcro$user === void 0 ? void 0 : _window$Pelcro$user.read().currency;
14379
+ const userCountry = (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.location.countryCode;
14380
+ const userLanguage = (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : _window$Pelcro3$user.read().language;
14381
+ const productsMatchingUserCurrency = (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$site = _window$Pelcro4.site) === null || _window$Pelcro4$site === void 0 ? void 0 : _window$Pelcro4$site.read().products.filter(product => {
14382
+ const filteredPlans = product.plans.filter(plan => plan.currency === userCurrency || !userCurrency);
14383
+ if (filteredPlans.length) return filteredPlans;
14384
+ });
14385
+ const productsMatchingUserCountry = productsMatchingUserCurrency.filter(product => {
14386
+ const filteredPlans = product.plans.filter(plan => {
14387
+ var _plan$countries;
14388
+ return plan.countries && ((_plan$countries = plan.countries) === null || _plan$countries === void 0 ? void 0 : _plan$countries.includes(userCountry)) || !plan.countries || !plan.countries.length;
14389
+ });
14390
+ if (filteredPlans.length) return filteredPlans;
14391
+ });
14392
+ notifyBugsnag(() => {
14393
+ Bugsnag.notify("SelectModal - No data viewed", event => {
14394
+ var _window$Pelcro5, _window$Pelcro5$site, _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro7, _window$Pelcro7$uiSet, _window$Pelcro8, _this$props, _window$Pelcro9, _window$Pelcro9$helpe, _window$Pelcro10, _window$Pelcro10$site;
14395
+ event.addMetadata("MetaData", {
14396
+ site: (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$site = _window$Pelcro5.site) === null || _window$Pelcro5$site === void 0 ? void 0 : _window$Pelcro5$site.read(),
14397
+ user: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$user = _window$Pelcro6.user) === null || _window$Pelcro6$user === void 0 ? void 0 : _window$Pelcro6$user.read(),
14398
+ uiVersion: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$uiSet = _window$Pelcro7.uiSettings) === null || _window$Pelcro7$uiSet === void 0 ? void 0 : _window$Pelcro7$uiSet.uiVersion,
14399
+ environment: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : _window$Pelcro8.environment,
14400
+ matchingEntitlementsProps: (_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.matchingEntitlements,
14401
+ productListState: this.state.productList,
14402
+ methods: {
14403
+ productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst$1(),
14404
+ pelcroSDKProductsListMethod: window.Pelcro.product.list(),
14405
+ pelcroSDKGetByEntitlements: this.props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(this.props.matchingEntitlements) : null
14406
+ },
14407
+ userCurrency: userCurrency,
14408
+ userCountry: userCountry,
14409
+ userLanguage: userLanguage,
14410
+ siteLanguage: (_window$Pelcro9 = window.Pelcro) === null || _window$Pelcro9 === void 0 ? void 0 : (_window$Pelcro9$helpe = _window$Pelcro9.helpers) === null || _window$Pelcro9$helpe === void 0 ? void 0 : _window$Pelcro9$helpe.getHtmlLanguageAttribute(),
14411
+ products: (_window$Pelcro10 = window.Pelcro) === null || _window$Pelcro10 === void 0 ? void 0 : (_window$Pelcro10$site = _window$Pelcro10.site) === null || _window$Pelcro10$site === void 0 ? void 0 : _window$Pelcro10$site.read().products.length,
14412
+ currency_matching_filter: `${productsMatchingUserCurrency.length} Products Passed`,
14413
+ country_matching_filter: `${productsMatchingUserCountry.length} Products Passed`,
14414
+ language_matching_filter: `${productsMatchingUserCountry.filter(productMatchPageLanguage).length} Products Passed`
14415
+ });
14416
+ });
14417
+ });
14418
+ }
14419
+ });
14420
+ _defineProperty$3(this, "componentWillUnmount", () => {
14421
+ document.removeEventListener("keydown", this.handleSubmit);
14422
+ });
14423
+ _defineProperty$3(this, "handleSubmit", e => {
14424
+ if (e.key === "Enter" && !this.state.disabled) this.submitOption();
14425
+ });
14426
+ _defineProperty$3(this, "onProductChange", e => {
14427
+ const product = window.Pelcro.product.list()[e.target.selectedIndex];
14428
+ this.setState({
14429
+ product: product,
14430
+ plan: product.plans[0]
14431
+ });
14432
+ });
14433
+ _defineProperty$3(this, "onPlanChange", e => {
14434
+ this.setState({
14435
+ plan: this.state.product.plans[e.target.selectedIndex]
14436
+ });
14437
+ });
14438
+ _defineProperty$3(this, "onIsGiftChange", e => {
14439
+ this.setState({
14440
+ isGift: e.target.checked
14441
+ });
14442
+ });
14443
+ _defineProperty$3(this, "countStartPrice", arr => {
14444
+ let startingPlan = arr[0];
14445
+ for (const plan of arr) {
14446
+ if (plan.amount < startingPlan.amount) {
14447
+ startingPlan = plan;
14448
+ }
14449
+ }
14450
+ return `${startingPlan.amount_formatted}/${startingPlan.interval_count > 1 ? `${startingPlan.interval_count} ${startingPlan.interval}s` : `${startingPlan.interval}`}`;
14451
+ });
14452
+ _defineProperty$3(this, "renderOneProduct", (product, index, options) => {
14453
+ const isPlanMode = Boolean(this.state.mode === "plan");
14454
+ const productButtonLabel = isPlanMode ? this.locale("buttons.back") : this.locale("buttons.select");
14455
+ const productButtonCallback = isPlanMode ? this.goBack : this.selectProduct;
14456
+ return /*#__PURE__*/React__default.createElement("div", {
14457
+ key: product.id,
14458
+ className: `plc-flex plc-items-start plc-p-2 plc-mt-4 plc-space-x-3 plc-text-gray-900 plc-border-solid plc-rounded plc-border-primary-500 pelcro-select-product-wrapper ${options !== null && options !== void 0 && options.emphasize ? "plc-border-2" : "plc-border"}`
14459
+ }, product.image && /*#__PURE__*/React__default.createElement("img", {
14460
+ alt: `image of ${product.name}`,
14461
+ src: product.image,
14462
+ className: "plc-object-contain plc-w-1/4 pelcro-select-product-image"
14463
+ }), /*#__PURE__*/React__default.createElement("div", {
14464
+ className: `plc-flex plc-flex-wrap ${product.image ? "plc-w-3/4" : "plc-w-full"}`
14465
+ }, /*#__PURE__*/React__default.createElement("div", {
14466
+ className: "plc-w-full pelcro-select-product-header"
14467
+ }, /*#__PURE__*/React__default.createElement("p", {
14468
+ className: "plc-font-bold pelcro-select-product-title"
14469
+ }, product.name), /*#__PURE__*/React__default.createElement("p", {
14470
+ className: "plc-text-xs pelcro-select-product-description"
14471
+ }, product.description)), /*#__PURE__*/React__default.createElement("div", {
14472
+ className: "plc-flex plc-items-end plc-w-full plc-mt-3"
14473
+ }, product.plans && /*#__PURE__*/React__default.createElement("p", {
14474
+ className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
14475
+ }, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default.createElement(Button, Object.assign({
14476
+ onClick: productButtonCallback,
14477
+ "data-key": product.id,
14478
+ id: "pelcro-select-product-back-button",
14479
+ className: `plc-ml-auto plc-text-xs ${options !== null && options !== void 0 && options.emphasize ? "plc-bg-primary-700" : ""}`
14480
+ }, index === 0 && {
14481
+ autoFocus: true
14482
+ }), productButtonLabel))));
14483
+ });
14484
+ _defineProperty$3(this, "renderProducts", () => {
14485
+ const userDidSelectProduct = Boolean(this.state.mode === "plan");
14486
+ const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
14487
+ return productsToShow.map((product, index) => {
14488
+ if (product.plans.filter(plan => plan.type === "regular").length > 0) {
14489
+ return this.renderOneProduct(product, index);
14490
+ }
14491
+ });
14492
+ });
14493
+ _defineProperty$3(this, "renderMatchingProductsFirst", () => {
14494
+ const isPlanMode = Boolean(this.state.mode === "plan");
14495
+ if (isPlanMode) {
14496
+ return this.renderOneProduct(this.state.product);
14497
+ }
14498
+ const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst$1();
14499
+
14500
+ // Render normal products if there are no available matching products
14501
+ if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
14502
+ return this.renderProducts();
14503
+ }
14504
+ return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h3", {
14505
+ className: "plc-text-sm plc-font-semibold"
14506
+ }, this.locale("labels.restrictiveArticles.subscribeTo")), productsThatMatchArticleTag.map((product, index) => this.renderOneProduct(product, index, {
14507
+ emphasize: true
14508
+ })), (allProductsMinusMatched === null || allProductsMinusMatched === void 0 ? void 0 : allProductsMinusMatched.length) > 0 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("hr", {
14509
+ className: "plc-my-4"
14510
+ }), /*#__PURE__*/React__default.createElement("h3", {
14511
+ className: "plc-text-sm plc-font-semibold"
14512
+ }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
14513
+ });
14514
+ _defineProperty$3(this, "renderPlans", () => {
14515
+ return this.state.planList.map(plan => {
14516
+ const isChecked = this.state.plan.id === plan.id ? true : false;
14517
+ return /*#__PURE__*/React__default.createElement("div", {
14518
+ key: plan.id,
14519
+ className: "plc-p-2 plc-mx-3 plc-mt-2 plc-text-gray-900 plc-border plc-border-gray-400 plc-border-solid plc-rounded pelcro-select-plan-wrapper"
14520
+ }, /*#__PURE__*/React__default.createElement(Radio, {
14521
+ className: "plc-self-start pelcro-select-plan-radio",
14522
+ labelClassName: "plc-cursor-pointer plc-w-full",
14523
+ id: `pelcro-select-plan-${plan.id}`,
14524
+ name: "plan",
14525
+ checked: isChecked,
14526
+ "data-key": plan.id,
14527
+ onChange: this.selectPlan
14528
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", {
14529
+ className: "plc-font-bold pelcro-select-plan-title"
14530
+ }, plan.nickname), /*#__PURE__*/React__default.createElement("p", {
14531
+ className: "plc-text-xs pelcro-select-plan-description"
14532
+ }, plan.description)), /*#__PURE__*/React__default.createElement("p", {
14533
+ className: "plc-mt-3 plc-font-bold pelcro-select-plan-price"
14534
+ }, plan.amount_formatted)));
14535
+ });
14536
+ });
14537
+ _defineProperty$3(this, "selectProduct", e => {
14538
+ const id = e.target.dataset.key;
14539
+ for (const product of this.state.productList) {
14540
+ if (+product.id === +id) {
14541
+ var _this$state$plan;
14542
+ this.setState({
14543
+ product: product
14544
+ });
14545
+ this.setState({
14546
+ planList: product.plans.filter(plan => plan.type === "regular")
14547
+ });
14548
+ this.setState({
14549
+ mode: "plan"
14550
+ });
14551
+ const isSelectedPlanPartOfThisProduct = ((_this$state$plan = this.state.plan) === null || _this$state$plan === void 0 ? void 0 : _this$state$plan.product_id) === Number(product.id);
14552
+ if (isSelectedPlanPartOfThisProduct) {
14553
+ this.setState({
14554
+ disabled: false
14555
+ });
14556
+ }
14557
+ }
14558
+ }
14559
+ });
14560
+ _defineProperty$3(this, "selectPlan", e => {
14561
+ const id = e.target.dataset.key;
14562
+ for (const plan of this.state.planList) {
14563
+ if (+plan.id === +id) {
14564
+ plan.isCheked = true;
14565
+ this.setState({
14566
+ plan: plan
14567
+ });
14568
+ this.setState({
14569
+ disabled: false
14570
+ });
14571
+ } else {
14572
+ plan.isCheked = false;
14573
+ }
14574
+ }
14575
+ });
14576
+ _defineProperty$3(this, "goBack", () => {
14577
+ this.setState({
14578
+ disabled: true
14579
+ });
14580
+ this.setState({
14581
+ mode: "product"
14582
+ });
14583
+ });
14584
+ _defineProperty$3(this, "submitOption", () => {
14585
+ this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
14586
+ const {
14587
+ product,
14588
+ isGift
14589
+ } = this.state;
14590
+ const {
14591
+ setView
14592
+ } = this.props;
14593
+ const isAuthenticated = window.Pelcro.user.isAuthenticated();
14594
+ const {
14595
+ switchToAddressView,
14596
+ switchToPaymentView
14597
+ } = usePelcro.getStore();
14598
+ if (!isAuthenticated) {
14599
+ return setView("register");
14600
+ }
14601
+ if (isGift) {
14602
+ return setView("gift-create");
14603
+ }
14604
+ if (product.address_required) {
14605
+ return switchToAddressView();
14606
+ }
14607
+ return switchToPaymentView();
14608
+ });
14609
+ _defineProperty$3(this, "displayLoginView", () => {
14610
+ this.props.setView("login");
14611
+ });
14612
+ this.state = {
14613
+ product: {},
14614
+ plan: {},
14615
+ isGift: props.isGift,
14616
+ disabled: true,
14617
+ mode: "product",
14618
+ productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
14619
+ };
14620
+ this.product = this.props.product || window.Pelcro.paywall.getProduct();
14621
+ this.locale = this.props.t;
14622
+ this.closeButton = window.Pelcro.paywall.displayCloseButton();
14623
+ }
14624
+ render() {
14625
+ var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
14626
+ const {
14627
+ disableGifting
14628
+ } = this.props;
14629
+ if (this.state.mode === "product") {
14630
+ var _ReactGA$event;
14631
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
14632
+ category: "VIEWS",
14633
+ action: "Product Modal Viewed",
14634
+ nonInteraction: true
14635
+ });
14636
+ } else if (this.state.mode === "plan") {
14637
+ var _ReactGA$event2;
14638
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$1, {
14639
+ category: "VIEWS",
14640
+ action: "Plan Modal Viewed",
14641
+ nonInteraction: true
14642
+ });
14643
+ }
14644
+ return /*#__PURE__*/React__default.createElement(Modal, {
14645
+ hideCloseButton: !this.closeButton,
14646
+ onClose: this.props.onClose,
14647
+ id: "pelcro-selection-modal"
14648
+ }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement("div", {
14649
+ id: "pelcro-selection-view"
14650
+ }, /*#__PURE__*/React__default.createElement("div", {
14651
+ className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
14652
+ }, /*#__PURE__*/React__default.createElement("h4", {
14653
+ className: "plc-text-2xl plc-font-semibold"
14654
+ }, this.product && this.product.paywall.select_title || ((_window$Pelcro$produc2 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc2 === void 0 ? void 0 : _window$Pelcro$produc2.paywall.select_title)), /*#__PURE__*/React__default.createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_window$Pelcro$produc3 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc3 === void 0 ? void 0 : _window$Pelcro$produc3.paywall.select_subtitle))), /*#__PURE__*/React__default.createElement("div", {
14655
+ className: "pelcro-select-products-wrapper"
14656
+ }, (_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.restrictive_paywall_metatags_enabled ? this.renderMatchingProductsFirst() : this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
14657
+ className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
14658
+ }, this.renderPlans()), !disableGifting && /*#__PURE__*/React__default.createElement("div", {
14659
+ className: "plc-flex plc-justify-center plc-mt-2"
14660
+ }, /*#__PURE__*/React__default.createElement(Checkbox, {
14661
+ onChange: this.onIsGiftChange,
14662
+ checked: this.state.isGift,
14663
+ id: "pelcro-input-is-gift"
14664
+ }, this.locale("messages.checkbox"))), /*#__PURE__*/React__default.createElement(Button, {
14665
+ disabled: this.state.disabled,
14666
+ onClick: this.submitOption,
14667
+ id: "pelcro-submit",
14668
+ className: "plc-w-full plc-mt-2"
14669
+ }, this.locale("buttons.next"))))), /*#__PURE__*/React__default.createElement(ModalFooter, null, !window.Pelcro.user.isAuthenticated() && /*#__PURE__*/React__default.createElement("p", null, this.locale("messages.alreadyHaveAccount") + " ", /*#__PURE__*/React__default.createElement(Link, {
14670
+ id: "pelcro-link-login",
14671
+ onClick: this.displayLoginView
14672
+ }, this.locale("messages.loginHere"))), /*#__PURE__*/React__default.createElement(Authorship, null)));
14673
+ }
14674
+ }
14675
+ const SelectModalWithTrans = withTranslation("select")(SelectModal);
14676
+
14677
+ /**
14678
+ *
14679
+ */
14680
+ function DonationModalWithHook(props) {
13931
14681
  React__default.useEffect(() => {
13932
14682
  var _props$onDisplay;
13933
14683
  (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
@@ -13944,7 +14694,7 @@ function SelectModalWithHook(props) {
13944
14694
  } = usePelcro();
13945
14695
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
13946
14696
  const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
13947
- return /*#__PURE__*/React__default.createElement(SelectModalWithTrans, {
14697
+ return /*#__PURE__*/React__default.createElement(DonationModalWithTrans, {
13948
14698
  isGift: isGift,
13949
14699
  disableGifting: isRenewingGift,
13950
14700
  plan: plan,
@@ -13954,10 +14704,12 @@ function SelectModalWithHook(props) {
13954
14704
  (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
13955
14705
  resetView();
13956
14706
  },
13957
- setProductAndPlan: (product, plan, isGift) => set({
14707
+ setProductAndPlan: (product, plan, isGift, selectedDonationAmount, customDonationAmount) => set({
13958
14708
  product,
13959
14709
  plan,
13960
- isGift
14710
+ isGift,
14711
+ selectedDonationAmount,
14712
+ customDonationAmount
13961
14713
  }),
13962
14714
  setView: switchView,
13963
14715
  matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
@@ -13970,18 +14722,8 @@ function productsWithMatchedTaggedFirst() {
13970
14722
  const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
13971
14723
  return [productsThatMatchArticleTag, allProductsMinusMatched];
13972
14724
  }
13973
- function productMatchPageLanguage(product) {
13974
- if (!product) {
13975
- return false;
13976
- }
13977
- if (product.language === null) {
13978
- return true;
13979
- }
13980
- const siteLanguage = window.Pelcro.helpers.getHtmlLanguageAttribute();
13981
- return product.language === siteLanguage;
13982
- }
13983
- SelectModalWithHook.viewId = "plan-select";
13984
- class SelectModal extends Component {
14725
+ DonationModalWithHook.viewId = "donation-select";
14726
+ class DonationModal extends Component {
13985
14727
  constructor(props) {
13986
14728
  super(props);
13987
14729
  _defineProperty$3(this, "componentDidMount", () => {
@@ -14012,53 +14754,39 @@ class SelectModal extends Component {
14012
14754
  mode: "plan"
14013
14755
  });
14014
14756
  }
14015
- if (this.state.productList.length === 0 && !window.Pelcro.user.isAuthenticated()) {
14016
- this.props.setView("register");
14017
- }
14757
+
14758
+ // if (
14759
+ // this.state.productList.length === 0 &&
14760
+ // !window.Pelcro.user.isAuthenticated()
14761
+ // ) {
14762
+ // this.props.setView("register");
14763
+ // }
14764
+
14018
14765
  document.addEventListener("keydown", this.handleSubmit);
14019
14766
  if (!document.querySelector("#pelcro-selection-view") || !document.querySelector(".pelcro-select-product-wrapper")) {
14020
14767
  var _window$Pelcro, _window$Pelcro$user, _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$user, _window$Pelcro4, _window$Pelcro4$site;
14021
14768
  const userCurrency = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$user = _window$Pelcro.user) === null || _window$Pelcro$user === void 0 ? void 0 : _window$Pelcro$user.read().currency;
14022
14769
  const userCountry = (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.location.countryCode;
14023
- const userLanguage = (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : _window$Pelcro3$user.read().language;
14770
+ (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : _window$Pelcro3$user.read().language;
14024
14771
  const productsMatchingUserCurrency = (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$site = _window$Pelcro4.site) === null || _window$Pelcro4$site === void 0 ? void 0 : _window$Pelcro4$site.read().products.filter(product => {
14025
14772
  const filteredPlans = product.plans.filter(plan => plan.currency === userCurrency || !userCurrency);
14026
14773
  if (filteredPlans.length) return filteredPlans;
14027
14774
  });
14028
- const productsMatchingUserCountry = productsMatchingUserCurrency.filter(product => {
14775
+ productsMatchingUserCurrency.filter(product => {
14029
14776
  const filteredPlans = product.plans.filter(plan => {
14030
14777
  var _plan$countries;
14031
14778
  return plan.countries && ((_plan$countries = plan.countries) === null || _plan$countries === void 0 ? void 0 : _plan$countries.includes(userCountry)) || !plan.countries || !plan.countries.length;
14032
14779
  });
14033
14780
  if (filteredPlans.length) return filteredPlans;
14034
14781
  });
14035
- notifyBugsnag(() => {
14036
- Bugsnag.notify("SelectModal - No data viewed", event => {
14037
- var _window$Pelcro5, _window$Pelcro5$site, _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro7, _window$Pelcro7$uiSet, _window$Pelcro8, _this$props, _window$Pelcro9, _window$Pelcro9$helpe, _window$Pelcro10, _window$Pelcro10$site;
14038
- event.addMetadata("MetaData", {
14039
- site: (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$site = _window$Pelcro5.site) === null || _window$Pelcro5$site === void 0 ? void 0 : _window$Pelcro5$site.read(),
14040
- user: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$user = _window$Pelcro6.user) === null || _window$Pelcro6$user === void 0 ? void 0 : _window$Pelcro6$user.read(),
14041
- uiVersion: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$uiSet = _window$Pelcro7.uiSettings) === null || _window$Pelcro7$uiSet === void 0 ? void 0 : _window$Pelcro7$uiSet.uiVersion,
14042
- environment: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : _window$Pelcro8.environment,
14043
- matchingEntitlementsProps: (_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.matchingEntitlements,
14044
- productListState: this.state.productList,
14045
- methods: {
14046
- productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst(),
14047
- pelcroSDKProductsListMethod: window.Pelcro.product.list(),
14048
- pelcroSDKGetByEntitlements: this.props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(this.props.matchingEntitlements) : null
14049
- },
14050
- userCurrency: userCurrency,
14051
- userCountry: userCountry,
14052
- userLanguage: userLanguage,
14053
- siteLanguage: (_window$Pelcro9 = window.Pelcro) === null || _window$Pelcro9 === void 0 ? void 0 : (_window$Pelcro9$helpe = _window$Pelcro9.helpers) === null || _window$Pelcro9$helpe === void 0 ? void 0 : _window$Pelcro9$helpe.getHtmlLanguageAttribute(),
14054
- products: (_window$Pelcro10 = window.Pelcro) === null || _window$Pelcro10 === void 0 ? void 0 : (_window$Pelcro10$site = _window$Pelcro10.site) === null || _window$Pelcro10$site === void 0 ? void 0 : _window$Pelcro10$site.read().products.length,
14055
- currency_matching_filter: `${productsMatchingUserCurrency.length} Products Passed`,
14056
- country_matching_filter: `${productsMatchingUserCountry.length} Products Passed`,
14057
- language_matching_filter: `${productsMatchingUserCountry.filter(productMatchPageLanguage).length} Products Passed`
14058
- });
14059
- });
14782
+ }
14783
+ });
14784
+ _defineProperty$3(this, "componentDidUpdate", (prevProps, prevState) => {
14785
+ var _this$state$planList;
14786
+ if (((_this$state$planList = this.state.planList) === null || _this$state$planList === void 0 ? void 0 : _this$state$planList.length) === 1 && this.state.plan !== this.state.planList[0]) {
14787
+ this.setState({
14788
+ plan: this.state.planList[0]
14060
14789
  });
14061
- console.log("bugsnag Triggered");
14062
14790
  }
14063
14791
  });
14064
14792
  _defineProperty$3(this, "componentWillUnmount", () => {
@@ -14114,9 +14842,7 @@ class SelectModal extends Component {
14114
14842
  className: "plc-text-xs pelcro-select-product-description"
14115
14843
  }, product.description)), /*#__PURE__*/React__default.createElement("div", {
14116
14844
  className: "plc-flex plc-items-end plc-w-full plc-mt-3"
14117
- }, product.plans && /*#__PURE__*/React__default.createElement("p", {
14118
- className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
14119
- }, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default.createElement(Button, Object.assign({
14845
+ }, /*#__PURE__*/React__default.createElement(Button, Object.assign({
14120
14846
  onClick: productButtonCallback,
14121
14847
  "data-key": product.id,
14122
14848
  id: "pelcro-select-product-back-button",
@@ -14156,24 +14882,90 @@ class SelectModal extends Component {
14156
14882
  _defineProperty$3(this, "renderPlans", () => {
14157
14883
  return this.state.planList.map(plan => {
14158
14884
  const isChecked = this.state.plan.id === plan.id ? true : false;
14885
+ let planDetails = /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
14886
+ className: "plc-bg-gray-100 plc-rounded-md plc-p-3 plc-mt-3 plc-text-sm plc-flex plc-items-center"
14887
+ }, /*#__PURE__*/React__default.createElement("div", {
14888
+ className: "plc-flex plc-items-center plc-flex-1"
14889
+ }, "Auto renew:", " ", /*#__PURE__*/React__default.createElement("span", {
14890
+ className: "plc-inline-flex plc-w-6 plc-ml-1"
14891
+ }, plan.auto_renew ? /*#__PURE__*/React__default.createElement(SvgCheck, {
14892
+ className: "plc-text-green-500"
14893
+ }) : /*#__PURE__*/React__default.createElement(SvgXIcon, {
14894
+ className: "plc-text-red-500"
14895
+ })), " "), /*#__PURE__*/React__default.createElement("div", {
14896
+ className: "plc-flex plc-items-center plc-flex-1"
14897
+ }, "Renewed every:", " ", /*#__PURE__*/React__default.createElement("span", {
14898
+ className: "plc-inline-flex plc-w-6 plc-ml-1 plc-font-bold plc-capitalize"
14899
+ }, plan.interval || "-"))), plan.preset_donation_values && /*#__PURE__*/React__default.createElement("div", {
14900
+ className: "plc-mt-3 plc-pt-3 plc-border-t plc-border-gray-200"
14901
+ }, /*#__PURE__*/React__default.createElement("h5", {
14902
+ className: "plc-mb-4 plc-font-medium plc-text-center"
14903
+ }, "Select amount"), /*#__PURE__*/React__default.createElement("ul", {
14904
+ className: "plc-grid plc-grid-cols-2 plc-gap-3"
14905
+ }, plan.preset_donation_values.map(value => /*#__PURE__*/React__default.createElement("li", {
14906
+ key: value
14907
+ }, /*#__PURE__*/React__default.createElement("button", {
14908
+ className: `plc-bg-white plc-rounded-md plc-flex plc-items-center plc-justify-center plc-text-lg plc-w-full plc-min-h-16 focus:plc-outline-none ${isChecked && +this.state.selectedDonationAmount === +value ? "plc-border-primary-500 plc-text-primary-900 plc-border-2" : "plc-border-gray-200 plc-text-gray-900 plc-border"}`,
14909
+ onClick: () => {
14910
+ this.setState({
14911
+ selectedDonationAmount: +value,
14912
+ customDonationAmount: "",
14913
+ disabled: false
14914
+ });
14915
+ }
14916
+ }, /*#__PURE__*/React__default.createElement("span", {
14917
+ className: "plc-font-bold plc-mr-1"
14918
+ }, value), /*#__PURE__*/React__default.createElement("span", {
14919
+ className: "plc-uppercase"
14920
+ }, plan === null || plan === void 0 ? void 0 : plan.currency))))), /*#__PURE__*/React__default.createElement("div", {
14921
+ className: "plc-relative plc-py-3 plc-mt-3"
14922
+ }, /*#__PURE__*/React__default.createElement("hr", null), " ", /*#__PURE__*/React__default.createElement("span", {
14923
+ className: "plc-absolute plc-top-1/2 plc-left-1/2 plc-transform plc--translate-x-1/2 plc--translate-y-1/2 plc-leading-none plc-bg-white plc-px-2"
14924
+ }, "or"))), /*#__PURE__*/React__default.createElement("div", {
14925
+ className: "plc-relative plc-mt-3"
14926
+ }, /*#__PURE__*/React__default.createElement(Input, {
14927
+ type: "number",
14928
+ value: this.state.customDonationAmount,
14929
+ onChange: e => {
14930
+ if (+e.target.value > 0) {
14931
+ this.setState({
14932
+ customDonationAmount: +e.target.value,
14933
+ selectedDonationAmount: null,
14934
+ disabled: false
14935
+ });
14936
+ } else {
14937
+ this.setState({
14938
+ customDonationAmount: ""
14939
+ });
14940
+ this.setState({
14941
+ disabled: true
14942
+ });
14943
+ }
14944
+ },
14945
+ placeholder: "Donate a custom amount ...",
14946
+ className: "plc-pr-14",
14947
+ wrapperClassName: "plc-mb-0"
14948
+ }), /*#__PURE__*/React__default.createElement("span", {
14949
+ className: "plc-absolute plc-top-1/2 plc-transform plc--translate-y-1/2 plc-right-3 plc-pl-3 plc-border-l plc-border-gray-200 plc-uppercase plc-text-sm"
14950
+ }, plan.currency)));
14159
14951
  return /*#__PURE__*/React__default.createElement("div", {
14160
14952
  key: plan.id,
14161
- className: "plc-p-2 plc-mx-3 plc-mt-2 plc-text-gray-900 plc-border plc-border-gray-400 plc-border-solid plc-rounded pelcro-select-plan-wrapper"
14953
+ className: `plc-p-2 plc-mx-3 plc-mt-2 plc-text-gray-900 plc-border-solid plc-rounded pelcro-select-plan-wrapper ${isChecked ? "plc-border-primary-500 plc-border-2" : "plc-border-gray-400 plc-border "}`
14162
14954
  }, /*#__PURE__*/React__default.createElement(Radio, {
14163
- className: "plc-self-start pelcro-select-plan-radio",
14164
- labelClassName: "plc-cursor-pointer plc-w-full",
14955
+ className: "plc-self-start pelcro-select-plan-radio plc-hidden",
14956
+ labelClassName: "plc-cursor-pointer plc-w-full plc-ml-0",
14165
14957
  id: `pelcro-select-plan-${plan.id}`,
14166
14958
  name: "plan",
14167
14959
  checked: isChecked,
14168
14960
  "data-key": plan.id,
14169
14961
  onChange: this.selectPlan
14170
- }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", {
14962
+ }, /*#__PURE__*/React__default.createElement("div", {
14963
+ className: "plc-text-center"
14964
+ }, /*#__PURE__*/React__default.createElement("p", {
14171
14965
  className: "plc-font-bold pelcro-select-plan-title"
14172
14966
  }, plan.nickname), /*#__PURE__*/React__default.createElement("p", {
14173
14967
  className: "plc-text-xs pelcro-select-plan-description"
14174
- }, plan.description)), /*#__PURE__*/React__default.createElement("p", {
14175
- className: "plc-mt-3 plc-font-bold pelcro-select-plan-price"
14176
- }, plan.amount_formatted)));
14968
+ }, plan.description))), isChecked && planDetails);
14177
14969
  });
14178
14970
  });
14179
14971
  _defineProperty$3(this, "selectProduct", e => {
@@ -14181,13 +14973,15 @@ class SelectModal extends Component {
14181
14973
  for (const product of this.state.productList) {
14182
14974
  if (+product.id === +id) {
14183
14975
  var _this$state$plan;
14976
+ const planList = product.plans.filter(plan => plan.type === "donation");
14977
+ if (planList.length === 1) {
14978
+ this.setState({
14979
+ plan: planList[0]
14980
+ });
14981
+ }
14184
14982
  this.setState({
14185
- product: product
14186
- });
14187
- this.setState({
14188
- planList: product.plans
14189
- });
14190
- this.setState({
14983
+ product: product,
14984
+ planList: planList,
14191
14985
  mode: "plan"
14192
14986
  });
14193
14987
  const isSelectedPlanPartOfThisProduct = ((_this$state$plan = this.state.plan) === null || _this$state$plan === void 0 ? void 0 : _this$state$plan.product_id) === Number(product.id);
@@ -14200,6 +14994,12 @@ class SelectModal extends Component {
14200
14994
  }
14201
14995
  });
14202
14996
  _defineProperty$3(this, "selectPlan", e => {
14997
+ this.setState({
14998
+ selectedDonationAmount: null
14999
+ });
15000
+ this.setState({
15001
+ disabled: true
15002
+ });
14203
15003
  const id = e.target.dataset.key;
14204
15004
  for (const plan of this.state.planList) {
14205
15005
  if (+plan.id === +id) {
@@ -14207,9 +15007,6 @@ class SelectModal extends Component {
14207
15007
  this.setState({
14208
15008
  plan: plan
14209
15009
  });
14210
- this.setState({
14211
- disabled: false
14212
- });
14213
15010
  } else {
14214
15011
  plan.isCheked = false;
14215
15012
  }
@@ -14224,7 +15021,7 @@ class SelectModal extends Component {
14224
15021
  });
14225
15022
  });
14226
15023
  _defineProperty$3(this, "submitOption", () => {
14227
- this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
15024
+ this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift, this.state.selectedDonationAmount, this.state.customDonationAmount);
14228
15025
  const {
14229
15026
  product,
14230
15027
  isGift
@@ -14237,12 +15034,14 @@ class SelectModal extends Component {
14237
15034
  switchToAddressView,
14238
15035
  switchToPaymentView
14239
15036
  } = usePelcro.getStore();
14240
- if (!isAuthenticated) {
15037
+ if (!isAuthenticated && product.address_required) {
14241
15038
  return setView("register");
14242
15039
  }
14243
- if (isGift) {
14244
- return setView("gift-create");
14245
- }
15040
+
15041
+ // if (isGift) {
15042
+ // return setView("gift-create");
15043
+ // }
15044
+
14246
15045
  if (product.address_required) {
14247
15046
  return switchToAddressView();
14248
15047
  }
@@ -14251,13 +15050,16 @@ class SelectModal extends Component {
14251
15050
  _defineProperty$3(this, "displayLoginView", () => {
14252
15051
  this.props.setView("login");
14253
15052
  });
15053
+ const productList = props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements).filter(product => product.has_donation_plans === true) : window.Pelcro.product.list().filter(product => product.has_donation_plans === true);
14254
15054
  this.state = {
14255
15055
  product: {},
14256
15056
  plan: {},
14257
15057
  isGift: props.isGift,
14258
15058
  disabled: true,
14259
15059
  mode: "product",
14260
- productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
15060
+ productList: productList,
15061
+ selectedDonationAmount: null,
15062
+ customDonationAmount: ""
14261
15063
  };
14262
15064
  this.product = this.props.product || window.Pelcro.paywall.getProduct();
14263
15065
  this.locale = this.props.t;
@@ -14265,19 +15067,17 @@ class SelectModal extends Component {
14265
15067
  }
14266
15068
  render() {
14267
15069
  var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
14268
- const {
14269
- disableGifting
14270
- } = this.props;
15070
+ this.props;
14271
15071
  if (this.state.mode === "product") {
14272
15072
  var _ReactGA$event;
14273
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
15073
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
14274
15074
  category: "VIEWS",
14275
15075
  action: "Product Modal Viewed",
14276
15076
  nonInteraction: true
14277
15077
  });
14278
15078
  } else if (this.state.mode === "plan") {
14279
15079
  var _ReactGA$event2;
14280
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
15080
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$1, {
14281
15081
  category: "VIEWS",
14282
15082
  action: "Plan Modal Viewed",
14283
15083
  nonInteraction: true
@@ -14296,25 +15096,16 @@ class SelectModal extends Component {
14296
15096
  }, this.product && this.product.paywall.select_title || ((_window$Pelcro$produc2 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc2 === void 0 ? void 0 : _window$Pelcro$produc2.paywall.select_title)), /*#__PURE__*/React__default.createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_window$Pelcro$produc3 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc3 === void 0 ? void 0 : _window$Pelcro$produc3.paywall.select_subtitle))), /*#__PURE__*/React__default.createElement("div", {
14297
15097
  className: "pelcro-select-products-wrapper"
14298
15098
  }, (_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.restrictive_paywall_metatags_enabled ? this.renderMatchingProductsFirst() : this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
14299
- className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
14300
- }, this.renderPlans()), !disableGifting && /*#__PURE__*/React__default.createElement("div", {
14301
- className: "plc-flex plc-justify-center plc-mt-2"
14302
- }, /*#__PURE__*/React__default.createElement(Checkbox, {
14303
- onChange: this.onIsGiftChange,
14304
- checked: this.state.isGift,
14305
- id: "pelcro-input-is-gift"
14306
- }, this.locale("messages.checkbox"))), /*#__PURE__*/React__default.createElement(Button, {
15099
+ className: "plc-overflow-y-scroll pelcro-select-plans-wrapper"
15100
+ }, this.renderPlans()), /*#__PURE__*/React__default.createElement(Button, {
14307
15101
  disabled: this.state.disabled,
14308
- onClick: this.submitOption,
15102
+ onClick: () => this.submitOption(),
14309
15103
  id: "pelcro-submit",
14310
15104
  className: "plc-w-full plc-mt-2"
14311
- }, this.locale("buttons.next"))))), /*#__PURE__*/React__default.createElement(ModalFooter, null, !window.Pelcro.user.isAuthenticated() && /*#__PURE__*/React__default.createElement("p", null, this.locale("messages.alreadyHaveAccount") + " ", /*#__PURE__*/React__default.createElement(Link, {
14312
- id: "pelcro-link-login",
14313
- onClick: this.displayLoginView
14314
- }, this.locale("messages.loginHere"))), /*#__PURE__*/React__default.createElement(Authorship, null)));
15105
+ }, this.locale("buttons.donate"))))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
14315
15106
  }
14316
15107
  }
14317
- const SelectModalWithTrans = withTranslation("select")(SelectModal);
15108
+ const DonationModalWithTrans = withTranslation("donation")(DonationModal);
14318
15109
 
14319
15110
  var Provider_1 = createCommonjsModule(function (module, exports) {
14320
15111
 
@@ -16526,11 +17317,15 @@ const initialState$k = {
16526
17317
  firstName: "",
16527
17318
  lastName: "",
16528
17319
  phone: "",
17320
+ email: "",
17321
+ password: "",
16529
17322
  firstNameError: null,
16530
17323
  lastNameError: null,
16531
17324
  phoneError: null,
17325
+ emailError: null,
16532
17326
  month: "",
16533
17327
  year: "",
17328
+ passwordError: null,
16534
17329
  alert: {
16535
17330
  type: "error",
16536
17331
  content: ""
@@ -16563,7 +17358,11 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16563
17358
  set,
16564
17359
  order,
16565
17360
  selectedPaymentMethodId,
16566
- couponCode
17361
+ couponCode,
17362
+ selectedDonationAmount,
17363
+ customDonationAmount,
17364
+ isAuthenticated,
17365
+ switchView
16567
17366
  } = usePelcro();
16568
17367
  const {
16569
17368
  whenUserReady
@@ -16839,7 +17638,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16839
17638
 
16840
17639
  /*====== Start Tap integration ========*/
16841
17640
  const submitUsingTap = state => {
16842
- var _ref3, _ref4, _ref5, _state$updatedPrice;
17641
+ var _ref3, _ref4, _getPlanAmount;
16843
17642
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
16844
17643
  if (isUsingExistingPaymentMethod) {
16845
17644
  // no need to create a new source using tap
@@ -16863,7 +17662,15 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16863
17662
  return total + item.price * item.quantity;
16864
17663
  }, 0);
16865
17664
  };
16866
- const totalAmount = (_ref3 = (_ref4 = (_ref5 = (_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 && _ref5 !== void 0 ? _ref5 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref4 !== void 0 ? _ref4 : getOrderItemsTotal()) !== null && _ref3 !== void 0 ? _ref3 : 10;
17665
+ function getPlanAmount() {
17666
+ if (state.updatedPrice) return state.updatedPrice;
17667
+ if (plan.type === "donation" && (selectedDonationAmount || customDonationAmount)) {
17668
+ return selectedDonationAmount ? selectedDonationAmount * plan.amount : customDonationAmount * plan.amount;
17669
+ } else {
17670
+ return plan.amount;
17671
+ }
17672
+ }
17673
+ const totalAmount = (_ref3 = (_ref4 = (_getPlanAmount = getPlanAmount()) !== null && _getPlanAmount !== void 0 ? _getPlanAmount : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref4 !== void 0 ? _ref4 : getOrderItemsTotal()) !== null && _ref3 !== void 0 ? _ref3 : 10;
16867
17674
  tapInstanceRef.current.createToken(tapInstanceCard.current).then(function (result) {
16868
17675
  if (result.error) {
16869
17676
  // Inform the user if there was an error
@@ -17342,24 +18149,32 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17342
18149
  }, [selectedPaymentMethodId]);
17343
18150
  const initPaymentRequest = (state, dispatch) => {
17344
18151
  if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
18152
+ function getPlanAmount() {
18153
+ if (state.updatedPrice) return state.updatedPrice;
18154
+ if (plan.type === "donation" && (selectedDonationAmount || customDonationAmount)) {
18155
+ return selectedDonationAmount ? selectedDonationAmount * plan.amount : customDonationAmount * plan.amount;
18156
+ } else {
18157
+ return plan.amount;
18158
+ }
18159
+ }
17345
18160
  try {
17346
18161
  const paymentRequest = stripe.paymentRequest({
17347
18162
  country: window.Pelcro.user.location.countryCode || "US",
17348
18163
  currency: plan.currency,
17349
18164
  total: {
17350
18165
  label: plan.nickname || plan.description,
17351
- amount: state.updatedPrice || plan.amount
18166
+ amount: getPlanAmount()
17352
18167
  }
17353
18168
  });
17354
18169
 
17355
18170
  // When Google pay / Apple pay source created
17356
- paymentRequest.on("source", _ref6 => {
18171
+ paymentRequest.on("source", _ref5 => {
17357
18172
  var _source$card;
17358
18173
  let {
17359
18174
  complete,
17360
18175
  source,
17361
18176
  ...data
17362
- } = _ref6;
18177
+ } = _ref5;
17363
18178
  dispatch({
17364
18179
  type: DISABLE_COUPON_BUTTON,
17365
18180
  payload: true
@@ -17374,11 +18189,11 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17374
18189
  });
17375
18190
  complete("success");
17376
18191
  if ((source === null || source === void 0 ? void 0 : (_source$card = source.card) === null || _source$card === void 0 ? void 0 : _source$card.three_d_secure) === "required") {
17377
- return generate3DSecureSource(source).then(_ref7 => {
18192
+ return generate3DSecureSource(source).then(_ref6 => {
17378
18193
  let {
17379
18194
  source,
17380
18195
  error
17381
- } = _ref7;
18196
+ } = _ref6;
17382
18197
  if (error) {
17383
18198
  return handlePaymentError(error);
17384
18199
  }
@@ -17979,12 +18794,12 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17979
18794
  const updatePaymentSource = (state, dispatch) => {
17980
18795
  return stripe.createSource({
17981
18796
  type: "card"
17982
- }).then(_ref8 => {
18797
+ }).then(_ref7 => {
17983
18798
  var _source$card2;
17984
18799
  let {
17985
18800
  source,
17986
18801
  error
17987
- } = _ref8;
18802
+ } = _ref7;
17988
18803
  if (error) {
17989
18804
  return handlePaymentError(error);
17990
18805
  }
@@ -18039,6 +18854,50 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18039
18854
  }
18040
18855
  });
18041
18856
  };
18857
+ const sendRegisterRequest = (state, callback) => {
18858
+ window.Pelcro.user.register({
18859
+ email: state.email,
18860
+ password: state.password
18861
+ }, (err, res) => {
18862
+ if (err) {
18863
+ var _err$response, _err$response$data;
18864
+ let {
18865
+ registered_on_other_sites,
18866
+ ...errors
18867
+ } = err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.errors;
18868
+ err.response.data.errors = {
18869
+ ...errors
18870
+ };
18871
+ let errorContent;
18872
+ if (getErrorMessages(err) === "This email is already in use.") {
18873
+ errorContent = /*#__PURE__*/React__default.createElement("p", null, "This email is already in use.", " ", /*#__PURE__*/React__default.createElement("button", {
18874
+ className: "plc-font-bold plc-underline hover:plc-no-underline",
18875
+ onClick: () => switchView("login")
18876
+ }, "Login to continue"));
18877
+ } else {
18878
+ errorContent = getErrorMessages(err);
18879
+ }
18880
+ dispatch({
18881
+ type: SHOW_ALERT,
18882
+ payload: {
18883
+ type: "error",
18884
+ content: errorContent
18885
+ }
18886
+ });
18887
+ dispatch({
18888
+ type: DISABLE_SUBMIT,
18889
+ payload: false
18890
+ });
18891
+ dispatch({
18892
+ type: LOADING,
18893
+ payload: false
18894
+ });
18895
+ onFailure(err);
18896
+ } else {
18897
+ callback();
18898
+ }
18899
+ });
18900
+ };
18042
18901
  const submitPayment = (state, dispatch) => {
18043
18902
  if (skipPayment && props !== null && props !== void 0 && props.freeOrders) {
18044
18903
  const isQuickPurchase = !Array.isArray(order);
@@ -18065,12 +18924,12 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18065
18924
  }
18066
18925
  stripe.createSource({
18067
18926
  type: "card"
18068
- }).then(_ref9 => {
18069
- var _ref10, _ref11, _state$updatedPrice2;
18927
+ }).then(_ref8 => {
18928
+ var _ref9, _ref10, _state$updatedPrice;
18070
18929
  let {
18071
18930
  source,
18072
18931
  error
18073
- } = _ref9;
18932
+ } = _ref8;
18074
18933
  if (error) {
18075
18934
  return handlePaymentError(error);
18076
18935
  }
@@ -18089,7 +18948,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18089
18948
  return total + item.price * item.quantity;
18090
18949
  }, 0);
18091
18950
  };
18092
- (_ref10 = (_ref11 = (_state$updatedPrice2 = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice2 !== void 0 ? _state$updatedPrice2 : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref11 !== void 0 ? _ref11 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref10 !== void 0 ? _ref10 : getOrderItemsTotal();
18951
+ (_ref9 = (_ref10 = (_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 && _ref10 !== void 0 ? _ref10 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref9 !== void 0 ? _ref9 : getOrderItemsTotal();
18093
18952
  return handlePayment(source);
18094
18953
  }).catch(error => {
18095
18954
  return handlePaymentError(error);
@@ -18300,25 +19159,47 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18300
19159
  return submitPayment(state);
18301
19160
  }
18302
19161
  if (getSiteCardProcessor() === "vantiv") {
18303
- return submitUsingVantiv(state);
19162
+ if (!isAuthenticated() && plan.type === "donation") {
19163
+ return sendRegisterRequest(state, () => submitUsingVantiv(state));
19164
+ } else {
19165
+ return submitUsingVantiv(state);
19166
+ }
18304
19167
  }
18305
19168
  if (getSiteCardProcessor() === "tap") {
18306
- return submitUsingTap(state);
19169
+ if (!isAuthenticated() && plan.type === "donation") {
19170
+ return sendRegisterRequest(state, () => submitUsingTap(state));
19171
+ } else {
19172
+ return submitUsingTap(state);
19173
+ }
19174
+ }
19175
+ if (getSiteCardProcessor() === "cybersource") {
19176
+ return submitUsingCybersource(state, dispatch);
18307
19177
  }
18308
19178
  if (getSiteCardProcessor() === "cybersource") {
18309
19179
  return submitUsingCybersource(state, dispatch);
18310
19180
  }
18311
19181
  if (selectedPaymentMethodId) {
18312
- // pay with selected method (source) if exists already
18313
- return handlePayment({
18314
- id: selectedPaymentMethodId,
18315
- isExistingSource: true
18316
- });
19182
+ if (!isAuthenticated() && plan.type === "donation") {
19183
+ return sendRegisterRequest(state, () => handlePayment({
19184
+ id: selectedPaymentMethodId,
19185
+ isExistingSource: true
19186
+ }));
19187
+ } else {
19188
+ // pay with selected method (source) if exists already
19189
+ return handlePayment({
19190
+ id: selectedPaymentMethodId,
19191
+ isExistingSource: true
19192
+ });
19193
+ }
18317
19194
  }
18318
19195
  if (type === "updatePaymentSource") {
18319
19196
  return updatePaymentSource(state, dispatch);
18320
19197
  }
18321
- submitPayment(state);
19198
+ if (!isAuthenticated() && plan.type === "donation") {
19199
+ return sendRegisterRequest(state, () => submitPayment(state));
19200
+ } else {
19201
+ return submitPayment(state);
19202
+ }
18322
19203
  });
18323
19204
  case HANDLE_PAYPAL_SUBSCRIPTION:
18324
19205
  return lib_5(state, (state, dispatch) => {
@@ -18403,6 +19284,18 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18403
19284
  phone: action.payload,
18404
19285
  phoneError: null
18405
19286
  });
19287
+ case SET_EMAIL:
19288
+ return lib_7({
19289
+ ...state,
19290
+ email: action.payload,
19291
+ emailError: null
19292
+ });
19293
+ case SET_PASSWORD:
19294
+ return lib_7({
19295
+ ...state,
19296
+ password: action.payload,
19297
+ passwordError: null
19298
+ });
18406
19299
  case SET_FIRST_NAME_ERROR:
18407
19300
  return lib_7({
18408
19301
  ...state,
@@ -18421,6 +19314,18 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18421
19314
  phoneError: action.payload,
18422
19315
  phone: null
18423
19316
  });
19317
+ case SET_EMAIL_ERROR:
19318
+ return lib_7({
19319
+ ...state,
19320
+ emailError: action.payload,
19321
+ email: ""
19322
+ });
19323
+ case SET_PASSWORD_ERROR:
19324
+ return lib_7({
19325
+ ...state,
19326
+ passwordError: action.payload,
19327
+ password: ""
19328
+ });
18424
19329
  case SHOW_ALERT:
18425
19330
  return lib_7({
18426
19331
  ...state,
@@ -18454,18 +19359,14 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18454
19359
  const UnwrappedForm = es_12(PaymentMethodContainerWithoutStripe);
18455
19360
  const PaymentMethodContainer = props => {
18456
19361
  const [isStripeLoaded, setIsStripeLoaded] = useState(Boolean(window.Stripe));
18457
- const {
18458
- whenUserReady
18459
- } = usePelcro.getStore();
19362
+ usePelcro.getStore();
18460
19363
  const cardProcessor = getSiteCardProcessor();
18461
19364
  useEffect(() => {
18462
- whenUserReady(() => {
18463
- if (!window.Stripe && cardProcessor === "stripe") {
18464
- document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
18465
- setIsStripeLoaded(true);
18466
- });
18467
- }
18468
- });
19365
+ if (!window.Stripe && cardProcessor === "stripe") {
19366
+ document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
19367
+ setIsStripeLoaded(true);
19368
+ });
19369
+ }
18469
19370
  }, []);
18470
19371
  if (isStripeLoaded) {
18471
19372
  return /*#__PURE__*/React__default.createElement(es_13, {
@@ -18758,13 +19659,15 @@ const DiscountedPrice = props => {
18758
19659
  };
18759
19660
 
18760
19661
  const SubmitPaymentMethod = _ref => {
18761
- var _plan$quantity, _window$Pelcro$site$r;
19662
+ var _plan$quantity, _plan$quantity2, _plan$quantity3, _window$Pelcro$site$r;
18762
19663
  let {
18763
19664
  onClick,
18764
19665
  ...otherProps
18765
19666
  } = _ref;
18766
19667
  const {
18767
- plan
19668
+ plan,
19669
+ selectedDonationAmount,
19670
+ customDonationAmount
18768
19671
  } = usePelcro();
18769
19672
  const {
18770
19673
  t
@@ -18775,6 +19678,8 @@ const SubmitPaymentMethod = _ref => {
18775
19678
  firstNameError,
18776
19679
  lastNameError,
18777
19680
  phoneError,
19681
+ emailError,
19682
+ passwordError,
18778
19683
  firstName,
18779
19684
  lastName,
18780
19685
  phone,
@@ -18785,7 +19690,7 @@ const SubmitPaymentMethod = _ref => {
18785
19690
  } = useContext(store$k);
18786
19691
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
18787
19692
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
18788
- const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
19693
+ const priceFormatted = (plan === null || plan === void 0 ? void 0 : plan.type) === "donation" && (selectedDonationAmount || customDonationAmount) ? getFormattedPriceByLocal(selectedDonationAmount ? selectedDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity2 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity2 !== void 0 ? _plan$quantity2 : 1) : customDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity3 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity3 !== void 0 ? _plan$quantity3 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage()) : getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
18789
19694
  const supportsTap = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tap_gateway_settings);
18790
19695
  const isUserFirstName = Boolean(window.Pelcro.user.read().first_name);
18791
19696
  const isUserLastName = Boolean(window.Pelcro.user.read().last_name);
@@ -18795,9 +19700,9 @@ const SubmitPaymentMethod = _ref => {
18795
19700
  if (supportsTap && isUserFirstName && isUserLastName && isUserPhone) {
18796
19701
  setDisabled(disableSubmit);
18797
19702
  } else {
18798
- setDisabled(disableSubmit || supportsTap && firstNameError || supportsTap && lastNameError || supportsTap && phoneError || supportsTap && !(firstName !== null && firstName !== void 0 && firstName.length) || supportsTap && !(lastName !== null && lastName !== void 0 && lastName.length) || supportsTap && !(phone !== null && phone !== void 0 && phone.length));
19703
+ setDisabled(disableSubmit || supportsTap && firstNameError || supportsTap && lastNameError || supportsTap && phoneError || supportsTap && !(firstName !== null && firstName !== void 0 && firstName.length) || supportsTap && !(lastName !== null && lastName !== void 0 && lastName.length) || supportsTap && !(phone !== null && phone !== void 0 && phone.length) || emailError || passwordError);
18799
19704
  }
18800
- }, [disableSubmit, firstNameError, lastNameError, phoneError, firstName, lastName, phone]);
19705
+ }, [disableSubmit, firstNameError, lastNameError, phoneError, firstName, lastName, phone, emailError, passwordError]);
18801
19706
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
18802
19707
  role: "submit",
18803
19708
  className: "plc-w-full plc-py-3",
@@ -19432,6 +20337,14 @@ const OrderCreateFreeButton = _ref => {
19432
20337
  }, otherProps), t("labels.submit"));
19433
20338
  };
19434
20339
 
20340
+ const DonationEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
20341
+ store: store$k
20342
+ }, props));
20343
+
20344
+ const DonationPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
20345
+ store: store$k
20346
+ }, props));
20347
+
19435
20348
  /**
19436
20349
  *
19437
20350
  */
@@ -19451,6 +20364,10 @@ function PaymentMethodView(_ref) {
19451
20364
  const {
19452
20365
  t
19453
20366
  } = useTranslation("checkoutForm");
20367
+ const {
20368
+ plan,
20369
+ isAuthenticated
20370
+ } = usePelcro();
19454
20371
  const cardProcessor = getSiteCardProcessor();
19455
20372
  const supportsVantiv = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings);
19456
20373
  const supportsTap = Boolean((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.tap_gateway_settings);
@@ -19508,6 +20425,17 @@ function PaymentMethodView(_ref) {
19508
20425
  errorId: "pelcro-input-phone-error",
19509
20426
  label: t("labels.phone"),
19510
20427
  required: true
20428
+ })), !isAuthenticated() && (plan === null || plan === void 0 ? void 0 : plan.type) === "donation" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(DonationEmail, {
20429
+ id: "pelcro-input-email",
20430
+ errorId: "pelcro-input-email-error",
20431
+ label: t("labels.email"),
20432
+ required: true,
20433
+ autoFocus: true
20434
+ }), /*#__PURE__*/React__default.createElement(DonationPassword, {
20435
+ id: "pelcro-input-password",
20436
+ errorId: "pelcro-input-password-error",
20437
+ label: t("labels.password"),
20438
+ required: true
19511
20439
  })), /*#__PURE__*/React__default.createElement(CheckoutForm, null), showCoupon && /*#__PURE__*/React__default.createElement("div", {
19512
20440
  className: "plc-mb-2"
19513
20441
  }, /*#__PURE__*/React__default.createElement(CouponCode, null), /*#__PURE__*/React__default.createElement(DiscountedPrice, null)), /*#__PURE__*/React__default.createElement(TaxAmount, null), /*#__PURE__*/React__default.createElement("div", {
@@ -19585,7 +20513,7 @@ function SubscriptionRenewModal(_ref) {
19585
20513
  const onSuccess = res => {
19586
20514
  var _otherProps$onSuccess, _ReactGA$event;
19587
20515
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
19588
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
20516
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
19589
20517
  category: "ACTIONS",
19590
20518
  action: "Renewed",
19591
20519
  nonInteraction: true
@@ -19595,7 +20523,7 @@ function SubscriptionRenewModal(_ref) {
19595
20523
  const onGiftRenewalSuccess = () => {
19596
20524
  var _otherProps$onGiftRen, _ReactGA$event2;
19597
20525
  (_otherProps$onGiftRen = otherProps.onGiftRenewalSuccess) === null || _otherProps$onGiftRen === void 0 ? void 0 : _otherProps$onGiftRen.call(otherProps);
19598
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
20526
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$1, {
19599
20527
  category: "ACTIONS",
19600
20528
  action: "Renewed Gift",
19601
20529
  nonInteraction: true
@@ -19800,7 +20728,7 @@ const SubscriptionCancelNowButton = _ref => {
19800
20728
  if (err) {
19801
20729
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
19802
20730
  }
19803
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
20731
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
19804
20732
  category: "ACTIONS",
19805
20733
  action: "Canceled",
19806
20734
  nonInteraction: true
@@ -19822,7 +20750,7 @@ const SubscriptionCancelNowButton = _ref => {
19822
20750
  switchView(null);
19823
20751
 
19824
20752
  //Show confirmation alert after closing the modal
19825
- notify$1.confirm((onSuccess, onFailure) => {
20753
+ notify.confirm((onSuccess, onFailure) => {
19826
20754
  cancelSubscription(payload, onSuccess, onFailure);
19827
20755
  }, {
19828
20756
  confirmMessage: t("messages.subCancellation.isSureToCancelNow"),
@@ -19870,7 +20798,7 @@ const SubscriptionCancelLaterButton = _ref => {
19870
20798
  if (err) {
19871
20799
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
19872
20800
  }
19873
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
20801
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
19874
20802
  category: "ACTIONS",
19875
20803
  action: "Canceled",
19876
20804
  nonInteraction: true
@@ -19892,7 +20820,7 @@ const SubscriptionCancelLaterButton = _ref => {
19892
20820
  switchView(null);
19893
20821
 
19894
20822
  //Show confirmation alert after closing the modal
19895
- notify$1.confirm((onSuccess, onFailure) => {
20823
+ notify.confirm((onSuccess, onFailure) => {
19896
20824
  cancelSubscription(payload, onSuccess, onFailure);
19897
20825
  }, {
19898
20826
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
@@ -20109,7 +21037,7 @@ const SubscriptionSuspendButton = _ref => {
20109
21037
  if (err) {
20110
21038
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
20111
21039
  }
20112
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
21040
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
20113
21041
  category: "ACTIONS",
20114
21042
  action: "Suspended",
20115
21043
  nonInteraction: true
@@ -20127,7 +21055,7 @@ const SubscriptionSuspendButton = _ref => {
20127
21055
  switchView(null);
20128
21056
 
20129
21057
  //Show confirmation alert after closing the modal
20130
- notify$1.confirm((onSuccess, onFailure) => {
21058
+ notify.confirm((onSuccess, onFailure) => {
20131
21059
  suspendSubscription(payload, onSuccess, onFailure);
20132
21060
  }, {
20133
21061
  confirmMessage: t("messages.subCancellation.isSureToSuspendNow"),
@@ -20847,12 +21775,14 @@ const SubscriptionCreateView = _ref => {
20847
21775
  } = useTranslation("checkoutForm");
20848
21776
  const {
20849
21777
  product,
20850
- plan
21778
+ plan,
21779
+ selectedDonationAmount,
21780
+ customDonationAmount
20851
21781
  } = usePelcro();
20852
21782
  const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
20853
21783
  const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
20854
21784
  const getPricingText = plan => {
20855
- var _plan$quantity;
21785
+ var _plan$quantity, _plan$quantity2, _plan$quantity3;
20856
21786
  const autoRenewed = plan.auto_renew;
20857
21787
  const {
20858
21788
  interval,
@@ -20862,7 +21792,7 @@ const SubscriptionCreateView = _ref => {
20862
21792
  interval,
20863
21793
  count: interval_count
20864
21794
  });
20865
- const priceFormatted = getFormattedPriceByLocal((plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
21795
+ const priceFormatted = plan.type === "donation" && (selectedDonationAmount || customDonationAmount) ? getFormattedPriceByLocal(selectedDonationAmount ? selectedDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1) : customDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity2 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity2 !== void 0 ? _plan$quantity2 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage()) : getFormattedPriceByLocal((plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity3 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity3 !== void 0 ? _plan$quantity3 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
20866
21796
  return /*#__PURE__*/React__default.createElement("p", {
20867
21797
  className: "plc-text-gray-600"
20868
21798
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -22185,7 +23115,7 @@ const AddressCreateContainer = _ref => {
22185
23115
  });
22186
23116
  return onFailure(err);
22187
23117
  }
22188
- notify$1.success(t("messages.addressUpdated"));
23118
+ notify.success(t("messages.addressUpdated"));
22189
23119
  return onMembershipAdressUpdateSuccess(res);
22190
23120
  });
22191
23121
  }
@@ -22957,6 +23887,7 @@ const AddressUpdateContainer = _ref => {
22957
23887
  });
22958
23888
  onFailure(err);
22959
23889
  } else {
23890
+ var _ReactGA, _ReactGA$event;
22960
23891
  dispatch({
22961
23892
  type: SHOW_ALERT,
22962
23893
  payload: {
@@ -22965,6 +23896,11 @@ const AddressUpdateContainer = _ref => {
22965
23896
  }
22966
23897
  });
22967
23898
  onSuccess(res);
23899
+ (_ReactGA = ReactGA) === null || _ReactGA === void 0 ? void 0 : (_ReactGA$event = _ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(_ReactGA, {
23900
+ category: "ACTIONS",
23901
+ action: "Updated address",
23902
+ nonInteraction: true
23903
+ });
22968
23904
  }
22969
23905
  });
22970
23906
  };
@@ -23492,7 +24428,7 @@ const PaymentMethodUpdateModal = props => {
23492
24428
  const onSuccess = res => {
23493
24429
  var _props$onSuccess, _ReactGA$event;
23494
24430
  (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
23495
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
24431
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
23496
24432
  category: "ACTIONS",
23497
24433
  action: "Updated payment card",
23498
24434
  nonInteraction: true
@@ -25058,6 +25994,16 @@ const GiftCreateContainer = _ref => {
25058
25994
  return onFailure();
25059
25995
  }
25060
25996
  }
25997
+ if (giftRecipient.giftMessage && !isStringValid(giftRecipient.giftMessage)) {
25998
+ dispatch({
25999
+ type: SHOW_ALERT,
26000
+ payload: {
26001
+ type: "error",
26002
+ content: t("gift.messages.giftMessageAllowedCharacters")
26003
+ }
26004
+ });
26005
+ return onFailure();
26006
+ }
25061
26007
  set({
25062
26008
  giftRecipient
25063
26009
  });
@@ -25665,7 +26611,7 @@ const AddressSelectContainer = _ref => {
25665
26611
  });
25666
26612
  return onFailure(err);
25667
26613
  }
25668
- notify$1.success(t("messages.addressUpdated"));
26614
+ notify.success(t("messages.addressUpdated"));
25669
26615
  return onMembershipAdressUpdateSuccess(res);
25670
26616
  });
25671
26617
  }
@@ -27436,7 +28382,7 @@ const SavedItems = _ref3 => {
27436
28382
  return;
27437
28383
  }
27438
28384
  setItems(response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.metadata);
27439
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
28385
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
27440
28386
  category: "ACTIONS",
27441
28387
  action: "Unsave/Unfollow",
27442
28388
  label: title
@@ -27624,7 +28570,7 @@ const SubscriptionsItems = _ref => {
27624
28570
  return switchView("email-verify");
27625
28571
  }
27626
28572
  onClose === null || onClose === void 0 ? void 0 : onClose();
27627
- notify$1.confirm((onSuccess, onFailure) => {
28573
+ notify.confirm((onSuccess, onFailure) => {
27628
28574
  cancelSubscription(sub.id, onSuccess, onFailure);
27629
28575
  }, {
27630
28576
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
@@ -27641,7 +28587,7 @@ const SubscriptionsItems = _ref => {
27641
28587
  if (userMustVerifyEmail()) {
27642
28588
  return switchView("email-verify");
27643
28589
  }
27644
- reactivateSubscription(sub.id);
28590
+ reactivateSubscription(sub.id, false);
27645
28591
  };
27646
28592
 
27647
28593
  // Renew click
@@ -27679,7 +28625,7 @@ const SubscriptionsItems = _ref => {
27679
28625
  return switchView("email-verify");
27680
28626
  }
27681
28627
  onClose === null || onClose === void 0 ? void 0 : onClose();
27682
- notify$1.confirm((onSuccess, onFailure) => {
28628
+ notify.confirm((onSuccess, onFailure) => {
27683
28629
  unSuspendSubscription(sub.id, onSuccess, onFailure);
27684
28630
  }, {
27685
28631
  confirmMessage: t("messages.subUnSuspend.isSureToUnSuspend"),
@@ -27761,7 +28707,7 @@ const SubscriptionsItems = _ref => {
27761
28707
  onClick: onCancelClick,
27762
28708
  disabled: disableSubmit,
27763
28709
  "data-key": sub.id
27764
- }, t("labels.unsubscribe")) : "", (sub === null || sub === void 0 ? void 0 : (_sub$plan = sub.plan) === null || _sub$plan === void 0 ? void 0 : _sub$plan.type) === 'membership' && /*#__PURE__*/React__default.createElement(Button, {
28710
+ }, t("labels.unsubscribe")) : "", (sub === null || sub === void 0 ? void 0 : (_sub$plan = sub.plan) === null || _sub$plan === void 0 ? void 0 : _sub$plan.type) === "membership" && /*#__PURE__*/React__default.createElement(Button, {
27765
28711
  variant: "ghost",
27766
28712
  className: "plc-text-blue-400 pelcro-dashboard-sub-manage-members-button",
27767
28713
  icon: /*#__PURE__*/React__default.createElement(SvgRefresh, null),
@@ -27808,7 +28754,10 @@ const SubscriptionsItems = _ref => {
27808
28754
  };
27809
28755
  function getNonDonationSubs() {
27810
28756
  var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
27811
- return (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => !sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
28757
+ return (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => {
28758
+ var _sub$plan2;
28759
+ return ((_sub$plan2 = sub.plan) === null || _sub$plan2 === void 0 ? void 0 : _sub$plan2.type) !== "donation";
28760
+ })) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
27812
28761
  }
27813
28762
  function isDateAfterToday(date) {
27814
28763
  const today = new Date().setHours(0, 0, 0, 0);
@@ -28096,6 +29045,7 @@ function SvgQrcode(props) {
28096
29045
 
28097
29046
  const DonationsMenu = _ref => {
28098
29047
  let {
29048
+ onClose,
28099
29049
  reactivateSubscription,
28100
29050
  disableSubmit,
28101
29051
  cancelSubscription
@@ -28107,10 +29057,10 @@ const DonationsMenu = _ref => {
28107
29057
  switchView,
28108
29058
  setSubscriptionToCancel
28109
29059
  } = usePelcro();
28110
- const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
29060
+ const donations = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
29061
+ console.log("Sub", sub);
28111
29062
  // Cancel button click handlers
28112
29063
  const onCancelClick = () => {
28113
- var _onClose;
28114
29064
  const isImmediateCancelationEnabled = window.Pelcro.site.read().cancel_settings.status;
28115
29065
  if (isImmediateCancelationEnabled) {
28116
29066
  setSubscriptionToCancel(sub.id);
@@ -28119,16 +29069,16 @@ const DonationsMenu = _ref => {
28119
29069
  if (userMustVerifyEmail()) {
28120
29070
  return switchView("email-verify");
28121
29071
  }
28122
- (_onClose = onClose) === null || _onClose === void 0 ? void 0 : _onClose();
29072
+ onClose === null || onClose === void 0 ? void 0 : onClose();
28123
29073
  notify.confirm((onSuccess, onFailure) => {
28124
29074
  cancelSubscription(sub.id, onSuccess, onFailure);
28125
29075
  }, {
28126
- confirmMessage: t("messages.subCancellation.isSureToCancel"),
28127
- loadingMessage: t("messages.subCancellation.loading"),
28128
- successMessage: t("messages.subCancellation.success"),
28129
- errorMessage: t("messages.subCancellation.error")
29076
+ confirmMessage: t("messages.donationCancellation.isSureToCancel"),
29077
+ loadingMessage: t("messages.donationCancellation.loading"),
29078
+ successMessage: t("messages.donationCancellation.success"),
29079
+ errorMessage: t("messages.donationCancellation.error")
28130
29080
  }, {
28131
- closeButtonLabel: t("labels.subCancellation.goBack")
29081
+ closeButtonLabel: t("labels.donationCancellation.goBack")
28132
29082
  });
28133
29083
  };
28134
29084
 
@@ -28137,7 +29087,7 @@ const DonationsMenu = _ref => {
28137
29087
  if (userMustVerifyEmail()) {
28138
29088
  return switchView("email-verify");
28139
29089
  }
28140
- reactivateSubscription(sub.id);
29090
+ reactivateSubscription(sub.id, true);
28141
29091
  };
28142
29092
  return /*#__PURE__*/React__default.createElement("tr", {
28143
29093
  key: sub.id,
@@ -28178,12 +29128,18 @@ const DonationsMenu = _ref => {
28178
29128
  className: "plc-w-3/12 "
28179
29129
  }, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
28180
29130
  className: "plc-h-4"
28181
- }), subscriptions));
29131
+ }), donations));
28182
29132
  };
28183
29133
  function getDonationSubs() {
28184
29134
  var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r, _window$Pelcro$user$r2;
28185
- const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
28186
- const canceledDonations = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
29135
+ const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => {
29136
+ var _sub$plan;
29137
+ return ((_sub$plan = sub.plan) === null || _sub$plan === void 0 ? void 0 : _sub$plan.type) === "donation";
29138
+ })) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
29139
+ const canceledDonations = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.filter(sub => {
29140
+ var _sub$plan2;
29141
+ return ((_sub$plan2 = sub.plan) === null || _sub$plan2 === void 0 ? void 0 : _sub$plan2.type) === "donation";
29142
+ })) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
28187
29143
  return [...donations, ...canceledDonations];
28188
29144
  }
28189
29145
  function formatStartDate(date) {
@@ -28447,7 +29403,7 @@ class Dashboard extends Component {
28447
29403
  window.Pelcro.insight.track("Modal Displayed", {
28448
29404
  name: "dashboard"
28449
29405
  });
28450
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
29406
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event = ReactGA$1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$1, {
28451
29407
  category: "VIEWS",
28452
29408
  action: "Dashboard Modal Viewed",
28453
29409
  nonInteraction: true
@@ -28483,7 +29439,7 @@ class Dashboard extends Component {
28483
29439
  if (err) {
28484
29440
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
28485
29441
  }
28486
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
29442
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$1, {
28487
29443
  category: "ACTIONS",
28488
29444
  action: "Canceled",
28489
29445
  nonInteraction: true
@@ -28501,7 +29457,7 @@ class Dashboard extends Component {
28501
29457
  if (err) {
28502
29458
  return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
28503
29459
  }
28504
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event3 = ReactGA.event) === null || _ReactGA$event3 === void 0 ? void 0 : _ReactGA$event3.call(ReactGA, {
29460
+ ReactGA$1 === null || ReactGA$1 === void 0 ? void 0 : (_ReactGA$event3 = ReactGA$1.event) === null || _ReactGA$event3 === void 0 ? void 0 : _ReactGA$event3.call(ReactGA$1, {
28505
29461
  category: "ACTIONS",
28506
29462
  action: "UnSuspended",
28507
29463
  nonInteraction: true
@@ -28572,7 +29528,7 @@ class Dashboard extends Component {
28572
29528
  const formattedRenewDate = new Intl.DateTimeFormat("en-CA").format(renewDate);
28573
29529
  return `${this.locale("labels.renewsOn")} ${formattedRenewDate}`;
28574
29530
  });
28575
- _defineProperty$3(this, "reactivateSubscription", subscription_id => {
29531
+ _defineProperty$3(this, "reactivateSubscription", (subscription_id, isDonation) => {
28576
29532
  // disable the Login button to prevent repeated clicks
28577
29533
  this.setState({
28578
29534
  disableSubmit: true
@@ -28586,9 +29542,17 @@ class Dashboard extends Component {
28586
29542
  });
28587
29543
  this.props.onClose();
28588
29544
  if (err) {
28589
- return notify$1.error(this.locale("messages.subReactivation.error"));
29545
+ if (isDonation) {
29546
+ return notify.error(this.locale("messages.donationReactivation.error"));
29547
+ } else {
29548
+ return notify.error(this.locale("messages.subReactivation.error"));
29549
+ }
29550
+ }
29551
+ if (isDonation) {
29552
+ return notify.success(this.locale("messages.donationReactivation.success"));
29553
+ } else {
29554
+ return notify.success(this.locale("messages.subReactivation.success"));
28590
29555
  }
28591
- return notify$1.success(this.locale("messages.subReactivation.success"));
28592
29556
  });
28593
29557
  });
28594
29558
  _defineProperty$3(this, "getSubscriptionStatus", sub => {
@@ -28950,6 +29914,7 @@ class Dashboard extends Component {
28950
29914
  }),
28951
29915
  title: this.locale("labels.donations"),
28952
29916
  content: /*#__PURE__*/React__default.createElement(DonationsMenu, {
29917
+ onClose: this.props.onClose,
28953
29918
  reactivateSubscription: this.reactivateSubscription,
28954
29919
  disableSubmit: this.state.disableSubmit,
28955
29920
  cancelSubscription: this.cancelSubscription
@@ -28991,8 +29956,14 @@ function hasInvoices() {
28991
29956
  }
28992
29957
  function hasDonationSubs() {
28993
29958
  var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
28994
- const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
28995
- const canceledDonations = (_window$Pelcro$user$r4 = (_window$Pelcro$user$r5 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
29959
+ const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => {
29960
+ var _sub$plan;
29961
+ return ((_sub$plan = sub.plan) === null || _sub$plan === void 0 ? void 0 : _sub$plan.type) === "donation";
29962
+ })) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
29963
+ const canceledDonations = (_window$Pelcro$user$r4 = (_window$Pelcro$user$r5 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.filter(sub => {
29964
+ var _sub$plan2;
29965
+ return ((_sub$plan2 = sub.plan) === null || _sub$plan2 === void 0 ? void 0 : _sub$plan2.type) === "donation";
29966
+ })) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
28996
29967
  return donations.length > 0 || canceledDonations.length > 0;
28997
29968
  }
28998
29969
  function hasActiveMemberships() {
@@ -31157,7 +32128,7 @@ function VerifyLinkTokenModal(_ref) {
31157
32128
  var _props$onSuccess;
31158
32129
  (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
31159
32130
  resetView();
31160
- notify$1.success(t("messages.success"));
32131
+ notify.success(t("messages.success"));
31161
32132
  };
31162
32133
  return /*#__PURE__*/React__default.createElement(Modal, {
31163
32134
  id: "pelcro-login-modal",
@@ -32815,4 +33786,4 @@ const QrCodeModal = _ref => {
32815
33786
  };
32816
33787
  QrCodeModal.viewId = "qrcode";
32817
33788
 
32818
- export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankAuthenticationSuccess, 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, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateFreeButton, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, 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, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateFreePlanButton, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionManageMembersButton, SubscriptionManageMembersContainer, SubscriptionManageMembersEmails, SubscriptionManageMembersList, SubscriptionManageMembersModal, SubscriptionManageMembersView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserNameInput, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateTin, UserUpdateUsername, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify$1 as notify, unauthenticatedButtons, usePelcro };
33789
+ export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankAuthenticationSuccess, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, DonationModalWithHook as DonationModal, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateFreeButton, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, 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, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateFreePlanButton, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionManageMembersButton, SubscriptionManageMembersContainer, SubscriptionManageMembersEmails, SubscriptionManageMembersList, SubscriptionManageMembersModal, SubscriptionManageMembersView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserNameInput, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateTin, UserUpdateUsername, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };