@getmicdrop/venue-calendar 4.0.69 → 4.0.71
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/{CarouselView.legacy-H5I8FG8q.js → CarouselView.legacy-ClHr7g2d.js} +3 -3
- package/dist/{CarouselView.legacy-H5I8FG8q.js.map → CarouselView.legacy-ClHr7g2d.js.map} +1 -1
- package/dist/{CartView-Bp50FEe3.js → CartView-BncT-vVW.js} +53 -53
- package/dist/{CartView-Bp50FEe3.js.map → CartView-BncT-vVW.js.map} +1 -1
- package/dist/{Checkout-C_7r24PK.js → Checkout-7rhwtJSX.js} +278 -273
- package/dist/Checkout-7rhwtJSX.js.map +1 -0
- package/dist/{Checkout-CbltFN5w.js → Checkout-DUwzAkMN.js} +114 -114
- package/dist/{Checkout-CbltFN5w.js.map → Checkout-DUwzAkMN.js.map} +1 -1
- package/dist/{Checkout.legacy-C8IT4aEk.js → Checkout.legacy-D9nNe_AZ.js} +5 -5
- package/dist/{Checkout.legacy-C8IT4aEk.js.map → Checkout.legacy-D9nNe_AZ.js.map} +1 -1
- package/dist/{CheckoutTimer-BDGvUG7s.js → CheckoutTimer-Vgrjjbvg.js} +2 -2
- package/dist/{CheckoutTimer-BDGvUG7s.js.map → CheckoutTimer-Vgrjjbvg.js.map} +1 -1
- package/dist/{CollectionView-BjcFcBDn.js → CollectionView-DLcoMjuw.js} +5 -5
- package/dist/{CollectionView-BjcFcBDn.js.map → CollectionView-DLcoMjuw.js.map} +1 -1
- package/dist/{CollectionView.legacy-DXRPPTGM.js → CollectionView.legacy-B_8a2U1u.js} +31 -31
- package/dist/{CollectionView.legacy-DXRPPTGM.js.map → CollectionView.legacy-B_8a2U1u.js.map} +1 -1
- package/dist/{Event-DNTpd-NG.js → Event-BBIEvf3e.js} +145 -145
- package/dist/{Event-DNTpd-NG.js.map → Event-BBIEvf3e.js.map} +1 -1
- package/dist/{EventDetailsView-DokL1zEd.js → EventDetailsView-BHxDjZCb.js} +6 -6
- package/dist/{EventDetailsView-DokL1zEd.js.map → EventDetailsView-BHxDjZCb.js.map} +1 -1
- package/dist/{EventPage-DfER-ohd.js → EventPage-CtJ9YZcS.js} +5 -5
- package/dist/{EventPage-DfER-ohd.js.map → EventPage-CtJ9YZcS.js.map} +1 -1
- package/dist/{EventPage.legacy-DKCXDcqQ.js → EventPage.legacy-CQ1MAI_B.js} +49 -49
- package/dist/{EventPage.legacy-DKCXDcqQ.js.map → EventPage.legacy-CQ1MAI_B.js.map} +1 -1
- package/dist/{FeaturedView.legacy-DkEiwirz.js → FeaturedView.legacy-aKrVnwkw.js} +19 -19
- package/dist/{FeaturedView.legacy-DkEiwirz.js.map → FeaturedView.legacy-aKrVnwkw.js.map} +1 -1
- package/dist/{GalleryCard-DBSyzYbv.js → GalleryCard-Da9zFkLr.js} +9 -9
- package/dist/{GalleryCard-DBSyzYbv.js.map → GalleryCard-Da9zFkLr.js.map} +1 -1
- package/dist/{GalleryView.legacy-CcqQNcMK.js → GalleryView.legacy-D3A9pCKp.js} +3 -3
- package/dist/{GalleryView.legacy-CcqQNcMK.js.map → GalleryView.legacy-D3A9pCKp.js.map} +1 -1
- package/dist/{GroupedListView.legacy-Bueg0Oxp.js → GroupedListView.legacy-BaoTHCTN.js} +23 -23
- package/dist/{GroupedListView.legacy-Bueg0Oxp.js.map → GroupedListView.legacy-BaoTHCTN.js.map} +1 -1
- package/dist/{OrderSummary-D_G9VNpM.js → OrderSummary-DaBRHOX_.js} +7 -7
- package/dist/{OrderSummary-D_G9VNpM.js.map → OrderSummary-DaBRHOX_.js.map} +1 -1
- package/dist/{PromoCodeInput-w7EGNs3a.js → PromoCodeInput-C_RKyiKy.js} +30 -30
- package/dist/{PromoCodeInput-w7EGNs3a.js.map → PromoCodeInput-C_RKyiKy.js.map} +1 -1
- package/dist/{SeriesPage-bCW_8Ewp.js → SeriesPage-Cp9hhvIY.js} +5 -5
- package/dist/{SeriesPage-bCW_8Ewp.js.map → SeriesPage-Cp9hhvIY.js.map} +1 -1
- package/dist/{SeriesPage.legacy-DZmmNEWc.js → SeriesPage.legacy-Jk6vH4SQ.js} +38 -38
- package/dist/{SeriesPage.legacy-DZmmNEWc.js.map → SeriesPage.legacy-Jk6vH4SQ.js.map} +1 -1
- package/dist/{Success-CKSUEqXp.js → Success-C7SFYk8j.js} +24 -24
- package/dist/{Success-CKSUEqXp.js.map → Success-C7SFYk8j.js.map} +1 -1
- package/dist/{Success.legacy-BnjWS130.js → Success.legacy-VgQ_-sfp.js} +2 -2
- package/dist/{Success.legacy-BnjWS130.js.map → Success.legacy-VgQ_-sfp.js.map} +1 -1
- package/dist/{VenueCalendar-n-T-MmLU.js → VenueCalendar-BYs68ta2.js} +1790 -1774
- package/dist/{VenueCalendar-n-T-MmLU.js.map → VenueCalendar-BYs68ta2.js.map} +1 -1
- package/dist/{ViewTicketsEmbed-CV6ipR3B.js → ViewTicketsEmbed-DLjGYNC1.js} +42 -42
- package/dist/{ViewTicketsEmbed-CV6ipR3B.js.map → ViewTicketsEmbed-DLjGYNC1.js.map} +1 -1
- package/dist/{WaitlistModal-BDzMplxL.js → WaitlistModal-BRRzVbhX.js} +35 -35
- package/dist/{WaitlistModal-BDzMplxL.js.map → WaitlistModal-BRRzVbhX.js.map} +1 -1
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +160 -157
- package/dist/api/api.mjs.map +1 -1
- package/dist/{api-Bj-wXy71.js → api-COTZNjyj.js} +2 -2
- package/dist/{api-Bj-wXy71.js.map → api-COTZNjyj.js.map} +1 -1
- package/dist/{data-toggle-store.svelte-DmcpAUWu.js → data-toggle-store.svelte-C65MzzYZ.js} +2 -2
- package/dist/{data-toggle-store.svelte-DmcpAUWu.js.map → data-toggle-store.svelte-C65MzzYZ.js.map} +1 -1
- package/dist/{transform-BLT4wYBC.js → transform-TJz04LxL.js} +2 -2
- package/dist/{transform-BLT4wYBC.js.map → transform-TJz04LxL.js.map} +1 -1
- package/dist/venue-calendar.es.js +1 -1
- package/dist/venue-calendar.iife.js +32 -32
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +30 -30
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/Checkout-C_7r24PK.js.map +0 -1
package/dist/api/api.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger as P } from "@getmicdrop/svelte-components/utils/logger";
|
|
2
|
-
import { AppError as
|
|
2
|
+
import { AppError as D, formatCurrency as M } from "@getmicdrop/svelte-components";
|
|
3
3
|
import { formatTime as j, formatDateRaw as z } from "@getmicdrop/svelte-components/utils/formatters";
|
|
4
4
|
const q = P("VC"), W = {
|
|
5
5
|
baseUrl: "https://get-micdrop.com",
|
|
@@ -9,22 +9,22 @@ const q = P("VC"), W = {
|
|
|
9
9
|
onError: (e) => q.error("API Error:", e)
|
|
10
10
|
};
|
|
11
11
|
let v = { ...W };
|
|
12
|
-
function
|
|
12
|
+
function me(e) {
|
|
13
13
|
v = { ...v, ...e };
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function ye() {
|
|
16
16
|
return { ...v };
|
|
17
17
|
}
|
|
18
18
|
function i() {
|
|
19
19
|
return `${v.baseUrl}/api/v2/public`;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function he() {
|
|
22
22
|
return `${v.baseUrl}/api/public`;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function p() {
|
|
25
25
|
return `${v.baseUrl}/api/orders/v2/public`;
|
|
26
26
|
}
|
|
27
|
-
async function
|
|
27
|
+
async function ge() {
|
|
28
28
|
return "";
|
|
29
29
|
}
|
|
30
30
|
const O = (e) => new Promise((r) => setTimeout(r, e));
|
|
@@ -51,18 +51,18 @@ async function H(e, r, t) {
|
|
|
51
51
|
throw o;
|
|
52
52
|
}
|
|
53
53
|
async function A(e, r) {
|
|
54
|
-
return
|
|
54
|
+
return F("GET", e, void 0, r);
|
|
55
55
|
}
|
|
56
56
|
async function y(e, r, t) {
|
|
57
|
-
return
|
|
57
|
+
return F("POST", e, r, t);
|
|
58
58
|
}
|
|
59
|
-
async function
|
|
60
|
-
return
|
|
59
|
+
async function ve(e, r, t) {
|
|
60
|
+
return F("PUT", e, r, t);
|
|
61
61
|
}
|
|
62
62
|
async function Q(e, r) {
|
|
63
|
-
return
|
|
63
|
+
return F("DELETE", e, void 0, r);
|
|
64
64
|
}
|
|
65
|
-
async function
|
|
65
|
+
async function F(e, r, t, s) {
|
|
66
66
|
const n = r.startsWith("http") ? r : `${i()}${r}`;
|
|
67
67
|
try {
|
|
68
68
|
const a = await H(
|
|
@@ -108,27 +108,27 @@ async function h(e, r) {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
const f = P("VC");
|
|
111
|
-
async function
|
|
111
|
+
async function we(e, r, t) {
|
|
112
112
|
try {
|
|
113
113
|
const s = await y(
|
|
114
|
-
`${
|
|
114
|
+
`${p()}/cart/${e}/payment-intent`,
|
|
115
115
|
{
|
|
116
116
|
productQuantities: r,
|
|
117
117
|
...t && Object.keys(t).length > 0 ? { donationAmounts: t } : {}
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
120
|
if (!s.success)
|
|
121
|
-
throw f.error("Payment intent creation failed:", s.error), new
|
|
121
|
+
throw f.error("Payment intent creation failed:", s.error), new D(s.error || "Failed to create payment intent", "lib/api/orders/createPaymentIntent");
|
|
122
122
|
return f.debug("Payment intent created:", s.data), s.data;
|
|
123
123
|
} catch (s) {
|
|
124
124
|
return f.error("createPaymentIntent error:", s), null;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
async function
|
|
127
|
+
async function _e(e, r) {
|
|
128
128
|
if (!e) return null;
|
|
129
129
|
try {
|
|
130
130
|
const t = await A(
|
|
131
|
-
`${
|
|
131
|
+
`${p()}/cart/${e}`
|
|
132
132
|
);
|
|
133
133
|
if (!t.success)
|
|
134
134
|
return null;
|
|
@@ -148,7 +148,7 @@ async function we(e, r) {
|
|
|
148
148
|
return f.error("getCartByUUID error:", t), null;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
async function
|
|
151
|
+
async function be(e, r, t) {
|
|
152
152
|
try {
|
|
153
153
|
const s = {};
|
|
154
154
|
for (const [o, c] of Object.entries(r)) {
|
|
@@ -161,7 +161,7 @@ async function _e(e, r, t) {
|
|
|
161
161
|
const l = typeof o == "number" ? o : parseInt(o, 10);
|
|
162
162
|
!Number.isNaN(l) && c > 0 && (n[l] = c);
|
|
163
163
|
}
|
|
164
|
-
const a = await fetch(`${
|
|
164
|
+
const a = await fetch(`${p()}/cart/${e}`, {
|
|
165
165
|
method: "PUT",
|
|
166
166
|
headers: { "Content-Type": "application/json" },
|
|
167
167
|
credentials: "include",
|
|
@@ -179,7 +179,7 @@ async function _e(e, r, t) {
|
|
|
179
179
|
return f.error("updateCartQuantities error:", s), !1;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
async function
|
|
182
|
+
async function $e(e) {
|
|
183
183
|
try {
|
|
184
184
|
const r = await y(
|
|
185
185
|
`${i()}/orders/complete/${e}`
|
|
@@ -195,7 +195,7 @@ async function be(e) {
|
|
|
195
195
|
return f.error("Error completing reservation:", r), { success: !1, error: "Network error completing reservation" };
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
async function
|
|
198
|
+
async function Ce(e) {
|
|
199
199
|
try {
|
|
200
200
|
const r = await y(
|
|
201
201
|
`${i()}/orders/cancel/${e}`
|
|
@@ -211,7 +211,7 @@ async function $e(e) {
|
|
|
211
211
|
return f.error("Error cancelling reservation:", r), { success: !1, error: "Network error cancelling reservation" };
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
async function
|
|
214
|
+
async function Pe(e, r) {
|
|
215
215
|
try {
|
|
216
216
|
const t = await y(
|
|
217
217
|
`${i()}/orders/create`,
|
|
@@ -222,13 +222,13 @@ async function Ce(e, r) {
|
|
|
222
222
|
return f.error("createOrder error:", t), null;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
async function
|
|
225
|
+
async function Ae(e) {
|
|
226
226
|
return h(`${i()}/orders/${e}`);
|
|
227
227
|
}
|
|
228
|
-
async function
|
|
228
|
+
async function Ie(e, r) {
|
|
229
229
|
try {
|
|
230
230
|
const t = await y(
|
|
231
|
-
`${
|
|
231
|
+
`${p()}/validatePaymentIntent/${e}`,
|
|
232
232
|
r
|
|
233
233
|
);
|
|
234
234
|
if (!t.success)
|
|
@@ -247,7 +247,7 @@ async function Ae(e, r) {
|
|
|
247
247
|
return f.error("validatePaymentIntent error:", t), null;
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
async function
|
|
250
|
+
async function Se(e) {
|
|
251
251
|
try {
|
|
252
252
|
const r = await y(
|
|
253
253
|
`${i()}/orders/extend-session`,
|
|
@@ -269,7 +269,7 @@ async function Ie(e) {
|
|
|
269
269
|
return f.error("Error extending checkout session:", r), { success: !1, error: "Network error extending session" };
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
async function
|
|
272
|
+
async function De(e) {
|
|
273
273
|
try {
|
|
274
274
|
const r = await A(
|
|
275
275
|
`${i()}/orders/session/${e}`
|
|
@@ -302,7 +302,7 @@ async function pe(e = {}) {
|
|
|
302
302
|
return f.error("initiateOrder error:", r), null;
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
-
async function
|
|
305
|
+
async function Ne(e) {
|
|
306
306
|
if (typeof window > "u") return;
|
|
307
307
|
const t = new URLSearchParams(window.location.search).get("utm_source") || "Direct";
|
|
308
308
|
try {
|
|
@@ -313,8 +313,8 @@ async function De(e) {
|
|
|
313
313
|
f.error("UTM tracking failed:", s);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
const k = P("VC");
|
|
317
|
-
async function
|
|
316
|
+
const k = P("VC"), J = () => p();
|
|
317
|
+
async function Re(e, r) {
|
|
318
318
|
try {
|
|
319
319
|
if (!r || !r.trim())
|
|
320
320
|
return { valid: !1, error: "Promo code is required" };
|
|
@@ -337,7 +337,7 @@ async function Ne(e, r) {
|
|
|
337
337
|
return k.error("Error validating promo code:", t), { valid: !1, error: "Network error validating code" };
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
async function
|
|
340
|
+
async function xe(e) {
|
|
341
341
|
try {
|
|
342
342
|
const r = await A(
|
|
343
343
|
`/promo-codes/check/${e}`
|
|
@@ -347,9 +347,12 @@ async function Re(e) {
|
|
|
347
347
|
return k.error("Error checking promo codes availability:", r), !0;
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
async function
|
|
350
|
+
async function Ue(e, r) {
|
|
351
351
|
try {
|
|
352
|
-
const t = await y(
|
|
352
|
+
const t = await y(
|
|
353
|
+
`${J()}/cart/${e}/apply-promo`,
|
|
354
|
+
{ promoCode: r }
|
|
355
|
+
);
|
|
353
356
|
return t.success ? { success: !0 } : {
|
|
354
357
|
success: !1,
|
|
355
358
|
error: t.error || "Failed to apply promo code"
|
|
@@ -369,28 +372,28 @@ async function Fe(e) {
|
|
|
369
372
|
return k.error("Error removing promo code:", r), { success: !1, error: "Network error removing code" };
|
|
370
373
|
}
|
|
371
374
|
}
|
|
372
|
-
const u = P("VC"),
|
|
373
|
-
async function
|
|
375
|
+
const u = P("VC"), U = /* @__PURE__ */ new Map();
|
|
376
|
+
async function ke(e, r = fetch) {
|
|
374
377
|
const t = String(e);
|
|
375
378
|
if (r === fetch) {
|
|
376
|
-
const n =
|
|
379
|
+
const n = U.get(t);
|
|
377
380
|
if (n) return n;
|
|
378
381
|
}
|
|
379
382
|
const s = (async () => {
|
|
380
383
|
try {
|
|
381
384
|
const n = await r(`${i()}/events/${e}`);
|
|
382
385
|
if (!n.ok)
|
|
383
|
-
throw new
|
|
386
|
+
throw new D(`Failed to fetch event details: ${n.status}`, "lib/api/events/fetchEventDetails");
|
|
384
387
|
return await n.json();
|
|
385
388
|
} catch (n) {
|
|
386
389
|
return u.error("Error fetching event details:", n), null;
|
|
387
390
|
}
|
|
388
391
|
})();
|
|
389
|
-
return r === fetch && (
|
|
390
|
-
|
|
392
|
+
return r === fetch && (U.set(t, s), s.finally(() => {
|
|
393
|
+
U.get(t) === s && U.delete(t);
|
|
391
394
|
})), s;
|
|
392
395
|
}
|
|
393
|
-
async function
|
|
396
|
+
async function qe(e) {
|
|
394
397
|
try {
|
|
395
398
|
const r = await h(
|
|
396
399
|
`${i()}/tickets/event/${e}`
|
|
@@ -400,7 +403,7 @@ async function ke(e) {
|
|
|
400
403
|
return u.error("Error fetching tickets:", r), [];
|
|
401
404
|
}
|
|
402
405
|
}
|
|
403
|
-
async function
|
|
406
|
+
async function Ee(e) {
|
|
404
407
|
try {
|
|
405
408
|
if (!e)
|
|
406
409
|
return u.warn("fetchEventPerformers called without eventId"), { performers: [], showPerformers: !1 };
|
|
@@ -415,7 +418,7 @@ async function qe(e) {
|
|
|
415
418
|
return u.error("Error fetching event performers:", r), { performers: [], showPerformers: !1 };
|
|
416
419
|
}
|
|
417
420
|
}
|
|
418
|
-
async function
|
|
421
|
+
async function Le(e) {
|
|
419
422
|
try {
|
|
420
423
|
if (!e)
|
|
421
424
|
return u.warn("fetchAllVenues called without orgId"), [];
|
|
@@ -427,7 +430,7 @@ async function Ee(e) {
|
|
|
427
430
|
return u.error("Error fetching venues:", r), [];
|
|
428
431
|
}
|
|
429
432
|
}
|
|
430
|
-
async function
|
|
433
|
+
async function Ge(e) {
|
|
431
434
|
try {
|
|
432
435
|
if (!e)
|
|
433
436
|
return u.warn("fetchVenueEvents called without venueId"), [];
|
|
@@ -439,7 +442,7 @@ async function Le(e) {
|
|
|
439
442
|
return u.error("Error fetching venue events:", r), [];
|
|
440
443
|
}
|
|
441
444
|
}
|
|
442
|
-
async function
|
|
445
|
+
async function Be(e, r, t) {
|
|
443
446
|
try {
|
|
444
447
|
const s = await h(
|
|
445
448
|
`${i()}/events/venue/${e}/month/${r}/${t}`
|
|
@@ -449,7 +452,7 @@ async function Ge(e, r, t) {
|
|
|
449
452
|
return u.error("Error fetching month events:", s), [];
|
|
450
453
|
}
|
|
451
454
|
}
|
|
452
|
-
async function
|
|
455
|
+
async function je(e, r, t) {
|
|
453
456
|
try {
|
|
454
457
|
const s = await h(
|
|
455
458
|
`${i()}/events/organization/${e}/month/${r}/${t}`
|
|
@@ -459,7 +462,7 @@ async function Be(e, r, t) {
|
|
|
459
462
|
return u.error("Error fetching org month events:", s), [];
|
|
460
463
|
}
|
|
461
464
|
}
|
|
462
|
-
async function
|
|
465
|
+
async function ze(e) {
|
|
463
466
|
try {
|
|
464
467
|
const r = await h(
|
|
465
468
|
`${i()}/series/${e}/occurrences`
|
|
@@ -469,7 +472,7 @@ async function je(e) {
|
|
|
469
472
|
return u.error("Error fetching series occurrences:", r), null;
|
|
470
473
|
}
|
|
471
474
|
}
|
|
472
|
-
async function
|
|
475
|
+
async function Te(e, r) {
|
|
473
476
|
try {
|
|
474
477
|
const t = await h(
|
|
475
478
|
`${i()}/series/${e}/occurrences?venueId=${r}`
|
|
@@ -479,13 +482,13 @@ async function ze(e, r) {
|
|
|
479
482
|
return u.error("Error fetching series occurrences:", t), null;
|
|
480
483
|
}
|
|
481
484
|
}
|
|
482
|
-
async function
|
|
485
|
+
async function He(e, r) {
|
|
483
486
|
try {
|
|
484
487
|
const t = r ? `?slug=${encodeURIComponent(r)}` : "", s = await h(
|
|
485
488
|
`${i()}/resolve/${encodeURIComponent(String(e))}${t}`
|
|
486
489
|
);
|
|
487
490
|
if (!s || !s.type)
|
|
488
|
-
throw new
|
|
491
|
+
throw new D(
|
|
489
492
|
"Failed to resolve entity",
|
|
490
493
|
"lib/api/events/resolvePublicEntity"
|
|
491
494
|
);
|
|
@@ -494,29 +497,29 @@ async function Te(e, r) {
|
|
|
494
497
|
return u.error("Error resolving public entity:", t), null;
|
|
495
498
|
}
|
|
496
499
|
}
|
|
497
|
-
async function
|
|
500
|
+
async function Me(e) {
|
|
498
501
|
try {
|
|
499
502
|
const r = await h(
|
|
500
503
|
`${i()}/series/${e}/page`
|
|
501
504
|
);
|
|
502
505
|
if (!r)
|
|
503
|
-
throw new
|
|
506
|
+
throw new D("Failed to fetch series page", "lib/api/events/fetchSeriesPage");
|
|
504
507
|
return r;
|
|
505
508
|
} catch (r) {
|
|
506
509
|
return u.error("Error fetching series page:", r), null;
|
|
507
510
|
}
|
|
508
511
|
}
|
|
509
|
-
async function
|
|
512
|
+
async function We(e, r) {
|
|
510
513
|
try {
|
|
511
|
-
const t = r ? `${i()}/collections/${e}
|
|
514
|
+
const t = r ? `${i()}/collections/${e}?password=${encodeURIComponent(r)}` : `${i()}/collections/${e}`, s = await h(t);
|
|
512
515
|
if (!s)
|
|
513
|
-
throw new
|
|
516
|
+
throw new D("Failed to fetch collection", "lib/api/events/fetchPublicCollection");
|
|
514
517
|
return s;
|
|
515
518
|
} catch (t) {
|
|
516
519
|
return u.error("Error fetching collection:", t), null;
|
|
517
520
|
}
|
|
518
521
|
}
|
|
519
|
-
async function
|
|
522
|
+
async function Oe(e, r) {
|
|
520
523
|
try {
|
|
521
524
|
const t = encodeURIComponent(r);
|
|
522
525
|
return (await h(
|
|
@@ -526,7 +529,7 @@ async function We(e, r) {
|
|
|
526
529
|
return u.error("Error checking collection password:", t), !1;
|
|
527
530
|
}
|
|
528
531
|
}
|
|
529
|
-
async function
|
|
532
|
+
async function Qe(e, r) {
|
|
530
533
|
try {
|
|
531
534
|
const t = await y(
|
|
532
535
|
`${i()}/events/${e}/check-password`,
|
|
@@ -539,7 +542,7 @@ async function Oe(e, r) {
|
|
|
539
542
|
return u.error("Error checking event password:", t), { valid: !1 };
|
|
540
543
|
}
|
|
541
544
|
}
|
|
542
|
-
async function
|
|
545
|
+
async function Je(e, r) {
|
|
543
546
|
try {
|
|
544
547
|
const t = r ? `${i()}/events/venue/${r}` : e ? `${i()}/venues/organization/${e}` : `${i()}/health`;
|
|
545
548
|
return (await fetch(t, {
|
|
@@ -550,7 +553,7 @@ async function Qe(e, r) {
|
|
|
550
553
|
}
|
|
551
554
|
}
|
|
552
555
|
const S = P("VC");
|
|
553
|
-
async function
|
|
556
|
+
async function Y(e) {
|
|
554
557
|
try {
|
|
555
558
|
if (!e)
|
|
556
559
|
return S.warn("getVenue called without venueId"), null;
|
|
@@ -560,15 +563,15 @@ async function J(e) {
|
|
|
560
563
|
return S.error("Error fetching venue:", r), null;
|
|
561
564
|
}
|
|
562
565
|
}
|
|
563
|
-
async function
|
|
564
|
-
const r = await
|
|
566
|
+
async function Ye(e) {
|
|
567
|
+
const r = await Y(e);
|
|
565
568
|
return r ? {
|
|
566
569
|
serviceFeePercentage: r.serviceFeePercentage ?? 0,
|
|
567
570
|
serviceFeeCents: r.serviceFeeCents ?? 0,
|
|
568
571
|
taxPercentage: r.taxPercentage ?? 0
|
|
569
572
|
} : null;
|
|
570
573
|
}
|
|
571
|
-
async function
|
|
574
|
+
async function Ke(e) {
|
|
572
575
|
try {
|
|
573
576
|
if (!e)
|
|
574
577
|
return S.warn("getVenueBySlug called without slug"), null;
|
|
@@ -578,21 +581,21 @@ async function Ye(e) {
|
|
|
578
581
|
return S.error("Error fetching venue by slug:", r), null;
|
|
579
582
|
}
|
|
580
583
|
}
|
|
581
|
-
const b = P("VC"),
|
|
582
|
-
async function
|
|
584
|
+
const b = P("VC"), K = "https://get-micdrop.com", X = `${K}/api/orders/v2`, L = () => p();
|
|
585
|
+
async function Xe(e) {
|
|
583
586
|
try {
|
|
584
587
|
const r = await y(
|
|
585
|
-
`${
|
|
588
|
+
`${X}/gift-cards`,
|
|
586
589
|
e
|
|
587
590
|
);
|
|
588
591
|
if (!r.success)
|
|
589
|
-
throw b.error("Gift card purchase creation failed:", r.error), new
|
|
592
|
+
throw b.error("Gift card purchase creation failed:", r.error), new D(r.error || "Failed to create gift card purchase", "lib/api/gift-cards/createGiftCardPurchase");
|
|
590
593
|
return b.debug("Gift card purchase created:", r.data), r.data;
|
|
591
594
|
} catch (r) {
|
|
592
595
|
return b.error("Gift card purchase creation error:", r), null;
|
|
593
596
|
}
|
|
594
597
|
}
|
|
595
|
-
async function
|
|
598
|
+
async function Ze(e, r) {
|
|
596
599
|
try {
|
|
597
600
|
const t = await y(
|
|
598
601
|
`${L()}/cart/${e}/apply-gift-card`,
|
|
@@ -621,7 +624,7 @@ async function Xe(e, r) {
|
|
|
621
624
|
};
|
|
622
625
|
}
|
|
623
626
|
}
|
|
624
|
-
async function
|
|
627
|
+
async function Ve(e) {
|
|
625
628
|
try {
|
|
626
629
|
const r = await Q(`${L()}/cart/${e}/gift-card`);
|
|
627
630
|
return r.success ? { success: !0 } : (b.error("Remove gift card failed:", r.error), { success: !1, error: r.error || "Failed to remove gift card" });
|
|
@@ -632,7 +635,7 @@ async function Ze(e) {
|
|
|
632
635
|
};
|
|
633
636
|
}
|
|
634
637
|
}
|
|
635
|
-
async function
|
|
638
|
+
async function er(e, r) {
|
|
636
639
|
try {
|
|
637
640
|
const t = await y(
|
|
638
641
|
`${L()}/cart/${e}/complete-gift-card-payment`,
|
|
@@ -656,14 +659,14 @@ async function Ve(e, r) {
|
|
|
656
659
|
};
|
|
657
660
|
}
|
|
658
661
|
}
|
|
659
|
-
const E = P("VC"),
|
|
662
|
+
const E = P("VC"), Z = {
|
|
660
663
|
waitlist_not_enabled: "Waitlist is not available for this event",
|
|
661
664
|
event_not_found: "Event not found",
|
|
662
665
|
invalid_phone: "Please enter a valid phone number",
|
|
663
666
|
already_purchased: "You have already purchased tickets for this event",
|
|
664
667
|
phone_already_registered: "This phone number is already on the waitlist"
|
|
665
668
|
};
|
|
666
|
-
async function
|
|
669
|
+
async function rr(e, r, t = null, s = !1) {
|
|
667
670
|
try {
|
|
668
671
|
const n = { email: r };
|
|
669
672
|
t && s && (n.phone = t, n.smsOptIn = !0);
|
|
@@ -676,7 +679,7 @@ async function er(e, r, t = null, s = !1) {
|
|
|
676
679
|
updated: a.data?.updated
|
|
677
680
|
} : (E.error("Join waitlist failed:", a.error), {
|
|
678
681
|
success: !1,
|
|
679
|
-
error:
|
|
682
|
+
error: Z[a.error ?? ""] || "Failed to join waitlist. Please try again."
|
|
680
683
|
});
|
|
681
684
|
} catch (n) {
|
|
682
685
|
return E.error("joinWaitlist error:", n), {
|
|
@@ -685,7 +688,7 @@ async function er(e, r, t = null, s = !1) {
|
|
|
685
688
|
};
|
|
686
689
|
}
|
|
687
690
|
}
|
|
688
|
-
async function
|
|
691
|
+
async function tr(e) {
|
|
689
692
|
const r = {
|
|
690
693
|
waitlistEnabled: !1,
|
|
691
694
|
soldOut: !1,
|
|
@@ -704,14 +707,14 @@ async function rr(e) {
|
|
|
704
707
|
return E.error("getWaitlistStatus error:", t), r;
|
|
705
708
|
}
|
|
706
709
|
}
|
|
707
|
-
function
|
|
710
|
+
function V(e) {
|
|
708
711
|
if (!e || !(e.isHidden === !0 || typeof e.visibility == "number" && e.visibility >= 2) || e.salesChannel === 2) return !1;
|
|
709
712
|
const t = /* @__PURE__ */ new Date(), s = e.salesBegin || e.salesStart || e.saleBegin || e.onSaleStart, n = e.salesEnd || e.saleEnd || e.onSaleEnd;
|
|
710
713
|
if (s && new Date(s) > t || n && new Date(n) < t) return !1;
|
|
711
714
|
const a = e.remainingCapacity ?? e.quantityRemaining ?? e.quantity;
|
|
712
715
|
return !(e.soldOut || a != null && a <= 0);
|
|
713
716
|
}
|
|
714
|
-
function
|
|
717
|
+
function sr(e, r, t = {}) {
|
|
715
718
|
const {
|
|
716
719
|
cancelled: s = !1,
|
|
717
720
|
isRegistration: n = !1,
|
|
@@ -722,7 +725,7 @@ function tr(e, r, t = {}) {
|
|
|
722
725
|
const c = e.endDateTime || e.startDateTime;
|
|
723
726
|
if (c && new Date(c) < o)
|
|
724
727
|
return { text: "Sales ended", disabled: !0, reason: "event_past" };
|
|
725
|
-
const l = e?.hasPurchasableHiddenTickets === !0 || Array.isArray(r) && r.some(
|
|
728
|
+
const l = e?.hasPurchasableHiddenTickets === !0 || Array.isArray(r) && r.some(V), $ = (r || []).filter(
|
|
726
729
|
(d) => d.salesChannel !== 2 && !d.isHidden && !(typeof d.visibility == "number" && d.visibility >= 2)
|
|
727
730
|
);
|
|
728
731
|
if ($.length === 0)
|
|
@@ -737,8 +740,8 @@ function tr(e, r, t = {}) {
|
|
|
737
740
|
};
|
|
738
741
|
let g = !1, m = !0, w = !0, _ = null;
|
|
739
742
|
for (const d of $) {
|
|
740
|
-
const I = d.salesBegin || d.salesStart || d.saleBegin || d.onSaleStart, x = d.salesEnd || d.saleEnd || d.onSaleEnd, C = d.remainingCapacity ?? d.quantityRemaining ?? d.quantity,
|
|
741
|
-
if (!
|
|
743
|
+
const I = d.salesBegin || d.salesStart || d.saleBegin || d.onSaleStart, x = d.salesEnd || d.saleEnd || d.onSaleEnd, C = d.remainingCapacity ?? d.quantityRemaining ?? d.quantity, N = d.soldOut || C != null && C <= 0, R = I ? new Date(I) > o : !1, G = x ? new Date(x) < o : !1;
|
|
744
|
+
if (!N && !R && !G && (g = !0), N || (m = !1), R || (w = !1), R && I && !N && !G) {
|
|
742
745
|
const B = new Date(I);
|
|
743
746
|
(!_ || B < _) && (_ = B);
|
|
744
747
|
}
|
|
@@ -767,12 +770,12 @@ function tr(e, r, t = {}) {
|
|
|
767
770
|
"en-US"
|
|
768
771
|
);
|
|
769
772
|
else {
|
|
770
|
-
const
|
|
773
|
+
const N = z(
|
|
771
774
|
_,
|
|
772
775
|
{ month: "short", day: "numeric" },
|
|
773
776
|
"en-US"
|
|
774
|
-
),
|
|
775
|
-
C = `${
|
|
777
|
+
), R = j(_, { hour12: !0 }, "en-US");
|
|
778
|
+
C = `${N} ${R}`;
|
|
776
779
|
}
|
|
777
780
|
return {
|
|
778
781
|
text: `On sale ${C}`,
|
|
@@ -794,7 +797,7 @@ function tr(e, r, t = {}) {
|
|
|
794
797
|
reason: "hidden_only"
|
|
795
798
|
} : { text: "Sales ended", disabled: !0, reason: "sales_ended" };
|
|
796
799
|
}
|
|
797
|
-
function
|
|
800
|
+
function ee(e) {
|
|
798
801
|
return {
|
|
799
802
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
800
803
|
id: e.id || e.ID,
|
|
@@ -811,7 +814,7 @@ function V(e) {
|
|
|
811
814
|
checkedInAt: e.checkedInAt || e.checked_in_at
|
|
812
815
|
};
|
|
813
816
|
}
|
|
814
|
-
function
|
|
817
|
+
function re(e) {
|
|
815
818
|
const r = e.purchasedTickets || e.tickets || e.purchased_tickets || [];
|
|
816
819
|
return {
|
|
817
820
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
@@ -827,13 +830,13 @@ function ee(e) {
|
|
|
827
830
|
discount: e.discount || 0,
|
|
828
831
|
paymentIntentId: e.paymentIntentId || e.payment_intent_id,
|
|
829
832
|
paymentMethod: e.paymentMethod || e.payment_method,
|
|
830
|
-
purchasedTickets: r.map(
|
|
833
|
+
purchasedTickets: r.map(ee),
|
|
831
834
|
createdAt: e.createdAt || e.created_at,
|
|
832
835
|
updatedAt: e.updatedAt || e.updated_at
|
|
833
836
|
};
|
|
834
837
|
}
|
|
835
|
-
function
|
|
836
|
-
const r =
|
|
838
|
+
function nr(e) {
|
|
839
|
+
const r = re(e), t = r.uuid.split("-")[0] || r.uuid;
|
|
837
840
|
return {
|
|
838
841
|
orderId: r.uuid,
|
|
839
842
|
displayOrderId: t,
|
|
@@ -848,15 +851,15 @@ function sr(e) {
|
|
|
848
851
|
status: r.status
|
|
849
852
|
};
|
|
850
853
|
}
|
|
851
|
-
const
|
|
852
|
-
function
|
|
853
|
-
return e ? e.startsWith("http") ? e : `${
|
|
854
|
+
const te = "https://micdrop-images.sfo3.digitaloceanspaces.com";
|
|
855
|
+
function se(e) {
|
|
856
|
+
return e ? e.startsWith("http") ? e : `${te}/${e.replace(/^\//, "")}` : "";
|
|
854
857
|
}
|
|
855
858
|
function T(e) {
|
|
856
859
|
const r = e.imageUrl || e.imageURL || e.image_url || e.image || "";
|
|
857
|
-
return
|
|
860
|
+
return se(r);
|
|
858
861
|
}
|
|
859
|
-
function
|
|
862
|
+
function ne(e) {
|
|
860
863
|
const r = e.ctaState || e.cta_state;
|
|
861
864
|
if (r)
|
|
862
865
|
return r;
|
|
@@ -877,7 +880,7 @@ function se(e) {
|
|
|
877
880
|
return o + Math.max(0, l - $);
|
|
878
881
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
879
882
|
}
|
|
880
|
-
function
|
|
883
|
+
function oe(e) {
|
|
881
884
|
return {
|
|
882
885
|
id: e.id || e.ID,
|
|
883
886
|
name: e.name || e.ticketName || "",
|
|
@@ -897,8 +900,8 @@ function ne(e) {
|
|
|
897
900
|
sortOrder: e.sortOrder || e.sort_order || 0
|
|
898
901
|
};
|
|
899
902
|
}
|
|
900
|
-
function
|
|
901
|
-
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(
|
|
903
|
+
function ae(e) {
|
|
904
|
+
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(oe), s = t.map((o) => o.price).filter((o) => o > 0), n = s.length > 0 ? Math.min(...s) : void 0, a = s.length > 0 ? Math.max(...s) : void 0;
|
|
902
905
|
return {
|
|
903
906
|
eventID: e.eventID || e.id || e.ID || 0,
|
|
904
907
|
id: e.id || e.ID,
|
|
@@ -926,17 +929,17 @@ function oe(e) {
|
|
|
926
929
|
minPrice: e.minPrice ?? e.min_price ?? n,
|
|
927
930
|
maxPrice: e.maxPrice ?? e.max_price ?? a,
|
|
928
931
|
ctaText: e.ctaText || e.cta_text,
|
|
929
|
-
ctaState:
|
|
932
|
+
ctaState: ne(e),
|
|
930
933
|
showPerformers: e.showPerformers ?? e.show_performers,
|
|
931
934
|
eventSeriesId: e.eventSeriesId || e.event_series_id,
|
|
932
935
|
seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number
|
|
933
936
|
};
|
|
934
937
|
}
|
|
935
|
-
const
|
|
936
|
-
function
|
|
937
|
-
return e ? e.startsWith("http") ? e : `${
|
|
938
|
+
const or = ae, ce = "https://micdrop-images.sfo3.digitaloceanspaces.com";
|
|
939
|
+
function ie(e) {
|
|
940
|
+
return e ? e.startsWith("http") ? e : `${ce}/${e.replace(/^\//, "")}` : "";
|
|
938
941
|
}
|
|
939
|
-
function
|
|
942
|
+
function ar(e) {
|
|
940
943
|
const r = e.logoUrl || e.logo_url || e.logo;
|
|
941
944
|
return {
|
|
942
945
|
id: e.id || e.ID || 0,
|
|
@@ -949,21 +952,21 @@ function or(e) {
|
|
|
949
952
|
zipCode: e.zipCode || e.zip_code,
|
|
950
953
|
country: e.country,
|
|
951
954
|
timezone: e.timezone || e.time_zone,
|
|
952
|
-
logoUrl:
|
|
955
|
+
logoUrl: ie(r),
|
|
953
956
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
954
957
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
955
958
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
|
|
956
959
|
organizationId: e.organizationId || e.organization_id
|
|
957
960
|
};
|
|
958
961
|
}
|
|
959
|
-
function
|
|
962
|
+
function cr(e) {
|
|
960
963
|
return {
|
|
961
964
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
962
965
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
963
966
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
|
|
964
967
|
};
|
|
965
968
|
}
|
|
966
|
-
function
|
|
969
|
+
function ir(e) {
|
|
967
970
|
return [
|
|
968
971
|
e.address,
|
|
969
972
|
e.city,
|
|
@@ -975,65 +978,65 @@ export {
|
|
|
975
978
|
Q as apiDelete,
|
|
976
979
|
A as apiGet,
|
|
977
980
|
y as apiPost,
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
981
|
+
ve as apiPut,
|
|
982
|
+
Ze as applyGiftCard,
|
|
983
|
+
Ue as applyPromoCode,
|
|
984
|
+
ne as calculateCtaState,
|
|
985
|
+
Ce as cancelReservation,
|
|
986
|
+
Oe as checkCollectionPassword,
|
|
987
|
+
Qe as checkEventPassword,
|
|
988
|
+
er as completeGiftCardPayment,
|
|
989
|
+
$e as completeReservation,
|
|
990
|
+
sr as computeCtaState,
|
|
991
|
+
me as configureApi,
|
|
992
|
+
Xe as createGiftCardPurchase,
|
|
993
|
+
Pe as createOrder,
|
|
994
|
+
we as createPaymentIntent,
|
|
995
|
+
Se as extendCheckoutSession,
|
|
996
|
+
cr as extractVenueFees,
|
|
997
|
+
Le as fetchAllVenues,
|
|
998
|
+
ke as fetchEventDetails,
|
|
999
|
+
Ee as fetchEventPerformers,
|
|
1000
|
+
qe as fetchEventTickets,
|
|
1001
|
+
We as fetchPublicCollection,
|
|
1002
|
+
Te as fetchSeriesOccurrences,
|
|
1003
|
+
Me as fetchSeriesPage,
|
|
1004
|
+
Ge as fetchVenueEvents,
|
|
1005
|
+
ir as formatVenueAddress,
|
|
1006
|
+
ye as getApiConfig,
|
|
1007
|
+
se as getCDNImageUrl,
|
|
1008
|
+
_e as getCartByUUID,
|
|
1009
|
+
ge as getClientIP,
|
|
1007
1010
|
T as getEventImageUrl,
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1011
|
+
he as getLegacyPublicUrl,
|
|
1012
|
+
Be as getMonthEvents,
|
|
1013
|
+
Ae as getOrder,
|
|
1014
|
+
p as getOrdersV2Url,
|
|
1015
|
+
je as getOrgMonthEvents,
|
|
1013
1016
|
i as getPublicBaseUrl,
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1017
|
+
ze as getSeriesOccurrences,
|
|
1018
|
+
De as getSessionStatus,
|
|
1019
|
+
Y as getVenue,
|
|
1020
|
+
Ke as getVenueBySlug,
|
|
1021
|
+
Ye as getVenueFees,
|
|
1022
|
+
tr as getWaitlistStatus,
|
|
1023
|
+
xe as hasPromoCodes,
|
|
1021
1024
|
pe as initiateOrder,
|
|
1022
|
-
|
|
1023
|
-
|
|
1025
|
+
rr as joinWaitlist,
|
|
1026
|
+
Ve as removeGiftCard,
|
|
1024
1027
|
Fe as removePromoCode,
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1028
|
+
He as resolvePublicEntity,
|
|
1029
|
+
Je as testNetworkConnection,
|
|
1030
|
+
Ne as trackUTMSource,
|
|
1031
|
+
oe as transformAvailableTicket,
|
|
1032
|
+
ae as transformEvent,
|
|
1033
|
+
or as transformEventData,
|
|
1034
|
+
re as transformOrder,
|
|
1035
|
+
nr as transformOrderForDisplay,
|
|
1036
|
+
ee as transformTicket,
|
|
1037
|
+
ar as transformVenue,
|
|
1038
|
+
be as updateCartQuantities,
|
|
1039
|
+
Ie as validatePaymentIntent,
|
|
1040
|
+
Re as validatePromoCode
|
|
1038
1041
|
};
|
|
1039
1042
|
//# sourceMappingURL=api.mjs.map
|