@getmicdrop/venue-calendar 3.5.5 → 3.7.0
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/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +275 -260
- package/dist/api/api.mjs.map +1 -1
- package/dist/api/client.d.ts +0 -1
- package/dist/api/orders.d.ts +1 -2
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +33632 -37
- package/dist/venue-calendar.es.js.map +1 -1
- package/dist/venue-calendar.iife.js +30 -46
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +30 -46
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +15 -16
- package/src/lib/theme.js +46 -38
- package/dist/CarouselView.legacy-C9QYS3av.js +0 -64
- package/dist/CarouselView.legacy-C9QYS3av.js.map +0 -1
- package/dist/Checkout.legacy-CyiqW4Im.js +0 -1217
- package/dist/Checkout.legacy-CyiqW4Im.js.map +0 -1
- package/dist/CollectionView.legacy-CQeXXMOU.js +0 -374
- package/dist/CollectionView.legacy-CQeXXMOU.js.map +0 -1
- package/dist/FeaturedView.legacy-C3td2GLq.js +0 -128
- package/dist/FeaturedView.legacy-C3td2GLq.js.map +0 -1
- package/dist/GalleryView.legacy-BJwdUDNJ.js +0 -51
- package/dist/GalleryView.legacy-BJwdUDNJ.js.map +0 -1
- package/dist/GroupedListView.legacy-DWU0K8XY.js +0 -144
- package/dist/GroupedListView.legacy-DWU0K8XY.js.map +0 -1
- package/dist/SeriesPage.legacy-D-ZoVrPE.js +0 -187
- package/dist/SeriesPage.legacy-D-ZoVrPE.js.map +0 -1
- package/dist/Success.legacy-D9zlNOn7.js +0 -191
- package/dist/Success.legacy-D9zlNOn7.js.map +0 -1
- package/dist/VenueCalendar-DX2HF1GE.js +0 -37103
- package/dist/VenueCalendar-DX2HF1GE.js.map +0 -1
- package/dist/colors-BZoMuXdh.js +0 -62
- package/dist/colors-BZoMuXdh.js.map +0 -1
- package/dist/seo/HostSeoController.d.ts +0 -59
- package/dist/seo/buildCollectionJsonLd.d.ts +0 -7
- package/dist/seo/buildEventJsonLd.d.ts +0 -9
- package/dist/seo/buildSeriesJsonLd.d.ts +0 -6
- package/dist/seo/helpers.d.ts +0 -40
- package/dist/seo/index.d.ts +0 -9
- package/dist/seo/seo.cjs +0 -2
- package/dist/seo/seo.cjs.map +0 -1
- package/dist/seo/seo.mjs +0 -460
- package/dist/seo/seo.mjs.map +0 -1
- package/dist/seo/types.d.ts +0 -135
package/dist/api/api.mjs
CHANGED
|
@@ -1,70 +1,82 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
const _ = {
|
|
2
|
+
debug: 0,
|
|
3
|
+
info: 1,
|
|
4
|
+
warn: 2,
|
|
5
|
+
error: 3
|
|
6
|
+
}, P = () => typeof window < "u" && (typeof process > "u" || process.env?.NODE_ENV !== "production");
|
|
7
|
+
function y(e, r = {}) {
|
|
8
|
+
let t = {
|
|
9
|
+
enabled: r.enabled ?? P(),
|
|
10
|
+
level: r.level ?? "debug",
|
|
11
|
+
prefix: e.startsWith("[") ? e : `[${e}]`
|
|
12
|
+
};
|
|
13
|
+
function o(u) {
|
|
14
|
+
return t.enabled && _[u] >= _[t.level];
|
|
15
|
+
}
|
|
16
|
+
function n(u, i) {
|
|
17
|
+
return `${t.prefix} [${u.toUpperCase()}] ${i}`;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
debug(u, ...i) {
|
|
21
|
+
o("debug") && console.log(n("debug", u), ...i);
|
|
22
|
+
},
|
|
23
|
+
info(u, ...i) {
|
|
24
|
+
o("info") && console.info(n("info", u), ...i);
|
|
25
|
+
},
|
|
26
|
+
warn(u, ...i) {
|
|
27
|
+
o("warn") && console.warn(n("warn", u), ...i);
|
|
28
|
+
},
|
|
29
|
+
error(u, ...i) {
|
|
30
|
+
o("error") && console.error(n("error", u), ...i);
|
|
31
|
+
},
|
|
32
|
+
configure(u) {
|
|
33
|
+
t = { ...t, ...u };
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
P();
|
|
38
|
+
const g = y("VC"), A = {
|
|
31
39
|
baseUrl: "https://get-micdrop.com",
|
|
32
40
|
timeout: 3e4,
|
|
33
|
-
onError: (e) =>
|
|
41
|
+
onError: (e) => g.error("API Error:", e)
|
|
34
42
|
};
|
|
35
|
-
let
|
|
36
|
-
function
|
|
37
|
-
|
|
43
|
+
let d = { ...A };
|
|
44
|
+
function p(e) {
|
|
45
|
+
d = { ...d, ...e };
|
|
38
46
|
}
|
|
39
|
-
function
|
|
40
|
-
return { ...
|
|
47
|
+
function z() {
|
|
48
|
+
return { ...d };
|
|
41
49
|
}
|
|
42
|
-
function
|
|
43
|
-
return `${
|
|
50
|
+
function s() {
|
|
51
|
+
return `${d.baseUrl}/api/v2/public`;
|
|
44
52
|
}
|
|
45
|
-
function
|
|
46
|
-
return `${
|
|
53
|
+
function R() {
|
|
54
|
+
return `${d.baseUrl}/api/public`;
|
|
47
55
|
}
|
|
48
|
-
function
|
|
49
|
-
return `${
|
|
56
|
+
function b() {
|
|
57
|
+
return `${d.baseUrl}/api/orders/v2/public`;
|
|
50
58
|
}
|
|
51
|
-
async function
|
|
52
|
-
|
|
59
|
+
async function T() {
|
|
60
|
+
try {
|
|
61
|
+
return (await (await fetch("https://api.ipify.org?format=json")).json()).ip || "";
|
|
62
|
+
} catch (e) {
|
|
63
|
+
return g.warn("Could not fetch client IP:", e), "";
|
|
64
|
+
}
|
|
53
65
|
}
|
|
54
|
-
async function
|
|
55
|
-
return
|
|
66
|
+
async function M(e, r) {
|
|
67
|
+
return w("GET", e, void 0, r);
|
|
56
68
|
}
|
|
57
|
-
async function
|
|
58
|
-
return
|
|
69
|
+
async function B(e, r, t) {
|
|
70
|
+
return w("POST", e, r, t);
|
|
59
71
|
}
|
|
60
|
-
async function
|
|
61
|
-
return
|
|
72
|
+
async function H(e, r, t) {
|
|
73
|
+
return w("PUT", e, r, t);
|
|
62
74
|
}
|
|
63
|
-
async function
|
|
64
|
-
return
|
|
75
|
+
async function J(e, r) {
|
|
76
|
+
return w("DELETE", e, void 0, r);
|
|
65
77
|
}
|
|
66
|
-
async function
|
|
67
|
-
const n = r.startsWith("http") ? r : `${
|
|
78
|
+
async function w(e, r, t, o) {
|
|
79
|
+
const n = r.startsWith("http") ? r : `${s()}${r}`, u = new AbortController(), i = setTimeout(() => u.abort(), d.timeout);
|
|
68
80
|
try {
|
|
69
81
|
const c = await fetch(n, {
|
|
70
82
|
method: e,
|
|
@@ -78,12 +90,12 @@ async function m(e, r, t, o) {
|
|
|
78
90
|
...o
|
|
79
91
|
});
|
|
80
92
|
if (clearTimeout(i), !c.ok) {
|
|
81
|
-
const
|
|
82
|
-
|
|
93
|
+
const f = await c.json().catch(() => ({})), C = new Error(
|
|
94
|
+
f.error || f.message || `HTTP ${c.status}`
|
|
83
95
|
);
|
|
84
|
-
return
|
|
96
|
+
return d.onError(C), {
|
|
85
97
|
success: !1,
|
|
86
|
-
error:
|
|
98
|
+
error: f.error || f.message || `HTTP ${c.status}`,
|
|
87
99
|
statusCode: c.status
|
|
88
100
|
};
|
|
89
101
|
}
|
|
@@ -94,14 +106,14 @@ async function m(e, r, t, o) {
|
|
|
94
106
|
};
|
|
95
107
|
} catch (c) {
|
|
96
108
|
clearTimeout(i);
|
|
97
|
-
const
|
|
98
|
-
return
|
|
109
|
+
const h = c instanceof Error ? c.name === "AbortError" ? "Request timed out" : c.message : "Unknown error";
|
|
110
|
+
return d.onError(c instanceof Error ? c : new Error(h)), {
|
|
99
111
|
success: !1,
|
|
100
|
-
error:
|
|
112
|
+
error: h
|
|
101
113
|
};
|
|
102
114
|
}
|
|
103
115
|
}
|
|
104
|
-
async function
|
|
116
|
+
async function D(e, r) {
|
|
105
117
|
try {
|
|
106
118
|
const t = await fetch(e, {
|
|
107
119
|
credentials: "include",
|
|
@@ -109,17 +121,18 @@ async function _(e, r) {
|
|
|
109
121
|
});
|
|
110
122
|
if (!t.ok) {
|
|
111
123
|
const o = await t.json().catch(() => ({}));
|
|
112
|
-
return
|
|
124
|
+
return g.error(`API request failed: ${t.status}`, o), null;
|
|
113
125
|
}
|
|
114
126
|
return t.json();
|
|
115
127
|
} catch (t) {
|
|
116
|
-
return
|
|
128
|
+
return g.error("API request error:", t), null;
|
|
117
129
|
}
|
|
118
130
|
}
|
|
119
|
-
|
|
131
|
+
const l = y("VC");
|
|
132
|
+
async function E(e, r) {
|
|
120
133
|
try {
|
|
121
|
-
const
|
|
122
|
-
`${
|
|
134
|
+
const t = await fetch(
|
|
135
|
+
`${b()}/cart/${e}/payment-intent`,
|
|
123
136
|
{
|
|
124
137
|
method: "POST",
|
|
125
138
|
headers: {
|
|
@@ -127,25 +140,24 @@ async function R(e, r, t) {
|
|
|
127
140
|
},
|
|
128
141
|
credentials: "include",
|
|
129
142
|
body: JSON.stringify({
|
|
130
|
-
productQuantities: r
|
|
131
|
-
...t && Object.keys(t).length > 0 ? { donationAmounts: t } : {}
|
|
143
|
+
productQuantities: r
|
|
132
144
|
})
|
|
133
145
|
}
|
|
134
146
|
);
|
|
135
|
-
if (!
|
|
136
|
-
const
|
|
137
|
-
throw
|
|
147
|
+
if (!t.ok) {
|
|
148
|
+
const n = await t.json().catch(() => ({}));
|
|
149
|
+
throw l.error("Payment intent creation failed:", n), new Error(n.error || "Failed to create payment intent");
|
|
138
150
|
}
|
|
139
|
-
const
|
|
140
|
-
return
|
|
141
|
-
} catch (
|
|
142
|
-
return
|
|
151
|
+
const o = await t.json();
|
|
152
|
+
return l.debug("Payment intent created:", o), o;
|
|
153
|
+
} catch (t) {
|
|
154
|
+
return l.error("createPaymentIntent error:", t), null;
|
|
143
155
|
}
|
|
144
156
|
}
|
|
145
|
-
async function
|
|
157
|
+
async function W(e) {
|
|
146
158
|
try {
|
|
147
159
|
const r = await fetch(
|
|
148
|
-
`${
|
|
160
|
+
`${s()}/orders/complete/${e}`,
|
|
149
161
|
{
|
|
150
162
|
method: "POST",
|
|
151
163
|
headers: {
|
|
@@ -161,13 +173,13 @@ async function T(e) {
|
|
|
161
173
|
error: (await r.json().catch(() => ({}))).error || "Failed to complete reservation"
|
|
162
174
|
};
|
|
163
175
|
} catch (r) {
|
|
164
|
-
return
|
|
176
|
+
return l.error("Error completing reservation:", r), { success: !1, error: "Network error completing reservation" };
|
|
165
177
|
}
|
|
166
178
|
}
|
|
167
|
-
async function
|
|
179
|
+
async function G(e) {
|
|
168
180
|
try {
|
|
169
181
|
const r = await fetch(
|
|
170
|
-
`${
|
|
182
|
+
`${s()}/orders/cancel/${e}`,
|
|
171
183
|
{
|
|
172
184
|
method: "POST",
|
|
173
185
|
headers: {
|
|
@@ -183,12 +195,12 @@ async function M(e) {
|
|
|
183
195
|
error: (await r.json().catch(() => ({}))).error || "Failed to cancel reservation"
|
|
184
196
|
};
|
|
185
197
|
} catch (r) {
|
|
186
|
-
return
|
|
198
|
+
return l.error("Error cancelling reservation:", r), { success: !1, error: "Network error cancelling reservation" };
|
|
187
199
|
}
|
|
188
200
|
}
|
|
189
|
-
async function
|
|
201
|
+
async function O(e, r) {
|
|
190
202
|
try {
|
|
191
|
-
const t = await fetch(`${
|
|
203
|
+
const t = await fetch(`${s()}/orders/create`, {
|
|
192
204
|
method: "POST",
|
|
193
205
|
headers: {
|
|
194
206
|
"Content-Type": "application/json"
|
|
@@ -200,20 +212,20 @@ async function B(e, r) {
|
|
|
200
212
|
});
|
|
201
213
|
if (!t.ok) {
|
|
202
214
|
const o = await t.json().catch(() => ({}));
|
|
203
|
-
return
|
|
215
|
+
return l.error("Create order failed:", o), null;
|
|
204
216
|
}
|
|
205
217
|
return t.json();
|
|
206
218
|
} catch (t) {
|
|
207
|
-
return
|
|
219
|
+
return l.error("createOrder error:", t), null;
|
|
208
220
|
}
|
|
209
221
|
}
|
|
210
|
-
async function
|
|
211
|
-
return
|
|
222
|
+
async function Q(e) {
|
|
223
|
+
return D(`${s()}/orders/${e}`);
|
|
212
224
|
}
|
|
213
|
-
async function
|
|
225
|
+
async function K(e, r) {
|
|
214
226
|
try {
|
|
215
227
|
const t = await fetch(
|
|
216
|
-
`${
|
|
228
|
+
`${b()}/validatePaymentIntent/${e}`,
|
|
217
229
|
{
|
|
218
230
|
method: "POST",
|
|
219
231
|
headers: {
|
|
@@ -224,7 +236,7 @@ async function J(e, r) {
|
|
|
224
236
|
);
|
|
225
237
|
if (!t.ok) {
|
|
226
238
|
const n = await t.json().catch(() => ({}));
|
|
227
|
-
return
|
|
239
|
+
return l.error("Payment validation failed:", n), {
|
|
228
240
|
success: !1,
|
|
229
241
|
status: "failed",
|
|
230
242
|
error: n.error || "Payment validation failed"
|
|
@@ -237,12 +249,12 @@ async function J(e, r) {
|
|
|
237
249
|
orderUUID: o.orderUUID || o.uuid
|
|
238
250
|
};
|
|
239
251
|
} catch (t) {
|
|
240
|
-
return
|
|
252
|
+
return l.error("validatePaymentIntent error:", t), null;
|
|
241
253
|
}
|
|
242
254
|
}
|
|
243
|
-
async function
|
|
255
|
+
async function X(e) {
|
|
244
256
|
try {
|
|
245
|
-
const r = await fetch(`${
|
|
257
|
+
const r = await fetch(`${s()}/orders/extend-session`, {
|
|
246
258
|
method: "POST",
|
|
247
259
|
headers: {
|
|
248
260
|
"Content-Type": "application/json"
|
|
@@ -261,13 +273,13 @@ async function W(e) {
|
|
|
261
273
|
remainingExtensions: t.remainingExtensions
|
|
262
274
|
};
|
|
263
275
|
} catch (r) {
|
|
264
|
-
return
|
|
276
|
+
return l.error("Error extending checkout session:", r), { success: !1, error: "Network error extending session" };
|
|
265
277
|
}
|
|
266
278
|
}
|
|
267
|
-
async function
|
|
279
|
+
async function Y(e) {
|
|
268
280
|
try {
|
|
269
281
|
const r = await fetch(
|
|
270
|
-
`${
|
|
282
|
+
`${s()}/orders/session/${e}`
|
|
271
283
|
);
|
|
272
284
|
if (!r.ok)
|
|
273
285
|
return { error: (await r.json().catch(() => ({}))).error || "No active session found" };
|
|
@@ -280,12 +292,12 @@ async function p(e) {
|
|
|
280
292
|
reservationCount: t.reservationCount
|
|
281
293
|
};
|
|
282
294
|
} catch (r) {
|
|
283
|
-
return
|
|
295
|
+
return l.error("Error getting session status:", r), { error: "Network error getting session status" };
|
|
284
296
|
}
|
|
285
297
|
}
|
|
286
|
-
async function
|
|
298
|
+
async function Z(e = {}) {
|
|
287
299
|
try {
|
|
288
|
-
const r = await fetch(`${
|
|
300
|
+
const r = await fetch(`${s()}/orders/create`, {
|
|
289
301
|
method: "POST",
|
|
290
302
|
headers: {
|
|
291
303
|
"Content-Type": "application/json"
|
|
@@ -294,30 +306,31 @@ async function G(e = {}) {
|
|
|
294
306
|
});
|
|
295
307
|
if (!r.ok) {
|
|
296
308
|
const o = await r.json().catch(() => ({}));
|
|
297
|
-
return
|
|
309
|
+
return l.error("Order initiation failed:", o), null;
|
|
298
310
|
}
|
|
299
311
|
return (await r.json()).uuid;
|
|
300
312
|
} catch (r) {
|
|
301
|
-
return
|
|
313
|
+
return l.error("initiateOrder error:", r), null;
|
|
302
314
|
}
|
|
303
315
|
}
|
|
304
|
-
async function
|
|
316
|
+
async function V(e) {
|
|
305
317
|
if (typeof window > "u") return;
|
|
306
318
|
const t = new URLSearchParams(window.location.search).get("utm_source") || "Direct";
|
|
307
319
|
try {
|
|
308
320
|
await fetch(
|
|
309
|
-
`${
|
|
321
|
+
`${s()}/utm/${e}/${encodeURIComponent(t)}`
|
|
310
322
|
);
|
|
311
323
|
} catch (o) {
|
|
312
|
-
|
|
324
|
+
l.error("UTM tracking failed:", o);
|
|
313
325
|
}
|
|
314
326
|
}
|
|
315
|
-
|
|
327
|
+
const $ = y("VC");
|
|
328
|
+
async function ee(e, r) {
|
|
316
329
|
try {
|
|
317
330
|
if (!r || !r.trim())
|
|
318
331
|
return { valid: !1, error: "Promo code is required" };
|
|
319
332
|
const t = encodeURIComponent(r.trim()), o = await fetch(
|
|
320
|
-
`${
|
|
333
|
+
`${s()}/promo-codes/validate/${e}/${t}`
|
|
321
334
|
);
|
|
322
335
|
if (!o.ok)
|
|
323
336
|
return o.status === 404 ? { valid: !1, error: "Invalid promo code" } : { valid: !1, error: (await o.json().catch(() => ({}))).error || "Failed to validate code" };
|
|
@@ -332,23 +345,23 @@ async function Q(e, r) {
|
|
|
332
345
|
code: n.code || r
|
|
333
346
|
};
|
|
334
347
|
} catch (t) {
|
|
335
|
-
return
|
|
348
|
+
return $.error("Error validating promo code:", t), { valid: !1, error: "Network error validating code" };
|
|
336
349
|
}
|
|
337
350
|
}
|
|
338
|
-
async function
|
|
351
|
+
async function re(e) {
|
|
339
352
|
try {
|
|
340
353
|
const r = await fetch(
|
|
341
|
-
`${
|
|
354
|
+
`${s()}/promo-codes/check/${e}`
|
|
342
355
|
);
|
|
343
356
|
return r.ok ? (await r.json()).hasPromoCodes === !0 : !0;
|
|
344
357
|
} catch (r) {
|
|
345
|
-
return
|
|
358
|
+
return $.error("Error checking promo codes availability:", r), !0;
|
|
346
359
|
}
|
|
347
360
|
}
|
|
348
|
-
async function
|
|
361
|
+
async function te(e, r) {
|
|
349
362
|
try {
|
|
350
363
|
const t = await fetch(
|
|
351
|
-
`${
|
|
364
|
+
`${s()}/orders/${e}/apply-promo`,
|
|
352
365
|
{
|
|
353
366
|
method: "POST",
|
|
354
367
|
headers: {
|
|
@@ -362,13 +375,13 @@ async function K(e, r) {
|
|
|
362
375
|
error: (await t.json().catch(() => ({}))).error || "Failed to apply promo code"
|
|
363
376
|
};
|
|
364
377
|
} catch (t) {
|
|
365
|
-
return
|
|
378
|
+
return $.error("Error applying promo code:", t), { success: !1, error: "Network error applying code" };
|
|
366
379
|
}
|
|
367
380
|
}
|
|
368
|
-
async function
|
|
381
|
+
async function oe(e) {
|
|
369
382
|
try {
|
|
370
383
|
const r = await fetch(
|
|
371
|
-
`${
|
|
384
|
+
`${s()}/orders/${e}/remove-promo`,
|
|
372
385
|
{
|
|
373
386
|
method: "POST",
|
|
374
387
|
headers: {
|
|
@@ -381,41 +394,42 @@ async function X(e) {
|
|
|
381
394
|
error: (await r.json().catch(() => ({}))).error || "Failed to remove promo code"
|
|
382
395
|
};
|
|
383
396
|
} catch (r) {
|
|
384
|
-
return
|
|
397
|
+
return $.error("Error removing promo code:", r), { success: !1, error: "Network error removing code" };
|
|
385
398
|
}
|
|
386
399
|
}
|
|
387
|
-
|
|
400
|
+
const a = y("VC");
|
|
401
|
+
async function ne(e, r = fetch) {
|
|
388
402
|
try {
|
|
389
|
-
const t = await r(`${
|
|
403
|
+
const t = await r(`${s()}/events/${e}`);
|
|
390
404
|
if (!t.ok)
|
|
391
405
|
throw new Error(`Failed to fetch event details: ${t.status}`);
|
|
392
406
|
return t.json();
|
|
393
407
|
} catch (t) {
|
|
394
|
-
return
|
|
408
|
+
return a.error("Error fetching event details:", t), null;
|
|
395
409
|
}
|
|
396
410
|
}
|
|
397
|
-
async function
|
|
411
|
+
async function se(e) {
|
|
398
412
|
try {
|
|
399
413
|
const r = await fetch(
|
|
400
|
-
`${
|
|
414
|
+
`${s()}/tickets/event/${e}`
|
|
401
415
|
);
|
|
402
416
|
if (!r.ok)
|
|
403
417
|
throw new Error(`Failed to fetch tickets: ${r.status}`);
|
|
404
418
|
const t = await r.json();
|
|
405
419
|
return Array.isArray(t) ? t : [];
|
|
406
420
|
} catch (r) {
|
|
407
|
-
return
|
|
421
|
+
return a.error("Error fetching tickets:", r), [];
|
|
408
422
|
}
|
|
409
423
|
}
|
|
410
|
-
async function
|
|
424
|
+
async function ae(e) {
|
|
411
425
|
try {
|
|
412
426
|
if (!e)
|
|
413
|
-
return
|
|
427
|
+
return a.warn("fetchEventPerformers called without eventId"), { performers: [], showPerformers: !1 };
|
|
414
428
|
const r = await fetch(
|
|
415
|
-
`${
|
|
429
|
+
`${s()}/events/${e}/performers`
|
|
416
430
|
);
|
|
417
431
|
if (!r.ok)
|
|
418
|
-
return
|
|
432
|
+
return a.error(
|
|
419
433
|
`Failed to fetch performers: ${r.status} ${r.statusText}`
|
|
420
434
|
), { performers: [], showPerformers: !1 };
|
|
421
435
|
const t = await r.json();
|
|
@@ -424,170 +438,171 @@ async function V(e) {
|
|
|
424
438
|
showPerformers: t.showPerformers === !0
|
|
425
439
|
};
|
|
426
440
|
} catch (r) {
|
|
427
|
-
return
|
|
441
|
+
return a.error("Error fetching event performers:", r), { performers: [], showPerformers: !1 };
|
|
428
442
|
}
|
|
429
443
|
}
|
|
430
|
-
async function
|
|
444
|
+
async function ce(e) {
|
|
431
445
|
try {
|
|
432
446
|
if (!e)
|
|
433
|
-
return
|
|
447
|
+
return a.warn("fetchAllVenues called without orgId"), [];
|
|
434
448
|
const r = await fetch(
|
|
435
|
-
`${
|
|
449
|
+
`${s()}/venues/organization/${e}`
|
|
436
450
|
);
|
|
437
451
|
if (!r.ok)
|
|
438
|
-
return
|
|
452
|
+
return a.error(
|
|
439
453
|
`Failed to fetch venues: ${r.status} ${r.statusText}`
|
|
440
454
|
), [];
|
|
441
455
|
const t = await r.json();
|
|
442
456
|
return Array.isArray(t) ? t : [];
|
|
443
457
|
} catch (r) {
|
|
444
|
-
return
|
|
458
|
+
return a.error("Error fetching venues:", r), [];
|
|
445
459
|
}
|
|
446
460
|
}
|
|
447
|
-
async function
|
|
461
|
+
async function ie(e) {
|
|
448
462
|
try {
|
|
449
463
|
if (!e)
|
|
450
|
-
return
|
|
464
|
+
return a.warn("fetchVenueEvents called without venueId"), [];
|
|
451
465
|
const r = await fetch(
|
|
452
|
-
`${
|
|
466
|
+
`${s()}/events/venue/${e}`
|
|
453
467
|
);
|
|
454
468
|
if (!r.ok)
|
|
455
|
-
return
|
|
469
|
+
return a.error(
|
|
456
470
|
`Failed to fetch venue events: ${r.status} ${r.statusText}`
|
|
457
471
|
), [];
|
|
458
472
|
const t = await r.json();
|
|
459
473
|
return Array.isArray(t) ? t : [];
|
|
460
474
|
} catch (r) {
|
|
461
|
-
return
|
|
475
|
+
return a.error("Error fetching venue events:", r), [];
|
|
462
476
|
}
|
|
463
477
|
}
|
|
464
|
-
async function
|
|
478
|
+
async function ue(e, r, t) {
|
|
465
479
|
try {
|
|
466
480
|
const o = await fetch(
|
|
467
|
-
`${
|
|
481
|
+
`${s()}/events/venue/${e}/month/${r}/${t}`
|
|
468
482
|
);
|
|
469
483
|
if (!o.ok)
|
|
470
|
-
return
|
|
484
|
+
return a.error(`Failed to fetch month events: ${o.status}`), [];
|
|
471
485
|
const n = await o.json();
|
|
472
486
|
return Array.isArray(n.events) ? n.events : Array.isArray(n) ? n : [];
|
|
473
487
|
} catch (o) {
|
|
474
|
-
return
|
|
488
|
+
return a.error("Error fetching month events:", o), [];
|
|
475
489
|
}
|
|
476
490
|
}
|
|
477
|
-
async function
|
|
491
|
+
async function le(e, r, t) {
|
|
478
492
|
try {
|
|
479
493
|
const o = await fetch(
|
|
480
|
-
`${
|
|
494
|
+
`${s()}/events/organization/${e}/month/${r}/${t}`
|
|
481
495
|
);
|
|
482
496
|
if (!o.ok)
|
|
483
|
-
return
|
|
497
|
+
return a.error(`Failed to fetch org month events: ${o.status}`), [];
|
|
484
498
|
const n = await o.json();
|
|
485
499
|
return Array.isArray(n.events) ? n.events : Array.isArray(n) ? n : [];
|
|
486
500
|
} catch (o) {
|
|
487
|
-
return
|
|
501
|
+
return a.error("Error fetching org month events:", o), [];
|
|
488
502
|
}
|
|
489
503
|
}
|
|
490
|
-
async function
|
|
504
|
+
async function de(e) {
|
|
491
505
|
try {
|
|
492
506
|
const r = await fetch(
|
|
493
|
-
`${
|
|
507
|
+
`${s()}/series/${e}/occurrences`
|
|
494
508
|
);
|
|
495
|
-
return r.ok ? r.json() : (
|
|
509
|
+
return r.ok ? r.json() : (a.error(`Failed to fetch series occurrences: ${r.status}`), null);
|
|
496
510
|
} catch (r) {
|
|
497
|
-
return
|
|
511
|
+
return a.error("Error fetching series occurrences:", r), null;
|
|
498
512
|
}
|
|
499
513
|
}
|
|
500
|
-
async function
|
|
514
|
+
async function fe(e, r) {
|
|
501
515
|
try {
|
|
502
516
|
const t = await fetch(
|
|
503
|
-
`${
|
|
517
|
+
`${s()}/series/${e}/occurrences?venueId=${r}`
|
|
504
518
|
);
|
|
505
|
-
return t.ok ? t.json() : (
|
|
519
|
+
return t.ok ? t.json() : (a.error(`Failed to fetch series with CTA: ${t.status}`), null);
|
|
506
520
|
} catch (t) {
|
|
507
|
-
return
|
|
521
|
+
return a.error("Error fetching series occurrences:", t), null;
|
|
508
522
|
}
|
|
509
523
|
}
|
|
510
|
-
async function
|
|
524
|
+
async function me(e) {
|
|
511
525
|
try {
|
|
512
526
|
const r = await fetch(
|
|
513
|
-
`${
|
|
527
|
+
`${s()}/series/${e}/page`
|
|
514
528
|
);
|
|
515
529
|
if (!r.ok)
|
|
516
530
|
throw new Error(`Failed to fetch series page: ${r.status}`);
|
|
517
531
|
return r.json();
|
|
518
532
|
} catch (r) {
|
|
519
|
-
return
|
|
533
|
+
return a.error("Error fetching series page:", r), null;
|
|
520
534
|
}
|
|
521
535
|
}
|
|
522
|
-
async function
|
|
536
|
+
async function he(e, r) {
|
|
523
537
|
try {
|
|
524
|
-
const t = r ? `${
|
|
538
|
+
const t = r ? `${s()}/collections/${e}/public?password=${encodeURIComponent(r)}` : `${s()}/collections/${e}/public`, o = await fetch(t);
|
|
525
539
|
if (!o.ok)
|
|
526
540
|
throw new Error(`Failed to fetch collection: ${o.status}`);
|
|
527
541
|
return o.json();
|
|
528
542
|
} catch (t) {
|
|
529
|
-
return
|
|
543
|
+
return a.error("Error fetching collection:", t), null;
|
|
530
544
|
}
|
|
531
545
|
}
|
|
532
|
-
async function
|
|
546
|
+
async function ye(e, r) {
|
|
533
547
|
try {
|
|
534
548
|
const t = encodeURIComponent(r), o = await fetch(
|
|
535
|
-
`${
|
|
549
|
+
`${s()}/collections/${e}/check-password/${t}`
|
|
536
550
|
);
|
|
537
551
|
return o.ok ? (await o.json()).valid === !0 : !1;
|
|
538
552
|
} catch (t) {
|
|
539
|
-
return
|
|
553
|
+
return a.error("Error checking collection password:", t), !1;
|
|
540
554
|
}
|
|
541
555
|
}
|
|
542
|
-
async function
|
|
556
|
+
async function ge(e, r) {
|
|
543
557
|
try {
|
|
544
558
|
const t = encodeURIComponent(r), o = await fetch(
|
|
545
|
-
`${
|
|
559
|
+
`${s()}/events/${e}/check-password/${t}`
|
|
546
560
|
);
|
|
547
561
|
return o.ok ? (await o.json()).valid === !0 : !1;
|
|
548
562
|
} catch (t) {
|
|
549
|
-
return
|
|
563
|
+
return a.error("Error checking event password:", t), !1;
|
|
550
564
|
}
|
|
551
565
|
}
|
|
552
|
-
async function
|
|
566
|
+
async function we(e, r) {
|
|
553
567
|
try {
|
|
554
|
-
const t = r ? `${
|
|
568
|
+
const t = r ? `${s()}/events/venue/${r}` : e ? `${s()}/venues/organization/${e}` : `${s()}/health`;
|
|
555
569
|
return (await fetch(t, {
|
|
556
570
|
method: "HEAD"
|
|
557
571
|
})).ok;
|
|
558
572
|
} catch (t) {
|
|
559
|
-
return
|
|
573
|
+
return a.error("Network connection test failed:", t), !1;
|
|
560
574
|
}
|
|
561
575
|
}
|
|
562
|
-
|
|
576
|
+
const m = y("VC");
|
|
577
|
+
async function I(e) {
|
|
563
578
|
try {
|
|
564
579
|
if (!e)
|
|
565
|
-
return
|
|
566
|
-
const r = await fetch(`${
|
|
567
|
-
return r.ok ? r.json() : (
|
|
580
|
+
return m.warn("getVenue called without venueId"), null;
|
|
581
|
+
const r = await fetch(`${s()}/venues/${e}`);
|
|
582
|
+
return r.ok ? r.json() : (m.error(`Failed to fetch venue: ${r.status}`), null);
|
|
568
583
|
} catch (r) {
|
|
569
|
-
return
|
|
584
|
+
return m.error("Error fetching venue:", r), null;
|
|
570
585
|
}
|
|
571
586
|
}
|
|
572
|
-
async function
|
|
573
|
-
const r = await
|
|
587
|
+
async function $e(e) {
|
|
588
|
+
const r = await I(e);
|
|
574
589
|
return r ? {
|
|
575
590
|
serviceFeePercentage: r.serviceFeePercentage ?? 0,
|
|
576
591
|
serviceFeeCents: r.serviceFeeCents ?? 0,
|
|
577
592
|
taxPercentage: r.taxPercentage ?? 0
|
|
578
593
|
} : null;
|
|
579
594
|
}
|
|
580
|
-
async function
|
|
595
|
+
async function _e(e) {
|
|
581
596
|
try {
|
|
582
597
|
if (!e)
|
|
583
|
-
return
|
|
584
|
-
const r = encodeURIComponent(e), t = await fetch(`${
|
|
585
|
-
return t.ok ? t.json() : (
|
|
598
|
+
return m.warn("getVenueBySlug called without slug"), null;
|
|
599
|
+
const r = encodeURIComponent(e), t = await fetch(`${s()}/venues/slug/${r}`);
|
|
600
|
+
return t.ok ? t.json() : (m.error(`Failed to fetch venue by slug: ${t.status}`), null);
|
|
586
601
|
} catch (r) {
|
|
587
|
-
return
|
|
602
|
+
return m.error("Error fetching venue by slug:", r), null;
|
|
588
603
|
}
|
|
589
604
|
}
|
|
590
|
-
function
|
|
605
|
+
function j(e) {
|
|
591
606
|
return {
|
|
592
607
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
593
608
|
id: e.id || e.ID,
|
|
@@ -604,7 +619,7 @@ function v(e) {
|
|
|
604
619
|
checkedInAt: e.checkedInAt || e.checked_in_at
|
|
605
620
|
};
|
|
606
621
|
}
|
|
607
|
-
function
|
|
622
|
+
function k(e) {
|
|
608
623
|
const r = e.purchasedTickets || e.tickets || e.purchased_tickets || [];
|
|
609
624
|
return {
|
|
610
625
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
@@ -620,13 +635,13 @@ function P(e) {
|
|
|
620
635
|
discount: e.discount || 0,
|
|
621
636
|
paymentIntentId: e.paymentIntentId || e.payment_intent_id,
|
|
622
637
|
paymentMethod: e.paymentMethod || e.payment_method,
|
|
623
|
-
purchasedTickets: r.map(
|
|
638
|
+
purchasedTickets: r.map(j),
|
|
624
639
|
createdAt: e.createdAt || e.created_at,
|
|
625
640
|
updatedAt: e.updatedAt || e.updated_at
|
|
626
641
|
};
|
|
627
642
|
}
|
|
628
|
-
function
|
|
629
|
-
const r =
|
|
643
|
+
function ve(e) {
|
|
644
|
+
const r = k(e), t = r.uuid.split("-")[0] || r.uuid;
|
|
630
645
|
return {
|
|
631
646
|
orderId: r.uuid,
|
|
632
647
|
displayOrderId: t,
|
|
@@ -638,15 +653,15 @@ function me(e) {
|
|
|
638
653
|
status: r.status
|
|
639
654
|
};
|
|
640
655
|
}
|
|
641
|
-
const
|
|
642
|
-
function
|
|
643
|
-
return e ? e.startsWith("http") ? e : `${
|
|
656
|
+
const N = "https://micdrop-images.sfo3.digitaloceanspaces.com";
|
|
657
|
+
function x(e) {
|
|
658
|
+
return e ? e.startsWith("http") ? e : `${N}/${e.replace(/^\//, "")}` : "";
|
|
644
659
|
}
|
|
645
|
-
function
|
|
660
|
+
function v(e) {
|
|
646
661
|
const r = e.imageUrl || e.imageURL || e.image_url || e.image || "";
|
|
647
|
-
return
|
|
662
|
+
return x(r);
|
|
648
663
|
}
|
|
649
|
-
function
|
|
664
|
+
function S(e) {
|
|
650
665
|
const r = e.ctaState || e.cta_state;
|
|
651
666
|
if (r)
|
|
652
667
|
return r;
|
|
@@ -663,11 +678,11 @@ function D(e) {
|
|
|
663
678
|
return o <= 0 ? "sold_out" : "available";
|
|
664
679
|
const n = e.availableTickets || e.available_tickets || e.tickets || [];
|
|
665
680
|
return n.length === 0 ? "coming_soon" : n.reduce((i, c) => {
|
|
666
|
-
const
|
|
667
|
-
return i + Math.max(0,
|
|
681
|
+
const h = c.quantityAvailable ?? c.quantity_available ?? c.quantity ?? 0, f = c.quantitySold ?? c.quantity_sold ?? 0;
|
|
682
|
+
return i + Math.max(0, h - f);
|
|
668
683
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
669
684
|
}
|
|
670
|
-
function
|
|
685
|
+
function F(e) {
|
|
671
686
|
return {
|
|
672
687
|
id: e.id || e.ID,
|
|
673
688
|
name: e.name || e.ticketName || "",
|
|
@@ -687,8 +702,8 @@ function A(e) {
|
|
|
687
702
|
sortOrder: e.sortOrder || e.sort_order || 0
|
|
688
703
|
};
|
|
689
704
|
}
|
|
690
|
-
function
|
|
691
|
-
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(
|
|
705
|
+
function U(e) {
|
|
706
|
+
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(F), o = t.map((i) => i.price).filter((i) => i > 0), n = o.length > 0 ? Math.min(...o) : void 0, u = o.length > 0 ? Math.max(...o) : void 0;
|
|
692
707
|
return {
|
|
693
708
|
eventID: e.eventID || e.id || e.ID || 0,
|
|
694
709
|
id: e.id || e.ID,
|
|
@@ -705,8 +720,8 @@ function I(e) {
|
|
|
705
720
|
venueName: e.venueName || e.venue_name,
|
|
706
721
|
venueAddress: e.venueAddress || e.venue_address,
|
|
707
722
|
location: e.location || e.venueAddress || e.venue_address,
|
|
708
|
-
imageUrl:
|
|
709
|
-
imageURL:
|
|
723
|
+
imageUrl: v(e),
|
|
724
|
+
imageURL: v(e),
|
|
710
725
|
status: e.status,
|
|
711
726
|
isPublished: e.isPublished ?? e.is_published,
|
|
712
727
|
isCancelled: e.isCancelled ?? e.is_cancelled,
|
|
@@ -716,17 +731,17 @@ function I(e) {
|
|
|
716
731
|
minPrice: e.minPrice ?? e.min_price ?? n,
|
|
717
732
|
maxPrice: e.maxPrice ?? e.max_price ?? u,
|
|
718
733
|
ctaText: e.ctaText || e.cta_text,
|
|
719
|
-
ctaState:
|
|
734
|
+
ctaState: S(e),
|
|
720
735
|
showPerformers: e.showPerformers ?? e.show_performers,
|
|
721
736
|
eventSeriesId: e.eventSeriesId || e.event_series_id,
|
|
722
737
|
seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number
|
|
723
738
|
};
|
|
724
739
|
}
|
|
725
|
-
const
|
|
726
|
-
function
|
|
727
|
-
return e ? e.startsWith("http") ? e : `${
|
|
740
|
+
const Pe = U, q = "https://micdrop-images.sfo3.digitaloceanspaces.com";
|
|
741
|
+
function L(e) {
|
|
742
|
+
return e ? e.startsWith("http") ? e : `${q}/${e.replace(/^\//, "")}` : "";
|
|
728
743
|
}
|
|
729
|
-
function
|
|
744
|
+
function be(e) {
|
|
730
745
|
const r = e.logoUrl || e.logo_url || e.logo;
|
|
731
746
|
return {
|
|
732
747
|
id: e.id || e.ID || 0,
|
|
@@ -739,21 +754,21 @@ function ye(e) {
|
|
|
739
754
|
zipCode: e.zipCode || e.zip_code,
|
|
740
755
|
country: e.country,
|
|
741
756
|
timezone: e.timezone || e.time_zone,
|
|
742
|
-
logoUrl:
|
|
757
|
+
logoUrl: L(r),
|
|
743
758
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
744
759
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
745
760
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
|
|
746
761
|
organizationId: e.organizationId || e.organization_id
|
|
747
762
|
};
|
|
748
763
|
}
|
|
749
|
-
function
|
|
764
|
+
function Ce(e) {
|
|
750
765
|
return {
|
|
751
766
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
752
767
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
753
768
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
|
|
754
769
|
};
|
|
755
770
|
}
|
|
756
|
-
function
|
|
771
|
+
function Ae(e) {
|
|
757
772
|
return [
|
|
758
773
|
e.address,
|
|
759
774
|
e.city,
|
|
@@ -762,58 +777,58 @@ function we(e) {
|
|
|
762
777
|
].filter(Boolean).join(", ");
|
|
763
778
|
}
|
|
764
779
|
export {
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
780
|
+
J as apiDelete,
|
|
781
|
+
M as apiGet,
|
|
782
|
+
B as apiPost,
|
|
783
|
+
H as apiPut,
|
|
784
|
+
te as applyPromoCode,
|
|
785
|
+
S as calculateCtaState,
|
|
786
|
+
G as cancelReservation,
|
|
787
|
+
ye as checkCollectionPassword,
|
|
788
|
+
ge as checkEventPassword,
|
|
789
|
+
W as completeReservation,
|
|
790
|
+
p as configureApi,
|
|
791
|
+
O as createOrder,
|
|
792
|
+
E as createPaymentIntent,
|
|
793
|
+
X as extendCheckoutSession,
|
|
794
|
+
Ce as extractVenueFees,
|
|
795
|
+
ce as fetchAllVenues,
|
|
796
|
+
ne as fetchEventDetails,
|
|
797
|
+
ae as fetchEventPerformers,
|
|
798
|
+
se as fetchEventTickets,
|
|
799
|
+
he as fetchPublicCollection,
|
|
800
|
+
fe as fetchSeriesOccurrences,
|
|
801
|
+
me as fetchSeriesPage,
|
|
802
|
+
ie as fetchVenueEvents,
|
|
803
|
+
Ae as formatVenueAddress,
|
|
804
|
+
z as getApiConfig,
|
|
805
|
+
x as getCDNImageUrl,
|
|
806
|
+
T as getClientIP,
|
|
807
|
+
v as getEventImageUrl,
|
|
808
|
+
R as getLegacyPublicUrl,
|
|
809
|
+
ue as getMonthEvents,
|
|
810
|
+
Q as getOrder,
|
|
811
|
+
b as getOrdersV2Url,
|
|
812
|
+
le as getOrgMonthEvents,
|
|
813
|
+
s as getPublicBaseUrl,
|
|
814
|
+
de as getSeriesOccurrences,
|
|
815
|
+
Y as getSessionStatus,
|
|
816
|
+
I as getVenue,
|
|
817
|
+
_e as getVenueBySlug,
|
|
818
|
+
$e as getVenueFees,
|
|
819
|
+
re as hasPromoCodes,
|
|
820
|
+
Z as initiateOrder,
|
|
821
|
+
oe as removePromoCode,
|
|
822
|
+
we as testNetworkConnection,
|
|
823
|
+
V as trackUTMSource,
|
|
824
|
+
F as transformAvailableTicket,
|
|
825
|
+
U as transformEvent,
|
|
826
|
+
Pe as transformEventData,
|
|
827
|
+
k as transformOrder,
|
|
828
|
+
ve as transformOrderForDisplay,
|
|
829
|
+
j as transformTicket,
|
|
830
|
+
be as transformVenue,
|
|
831
|
+
K as validatePaymentIntent,
|
|
832
|
+
ee as validatePromoCode
|
|
818
833
|
};
|
|
819
834
|
//# sourceMappingURL=api.mjs.map
|