@getmicdrop/venue-calendar 4.0.16 → 4.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AirbnbSplitMain-BU6GgIpx.js → AirbnbSplitMain-CR7SsRG2.js} +4 -4
- package/dist/{AirbnbSplitMain-BU6GgIpx.js.map → AirbnbSplitMain-CR7SsRG2.js.map} +1 -1
- package/dist/{CarouselView.legacy-DsjjN4Mt.js → CarouselView.legacy-C0cRJS-3.js} +3 -3
- package/dist/{CarouselView.legacy-DsjjN4Mt.js.map → CarouselView.legacy-C0cRJS-3.js.map} +1 -1
- package/dist/CartView-DaYfGxiQ.js +1708 -0
- package/dist/CartView-DaYfGxiQ.js.map +1 -0
- package/dist/{Checkout-z52QUN3y.js → Checkout-5WyBsOUz.js} +4 -4
- package/dist/{Checkout-z52QUN3y.js.map → Checkout-5WyBsOUz.js.map} +1 -1
- package/dist/{Checkout.legacy-Ig9FPoDa.js → Checkout.legacy-x2UOIEi6.js} +28 -28
- package/dist/{Checkout.legacy-Ig9FPoDa.js.map → Checkout.legacy-x2UOIEi6.js.map} +1 -1
- package/dist/{CheckoutMain-Bh4PlLmD.js → CheckoutMain-DbwF9DJU.js} +4 -4
- package/dist/{CheckoutMain-Bh4PlLmD.js.map → CheckoutMain-DbwF9DJU.js.map} +1 -1
- package/dist/{CheckoutTimer-Cx4Bbxx8.js → CheckoutTimer-lq9B5TfI.js} +2 -2
- package/dist/{CheckoutTimer-Cx4Bbxx8.js.map → CheckoutTimer-lq9B5TfI.js.map} +1 -1
- package/dist/{CollectionView-6oc8Mlwb.js → CollectionView-DMp_ShDZ.js} +5 -5
- package/dist/{CollectionView-6oc8Mlwb.js.map → CollectionView-DMp_ShDZ.js.map} +1 -1
- package/dist/{CollectionView.legacy-BMTwRWq2.js → CollectionView.legacy-iqREDeXb.js} +24 -24
- package/dist/{CollectionView.legacy-BMTwRWq2.js.map → CollectionView.legacy-iqREDeXb.js.map} +1 -1
- package/dist/{EventDetailsView-v5bl-qNF.js → EventDetailsView-Bt4ekqYp.js} +2 -2
- package/dist/{EventDetailsView-v5bl-qNF.js.map → EventDetailsView-Bt4ekqYp.js.map} +1 -1
- package/dist/{FeaturedView.legacy-CZ9mfLAZ.js → FeaturedView.legacy-DN2Abh2g.js} +16 -16
- package/dist/{FeaturedView.legacy-CZ9mfLAZ.js.map → FeaturedView.legacy-DN2Abh2g.js.map} +1 -1
- package/dist/{GalleryCard-Bt7LGVRS.js → GalleryCard-DCxMRHdL.js} +6 -6
- package/dist/{GalleryCard-Bt7LGVRS.js.map → GalleryCard-DCxMRHdL.js.map} +1 -1
- package/dist/{GalleryView.legacy-muIVCbqi.js → GalleryView.legacy-fF5jz57f.js} +10 -10
- package/dist/{GalleryView.legacy-muIVCbqi.js.map → GalleryView.legacy-fF5jz57f.js.map} +1 -1
- package/dist/{GroupedListView.legacy-DrFwAyTl.js → GroupedListView.legacy-oU5NjDaG.js} +2 -2
- package/dist/{GroupedListView.legacy-DrFwAyTl.js.map → GroupedListView.legacy-oU5NjDaG.js.map} +1 -1
- package/dist/{SeriesPage-6N-nHQjn.js → SeriesPage-DQftH9yI.js} +5 -5
- package/dist/{SeriesPage-6N-nHQjn.js.map → SeriesPage-DQftH9yI.js.map} +1 -1
- package/dist/{SeriesPage.legacy-DEgRWqPd.js → SeriesPage.legacy-DyZXSsXv.js} +26 -26
- package/dist/{SeriesPage.legacy-DEgRWqPd.js.map → SeriesPage.legacy-DyZXSsXv.js.map} +1 -1
- package/dist/{Success-S3nnKJSN.js → Success-BkrSlcZJ.js} +5 -5
- package/dist/{Success-S3nnKJSN.js.map → Success-BkrSlcZJ.js.map} +1 -1
- package/dist/{Success.legacy-CrvK6Him.js → Success.legacy-6_EgTF8T.js} +2 -2
- package/dist/{Success.legacy-CrvK6Him.js.map → Success.legacy-6_EgTF8T.js.map} +1 -1
- package/dist/{VenueCalendar-DDQiula0.js → VenueCalendar-BjvqDumC.js} +838 -812
- package/dist/{VenueCalendar-DDQiula0.js.map → VenueCalendar-BjvqDumC.js.map} +1 -1
- package/dist/{ViewTicketsEmbed-CnmUZcbk.js → ViewTicketsEmbed-uzMst6xe.js} +65 -65
- package/dist/{ViewTicketsEmbed-CnmUZcbk.js.map → ViewTicketsEmbed-uzMst6xe.js.map} +1 -1
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +262 -230
- package/dist/api/api.mjs.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/orders.d.ts +14 -0
- package/dist/{labels-B_xY0DKp.js → labels-CNpTKuG-.js} +2 -2
- package/dist/{labels-B_xY0DKp.js.map → labels-CNpTKuG-.js.map} +1 -1
- package/dist/{transform-ChBa5AQk.js → transform-CujsjTyt.js} +2 -2
- package/dist/{transform-ChBa5AQk.js.map → transform-CujsjTyt.js.map} +1 -1
- package/dist/venue-calendar.es.js +9 -9
- package/dist/venue-calendar.iife.js +42 -42
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +42 -42
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/CartView-B6QO6vQv.js +0 -1682
- package/dist/CartView-B6QO6vQv.js.map +0 -1
package/dist/api/api.mjs
CHANGED
|
@@ -14,13 +14,13 @@ function ne(e) {
|
|
|
14
14
|
function se() {
|
|
15
15
|
return { ...h };
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function a() {
|
|
18
18
|
return `${h.baseUrl}/api/v2/public`;
|
|
19
19
|
}
|
|
20
20
|
function ae() {
|
|
21
21
|
return `${h.baseUrl}/api/public`;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function D() {
|
|
24
24
|
return `${h.baseUrl}/api/orders/v2/public`;
|
|
25
25
|
}
|
|
26
26
|
async function ce() {
|
|
@@ -28,43 +28,43 @@ async function ce() {
|
|
|
28
28
|
}
|
|
29
29
|
const O = (e) => new Promise((r) => setTimeout(r, e));
|
|
30
30
|
async function L(e, r, t) {
|
|
31
|
-
const o = (r.method || "GET").toUpperCase(),
|
|
32
|
-
let
|
|
33
|
-
for (let i = 1; i <=
|
|
34
|
-
const
|
|
31
|
+
const o = (r.method || "GET").toUpperCase(), c = o === "GET" || o === "HEAD" ? t.retries + 1 : 1;
|
|
32
|
+
let s;
|
|
33
|
+
for (let i = 1; i <= c; i++) {
|
|
34
|
+
const l = new AbortController(), $ = setTimeout(() => l.abort(), t.timeout), y = r.signal;
|
|
35
35
|
let _;
|
|
36
|
-
y && (y.aborted ?
|
|
36
|
+
y && (y.aborted ? l.abort() : (_ = () => l.abort(), y.addEventListener("abort", _, { once: !0 })));
|
|
37
37
|
try {
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
|
|
38
|
+
const d = await fetch(e, { ...r, signal: l.signal });
|
|
39
|
+
if (d.status >= 500 && i < c)
|
|
40
|
+
s = new Error(`HTTP ${d.status}`);
|
|
41
41
|
else
|
|
42
|
-
return
|
|
43
|
-
} catch (
|
|
44
|
-
if (
|
|
42
|
+
return d;
|
|
43
|
+
} catch (d) {
|
|
44
|
+
if (s = d, y?.aborted) throw d;
|
|
45
45
|
} finally {
|
|
46
46
|
clearTimeout($), y && _ && y.removeEventListener("abort", _);
|
|
47
47
|
}
|
|
48
|
-
i <
|
|
48
|
+
i < c && await O(t.retryDelay * Math.pow(2, i - 1));
|
|
49
49
|
}
|
|
50
|
-
throw
|
|
50
|
+
throw s;
|
|
51
51
|
}
|
|
52
52
|
async function ie(e, r) {
|
|
53
|
-
return
|
|
54
|
-
}
|
|
55
|
-
async function le(e, r, t) {
|
|
56
|
-
return k("POST", e, r, t);
|
|
53
|
+
return j("GET", e, void 0, r);
|
|
57
54
|
}
|
|
58
55
|
async function ue(e, r, t) {
|
|
59
|
-
return
|
|
56
|
+
return j("POST", e, r, t);
|
|
57
|
+
}
|
|
58
|
+
async function le(e, r, t) {
|
|
59
|
+
return j("PUT", e, r, t);
|
|
60
60
|
}
|
|
61
61
|
async function de(e, r) {
|
|
62
|
-
return
|
|
62
|
+
return j("DELETE", e, void 0, r);
|
|
63
63
|
}
|
|
64
|
-
async function
|
|
65
|
-
const n = r.startsWith("http") ? r : `${
|
|
64
|
+
async function j(e, r, t, o) {
|
|
65
|
+
const n = r.startsWith("http") ? r : `${a()}${r}`;
|
|
66
66
|
try {
|
|
67
|
-
const
|
|
67
|
+
const c = await L(
|
|
68
68
|
n,
|
|
69
69
|
{
|
|
70
70
|
method: e,
|
|
@@ -78,16 +78,16 @@ async function k(e, r, t, o) {
|
|
|
78
78
|
},
|
|
79
79
|
h
|
|
80
80
|
);
|
|
81
|
-
if (!
|
|
82
|
-
const i = await
|
|
83
|
-
return h.onError(new Error(
|
|
81
|
+
if (!c.ok) {
|
|
82
|
+
const i = await c.json().catch(() => ({})), l = i.error || i.message || `HTTP ${c.status}`;
|
|
83
|
+
return h.onError(new Error(l)), { success: !1, error: l, statusCode: c.status };
|
|
84
84
|
}
|
|
85
|
-
return { success: !0, data: await
|
|
86
|
-
} catch (
|
|
87
|
-
const
|
|
85
|
+
return { success: !0, data: await c.json(), statusCode: c.status };
|
|
86
|
+
} catch (c) {
|
|
87
|
+
const s = c instanceof Error ? c.name === "AbortError" ? "Request timed out" : c.message : "Unknown error";
|
|
88
88
|
return h.onError(
|
|
89
|
-
|
|
90
|
-
), { success: !1, error:
|
|
89
|
+
c instanceof Error ? c : new Error(s)
|
|
90
|
+
), { success: !1, error: s };
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
async function G(e, r) {
|
|
@@ -106,11 +106,11 @@ async function G(e, r) {
|
|
|
106
106
|
return A.error("API request error:", t), null;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const m = v("VC");
|
|
110
110
|
async function fe(e, r, t) {
|
|
111
111
|
try {
|
|
112
112
|
const o = await fetch(
|
|
113
|
-
`${
|
|
113
|
+
`${D()}/cart/${e}/payment-intent`,
|
|
114
114
|
{
|
|
115
115
|
method: "POST",
|
|
116
116
|
headers: {
|
|
@@ -124,19 +124,50 @@ async function fe(e, r, t) {
|
|
|
124
124
|
}
|
|
125
125
|
);
|
|
126
126
|
if (!o.ok) {
|
|
127
|
-
const
|
|
128
|
-
throw
|
|
127
|
+
const c = await o.json().catch(() => ({}));
|
|
128
|
+
throw m.error("Payment intent creation failed:", c), new Error(c.error || "Failed to create payment intent");
|
|
129
129
|
}
|
|
130
130
|
const n = await o.json();
|
|
131
|
-
return
|
|
131
|
+
return m.debug("Payment intent created:", n), n;
|
|
132
|
+
} catch (o) {
|
|
133
|
+
return m.error("createPaymentIntent error:", o), null;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
async function me(e, r, t) {
|
|
137
|
+
try {
|
|
138
|
+
const o = {};
|
|
139
|
+
for (const [s, i] of Object.entries(r)) {
|
|
140
|
+
const l = typeof s == "number" ? s : parseInt(s, 10);
|
|
141
|
+
!Number.isNaN(l) && i > 0 && (o[l] = i);
|
|
142
|
+
}
|
|
143
|
+
const n = {};
|
|
144
|
+
if (t)
|
|
145
|
+
for (const [s, i] of Object.entries(t)) {
|
|
146
|
+
const l = typeof s == "number" ? s : parseInt(s, 10);
|
|
147
|
+
!Number.isNaN(l) && i > 0 && (n[l] = i);
|
|
148
|
+
}
|
|
149
|
+
const c = await fetch(`${D()}/cart/${e}`, {
|
|
150
|
+
method: "PUT",
|
|
151
|
+
headers: { "Content-Type": "application/json" },
|
|
152
|
+
credentials: "include",
|
|
153
|
+
body: JSON.stringify({
|
|
154
|
+
quantities: o,
|
|
155
|
+
...Object.keys(n).length > 0 ? { donationAmounts: n } : {}
|
|
156
|
+
})
|
|
157
|
+
});
|
|
158
|
+
if (!c.ok) {
|
|
159
|
+
const s = await c.json().catch(() => ({}));
|
|
160
|
+
return m.error("Cart update failed:", s), !1;
|
|
161
|
+
}
|
|
162
|
+
return !0;
|
|
132
163
|
} catch (o) {
|
|
133
|
-
return
|
|
164
|
+
return m.error("updateCartQuantities error:", o), !1;
|
|
134
165
|
}
|
|
135
166
|
}
|
|
136
|
-
async function
|
|
167
|
+
async function he(e) {
|
|
137
168
|
try {
|
|
138
169
|
const r = await fetch(
|
|
139
|
-
`${
|
|
170
|
+
`${a()}/orders/complete/${e}`,
|
|
140
171
|
{
|
|
141
172
|
method: "POST",
|
|
142
173
|
headers: {
|
|
@@ -152,13 +183,13 @@ async function me(e) {
|
|
|
152
183
|
error: (await r.json().catch(() => ({}))).error || "Failed to complete reservation"
|
|
153
184
|
};
|
|
154
185
|
} catch (r) {
|
|
155
|
-
return
|
|
186
|
+
return m.error("Error completing reservation:", r), { success: !1, error: "Network error completing reservation" };
|
|
156
187
|
}
|
|
157
188
|
}
|
|
158
|
-
async function
|
|
189
|
+
async function ye(e) {
|
|
159
190
|
try {
|
|
160
191
|
const r = await fetch(
|
|
161
|
-
`${
|
|
192
|
+
`${a()}/orders/cancel/${e}`,
|
|
162
193
|
{
|
|
163
194
|
method: "POST",
|
|
164
195
|
headers: {
|
|
@@ -174,12 +205,12 @@ async function he(e) {
|
|
|
174
205
|
error: (await r.json().catch(() => ({}))).error || "Failed to cancel reservation"
|
|
175
206
|
};
|
|
176
207
|
} catch (r) {
|
|
177
|
-
return
|
|
208
|
+
return m.error("Error cancelling reservation:", r), { success: !1, error: "Network error cancelling reservation" };
|
|
178
209
|
}
|
|
179
210
|
}
|
|
180
|
-
async function
|
|
211
|
+
async function ge(e, r) {
|
|
181
212
|
try {
|
|
182
|
-
const t = await fetch(`${
|
|
213
|
+
const t = await fetch(`${a()}/orders/create`, {
|
|
183
214
|
method: "POST",
|
|
184
215
|
headers: {
|
|
185
216
|
"Content-Type": "application/json"
|
|
@@ -191,20 +222,20 @@ async function ye(e, r) {
|
|
|
191
222
|
});
|
|
192
223
|
if (!t.ok) {
|
|
193
224
|
const o = await t.json().catch(() => ({}));
|
|
194
|
-
return
|
|
225
|
+
return m.error("Create order failed:", o), null;
|
|
195
226
|
}
|
|
196
227
|
return t.json();
|
|
197
228
|
} catch (t) {
|
|
198
|
-
return
|
|
229
|
+
return m.error("createOrder error:", t), null;
|
|
199
230
|
}
|
|
200
231
|
}
|
|
201
|
-
async function
|
|
202
|
-
return G(`${
|
|
232
|
+
async function we(e) {
|
|
233
|
+
return G(`${a()}/orders/${e}`);
|
|
203
234
|
}
|
|
204
|
-
async function
|
|
235
|
+
async function _e(e, r) {
|
|
205
236
|
try {
|
|
206
237
|
const t = await fetch(
|
|
207
|
-
`${
|
|
238
|
+
`${D()}/validatePaymentIntent/${e}`,
|
|
208
239
|
{
|
|
209
240
|
method: "POST",
|
|
210
241
|
headers: {
|
|
@@ -215,7 +246,7 @@ async function we(e, r) {
|
|
|
215
246
|
);
|
|
216
247
|
if (!t.ok) {
|
|
217
248
|
const n = await t.json().catch(() => ({}));
|
|
218
|
-
return
|
|
249
|
+
return m.error("Payment validation failed:", n), {
|
|
219
250
|
success: !1,
|
|
220
251
|
status: "failed",
|
|
221
252
|
error: n.error || "Payment validation failed"
|
|
@@ -228,12 +259,12 @@ async function we(e, r) {
|
|
|
228
259
|
orderUUID: o.orderUUID || o.uuid
|
|
229
260
|
};
|
|
230
261
|
} catch (t) {
|
|
231
|
-
return
|
|
262
|
+
return m.error("validatePaymentIntent error:", t), null;
|
|
232
263
|
}
|
|
233
264
|
}
|
|
234
|
-
async function
|
|
265
|
+
async function ve(e) {
|
|
235
266
|
try {
|
|
236
|
-
const r = await fetch(`${
|
|
267
|
+
const r = await fetch(`${a()}/orders/extend-session`, {
|
|
237
268
|
method: "POST",
|
|
238
269
|
headers: {
|
|
239
270
|
"Content-Type": "application/json"
|
|
@@ -252,13 +283,13 @@ async function _e(e) {
|
|
|
252
283
|
remainingExtensions: t.remainingExtensions
|
|
253
284
|
};
|
|
254
285
|
} catch (r) {
|
|
255
|
-
return
|
|
286
|
+
return m.error("Error extending checkout session:", r), { success: !1, error: "Network error extending session" };
|
|
256
287
|
}
|
|
257
288
|
}
|
|
258
|
-
async function
|
|
289
|
+
async function $e(e) {
|
|
259
290
|
try {
|
|
260
291
|
const r = await fetch(
|
|
261
|
-
`${
|
|
292
|
+
`${a()}/orders/session/${e}`
|
|
262
293
|
);
|
|
263
294
|
if (!r.ok)
|
|
264
295
|
return {
|
|
@@ -274,12 +305,12 @@ async function ve(e) {
|
|
|
274
305
|
reservationCount: t.reservationCount
|
|
275
306
|
};
|
|
276
307
|
} catch (r) {
|
|
277
|
-
return
|
|
308
|
+
return m.error("Error getting session status:", r), { error: "Network error getting session status" };
|
|
278
309
|
}
|
|
279
310
|
}
|
|
280
|
-
async function
|
|
311
|
+
async function Pe(e = {}) {
|
|
281
312
|
try {
|
|
282
|
-
const r = await fetch(`${
|
|
313
|
+
const r = await fetch(`${a()}/orders/create`, {
|
|
283
314
|
method: "POST",
|
|
284
315
|
headers: {
|
|
285
316
|
"Content-Type": "application/json"
|
|
@@ -288,31 +319,31 @@ async function $e(e = {}) {
|
|
|
288
319
|
});
|
|
289
320
|
if (!r.ok) {
|
|
290
321
|
const o = await r.json().catch(() => ({}));
|
|
291
|
-
return
|
|
322
|
+
return m.error("Order initiation failed:", o), null;
|
|
292
323
|
}
|
|
293
324
|
return (await r.json()).uuid;
|
|
294
325
|
} catch (r) {
|
|
295
|
-
return
|
|
326
|
+
return m.error("initiateOrder error:", r), null;
|
|
296
327
|
}
|
|
297
328
|
}
|
|
298
|
-
async function
|
|
329
|
+
async function be(e) {
|
|
299
330
|
if (typeof window > "u") return;
|
|
300
331
|
const t = new URLSearchParams(window.location.search).get("utm_source") || "Direct";
|
|
301
332
|
try {
|
|
302
333
|
await fetch(
|
|
303
|
-
`${
|
|
334
|
+
`${a()}/utm/${e}/${encodeURIComponent(t)}`
|
|
304
335
|
);
|
|
305
336
|
} catch (o) {
|
|
306
|
-
|
|
337
|
+
m.error("UTM tracking failed:", o);
|
|
307
338
|
}
|
|
308
339
|
}
|
|
309
|
-
const
|
|
340
|
+
const N = v("VC");
|
|
310
341
|
async function Ce(e, r) {
|
|
311
342
|
try {
|
|
312
343
|
if (!r || !r.trim())
|
|
313
344
|
return { valid: !1, error: "Promo code is required" };
|
|
314
345
|
const t = encodeURIComponent(r.trim()), o = await fetch(
|
|
315
|
-
`${
|
|
346
|
+
`${a()}/promo-codes/validate/${e}/${t}`
|
|
316
347
|
);
|
|
317
348
|
if (!o.ok)
|
|
318
349
|
return o.status === 404 ? { valid: !1, error: "Invalid promo code" } : { valid: !1, error: (await o.json().catch(() => ({}))).error || "Failed to validate code" };
|
|
@@ -327,23 +358,23 @@ async function Ce(e, r) {
|
|
|
327
358
|
code: n.code || r
|
|
328
359
|
};
|
|
329
360
|
} catch (t) {
|
|
330
|
-
return
|
|
361
|
+
return N.error("Error validating promo code:", t), { valid: !1, error: "Network error validating code" };
|
|
331
362
|
}
|
|
332
363
|
}
|
|
333
|
-
async function
|
|
364
|
+
async function pe(e) {
|
|
334
365
|
try {
|
|
335
366
|
const r = await fetch(
|
|
336
|
-
`${
|
|
367
|
+
`${a()}/promo-codes/check/${e}`
|
|
337
368
|
);
|
|
338
369
|
return r.ok ? (await r.json()).hasPromoCodes === !0 : !0;
|
|
339
370
|
} catch (r) {
|
|
340
|
-
return
|
|
371
|
+
return N.error("Error checking promo codes availability:", r), !0;
|
|
341
372
|
}
|
|
342
373
|
}
|
|
343
|
-
async function
|
|
374
|
+
async function Se(e, r) {
|
|
344
375
|
try {
|
|
345
376
|
const t = await fetch(
|
|
346
|
-
`${
|
|
377
|
+
`${a()}/orders/${e}/apply-promo`,
|
|
347
378
|
{
|
|
348
379
|
method: "POST",
|
|
349
380
|
headers: {
|
|
@@ -357,13 +388,13 @@ async function pe(e, r) {
|
|
|
357
388
|
error: (await t.json().catch(() => ({}))).error || "Failed to apply promo code"
|
|
358
389
|
};
|
|
359
390
|
} catch (t) {
|
|
360
|
-
return
|
|
391
|
+
return N.error("Error applying promo code:", t), { success: !1, error: "Network error applying code" };
|
|
361
392
|
}
|
|
362
393
|
}
|
|
363
|
-
async function
|
|
394
|
+
async function ke(e) {
|
|
364
395
|
try {
|
|
365
396
|
const r = await fetch(
|
|
366
|
-
`${
|
|
397
|
+
`${a()}/orders/${e}/remove-promo`,
|
|
367
398
|
{
|
|
368
399
|
method: "POST",
|
|
369
400
|
headers: {
|
|
@@ -376,52 +407,52 @@ async function Se(e) {
|
|
|
376
407
|
error: (await r.json().catch(() => ({}))).error || "Failed to remove promo code"
|
|
377
408
|
};
|
|
378
409
|
} catch (r) {
|
|
379
|
-
return
|
|
410
|
+
return N.error("Error removing promo code:", r), { success: !1, error: "Network error removing code" };
|
|
380
411
|
}
|
|
381
412
|
}
|
|
382
|
-
const
|
|
413
|
+
const u = v("VC"), k = /* @__PURE__ */ new Map();
|
|
383
414
|
async function De(e, r = fetch) {
|
|
384
415
|
const t = String(e);
|
|
385
416
|
if (r === fetch) {
|
|
386
|
-
const n =
|
|
417
|
+
const n = k.get(t);
|
|
387
418
|
if (n) return n;
|
|
388
419
|
}
|
|
389
420
|
const o = (async () => {
|
|
390
421
|
try {
|
|
391
|
-
const n = await r(`${
|
|
422
|
+
const n = await r(`${a()}/events/${e}`);
|
|
392
423
|
if (!n.ok)
|
|
393
424
|
throw new Error(`Failed to fetch event details: ${n.status}`);
|
|
394
425
|
return await n.json();
|
|
395
426
|
} catch (n) {
|
|
396
|
-
return
|
|
427
|
+
return u.error("Error fetching event details:", n), null;
|
|
397
428
|
}
|
|
398
429
|
})();
|
|
399
|
-
return r === fetch && (
|
|
400
|
-
|
|
430
|
+
return r === fetch && (k.set(t, o), o.finally(() => {
|
|
431
|
+
k.get(t) === o && k.delete(t);
|
|
401
432
|
})), o;
|
|
402
433
|
}
|
|
403
|
-
async function
|
|
434
|
+
async function je(e) {
|
|
404
435
|
try {
|
|
405
436
|
const r = await fetch(
|
|
406
|
-
`${
|
|
437
|
+
`${a()}/tickets/event/${e}`
|
|
407
438
|
);
|
|
408
439
|
if (!r.ok)
|
|
409
440
|
throw new Error(`Failed to fetch tickets: ${r.status}`);
|
|
410
441
|
const t = await r.json();
|
|
411
442
|
return Array.isArray(t) ? t : [];
|
|
412
443
|
} catch (r) {
|
|
413
|
-
return
|
|
444
|
+
return u.error("Error fetching tickets:", r), [];
|
|
414
445
|
}
|
|
415
446
|
}
|
|
416
|
-
async function
|
|
447
|
+
async function Ne(e) {
|
|
417
448
|
try {
|
|
418
449
|
if (!e)
|
|
419
|
-
return
|
|
450
|
+
return u.warn("fetchEventPerformers called without eventId"), { performers: [], showPerformers: !1 };
|
|
420
451
|
const r = await fetch(
|
|
421
|
-
`${
|
|
452
|
+
`${a()}/events/${e}/performers`
|
|
422
453
|
);
|
|
423
454
|
if (!r.ok)
|
|
424
|
-
return
|
|
455
|
+
return u.error(
|
|
425
456
|
`Failed to fetch performers: ${r.status} ${r.statusText}`
|
|
426
457
|
), { performers: [], showPerformers: !1 };
|
|
427
458
|
const t = await r.json();
|
|
@@ -430,125 +461,125 @@ async function je(e) {
|
|
|
430
461
|
showPerformers: t.showPerformers === !0
|
|
431
462
|
};
|
|
432
463
|
} catch (r) {
|
|
433
|
-
return
|
|
464
|
+
return u.error("Error fetching event performers:", r), { performers: [], showPerformers: !1 };
|
|
434
465
|
}
|
|
435
466
|
}
|
|
436
467
|
async function Ae(e) {
|
|
437
468
|
try {
|
|
438
469
|
if (!e)
|
|
439
|
-
return
|
|
470
|
+
return u.warn("fetchAllVenues called without orgId"), [];
|
|
440
471
|
const r = await fetch(
|
|
441
|
-
`${
|
|
472
|
+
`${a()}/venues/organization/${e}`
|
|
442
473
|
);
|
|
443
474
|
if (!r.ok)
|
|
444
|
-
return
|
|
475
|
+
return u.error(
|
|
445
476
|
`Failed to fetch venues: ${r.status} ${r.statusText}`
|
|
446
477
|
), [];
|
|
447
478
|
const t = await r.json();
|
|
448
479
|
return Array.isArray(t) ? t : [];
|
|
449
480
|
} catch (r) {
|
|
450
|
-
return
|
|
481
|
+
return u.error("Error fetching venues:", r), [];
|
|
451
482
|
}
|
|
452
483
|
}
|
|
453
484
|
async function Ie(e) {
|
|
454
485
|
try {
|
|
455
486
|
if (!e)
|
|
456
|
-
return
|
|
487
|
+
return u.warn("fetchVenueEvents called without venueId"), [];
|
|
457
488
|
const r = await fetch(
|
|
458
|
-
`${
|
|
489
|
+
`${a()}/events/venue/${e}`
|
|
459
490
|
);
|
|
460
491
|
if (!r.ok)
|
|
461
|
-
return
|
|
492
|
+
return u.error(
|
|
462
493
|
`Failed to fetch venue events: ${r.status} ${r.statusText}`
|
|
463
494
|
), [];
|
|
464
495
|
const t = await r.json();
|
|
465
496
|
return Array.isArray(t) ? t : [];
|
|
466
497
|
} catch (r) {
|
|
467
|
-
return
|
|
498
|
+
return u.error("Error fetching venue events:", r), [];
|
|
468
499
|
}
|
|
469
500
|
}
|
|
470
|
-
async function
|
|
501
|
+
async function xe(e, r, t) {
|
|
471
502
|
try {
|
|
472
503
|
const o = await fetch(
|
|
473
|
-
`${
|
|
504
|
+
`${a()}/events/venue/${e}/month/${r}/${t}`
|
|
474
505
|
);
|
|
475
506
|
if (!o.ok)
|
|
476
|
-
return
|
|
507
|
+
return u.error(`Failed to fetch month events: ${o.status}`), [];
|
|
477
508
|
const n = await o.json();
|
|
478
509
|
return Array.isArray(n.events) ? n.events : Array.isArray(n) ? n : [];
|
|
479
510
|
} catch (o) {
|
|
480
|
-
return
|
|
511
|
+
return u.error("Error fetching month events:", o), [];
|
|
481
512
|
}
|
|
482
513
|
}
|
|
483
|
-
async function
|
|
514
|
+
async function Fe(e, r, t) {
|
|
484
515
|
try {
|
|
485
516
|
const o = await fetch(
|
|
486
|
-
`${
|
|
517
|
+
`${a()}/events/organization/${e}/month/${r}/${t}`
|
|
487
518
|
);
|
|
488
519
|
if (!o.ok)
|
|
489
|
-
return
|
|
520
|
+
return u.error(`Failed to fetch org month events: ${o.status}`), [];
|
|
490
521
|
const n = await o.json();
|
|
491
522
|
return Array.isArray(n.events) ? n.events : Array.isArray(n) ? n : [];
|
|
492
523
|
} catch (o) {
|
|
493
|
-
return
|
|
524
|
+
return u.error("Error fetching org month events:", o), [];
|
|
494
525
|
}
|
|
495
526
|
}
|
|
496
|
-
async function
|
|
527
|
+
async function Te(e) {
|
|
497
528
|
try {
|
|
498
529
|
const r = await fetch(
|
|
499
|
-
`${
|
|
530
|
+
`${a()}/series/${e}/occurrences`
|
|
500
531
|
);
|
|
501
|
-
return r.ok ? r.json() : (
|
|
532
|
+
return r.ok ? r.json() : (u.error(`Failed to fetch series occurrences: ${r.status}`), null);
|
|
502
533
|
} catch (r) {
|
|
503
|
-
return
|
|
534
|
+
return u.error("Error fetching series occurrences:", r), null;
|
|
504
535
|
}
|
|
505
536
|
}
|
|
506
|
-
async function
|
|
537
|
+
async function Ue(e, r) {
|
|
507
538
|
try {
|
|
508
539
|
const t = await fetch(
|
|
509
|
-
`${
|
|
540
|
+
`${a()}/series/${e}/occurrences?venueId=${r}`
|
|
510
541
|
);
|
|
511
|
-
return t.ok ? t.json() : (
|
|
542
|
+
return t.ok ? t.json() : (u.error(`Failed to fetch series with CTA: ${t.status}`), null);
|
|
512
543
|
} catch (t) {
|
|
513
|
-
return
|
|
544
|
+
return u.error("Error fetching series occurrences:", t), null;
|
|
514
545
|
}
|
|
515
546
|
}
|
|
516
|
-
async function
|
|
547
|
+
async function Re(e) {
|
|
517
548
|
try {
|
|
518
549
|
const r = await fetch(
|
|
519
|
-
`${
|
|
550
|
+
`${a()}/series/${e}/page`
|
|
520
551
|
);
|
|
521
552
|
if (!r.ok)
|
|
522
553
|
throw new Error(`Failed to fetch series page: ${r.status}`);
|
|
523
554
|
return r.json();
|
|
524
555
|
} catch (r) {
|
|
525
|
-
return
|
|
556
|
+
return u.error("Error fetching series page:", r), null;
|
|
526
557
|
}
|
|
527
558
|
}
|
|
528
|
-
async function
|
|
559
|
+
async function Le(e, r) {
|
|
529
560
|
try {
|
|
530
|
-
const t = r ? `${
|
|
561
|
+
const t = r ? `${a()}/collections/${e}/public?password=${encodeURIComponent(r)}` : `${a()}/collections/${e}/public`, o = await fetch(t);
|
|
531
562
|
if (!o.ok)
|
|
532
563
|
throw new Error(`Failed to fetch collection: ${o.status}`);
|
|
533
564
|
return o.json();
|
|
534
565
|
} catch (t) {
|
|
535
|
-
return
|
|
566
|
+
return u.error("Error fetching collection:", t), null;
|
|
536
567
|
}
|
|
537
568
|
}
|
|
538
|
-
async function
|
|
569
|
+
async function qe(e, r) {
|
|
539
570
|
try {
|
|
540
571
|
const t = encodeURIComponent(r), o = await fetch(
|
|
541
|
-
`${
|
|
572
|
+
`${a()}/collections/${e}/check-password/${t}`
|
|
542
573
|
);
|
|
543
574
|
return o.ok ? (await o.json()).valid === !0 : !1;
|
|
544
575
|
} catch (t) {
|
|
545
|
-
return
|
|
576
|
+
return u.error("Error checking collection password:", t), !1;
|
|
546
577
|
}
|
|
547
578
|
}
|
|
548
|
-
async function
|
|
579
|
+
async function Ee(e, r) {
|
|
549
580
|
try {
|
|
550
581
|
const t = await fetch(
|
|
551
|
-
`${
|
|
582
|
+
`${a()}/events/${e}/check-password`,
|
|
552
583
|
{
|
|
553
584
|
method: "POST",
|
|
554
585
|
headers: { "Content-Type": "application/json" },
|
|
@@ -559,31 +590,31 @@ async function qe(e, r) {
|
|
|
559
590
|
const o = await t.json();
|
|
560
591
|
return typeof o == "boolean" ? { valid: o } : { valid: o.valid === !0 || o === !0 };
|
|
561
592
|
} catch (t) {
|
|
562
|
-
return
|
|
593
|
+
return u.error("Error checking event password:", t), { valid: !1 };
|
|
563
594
|
}
|
|
564
595
|
}
|
|
565
|
-
async function
|
|
596
|
+
async function Oe(e, r) {
|
|
566
597
|
try {
|
|
567
|
-
const t = r ? `${
|
|
598
|
+
const t = r ? `${a()}/events/venue/${r}` : e ? `${a()}/venues/organization/${e}` : `${a()}/health`;
|
|
568
599
|
return (await fetch(t, {
|
|
569
600
|
method: "HEAD"
|
|
570
601
|
})).ok;
|
|
571
602
|
} catch (t) {
|
|
572
|
-
return
|
|
603
|
+
return u.error("Network connection test failed:", t), !1;
|
|
573
604
|
}
|
|
574
605
|
}
|
|
575
|
-
const
|
|
606
|
+
const b = v("VC");
|
|
576
607
|
async function z(e) {
|
|
577
608
|
try {
|
|
578
609
|
if (!e)
|
|
579
|
-
return
|
|
580
|
-
const r = await fetch(`${
|
|
581
|
-
return r.ok ? r.json() : (
|
|
610
|
+
return b.warn("getVenue called without venueId"), null;
|
|
611
|
+
const r = await fetch(`${a()}/venues/${e}`);
|
|
612
|
+
return r.ok ? r.json() : (b.error(`Failed to fetch venue: ${r.status}`), null);
|
|
582
613
|
} catch (r) {
|
|
583
|
-
return
|
|
614
|
+
return b.error("Error fetching venue:", r), null;
|
|
584
615
|
}
|
|
585
616
|
}
|
|
586
|
-
async function
|
|
617
|
+
async function Ge(e) {
|
|
587
618
|
const r = await z(e);
|
|
588
619
|
return r ? {
|
|
589
620
|
serviceFeePercentage: r.serviceFeePercentage ?? 0,
|
|
@@ -591,21 +622,21 @@ async function Oe(e) {
|
|
|
591
622
|
taxPercentage: r.taxPercentage ?? 0
|
|
592
623
|
} : null;
|
|
593
624
|
}
|
|
594
|
-
async function
|
|
625
|
+
async function ze(e) {
|
|
595
626
|
try {
|
|
596
627
|
if (!e)
|
|
597
|
-
return
|
|
598
|
-
const r = encodeURIComponent(e), t = await fetch(`${
|
|
599
|
-
return t.ok ? t.json() : (
|
|
628
|
+
return b.warn("getVenueBySlug called without slug"), null;
|
|
629
|
+
const r = encodeURIComponent(e), t = await fetch(`${a()}/venues/slug/${r}`);
|
|
630
|
+
return t.ok ? t.json() : (b.error(`Failed to fetch venue by slug: ${t.status}`), null);
|
|
600
631
|
} catch (r) {
|
|
601
|
-
return
|
|
632
|
+
return b.error("Error fetching venue by slug:", r), null;
|
|
602
633
|
}
|
|
603
634
|
}
|
|
604
|
-
const g = v("VC"),
|
|
605
|
-
async function
|
|
635
|
+
const g = v("VC"), J = "https://get-micdrop.com", B = `${J}/api/orders/v2`, x = () => D();
|
|
636
|
+
async function Je(e) {
|
|
606
637
|
try {
|
|
607
638
|
const r = await fetch(
|
|
608
|
-
`${
|
|
639
|
+
`${B}/gift-cards`,
|
|
609
640
|
{
|
|
610
641
|
method: "POST",
|
|
611
642
|
headers: { "Content-Type": "application/json" },
|
|
@@ -656,7 +687,7 @@ async function Be(e, r) {
|
|
|
656
687
|
};
|
|
657
688
|
}
|
|
658
689
|
}
|
|
659
|
-
async function
|
|
690
|
+
async function Me(e) {
|
|
660
691
|
try {
|
|
661
692
|
const r = await fetch(`${x()}/cart/${e}/gift-card`, {
|
|
662
693
|
method: "DELETE",
|
|
@@ -674,7 +705,7 @@ async function Je(e) {
|
|
|
674
705
|
};
|
|
675
706
|
}
|
|
676
707
|
}
|
|
677
|
-
async function
|
|
708
|
+
async function We(e, r) {
|
|
678
709
|
try {
|
|
679
710
|
const t = await fetch(
|
|
680
711
|
`${x()}/cart/${e}/complete-gift-card-payment`,
|
|
@@ -714,27 +745,27 @@ const I = v("VC"), M = {
|
|
|
714
745
|
already_purchased: "You have already purchased tickets for this event",
|
|
715
746
|
phone_already_registered: "This phone number is already on the waitlist"
|
|
716
747
|
};
|
|
717
|
-
async function
|
|
748
|
+
async function He(e, r, t = null, o = !1) {
|
|
718
749
|
try {
|
|
719
750
|
const n = { email: r };
|
|
720
751
|
t && o && (n.phone = t, n.smsOptIn = !0);
|
|
721
|
-
const
|
|
752
|
+
const c = await fetch(`${a()}/events/${e}/waitlist`, {
|
|
722
753
|
method: "POST",
|
|
723
754
|
headers: { "Content-Type": "application/json" },
|
|
724
755
|
body: JSON.stringify(n)
|
|
725
756
|
});
|
|
726
|
-
if (!
|
|
727
|
-
const i = await
|
|
757
|
+
if (!c.ok) {
|
|
758
|
+
const i = await c.json().catch(() => ({}));
|
|
728
759
|
return I.error("Join waitlist failed:", i), {
|
|
729
760
|
success: !1,
|
|
730
761
|
error: M[i.error] || "Failed to join waitlist. Please try again."
|
|
731
762
|
};
|
|
732
763
|
}
|
|
733
|
-
const
|
|
764
|
+
const s = await c.json();
|
|
734
765
|
return {
|
|
735
766
|
success: !0,
|
|
736
|
-
position:
|
|
737
|
-
updated:
|
|
767
|
+
position: s.position,
|
|
768
|
+
updated: s.updated
|
|
738
769
|
};
|
|
739
770
|
} catch (n) {
|
|
740
771
|
return I.error("joinWaitlist error:", n), {
|
|
@@ -743,40 +774,40 @@ async function We(e, r, t = null, o = !1) {
|
|
|
743
774
|
};
|
|
744
775
|
}
|
|
745
776
|
}
|
|
746
|
-
async function
|
|
777
|
+
async function Qe(e, r) {
|
|
747
778
|
try {
|
|
748
779
|
const t = await fetch(
|
|
749
|
-
`${
|
|
780
|
+
`${a()}/events/${e}/waitlist/position?email=${encodeURIComponent(r)}`
|
|
750
781
|
);
|
|
751
782
|
return t.ok ? { position: (await t.json()).position } : t.status === 404 ? { position: null } : { position: null, error: "Failed to check position" };
|
|
752
783
|
} catch (t) {
|
|
753
784
|
return I.error("getWaitlistPosition error:", t), { position: null, error: "Network error" };
|
|
754
785
|
}
|
|
755
786
|
}
|
|
756
|
-
function
|
|
787
|
+
function Ye(e, r, t = {}) {
|
|
757
788
|
const {
|
|
758
789
|
cancelled: o = !1,
|
|
759
790
|
isRegistration: n = !1,
|
|
760
|
-
waitlistEnabled:
|
|
761
|
-
} = t,
|
|
791
|
+
waitlistEnabled: c = !1
|
|
792
|
+
} = t, s = /* @__PURE__ */ new Date();
|
|
762
793
|
if (o)
|
|
763
794
|
return { text: "Cancelled", disabled: !0, reason: "cancelled" };
|
|
764
795
|
const i = e.endDateTime || e.startDateTime;
|
|
765
|
-
if (i && new Date(i) <
|
|
796
|
+
if (i && new Date(i) < s)
|
|
766
797
|
return { text: "Sales ended", disabled: !0, reason: "event_past" };
|
|
767
|
-
const
|
|
768
|
-
if (
|
|
798
|
+
const l = (r || []).filter((f) => f.salesChannel !== 2);
|
|
799
|
+
if (l.length === 0)
|
|
769
800
|
return {
|
|
770
801
|
text: "No tickets available",
|
|
771
802
|
disabled: !0,
|
|
772
803
|
reason: "no_tickets"
|
|
773
804
|
};
|
|
774
|
-
let $ = !1, y = !0, _ = !0,
|
|
775
|
-
for (const
|
|
776
|
-
const P =
|
|
777
|
-
if (!
|
|
805
|
+
let $ = !1, y = !0, _ = !0, d = null;
|
|
806
|
+
for (const f of l) {
|
|
807
|
+
const P = f.salesBegin || f.salesStart || f.saleBegin || f.onSaleStart, S = f.salesEnd || f.saleEnd || f.onSaleEnd, w = f.remainingCapacity ?? f.quantityRemaining ?? f.quantity, C = f.soldOut || w != null && w <= 0, p = P ? new Date(P) > s : !1, F = S ? new Date(S) < s : !1;
|
|
808
|
+
if (!C && !p && !F && ($ = !0), C || (y = !1), p || (_ = !1), p && P && !C && !F) {
|
|
778
809
|
const T = new Date(P);
|
|
779
|
-
(!
|
|
810
|
+
(!d || T < d) && (d = T);
|
|
780
811
|
}
|
|
781
812
|
}
|
|
782
813
|
if ($)
|
|
@@ -785,32 +816,32 @@ function Qe(e, r, t = {}) {
|
|
|
785
816
|
disabled: !1,
|
|
786
817
|
reason: "available"
|
|
787
818
|
};
|
|
788
|
-
if (_ &&
|
|
789
|
-
const
|
|
819
|
+
if (_ && d) {
|
|
820
|
+
const f = d.getTime() - s.getTime(), P = f / (1e3 * 60 * 60), S = f / (1e3 * 60 * 60 * 24);
|
|
790
821
|
let w;
|
|
791
822
|
if (P < 24)
|
|
792
|
-
w =
|
|
823
|
+
w = d.toLocaleTimeString("en-US", {
|
|
793
824
|
hour: "numeric",
|
|
794
825
|
minute: "2-digit",
|
|
795
826
|
hour12: !0
|
|
796
827
|
});
|
|
797
828
|
else if (S <= 7)
|
|
798
829
|
w = U(
|
|
799
|
-
|
|
830
|
+
d,
|
|
800
831
|
{ weekday: "short", hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
801
832
|
"en-US"
|
|
802
833
|
);
|
|
803
834
|
else {
|
|
804
|
-
const
|
|
805
|
-
|
|
835
|
+
const C = U(
|
|
836
|
+
d,
|
|
806
837
|
{ month: "short", day: "numeric" },
|
|
807
838
|
"en-US"
|
|
808
|
-
), p =
|
|
839
|
+
), p = d.toLocaleTimeString("en-US", {
|
|
809
840
|
hour: "numeric",
|
|
810
841
|
minute: "2-digit",
|
|
811
842
|
hour12: !0
|
|
812
843
|
});
|
|
813
|
-
w = `${
|
|
844
|
+
w = `${C} ${p}`;
|
|
814
845
|
}
|
|
815
846
|
return {
|
|
816
847
|
text: `On sale ${w}`,
|
|
@@ -818,7 +849,7 @@ function Qe(e, r, t = {}) {
|
|
|
818
849
|
reason: "coming_soon"
|
|
819
850
|
};
|
|
820
851
|
}
|
|
821
|
-
return y ?
|
|
852
|
+
return y ? c ? {
|
|
822
853
|
text: "Join Waitlist",
|
|
823
854
|
disabled: !1,
|
|
824
855
|
reason: "sold_out_waitlist"
|
|
@@ -862,7 +893,7 @@ function H(e) {
|
|
|
862
893
|
updatedAt: e.updatedAt || e.updated_at
|
|
863
894
|
};
|
|
864
895
|
}
|
|
865
|
-
function
|
|
896
|
+
function Ke(e) {
|
|
866
897
|
const r = H(e), t = r.uuid.split("-")[0] || r.uuid;
|
|
867
898
|
return {
|
|
868
899
|
orderId: r.uuid,
|
|
@@ -894,17 +925,17 @@ function K(e) {
|
|
|
894
925
|
return "ended";
|
|
895
926
|
const t = e.startDateTime || e.start_date_time || e.date;
|
|
896
927
|
if (t) {
|
|
897
|
-
const
|
|
898
|
-
if (
|
|
928
|
+
const s = new Date(t).getTime(), i = Date.now();
|
|
929
|
+
if (s < i)
|
|
899
930
|
return "ended";
|
|
900
931
|
}
|
|
901
932
|
const o = e.ticketsAvailable ?? e.tickets_available;
|
|
902
933
|
if (o !== void 0)
|
|
903
934
|
return o <= 0 ? "sold_out" : "available";
|
|
904
935
|
const n = e.availableTickets || e.available_tickets || e.tickets || [];
|
|
905
|
-
return n.length === 0 ? "coming_soon" : n.reduce((
|
|
906
|
-
const
|
|
907
|
-
return
|
|
936
|
+
return n.length === 0 ? "coming_soon" : n.reduce((s, i) => {
|
|
937
|
+
const l = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0, $ = i.quantitySold ?? i.quantity_sold ?? 0;
|
|
938
|
+
return s + Math.max(0, l - $);
|
|
908
939
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
909
940
|
}
|
|
910
941
|
function X(e) {
|
|
@@ -928,7 +959,7 @@ function X(e) {
|
|
|
928
959
|
};
|
|
929
960
|
}
|
|
930
961
|
function Z(e) {
|
|
931
|
-
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(X), o = t.map((
|
|
962
|
+
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(X), o = t.map((s) => s.price).filter((s) => s > 0), n = o.length > 0 ? Math.min(...o) : void 0, c = o.length > 0 ? Math.max(...o) : void 0;
|
|
932
963
|
return {
|
|
933
964
|
eventID: e.eventID || e.id || e.ID || 0,
|
|
934
965
|
id: e.id || e.ID,
|
|
@@ -951,10 +982,10 @@ function Z(e) {
|
|
|
951
982
|
isPublished: e.isPublished ?? e.is_published,
|
|
952
983
|
isCancelled: e.isCancelled ?? e.is_cancelled,
|
|
953
984
|
availableTickets: t,
|
|
954
|
-
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? t.reduce((
|
|
985
|
+
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? t.reduce((s, i) => s + (i.quantityAvailable || 0), 0),
|
|
955
986
|
ticketsSold: e.ticketsSold ?? e.tickets_sold,
|
|
956
987
|
minPrice: e.minPrice ?? e.min_price ?? n,
|
|
957
|
-
maxPrice: e.maxPrice ?? e.max_price ??
|
|
988
|
+
maxPrice: e.maxPrice ?? e.max_price ?? c,
|
|
958
989
|
ctaText: e.ctaText || e.cta_text,
|
|
959
990
|
ctaState: K(e),
|
|
960
991
|
showPerformers: e.showPerformers ?? e.show_performers,
|
|
@@ -962,11 +993,11 @@ function Z(e) {
|
|
|
962
993
|
seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number
|
|
963
994
|
};
|
|
964
995
|
}
|
|
965
|
-
const
|
|
996
|
+
const Xe = Z, V = "https://micdrop-images.sfo3.digitaloceanspaces.com";
|
|
966
997
|
function ee(e) {
|
|
967
998
|
return e ? e.startsWith("http") ? e : `${V}/${e.replace(/^\//, "")}` : "";
|
|
968
999
|
}
|
|
969
|
-
function
|
|
1000
|
+
function Ze(e) {
|
|
970
1001
|
const r = e.logoUrl || e.logo_url || e.logo;
|
|
971
1002
|
return {
|
|
972
1003
|
id: e.id || e.ID || 0,
|
|
@@ -986,14 +1017,14 @@ function Xe(e) {
|
|
|
986
1017
|
organizationId: e.organizationId || e.organization_id
|
|
987
1018
|
};
|
|
988
1019
|
}
|
|
989
|
-
function
|
|
1020
|
+
function Ve(e) {
|
|
990
1021
|
return {
|
|
991
1022
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
992
1023
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
993
1024
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
|
|
994
1025
|
};
|
|
995
1026
|
}
|
|
996
|
-
function
|
|
1027
|
+
function er(e) {
|
|
997
1028
|
return [
|
|
998
1029
|
e.address,
|
|
999
1030
|
e.city,
|
|
@@ -1004,63 +1035,64 @@ function Ve(e) {
|
|
|
1004
1035
|
export {
|
|
1005
1036
|
de as apiDelete,
|
|
1006
1037
|
ie as apiGet,
|
|
1007
|
-
|
|
1008
|
-
|
|
1038
|
+
ue as apiPost,
|
|
1039
|
+
le as apiPut,
|
|
1009
1040
|
Be as applyGiftCard,
|
|
1010
|
-
|
|
1041
|
+
Se as applyPromoCode,
|
|
1011
1042
|
K as calculateCtaState,
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1043
|
+
ye as cancelReservation,
|
|
1044
|
+
qe as checkCollectionPassword,
|
|
1045
|
+
Ee as checkEventPassword,
|
|
1046
|
+
We as completeGiftCardPayment,
|
|
1047
|
+
he as completeReservation,
|
|
1048
|
+
Ye as computeCtaState,
|
|
1018
1049
|
ne as configureApi,
|
|
1019
|
-
|
|
1020
|
-
|
|
1050
|
+
Je as createGiftCardPurchase,
|
|
1051
|
+
ge as createOrder,
|
|
1021
1052
|
fe as createPaymentIntent,
|
|
1022
|
-
|
|
1023
|
-
|
|
1053
|
+
ve as extendCheckoutSession,
|
|
1054
|
+
Ve as extractVenueFees,
|
|
1024
1055
|
Ae as fetchAllVenues,
|
|
1025
1056
|
De as fetchEventDetails,
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1057
|
+
Ne as fetchEventPerformers,
|
|
1058
|
+
je as fetchEventTickets,
|
|
1059
|
+
Le as fetchPublicCollection,
|
|
1060
|
+
Ue as fetchSeriesOccurrences,
|
|
1061
|
+
Re as fetchSeriesPage,
|
|
1031
1062
|
Ie as fetchVenueEvents,
|
|
1032
|
-
|
|
1063
|
+
er as formatVenueAddress,
|
|
1033
1064
|
se as getApiConfig,
|
|
1034
1065
|
Y as getCDNImageUrl,
|
|
1035
1066
|
ce as getClientIP,
|
|
1036
1067
|
R as getEventImageUrl,
|
|
1037
1068
|
ae as getLegacyPublicUrl,
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1069
|
+
xe as getMonthEvents,
|
|
1070
|
+
we as getOrder,
|
|
1071
|
+
D as getOrdersV2Url,
|
|
1072
|
+
Fe as getOrgMonthEvents,
|
|
1073
|
+
a as getPublicBaseUrl,
|
|
1074
|
+
Te as getSeriesOccurrences,
|
|
1075
|
+
$e as getSessionStatus,
|
|
1045
1076
|
z as getVenue,
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1077
|
+
ze as getVenueBySlug,
|
|
1078
|
+
Ge as getVenueFees,
|
|
1079
|
+
Qe as getWaitlistPosition,
|
|
1080
|
+
pe as hasPromoCodes,
|
|
1081
|
+
Pe as initiateOrder,
|
|
1082
|
+
He as joinWaitlist,
|
|
1083
|
+
Me as removeGiftCard,
|
|
1084
|
+
ke as removePromoCode,
|
|
1085
|
+
Oe as testNetworkConnection,
|
|
1086
|
+
be as trackUTMSource,
|
|
1056
1087
|
X as transformAvailableTicket,
|
|
1057
1088
|
Z as transformEvent,
|
|
1058
|
-
|
|
1089
|
+
Xe as transformEventData,
|
|
1059
1090
|
H as transformOrder,
|
|
1060
|
-
|
|
1091
|
+
Ke as transformOrderForDisplay,
|
|
1061
1092
|
W as transformTicket,
|
|
1062
|
-
|
|
1063
|
-
|
|
1093
|
+
Ze as transformVenue,
|
|
1094
|
+
me as updateCartQuantities,
|
|
1095
|
+
_e as validatePaymentIntent,
|
|
1064
1096
|
Ce as validatePromoCode
|
|
1065
1097
|
};
|
|
1066
1098
|
//# sourceMappingURL=api.mjs.map
|