@getmicdrop/venue-calendar 4.0.94 → 4.0.95
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/{CartView-hnrXbE_O.js → CartView-Cq0DU1Cy.js} +101 -101
- package/dist/{CartView-hnrXbE_O.js.map → CartView-Cq0DU1Cy.js.map} +1 -1
- package/dist/{Checkout-Bvre3lYs.js → Checkout-BA43iGDc.js} +263 -263
- package/dist/Checkout-BA43iGDc.js.map +1 -0
- package/dist/{Checkout-C4Kr5pVp.js → Checkout-BV5f49vY.js} +3 -3
- package/dist/{Checkout-C4Kr5pVp.js.map → Checkout-BV5f49vY.js.map} +1 -1
- package/dist/{CheckoutTimer-D2HnWYm7.js → CheckoutTimer-KyKyInco.js} +5 -5
- package/dist/{CheckoutTimer-D2HnWYm7.js.map → CheckoutTimer-KyKyInco.js.map} +1 -1
- package/dist/{ClockIcon-DA4wXK5Q.js → ClockIcon-BD24dBol.js} +2 -2
- package/dist/{ClockIcon-DA4wXK5Q.js.map → ClockIcon-BD24dBol.js.map} +1 -1
- package/dist/{CollectionView-DU1lTGU_.js → CollectionView-CKIxku9-.js} +18 -18
- package/dist/{CollectionView-DU1lTGU_.js.map → CollectionView-CKIxku9-.js.map} +1 -1
- package/dist/{Event-BuOnGjPB.js → Event-BPdt1Io5.js} +174 -169
- package/dist/{Event-BuOnGjPB.js.map → Event-BPdt1Io5.js.map} +1 -1
- package/dist/EventPage-DRnTMGTK.js +575 -0
- package/dist/EventPage-DRnTMGTK.js.map +1 -0
- package/dist/{Heading-D4iOOm-C.js → Heading-pQuVpBrL.js} +8 -8
- package/dist/{Heading-D4iOOm-C.js.map → Heading-pQuVpBrL.js.map} +1 -1
- package/dist/{ScarcityBadge-D37JY-BJ.js → ScarcityBadge-DoYdujCs.js} +7 -7
- package/dist/{ScarcityBadge-D37JY-BJ.js.map → ScarcityBadge-DoYdujCs.js.map} +1 -1
- package/dist/{SeriesPage-CZdi_-a4.js → SeriesPage-vw7Hva9F.js} +7 -7
- package/dist/{SeriesPage-CZdi_-a4.js.map → SeriesPage-vw7Hva9F.js.map} +1 -1
- package/dist/{Spinner-BZYln43S.js → Spinner-BfFZMaDP.js} +5 -5
- package/dist/{Spinner-BZYln43S.js.map → Spinner-BfFZMaDP.js.map} +1 -1
- package/dist/{Success-CQYI5SZO.js → Success-Cjj6CC4w.js} +325 -329
- package/dist/{Success-CQYI5SZO.js.map → Success-Cjj6CC4w.js.map} +1 -1
- package/dist/{Text-C-6sDfH2.js → Text-CT79Zi5n.js} +2 -2
- package/dist/{Text-C-6sDfH2.js.map → Text-CT79Zi5n.js.map} +1 -1
- package/dist/{VenueCalendar-Um0PQCVy.js → VenueCalendar-Cz7_VBC6.js} +1948 -1951
- package/dist/VenueCalendar-Cz7_VBC6.js.map +1 -0
- package/dist/{ViewTicketsEmbed-D2jQ8AMb.js → ViewTicketsEmbed-BvCfoKY3.js} +80 -80
- package/dist/{ViewTicketsEmbed-D2jQ8AMb.js.map → ViewTicketsEmbed-BvCfoKY3.js.map} +1 -1
- package/dist/api/api/events.d.ts +18 -0
- package/dist/api/api/gift-cards.d.ts +19 -0
- package/dist/api/api/index.d.ts +2 -2
- package/dist/api/api/result.d.ts +31 -1
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +295 -284
- package/dist/api/api.mjs.map +1 -1
- package/dist/{data-toggle-store.svelte-CyXPU9Oq.js → data-toggle-store.svelte-BHwbM34q.js} +2 -2
- package/dist/{data-toggle-store.svelte-CyXPU9Oq.js.map → data-toggle-store.svelte-BHwbM34q.js.map} +1 -1
- package/dist/{labels-BNiV89mT.js → labels-_x9WkVuZ.js} +65 -62
- package/dist/labels-_x9WkVuZ.js.map +1 -0
- package/dist/{modalManager.svelte-D_9E6W5P.js → modalManager.svelte-Csm1WlvP.js} +2 -2
- package/dist/{modalManager.svelte-D_9E6W5P.js.map → modalManager.svelte-Csm1WlvP.js.map} +1 -1
- package/dist/{transform-HKz55B2D.js → transform-WRPgSKLN.js} +6 -6
- package/dist/{transform-HKz55B2D.js.map → transform-WRPgSKLN.js.map} +1 -1
- package/dist/venue-calendar.es.js +1 -1
- package/dist/venue-calendar.iife.js +33 -33
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +36 -36
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +2 -2
- package/dist/Checkout-Bvre3lYs.js.map +0 -1
- package/dist/EventPage-vBSbuSaG.js +0 -566
- package/dist/EventPage-vBSbuSaG.js.map +0 -1
- package/dist/VenueCalendar-Um0PQCVy.js.map +0 -1
- package/dist/labels-BNiV89mT.js.map +0 -1
package/dist/api/api.mjs
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { createLogger as
|
|
2
|
-
import { getLocalStorage as
|
|
1
|
+
import { createLogger as $ } from "@getmicdrop/svelte-components/utils/logger";
|
|
2
|
+
import { getLocalStorage as ue, setLocalStorage as le, getSessionStorage as Y, setSessionStorage as de, createLogger as fe, AppError as N, formatCurrency as me, resolveImageUrl as K } from "@getmicdrop/svelte-components";
|
|
3
3
|
import { formatLocal as L } from "@getmicdrop/svelte-components/datetime";
|
|
4
|
-
import { isHiddenTicketPurchasable as
|
|
4
|
+
import { isHiddenTicketPurchasable as pe } from "@getmicdrop/svelte-components/transforms";
|
|
5
5
|
import "@getmicdrop/svelte-components/utils/timezones";
|
|
6
|
-
const q =
|
|
6
|
+
const q = $("VC"), ye = {
|
|
7
7
|
baseUrl: "https://get-micdrop.com",
|
|
8
8
|
timeout: 3e4,
|
|
9
9
|
retries: 2,
|
|
10
10
|
retryDelay: 500,
|
|
11
11
|
onError: (t) => q.error("API Error:", t)
|
|
12
12
|
};
|
|
13
|
-
let p = { ...
|
|
14
|
-
function
|
|
13
|
+
let p = { ...ye };
|
|
14
|
+
function ct(t) {
|
|
15
15
|
p = { ...p, ...t };
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function ut() {
|
|
18
18
|
return { ...p };
|
|
19
19
|
}
|
|
20
20
|
function c() {
|
|
21
21
|
return `${p.baseUrl}/api/v2/public`;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function lt() {
|
|
24
24
|
return `${p.baseUrl}/api/public`;
|
|
25
25
|
}
|
|
26
26
|
function R() {
|
|
27
27
|
return `${p.baseUrl}/api/orders/v2/public`;
|
|
28
28
|
}
|
|
29
|
-
async function
|
|
29
|
+
async function dt() {
|
|
30
30
|
return "";
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
async function
|
|
32
|
+
const ge = (t) => new Promise((e) => setTimeout(e, t));
|
|
33
|
+
async function Z(t, e, r) {
|
|
34
34
|
const n = (e.method || "GET").toUpperCase(), s = n === "GET" || n === "HEAD" ? r.retries + 1 : 1;
|
|
35
35
|
let o;
|
|
36
36
|
for (let i = 1; i <= s; i++) {
|
|
37
|
-
const u = new AbortController(),
|
|
37
|
+
const u = new AbortController(), T = setTimeout(() => u.abort(), r.timeout), y = e.signal;
|
|
38
38
|
let k;
|
|
39
39
|
y && (y.aborted ? u.abort() : (k = () => u.abort(), y.addEventListener("abort", k, { once: !0 })));
|
|
40
40
|
try {
|
|
@@ -46,28 +46,28 @@ async function K(t, e, r) {
|
|
|
46
46
|
} catch (g) {
|
|
47
47
|
if (o = g, y?.aborted) throw g;
|
|
48
48
|
} finally {
|
|
49
|
-
clearTimeout(
|
|
49
|
+
clearTimeout(T), y && k && y.removeEventListener("abort", k);
|
|
50
50
|
}
|
|
51
|
-
i < s && await
|
|
51
|
+
i < s && await ge(r.retryDelay * Math.pow(2, i - 1));
|
|
52
52
|
}
|
|
53
53
|
throw o;
|
|
54
54
|
}
|
|
55
|
-
async function
|
|
55
|
+
async function C(t, e) {
|
|
56
56
|
return F("GET", t, void 0, e);
|
|
57
57
|
}
|
|
58
58
|
async function f(t, e, r) {
|
|
59
59
|
return F("POST", t, e, r);
|
|
60
60
|
}
|
|
61
|
-
async function
|
|
61
|
+
async function ft(t, e, r) {
|
|
62
62
|
return F("PUT", t, e, r);
|
|
63
63
|
}
|
|
64
|
-
async function
|
|
64
|
+
async function ve(t, e) {
|
|
65
65
|
return F("DELETE", t, void 0, e);
|
|
66
66
|
}
|
|
67
67
|
async function F(t, e, r, n) {
|
|
68
68
|
const a = e.startsWith("http") ? e : `${c()}${e}`;
|
|
69
69
|
try {
|
|
70
|
-
const s = await
|
|
70
|
+
const s = await Z(
|
|
71
71
|
a,
|
|
72
72
|
{
|
|
73
73
|
method: t,
|
|
@@ -95,7 +95,7 @@ async function F(t, e, r, n) {
|
|
|
95
95
|
}
|
|
96
96
|
async function A(t, e) {
|
|
97
97
|
try {
|
|
98
|
-
const r = await
|
|
98
|
+
const r = await Z(
|
|
99
99
|
t,
|
|
100
100
|
{ credentials: "include", ...e },
|
|
101
101
|
p
|
|
@@ -109,7 +109,7 @@ async function A(t, e) {
|
|
|
109
109
|
return q.error("API request error:", r), null;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function he(t) {
|
|
113
113
|
const e = t ?? {};
|
|
114
114
|
return {
|
|
115
115
|
ticketID: Number(e.TicketID ?? e.ticketID ?? 0),
|
|
@@ -120,39 +120,39 @@ function ge(t) {
|
|
|
120
120
|
status: String(e.Status ?? e.status ?? "")
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
const e = t ?? {}, r = e.UUID ?? e.uuid ?? "", n = Number(e.EventID ?? e.eventID ?? 0), a = e.Status ?? e.status ?? "", s = e.ExpiresAt ?? e.expiresAt ?? "", i = (e.Reservations ?? e.reservations ?? []).map(
|
|
123
|
+
function _e(t) {
|
|
124
|
+
const e = t ?? {}, r = e.UUID ?? e.uuid ?? "", n = Number(e.EventID ?? e.eventID ?? 0), a = e.Status ?? e.status ?? "", s = e.ExpiresAt ?? e.expiresAt ?? "", i = (e.Reservations ?? e.reservations ?? []).map(he);
|
|
125
125
|
return { uuid: r, eventID: n, status: a, expiresAt: s, reservations: i };
|
|
126
126
|
}
|
|
127
|
-
const
|
|
127
|
+
const X = [
|
|
128
128
|
"utmSource",
|
|
129
129
|
"utmMedium",
|
|
130
130
|
"utmCampaign",
|
|
131
131
|
"utmContent",
|
|
132
132
|
"utmTerm"
|
|
133
|
-
],
|
|
133
|
+
], we = {
|
|
134
134
|
utmSource: "utm_source",
|
|
135
135
|
utmMedium: "utm_medium",
|
|
136
136
|
utmCampaign: "utm_campaign",
|
|
137
137
|
utmContent: "utm_content",
|
|
138
138
|
utmTerm: "utm_term"
|
|
139
|
-
},
|
|
140
|
-
function
|
|
139
|
+
}, ee = "direct";
|
|
140
|
+
function te(t) {
|
|
141
141
|
return t ? t.trim().toLowerCase().replace(/\s+/g, "_") : "";
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function ke(t) {
|
|
144
144
|
const e = {};
|
|
145
|
-
for (const r of
|
|
146
|
-
e[r] =
|
|
147
|
-
return e.utmSource || (e.utmSource =
|
|
145
|
+
for (const r of X)
|
|
146
|
+
e[r] = te(t[r]);
|
|
147
|
+
return e.utmSource || (e.utmSource = ee), e;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function be(t) {
|
|
150
150
|
const e = {};
|
|
151
|
-
for (const r of
|
|
152
|
-
e[r] = t.get(
|
|
153
|
-
return
|
|
151
|
+
for (const r of X)
|
|
152
|
+
e[r] = t.get(we[r]);
|
|
153
|
+
return ke(e);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function $e() {
|
|
156
156
|
if (typeof window > "u") return !0;
|
|
157
157
|
try {
|
|
158
158
|
return window.self === window.top;
|
|
@@ -160,29 +160,29 @@ function ke() {
|
|
|
160
160
|
return !1;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
const t = typeof window < "u", e =
|
|
163
|
+
function Ce() {
|
|
164
|
+
const t = typeof window < "u", e = $e(), r = t ? window.location.search : "", n = (typeof document < "u" ? document.referrer : "") ?? "", a = t && e ? window.location.href : "";
|
|
165
165
|
return {
|
|
166
|
-
utm:
|
|
166
|
+
utm: be(new URLSearchParams(r)),
|
|
167
167
|
referrer: n || "",
|
|
168
168
|
pageUrl: a || ""
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
let
|
|
172
|
-
function
|
|
171
|
+
let Te = !1;
|
|
172
|
+
function Pe() {
|
|
173
173
|
return typeof window < "u" && typeof window.__tcfapi == "function";
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return
|
|
175
|
+
function Se() {
|
|
176
|
+
return Pe();
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
return
|
|
178
|
+
function Ie() {
|
|
179
|
+
return Se() ? Te : !0;
|
|
180
180
|
}
|
|
181
|
-
const H = "micdrop_session_id", W = "micdrop_visitor_id",
|
|
182
|
-
function
|
|
183
|
-
return typeof t == "string" &&
|
|
181
|
+
const H = "micdrop_session_id", W = "micdrop_visitor_id", Ee = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
182
|
+
function Re(t) {
|
|
183
|
+
return typeof t == "string" && Ee.test(t);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function re() {
|
|
186
186
|
const t = typeof crypto < "u" ? crypto : void 0;
|
|
187
187
|
if (t?.randomUUID) return t.randomUUID();
|
|
188
188
|
const e = new Uint8Array(16);
|
|
@@ -195,27 +195,27 @@ function te() {
|
|
|
195
195
|
for (let n = 0; n < 16; n++) r.push(e[n].toString(16).padStart(2, "0"));
|
|
196
196
|
return `${r[0]}${r[1]}${r[2]}${r[3]}-${r[4]}${r[5]}-${r[6]}${r[7]}-${r[8]}${r[9]}-${r[10]}${r[11]}${r[12]}${r[13]}${r[14]}${r[15]}`;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
let t =
|
|
200
|
-
return t || (t =
|
|
198
|
+
function Ae() {
|
|
199
|
+
let t = Y(H);
|
|
200
|
+
return t || (t = re(), de(H, t)), t;
|
|
201
201
|
}
|
|
202
|
-
function Re() {
|
|
203
|
-
if (!Pe()) return null;
|
|
204
|
-
const t = ie(W);
|
|
205
|
-
if (Ie(t)) return t;
|
|
206
|
-
const e = te();
|
|
207
|
-
return ce(W, e), e;
|
|
208
|
-
}
|
|
209
|
-
const Ae = "micdrop_attribution";
|
|
210
202
|
function De() {
|
|
211
|
-
|
|
203
|
+
if (!Ie()) return null;
|
|
204
|
+
const t = ue(W);
|
|
205
|
+
if (Re(t)) return t;
|
|
206
|
+
const e = re();
|
|
207
|
+
return le(W, e), e;
|
|
208
|
+
}
|
|
209
|
+
const Ne = "micdrop_attribution";
|
|
210
|
+
function Ue() {
|
|
211
|
+
const t = Y(Ne);
|
|
212
212
|
return !t || !t.utm || typeof t.utm.utmSource != "string" ? null : t;
|
|
213
213
|
}
|
|
214
214
|
function U() {
|
|
215
|
-
const e =
|
|
215
|
+
const e = Ue() ?? Ce();
|
|
216
216
|
return {
|
|
217
|
-
sessionId:
|
|
218
|
-
visitorId:
|
|
217
|
+
sessionId: Ae(),
|
|
218
|
+
visitorId: De(),
|
|
219
219
|
utmSource: e.utm.utmSource,
|
|
220
220
|
utmMedium: e.utm.utmMedium,
|
|
221
221
|
utmCampaign: e.utm.utmCampaign,
|
|
@@ -224,9 +224,9 @@ function U() {
|
|
|
224
224
|
referrer: e.referrer || ""
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
|
|
228
|
-
const d =
|
|
229
|
-
async function
|
|
227
|
+
fe("tracking");
|
|
228
|
+
const d = $("VC");
|
|
229
|
+
async function mt(t, e, r) {
|
|
230
230
|
try {
|
|
231
231
|
const n = await f(
|
|
232
232
|
`${R()}/cart/${t}/payment-intent`,
|
|
@@ -240,7 +240,7 @@ async function dt(t, e, r) {
|
|
|
240
240
|
}
|
|
241
241
|
);
|
|
242
242
|
if (!n.success)
|
|
243
|
-
throw d.error("Payment intent creation failed:", n.error), new
|
|
243
|
+
throw d.error("Payment intent creation failed:", n.error), new N(
|
|
244
244
|
n.error || "Failed to create payment intent",
|
|
245
245
|
"lib/api/orders/createPaymentIntent"
|
|
246
246
|
);
|
|
@@ -249,15 +249,15 @@ async function dt(t, e, r) {
|
|
|
249
249
|
return d.error("createPaymentIntent error:", n), null;
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
-
async function
|
|
252
|
+
async function pt(t, e) {
|
|
253
253
|
if (!t) return null;
|
|
254
254
|
try {
|
|
255
|
-
const r = await
|
|
255
|
+
const r = await C(
|
|
256
256
|
`${R()}/cart/${t}`
|
|
257
257
|
);
|
|
258
258
|
if (!r.success)
|
|
259
259
|
return null;
|
|
260
|
-
const { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i } =
|
|
260
|
+
const { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i } = _e(
|
|
261
261
|
r.data
|
|
262
262
|
);
|
|
263
263
|
return s !== "reserved" && s !== "active" || e !== void 0 && a !== Number(e) ? null : { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i };
|
|
@@ -265,7 +265,7 @@ async function ft(t, e) {
|
|
|
265
265
|
return d.error("getCartByUUID error:", r), null;
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
-
async function
|
|
268
|
+
async function yt(t, e, r) {
|
|
269
269
|
try {
|
|
270
270
|
const n = {};
|
|
271
271
|
for (const [o, i] of Object.entries(e)) {
|
|
@@ -296,7 +296,7 @@ async function mt(t, e, r) {
|
|
|
296
296
|
return d.error("updateCartQuantities error:", n), !1;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
async function
|
|
299
|
+
async function gt(t) {
|
|
300
300
|
try {
|
|
301
301
|
const e = await f(
|
|
302
302
|
`${c()}/orders/complete/${t}`
|
|
@@ -312,7 +312,7 @@ async function pt(t) {
|
|
|
312
312
|
return d.error("Error completing reservation:", e), { success: !1, error: "Network error completing reservation" };
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
async function
|
|
315
|
+
async function vt(t) {
|
|
316
316
|
try {
|
|
317
317
|
const e = await f(
|
|
318
318
|
`${c()}/orders/cancel/${t}`
|
|
@@ -328,7 +328,7 @@ async function yt(t) {
|
|
|
328
328
|
return d.error("Error cancelling reservation:", e), { success: !1, error: "Network error cancelling reservation" };
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
-
async function
|
|
331
|
+
async function ht(t, e) {
|
|
332
332
|
try {
|
|
333
333
|
const r = await f(
|
|
334
334
|
`${c()}/orders/create`,
|
|
@@ -340,10 +340,10 @@ async function gt(t, e) {
|
|
|
340
340
|
return d.error("createOrder error:", r), null;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
async function
|
|
343
|
+
async function _t(t) {
|
|
344
344
|
return A(`${c()}/orders/${t}`);
|
|
345
345
|
}
|
|
346
|
-
async function
|
|
346
|
+
async function wt(t, e) {
|
|
347
347
|
try {
|
|
348
348
|
const r = await f(`${R()}/validatePaymentIntent/${t}`, {
|
|
349
349
|
...e,
|
|
@@ -370,7 +370,7 @@ async function ht(t, e) {
|
|
|
370
370
|
return d.error("validatePaymentIntent error:", r), null;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
async function
|
|
373
|
+
async function kt(t) {
|
|
374
374
|
try {
|
|
375
375
|
const e = await f(`${c()}/orders/extend-session`, { orderUuid: t });
|
|
376
376
|
if (!e.success)
|
|
@@ -389,9 +389,9 @@ async function _t(t) {
|
|
|
389
389
|
return d.error("Error extending checkout session:", e), { success: !1, error: "Network error extending session" };
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
async function
|
|
392
|
+
async function bt(t) {
|
|
393
393
|
try {
|
|
394
|
-
const e = await
|
|
394
|
+
const e = await C(
|
|
395
395
|
`${c()}/orders/session/${t}`
|
|
396
396
|
);
|
|
397
397
|
if (!e.success)
|
|
@@ -412,7 +412,7 @@ async function wt(t) {
|
|
|
412
412
|
return d.error("Error getting session status:", e), { error: "Network error getting session status" };
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
async function
|
|
415
|
+
async function $t(t = { eventID: "" }) {
|
|
416
416
|
try {
|
|
417
417
|
const e = await f(
|
|
418
418
|
`${c()}/orders/create`,
|
|
@@ -424,9 +424,9 @@ async function kt(t = { eventID: "" }) {
|
|
|
424
424
|
return d.error("initiateOrder error:", e), null;
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
-
async function
|
|
427
|
+
async function Ct(t) {
|
|
428
428
|
if (typeof window > "u") return;
|
|
429
|
-
const e = new URLSearchParams(window.location.search), r =
|
|
429
|
+
const e = new URLSearchParams(window.location.search), r = te(e.get("utm_source")) || ee;
|
|
430
430
|
try {
|
|
431
431
|
await fetch(
|
|
432
432
|
`${c()}/utm/${t}/${encodeURIComponent(r)}`
|
|
@@ -435,12 +435,12 @@ async function bt(t) {
|
|
|
435
435
|
d.error("UTM tracking failed:", n);
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
|
-
const V =
|
|
439
|
-
async function
|
|
438
|
+
const V = $("VC"), xe = () => R();
|
|
439
|
+
async function Tt(t, e) {
|
|
440
440
|
try {
|
|
441
441
|
if (!e || !e.trim())
|
|
442
442
|
return { valid: !1, error: "Promo code is required" };
|
|
443
|
-
const r = encodeURIComponent(e.trim()), n = await
|
|
443
|
+
const r = encodeURIComponent(e.trim()), n = await C(
|
|
444
444
|
`/promo-codes/validate/${t}/${r}`
|
|
445
445
|
);
|
|
446
446
|
if (!n.success)
|
|
@@ -459,9 +459,9 @@ async function $t(t, e) {
|
|
|
459
459
|
return V.error("Error validating promo code:", r), { valid: !1, error: "Network error validating code" };
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
async function
|
|
462
|
+
async function Pt(t) {
|
|
463
463
|
try {
|
|
464
|
-
const e = await
|
|
464
|
+
const e = await C(
|
|
465
465
|
`/promo-codes/check/${t}`
|
|
466
466
|
);
|
|
467
467
|
return e.success ? e.data.hasPromoCodes === !0 : !0;
|
|
@@ -469,10 +469,10 @@ async function Ct(t) {
|
|
|
469
469
|
return V.error("Error checking promo codes availability:", e), !0;
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
async function
|
|
472
|
+
async function St(t, e) {
|
|
473
473
|
try {
|
|
474
474
|
const r = await f(
|
|
475
|
-
`${
|
|
475
|
+
`${xe()}/cart/${t}/apply-promo`,
|
|
476
476
|
{ promoCode: e }
|
|
477
477
|
);
|
|
478
478
|
return r.success ? { success: !0 } : {
|
|
@@ -483,7 +483,7 @@ async function Tt(t, e) {
|
|
|
483
483
|
return V.error("Error applying promo code:", r), { success: !1, error: "Network error applying code" };
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
async function
|
|
486
|
+
async function It(t) {
|
|
487
487
|
try {
|
|
488
488
|
const e = await f(`/orders/${t}/remove-promo`);
|
|
489
489
|
return e.success ? { success: !0 } : {
|
|
@@ -494,27 +494,33 @@ async function Pt(t) {
|
|
|
494
494
|
return V.error("Error removing promo code:", e), { success: !1, error: "Network error removing code" };
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Oe(t) {
|
|
498
498
|
const e = t ?? {};
|
|
499
499
|
return {
|
|
500
500
|
performers: Array.isArray(e.performers) ? e.performers : [],
|
|
501
501
|
showPerformers: e.showPerformers === !0
|
|
502
502
|
};
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function ne(t) {
|
|
505
505
|
return { ok: !0, data: t };
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function b(t) {
|
|
508
508
|
return { ok: !1, error: t };
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Q(t) {
|
|
511
|
+
return { ok: !1, error: t, notFound: !0 };
|
|
512
|
+
}
|
|
513
|
+
function Et(t) {
|
|
511
514
|
return t.ok;
|
|
512
515
|
}
|
|
516
|
+
function Rt(t) {
|
|
517
|
+
return !t.ok;
|
|
518
|
+
}
|
|
513
519
|
function D(t, e) {
|
|
514
520
|
return t.ok ? t.data : e;
|
|
515
521
|
}
|
|
516
|
-
const m =
|
|
517
|
-
async function
|
|
522
|
+
const m = $("VC"), O = /* @__PURE__ */ new Map();
|
|
523
|
+
async function Fe(t, e = fetch, r) {
|
|
518
524
|
const n = r ? `${t}:pw` : String(t);
|
|
519
525
|
if (e === fetch) {
|
|
520
526
|
const s = O.get(n);
|
|
@@ -524,123 +530,125 @@ async function It(t, e = fetch, r) {
|
|
|
524
530
|
try {
|
|
525
531
|
const s = r ? `${c()}/events/${t}?password=${encodeURIComponent(r)}` : `${c()}/events/${t}`, o = await e(s);
|
|
526
532
|
if (!o.ok)
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
);
|
|
531
|
-
return await o.json();
|
|
533
|
+
return o.status === 404 ? Q("event_not_found") : (m.error(`Failed to fetch event details: ${o.status}`), b("event_fetch_failed"));
|
|
534
|
+
const i = await o.json();
|
|
535
|
+
return i ? ne(i) : Q("event_not_found");
|
|
532
536
|
} catch (s) {
|
|
533
|
-
return m.error("Error fetching event details:", s),
|
|
537
|
+
return m.error("Error fetching event details:", s), b("event_fetch_failed");
|
|
534
538
|
}
|
|
535
539
|
})();
|
|
536
540
|
return e === fetch && (O.set(n, a), a.finally(() => {
|
|
537
541
|
O.get(n) === a && O.delete(n);
|
|
538
542
|
})), a;
|
|
539
543
|
}
|
|
544
|
+
async function At(t, e = fetch, r) {
|
|
545
|
+
const n = await Fe(t, e, r);
|
|
546
|
+
return n.ok ? n.data : null;
|
|
547
|
+
}
|
|
540
548
|
async function w(t, e, r = (n) => n) {
|
|
541
549
|
try {
|
|
542
550
|
const n = await A(t);
|
|
543
|
-
return n ?
|
|
551
|
+
return n ? ne(r(n)) : (m.error(`Failed to load (${e}): network or server error`), b(e));
|
|
544
552
|
} catch (n) {
|
|
545
|
-
return m.error(`Error loading (${e}):`, n),
|
|
553
|
+
return m.error(`Error loading (${e}):`, n), b(e);
|
|
546
554
|
}
|
|
547
555
|
}
|
|
548
556
|
function G(t) {
|
|
549
557
|
return Array.isArray(t) ? t : [];
|
|
550
558
|
}
|
|
551
|
-
async function
|
|
559
|
+
async function Ve(t) {
|
|
552
560
|
return w(
|
|
553
561
|
`${c()}/tickets/event/${t}`,
|
|
554
562
|
"tickets_fetch_failed",
|
|
555
563
|
G
|
|
556
564
|
);
|
|
557
565
|
}
|
|
558
|
-
async function
|
|
559
|
-
return D(await
|
|
566
|
+
async function Dt(t) {
|
|
567
|
+
return D(await Ve(t), []);
|
|
560
568
|
}
|
|
561
|
-
async function
|
|
569
|
+
async function Le(t) {
|
|
562
570
|
return t ? w(
|
|
563
571
|
`${c()}/events/${t}/performers`,
|
|
564
572
|
"performers_fetch_failed",
|
|
565
|
-
(e) =>
|
|
566
|
-
) : (m.warn("fetchEventPerformers called without eventId"),
|
|
573
|
+
(e) => Oe(e)
|
|
574
|
+
) : (m.warn("fetchEventPerformers called without eventId"), b("performers_missing_event_id"));
|
|
567
575
|
}
|
|
568
|
-
async function
|
|
569
|
-
return D(await
|
|
576
|
+
async function Nt(t) {
|
|
577
|
+
return D(await Le(t), {
|
|
570
578
|
performers: [],
|
|
571
579
|
showPerformers: !1
|
|
572
580
|
});
|
|
573
581
|
}
|
|
574
|
-
async function
|
|
582
|
+
async function qe(t) {
|
|
575
583
|
return t ? w(
|
|
576
584
|
`${c()}/venues/organization/${t}`,
|
|
577
585
|
"venues_fetch_failed",
|
|
578
586
|
G
|
|
579
|
-
) : (m.warn("fetchAllVenues called without orgId"),
|
|
587
|
+
) : (m.warn("fetchAllVenues called without orgId"), b("venues_missing_org_id"));
|
|
580
588
|
}
|
|
581
|
-
async function
|
|
582
|
-
return D(await
|
|
589
|
+
async function Ut(t) {
|
|
590
|
+
return D(await qe(t), []);
|
|
583
591
|
}
|
|
584
|
-
async function
|
|
592
|
+
async function Me(t) {
|
|
585
593
|
return t ? w(
|
|
586
594
|
`${c()}/events/venue/${t}`,
|
|
587
595
|
"venue_events_fetch_failed",
|
|
588
596
|
G
|
|
589
|
-
) : (m.warn("fetchVenueEvents called without venueId"),
|
|
597
|
+
) : (m.warn("fetchVenueEvents called without venueId"), b("venue_events_missing_venue_id"));
|
|
590
598
|
}
|
|
591
|
-
async function
|
|
592
|
-
return D(await
|
|
599
|
+
async function xt(t) {
|
|
600
|
+
return D(await Me(t), []);
|
|
593
601
|
}
|
|
594
|
-
function
|
|
602
|
+
function ae(t) {
|
|
595
603
|
return Array.isArray(t) ? t : Array.isArray(t.events) ? t.events : [];
|
|
596
604
|
}
|
|
597
|
-
async function
|
|
605
|
+
async function Ge(t, e, r) {
|
|
598
606
|
return w(
|
|
599
607
|
`${c()}/events/venue/${t}/month/${e}/${r}`,
|
|
600
608
|
"month_events_fetch_failed",
|
|
601
|
-
(n) =>
|
|
609
|
+
(n) => ae(n)
|
|
602
610
|
);
|
|
603
611
|
}
|
|
604
|
-
async function
|
|
605
|
-
return D(await
|
|
612
|
+
async function Ot(t, e, r) {
|
|
613
|
+
return D(await Ge(t, e, r), []);
|
|
606
614
|
}
|
|
607
|
-
async function
|
|
615
|
+
async function je(t, e, r) {
|
|
608
616
|
return w(
|
|
609
617
|
`${c()}/events/organization/${t}/month/${e}/${r}`,
|
|
610
618
|
"org_month_events_fetch_failed",
|
|
611
|
-
(n) =>
|
|
619
|
+
(n) => ae(n)
|
|
612
620
|
);
|
|
613
621
|
}
|
|
614
|
-
async function
|
|
615
|
-
return D(await
|
|
622
|
+
async function Ft(t, e, r) {
|
|
623
|
+
return D(await je(t, e, r), []);
|
|
616
624
|
}
|
|
617
|
-
async function
|
|
625
|
+
async function ze(t) {
|
|
618
626
|
return w(
|
|
619
627
|
`${c()}/series/${t}/occurrences`,
|
|
620
628
|
"series_occurrences_fetch_failed"
|
|
621
629
|
);
|
|
622
630
|
}
|
|
623
|
-
async function
|
|
624
|
-
const e = await
|
|
631
|
+
async function Vt(t) {
|
|
632
|
+
const e = await ze(t);
|
|
625
633
|
return e.ok ? e.data : null;
|
|
626
634
|
}
|
|
627
|
-
async function
|
|
635
|
+
async function Be(t, e) {
|
|
628
636
|
return w(
|
|
629
637
|
`${c()}/series/${t}/occurrences?venueId=${e}`,
|
|
630
638
|
"series_cta_fetch_failed"
|
|
631
639
|
);
|
|
632
640
|
}
|
|
633
|
-
async function
|
|
634
|
-
const r = await
|
|
641
|
+
async function Lt(t, e) {
|
|
642
|
+
const r = await Be(t, e);
|
|
635
643
|
return r.ok ? r.data : null;
|
|
636
644
|
}
|
|
637
|
-
async function
|
|
645
|
+
async function qt(t, e) {
|
|
638
646
|
try {
|
|
639
647
|
const r = e ? `?slug=${encodeURIComponent(e)}` : "", n = await A(
|
|
640
648
|
`${c()}/resolve/${encodeURIComponent(String(t))}${r}`
|
|
641
649
|
);
|
|
642
650
|
if (!n || !n.type)
|
|
643
|
-
throw new
|
|
651
|
+
throw new N(
|
|
644
652
|
"Failed to resolve entity",
|
|
645
653
|
"lib/api/events/resolvePublicEntity"
|
|
646
654
|
);
|
|
@@ -649,13 +657,13 @@ async function Ft(t, e) {
|
|
|
649
657
|
return m.error("Error resolving public entity:", r), null;
|
|
650
658
|
}
|
|
651
659
|
}
|
|
652
|
-
async function
|
|
660
|
+
async function Mt(t) {
|
|
653
661
|
try {
|
|
654
662
|
const e = await A(
|
|
655
663
|
`${c()}/series/${t}/page`
|
|
656
664
|
);
|
|
657
665
|
if (!e)
|
|
658
|
-
throw new
|
|
666
|
+
throw new N(
|
|
659
667
|
"Failed to fetch series page",
|
|
660
668
|
"lib/api/events/fetchSeriesPage"
|
|
661
669
|
);
|
|
@@ -664,11 +672,11 @@ async function Vt(t) {
|
|
|
664
672
|
return m.error("Error fetching series page:", e), null;
|
|
665
673
|
}
|
|
666
674
|
}
|
|
667
|
-
async function
|
|
675
|
+
async function Gt(t, e) {
|
|
668
676
|
try {
|
|
669
677
|
const r = e ? `${c()}/collections/${t}?password=${encodeURIComponent(e)}` : `${c()}/collections/${t}`, n = await A(r);
|
|
670
678
|
if (!n)
|
|
671
|
-
throw new
|
|
679
|
+
throw new N(
|
|
672
680
|
"Failed to fetch collection",
|
|
673
681
|
"lib/api/events/fetchPublicCollection"
|
|
674
682
|
);
|
|
@@ -677,7 +685,7 @@ async function Lt(t, e) {
|
|
|
677
685
|
return m.error("Error fetching collection:", r), null;
|
|
678
686
|
}
|
|
679
687
|
}
|
|
680
|
-
async function
|
|
688
|
+
async function jt(t, e) {
|
|
681
689
|
try {
|
|
682
690
|
const r = encodeURIComponent(e);
|
|
683
691
|
return (await A(
|
|
@@ -687,7 +695,7 @@ async function qt(t, e) {
|
|
|
687
695
|
return m.error("Error checking collection password:", r), !1;
|
|
688
696
|
}
|
|
689
697
|
}
|
|
690
|
-
async function
|
|
698
|
+
async function zt(t, e) {
|
|
691
699
|
try {
|
|
692
700
|
const r = await f(
|
|
693
701
|
`${c()}/events/${t}/check-password`,
|
|
@@ -700,7 +708,7 @@ async function Mt(t, e) {
|
|
|
700
708
|
return m.error("Error checking event password:", r), { valid: !1 };
|
|
701
709
|
}
|
|
702
710
|
}
|
|
703
|
-
async function
|
|
711
|
+
async function Bt(t, e) {
|
|
704
712
|
try {
|
|
705
713
|
const r = e ? `${c()}/events/venue/${e}` : t ? `${c()}/venues/organization/${t}` : `${c()}/health`;
|
|
706
714
|
return (await fetch(r, {
|
|
@@ -710,36 +718,36 @@ async function Gt(t, e) {
|
|
|
710
718
|
return m.error("Network connection test failed:", r), !1;
|
|
711
719
|
}
|
|
712
720
|
}
|
|
713
|
-
const
|
|
714
|
-
async function
|
|
721
|
+
const E = $("VC");
|
|
722
|
+
async function He(t) {
|
|
715
723
|
try {
|
|
716
724
|
if (!t)
|
|
717
|
-
return
|
|
718
|
-
const e = await
|
|
719
|
-
return e.success ? e.data ?? null : (
|
|
725
|
+
return E.warn("getVenue called without venueId"), null;
|
|
726
|
+
const e = await C(`/venues/${t}`);
|
|
727
|
+
return e.success ? e.data ?? null : (E.error(`Failed to fetch venue: ${e.statusCode}`), null);
|
|
720
728
|
} catch (e) {
|
|
721
|
-
return
|
|
729
|
+
return E.error("Error fetching venue:", e), null;
|
|
722
730
|
}
|
|
723
731
|
}
|
|
724
|
-
async function
|
|
725
|
-
const e = await
|
|
732
|
+
async function Ht(t) {
|
|
733
|
+
const e = await He(t);
|
|
726
734
|
return e ? {
|
|
727
735
|
serviceFeePercentage: e.serviceFeePercentage ?? 0,
|
|
728
736
|
serviceFeeCents: e.serviceFeeCents ?? 0,
|
|
729
737
|
taxPercentage: e.taxPercentage ?? 0
|
|
730
738
|
} : null;
|
|
731
739
|
}
|
|
732
|
-
async function
|
|
740
|
+
async function Wt(t) {
|
|
733
741
|
try {
|
|
734
742
|
if (!t)
|
|
735
|
-
return
|
|
736
|
-
const e = encodeURIComponent(t), r = await
|
|
737
|
-
return r.success ? r.data ?? null : (
|
|
743
|
+
return E.warn("getVenueBySlug called without slug"), null;
|
|
744
|
+
const e = encodeURIComponent(t), r = await C(`/venues/slug/${e}`);
|
|
745
|
+
return r.success ? r.data ?? null : (E.error(`Failed to fetch venue by slug: ${r.statusCode}`), null);
|
|
738
746
|
} catch (e) {
|
|
739
|
-
return
|
|
747
|
+
return E.error("Error fetching venue by slug:", e), null;
|
|
740
748
|
}
|
|
741
749
|
}
|
|
742
|
-
function
|
|
750
|
+
function We(t) {
|
|
743
751
|
const e = t ?? {}, r = (e.appliedAmount ?? 0) / 100, n = e.remainingTotal ?? 0, a = e.fullyCoveredByCard ?? n <= 0, s = !a;
|
|
744
752
|
return {
|
|
745
753
|
valid: !0,
|
|
@@ -752,15 +760,15 @@ function Be(t) {
|
|
|
752
760
|
requiresStripe: s
|
|
753
761
|
};
|
|
754
762
|
}
|
|
755
|
-
const h =
|
|
756
|
-
async function
|
|
763
|
+
const h = $("VC"), Qe = "https://get-micdrop.com", Je = `${Qe}/api/orders/v2`, j = () => R();
|
|
764
|
+
async function Qt(t) {
|
|
757
765
|
try {
|
|
758
766
|
const e = await f(
|
|
759
|
-
`${
|
|
767
|
+
`${Je}/gift-cards`,
|
|
760
768
|
t
|
|
761
769
|
);
|
|
762
770
|
if (!e.success)
|
|
763
|
-
throw h.error("Gift card purchase creation failed:", e.error), new
|
|
771
|
+
throw h.error("Gift card purchase creation failed:", e.error), new N(
|
|
764
772
|
e.error || "Failed to create gift card purchase",
|
|
765
773
|
"lib/api/gift-cards/createGiftCardPurchase"
|
|
766
774
|
);
|
|
@@ -769,13 +777,13 @@ async function Bt(t) {
|
|
|
769
777
|
return h.error("Gift card purchase creation error:", e), null;
|
|
770
778
|
}
|
|
771
779
|
}
|
|
772
|
-
async function
|
|
780
|
+
async function Jt(t, e) {
|
|
773
781
|
try {
|
|
774
782
|
const r = await f(
|
|
775
783
|
`${j()}/cart/${t}/apply-gift-card`,
|
|
776
784
|
{ giftCardCode: e }
|
|
777
785
|
);
|
|
778
|
-
return r.success ?
|
|
786
|
+
return r.success ? We(r.data) : r.statusCode === 429 ? {
|
|
779
787
|
valid: !1,
|
|
780
788
|
error: "Too many attempts. Please wait a moment and try again."
|
|
781
789
|
} : (h.error("Apply gift card failed:", r.error), {
|
|
@@ -789,9 +797,9 @@ async function Ht(t, e) {
|
|
|
789
797
|
};
|
|
790
798
|
}
|
|
791
799
|
}
|
|
792
|
-
async function
|
|
800
|
+
async function Yt(t, e) {
|
|
793
801
|
try {
|
|
794
|
-
const r = await
|
|
802
|
+
const r = await ve(
|
|
795
803
|
`${j()}/cart/${t}/gift-card`,
|
|
796
804
|
e ? { body: JSON.stringify({ giftCardCode: e }) } : void 0
|
|
797
805
|
);
|
|
@@ -806,7 +814,7 @@ async function Wt(t, e) {
|
|
|
806
814
|
};
|
|
807
815
|
}
|
|
808
816
|
}
|
|
809
|
-
async function
|
|
817
|
+
async function Kt(t, e) {
|
|
810
818
|
try {
|
|
811
819
|
const r = await f(`${j()}/cart/${t}/complete-gift-card-payment`, {
|
|
812
820
|
firstName: e.firstName,
|
|
@@ -833,14 +841,14 @@ async function Qt(t, e) {
|
|
|
833
841
|
};
|
|
834
842
|
}
|
|
835
843
|
}
|
|
836
|
-
const M =
|
|
844
|
+
const M = $("VC"), Ye = {
|
|
837
845
|
waitlist_not_enabled: "Waitlist is not available for this event",
|
|
838
846
|
event_not_found: "Event not found",
|
|
839
847
|
invalid_phone: "Please enter a valid phone number",
|
|
840
848
|
already_purchased: "You have already purchased tickets for this event",
|
|
841
849
|
phone_already_registered: "This phone number is already on the waitlist"
|
|
842
850
|
};
|
|
843
|
-
async function
|
|
851
|
+
async function Zt(t, e, r = null, n = !1) {
|
|
844
852
|
try {
|
|
845
853
|
const a = { email: e };
|
|
846
854
|
r && n && (a.phone = r, a.smsOptIn = !0);
|
|
@@ -853,7 +861,7 @@ async function Jt(t, e, r = null, n = !1) {
|
|
|
853
861
|
updated: s.data?.updated
|
|
854
862
|
} : (M.error("Join waitlist failed:", s.error), {
|
|
855
863
|
success: !1,
|
|
856
|
-
error:
|
|
864
|
+
error: Ye[s.error ?? ""] || "Failed to join waitlist. Please try again."
|
|
857
865
|
});
|
|
858
866
|
} catch (a) {
|
|
859
867
|
return M.error("joinWaitlist error:", a), {
|
|
@@ -862,14 +870,14 @@ async function Jt(t, e, r = null, n = !1) {
|
|
|
862
870
|
};
|
|
863
871
|
}
|
|
864
872
|
}
|
|
865
|
-
async function
|
|
873
|
+
async function Xt(t) {
|
|
866
874
|
const e = {
|
|
867
875
|
waitlistEnabled: !1,
|
|
868
876
|
soldOut: !1,
|
|
869
877
|
gated: !1
|
|
870
878
|
};
|
|
871
879
|
try {
|
|
872
|
-
const r = await
|
|
880
|
+
const r = await C(
|
|
873
881
|
`/events/${t}/waitlist/status`
|
|
874
882
|
);
|
|
875
883
|
return r.success ? {
|
|
@@ -881,7 +889,7 @@ async function Yt(t) {
|
|
|
881
889
|
return M.error("getWaitlistStatus error:", r), e;
|
|
882
890
|
}
|
|
883
891
|
}
|
|
884
|
-
function
|
|
892
|
+
function er(t, e, r = {}) {
|
|
885
893
|
const {
|
|
886
894
|
cancelled: n = !1,
|
|
887
895
|
isRegistration: a = !1,
|
|
@@ -892,10 +900,10 @@ function Kt(t, e, r = {}) {
|
|
|
892
900
|
const i = t.endDateTime || t.startDateTime;
|
|
893
901
|
if (i && new Date(i) < o)
|
|
894
902
|
return { text: "Sales ended", disabled: !0, reason: "event_past" };
|
|
895
|
-
const u = t?.hasPurchasableHiddenTickets === !0 || Array.isArray(e) && e.some(
|
|
903
|
+
const u = t?.hasPurchasableHiddenTickets === !0 || Array.isArray(e) && e.some(pe), T = (e || []).filter(
|
|
896
904
|
(l) => l.salesChannel !== 2 && !l.isHidden && !(typeof l.visibility == "number" && l.visibility >= 2)
|
|
897
905
|
);
|
|
898
|
-
if (
|
|
906
|
+
if (T.length === 0)
|
|
899
907
|
return u ? {
|
|
900
908
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
901
909
|
disabled: !1,
|
|
@@ -906,10 +914,10 @@ function Kt(t, e, r = {}) {
|
|
|
906
914
|
reason: "no_tickets"
|
|
907
915
|
};
|
|
908
916
|
let y = !1, k = !0, g = !0, v = null;
|
|
909
|
-
for (const l of
|
|
910
|
-
const
|
|
911
|
-
if (!_ && !
|
|
912
|
-
const B = new Date(
|
|
917
|
+
for (const l of T) {
|
|
918
|
+
const P = l.salesBegin || l.salesStart || l.saleBegin || l.onSaleStart, x = l.salesEnd || l.saleEnd || l.onSaleEnd, S = l.remainingCapacity ?? l.quantityRemaining ?? l.quantity, _ = l.soldOut || S != null && S <= 0, I = P ? new Date(P) > o : !1, z = x ? new Date(x) < o : !1;
|
|
919
|
+
if (!_ && !I && !z && (y = !0), _ || (k = !1), I || (g = !1), I && P && !_ && !z) {
|
|
920
|
+
const B = new Date(P);
|
|
913
921
|
(!v || B < v) && (v = B);
|
|
914
922
|
}
|
|
915
923
|
}
|
|
@@ -926,13 +934,13 @@ function Kt(t, e, r = {}) {
|
|
|
926
934
|
disabled: !1,
|
|
927
935
|
reason: "hidden_only"
|
|
928
936
|
};
|
|
929
|
-
const l = v.getTime() - o.getTime(),
|
|
930
|
-
|
|
937
|
+
const l = v.getTime() - o.getTime(), P = l / (1e3 * 60 * 60), x = l / (1e3 * 60 * 60 * 24), S = (I) => L(
|
|
938
|
+
I,
|
|
931
939
|
{ hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
932
940
|
"en-US"
|
|
933
941
|
);
|
|
934
942
|
let _;
|
|
935
|
-
return
|
|
943
|
+
return P < 24 ? _ = S(v) : x <= 7 ? _ = L(
|
|
936
944
|
v,
|
|
937
945
|
{ weekday: "short", hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
938
946
|
"en-US"
|
|
@@ -940,7 +948,7 @@ function Kt(t, e, r = {}) {
|
|
|
940
948
|
v,
|
|
941
949
|
{ month: "short", day: "numeric" },
|
|
942
950
|
"en-US"
|
|
943
|
-
)} ${
|
|
951
|
+
)} ${S(v)}`, {
|
|
944
952
|
text: `On sale ${_}`,
|
|
945
953
|
disabled: !0,
|
|
946
954
|
reason: "coming_soon"
|
|
@@ -960,7 +968,7 @@ function Kt(t, e, r = {}) {
|
|
|
960
968
|
reason: "hidden_only"
|
|
961
969
|
} : { text: "Sales ended", disabled: !0, reason: "sales_ended" };
|
|
962
970
|
}
|
|
963
|
-
function
|
|
971
|
+
function se(t) {
|
|
964
972
|
const e = t;
|
|
965
973
|
return {
|
|
966
974
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
@@ -978,7 +986,7 @@ function ne(t) {
|
|
|
978
986
|
checkedInAt: e.checkedInAt || e.checked_in_at
|
|
979
987
|
};
|
|
980
988
|
}
|
|
981
|
-
function
|
|
989
|
+
function oe(t) {
|
|
982
990
|
const e = t, r = e.purchasedTickets || e.tickets || e.purchased_tickets || [];
|
|
983
991
|
return {
|
|
984
992
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
@@ -994,21 +1002,21 @@ function ae(t) {
|
|
|
994
1002
|
discount: e.discount || 0,
|
|
995
1003
|
paymentIntentId: e.paymentIntentId || e.payment_intent_id,
|
|
996
1004
|
paymentMethod: e.paymentMethod || e.payment_method,
|
|
997
|
-
purchasedTickets: r.map(
|
|
1005
|
+
purchasedTickets: r.map(se),
|
|
998
1006
|
createdAt: e.createdAt || e.created_at,
|
|
999
1007
|
updatedAt: e.updatedAt || e.updated_at
|
|
1000
1008
|
};
|
|
1001
1009
|
}
|
|
1002
|
-
const
|
|
1003
|
-
function
|
|
1004
|
-
const e =
|
|
1010
|
+
const tr = se, rr = oe;
|
|
1011
|
+
function nr(t) {
|
|
1012
|
+
const e = oe(t), r = e.uuid.split("-")[0] || e.uuid;
|
|
1005
1013
|
return {
|
|
1006
1014
|
orderId: e.uuid,
|
|
1007
1015
|
displayOrderId: r,
|
|
1008
1016
|
email: e.customerEmail,
|
|
1009
1017
|
customerName: [e.customerFirstName, e.customerLastName].filter(Boolean).join(" "),
|
|
1010
1018
|
total: e.totalAmount,
|
|
1011
|
-
formattedTotal: `${
|
|
1019
|
+
formattedTotal: `${me(
|
|
1012
1020
|
e.totalAmount / 100
|
|
1013
1021
|
/* FIXME(canonical-cleanup:toFixed): this cast bypasses the brand boundary; replace with toCents/toUSD at the API-response-transform layer. */
|
|
1014
1022
|
)}`,
|
|
@@ -1016,14 +1024,14 @@ function er(t) {
|
|
|
1016
1024
|
status: e.status
|
|
1017
1025
|
};
|
|
1018
1026
|
}
|
|
1019
|
-
function
|
|
1020
|
-
return
|
|
1027
|
+
function Ke(t) {
|
|
1028
|
+
return K(t, { cdn: !0 });
|
|
1021
1029
|
}
|
|
1022
|
-
function
|
|
1030
|
+
function J(t) {
|
|
1023
1031
|
const e = t.imageUrl || t.imageURL || t.image_url || t.image || "";
|
|
1024
|
-
return
|
|
1032
|
+
return Ke(e);
|
|
1025
1033
|
}
|
|
1026
|
-
function
|
|
1034
|
+
function Ze(t) {
|
|
1027
1035
|
switch (t) {
|
|
1028
1036
|
case "available":
|
|
1029
1037
|
case "sold_out":
|
|
@@ -1034,10 +1042,10 @@ function Ye(t) {
|
|
|
1034
1042
|
return null;
|
|
1035
1043
|
}
|
|
1036
1044
|
}
|
|
1037
|
-
function
|
|
1045
|
+
function Xe(t) {
|
|
1038
1046
|
const e = t.ctaState || t.cta_state;
|
|
1039
1047
|
if (e) {
|
|
1040
|
-
const o =
|
|
1048
|
+
const o = Ze(e);
|
|
1041
1049
|
if (o)
|
|
1042
1050
|
return o;
|
|
1043
1051
|
}
|
|
@@ -1054,11 +1062,11 @@ function Ke(t) {
|
|
|
1054
1062
|
return n <= 0 ? "sold_out" : "available";
|
|
1055
1063
|
const a = t.availableTickets || t.available_tickets || t.tickets || [];
|
|
1056
1064
|
return a.length === 0 ? "coming_soon" : a.reduce((o, i) => {
|
|
1057
|
-
const u = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0,
|
|
1058
|
-
return o + Math.max(0, u -
|
|
1065
|
+
const u = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0, T = i.quantitySold ?? i.quantity_sold ?? 0;
|
|
1066
|
+
return o + Math.max(0, u - T);
|
|
1059
1067
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
1060
1068
|
}
|
|
1061
|
-
function
|
|
1069
|
+
function ie(t) {
|
|
1062
1070
|
const e = t;
|
|
1063
1071
|
return {
|
|
1064
1072
|
id: e.id || e.ID,
|
|
@@ -1079,8 +1087,8 @@ function se(t) {
|
|
|
1079
1087
|
sortOrder: e.sortOrder || e.sort_order || 0
|
|
1080
1088
|
};
|
|
1081
1089
|
}
|
|
1082
|
-
function
|
|
1083
|
-
const e = t, n = (e.availableTickets || e.available_tickets || e.tickets || []).map(
|
|
1090
|
+
function ce(t) {
|
|
1091
|
+
const e = t, n = (e.availableTickets || e.available_tickets || e.tickets || []).map(ie), a = n.map((i) => i.price).filter((i) => i > 0), s = a.length > 0 ? Math.min(...a) : void 0, o = a.length > 0 ? Math.max(...a) : void 0;
|
|
1084
1092
|
return {
|
|
1085
1093
|
eventID: e.eventID || e.id || e.ID || 0,
|
|
1086
1094
|
id: e.id || e.ID,
|
|
@@ -1097,8 +1105,8 @@ function oe(t) {
|
|
|
1097
1105
|
venueName: e.venueName || e.venue_name,
|
|
1098
1106
|
venueAddress: e.venueAddress || e.venue_address,
|
|
1099
1107
|
location: e.location || e.venueAddress || e.venue_address,
|
|
1100
|
-
imageUrl:
|
|
1101
|
-
imageURL:
|
|
1108
|
+
imageUrl: J(e),
|
|
1109
|
+
imageURL: J(e),
|
|
1102
1110
|
status: e.status,
|
|
1103
1111
|
isPublished: e.isPublished ?? e.is_published,
|
|
1104
1112
|
isCancelled: e.isCancelled ?? e.is_cancelled,
|
|
@@ -1108,7 +1116,7 @@ function oe(t) {
|
|
|
1108
1116
|
minPrice: e.minPrice ?? e.min_price ?? s,
|
|
1109
1117
|
maxPrice: e.maxPrice ?? e.max_price ?? o,
|
|
1110
1118
|
ctaText: e.ctaText || e.cta_text,
|
|
1111
|
-
ctaState:
|
|
1119
|
+
ctaState: Xe(e),
|
|
1112
1120
|
showPerformers: e.showPerformers ?? e.show_performers,
|
|
1113
1121
|
eventSeriesId: e.eventSeriesId || e.event_series_id,
|
|
1114
1122
|
seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number,
|
|
@@ -1142,11 +1150,11 @@ function oe(t) {
|
|
|
1142
1150
|
purchasedTickets: e.purchasedTickets
|
|
1143
1151
|
};
|
|
1144
1152
|
}
|
|
1145
|
-
const
|
|
1146
|
-
function
|
|
1147
|
-
return
|
|
1153
|
+
const ar = ie, sr = ce, or = ce;
|
|
1154
|
+
function et(t) {
|
|
1155
|
+
return K(t, { cdn: !0 });
|
|
1148
1156
|
}
|
|
1149
|
-
function
|
|
1157
|
+
function tt(t) {
|
|
1150
1158
|
const e = t, r = e.logoUrl || e.logo_url || e.logo;
|
|
1151
1159
|
return {
|
|
1152
1160
|
id: e.id || e.ID || 0,
|
|
@@ -1159,15 +1167,15 @@ function Xe(t) {
|
|
|
1159
1167
|
zipCode: e.zipCode || e.zip_code,
|
|
1160
1168
|
country: e.country,
|
|
1161
1169
|
timezone: e.timezone || e.time_zone,
|
|
1162
|
-
logoUrl:
|
|
1170
|
+
logoUrl: et(r),
|
|
1163
1171
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
1164
1172
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
1165
1173
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
|
|
1166
1174
|
organizationId: e.organizationId || e.organization_id
|
|
1167
1175
|
};
|
|
1168
1176
|
}
|
|
1169
|
-
const
|
|
1170
|
-
function
|
|
1177
|
+
const ir = tt;
|
|
1178
|
+
function cr(t) {
|
|
1171
1179
|
const e = t;
|
|
1172
1180
|
return {
|
|
1173
1181
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
@@ -1175,86 +1183,89 @@ function sr(t) {
|
|
|
1175
1183
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
|
|
1176
1184
|
};
|
|
1177
1185
|
}
|
|
1178
|
-
function
|
|
1186
|
+
function ur(t) {
|
|
1179
1187
|
return [t.address, t.city, t.state, t.zipCode].filter(
|
|
1180
1188
|
Boolean
|
|
1181
1189
|
).join(", ");
|
|
1182
1190
|
}
|
|
1183
1191
|
export {
|
|
1184
|
-
|
|
1185
|
-
|
|
1192
|
+
ve as apiDelete,
|
|
1193
|
+
C as apiGet,
|
|
1186
1194
|
f as apiPost,
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
Fe as
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1195
|
+
ft as apiPut,
|
|
1196
|
+
Jt as applyGiftCard,
|
|
1197
|
+
St as applyPromoCode,
|
|
1198
|
+
Xe as calculateCtaState,
|
|
1199
|
+
vt as cancelReservation,
|
|
1200
|
+
jt as checkCollectionPassword,
|
|
1201
|
+
zt as checkEventPassword,
|
|
1202
|
+
Kt as completeGiftCardPayment,
|
|
1203
|
+
gt as completeReservation,
|
|
1204
|
+
er as computeCtaState,
|
|
1205
|
+
ct as configureApi,
|
|
1206
|
+
Qt as createGiftCardPurchase,
|
|
1207
|
+
ht as createOrder,
|
|
1208
|
+
mt as createPaymentIntent,
|
|
1209
|
+
b as err,
|
|
1210
|
+
Q as errNotFound,
|
|
1211
|
+
kt as extendCheckoutSession,
|
|
1212
|
+
cr as extractVenueFees,
|
|
1213
|
+
Ut as fetchAllVenues,
|
|
1214
|
+
qe as fetchAllVenuesResult,
|
|
1215
|
+
At as fetchEventDetails,
|
|
1216
|
+
Fe as fetchEventDetailsResult,
|
|
1217
|
+
Nt as fetchEventPerformers,
|
|
1218
|
+
Le as fetchEventPerformersResult,
|
|
1219
|
+
Dt as fetchEventTickets,
|
|
1220
|
+
Ve as fetchEventTicketsResult,
|
|
1221
|
+
Gt as fetchPublicCollection,
|
|
1222
|
+
Lt as fetchSeriesOccurrences,
|
|
1223
|
+
Be as fetchSeriesOccurrencesResult,
|
|
1224
|
+
Mt as fetchSeriesPage,
|
|
1225
|
+
xt as fetchVenueEvents,
|
|
1226
|
+
Me as fetchVenueEventsResult,
|
|
1227
|
+
ur as formatVenueAddress,
|
|
1228
|
+
ut as getApiConfig,
|
|
1229
|
+
Ke as getCDNImageUrl,
|
|
1230
|
+
pt as getCartByUUID,
|
|
1231
|
+
dt as getClientIP,
|
|
1232
|
+
J as getEventImageUrl,
|
|
1233
|
+
lt as getLegacyPublicUrl,
|
|
1234
|
+
Ot as getMonthEvents,
|
|
1235
|
+
Ge as getMonthEventsResult,
|
|
1236
|
+
_t as getOrder,
|
|
1227
1237
|
R as getOrdersV2Url,
|
|
1228
|
-
|
|
1229
|
-
|
|
1238
|
+
Ft as getOrgMonthEvents,
|
|
1239
|
+
je as getOrgMonthEventsResult,
|
|
1230
1240
|
c as getPublicBaseUrl,
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1241
|
+
Vt as getSeriesOccurrences,
|
|
1242
|
+
ze as getSeriesOccurrencesResult,
|
|
1243
|
+
bt as getSessionStatus,
|
|
1244
|
+
He as getVenue,
|
|
1245
|
+
Wt as getVenueBySlug,
|
|
1246
|
+
Ht as getVenueFees,
|
|
1247
|
+
Xt as getWaitlistStatus,
|
|
1248
|
+
Pt as hasPromoCodes,
|
|
1249
|
+
$t as initiateOrder,
|
|
1250
|
+
Rt as isErr,
|
|
1251
|
+
Et as isOk,
|
|
1252
|
+
Zt as joinWaitlist,
|
|
1253
|
+
ne as ok,
|
|
1254
|
+
Yt as removeGiftCard,
|
|
1255
|
+
It as removePromoCode,
|
|
1256
|
+
qt as resolvePublicEntity,
|
|
1257
|
+
Bt as testNetworkConnection,
|
|
1258
|
+
Ct as trackUTMSource,
|
|
1259
|
+
ar as transformAvailableTicket,
|
|
1260
|
+
sr as transformEvent,
|
|
1261
|
+
or as transformEventData,
|
|
1262
|
+
rr as transformOrder,
|
|
1263
|
+
nr as transformOrderForDisplay,
|
|
1264
|
+
tr as transformTicket,
|
|
1265
|
+
ir as transformVenue,
|
|
1255
1266
|
D as unwrapOr,
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1267
|
+
yt as updateCartQuantities,
|
|
1268
|
+
wt as validatePaymentIntent,
|
|
1269
|
+
Tt as validatePromoCode
|
|
1259
1270
|
};
|
|
1260
1271
|
//# sourceMappingURL=api.mjs.map
|