@nextblock-cms/ecom 0.15.8 → 0.15.9
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/index.cjs.js +1 -1
- package/index.d.ts +1 -0
- package/index.es.js +94 -90
- package/lib/PaymentReadinessProvider.cjs.js +1 -0
- package/lib/PaymentReadinessProvider.d.ts +26 -0
- package/lib/PaymentReadinessProvider.es.js +34 -0
- package/lib/components/AddToCartButton.cjs.js +1 -1
- package/lib/components/AddToCartButton.es.js +51 -31
- package/lib/components/Checkout.cjs.js +1 -1
- package/lib/components/Checkout.es.js +369 -360
- package/lib/components/ProductDetailsLayout.cjs.js +1 -1
- package/lib/components/ProductDetailsLayout.d.ts +8 -0
- package/lib/components/ProductDetailsLayout.es.js +196 -194
- package/lib/pages/cms/payments/actions.cjs.js +1 -1
- package/lib/pages/cms/payments/actions.es.js +16 -16
- package/lib/pages/cms/payments/queries.cjs.js +1 -1
- package/lib/pages/cms/payments/queries.d.ts +32 -1
- package/lib/pages/cms/payments/queries.es.js +50 -13
- package/lib/pages/cms/products/components/ProductForm.cjs.js +1 -1
- package/lib/pages/cms/products/components/ProductForm.es.js +271 -267
- package/lib/payment-config.es.js +5 -5
- package/lib/providers/freemius.cjs.js +2 -2
- package/lib/providers/freemius.es.js +176 -169
- package/lib/providers/stripe.cjs.js +1 -1
- package/lib/providers/stripe.es.js +60 -51
- package/lib/stripe/client.cjs.js +1 -1
- package/lib/stripe/client.d.ts +9 -0
- package/lib/stripe/client.es.js +17 -7
- package/package.json +4 -4
- package/server.cjs.js +1 -1
- package/server.d.ts +1 -1
- package/server.es.js +184 -180
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxDEV as e, Fragment as
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { Button as
|
|
2
|
+
import { jsxDEV as e, Fragment as ls } from "react/jsx-dev-runtime";
|
|
3
|
+
import { Badge as qe } from "@nextblock-cms/ui/badge";
|
|
4
|
+
import { Button as he } from "@nextblock-cms/ui/button";
|
|
5
5
|
import { Card as G, CardHeader as Q, CardTitle as X, CardContent as V } from "@nextblock-cms/ui/card";
|
|
6
|
-
import { Checkbox as
|
|
7
|
-
import { Input as
|
|
6
|
+
import { Checkbox as ms } from "@nextblock-cms/ui/checkbox";
|
|
7
|
+
import { Input as H } from "@nextblock-cms/ui/input";
|
|
8
8
|
import { Label as v } from "@nextblock-cms/ui/label";
|
|
9
|
-
import { Separator as
|
|
10
|
-
import { RadioGroup as
|
|
11
|
-
import { Checkout as
|
|
12
|
-
import { getCartItemActivePrice as
|
|
13
|
-
import { useCart as
|
|
14
|
-
import { useState as f, useMemo as
|
|
15
|
-
import { X as
|
|
16
|
-
import { useTranslations as
|
|
17
|
-
import { normalizeCountryCode as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
|
|
9
|
+
import { Separator as ds } from "@nextblock-cms/ui/separator";
|
|
10
|
+
import { RadioGroup as us, RadioGroupItem as Ee } from "@nextblock-cms/ui/radio-group";
|
|
11
|
+
import { Checkout as as } from "@freemius/checkout";
|
|
12
|
+
import { getCartItemActivePrice as ve } from "../cart-store.es.js";
|
|
13
|
+
import { useCart as Ns } from "../use-cart.es.js";
|
|
14
|
+
import { useState as f, useMemo as y, useEffect as re } from "react";
|
|
15
|
+
import { X as bs, FlaskConical as ps, CreditCard as fs, ChevronRight as hs, Loader2 as ke, Package as ks, Download as xs, MapPin as Cs } from "lucide-react";
|
|
16
|
+
import { useTranslations as Ke, formatPrice as h } from "@nextblock-cms/utils";
|
|
17
|
+
import { normalizeCountryCode as vs, countries as gs } from "../countries.es.js";
|
|
18
|
+
import { usePaymentReadiness as _s } from "../PaymentReadinessProvider.es.js";
|
|
19
|
+
import { getShippingEstimates as js } from "../server-actions/shipping-actions.es.js";
|
|
20
|
+
import { getTaxEstimate as Ds } from "../server-actions/tax-actions.es.js";
|
|
21
|
+
import { isDigitalItem as xe } from "../types.es.js";
|
|
22
|
+
import { countryUsesStructuredStates as _e, getStatesForCountry as Ie } from "../states.es.js";
|
|
23
|
+
import { addressesMatch as Rs, emptyCustomerAddress as Bs, normalizeCustomerAddress as ge, isCustomerAddressComplete as Me } from "../customer.es.js";
|
|
24
|
+
import { useCurrency as Us } from "../CurrencyProvider.es.js";
|
|
25
|
+
import { getTrialSummary as Le } from "../trials.es.js";
|
|
26
|
+
import { CouponForm as ys } from "./CouponForm.es.js";
|
|
27
|
+
const Hs = process.env.NEXT_PUBLIC_IS_SANDBOX === "true", te = "nextblock-checkout-draft-v1";
|
|
27
28
|
function le(n, k) {
|
|
28
29
|
return {
|
|
29
|
-
...
|
|
30
|
+
...Bs(),
|
|
30
31
|
company_name: n?.company_name || "",
|
|
31
32
|
recipient_name: n?.recipient_name || k || "",
|
|
32
33
|
line1: n?.line1 || "",
|
|
@@ -34,52 +35,52 @@ function le(n, k) {
|
|
|
34
35
|
city: n?.city || "",
|
|
35
36
|
state: n?.state || "",
|
|
36
37
|
postal_code: n?.postal_code || "",
|
|
37
|
-
country_code:
|
|
38
|
+
country_code: vs(n?.country_code) || "CA"
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
const k =
|
|
42
|
-
return !(!k?.country_code || !k.postal_code ||
|
|
41
|
+
function ws(n) {
|
|
42
|
+
const k = ge(n);
|
|
43
|
+
return !(!k?.country_code || !k.postal_code || _e(k.country_code) && !k.state);
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function Ce(n, k, w) {
|
|
45
46
|
return n.reduce((i, b) => {
|
|
46
|
-
const { price: N, sale_price: S } =
|
|
47
|
+
const { price: N, sale_price: S } = ve(b, {
|
|
47
48
|
currencyCode: k,
|
|
48
49
|
currencies: w
|
|
49
50
|
});
|
|
50
51
|
return i + (S ?? N) * b.quantity;
|
|
51
52
|
}, 0);
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function ze({
|
|
54
55
|
idPrefix: n,
|
|
55
56
|
title: k,
|
|
56
57
|
description: w,
|
|
57
58
|
value: i,
|
|
58
59
|
onChange: b
|
|
59
60
|
}) {
|
|
60
|
-
const { t: N } =
|
|
61
|
+
const { t: N } = Ke(), S = N("company_name") === "company_name" ? "Company name" : N("company_name"), F = N("select_an_option") === "select_an_option" ? "Select an option" : N("select_an_option"), Y = N("state_province") === "state_province" ? "State / Province" : N("state_province"), L = Ie(i.country_code), z = _e(i.country_code);
|
|
61
62
|
return /* @__PURE__ */ e(G, { children: [
|
|
62
63
|
/* @__PURE__ */ e(Q, { children: [
|
|
63
64
|
/* @__PURE__ */ e(X, { className: "flex items-center gap-2", children: [
|
|
64
|
-
/* @__PURE__ */ e(
|
|
65
|
+
/* @__PURE__ */ e(Cs, { className: "w-5 h-5" }, void 0, !1, {
|
|
65
66
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
66
|
-
lineNumber:
|
|
67
|
+
lineNumber: 135,
|
|
67
68
|
columnNumber: 11
|
|
68
69
|
}, this),
|
|
69
70
|
k
|
|
70
71
|
] }, void 0, !0, {
|
|
71
72
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
72
|
-
lineNumber:
|
|
73
|
+
lineNumber: 134,
|
|
73
74
|
columnNumber: 9
|
|
74
75
|
}, this),
|
|
75
76
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: w }, void 0, !1, {
|
|
76
77
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
77
|
-
lineNumber:
|
|
78
|
+
lineNumber: 138,
|
|
78
79
|
columnNumber: 9
|
|
79
80
|
}, this)
|
|
80
81
|
] }, void 0, !0, {
|
|
81
82
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
82
|
-
lineNumber:
|
|
83
|
+
lineNumber: 133,
|
|
83
84
|
columnNumber: 7
|
|
84
85
|
}, this),
|
|
85
86
|
/* @__PURE__ */ e(V, { className: "space-y-4", children: [
|
|
@@ -87,11 +88,11 @@ function Ee({
|
|
|
87
88
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: [
|
|
88
89
|
/* @__PURE__ */ e(v, { htmlFor: `${n}-company`, children: S }, void 0, !1, {
|
|
89
90
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
90
|
-
lineNumber:
|
|
91
|
+
lineNumber: 143,
|
|
91
92
|
columnNumber: 13
|
|
92
93
|
}, this),
|
|
93
94
|
/* @__PURE__ */ e(
|
|
94
|
-
|
|
95
|
+
H,
|
|
95
96
|
{
|
|
96
97
|
id: `${n}-company`,
|
|
97
98
|
value: i.company_name,
|
|
@@ -101,24 +102,24 @@ function Ee({
|
|
|
101
102
|
!1,
|
|
102
103
|
{
|
|
103
104
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
104
|
-
lineNumber:
|
|
105
|
+
lineNumber: 144,
|
|
105
106
|
columnNumber: 13
|
|
106
107
|
},
|
|
107
108
|
this
|
|
108
109
|
)
|
|
109
110
|
] }, void 0, !0, {
|
|
110
111
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
111
|
-
lineNumber:
|
|
112
|
+
lineNumber: 142,
|
|
112
113
|
columnNumber: 11
|
|
113
114
|
}, this),
|
|
114
115
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: [
|
|
115
116
|
/* @__PURE__ */ e(v, { htmlFor: `${n}-name`, children: N("full_name") }, void 0, !1, {
|
|
116
117
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
117
|
-
lineNumber:
|
|
118
|
+
lineNumber: 151,
|
|
118
119
|
columnNumber: 13
|
|
119
120
|
}, this),
|
|
120
121
|
/* @__PURE__ */ e(
|
|
121
|
-
|
|
122
|
+
H,
|
|
122
123
|
{
|
|
123
124
|
id: `${n}-name`,
|
|
124
125
|
value: i.recipient_name,
|
|
@@ -128,20 +129,20 @@ function Ee({
|
|
|
128
129
|
!1,
|
|
129
130
|
{
|
|
130
131
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
131
|
-
lineNumber:
|
|
132
|
+
lineNumber: 152,
|
|
132
133
|
columnNumber: 13
|
|
133
134
|
},
|
|
134
135
|
this
|
|
135
136
|
)
|
|
136
137
|
] }, void 0, !0, {
|
|
137
138
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
138
|
-
lineNumber:
|
|
139
|
+
lineNumber: 150,
|
|
139
140
|
columnNumber: 11
|
|
140
141
|
}, this),
|
|
141
142
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: [
|
|
142
143
|
/* @__PURE__ */ e(v, { htmlFor: `${n}-country`, children: N("country") }, void 0, !1, {
|
|
143
144
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
144
|
-
lineNumber:
|
|
145
|
+
lineNumber: 159,
|
|
145
146
|
columnNumber: 13
|
|
146
147
|
}, this),
|
|
147
148
|
/* @__PURE__ */ e(
|
|
@@ -151,16 +152,16 @@ function Ee({
|
|
|
151
152
|
className: "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
152
153
|
value: i.country_code,
|
|
153
154
|
onChange: (l) => {
|
|
154
|
-
const O = l.target.value, me =
|
|
155
|
+
const O = l.target.value, me = Ie(O);
|
|
155
156
|
b({
|
|
156
157
|
...i,
|
|
157
158
|
country_code: O,
|
|
158
159
|
state: me.some((W) => W.code === i.state) ? i.state : ""
|
|
159
160
|
});
|
|
160
161
|
},
|
|
161
|
-
children:
|
|
162
|
+
children: gs.map((l) => /* @__PURE__ */ e("option", { value: l.code, children: l.name }, l.code, !1, {
|
|
162
163
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
163
|
-
lineNumber:
|
|
164
|
+
lineNumber: 175,
|
|
164
165
|
columnNumber: 17
|
|
165
166
|
}, this))
|
|
166
167
|
},
|
|
@@ -168,29 +169,29 @@ function Ee({
|
|
|
168
169
|
!1,
|
|
169
170
|
{
|
|
170
171
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
171
|
-
lineNumber:
|
|
172
|
+
lineNumber: 160,
|
|
172
173
|
columnNumber: 13
|
|
173
174
|
},
|
|
174
175
|
this
|
|
175
176
|
)
|
|
176
177
|
] }, void 0, !0, {
|
|
177
178
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
178
|
-
lineNumber:
|
|
179
|
+
lineNumber: 158,
|
|
179
180
|
columnNumber: 11
|
|
180
181
|
}, this)
|
|
181
182
|
] }, void 0, !0, {
|
|
182
183
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
183
|
-
lineNumber:
|
|
184
|
+
lineNumber: 141,
|
|
184
185
|
columnNumber: 9
|
|
185
186
|
}, this),
|
|
186
187
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: [
|
|
187
188
|
/* @__PURE__ */ e(v, { htmlFor: `${n}-line1`, children: N("address_line_1") }, void 0, !1, {
|
|
188
189
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
189
|
-
lineNumber:
|
|
190
|
+
lineNumber: 184,
|
|
190
191
|
columnNumber: 11
|
|
191
192
|
}, this),
|
|
192
193
|
/* @__PURE__ */ e(
|
|
193
|
-
|
|
194
|
+
H,
|
|
194
195
|
{
|
|
195
196
|
id: `${n}-line1`,
|
|
196
197
|
value: i.line1,
|
|
@@ -200,24 +201,24 @@ function Ee({
|
|
|
200
201
|
!1,
|
|
201
202
|
{
|
|
202
203
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
203
|
-
lineNumber:
|
|
204
|
+
lineNumber: 185,
|
|
204
205
|
columnNumber: 11
|
|
205
206
|
},
|
|
206
207
|
this
|
|
207
208
|
)
|
|
208
209
|
] }, void 0, !0, {
|
|
209
210
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
210
|
-
lineNumber:
|
|
211
|
+
lineNumber: 183,
|
|
211
212
|
columnNumber: 9
|
|
212
213
|
}, this),
|
|
213
214
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: [
|
|
214
215
|
/* @__PURE__ */ e(v, { htmlFor: `${n}-line2`, children: N("address_line_2") }, void 0, !1, {
|
|
215
216
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
216
|
-
lineNumber:
|
|
217
|
+
lineNumber: 193,
|
|
217
218
|
columnNumber: 11
|
|
218
219
|
}, this),
|
|
219
220
|
/* @__PURE__ */ e(
|
|
220
|
-
|
|
221
|
+
H,
|
|
221
222
|
{
|
|
222
223
|
id: `${n}-line2`,
|
|
223
224
|
value: i.line2,
|
|
@@ -227,25 +228,25 @@ function Ee({
|
|
|
227
228
|
!1,
|
|
228
229
|
{
|
|
229
230
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
230
|
-
lineNumber:
|
|
231
|
+
lineNumber: 194,
|
|
231
232
|
columnNumber: 11
|
|
232
233
|
},
|
|
233
234
|
this
|
|
234
235
|
)
|
|
235
236
|
] }, void 0, !0, {
|
|
236
237
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
237
|
-
lineNumber:
|
|
238
|
+
lineNumber: 192,
|
|
238
239
|
columnNumber: 9
|
|
239
240
|
}, this),
|
|
240
241
|
/* @__PURE__ */ e("div", { className: "grid gap-4 sm:grid-cols-3", children: [
|
|
241
242
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: [
|
|
242
243
|
/* @__PURE__ */ e(v, { htmlFor: `${n}-city`, children: N("city") }, void 0, !1, {
|
|
243
244
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
244
|
-
lineNumber:
|
|
245
|
+
lineNumber: 203,
|
|
245
246
|
columnNumber: 13
|
|
246
247
|
}, this),
|
|
247
248
|
/* @__PURE__ */ e(
|
|
248
|
-
|
|
249
|
+
H,
|
|
249
250
|
{
|
|
250
251
|
id: `${n}-city`,
|
|
251
252
|
value: i.city,
|
|
@@ -255,20 +256,20 @@ function Ee({
|
|
|
255
256
|
!1,
|
|
256
257
|
{
|
|
257
258
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
258
|
-
lineNumber:
|
|
259
|
+
lineNumber: 204,
|
|
259
260
|
columnNumber: 13
|
|
260
261
|
},
|
|
261
262
|
this
|
|
262
263
|
)
|
|
263
264
|
] }, void 0, !0, {
|
|
264
265
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
265
|
-
lineNumber:
|
|
266
|
+
lineNumber: 202,
|
|
266
267
|
columnNumber: 11
|
|
267
268
|
}, this),
|
|
268
269
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: [
|
|
269
270
|
/* @__PURE__ */ e(v, { htmlFor: `${n}-state`, children: N("state_province") }, void 0, !1, {
|
|
270
271
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
271
|
-
lineNumber:
|
|
272
|
+
lineNumber: 211,
|
|
272
273
|
columnNumber: 13
|
|
273
274
|
}, this),
|
|
274
275
|
z ? /* @__PURE__ */ e(
|
|
@@ -281,12 +282,12 @@ function Ee({
|
|
|
281
282
|
children: [
|
|
282
283
|
/* @__PURE__ */ e("option", { value: "", children: `${F}: ${Y}` }, void 0, !1, {
|
|
283
284
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
284
|
-
lineNumber:
|
|
285
|
+
lineNumber: 219,
|
|
285
286
|
columnNumber: 17
|
|
286
287
|
}, this),
|
|
287
288
|
L.map((l) => /* @__PURE__ */ e("option", { value: l.code, children: l.name }, l.code, !1, {
|
|
288
289
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
289
|
-
lineNumber:
|
|
290
|
+
lineNumber: 221,
|
|
290
291
|
columnNumber: 19
|
|
291
292
|
}, this))
|
|
292
293
|
]
|
|
@@ -295,12 +296,12 @@ function Ee({
|
|
|
295
296
|
!0,
|
|
296
297
|
{
|
|
297
298
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
298
|
-
lineNumber:
|
|
299
|
+
lineNumber: 213,
|
|
299
300
|
columnNumber: 15
|
|
300
301
|
},
|
|
301
302
|
this
|
|
302
303
|
) : /* @__PURE__ */ e(
|
|
303
|
-
|
|
304
|
+
H,
|
|
304
305
|
{
|
|
305
306
|
id: `${n}-state`,
|
|
306
307
|
value: i.state,
|
|
@@ -310,24 +311,24 @@ function Ee({
|
|
|
310
311
|
!1,
|
|
311
312
|
{
|
|
312
313
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
313
|
-
lineNumber:
|
|
314
|
+
lineNumber: 227,
|
|
314
315
|
columnNumber: 15
|
|
315
316
|
},
|
|
316
317
|
this
|
|
317
318
|
)
|
|
318
319
|
] }, void 0, !0, {
|
|
319
320
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
320
|
-
lineNumber:
|
|
321
|
+
lineNumber: 210,
|
|
321
322
|
columnNumber: 11
|
|
322
323
|
}, this),
|
|
323
324
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: [
|
|
324
325
|
/* @__PURE__ */ e(v, { htmlFor: `${n}-postal`, children: N("postal_zip_code") }, void 0, !1, {
|
|
325
326
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
326
|
-
lineNumber:
|
|
327
|
+
lineNumber: 235,
|
|
327
328
|
columnNumber: 13
|
|
328
329
|
}, this),
|
|
329
330
|
/* @__PURE__ */ e(
|
|
330
|
-
|
|
331
|
+
H,
|
|
331
332
|
{
|
|
332
333
|
id: `${n}-postal`,
|
|
333
334
|
value: i.postal_code,
|
|
@@ -337,33 +338,33 @@ function Ee({
|
|
|
337
338
|
!1,
|
|
338
339
|
{
|
|
339
340
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
340
|
-
lineNumber:
|
|
341
|
+
lineNumber: 236,
|
|
341
342
|
columnNumber: 13
|
|
342
343
|
},
|
|
343
344
|
this
|
|
344
345
|
)
|
|
345
346
|
] }, void 0, !0, {
|
|
346
347
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
347
|
-
lineNumber:
|
|
348
|
+
lineNumber: 234,
|
|
348
349
|
columnNumber: 11
|
|
349
350
|
}, this)
|
|
350
351
|
] }, void 0, !0, {
|
|
351
352
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
352
|
-
lineNumber:
|
|
353
|
+
lineNumber: 201,
|
|
353
354
|
columnNumber: 9
|
|
354
355
|
}, this)
|
|
355
356
|
] }, void 0, !0, {
|
|
356
357
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
357
|
-
lineNumber:
|
|
358
|
+
lineNumber: 140,
|
|
358
359
|
columnNumber: 7
|
|
359
360
|
}, this)
|
|
360
361
|
] }, void 0, !0, {
|
|
361
362
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
362
|
-
lineNumber:
|
|
363
|
+
lineNumber: 132,
|
|
363
364
|
columnNumber: 5
|
|
364
365
|
}, this);
|
|
365
366
|
}
|
|
366
|
-
function
|
|
367
|
+
function Oe({
|
|
367
368
|
title: n,
|
|
368
369
|
description: k,
|
|
369
370
|
badgeLabel: w,
|
|
@@ -374,59 +375,59 @@ function Ie({
|
|
|
374
375
|
/* @__PURE__ */ e("div", { children: [
|
|
375
376
|
/* @__PURE__ */ e(X, { children: n }, void 0, !1, {
|
|
376
377
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
377
|
-
lineNumber:
|
|
378
|
+
lineNumber: 264,
|
|
378
379
|
columnNumber: 13
|
|
379
380
|
}, this),
|
|
380
381
|
/* @__PURE__ */ e("p", { className: "mt-1 text-sm text-muted-foreground", children: k }, void 0, !1, {
|
|
381
382
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
382
|
-
lineNumber:
|
|
383
|
+
lineNumber: 265,
|
|
383
384
|
columnNumber: 13
|
|
384
385
|
}, this)
|
|
385
386
|
] }, void 0, !0, {
|
|
386
387
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
387
|
-
lineNumber:
|
|
388
|
+
lineNumber: 263,
|
|
388
389
|
columnNumber: 11
|
|
389
390
|
}, this),
|
|
390
|
-
w ? /* @__PURE__ */ e(
|
|
391
|
+
w ? /* @__PURE__ */ e(qe, { variant: "secondary", children: w }, void 0, !1, {
|
|
391
392
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
392
|
-
lineNumber:
|
|
393
|
+
lineNumber: 267,
|
|
393
394
|
columnNumber: 25
|
|
394
395
|
}, this) : null
|
|
395
396
|
] }, void 0, !0, {
|
|
396
397
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
397
|
-
lineNumber:
|
|
398
|
+
lineNumber: 262,
|
|
398
399
|
columnNumber: 9
|
|
399
400
|
}, this) }, void 0, !1, {
|
|
400
401
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
401
|
-
lineNumber:
|
|
402
|
+
lineNumber: 261,
|
|
402
403
|
columnNumber: 7
|
|
403
404
|
}, this),
|
|
404
405
|
/* @__PURE__ */ e(V, { className: "space-y-4", children: i }, void 0, !1, {
|
|
405
406
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
406
|
-
lineNumber:
|
|
407
|
+
lineNumber: 270,
|
|
407
408
|
columnNumber: 7
|
|
408
409
|
}, this)
|
|
409
410
|
] }, void 0, !0, {
|
|
410
411
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
411
|
-
lineNumber:
|
|
412
|
+
lineNumber: 260,
|
|
412
413
|
columnNumber: 5
|
|
413
414
|
}, this);
|
|
414
415
|
}
|
|
415
|
-
const
|
|
416
|
-
const [k, w] = f({}), [i, b] = f(null), [N, S] = f({}), [F, Y] = f(n?.email || ""), [L, z] = f(""), [l, O] = f(n?.phone || ""), [me, W] = f(!1), [
|
|
416
|
+
const on = ({ initialCustomer: n }) => {
|
|
417
|
+
const [k, w] = f({}), [i, b] = f(null), [N, S] = f({}), [F, Y] = f(n?.email || ""), [L, z] = f(""), [l, O] = f(n?.phone || ""), [me, W] = f(!1), [Je, je] = f(null), [De, Z] = f(!1), [Ge, ee] = f(!1), [q, se] = f([]), [x, I] = f(null), [j, ne] = f(null), [T, Qe] = f(null), [B, Re] = f(
|
|
417
418
|
() => le(n?.billingAddress, n?.fullName)
|
|
418
|
-
), [M,
|
|
419
|
+
), [M, Be] = f(
|
|
419
420
|
() => le(
|
|
420
421
|
n?.shippingAddress ?? n?.billingAddress,
|
|
421
422
|
n?.fullName
|
|
422
423
|
)
|
|
423
|
-
), [$,
|
|
424
|
-
!n?.shippingAddress ||
|
|
425
|
-
), K =
|
|
426
|
-
() => C.filter((s) => !
|
|
424
|
+
), [$, Ue] = f(
|
|
425
|
+
!n?.shippingAddress || Rs(n?.billingAddress, n?.shippingAddress)
|
|
426
|
+
), K = Ns((s) => s), { t: c, lang: de } = Ke(), { activeCurrencyCode: t, currencies: A } = Us(), ye = _s(), C = K?.items ?? [], g = y(
|
|
427
|
+
() => C.filter((s) => !xe(s)),
|
|
427
428
|
[C]
|
|
428
|
-
), D =
|
|
429
|
-
() => C.filter((s) =>
|
|
429
|
+
), D = y(
|
|
430
|
+
() => C.filter((s) => xe(s)),
|
|
430
431
|
[C]
|
|
431
432
|
), P = n?.isAuthenticated ?? !1, o = (s, r, u) => {
|
|
432
433
|
const d = c(s, u);
|
|
@@ -441,28 +442,28 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
441
442
|
String(m)
|
|
442
443
|
);
|
|
443
444
|
}), p;
|
|
444
|
-
}, _ = g.length > 0,
|
|
445
|
-
() =>
|
|
446
|
-
[t,
|
|
447
|
-
), ue =
|
|
448
|
-
() =>
|
|
449
|
-
[t,
|
|
450
|
-
), ae =
|
|
451
|
-
() =>
|
|
452
|
-
[t,
|
|
453
|
-
), Ne =
|
|
445
|
+
}, _ = g.length > 0, Xe = y(
|
|
446
|
+
() => Ce(C, t, A),
|
|
447
|
+
[t, A, C]
|
|
448
|
+
), ue = y(
|
|
449
|
+
() => Ce(g, t, A),
|
|
450
|
+
[t, A, g]
|
|
451
|
+
), ae = y(
|
|
452
|
+
() => Ce(D, t, A),
|
|
453
|
+
[t, A, D]
|
|
454
|
+
), Ne = T?.providerDiscounts.stripe ?? 0, be = T?.providerDiscounts.freemius ?? 0, oe = Math.max(0, ue - Ne), Ve = Math.max(0, ae - be), R = y(
|
|
454
455
|
() => $ ? B : M,
|
|
455
456
|
[B, M, $]
|
|
456
|
-
), E =
|
|
457
|
+
), E = y(
|
|
457
458
|
() => _ ? R : B,
|
|
458
459
|
[B, _, R]
|
|
459
|
-
), ce = !_ ||
|
|
460
|
+
), ce = !_ || ws(R), ie = y(
|
|
460
461
|
() => q.find((s) => s.id === x),
|
|
461
462
|
[q, x]
|
|
462
|
-
),
|
|
463
|
+
), He = y(
|
|
463
464
|
() => oe + (ie?.amount ?? 0) + (j && !j.isPendingExternalCalculation ? j.amount : 0),
|
|
464
465
|
[oe, ie, j]
|
|
465
|
-
),
|
|
466
|
+
), Ye = He + Ve;
|
|
466
467
|
if (re(() => {
|
|
467
468
|
if (!(P || typeof window > "u"))
|
|
468
469
|
try {
|
|
@@ -470,7 +471,7 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
470
471
|
if (!s)
|
|
471
472
|
return;
|
|
472
473
|
const r = JSON.parse(s);
|
|
473
|
-
r.email && Y(r.email), r.phone && O(r.phone), r.billingAddress &&
|
|
474
|
+
r.email && Y(r.email), r.phone && O(r.phone), r.billingAddress && Re(le(r.billingAddress)), r.shippingAddress && Be(le(r.shippingAddress)), typeof r.useBillingForShipping == "boolean" && Ue(r.useBillingForShipping), (typeof r.selectedMethodId == "string" || r.selectedMethodId === null) && I(r.selectedMethodId);
|
|
474
475
|
} catch (s) {
|
|
475
476
|
console.error("[Checkout] Failed to restore checkout draft:", s);
|
|
476
477
|
}
|
|
@@ -514,7 +515,7 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
514
515
|
if (!R.country_code)
|
|
515
516
|
return;
|
|
516
517
|
Z(!0);
|
|
517
|
-
const d = await
|
|
518
|
+
const d = await js(
|
|
518
519
|
oe,
|
|
519
520
|
{
|
|
520
521
|
country: R.country_code,
|
|
@@ -545,19 +546,19 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
545
546
|
ee(!1), ne(null);
|
|
546
547
|
return;
|
|
547
548
|
}
|
|
548
|
-
if (
|
|
549
|
+
if (_e(E.country_code) && !E.state) {
|
|
549
550
|
ee(!1), ne(null);
|
|
550
551
|
return;
|
|
551
552
|
}
|
|
552
553
|
ee(!0);
|
|
553
|
-
const u = await
|
|
554
|
+
const u = await Ds(
|
|
554
555
|
g,
|
|
555
556
|
{
|
|
556
557
|
country_code: E.country_code,
|
|
557
558
|
state: E.state
|
|
558
559
|
},
|
|
559
560
|
t,
|
|
560
|
-
|
|
561
|
+
T?.code ?? null,
|
|
561
562
|
C
|
|
562
563
|
);
|
|
563
564
|
u.success && u.tax ? ne(u.tax) : ne(null), ee(!1);
|
|
@@ -569,17 +570,17 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
569
570
|
g,
|
|
570
571
|
E.country_code,
|
|
571
572
|
E.state,
|
|
572
|
-
|
|
573
|
+
T?.code,
|
|
573
574
|
C
|
|
574
575
|
]), !K)
|
|
575
576
|
return null;
|
|
576
|
-
const
|
|
577
|
-
W(!1),
|
|
578
|
-
},
|
|
577
|
+
const we = () => {
|
|
578
|
+
W(!1), je(null);
|
|
579
|
+
}, Se = me ? /* @__PURE__ */ e(
|
|
579
580
|
"div",
|
|
580
581
|
{
|
|
581
582
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",
|
|
582
|
-
onClick:
|
|
583
|
+
onClick: we,
|
|
583
584
|
children: /* @__PURE__ */ e(
|
|
584
585
|
"div",
|
|
585
586
|
{
|
|
@@ -589,11 +590,11 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
589
590
|
/* @__PURE__ */ e(
|
|
590
591
|
"button",
|
|
591
592
|
{
|
|
592
|
-
onClick:
|
|
593
|
+
onClick: we,
|
|
593
594
|
className: "absolute top-4 right-4 text-muted-foreground hover:text-foreground transition-colors",
|
|
594
|
-
children: /* @__PURE__ */ e(
|
|
595
|
+
children: /* @__PURE__ */ e(bs, { className: "w-5 h-5" }, void 0, !1, {
|
|
595
596
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
596
|
-
lineNumber:
|
|
597
|
+
lineNumber: 604,
|
|
597
598
|
columnNumber: 11
|
|
598
599
|
}, void 0)
|
|
599
600
|
},
|
|
@@ -601,37 +602,37 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
601
602
|
!1,
|
|
602
603
|
{
|
|
603
604
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
604
|
-
lineNumber:
|
|
605
|
+
lineNumber: 600,
|
|
605
606
|
columnNumber: 9
|
|
606
607
|
},
|
|
607
608
|
void 0
|
|
608
609
|
),
|
|
609
610
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
610
|
-
/* @__PURE__ */ e("div", { className: "p-2 rounded-full bg-amber-100 dark:bg-amber-900/20", children: /* @__PURE__ */ e(
|
|
611
|
+
/* @__PURE__ */ e("div", { className: "p-2 rounded-full bg-amber-100 dark:bg-amber-900/20", children: /* @__PURE__ */ e(ps, { className: "h-6 w-6 text-amber-600 dark:text-amber-400" }, void 0, !1, {
|
|
611
612
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
612
|
-
lineNumber:
|
|
613
|
+
lineNumber: 608,
|
|
613
614
|
columnNumber: 13
|
|
614
615
|
}, void 0) }, void 0, !1, {
|
|
615
616
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
616
|
-
lineNumber:
|
|
617
|
+
lineNumber: 607,
|
|
617
618
|
columnNumber: 11
|
|
618
619
|
}, void 0),
|
|
619
620
|
/* @__PURE__ */ e("h2", { className: "text-xl font-semibold", children: c("ecommerce.checkout_successful") }, void 0, !1, {
|
|
620
621
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
621
|
-
lineNumber:
|
|
622
|
+
lineNumber: 610,
|
|
622
623
|
columnNumber: 11
|
|
623
624
|
}, void 0)
|
|
624
625
|
] }, void 0, !0, {
|
|
625
626
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
626
|
-
lineNumber:
|
|
627
|
+
lineNumber: 606,
|
|
627
628
|
columnNumber: 9
|
|
628
629
|
}, void 0),
|
|
629
630
|
/* @__PURE__ */ e("p", { className: "text-muted-foreground mb-2", children: c("ecommerce.sandbox_notice") }, void 0, !1, {
|
|
630
631
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
631
|
-
lineNumber:
|
|
632
|
+
lineNumber: 612,
|
|
632
633
|
columnNumber: 9
|
|
633
634
|
}, void 0),
|
|
634
|
-
/* @__PURE__ */ e("p", { className: "text-muted-foreground mb-2", children:
|
|
635
|
+
/* @__PURE__ */ e("p", { className: "text-muted-foreground mb-2", children: Je === "stripe" ? o(
|
|
635
636
|
"ecommerce.sandbox_checkout_stripe_description",
|
|
636
637
|
"This simulated step represents the Stripe checkout for physical products."
|
|
637
638
|
) : o(
|
|
@@ -639,12 +640,12 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
639
640
|
"This simulated step represents the Freemius checkout for digital products."
|
|
640
641
|
) }, void 0, !1, {
|
|
641
642
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
642
|
-
lineNumber:
|
|
643
|
+
lineNumber: 613,
|
|
643
644
|
columnNumber: 9
|
|
644
645
|
}, void 0),
|
|
645
646
|
/* @__PURE__ */ e("p", { className: "text-muted-foreground mb-6", children: c("ecommerce.license_notice") }, void 0, !1, {
|
|
646
647
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
647
|
-
lineNumber:
|
|
648
|
+
lineNumber: 624,
|
|
648
649
|
columnNumber: 9
|
|
649
650
|
}, void 0),
|
|
650
651
|
/* @__PURE__ */ e(
|
|
@@ -660,7 +661,7 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
660
661
|
!1,
|
|
661
662
|
{
|
|
662
663
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
663
|
-
lineNumber:
|
|
664
|
+
lineNumber: 625,
|
|
664
665
|
columnNumber: 9
|
|
665
666
|
},
|
|
666
667
|
void 0
|
|
@@ -671,7 +672,7 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
671
672
|
!0,
|
|
672
673
|
{
|
|
673
674
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
674
|
-
lineNumber:
|
|
675
|
+
lineNumber: 596,
|
|
675
676
|
columnNumber: 7
|
|
676
677
|
},
|
|
677
678
|
void 0
|
|
@@ -681,19 +682,19 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
681
682
|
!1,
|
|
682
683
|
{
|
|
683
684
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
684
|
-
lineNumber:
|
|
685
|
+
lineNumber: 592,
|
|
685
686
|
columnNumber: 5
|
|
686
687
|
},
|
|
687
688
|
void 0
|
|
688
|
-
) : null,
|
|
689
|
+
) : null, We = (s) => {
|
|
689
690
|
if (!P && (!F || !/^\S+@\S+\.\S+$/.test(F)))
|
|
690
691
|
return z(c("ecommerce.invalid_email")), null;
|
|
691
|
-
const r =
|
|
692
|
-
if (
|
|
692
|
+
const r = ge(B);
|
|
693
|
+
if (!Me(r))
|
|
693
694
|
return alert(c("checkout_complete_billing_address")), null;
|
|
694
|
-
const u = _ ?
|
|
695
|
+
const u = _ ? ge($ ? B : M) : null;
|
|
695
696
|
if (s === "stripe") {
|
|
696
|
-
if (
|
|
697
|
+
if (!Me(u))
|
|
697
698
|
return alert(c("checkout_complete_shipping_address")), null;
|
|
698
699
|
if (!x)
|
|
699
700
|
return alert(
|
|
@@ -707,16 +708,16 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
707
708
|
normalizedBillingAddress: r,
|
|
708
709
|
normalizedShippingAddress: u
|
|
709
710
|
};
|
|
710
|
-
},
|
|
711
|
+
}, Fe = async (s, r, u) => {
|
|
711
712
|
S((p) => ({
|
|
712
713
|
...p,
|
|
713
714
|
[s]: ""
|
|
714
715
|
}));
|
|
715
|
-
const d =
|
|
716
|
+
const d = We(s);
|
|
716
717
|
if (d) {
|
|
717
|
-
if (
|
|
718
|
+
if (Hs) {
|
|
718
719
|
const p = new Set(r.map((m) => m.id)), a = C.filter((m) => !p.has(m.id));
|
|
719
|
-
K.setItems(a), a.length === 0 && K.removeCoupon(),
|
|
720
|
+
K.setItems(a), a.length === 0 && K.removeCoupon(), je(s), W(!0), typeof window < "u" && a.length === 0 && window.localStorage.removeItem(te);
|
|
720
721
|
return;
|
|
721
722
|
}
|
|
722
723
|
b(u);
|
|
@@ -733,7 +734,7 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
733
734
|
shippingMethodId: s === "stripe" ? x : null,
|
|
734
735
|
locale: de,
|
|
735
736
|
currencyCode: t,
|
|
736
|
-
couponCode:
|
|
737
|
+
couponCode: T?.code ?? K.appliedCoupon?.code ?? null,
|
|
737
738
|
couponContextItems: C
|
|
738
739
|
})
|
|
739
740
|
}), a = await p.json();
|
|
@@ -752,25 +753,25 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
752
753
|
if (a.customProps && a.customProps.provider === "freemius") {
|
|
753
754
|
const m = a.customProps;
|
|
754
755
|
let J = null;
|
|
755
|
-
const
|
|
756
|
+
const cs = () => {
|
|
756
757
|
window.location.href = `/checkout/success?session_id=${m.order_id}`;
|
|
757
|
-
},
|
|
758
|
+
}, $e = (U) => (J || (J = fetch("/api/checkout/freemius/sync", {
|
|
758
759
|
method: "POST",
|
|
759
760
|
headers: { "Content-Type": "application/json" },
|
|
760
761
|
body: JSON.stringify({
|
|
761
762
|
orderId: m.order_id,
|
|
762
763
|
checkoutResponse: U
|
|
763
764
|
})
|
|
764
|
-
}).then(async (
|
|
765
|
-
if (!
|
|
766
|
-
const
|
|
767
|
-
console.error("Freemius checkout sync failed:",
|
|
765
|
+
}).then(async (Pe) => {
|
|
766
|
+
if (!Pe.ok) {
|
|
767
|
+
const ts = await Pe.json().catch(() => null);
|
|
768
|
+
console.error("Freemius checkout sync failed:", ts);
|
|
768
769
|
}
|
|
769
|
-
})), J),
|
|
770
|
+
})), J), is = {
|
|
770
771
|
product_id: m.plugin_id,
|
|
771
772
|
public_key: m.public_key,
|
|
772
773
|
sandbox: m.sandbox
|
|
773
|
-
},
|
|
774
|
+
}, rs = {
|
|
774
775
|
name: c("ecommerce.checkout_overlay_title"),
|
|
775
776
|
plan_id: m.plan_id,
|
|
776
777
|
...m.billing_cycle ? { billing_cycle: m.billing_cycle } : {},
|
|
@@ -781,20 +782,20 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
781
782
|
user_lastname: m.user_lastname,
|
|
782
783
|
sandbox: m.sandbox,
|
|
783
784
|
purchaseCompleted: function(U) {
|
|
784
|
-
|
|
785
|
+
$e(U);
|
|
785
786
|
},
|
|
786
787
|
success: function(U) {
|
|
787
788
|
(async () => {
|
|
788
789
|
try {
|
|
789
|
-
await
|
|
790
|
+
await $e(U);
|
|
790
791
|
} finally {
|
|
791
|
-
|
|
792
|
+
cs();
|
|
792
793
|
}
|
|
793
794
|
})();
|
|
794
795
|
}
|
|
795
796
|
};
|
|
796
797
|
try {
|
|
797
|
-
new
|
|
798
|
+
new as(is).open(rs), b(null);
|
|
798
799
|
} catch (U) {
|
|
799
800
|
alert(
|
|
800
801
|
c("ecommerce.checkout_popup_blocked") + " " + (U.message || String(U))
|
|
@@ -813,53 +814,56 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
813
814
|
}
|
|
814
815
|
};
|
|
815
816
|
if (C.length === 0)
|
|
816
|
-
return /* @__PURE__ */ e(
|
|
817
|
-
|
|
817
|
+
return /* @__PURE__ */ e(ls, { children: [
|
|
818
|
+
Se,
|
|
818
819
|
/* @__PURE__ */ e("div", { className: "container mx-auto flex min-h-[50vh] flex-col items-center justify-center p-8 text-center", children: [
|
|
819
820
|
/* @__PURE__ */ e("h1", { className: "mb-4 text-2xl font-bold", children: c("ecommerce.cart_empty") }, void 0, !1, {
|
|
820
821
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
821
|
-
lineNumber:
|
|
822
|
+
lineNumber: 846,
|
|
822
823
|
columnNumber: 11
|
|
823
824
|
}, void 0),
|
|
824
825
|
/* @__PURE__ */ e("p", { className: "mb-8 text-muted-foreground", children: c("ecommerce.cart_empty_description") }, void 0, !1, {
|
|
825
826
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
826
|
-
lineNumber:
|
|
827
|
+
lineNumber: 847,
|
|
827
828
|
columnNumber: 11
|
|
828
829
|
}, void 0),
|
|
829
|
-
/* @__PURE__ */ e(
|
|
830
|
+
/* @__PURE__ */ e(he, { asChild: !0, children: /* @__PURE__ */ e("a", { href: "/shop", children: c("ecommerce.go_to_shop") }, void 0, !1, {
|
|
830
831
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
831
|
-
lineNumber:
|
|
832
|
+
lineNumber: 849,
|
|
832
833
|
columnNumber: 13
|
|
833
834
|
}, void 0) }, void 0, !1, {
|
|
834
835
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
835
|
-
lineNumber:
|
|
836
|
+
lineNumber: 848,
|
|
836
837
|
columnNumber: 11
|
|
837
838
|
}, void 0)
|
|
838
839
|
] }, void 0, !0, {
|
|
839
840
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
840
|
-
lineNumber:
|
|
841
|
+
lineNumber: 845,
|
|
841
842
|
columnNumber: 9
|
|
842
843
|
}, void 0)
|
|
843
844
|
] }, void 0, !0, {
|
|
844
845
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
845
|
-
lineNumber:
|
|
846
|
+
lineNumber: 843,
|
|
846
847
|
columnNumber: 7
|
|
847
848
|
}, void 0);
|
|
848
|
-
const
|
|
849
|
+
const Te = o(
|
|
850
|
+
"ecommerce.checkout_payments_unavailable",
|
|
851
|
+
"This store is not able to take payments right now. Please contact the seller to complete your purchase."
|
|
852
|
+
), Ae = ye.stripe ? null : Te, pe = ye.freemius ? null : Te, fe = Ae || (_ ? ce ? De ? o(
|
|
849
853
|
"ecommerce.calculating_shipping",
|
|
850
854
|
"Calculating shipping..."
|
|
851
855
|
) : x ? null : q.length > 0 ? c("ecommerce.select_rate") : c("ecommerce.no_rates_for_region") : o(
|
|
852
856
|
"ecommerce.waiting_on_address_info",
|
|
853
857
|
"Complete your shipping address to view available shipping options."
|
|
854
|
-
) : null,
|
|
858
|
+
) : null), Ze = i !== null || fe !== null, es = g.length === 1 ? o("ecommerce.item_count_one", "{count} item", {
|
|
855
859
|
count: g.length
|
|
856
860
|
}) : o("ecommerce.item_count_other", "{count} items", {
|
|
857
861
|
count: g.length
|
|
858
|
-
}),
|
|
862
|
+
}), ss = D.length === 1 ? o("ecommerce.license_count_one", "{count} license", {
|
|
859
863
|
count: D.length
|
|
860
864
|
}) : o("ecommerce.license_count_other", "{count} licenses", {
|
|
861
865
|
count: D.length
|
|
862
|
-
}),
|
|
866
|
+
}), ns = (s) => xe(s) ? o("ecommerce.digital_label", "Digital") : o("ecommerce.physical_label", "Physical"), os = (s) => s === "monthly" ? o(
|
|
863
867
|
"ecommerce.checkout_billing_cycle_monthly",
|
|
864
868
|
"Monthly subscription"
|
|
865
869
|
) : s === "annual" ? o(
|
|
@@ -870,36 +874,36 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
870
874
|
"Lifetime subscription"
|
|
871
875
|
) : null;
|
|
872
876
|
return /* @__PURE__ */ e("div", { className: "container mx-auto px-4 py-12 md:px-6", children: [
|
|
873
|
-
|
|
877
|
+
Se,
|
|
874
878
|
/* @__PURE__ */ e("div", { className: "mx-auto max-w-6xl", children: [
|
|
875
879
|
/* @__PURE__ */ e("h1", { className: "mb-8 text-3xl font-bold", children: c("ecommerce.checkout") }, void 0, !1, {
|
|
876
880
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
877
|
-
lineNumber:
|
|
881
|
+
lineNumber: 941,
|
|
878
882
|
columnNumber: 9
|
|
879
883
|
}, void 0),
|
|
880
884
|
/* @__PURE__ */ e("div", { className: "grid gap-8 lg:grid-cols-12 lg:items-start", children: [
|
|
881
885
|
/* @__PURE__ */ e("div", { className: "lg:col-span-8 space-y-6", children: [
|
|
882
886
|
/* @__PURE__ */ e(G, { children: [
|
|
883
887
|
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(X, { className: "flex items-center gap-2", children: [
|
|
884
|
-
/* @__PURE__ */ e(
|
|
888
|
+
/* @__PURE__ */ e(fs, { className: "w-5 h-5" }, void 0, !1, {
|
|
885
889
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
886
|
-
lineNumber:
|
|
890
|
+
lineNumber: 948,
|
|
887
891
|
columnNumber: 19
|
|
888
892
|
}, void 0),
|
|
889
893
|
c("ecommerce.contact_information")
|
|
890
894
|
] }, void 0, !0, {
|
|
891
895
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
892
|
-
lineNumber:
|
|
896
|
+
lineNumber: 947,
|
|
893
897
|
columnNumber: 17
|
|
894
898
|
}, void 0) }, void 0, !1, {
|
|
895
899
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
896
|
-
lineNumber:
|
|
900
|
+
lineNumber: 946,
|
|
897
901
|
columnNumber: 15
|
|
898
902
|
}, void 0),
|
|
899
903
|
/* @__PURE__ */ e(V, { className: "space-y-4", children: [
|
|
900
904
|
P ? /* @__PURE__ */ e("div", { className: "rounded-xl border bg-muted/20 p-4 text-sm text-muted-foreground", children: c("checkout_prefill_notice", { email: n?.email || "" }) }, void 0, !1, {
|
|
901
905
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
902
|
-
lineNumber:
|
|
906
|
+
lineNumber: 954,
|
|
903
907
|
columnNumber: 19
|
|
904
908
|
}, void 0) : /* @__PURE__ */ e("div", { className: "space-y-2", children: [
|
|
905
909
|
/* @__PURE__ */ e(v, { htmlFor: "checkout-email", children: [
|
|
@@ -907,16 +911,16 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
907
911
|
" ",
|
|
908
912
|
/* @__PURE__ */ e("span", { className: "text-destructive", children: "*" }, void 0, !1, {
|
|
909
913
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
910
|
-
lineNumber:
|
|
914
|
+
lineNumber: 960,
|
|
911
915
|
columnNumber: 54
|
|
912
916
|
}, void 0)
|
|
913
917
|
] }, void 0, !0, {
|
|
914
918
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
915
|
-
lineNumber:
|
|
919
|
+
lineNumber: 959,
|
|
916
920
|
columnNumber: 21
|
|
917
921
|
}, void 0),
|
|
918
922
|
/* @__PURE__ */ e(
|
|
919
|
-
|
|
923
|
+
H,
|
|
920
924
|
{
|
|
921
925
|
id: "checkout-email",
|
|
922
926
|
type: "email",
|
|
@@ -931,29 +935,29 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
931
935
|
!1,
|
|
932
936
|
{
|
|
933
937
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
934
|
-
lineNumber:
|
|
938
|
+
lineNumber: 962,
|
|
935
939
|
columnNumber: 21
|
|
936
940
|
},
|
|
937
941
|
void 0
|
|
938
942
|
),
|
|
939
943
|
L ? /* @__PURE__ */ e("p", { className: "text-xs text-destructive mt-1", children: L }, void 0, !1, {
|
|
940
944
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
941
|
-
lineNumber:
|
|
945
|
+
lineNumber: 975,
|
|
942
946
|
columnNumber: 35
|
|
943
947
|
}, void 0) : null
|
|
944
948
|
] }, void 0, !0, {
|
|
945
949
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
946
|
-
lineNumber:
|
|
950
|
+
lineNumber: 958,
|
|
947
951
|
columnNumber: 19
|
|
948
952
|
}, void 0),
|
|
949
953
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: [
|
|
950
954
|
/* @__PURE__ */ e(v, { htmlFor: "checkout-phone", children: c("phone_number") }, void 0, !1, {
|
|
951
955
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
952
|
-
lineNumber:
|
|
956
|
+
lineNumber: 980,
|
|
953
957
|
columnNumber: 19
|
|
954
958
|
}, void 0),
|
|
955
959
|
/* @__PURE__ */ e(
|
|
956
|
-
|
|
960
|
+
H,
|
|
957
961
|
{
|
|
958
962
|
id: "checkout-phone",
|
|
959
963
|
placeholder: c("optional"),
|
|
@@ -964,57 +968,57 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
964
968
|
!1,
|
|
965
969
|
{
|
|
966
970
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
967
|
-
lineNumber:
|
|
971
|
+
lineNumber: 981,
|
|
968
972
|
columnNumber: 19
|
|
969
973
|
},
|
|
970
974
|
void 0
|
|
971
975
|
)
|
|
972
976
|
] }, void 0, !0, {
|
|
973
977
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
974
|
-
lineNumber:
|
|
978
|
+
lineNumber: 979,
|
|
975
979
|
columnNumber: 17
|
|
976
980
|
}, void 0)
|
|
977
981
|
] }, void 0, !0, {
|
|
978
982
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
979
|
-
lineNumber:
|
|
983
|
+
lineNumber: 952,
|
|
980
984
|
columnNumber: 15
|
|
981
985
|
}, void 0)
|
|
982
986
|
] }, void 0, !0, {
|
|
983
987
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
984
|
-
lineNumber:
|
|
988
|
+
lineNumber: 945,
|
|
985
989
|
columnNumber: 13
|
|
986
990
|
}, void 0),
|
|
987
991
|
/* @__PURE__ */ e(
|
|
988
|
-
|
|
992
|
+
ze,
|
|
989
993
|
{
|
|
990
994
|
idPrefix: "billing",
|
|
991
995
|
title: c("billing_address"),
|
|
992
996
|
description: c("checkout_billing_address_help"),
|
|
993
997
|
value: B,
|
|
994
|
-
onChange:
|
|
998
|
+
onChange: Re
|
|
995
999
|
},
|
|
996
1000
|
void 0,
|
|
997
1001
|
!1,
|
|
998
1002
|
{
|
|
999
1003
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1000
|
-
lineNumber:
|
|
1004
|
+
lineNumber: 991,
|
|
1001
1005
|
columnNumber: 13
|
|
1002
1006
|
},
|
|
1003
1007
|
void 0
|
|
1004
1008
|
),
|
|
1005
1009
|
_ ? /* @__PURE__ */ e("div", { className: "flex items-center space-x-3 rounded-xl border bg-muted/20 p-4", children: [
|
|
1006
1010
|
/* @__PURE__ */ e(
|
|
1007
|
-
|
|
1011
|
+
ms,
|
|
1008
1012
|
{
|
|
1009
1013
|
id: "use-billing-for-shipping",
|
|
1010
1014
|
checked: $,
|
|
1011
|
-
onCheckedChange: (s) =>
|
|
1015
|
+
onCheckedChange: (s) => Ue(!!s)
|
|
1012
1016
|
},
|
|
1013
1017
|
void 0,
|
|
1014
1018
|
!1,
|
|
1015
1019
|
{
|
|
1016
1020
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1017
|
-
lineNumber:
|
|
1021
|
+
lineNumber: 1001,
|
|
1018
1022
|
columnNumber: 17
|
|
1019
1023
|
},
|
|
1020
1024
|
void 0
|
|
@@ -1022,66 +1026,66 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1022
1026
|
/* @__PURE__ */ e("div", { className: "space-y-1", children: [
|
|
1023
1027
|
/* @__PURE__ */ e(v, { htmlFor: "use-billing-for-shipping", className: "cursor-pointer", children: c("use_billing_for_shipping") }, void 0, !1, {
|
|
1024
1028
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1025
|
-
lineNumber:
|
|
1029
|
+
lineNumber: 1007,
|
|
1026
1030
|
columnNumber: 19
|
|
1027
1031
|
}, void 0),
|
|
1028
1032
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: c("checkout_use_billing_for_shipping_help") }, void 0, !1, {
|
|
1029
1033
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1030
|
-
lineNumber:
|
|
1034
|
+
lineNumber: 1010,
|
|
1031
1035
|
columnNumber: 19
|
|
1032
1036
|
}, void 0)
|
|
1033
1037
|
] }, void 0, !0, {
|
|
1034
1038
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1035
|
-
lineNumber:
|
|
1039
|
+
lineNumber: 1006,
|
|
1036
1040
|
columnNumber: 17
|
|
1037
1041
|
}, void 0)
|
|
1038
1042
|
] }, void 0, !0, {
|
|
1039
1043
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1040
|
-
lineNumber:
|
|
1044
|
+
lineNumber: 1e3,
|
|
1041
1045
|
columnNumber: 15
|
|
1042
1046
|
}, void 0) : null,
|
|
1043
1047
|
_ && !$ ? /* @__PURE__ */ e(
|
|
1044
|
-
|
|
1048
|
+
ze,
|
|
1045
1049
|
{
|
|
1046
1050
|
idPrefix: "shipping",
|
|
1047
1051
|
title: c("shipping_address"),
|
|
1048
1052
|
description: c("checkout_shipping_address_help"),
|
|
1049
1053
|
value: M,
|
|
1050
|
-
onChange:
|
|
1054
|
+
onChange: Be
|
|
1051
1055
|
},
|
|
1052
1056
|
void 0,
|
|
1053
1057
|
!1,
|
|
1054
1058
|
{
|
|
1055
1059
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1056
|
-
lineNumber:
|
|
1060
|
+
lineNumber: 1018,
|
|
1057
1061
|
columnNumber: 15
|
|
1058
1062
|
},
|
|
1059
1063
|
void 0
|
|
1060
1064
|
) : null,
|
|
1061
1065
|
_ ? /* @__PURE__ */ e(G, { children: [
|
|
1062
1066
|
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(X, { className: "flex items-center gap-2", children: [
|
|
1063
|
-
/* @__PURE__ */ e(
|
|
1067
|
+
/* @__PURE__ */ e(hs, { className: "w-5 h-5 text-primary" }, void 0, !1, {
|
|
1064
1068
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1065
|
-
lineNumber:
|
|
1069
|
+
lineNumber: 1031,
|
|
1066
1070
|
columnNumber: 21
|
|
1067
1071
|
}, void 0),
|
|
1068
1072
|
c("ecommerce.shipping_method")
|
|
1069
1073
|
] }, void 0, !0, {
|
|
1070
1074
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1071
|
-
lineNumber:
|
|
1075
|
+
lineNumber: 1030,
|
|
1072
1076
|
columnNumber: 19
|
|
1073
1077
|
}, void 0) }, void 0, !1, {
|
|
1074
1078
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1075
|
-
lineNumber:
|
|
1079
|
+
lineNumber: 1029,
|
|
1076
1080
|
columnNumber: 17
|
|
1077
1081
|
}, void 0),
|
|
1078
|
-
/* @__PURE__ */ e(V, { children:
|
|
1082
|
+
/* @__PURE__ */ e(V, { children: De ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ e(ke, { className: "w-6 h-6 animate-spin text-muted-foreground" }, void 0, !1, {
|
|
1079
1083
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1080
|
-
lineNumber:
|
|
1084
|
+
lineNumber: 1038,
|
|
1081
1085
|
columnNumber: 23
|
|
1082
1086
|
}, void 0) }, void 0, !1, {
|
|
1083
1087
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1084
|
-
lineNumber:
|
|
1088
|
+
lineNumber: 1037,
|
|
1085
1089
|
columnNumber: 21
|
|
1086
1090
|
}, void 0) : q.length > 0 ? /* @__PURE__ */ e("div", { className: "space-y-3", children: q.map((s) => /* @__PURE__ */ e(
|
|
1087
1091
|
"div",
|
|
@@ -1096,7 +1100,7 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1096
1100
|
className: `w-4 h-4 rounded-full border flex items-center justify-center ${x === s.id ? "border-primary" : "border-neutral-300"}`,
|
|
1097
1101
|
children: x === s.id ? /* @__PURE__ */ e("div", { className: "w-2 h-2 rounded-full bg-primary" }, void 0, !1, {
|
|
1098
1102
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1099
|
-
lineNumber:
|
|
1103
|
+
lineNumber: 1059,
|
|
1100
1104
|
columnNumber: 33
|
|
1101
1105
|
}, void 0) : null
|
|
1102
1106
|
},
|
|
@@ -1104,24 +1108,24 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1104
1108
|
!1,
|
|
1105
1109
|
{
|
|
1106
1110
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1107
|
-
lineNumber:
|
|
1111
|
+
lineNumber: 1053,
|
|
1108
1112
|
columnNumber: 29
|
|
1109
1113
|
},
|
|
1110
1114
|
void 0
|
|
1111
1115
|
),
|
|
1112
1116
|
/* @__PURE__ */ e("span", { className: "font-medium", children: s.name }, void 0, !1, {
|
|
1113
1117
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1114
|
-
lineNumber:
|
|
1118
|
+
lineNumber: 1062,
|
|
1115
1119
|
columnNumber: 29
|
|
1116
1120
|
}, void 0)
|
|
1117
1121
|
] }, void 0, !0, {
|
|
1118
1122
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1119
|
-
lineNumber:
|
|
1123
|
+
lineNumber: 1052,
|
|
1120
1124
|
columnNumber: 27
|
|
1121
1125
|
}, void 0),
|
|
1122
1126
|
/* @__PURE__ */ e("span", { className: "font-bold", children: h(s.amount, t) }, void 0, !1, {
|
|
1123
1127
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1124
|
-
lineNumber:
|
|
1128
|
+
lineNumber: 1064,
|
|
1125
1129
|
columnNumber: 27
|
|
1126
1130
|
}, void 0)
|
|
1127
1131
|
]
|
|
@@ -1130,84 +1134,84 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1130
1134
|
!0,
|
|
1131
1135
|
{
|
|
1132
1136
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1133
|
-
lineNumber:
|
|
1137
|
+
lineNumber: 1043,
|
|
1134
1138
|
columnNumber: 25
|
|
1135
1139
|
},
|
|
1136
1140
|
void 0
|
|
1137
1141
|
)) }, void 0, !1, {
|
|
1138
1142
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1139
|
-
lineNumber:
|
|
1143
|
+
lineNumber: 1041,
|
|
1140
1144
|
columnNumber: 21
|
|
1141
1145
|
}, void 0) : /* @__PURE__ */ e("div", { className: "py-4 text-center text-muted-foreground bg-muted/30 rounded-lg italic", children: ce ? c("ecommerce.no_rates_for_region") : o(
|
|
1142
1146
|
"ecommerce.waiting_on_address_info",
|
|
1143
1147
|
"Complete your shipping address to view available shipping options."
|
|
1144
1148
|
) }, void 0, !1, {
|
|
1145
1149
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1146
|
-
lineNumber:
|
|
1150
|
+
lineNumber: 1071,
|
|
1147
1151
|
columnNumber: 21
|
|
1148
1152
|
}, void 0) }, void 0, !1, {
|
|
1149
1153
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1150
|
-
lineNumber:
|
|
1154
|
+
lineNumber: 1035,
|
|
1151
1155
|
columnNumber: 17
|
|
1152
1156
|
}, void 0)
|
|
1153
1157
|
] }, void 0, !0, {
|
|
1154
1158
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1155
|
-
lineNumber:
|
|
1159
|
+
lineNumber: 1028,
|
|
1156
1160
|
columnNumber: 15
|
|
1157
1161
|
}, void 0) : null
|
|
1158
1162
|
] }, void 0, !0, {
|
|
1159
1163
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1160
|
-
lineNumber:
|
|
1164
|
+
lineNumber: 944,
|
|
1161
1165
|
columnNumber: 11
|
|
1162
1166
|
}, void 0),
|
|
1163
1167
|
/* @__PURE__ */ e("div", { className: "lg:col-span-4 space-y-6", children: [
|
|
1164
1168
|
/* @__PURE__ */ e(G, { className: "top-6", children: [
|
|
1165
1169
|
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(X, { children: c("ecommerce.order_summary") }, void 0, !1, {
|
|
1166
1170
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1167
|
-
lineNumber:
|
|
1171
|
+
lineNumber: 1088,
|
|
1168
1172
|
columnNumber: 17
|
|
1169
1173
|
}, void 0) }, void 0, !1, {
|
|
1170
1174
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1171
|
-
lineNumber:
|
|
1175
|
+
lineNumber: 1087,
|
|
1172
1176
|
columnNumber: 15
|
|
1173
1177
|
}, void 0),
|
|
1174
1178
|
/* @__PURE__ */ e(V, { className: "space-y-4", children: [
|
|
1175
1179
|
/* @__PURE__ */ e("div", { className: "space-y-3 max-h-[260px] overflow-y-auto pr-2", children: C.map((s) => {
|
|
1176
|
-
const r =
|
|
1180
|
+
const r = ve(s, {
|
|
1177
1181
|
currencyCode: t,
|
|
1178
|
-
currencies:
|
|
1179
|
-
}), u =
|
|
1182
|
+
currencies: A
|
|
1183
|
+
}), u = Le(s);
|
|
1180
1184
|
return /* @__PURE__ */ e("div", { className: "flex items-start justify-between gap-4", children: [
|
|
1181
1185
|
/* @__PURE__ */ e("div", { className: "flex gap-3", children: [
|
|
1182
1186
|
s.image_url ? /* @__PURE__ */ e("div", { className: "h-10 w-10 shrink-0 overflow-hidden rounded border bg-neutral-100", children: /* @__PURE__ */ e("img", { src: s.image_url, alt: s.title, className: "h-full w-full object-cover" }, void 0, !1, {
|
|
1183
1187
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1184
|
-
lineNumber:
|
|
1188
|
+
lineNumber: 1104,
|
|
1185
1189
|
columnNumber: 31
|
|
1186
1190
|
}, void 0) }, void 0, !1, {
|
|
1187
1191
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1188
|
-
lineNumber:
|
|
1192
|
+
lineNumber: 1103,
|
|
1189
1193
|
columnNumber: 29
|
|
1190
1194
|
}, void 0) : null,
|
|
1191
1195
|
/* @__PURE__ */ e("div", { className: "grid gap-0.5", children: [
|
|
1192
1196
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: [
|
|
1193
1197
|
/* @__PURE__ */ e("span", { className: "font-medium text-xs line-clamp-1", children: s.title }, void 0, !1, {
|
|
1194
1198
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1195
|
-
lineNumber:
|
|
1199
|
+
lineNumber: 1109,
|
|
1196
1200
|
columnNumber: 31
|
|
1197
1201
|
}, void 0),
|
|
1198
|
-
/* @__PURE__ */ e(
|
|
1202
|
+
/* @__PURE__ */ e(qe, { variant: "outline", className: "text-[9px] uppercase", children: ns(s) }, void 0, !1, {
|
|
1199
1203
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1200
|
-
lineNumber:
|
|
1204
|
+
lineNumber: 1110,
|
|
1201
1205
|
columnNumber: 31
|
|
1202
1206
|
}, void 0)
|
|
1203
1207
|
] }, void 0, !0, {
|
|
1204
1208
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1205
|
-
lineNumber:
|
|
1209
|
+
lineNumber: 1108,
|
|
1206
1210
|
columnNumber: 29
|
|
1207
1211
|
}, void 0),
|
|
1208
1212
|
s.variant_label ? /* @__PURE__ */ e("span", { className: "text-[10px] text-muted-foreground line-clamp-1", children: s.variant_label }, void 0, !1, {
|
|
1209
1213
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1210
|
-
lineNumber:
|
|
1214
|
+
lineNumber: 1115,
|
|
1211
1215
|
columnNumber: 31
|
|
1212
1216
|
}, void 0) : null,
|
|
1213
1217
|
/* @__PURE__ */ e("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
@@ -1216,7 +1220,7 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1216
1220
|
s.quantity
|
|
1217
1221
|
] }, void 0, !0, {
|
|
1218
1222
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1219
|
-
lineNumber:
|
|
1223
|
+
lineNumber: 1119,
|
|
1220
1224
|
columnNumber: 29
|
|
1221
1225
|
}, void 0),
|
|
1222
1226
|
u ? /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-emerald-700", children: [
|
|
@@ -1225,17 +1229,17 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1225
1229
|
u.paymentRequirementLabel
|
|
1226
1230
|
] }, void 0, !0, {
|
|
1227
1231
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1228
|
-
lineNumber:
|
|
1232
|
+
lineNumber: 1123,
|
|
1229
1233
|
columnNumber: 31
|
|
1230
1234
|
}, void 0) : null
|
|
1231
1235
|
] }, void 0, !0, {
|
|
1232
1236
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1233
|
-
lineNumber:
|
|
1237
|
+
lineNumber: 1107,
|
|
1234
1238
|
columnNumber: 27
|
|
1235
1239
|
}, void 0)
|
|
1236
1240
|
] }, void 0, !0, {
|
|
1237
1241
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1238
|
-
lineNumber:
|
|
1242
|
+
lineNumber: 1101,
|
|
1239
1243
|
columnNumber: 25
|
|
1240
1244
|
}, void 0),
|
|
1241
1245
|
/* @__PURE__ */ e("div", { className: "flex flex-col items-end gap-0.5 shrink-0", children: [
|
|
@@ -1244,46 +1248,46 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1244
1248
|
t
|
|
1245
1249
|
) }, void 0, !1, {
|
|
1246
1250
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1247
|
-
lineNumber:
|
|
1251
|
+
lineNumber: 1130,
|
|
1248
1252
|
columnNumber: 27
|
|
1249
1253
|
}, void 0),
|
|
1250
1254
|
r.sale_price ? /* @__PURE__ */ e("span", { className: "text-[9px] text-muted-foreground line-through", children: h(r.price * s.quantity, t) }, void 0, !1, {
|
|
1251
1255
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1252
|
-
lineNumber:
|
|
1256
|
+
lineNumber: 1137,
|
|
1253
1257
|
columnNumber: 29
|
|
1254
1258
|
}, void 0) : null
|
|
1255
1259
|
] }, void 0, !0, {
|
|
1256
1260
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1257
|
-
lineNumber:
|
|
1261
|
+
lineNumber: 1129,
|
|
1258
1262
|
columnNumber: 25
|
|
1259
1263
|
}, void 0)
|
|
1260
1264
|
] }, `${s.id}-${s.variant_id || "base"}`, !0, {
|
|
1261
1265
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1262
|
-
lineNumber:
|
|
1266
|
+
lineNumber: 1100,
|
|
1263
1267
|
columnNumber: 23
|
|
1264
1268
|
}, void 0);
|
|
1265
1269
|
}) }, void 0, !1, {
|
|
1266
1270
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1267
|
-
lineNumber:
|
|
1271
|
+
lineNumber: 1091,
|
|
1268
1272
|
columnNumber: 17
|
|
1269
1273
|
}, void 0),
|
|
1270
|
-
/* @__PURE__ */ e(
|
|
1274
|
+
/* @__PURE__ */ e(ds, {}, void 0, !1, {
|
|
1271
1275
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1272
|
-
lineNumber:
|
|
1276
|
+
lineNumber: 1147,
|
|
1273
1277
|
columnNumber: 17
|
|
1274
1278
|
}, void 0),
|
|
1275
1279
|
/* @__PURE__ */ e(
|
|
1276
|
-
|
|
1280
|
+
ys,
|
|
1277
1281
|
{
|
|
1278
1282
|
items: C,
|
|
1279
1283
|
currencyCode: t,
|
|
1280
|
-
onQuoteChange:
|
|
1284
|
+
onQuoteChange: Qe
|
|
1281
1285
|
},
|
|
1282
1286
|
void 0,
|
|
1283
1287
|
!1,
|
|
1284
1288
|
{
|
|
1285
1289
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1286
|
-
lineNumber:
|
|
1290
|
+
lineNumber: 1149,
|
|
1287
1291
|
columnNumber: 17
|
|
1288
1292
|
},
|
|
1289
1293
|
void 0
|
|
@@ -1292,17 +1296,17 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1292
1296
|
/* @__PURE__ */ e("div", { className: "flex justify-between", children: [
|
|
1293
1297
|
/* @__PURE__ */ e("span", { children: c("ecommerce.subtotal") }, void 0, !1, {
|
|
1294
1298
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1295
|
-
lineNumber:
|
|
1299
|
+
lineNumber: 1157,
|
|
1296
1300
|
columnNumber: 21
|
|
1297
1301
|
}, void 0),
|
|
1298
|
-
/* @__PURE__ */ e("span", { children: h(
|
|
1302
|
+
/* @__PURE__ */ e("span", { children: h(Xe, t) }, void 0, !1, {
|
|
1299
1303
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1300
|
-
lineNumber:
|
|
1304
|
+
lineNumber: 1158,
|
|
1301
1305
|
columnNumber: 21
|
|
1302
1306
|
}, void 0)
|
|
1303
1307
|
] }, void 0, !0, {
|
|
1304
1308
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1305
|
-
lineNumber:
|
|
1309
|
+
lineNumber: 1156,
|
|
1306
1310
|
columnNumber: 19
|
|
1307
1311
|
}, void 0),
|
|
1308
1312
|
g.length > 0 ? /* @__PURE__ */ e("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
@@ -1311,17 +1315,17 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1311
1315
|
"Physical products"
|
|
1312
1316
|
) }, void 0, !1, {
|
|
1313
1317
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1314
|
-
lineNumber:
|
|
1318
|
+
lineNumber: 1162,
|
|
1315
1319
|
columnNumber: 23
|
|
1316
1320
|
}, void 0),
|
|
1317
1321
|
/* @__PURE__ */ e("span", { children: h(ue, t) }, void 0, !1, {
|
|
1318
1322
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1319
|
-
lineNumber:
|
|
1323
|
+
lineNumber: 1168,
|
|
1320
1324
|
columnNumber: 23
|
|
1321
1325
|
}, void 0)
|
|
1322
1326
|
] }, void 0, !0, {
|
|
1323
1327
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1324
|
-
lineNumber:
|
|
1328
|
+
lineNumber: 1161,
|
|
1325
1329
|
columnNumber: 21
|
|
1326
1330
|
}, void 0) : null,
|
|
1327
1331
|
D.length > 0 ? /* @__PURE__ */ e("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
@@ -1330,41 +1334,41 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1330
1334
|
"Digital products"
|
|
1331
1335
|
) }, void 0, !1, {
|
|
1332
1336
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1333
|
-
lineNumber:
|
|
1337
|
+
lineNumber: 1173,
|
|
1334
1338
|
columnNumber: 23
|
|
1335
1339
|
}, void 0),
|
|
1336
1340
|
/* @__PURE__ */ e("span", { children: h(ae, t) }, void 0, !1, {
|
|
1337
1341
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1338
|
-
lineNumber:
|
|
1342
|
+
lineNumber: 1179,
|
|
1339
1343
|
columnNumber: 23
|
|
1340
1344
|
}, void 0)
|
|
1341
1345
|
] }, void 0, !0, {
|
|
1342
1346
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1343
|
-
lineNumber:
|
|
1347
|
+
lineNumber: 1172,
|
|
1344
1348
|
columnNumber: 21
|
|
1345
1349
|
}, void 0) : null,
|
|
1346
|
-
|
|
1350
|
+
T ? /* @__PURE__ */ e("div", { className: "flex justify-between text-emerald-600", children: [
|
|
1347
1351
|
/* @__PURE__ */ e("span", { children: [
|
|
1348
1352
|
o("ecommerce.discount", "Discount"),
|
|
1349
1353
|
" (",
|
|
1350
|
-
|
|
1354
|
+
T.code,
|
|
1351
1355
|
")"
|
|
1352
1356
|
] }, void 0, !0, {
|
|
1353
1357
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1354
|
-
lineNumber:
|
|
1358
|
+
lineNumber: 1184,
|
|
1355
1359
|
columnNumber: 23
|
|
1356
1360
|
}, void 0),
|
|
1357
1361
|
/* @__PURE__ */ e("span", { children: [
|
|
1358
1362
|
"-",
|
|
1359
|
-
h(
|
|
1363
|
+
h(T.discountTotal, t)
|
|
1360
1364
|
] }, void 0, !0, {
|
|
1361
1365
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1362
|
-
lineNumber:
|
|
1366
|
+
lineNumber: 1187,
|
|
1363
1367
|
columnNumber: 23
|
|
1364
1368
|
}, void 0)
|
|
1365
1369
|
] }, void 0, !0, {
|
|
1366
1370
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1367
|
-
lineNumber:
|
|
1371
|
+
lineNumber: 1183,
|
|
1368
1372
|
columnNumber: 21
|
|
1369
1373
|
}, void 0) : null,
|
|
1370
1374
|
(g.length > 0 || D.length > 0) && /* @__PURE__ */ e("div", { className: "flex justify-between font-bold text-lg pt-2 border-t mt-2", children: [
|
|
@@ -1373,36 +1377,36 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1373
1377
|
"Estimated total"
|
|
1374
1378
|
) }, void 0, !1, {
|
|
1375
1379
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1376
|
-
lineNumber:
|
|
1380
|
+
lineNumber: 1192,
|
|
1377
1381
|
columnNumber: 23
|
|
1378
1382
|
}, void 0),
|
|
1379
|
-
/* @__PURE__ */ e("span", { className: "text-primary", children: h(
|
|
1383
|
+
/* @__PURE__ */ e("span", { className: "text-primary", children: h(Ye, t) }, void 0, !1, {
|
|
1380
1384
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1381
|
-
lineNumber:
|
|
1385
|
+
lineNumber: 1198,
|
|
1382
1386
|
columnNumber: 23
|
|
1383
1387
|
}, void 0)
|
|
1384
1388
|
] }, void 0, !0, {
|
|
1385
1389
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1386
|
-
lineNumber:
|
|
1390
|
+
lineNumber: 1191,
|
|
1387
1391
|
columnNumber: 21
|
|
1388
1392
|
}, void 0)
|
|
1389
1393
|
] }, void 0, !0, {
|
|
1390
1394
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1391
|
-
lineNumber:
|
|
1395
|
+
lineNumber: 1155,
|
|
1392
1396
|
columnNumber: 17
|
|
1393
1397
|
}, void 0)
|
|
1394
1398
|
] }, void 0, !0, {
|
|
1395
1399
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1396
|
-
lineNumber:
|
|
1400
|
+
lineNumber: 1090,
|
|
1397
1401
|
columnNumber: 15
|
|
1398
1402
|
}, void 0)
|
|
1399
1403
|
] }, void 0, !0, {
|
|
1400
1404
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1401
|
-
lineNumber:
|
|
1405
|
+
lineNumber: 1086,
|
|
1402
1406
|
columnNumber: 13
|
|
1403
1407
|
}, void 0),
|
|
1404
1408
|
g.length > 0 ? /* @__PURE__ */ e(
|
|
1405
|
-
|
|
1409
|
+
Oe,
|
|
1406
1410
|
{
|
|
1407
1411
|
title: o(
|
|
1408
1412
|
"ecommerce.stripe_checkout_title",
|
|
@@ -1412,7 +1416,7 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1412
1416
|
"ecommerce.stripe_checkout_description",
|
|
1413
1417
|
"Pay for physical products in one Stripe checkout session."
|
|
1414
1418
|
),
|
|
1415
|
-
badgeLabel:
|
|
1419
|
+
badgeLabel: es,
|
|
1416
1420
|
children: [
|
|
1417
1421
|
/* @__PURE__ */ e("div", { className: "space-y-2 text-sm", children: [
|
|
1418
1422
|
/* @__PURE__ */ e("div", { className: "flex justify-between", children: [
|
|
@@ -1421,23 +1425,23 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1421
1425
|
"Physical subtotal"
|
|
1422
1426
|
) }, void 0, !1, {
|
|
1423
1427
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1424
|
-
lineNumber:
|
|
1428
|
+
lineNumber: 1221,
|
|
1425
1429
|
columnNumber: 21
|
|
1426
1430
|
}, void 0),
|
|
1427
1431
|
/* @__PURE__ */ e("span", { children: h(ue, t) }, void 0, !1, {
|
|
1428
1432
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1429
|
-
lineNumber:
|
|
1433
|
+
lineNumber: 1227,
|
|
1430
1434
|
columnNumber: 21
|
|
1431
1435
|
}, void 0)
|
|
1432
1436
|
] }, void 0, !0, {
|
|
1433
1437
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1434
|
-
lineNumber:
|
|
1438
|
+
lineNumber: 1220,
|
|
1435
1439
|
columnNumber: 19
|
|
1436
1440
|
}, void 0),
|
|
1437
1441
|
Ne > 0 ? /* @__PURE__ */ e("div", { className: "flex justify-between text-emerald-600", children: [
|
|
1438
1442
|
/* @__PURE__ */ e("span", { children: o("ecommerce.discount", "Discount") }, void 0, !1, {
|
|
1439
1443
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1440
|
-
lineNumber:
|
|
1444
|
+
lineNumber: 1231,
|
|
1441
1445
|
columnNumber: 23
|
|
1442
1446
|
}, void 0),
|
|
1443
1447
|
/* @__PURE__ */ e("span", { children: [
|
|
@@ -1445,47 +1449,47 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1445
1449
|
h(Ne, t)
|
|
1446
1450
|
] }, void 0, !0, {
|
|
1447
1451
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1448
|
-
lineNumber:
|
|
1452
|
+
lineNumber: 1234,
|
|
1449
1453
|
columnNumber: 23
|
|
1450
1454
|
}, void 0)
|
|
1451
1455
|
] }, void 0, !0, {
|
|
1452
1456
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1453
|
-
lineNumber:
|
|
1457
|
+
lineNumber: 1230,
|
|
1454
1458
|
columnNumber: 21
|
|
1455
1459
|
}, void 0) : null,
|
|
1456
1460
|
/* @__PURE__ */ e("div", { className: "flex justify-between", children: [
|
|
1457
1461
|
/* @__PURE__ */ e("span", { children: c("ecommerce.shipping") }, void 0, !1, {
|
|
1458
1462
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1459
|
-
lineNumber:
|
|
1463
|
+
lineNumber: 1238,
|
|
1460
1464
|
columnNumber: 21
|
|
1461
1465
|
}, void 0),
|
|
1462
1466
|
/* @__PURE__ */ e("span", { children: ie ? h(ie.amount, t) : "-" }, void 0, !1, {
|
|
1463
1467
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1464
|
-
lineNumber:
|
|
1468
|
+
lineNumber: 1239,
|
|
1465
1469
|
columnNumber: 21
|
|
1466
1470
|
}, void 0)
|
|
1467
1471
|
] }, void 0, !0, {
|
|
1468
1472
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1469
|
-
lineNumber:
|
|
1473
|
+
lineNumber: 1237,
|
|
1470
1474
|
columnNumber: 19
|
|
1471
1475
|
}, void 0),
|
|
1472
1476
|
/* @__PURE__ */ e("div", { className: "flex justify-between", children: [
|
|
1473
1477
|
/* @__PURE__ */ e("span", { children: o("ecommerce.tax", "Tax") }, void 0, !1, {
|
|
1474
1478
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1475
|
-
lineNumber:
|
|
1479
|
+
lineNumber: 1242,
|
|
1476
1480
|
columnNumber: 21
|
|
1477
1481
|
}, void 0),
|
|
1478
|
-
/* @__PURE__ */ e("span", { children:
|
|
1482
|
+
/* @__PURE__ */ e("span", { children: Ge ? "..." : j?.isPendingExternalCalculation ? o(
|
|
1479
1483
|
"ecommerce.tax_calculated_on_stripe",
|
|
1480
1484
|
"Calculated on Stripe"
|
|
1481
1485
|
) : j ? h(j.amount, t) : "-" }, void 0, !1, {
|
|
1482
1486
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1483
|
-
lineNumber:
|
|
1487
|
+
lineNumber: 1243,
|
|
1484
1488
|
columnNumber: 21
|
|
1485
1489
|
}, void 0)
|
|
1486
1490
|
] }, void 0, !0, {
|
|
1487
1491
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1488
|
-
lineNumber:
|
|
1492
|
+
lineNumber: 1241,
|
|
1489
1493
|
columnNumber: 19
|
|
1490
1494
|
}, void 0),
|
|
1491
1495
|
j && j.lines.length > 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg bg-muted/20 px-3 py-2 text-xs text-muted-foreground", children: j.lines.map((s) => /* @__PURE__ */ e("div", { className: "flex justify-between gap-3", children: [
|
|
@@ -1496,21 +1500,21 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1496
1500
|
"%)"
|
|
1497
1501
|
] }, void 0, !0, {
|
|
1498
1502
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1499
|
-
lineNumber:
|
|
1503
|
+
lineNumber: 1262,
|
|
1500
1504
|
columnNumber: 27
|
|
1501
1505
|
}, void 0),
|
|
1502
1506
|
/* @__PURE__ */ e("span", { children: h(s.amount, t) }, void 0, !1, {
|
|
1503
1507
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1504
|
-
lineNumber:
|
|
1508
|
+
lineNumber: 1265,
|
|
1505
1509
|
columnNumber: 27
|
|
1506
1510
|
}, void 0)
|
|
1507
1511
|
] }, s.id || `${s.name}-${s.rate}`, !0, {
|
|
1508
1512
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1509
|
-
lineNumber:
|
|
1513
|
+
lineNumber: 1261,
|
|
1510
1514
|
columnNumber: 25
|
|
1511
1515
|
}, void 0)) }, void 0, !1, {
|
|
1512
1516
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1513
|
-
lineNumber:
|
|
1517
|
+
lineNumber: 1259,
|
|
1514
1518
|
columnNumber: 21
|
|
1515
1519
|
}, void 0) : null,
|
|
1516
1520
|
/* @__PURE__ */ e("div", { className: "flex justify-between font-semibold pt-2 border-t", children: [
|
|
@@ -1519,39 +1523,39 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1519
1523
|
"Total on Stripe"
|
|
1520
1524
|
) }, void 0, !1, {
|
|
1521
1525
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1522
|
-
lineNumber:
|
|
1526
|
+
lineNumber: 1271,
|
|
1523
1527
|
columnNumber: 21
|
|
1524
1528
|
}, void 0),
|
|
1525
|
-
/* @__PURE__ */ e("span", { children: h(
|
|
1529
|
+
/* @__PURE__ */ e("span", { children: h(He, t) }, void 0, !1, {
|
|
1526
1530
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1527
|
-
lineNumber:
|
|
1531
|
+
lineNumber: 1277,
|
|
1528
1532
|
columnNumber: 21
|
|
1529
1533
|
}, void 0)
|
|
1530
1534
|
] }, void 0, !0, {
|
|
1531
1535
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1532
|
-
lineNumber:
|
|
1536
|
+
lineNumber: 1270,
|
|
1533
1537
|
columnNumber: 19
|
|
1534
1538
|
}, void 0)
|
|
1535
1539
|
] }, void 0, !0, {
|
|
1536
1540
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1537
|
-
lineNumber:
|
|
1541
|
+
lineNumber: 1219,
|
|
1538
1542
|
columnNumber: 17
|
|
1539
1543
|
}, void 0),
|
|
1540
1544
|
/* @__PURE__ */ e(
|
|
1541
|
-
|
|
1545
|
+
he,
|
|
1542
1546
|
{
|
|
1543
1547
|
className: "w-full",
|
|
1544
1548
|
size: "lg",
|
|
1545
|
-
onClick: () =>
|
|
1546
|
-
disabled:
|
|
1549
|
+
onClick: () => Fe("stripe", g, "stripe"),
|
|
1550
|
+
disabled: Ze,
|
|
1547
1551
|
children: [
|
|
1548
|
-
i === "stripe" ? /* @__PURE__ */ e(
|
|
1552
|
+
i === "stripe" ? /* @__PURE__ */ e(ke, { className: "mr-2 h-4 w-4 animate-spin" }, void 0, !1, {
|
|
1549
1553
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1550
|
-
lineNumber:
|
|
1554
|
+
lineNumber: 1288,
|
|
1551
1555
|
columnNumber: 21
|
|
1552
|
-
}, void 0) : /* @__PURE__ */ e(
|
|
1556
|
+
}, void 0) : /* @__PURE__ */ e(ks, { className: "mr-2 h-4 w-4" }, void 0, !1, {
|
|
1553
1557
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1554
|
-
lineNumber:
|
|
1558
|
+
lineNumber: 1290,
|
|
1555
1559
|
columnNumber: 21
|
|
1556
1560
|
}, void 0),
|
|
1557
1561
|
i === "stripe" ? c("ecommerce.processing") : o(
|
|
@@ -1564,19 +1568,19 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1564
1568
|
!0,
|
|
1565
1569
|
{
|
|
1566
1570
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1567
|
-
lineNumber:
|
|
1571
|
+
lineNumber: 1281,
|
|
1568
1572
|
columnNumber: 17
|
|
1569
1573
|
},
|
|
1570
1574
|
void 0
|
|
1571
1575
|
),
|
|
1572
|
-
|
|
1576
|
+
fe && i === null ? /* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: fe }, void 0, !1, {
|
|
1573
1577
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1574
|
-
lineNumber:
|
|
1578
|
+
lineNumber: 1301,
|
|
1575
1579
|
columnNumber: 19
|
|
1576
1580
|
}, void 0) : null,
|
|
1577
1581
|
N.stripe ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-destructive/20 bg-destructive/10 px-3 py-2 text-xs text-destructive", children: N.stripe }, void 0, !1, {
|
|
1578
1582
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1579
|
-
lineNumber:
|
|
1583
|
+
lineNumber: 1307,
|
|
1580
1584
|
columnNumber: 19
|
|
1581
1585
|
}, void 0) : null,
|
|
1582
1586
|
/* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: j?.isPendingExternalCalculation ? o(
|
|
@@ -1587,7 +1591,7 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1587
1591
|
"Shipping and taxes are only collected during the Stripe step for physical products."
|
|
1588
1592
|
) }, void 0, !1, {
|
|
1589
1593
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1590
|
-
lineNumber:
|
|
1594
|
+
lineNumber: 1312,
|
|
1591
1595
|
columnNumber: 17
|
|
1592
1596
|
}, void 0)
|
|
1593
1597
|
]
|
|
@@ -1596,13 +1600,13 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1596
1600
|
!0,
|
|
1597
1601
|
{
|
|
1598
1602
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1599
|
-
lineNumber:
|
|
1603
|
+
lineNumber: 1208,
|
|
1600
1604
|
columnNumber: 15
|
|
1601
1605
|
},
|
|
1602
1606
|
void 0
|
|
1603
1607
|
) : null,
|
|
1604
1608
|
D.length > 0 ? /* @__PURE__ */ e(
|
|
1605
|
-
|
|
1609
|
+
Oe,
|
|
1606
1610
|
{
|
|
1607
1611
|
title: o(
|
|
1608
1612
|
"ecommerce.freemius_checkout_title",
|
|
@@ -1612,24 +1616,24 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1612
1616
|
"ecommerce.freemius_checkout_description",
|
|
1613
1617
|
"Digital products use the Freemius checkout flow."
|
|
1614
1618
|
),
|
|
1615
|
-
badgeLabel:
|
|
1619
|
+
badgeLabel: ss,
|
|
1616
1620
|
children: [
|
|
1617
1621
|
/* @__PURE__ */ e("div", { className: "space-y-3", children: D.map((s) => {
|
|
1618
|
-
const r =
|
|
1622
|
+
const r = ve(s, {
|
|
1619
1623
|
currencyCode: t,
|
|
1620
|
-
currencies:
|
|
1621
|
-
}), u =
|
|
1624
|
+
currencies: A
|
|
1625
|
+
}), u = Le(s), d = `freemius:${s.id}`, p = u ? k[d] || "paid" : void 0;
|
|
1622
1626
|
return /* @__PURE__ */ e("div", { className: "rounded-lg border p-3 space-y-3", children: [
|
|
1623
1627
|
/* @__PURE__ */ e("div", { className: "flex items-start justify-between gap-3", children: [
|
|
1624
1628
|
/* @__PURE__ */ e("div", { children: [
|
|
1625
1629
|
/* @__PURE__ */ e("p", { className: "font-medium", children: s.title }, void 0, !1, {
|
|
1626
1630
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1627
|
-
lineNumber:
|
|
1631
|
+
lineNumber: 1354,
|
|
1628
1632
|
columnNumber: 29
|
|
1629
1633
|
}, void 0),
|
|
1630
|
-
s.billing_cycle ? /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground capitalize", children:
|
|
1634
|
+
s.billing_cycle ? /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground capitalize", children: os(s.billing_cycle) }, void 0, !1, {
|
|
1631
1635
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1632
|
-
lineNumber:
|
|
1636
|
+
lineNumber: 1356,
|
|
1633
1637
|
columnNumber: 31
|
|
1634
1638
|
}, void 0) : null,
|
|
1635
1639
|
u ? /* @__PURE__ */ e("p", { className: "text-xs font-medium text-emerald-700", children: [
|
|
@@ -1638,22 +1642,22 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1638
1642
|
u.paymentRequirementLabel
|
|
1639
1643
|
] }, void 0, !0, {
|
|
1640
1644
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1641
|
-
lineNumber:
|
|
1645
|
+
lineNumber: 1361,
|
|
1642
1646
|
columnNumber: 31
|
|
1643
1647
|
}, void 0) : null
|
|
1644
1648
|
] }, void 0, !0, {
|
|
1645
1649
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1646
|
-
lineNumber:
|
|
1650
|
+
lineNumber: 1353,
|
|
1647
1651
|
columnNumber: 27
|
|
1648
1652
|
}, void 0),
|
|
1649
1653
|
/* @__PURE__ */ e("span", { className: "font-medium", children: h(r.sale_price ?? r.price, t) }, void 0, !1, {
|
|
1650
1654
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1651
|
-
lineNumber:
|
|
1655
|
+
lineNumber: 1366,
|
|
1652
1656
|
columnNumber: 27
|
|
1653
1657
|
}, void 0)
|
|
1654
1658
|
] }, void 0, !0, {
|
|
1655
1659
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1656
|
-
lineNumber:
|
|
1660
|
+
lineNumber: 1352,
|
|
1657
1661
|
columnNumber: 25
|
|
1658
1662
|
}, void 0),
|
|
1659
1663
|
u && !s.trial_requires_payment_method && /* @__PURE__ */ e("div", { className: "bg-muted/30 p-3 rounded-md border text-sm mt-2 mb-3", children: [
|
|
@@ -1662,20 +1666,20 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1662
1666
|
"How would you like to start your trial?"
|
|
1663
1667
|
) }, void 0, !1, {
|
|
1664
1668
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1665
|
-
lineNumber:
|
|
1669
|
+
lineNumber: 1373,
|
|
1666
1670
|
columnNumber: 29
|
|
1667
1671
|
}, void 0),
|
|
1668
1672
|
/* @__PURE__ */ e(
|
|
1669
|
-
|
|
1673
|
+
us,
|
|
1670
1674
|
{
|
|
1671
1675
|
value: k[d] || "paid",
|
|
1672
1676
|
onValueChange: (a) => w((m) => ({ ...m, [d]: a })),
|
|
1673
1677
|
className: "gap-3",
|
|
1674
1678
|
children: [
|
|
1675
1679
|
/* @__PURE__ */ e("div", { className: "flex items-start space-x-3", children: [
|
|
1676
|
-
/* @__PURE__ */ e(
|
|
1680
|
+
/* @__PURE__ */ e(Ee, { value: "paid", id: `${d}-paid`, className: "mt-1" }, void 0, !1, {
|
|
1677
1681
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1678
|
-
lineNumber:
|
|
1682
|
+
lineNumber: 1385,
|
|
1679
1683
|
columnNumber: 33
|
|
1680
1684
|
}, void 0),
|
|
1681
1685
|
/* @__PURE__ */ e("div", { className: "grid gap-1.5", children: [
|
|
@@ -1684,7 +1688,7 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1684
1688
|
"Enter Payment Details Now (Still get full trial length free)"
|
|
1685
1689
|
) }, void 0, !1, {
|
|
1686
1690
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1687
|
-
lineNumber:
|
|
1691
|
+
lineNumber: 1387,
|
|
1688
1692
|
columnNumber: 35
|
|
1689
1693
|
}, void 0),
|
|
1690
1694
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: o(
|
|
@@ -1692,23 +1696,23 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1692
1696
|
"You will not be billed until the trial ends. Cancel anytime."
|
|
1693
1697
|
) }, void 0, !1, {
|
|
1694
1698
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1695
|
-
lineNumber:
|
|
1699
|
+
lineNumber: 1393,
|
|
1696
1700
|
columnNumber: 35
|
|
1697
1701
|
}, void 0)
|
|
1698
1702
|
] }, void 0, !0, {
|
|
1699
1703
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1700
|
-
lineNumber:
|
|
1704
|
+
lineNumber: 1386,
|
|
1701
1705
|
columnNumber: 33
|
|
1702
1706
|
}, void 0)
|
|
1703
1707
|
] }, void 0, !0, {
|
|
1704
1708
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1705
|
-
lineNumber:
|
|
1709
|
+
lineNumber: 1384,
|
|
1706
1710
|
columnNumber: 31
|
|
1707
1711
|
}, void 0),
|
|
1708
1712
|
/* @__PURE__ */ e("div", { className: "flex items-start space-x-3", children: [
|
|
1709
|
-
/* @__PURE__ */ e(
|
|
1713
|
+
/* @__PURE__ */ e(Ee, { value: "free", id: `${d}-free`, className: "mt-1" }, void 0, !1, {
|
|
1710
1714
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1711
|
-
lineNumber:
|
|
1715
|
+
lineNumber: 1402,
|
|
1712
1716
|
columnNumber: 33
|
|
1713
1717
|
}, void 0),
|
|
1714
1718
|
/* @__PURE__ */ e("div", { className: "grid gap-1.5", children: /* @__PURE__ */ e(v, { htmlFor: `${d}-free`, className: "font-medium leading-none cursor-pointer", children: o(
|
|
@@ -1716,16 +1720,16 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1716
1720
|
"Start Free Trial (No card required)"
|
|
1717
1721
|
) }, void 0, !1, {
|
|
1718
1722
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1719
|
-
lineNumber:
|
|
1723
|
+
lineNumber: 1404,
|
|
1720
1724
|
columnNumber: 35
|
|
1721
1725
|
}, void 0) }, void 0, !1, {
|
|
1722
1726
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1723
|
-
lineNumber:
|
|
1727
|
+
lineNumber: 1403,
|
|
1724
1728
|
columnNumber: 33
|
|
1725
1729
|
}, void 0)
|
|
1726
1730
|
] }, void 0, !0, {
|
|
1727
1731
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1728
|
-
lineNumber:
|
|
1732
|
+
lineNumber: 1401,
|
|
1729
1733
|
columnNumber: 31
|
|
1730
1734
|
}, void 0)
|
|
1731
1735
|
]
|
|
@@ -1734,21 +1738,21 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1734
1738
|
!0,
|
|
1735
1739
|
{
|
|
1736
1740
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1737
|
-
lineNumber:
|
|
1741
|
+
lineNumber: 1379,
|
|
1738
1742
|
columnNumber: 29
|
|
1739
1743
|
},
|
|
1740
1744
|
void 0
|
|
1741
1745
|
)
|
|
1742
1746
|
] }, void 0, !0, {
|
|
1743
1747
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1744
|
-
lineNumber:
|
|
1748
|
+
lineNumber: 1372,
|
|
1745
1749
|
columnNumber: 27
|
|
1746
1750
|
}, void 0),
|
|
1747
1751
|
/* @__PURE__ */ e(
|
|
1748
|
-
|
|
1752
|
+
he,
|
|
1749
1753
|
{
|
|
1750
1754
|
className: "w-full h-auto min-h-[2.75rem] py-2",
|
|
1751
|
-
onClick: () =>
|
|
1755
|
+
onClick: () => Fe(
|
|
1752
1756
|
"freemius",
|
|
1753
1757
|
[
|
|
1754
1758
|
{
|
|
@@ -1758,15 +1762,15 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1758
1762
|
],
|
|
1759
1763
|
d
|
|
1760
1764
|
),
|
|
1761
|
-
disabled: i !== null,
|
|
1765
|
+
disabled: i !== null || pe !== null,
|
|
1762
1766
|
children: [
|
|
1763
|
-
i === d ? /* @__PURE__ */ e(
|
|
1767
|
+
i === d ? /* @__PURE__ */ e(ke, { className: "mr-2 h-4 w-4 shrink-0 animate-spin" }, void 0, !1, {
|
|
1764
1768
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1765
|
-
lineNumber:
|
|
1769
|
+
lineNumber: 1435,
|
|
1766
1770
|
columnNumber: 29
|
|
1767
|
-
}, void 0) : /* @__PURE__ */ e(
|
|
1771
|
+
}, void 0) : /* @__PURE__ */ e(xs, { className: "mr-2 h-4 w-4 shrink-0" }, void 0, !1, {
|
|
1768
1772
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1769
|
-
lineNumber:
|
|
1773
|
+
lineNumber: 1437,
|
|
1770
1774
|
columnNumber: 29
|
|
1771
1775
|
}, void 0),
|
|
1772
1776
|
/* @__PURE__ */ e("span", { className: "whitespace-normal text-left", children: i === d ? c("ecommerce.processing") : D.length > 1 ? o(
|
|
@@ -1778,7 +1782,7 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1778
1782
|
"Checkout Digital Product"
|
|
1779
1783
|
) }, void 0, !1, {
|
|
1780
1784
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1781
|
-
lineNumber:
|
|
1785
|
+
lineNumber: 1439,
|
|
1782
1786
|
columnNumber: 27
|
|
1783
1787
|
}, void 0)
|
|
1784
1788
|
]
|
|
@@ -1787,19 +1791,19 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1787
1791
|
!0,
|
|
1788
1792
|
{
|
|
1789
1793
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1790
|
-
lineNumber:
|
|
1794
|
+
lineNumber: 1416,
|
|
1791
1795
|
columnNumber: 25
|
|
1792
1796
|
},
|
|
1793
1797
|
void 0
|
|
1794
1798
|
)
|
|
1795
1799
|
] }, d, !0, {
|
|
1796
1800
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1797
|
-
lineNumber:
|
|
1801
|
+
lineNumber: 1351,
|
|
1798
1802
|
columnNumber: 23
|
|
1799
1803
|
}, void 0);
|
|
1800
1804
|
}) }, void 0, !1, {
|
|
1801
1805
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1802
|
-
lineNumber:
|
|
1806
|
+
lineNumber: 1338,
|
|
1803
1807
|
columnNumber: 17
|
|
1804
1808
|
}, void 0),
|
|
1805
1809
|
/* @__PURE__ */ e("div", { className: "flex justify-between text-sm font-semibold border-t pt-3", children: [
|
|
@@ -1808,23 +1812,23 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1808
1812
|
"Digital subtotal"
|
|
1809
1813
|
) }, void 0, !1, {
|
|
1810
1814
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1811
|
-
lineNumber:
|
|
1815
|
+
lineNumber: 1460,
|
|
1812
1816
|
columnNumber: 19
|
|
1813
1817
|
}, void 0),
|
|
1814
1818
|
/* @__PURE__ */ e("span", { children: h(ae, t) }, void 0, !1, {
|
|
1815
1819
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1816
|
-
lineNumber:
|
|
1820
|
+
lineNumber: 1466,
|
|
1817
1821
|
columnNumber: 19
|
|
1818
1822
|
}, void 0)
|
|
1819
1823
|
] }, void 0, !0, {
|
|
1820
1824
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1821
|
-
lineNumber:
|
|
1825
|
+
lineNumber: 1459,
|
|
1822
1826
|
columnNumber: 17
|
|
1823
1827
|
}, void 0),
|
|
1824
1828
|
be > 0 ? /* @__PURE__ */ e("div", { className: "flex justify-between text-sm font-semibold text-emerald-600", children: [
|
|
1825
1829
|
/* @__PURE__ */ e("span", { children: o("ecommerce.discount", "Discount") }, void 0, !1, {
|
|
1826
1830
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1827
|
-
lineNumber:
|
|
1831
|
+
lineNumber: 1470,
|
|
1828
1832
|
columnNumber: 21
|
|
1829
1833
|
}, void 0),
|
|
1830
1834
|
/* @__PURE__ */ e("span", { children: [
|
|
@@ -1832,17 +1836,22 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1832
1836
|
h(be, t)
|
|
1833
1837
|
] }, void 0, !0, {
|
|
1834
1838
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1835
|
-
lineNumber:
|
|
1839
|
+
lineNumber: 1471,
|
|
1836
1840
|
columnNumber: 21
|
|
1837
1841
|
}, void 0)
|
|
1838
1842
|
] }, void 0, !0, {
|
|
1839
1843
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1840
|
-
lineNumber:
|
|
1844
|
+
lineNumber: 1469,
|
|
1845
|
+
columnNumber: 19
|
|
1846
|
+
}, void 0) : null,
|
|
1847
|
+
pe ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-xs", children: pe }, void 0, !1, {
|
|
1848
|
+
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1849
|
+
lineNumber: 1476,
|
|
1841
1850
|
columnNumber: 19
|
|
1842
1851
|
}, void 0) : null,
|
|
1843
1852
|
N.freemius ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-destructive/20 bg-destructive/10 px-3 py-2 text-xs text-destructive", children: N.freemius }, void 0, !1, {
|
|
1844
1853
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1845
|
-
lineNumber:
|
|
1854
|
+
lineNumber: 1482,
|
|
1846
1855
|
columnNumber: 19
|
|
1847
1856
|
}, void 0) : null,
|
|
1848
1857
|
/* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: D.length > 1 ? o(
|
|
@@ -1853,7 +1862,7 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1853
1862
|
"Taxes and compliance for digital products are handled inside the Freemius checkout."
|
|
1854
1863
|
) }, void 0, !1, {
|
|
1855
1864
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1856
|
-
lineNumber:
|
|
1865
|
+
lineNumber: 1487,
|
|
1857
1866
|
columnNumber: 17
|
|
1858
1867
|
}, void 0)
|
|
1859
1868
|
]
|
|
@@ -1862,32 +1871,32 @@ const Ys = ({ initialCustomer: n }) => {
|
|
|
1862
1871
|
!0,
|
|
1863
1872
|
{
|
|
1864
1873
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1865
|
-
lineNumber:
|
|
1874
|
+
lineNumber: 1327,
|
|
1866
1875
|
columnNumber: 15
|
|
1867
1876
|
},
|
|
1868
1877
|
void 0
|
|
1869
1878
|
) : null
|
|
1870
1879
|
] }, void 0, !0, {
|
|
1871
1880
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1872
|
-
lineNumber:
|
|
1881
|
+
lineNumber: 1085,
|
|
1873
1882
|
columnNumber: 11
|
|
1874
1883
|
}, void 0)
|
|
1875
1884
|
] }, void 0, !0, {
|
|
1876
1885
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1877
|
-
lineNumber:
|
|
1886
|
+
lineNumber: 943,
|
|
1878
1887
|
columnNumber: 9
|
|
1879
1888
|
}, void 0)
|
|
1880
1889
|
] }, void 0, !0, {
|
|
1881
1890
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1882
|
-
lineNumber:
|
|
1891
|
+
lineNumber: 940,
|
|
1883
1892
|
columnNumber: 7
|
|
1884
1893
|
}, void 0)
|
|
1885
1894
|
] }, void 0, !0, {
|
|
1886
1895
|
fileName: "C:/Users/desjardinsn/Desktop/NRH-NextBlock/libs/ecommerce/src/lib/components/Checkout.tsx",
|
|
1887
|
-
lineNumber:
|
|
1896
|
+
lineNumber: 937,
|
|
1888
1897
|
columnNumber: 5
|
|
1889
1898
|
}, void 0);
|
|
1890
1899
|
};
|
|
1891
1900
|
export {
|
|
1892
|
-
|
|
1901
|
+
on as Checkout
|
|
1893
1902
|
};
|