@getmicdrop/venue-calendar 4.0.107 → 4.0.109
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-C3N5pw89.js +2381 -0
- package/dist/CartView-C3N5pw89.js.map +1 -0
- package/dist/{Checkout-Db6v9jHf.js → Checkout-CMEf_qnp.js} +604 -620
- package/dist/Checkout-CMEf_qnp.js.map +1 -0
- package/dist/{Checkout-JvsT5PvE.js → Checkout-Chki2df_.js} +130 -130
- package/dist/Checkout-Chki2df_.js.map +1 -0
- package/dist/{CheckoutTimer-3Hp1OSA3.js → CheckoutTimer-BAaY_60w.js} +5 -5
- package/dist/{CheckoutTimer-3Hp1OSA3.js.map → CheckoutTimer-BAaY_60w.js.map} +1 -1
- package/dist/{ClockIcon-CaqjP14C.js → ClockIcon-Dbbj_qur.js} +2 -2
- package/dist/{ClockIcon-CaqjP14C.js.map → ClockIcon-Dbbj_qur.js.map} +1 -1
- package/dist/{CollectionView-DXJfvNlt.js → CollectionView-RM30YPOJ.js} +41 -41
- package/dist/CollectionView-RM30YPOJ.js.map +1 -0
- package/dist/{Event-BJRx05iL.js → Event-kdxMa6OT.js} +1683 -1603
- package/dist/{Event-BJRx05iL.js.map → Event-kdxMa6OT.js.map} +1 -1
- package/dist/EventPage-BRBByBHe.js +1001 -0
- package/dist/EventPage-BRBByBHe.js.map +1 -0
- package/dist/{Heading-BbCHtFCM.js → Heading-CSDFD80h.js} +5 -5
- package/dist/{Heading-BbCHtFCM.js.map → Heading-CSDFD80h.js.map} +1 -1
- package/dist/{ScarcityBadge-iHyVN-k7.js → ScarcityBadge-B0ca48su.js} +12 -12
- package/dist/{ScarcityBadge-iHyVN-k7.js.map → ScarcityBadge-B0ca48su.js.map} +1 -1
- package/dist/{SeriesPage-b9aAGbcb.js → SeriesPage-CczfbUKO.js} +5 -5
- package/dist/{SeriesPage-b9aAGbcb.js.map → SeriesPage-CczfbUKO.js.map} +1 -1
- package/dist/{Spinner-DC99jWmt.js → Spinner--TOwvv9A.js} +2 -2
- package/dist/{Spinner-DC99jWmt.js.map → Spinner--TOwvv9A.js.map} +1 -1
- package/dist/{Success-H4fQrbfA.js → Success-DIWUGUPs.js} +136 -153
- package/dist/Success-DIWUGUPs.js.map +1 -0
- package/dist/{Text-CKmfSVMa.js → Text-WLl_ELy9.js} +7 -7
- package/dist/{Text-CKmfSVMa.js.map → Text-WLl_ELy9.js.map} +1 -1
- package/dist/{VenueCalendar-DmxiEy6q.js → VenueCalendar-CU5N9klc.js} +3366 -3319
- package/dist/VenueCalendar-CU5N9klc.js.map +1 -0
- package/dist/{ViewTicketsEmbed-BKrQgPf8.js → ViewTicketsEmbed-BOukxQIF.js} +6 -6
- package/dist/ViewTicketsEmbed-BOukxQIF.js.map +1 -0
- package/dist/api/api/events.d.ts +28 -12
- package/dist/api/api/index.d.ts +1 -1
- package/dist/api/api/route-manifest.d.ts +179 -0
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +316 -316
- package/dist/api/api.mjs.map +1 -1
- package/dist/{labels-DgU1irgj.js → labels-DXGieQXs.js} +86 -89
- package/dist/labels-DXGieQXs.js.map +1 -0
- package/dist/{modalManager.svelte-Ddxmimtn.js → modalManager.svelte-Dbd1xgTQ.js} +2 -2
- package/dist/{modalManager.svelte-Ddxmimtn.js.map → modalManager.svelte-Dbd1xgTQ.js.map} +1 -1
- package/dist/promo-oWi_MKmY.js +29 -0
- package/dist/promo-oWi_MKmY.js.map +1 -0
- package/dist/seo/helpers.d.ts +11 -0
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.cjs.map +1 -1
- package/dist/seo/seo.mjs +170 -179
- package/dist/seo/seo.mjs.map +1 -1
- package/dist/{data-toggle-store.svelte-BEm-nTSr.js → showcase-state-options-DJJdjxvZ.js} +72 -45
- package/dist/showcase-state-options-DJJdjxvZ.js.map +1 -0
- package/dist/{transform-BOx8W51w.js → transform-Bgqwj9i-.js} +42 -42
- package/dist/transform-Bgqwj9i-.js.map +1 -0
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +4 -4
- package/dist/venue-calendar.iife.js +50 -50
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +44 -44
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +199 -187
- package/dist/CartView-DC_stfl4.js +0 -2348
- package/dist/CartView-DC_stfl4.js.map +0 -1
- package/dist/Checkout-Db6v9jHf.js.map +0 -1
- package/dist/Checkout-JvsT5PvE.js.map +0 -1
- package/dist/CollectionView-DXJfvNlt.js.map +0 -1
- package/dist/EventPage-E0tOQVFN.js +0 -940
- package/dist/EventPage-E0tOQVFN.js.map +0 -1
- package/dist/Success-H4fQrbfA.js.map +0 -1
- package/dist/VenueCalendar-DmxiEy6q.js.map +0 -1
- package/dist/ViewTicketsEmbed-BKrQgPf8.js.map +0 -1
- package/dist/data-toggle-store.svelte-BEm-nTSr.js.map +0 -1
- package/dist/labels-DgU1irgj.js.map +0 -1
- package/dist/promo-WWbp2OWI.js +0 -12
- package/dist/promo-WWbp2OWI.js.map +0 -1
- package/dist/transform-BOx8W51w.js.map +0 -1
package/dist/api/api.mjs
CHANGED
|
@@ -1,43 +1,52 @@
|
|
|
1
1
|
import { createLogger as C } from "@getmicdrop/svelte-components/utils/logger";
|
|
2
|
-
import { ApiError as
|
|
3
|
-
import { getLocalStorage as de, setLocalStorage as fe, getSessionStorage as
|
|
4
|
-
import { formatLocal as
|
|
5
|
-
import { isHiddenTicketPurchasable as
|
|
2
|
+
import { ApiError as J, NotFoundError as Q } from "@getmicdrop/svelte-components/errors";
|
|
3
|
+
import { getLocalStorage as de, setLocalStorage as fe, getSessionStorage as Y, setSessionStorage as me, createLogger as pe, formatFullName as ye, formatCurrency as ge, asUSD as ve, resolveImageUrl as X } from "@getmicdrop/svelte-components";
|
|
4
|
+
import { browserNow as he, formatLocal as q } from "@getmicdrop/svelte-components/datetime";
|
|
5
|
+
import { isHiddenTicketPurchasable as _e } from "@getmicdrop/svelte-components/transforms";
|
|
6
6
|
import "@getmicdrop/svelte-components/utils/timezones";
|
|
7
|
-
const
|
|
7
|
+
const we = {};
|
|
8
|
+
function ke() {
|
|
9
|
+
typeof import.meta < "u" && we?.VITE_WIDGET_KEY;
|
|
10
|
+
}
|
|
11
|
+
const L = C("VC");
|
|
12
|
+
function Z(t) {
|
|
13
|
+
const e = ke();
|
|
14
|
+
return e ? { ...t, "X-Widget-Key": e } : t;
|
|
15
|
+
}
|
|
16
|
+
const be = {
|
|
8
17
|
baseUrl: "https://get-micdrop.com",
|
|
9
18
|
timeout: 3e4,
|
|
10
19
|
retries: 2,
|
|
11
20
|
retryDelay: 500,
|
|
12
|
-
onError: (t) =>
|
|
21
|
+
onError: (t) => L.error("API Error:", t)
|
|
13
22
|
};
|
|
14
|
-
let p = { ...
|
|
15
|
-
function
|
|
23
|
+
let p = { ...be };
|
|
24
|
+
function yt(t) {
|
|
16
25
|
p = { ...p, ...t };
|
|
17
26
|
}
|
|
18
|
-
function
|
|
27
|
+
function gt() {
|
|
19
28
|
return { ...p };
|
|
20
29
|
}
|
|
21
30
|
function c() {
|
|
22
31
|
return `${p.baseUrl}/api/v2/public`;
|
|
23
32
|
}
|
|
24
|
-
function
|
|
33
|
+
function vt() {
|
|
25
34
|
return `${p.baseUrl}/api/public`;
|
|
26
35
|
}
|
|
27
|
-
function
|
|
36
|
+
function _() {
|
|
28
37
|
return `${p.baseUrl}/api/orders/v2/public`;
|
|
29
38
|
}
|
|
30
|
-
async function
|
|
39
|
+
async function ht() {
|
|
31
40
|
return "";
|
|
32
41
|
}
|
|
33
|
-
const
|
|
42
|
+
const $e = (t) => new Promise((e) => setTimeout(e, t));
|
|
34
43
|
async function ee(t, e, r) {
|
|
35
44
|
const n = (e.method || "GET").toUpperCase(), s = n === "GET" || n === "HEAD" ? r.retries + 1 : 1;
|
|
36
45
|
let o;
|
|
37
46
|
for (let i = 1; i <= s; i++) {
|
|
38
|
-
const u = new AbortController(),
|
|
39
|
-
let
|
|
40
|
-
y && (y.aborted ? u.abort() : (
|
|
47
|
+
const u = new AbortController(), S = setTimeout(() => u.abort(), r.timeout), y = e.signal;
|
|
48
|
+
let b;
|
|
49
|
+
y && (y.aborted ? u.abort() : (b = () => u.abort(), y.addEventListener("abort", b, { once: !0 })));
|
|
41
50
|
try {
|
|
42
51
|
const g = await fetch(t, { ...e, signal: u.signal });
|
|
43
52
|
if (g.status >= 500 && i < s)
|
|
@@ -47,9 +56,9 @@ async function ee(t, e, r) {
|
|
|
47
56
|
} catch (g) {
|
|
48
57
|
if (o = g, y?.aborted) throw g;
|
|
49
58
|
} finally {
|
|
50
|
-
clearTimeout(
|
|
59
|
+
clearTimeout(S), y && b && y.removeEventListener("abort", b);
|
|
51
60
|
}
|
|
52
|
-
i < s && await
|
|
61
|
+
i < s && await $e(r.retryDelay * Math.pow(2, i - 1));
|
|
53
62
|
}
|
|
54
63
|
throw o;
|
|
55
64
|
}
|
|
@@ -59,10 +68,10 @@ async function T(t, e) {
|
|
|
59
68
|
async function f(t, e, r) {
|
|
60
69
|
return F("POST", t, e, r);
|
|
61
70
|
}
|
|
62
|
-
async function
|
|
71
|
+
async function _t(t, e, r) {
|
|
63
72
|
return F("PUT", t, e, r);
|
|
64
73
|
}
|
|
65
|
-
async function
|
|
74
|
+
async function Ce(t, e) {
|
|
66
75
|
return F("DELETE", t, void 0, e);
|
|
67
76
|
}
|
|
68
77
|
async function F(t, e, r, n) {
|
|
@@ -72,10 +81,10 @@ async function F(t, e, r, n) {
|
|
|
72
81
|
a,
|
|
73
82
|
{
|
|
74
83
|
method: t,
|
|
75
|
-
headers: {
|
|
84
|
+
headers: Z({
|
|
76
85
|
"Content-Type": "application/json",
|
|
77
86
|
...n?.headers
|
|
78
|
-
},
|
|
87
|
+
}),
|
|
79
88
|
body: r !== void 0 ? JSON.stringify(r) : void 0,
|
|
80
89
|
credentials: "include",
|
|
81
90
|
...n
|
|
@@ -94,23 +103,27 @@ async function F(t, e, r, n) {
|
|
|
94
103
|
), { success: !1, error: o };
|
|
95
104
|
}
|
|
96
105
|
}
|
|
97
|
-
async function
|
|
106
|
+
async function R(t, e) {
|
|
98
107
|
try {
|
|
99
|
-
const r = await ee(
|
|
108
|
+
const r = t.startsWith(p.baseUrl), n = await ee(
|
|
100
109
|
t,
|
|
101
|
-
{
|
|
110
|
+
{
|
|
111
|
+
credentials: "include",
|
|
112
|
+
...e,
|
|
113
|
+
...r ? { headers: Z(e?.headers) } : {}
|
|
114
|
+
},
|
|
102
115
|
p
|
|
103
116
|
);
|
|
104
|
-
if (!
|
|
105
|
-
const
|
|
106
|
-
return
|
|
117
|
+
if (!n.ok) {
|
|
118
|
+
const a = await n.json().catch(() => ({}));
|
|
119
|
+
return L.error(`API request failed: ${n.status}`, a), null;
|
|
107
120
|
}
|
|
108
|
-
return
|
|
121
|
+
return n.json();
|
|
109
122
|
} catch (r) {
|
|
110
|
-
return
|
|
123
|
+
return L.error("API request error:", r), null;
|
|
111
124
|
}
|
|
112
125
|
}
|
|
113
|
-
function
|
|
126
|
+
function Te(t) {
|
|
114
127
|
const e = t ?? {};
|
|
115
128
|
return {
|
|
116
129
|
ticketID: Number(e.TicketID ?? e.ticketID ?? 0),
|
|
@@ -121,8 +134,8 @@ function $e(t) {
|
|
|
121
134
|
status: String(e.Status ?? e.status ?? "")
|
|
122
135
|
};
|
|
123
136
|
}
|
|
124
|
-
function
|
|
125
|
-
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(
|
|
137
|
+
function Se(t) {
|
|
138
|
+
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(Te);
|
|
126
139
|
return { uuid: r, eventID: n, status: a, expiresAt: s, reservations: i };
|
|
127
140
|
}
|
|
128
141
|
const te = [
|
|
@@ -131,7 +144,7 @@ const te = [
|
|
|
131
144
|
"utmCampaign",
|
|
132
145
|
"utmContent",
|
|
133
146
|
"utmTerm"
|
|
134
|
-
],
|
|
147
|
+
], Pe = {
|
|
135
148
|
utmSource: "utm_source",
|
|
136
149
|
utmMedium: "utm_medium",
|
|
137
150
|
utmCampaign: "utm_campaign",
|
|
@@ -141,19 +154,19 @@ const te = [
|
|
|
141
154
|
function ne(t) {
|
|
142
155
|
return t ? t.trim().toLowerCase().replace(/\s+/g, "_") : "";
|
|
143
156
|
}
|
|
144
|
-
function
|
|
157
|
+
function Ie(t) {
|
|
145
158
|
const e = {};
|
|
146
159
|
for (const r of te)
|
|
147
160
|
e[r] = ne(t[r]);
|
|
148
161
|
return e.utmSource || (e.utmSource = re), e;
|
|
149
162
|
}
|
|
150
|
-
function
|
|
163
|
+
function Ee(t) {
|
|
151
164
|
const e = {};
|
|
152
165
|
for (const r of te)
|
|
153
|
-
e[r] = t.get(
|
|
154
|
-
return
|
|
166
|
+
e[r] = t.get(Pe[r]);
|
|
167
|
+
return Ie(e);
|
|
155
168
|
}
|
|
156
|
-
function
|
|
169
|
+
function Ne() {
|
|
157
170
|
if (typeof window > "u") return !0;
|
|
158
171
|
try {
|
|
159
172
|
return window.self === window.top;
|
|
@@ -161,27 +174,27 @@ function Pe() {
|
|
|
161
174
|
return !1;
|
|
162
175
|
}
|
|
163
176
|
}
|
|
164
|
-
function
|
|
165
|
-
const t = typeof window < "u", e =
|
|
177
|
+
function Re() {
|
|
178
|
+
const t = typeof window < "u", e = Ne(), r = t ? window.location.search : "", n = (typeof document < "u" ? document.referrer : "") ?? "", a = t && e ? window.location.href : "";
|
|
166
179
|
return {
|
|
167
|
-
utm:
|
|
180
|
+
utm: Ee(new URLSearchParams(r)),
|
|
168
181
|
referrer: n || "",
|
|
169
182
|
pageUrl: a || ""
|
|
170
183
|
};
|
|
171
184
|
}
|
|
172
|
-
let
|
|
173
|
-
function
|
|
185
|
+
let Ae = !1;
|
|
186
|
+
function De() {
|
|
174
187
|
return typeof window < "u" && typeof window.__tcfapi == "function";
|
|
175
188
|
}
|
|
176
|
-
function
|
|
177
|
-
return
|
|
189
|
+
function Ue() {
|
|
190
|
+
return De();
|
|
178
191
|
}
|
|
179
|
-
function
|
|
180
|
-
return
|
|
192
|
+
function xe() {
|
|
193
|
+
return Ue() ? Ae : !0;
|
|
181
194
|
}
|
|
182
|
-
const
|
|
183
|
-
function
|
|
184
|
-
return typeof t == "string" &&
|
|
195
|
+
const W = "micdrop_session_id", z = "micdrop_visitor_id", Oe = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
196
|
+
function Fe(t) {
|
|
197
|
+
return typeof t == "string" && Oe.test(t);
|
|
185
198
|
}
|
|
186
199
|
function ae() {
|
|
187
200
|
const t = typeof crypto < "u" ? crypto : void 0;
|
|
@@ -196,27 +209,27 @@ function ae() {
|
|
|
196
209
|
for (let n = 0; n < 16; n++) r.push(e[n].toString(16).padStart(2, "0"));
|
|
197
210
|
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]}`;
|
|
198
211
|
}
|
|
199
|
-
function
|
|
200
|
-
let t =
|
|
201
|
-
return t || (t = ae(), me(
|
|
212
|
+
function Ve() {
|
|
213
|
+
let t = Y(W);
|
|
214
|
+
return t || (t = ae(), me(W, t)), t;
|
|
202
215
|
}
|
|
203
|
-
function
|
|
204
|
-
if (!
|
|
205
|
-
const t = de(
|
|
206
|
-
if (
|
|
216
|
+
function qe() {
|
|
217
|
+
if (!xe()) return null;
|
|
218
|
+
const t = de(z);
|
|
219
|
+
if (Fe(t)) return t;
|
|
207
220
|
const e = ae();
|
|
208
|
-
return fe(
|
|
221
|
+
return fe(z, e), e;
|
|
209
222
|
}
|
|
210
|
-
const
|
|
211
|
-
function
|
|
212
|
-
const t =
|
|
223
|
+
const Le = "micdrop_attribution";
|
|
224
|
+
function Me() {
|
|
225
|
+
const t = Y(Le);
|
|
213
226
|
return !t || !t.utm || typeof t.utm.utmSource != "string" ? null : t;
|
|
214
227
|
}
|
|
215
228
|
function D() {
|
|
216
|
-
const e =
|
|
229
|
+
const e = Me() ?? Re();
|
|
217
230
|
return {
|
|
218
|
-
sessionId:
|
|
219
|
-
visitorId:
|
|
231
|
+
sessionId: Ve(),
|
|
232
|
+
visitorId: qe(),
|
|
220
233
|
utmSource: e.utm.utmSource,
|
|
221
234
|
utmMedium: e.utm.utmMedium,
|
|
222
235
|
utmCampaign: e.utm.utmCampaign,
|
|
@@ -227,10 +240,10 @@ function D() {
|
|
|
227
240
|
}
|
|
228
241
|
pe("tracking");
|
|
229
242
|
const d = C("VC");
|
|
230
|
-
async function
|
|
243
|
+
async function wt(t, e, r) {
|
|
231
244
|
try {
|
|
232
245
|
const n = await f(
|
|
233
|
-
`${
|
|
246
|
+
`${_()}/cart/${t}/payment-intent`,
|
|
234
247
|
{
|
|
235
248
|
productQuantities: e,
|
|
236
249
|
...r && Object.keys(r).length > 0 ? { donationAmounts: r } : {},
|
|
@@ -241,11 +254,11 @@ async function vt(t, e, r) {
|
|
|
241
254
|
}
|
|
242
255
|
);
|
|
243
256
|
if (!n.success)
|
|
244
|
-
throw d.error("Payment intent creation failed:", n.error), new
|
|
257
|
+
throw d.error("Payment intent creation failed:", n.error), new J(
|
|
245
258
|
n.error || "Failed to create payment intent",
|
|
246
259
|
n.statusCode ?? 0,
|
|
247
260
|
{
|
|
248
|
-
endpoint: `${
|
|
261
|
+
endpoint: `${_()}/cart/${t}/payment-intent`,
|
|
249
262
|
method: "POST"
|
|
250
263
|
}
|
|
251
264
|
);
|
|
@@ -254,15 +267,15 @@ async function vt(t, e, r) {
|
|
|
254
267
|
return d.error("createPaymentIntent error:", n), null;
|
|
255
268
|
}
|
|
256
269
|
}
|
|
257
|
-
async function
|
|
270
|
+
async function kt(t, e) {
|
|
258
271
|
if (!t) return null;
|
|
259
272
|
try {
|
|
260
273
|
const r = await T(
|
|
261
|
-
`${
|
|
274
|
+
`${_()}/cart/${t}`
|
|
262
275
|
);
|
|
263
276
|
if (!r.success)
|
|
264
277
|
return null;
|
|
265
|
-
const { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i } =
|
|
278
|
+
const { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i } = Se(
|
|
266
279
|
r.data
|
|
267
280
|
);
|
|
268
281
|
return s !== "reserved" && s !== "active" || e !== void 0 && a !== Number(e) ? null : { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i };
|
|
@@ -270,7 +283,7 @@ async function ht(t, e) {
|
|
|
270
283
|
return d.error("getCartByUUID error:", r), null;
|
|
271
284
|
}
|
|
272
285
|
}
|
|
273
|
-
async function
|
|
286
|
+
async function bt(t, e, r) {
|
|
274
287
|
try {
|
|
275
288
|
const n = {};
|
|
276
289
|
for (const [o, i] of Object.entries(e)) {
|
|
@@ -283,7 +296,7 @@ async function _t(t, e, r) {
|
|
|
283
296
|
const u = typeof o == "number" ? o : parseInt(o, 10);
|
|
284
297
|
!Number.isNaN(u) && i > 0 && (a[u] = i);
|
|
285
298
|
}
|
|
286
|
-
const s = await fetch(`${
|
|
299
|
+
const s = await fetch(`${_()}/cart/${t}`, {
|
|
287
300
|
method: "PUT",
|
|
288
301
|
headers: { "Content-Type": "application/json" },
|
|
289
302
|
credentials: "include",
|
|
@@ -301,7 +314,7 @@ async function _t(t, e, r) {
|
|
|
301
314
|
return d.error("updateCartQuantities error:", n), !1;
|
|
302
315
|
}
|
|
303
316
|
}
|
|
304
|
-
async function
|
|
317
|
+
async function $t(t) {
|
|
305
318
|
try {
|
|
306
319
|
const e = await f(
|
|
307
320
|
`${c()}/orders/complete/${t}`
|
|
@@ -317,7 +330,7 @@ async function wt(t) {
|
|
|
317
330
|
return d.error("Error completing reservation:", e), { success: !1, error: "Network error completing reservation" };
|
|
318
331
|
}
|
|
319
332
|
}
|
|
320
|
-
async function
|
|
333
|
+
async function Ct(t) {
|
|
321
334
|
try {
|
|
322
335
|
const e = await f(
|
|
323
336
|
`${c()}/orders/cancel/${t}`
|
|
@@ -333,7 +346,7 @@ async function kt(t) {
|
|
|
333
346
|
return d.error("Error cancelling reservation:", e), { success: !1, error: "Network error cancelling reservation" };
|
|
334
347
|
}
|
|
335
348
|
}
|
|
336
|
-
async function
|
|
349
|
+
async function Tt(t, e) {
|
|
337
350
|
try {
|
|
338
351
|
const r = await f(
|
|
339
352
|
`${c()}/orders/create`,
|
|
@@ -345,12 +358,12 @@ async function $t(t, e) {
|
|
|
345
358
|
return d.error("createOrder error:", r), null;
|
|
346
359
|
}
|
|
347
360
|
}
|
|
348
|
-
async function
|
|
349
|
-
return
|
|
361
|
+
async function St(t) {
|
|
362
|
+
return R(`${c()}/orders/${t}`);
|
|
350
363
|
}
|
|
351
|
-
async function
|
|
364
|
+
async function Pt(t, e) {
|
|
352
365
|
try {
|
|
353
|
-
const r = await f(`${
|
|
366
|
+
const r = await f(`${_()}/validatePaymentIntent/${t}`, {
|
|
354
367
|
...e,
|
|
355
368
|
attribution: D()
|
|
356
369
|
});
|
|
@@ -375,7 +388,7 @@ async function Ct(t, e) {
|
|
|
375
388
|
return d.error("validatePaymentIntent error:", r), null;
|
|
376
389
|
}
|
|
377
390
|
}
|
|
378
|
-
async function
|
|
391
|
+
async function It(t) {
|
|
379
392
|
try {
|
|
380
393
|
const e = await f(`${c()}/orders/extend-session`, { orderUuid: t });
|
|
381
394
|
if (!e.success)
|
|
@@ -394,7 +407,7 @@ async function Tt(t) {
|
|
|
394
407
|
return d.error("Error extending checkout session:", e), { success: !1, error: "Network error extending session" };
|
|
395
408
|
}
|
|
396
409
|
}
|
|
397
|
-
async function
|
|
410
|
+
async function Et(t) {
|
|
398
411
|
try {
|
|
399
412
|
const e = await T(
|
|
400
413
|
`${c()}/orders/session/${t}`
|
|
@@ -417,7 +430,7 @@ async function St(t) {
|
|
|
417
430
|
return d.error("Error getting session status:", e), { error: "Network error getting session status" };
|
|
418
431
|
}
|
|
419
432
|
}
|
|
420
|
-
async function
|
|
433
|
+
async function Nt(t = { eventID: "" }) {
|
|
421
434
|
try {
|
|
422
435
|
const e = await f(
|
|
423
436
|
`${c()}/orders/create`,
|
|
@@ -429,7 +442,7 @@ async function Pt(t = { eventID: "" }) {
|
|
|
429
442
|
return d.error("initiateOrder error:", e), null;
|
|
430
443
|
}
|
|
431
444
|
}
|
|
432
|
-
async function
|
|
445
|
+
async function Rt(t) {
|
|
433
446
|
if (typeof window > "u") return;
|
|
434
447
|
const e = new URLSearchParams(window.location.search), r = ne(e.get("utm_source")) || re;
|
|
435
448
|
try {
|
|
@@ -440,8 +453,8 @@ async function It(t) {
|
|
|
440
453
|
d.error("UTM tracking failed:", n);
|
|
441
454
|
}
|
|
442
455
|
}
|
|
443
|
-
const V = C("VC")
|
|
444
|
-
async function
|
|
456
|
+
const V = C("VC");
|
|
457
|
+
async function At(t, e) {
|
|
445
458
|
try {
|
|
446
459
|
if (!e || !e.trim())
|
|
447
460
|
return { valid: !1, error: "Promo code is required" };
|
|
@@ -468,7 +481,7 @@ async function Et(t, e) {
|
|
|
468
481
|
return V.error("Error validating promo code:", r), { valid: !1, error: "Network error validating code" };
|
|
469
482
|
}
|
|
470
483
|
}
|
|
471
|
-
async function
|
|
484
|
+
async function Dt(t) {
|
|
472
485
|
try {
|
|
473
486
|
const e = await T(
|
|
474
487
|
`/promo-codes/check/${t}`
|
|
@@ -478,10 +491,10 @@ async function Rt(t) {
|
|
|
478
491
|
return V.error("Error checking promo codes availability:", e), !0;
|
|
479
492
|
}
|
|
480
493
|
}
|
|
481
|
-
async function
|
|
494
|
+
async function Ut(t, e) {
|
|
482
495
|
try {
|
|
483
496
|
const r = await f(
|
|
484
|
-
`${
|
|
497
|
+
`${_()}/cart/${t}/apply-promo`,
|
|
485
498
|
{ promoCode: e }
|
|
486
499
|
);
|
|
487
500
|
return r.success ? { success: !0 } : {
|
|
@@ -492,7 +505,7 @@ async function At(t, e) {
|
|
|
492
505
|
return V.error("Error applying promo code:", r), { success: !1, error: "Network error applying code" };
|
|
493
506
|
}
|
|
494
507
|
}
|
|
495
|
-
async function
|
|
508
|
+
async function xt(t) {
|
|
496
509
|
try {
|
|
497
510
|
const e = await f(`/orders/${t}/remove-promo`);
|
|
498
511
|
return e.success ? { success: !0 } : {
|
|
@@ -503,7 +516,7 @@ async function Nt(t) {
|
|
|
503
516
|
return V.error("Error removing promo code:", e), { success: !1, error: "Network error removing code" };
|
|
504
517
|
}
|
|
505
518
|
}
|
|
506
|
-
function
|
|
519
|
+
function Ge(t) {
|
|
507
520
|
const e = t ?? {};
|
|
508
521
|
return {
|
|
509
522
|
performers: Array.isArray(e.performers) ? e.performers : [],
|
|
@@ -513,23 +526,23 @@ function qe(t) {
|
|
|
513
526
|
function se(t) {
|
|
514
527
|
return { ok: !0, data: t };
|
|
515
528
|
}
|
|
516
|
-
function
|
|
529
|
+
function $(t) {
|
|
517
530
|
return { ok: !1, error: t };
|
|
518
531
|
}
|
|
519
|
-
function
|
|
532
|
+
function B(t) {
|
|
520
533
|
return { ok: !1, error: t, notFound: !0 };
|
|
521
534
|
}
|
|
522
|
-
function
|
|
535
|
+
function Ot(t) {
|
|
523
536
|
return t.ok;
|
|
524
537
|
}
|
|
525
|
-
function
|
|
538
|
+
function Ft(t) {
|
|
526
539
|
return !t.ok;
|
|
527
540
|
}
|
|
528
|
-
function
|
|
541
|
+
function A(t, e) {
|
|
529
542
|
return t.ok ? t.data : e;
|
|
530
543
|
}
|
|
531
|
-
const m = C("VC"), x = /* @__PURE__ */ new Map();
|
|
532
|
-
async function
|
|
544
|
+
const je = "00000000-0000-0000-0000-000000000000", m = C("VC"), x = /* @__PURE__ */ new Map();
|
|
545
|
+
async function We(t, e = fetch, r) {
|
|
533
546
|
const n = r ? `${t}:pw` : String(t);
|
|
534
547
|
if (e === fetch) {
|
|
535
548
|
const s = x.get(n);
|
|
@@ -539,155 +552,143 @@ async function Me(t, e = fetch, r) {
|
|
|
539
552
|
try {
|
|
540
553
|
const s = r ? `${c()}/events/${t}?password=${encodeURIComponent(r)}` : `${c()}/events/${t}`, o = await e(s);
|
|
541
554
|
if (!o.ok)
|
|
542
|
-
return o.status === 404 ?
|
|
555
|
+
return o.status === 404 ? B("event_not_found") : (m.error(`Failed to fetch event details: ${o.status}`), $("event_fetch_failed"));
|
|
543
556
|
const i = await o.json();
|
|
544
|
-
return i ? se(i) :
|
|
557
|
+
return i ? se(i) : B("event_not_found");
|
|
545
558
|
} catch (s) {
|
|
546
|
-
return m.error("Error fetching event details:", s),
|
|
559
|
+
return m.error("Error fetching event details:", s), $("event_fetch_failed");
|
|
547
560
|
}
|
|
548
561
|
})();
|
|
549
562
|
return e === fetch && (x.set(n, a), a.finally(() => {
|
|
550
563
|
x.get(n) === a && x.delete(n);
|
|
551
564
|
})), a;
|
|
552
565
|
}
|
|
553
|
-
async function
|
|
554
|
-
const n = await
|
|
566
|
+
async function Vt(t, e = fetch, r) {
|
|
567
|
+
const n = await We(t, e, r);
|
|
555
568
|
return n.ok ? n.data : null;
|
|
556
569
|
}
|
|
557
|
-
async function
|
|
570
|
+
async function k(t, e, r = (n) => n) {
|
|
558
571
|
try {
|
|
559
|
-
const n = await
|
|
560
|
-
return n ? se(r(n)) : (m.error(`Failed to load (${e}): network or server error`),
|
|
572
|
+
const n = await R(t);
|
|
573
|
+
return n ? se(r(n)) : (m.error(`Failed to load (${e}): network or server error`), $(e));
|
|
561
574
|
} catch (n) {
|
|
562
|
-
return m.error(`Error loading (${e}):`, n),
|
|
575
|
+
return m.error(`Error loading (${e}):`, n), $(e);
|
|
563
576
|
}
|
|
564
577
|
}
|
|
565
|
-
function
|
|
578
|
+
function M(t) {
|
|
566
579
|
return Array.isArray(t) ? t : [];
|
|
567
580
|
}
|
|
568
|
-
async function
|
|
569
|
-
return
|
|
581
|
+
async function ze(t) {
|
|
582
|
+
return k(
|
|
570
583
|
`${c()}/tickets/event/${t}`,
|
|
571
584
|
"tickets_fetch_failed",
|
|
572
|
-
|
|
585
|
+
M
|
|
573
586
|
);
|
|
574
587
|
}
|
|
575
|
-
async function
|
|
576
|
-
return
|
|
588
|
+
async function qt(t) {
|
|
589
|
+
return A(await ze(t), []);
|
|
577
590
|
}
|
|
578
|
-
async function
|
|
579
|
-
return t ?
|
|
591
|
+
async function Be(t) {
|
|
592
|
+
return t ? k(
|
|
580
593
|
`${c()}/events/${t}/performers`,
|
|
581
594
|
"performers_fetch_failed",
|
|
582
|
-
(e) =>
|
|
583
|
-
) : (m.warn("fetchEventPerformers called without eventId"),
|
|
595
|
+
(e) => Ge(e)
|
|
596
|
+
) : (m.warn("fetchEventPerformers called without eventId"), $("performers_missing_event_id"));
|
|
584
597
|
}
|
|
585
|
-
async function
|
|
586
|
-
return
|
|
598
|
+
async function Lt(t) {
|
|
599
|
+
return A(await Be(t), {
|
|
587
600
|
performers: [],
|
|
588
601
|
showPerformers: !1
|
|
589
602
|
});
|
|
590
603
|
}
|
|
591
|
-
async function
|
|
592
|
-
return t ?
|
|
604
|
+
async function He(t) {
|
|
605
|
+
return t ? k(
|
|
593
606
|
`${c()}/venues/organization/${t}`,
|
|
594
607
|
"venues_fetch_failed",
|
|
595
|
-
|
|
596
|
-
) : (m.warn("fetchAllVenues called without orgId"),
|
|
608
|
+
M
|
|
609
|
+
) : (m.warn("fetchAllVenues called without orgId"), $("venues_missing_org_id"));
|
|
597
610
|
}
|
|
598
|
-
async function
|
|
599
|
-
return
|
|
611
|
+
async function Mt(t) {
|
|
612
|
+
return A(await He(t), []);
|
|
600
613
|
}
|
|
601
|
-
async function
|
|
602
|
-
return t ?
|
|
614
|
+
async function Ke(t) {
|
|
615
|
+
return t ? k(
|
|
603
616
|
`${c()}/events/venue/${t}`,
|
|
604
617
|
"venue_events_fetch_failed",
|
|
605
|
-
|
|
606
|
-
) : (m.warn("fetchVenueEvents called without venueId"),
|
|
618
|
+
M
|
|
619
|
+
) : (m.warn("fetchVenueEvents called without venueId"), $("venue_events_missing_venue_id"));
|
|
607
620
|
}
|
|
608
|
-
async function
|
|
609
|
-
return
|
|
621
|
+
async function Gt(t) {
|
|
622
|
+
return A(await Ke(t), []);
|
|
610
623
|
}
|
|
611
624
|
function oe(t) {
|
|
612
625
|
return Array.isArray(t) ? t : Array.isArray(t.events) ? t.events : [];
|
|
613
626
|
}
|
|
614
|
-
async function
|
|
615
|
-
return
|
|
627
|
+
async function Je(t, e, r) {
|
|
628
|
+
return k(
|
|
616
629
|
`${c()}/events/venue/${t}/month/${e}/${r}`,
|
|
617
630
|
"month_events_fetch_failed",
|
|
618
631
|
(n) => oe(n)
|
|
619
632
|
);
|
|
620
633
|
}
|
|
621
|
-
async function
|
|
622
|
-
return
|
|
634
|
+
async function jt(t, e, r) {
|
|
635
|
+
return A(await Je(t, e, r), []);
|
|
623
636
|
}
|
|
624
|
-
async function
|
|
625
|
-
return
|
|
637
|
+
async function Qe(t, e, r) {
|
|
638
|
+
return k(
|
|
626
639
|
`${c()}/events/organization/${t}/month/${e}/${r}`,
|
|
627
640
|
"org_month_events_fetch_failed",
|
|
628
641
|
(n) => oe(n)
|
|
629
642
|
);
|
|
630
643
|
}
|
|
631
|
-
async function
|
|
632
|
-
return
|
|
644
|
+
async function Wt(t, e, r) {
|
|
645
|
+
return A(await Qe(t, e, r), []);
|
|
633
646
|
}
|
|
634
|
-
async function
|
|
635
|
-
return
|
|
647
|
+
async function Ye(t) {
|
|
648
|
+
return k(
|
|
636
649
|
`${c()}/series/${t}/occurrences`,
|
|
637
650
|
"series_occurrences_fetch_failed"
|
|
638
651
|
);
|
|
639
652
|
}
|
|
640
|
-
async function
|
|
641
|
-
const e = await
|
|
653
|
+
async function zt(t) {
|
|
654
|
+
const e = await Ye(t);
|
|
642
655
|
return e.ok ? e.data : null;
|
|
643
656
|
}
|
|
644
|
-
async function
|
|
645
|
-
return
|
|
657
|
+
async function Xe(t, e) {
|
|
658
|
+
return k(
|
|
646
659
|
`${c()}/series/${t}/occurrences?venueId=${e}`,
|
|
647
660
|
"series_cta_fetch_failed"
|
|
648
661
|
);
|
|
649
662
|
}
|
|
650
|
-
async function
|
|
651
|
-
const r = await
|
|
663
|
+
async function Bt(t, e) {
|
|
664
|
+
const r = await Xe(t, e);
|
|
652
665
|
return r.ok ? r.data : null;
|
|
653
666
|
}
|
|
654
|
-
async function
|
|
667
|
+
async function Ht(t, e) {
|
|
655
668
|
try {
|
|
656
|
-
const r = e ? `?slug=${encodeURIComponent(e)}` : "", n = await
|
|
669
|
+
const r = e ? `?slug=${encodeURIComponent(e)}` : "", n = await R(
|
|
657
670
|
`${c()}/resolve/${encodeURIComponent(String(t))}${r}`
|
|
658
671
|
);
|
|
659
672
|
if (!n || !n.type)
|
|
660
|
-
throw new
|
|
673
|
+
throw new Q("entity", String(t));
|
|
661
674
|
return n;
|
|
662
675
|
} catch (r) {
|
|
663
676
|
return m.error("Error resolving public entity:", r), null;
|
|
664
677
|
}
|
|
665
678
|
}
|
|
666
|
-
async function
|
|
667
|
-
try {
|
|
668
|
-
const e = await S(
|
|
669
|
-
`${c()}/series/${t}/page`
|
|
670
|
-
);
|
|
671
|
-
if (!e)
|
|
672
|
-
throw new M("series", String(t));
|
|
673
|
-
return e;
|
|
674
|
-
} catch (e) {
|
|
675
|
-
return m.error("Error fetching series page:", e), null;
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
async function Ht(t, e) {
|
|
679
|
+
async function Kt(t, e) {
|
|
679
680
|
try {
|
|
680
|
-
const r = e ? `${c()}/collections/${t}?password=${encodeURIComponent(e)}` : `${c()}/collections/${t}`, n = await
|
|
681
|
+
const r = e ? `${c()}/collections/${t}?password=${encodeURIComponent(e)}` : `${c()}/collections/${t}`, n = await R(r);
|
|
681
682
|
if (!n)
|
|
682
|
-
throw new
|
|
683
|
+
throw new Q("collection", String(t));
|
|
683
684
|
return n;
|
|
684
685
|
} catch (r) {
|
|
685
686
|
return m.error("Error fetching collection:", r), null;
|
|
686
687
|
}
|
|
687
688
|
}
|
|
688
|
-
async function
|
|
689
|
+
async function Jt(t, e) {
|
|
689
690
|
try {
|
|
690
|
-
return (await
|
|
691
|
+
return (await R(
|
|
691
692
|
`${c()}/collections/${t}/check-password`,
|
|
692
693
|
{
|
|
693
694
|
method: "POST",
|
|
@@ -699,9 +700,9 @@ async function Wt(t, e) {
|
|
|
699
700
|
return m.error("Error checking collection password:", r), !1;
|
|
700
701
|
}
|
|
701
702
|
}
|
|
702
|
-
async function
|
|
703
|
+
async function Qt(t, e) {
|
|
703
704
|
try {
|
|
704
|
-
const r = await
|
|
705
|
+
const r = await R(
|
|
705
706
|
`${c()}/events/${t}/check-password`,
|
|
706
707
|
{
|
|
707
708
|
method: "POST",
|
|
@@ -714,46 +715,46 @@ async function Jt(t, e) {
|
|
|
714
715
|
return m.error("Error checking event password:", r), { valid: !1 };
|
|
715
716
|
}
|
|
716
717
|
}
|
|
717
|
-
async function
|
|
718
|
+
async function Yt(t, e) {
|
|
718
719
|
try {
|
|
719
|
-
const r = e ? `${c()}/events/venue/${e}` : t ? `${c()}/venues/organization/${t}` : `${c()}/
|
|
720
|
+
const r = e ? `${c()}/events/venue/${e}` : t ? `${c()}/venues/organization/${t}` : `${c()}/venues/${je}`;
|
|
720
721
|
return (await fetch(r, {
|
|
721
722
|
method: "HEAD"
|
|
722
|
-
})).
|
|
723
|
+
})).status < 500;
|
|
723
724
|
} catch (r) {
|
|
724
725
|
return m.error("Network connection test failed:", r), !1;
|
|
725
726
|
}
|
|
726
727
|
}
|
|
727
|
-
const
|
|
728
|
-
async function
|
|
728
|
+
const N = C("VC");
|
|
729
|
+
async function Ze(t) {
|
|
729
730
|
try {
|
|
730
731
|
if (!t)
|
|
731
|
-
return
|
|
732
|
+
return N.warn("getVenue called without venueId"), null;
|
|
732
733
|
const e = await T(`/venues/${t}`);
|
|
733
|
-
return e.success ? e.data ?? null : (
|
|
734
|
+
return e.success ? e.data ?? null : (N.error(`Failed to fetch venue: ${e.statusCode}`), null);
|
|
734
735
|
} catch (e) {
|
|
735
|
-
return
|
|
736
|
+
return N.error("Error fetching venue:", e), null;
|
|
736
737
|
}
|
|
737
738
|
}
|
|
738
|
-
async function
|
|
739
|
-
const e = await
|
|
739
|
+
async function Xt(t) {
|
|
740
|
+
const e = await Ze(t);
|
|
740
741
|
return e ? {
|
|
741
742
|
serviceFeePercentage: e.serviceFeePercentage ?? 0,
|
|
742
743
|
serviceFeeCents: e.serviceFeeCents ?? 0,
|
|
743
744
|
taxPercentage: e.taxPercentage ?? 0
|
|
744
745
|
} : null;
|
|
745
746
|
}
|
|
746
|
-
async function
|
|
747
|
+
async function Zt(t) {
|
|
747
748
|
try {
|
|
748
749
|
if (!t)
|
|
749
|
-
return
|
|
750
|
+
return N.warn("getVenueBySlug called without slug"), null;
|
|
750
751
|
const e = encodeURIComponent(t), r = await T(`/venues/slug/${e}`);
|
|
751
|
-
return r.success ? r.data ?? null : (
|
|
752
|
+
return r.success ? r.data ?? null : (N.error(`Failed to fetch venue by slug: ${r.statusCode}`), null);
|
|
752
753
|
} catch (e) {
|
|
753
|
-
return
|
|
754
|
+
return N.error("Error fetching venue by slug:", e), null;
|
|
754
755
|
}
|
|
755
756
|
}
|
|
756
|
-
function
|
|
757
|
+
function et(t) {
|
|
757
758
|
const e = t ?? {}, r = (e.appliedAmount ?? 0) / 100, n = e.remainingTotal ?? 0, a = e.fullyCoveredByCard ?? n <= 0, s = !a;
|
|
758
759
|
return {
|
|
759
760
|
valid: !0,
|
|
@@ -766,31 +767,31 @@ function Ke(t) {
|
|
|
766
767
|
requiresStripe: s
|
|
767
768
|
};
|
|
768
769
|
}
|
|
769
|
-
const h = C("VC"),
|
|
770
|
-
async function
|
|
770
|
+
const h = C("VC"), tt = "https://get-micdrop.com", H = `${tt}/api/orders/v2`;
|
|
771
|
+
async function er(t) {
|
|
771
772
|
try {
|
|
772
773
|
const e = await f(
|
|
773
|
-
`${
|
|
774
|
+
`${H}/gift-cards`,
|
|
774
775
|
t
|
|
775
776
|
);
|
|
776
777
|
if (!e.success)
|
|
777
|
-
throw h.error("Gift card purchase creation failed:", e.error), new
|
|
778
|
+
throw h.error("Gift card purchase creation failed:", e.error), new J(
|
|
778
779
|
e.error || "Failed to create gift card purchase",
|
|
779
780
|
e.statusCode ?? 0,
|
|
780
|
-
{ endpoint: `${
|
|
781
|
+
{ endpoint: `${H}/gift-cards`, method: "POST" }
|
|
781
782
|
);
|
|
782
783
|
return h.debug("Gift card purchase created:", e.data), e.data;
|
|
783
784
|
} catch (e) {
|
|
784
785
|
return h.error("Gift card purchase creation error:", e), null;
|
|
785
786
|
}
|
|
786
787
|
}
|
|
787
|
-
async function
|
|
788
|
+
async function tr(t, e) {
|
|
788
789
|
try {
|
|
789
790
|
const r = await f(
|
|
790
|
-
`${
|
|
791
|
+
`${_()}/cart/${t}/apply-gift-card`,
|
|
791
792
|
{ giftCardCode: e }
|
|
792
793
|
);
|
|
793
|
-
return r.success ?
|
|
794
|
+
return r.success ? et(r.data) : r.statusCode === 429 ? {
|
|
794
795
|
valid: !1,
|
|
795
796
|
error: "Too many attempts. Please wait a moment and try again."
|
|
796
797
|
} : (h.error("Apply gift card failed:", r.error), {
|
|
@@ -804,10 +805,10 @@ async function Xt(t, e) {
|
|
|
804
805
|
};
|
|
805
806
|
}
|
|
806
807
|
}
|
|
807
|
-
async function
|
|
808
|
+
async function rr(t, e) {
|
|
808
809
|
try {
|
|
809
|
-
const r = await
|
|
810
|
-
`${
|
|
810
|
+
const r = await Ce(
|
|
811
|
+
`${_()}/cart/${t}/gift-card`,
|
|
811
812
|
e ? { body: JSON.stringify({ giftCardCode: e }) } : void 0
|
|
812
813
|
);
|
|
813
814
|
return r.success ? { success: !0 } : (h.error("Remove gift card failed:", r.error), {
|
|
@@ -821,9 +822,9 @@ async function er(t, e) {
|
|
|
821
822
|
};
|
|
822
823
|
}
|
|
823
824
|
}
|
|
824
|
-
async function
|
|
825
|
+
async function nr(t, e) {
|
|
825
826
|
try {
|
|
826
|
-
const r = await f(`${
|
|
827
|
+
const r = await f(`${_()}/cart/${t}/complete-gift-card-payment`, {
|
|
827
828
|
customerName: ye(
|
|
828
829
|
e.firstName,
|
|
829
830
|
e.lastName
|
|
@@ -853,14 +854,14 @@ async function tr(t, e) {
|
|
|
853
854
|
};
|
|
854
855
|
}
|
|
855
856
|
}
|
|
856
|
-
const O = C("VC"),
|
|
857
|
+
const O = C("VC"), rt = {
|
|
857
858
|
waitlist_not_enabled: "Waitlist is not available for this event",
|
|
858
859
|
event_not_found: "Event not found",
|
|
859
860
|
invalid_phone: "Please enter a valid phone number",
|
|
860
861
|
already_purchased: "You have already purchased tickets for this event",
|
|
861
862
|
phone_already_registered: "This phone number is already on the waitlist"
|
|
862
863
|
};
|
|
863
|
-
async function
|
|
864
|
+
async function ar(t, e, r = null, n = !1) {
|
|
864
865
|
try {
|
|
865
866
|
const a = { email: e };
|
|
866
867
|
r && n && (a.phone = r, a.smsOptIn = !0);
|
|
@@ -873,7 +874,7 @@ async function rr(t, e, r = null, n = !1) {
|
|
|
873
874
|
updated: s.data?.updated
|
|
874
875
|
} : (O.error("Join waitlist failed:", s.error), {
|
|
875
876
|
success: !1,
|
|
876
|
-
error:
|
|
877
|
+
error: rt[s.error ?? ""] || "Failed to join waitlist. Please try again."
|
|
877
878
|
});
|
|
878
879
|
} catch (a) {
|
|
879
880
|
return O.error("joinWaitlist error:", a), {
|
|
@@ -882,7 +883,7 @@ async function rr(t, e, r = null, n = !1) {
|
|
|
882
883
|
};
|
|
883
884
|
}
|
|
884
885
|
}
|
|
885
|
-
async function
|
|
886
|
+
async function sr(t, e) {
|
|
886
887
|
try {
|
|
887
888
|
const r = await f(
|
|
888
889
|
`/checkout/validate-token/${t}`,
|
|
@@ -900,7 +901,7 @@ async function nr(t, e) {
|
|
|
900
901
|
return O.error("validateWaitlistToken error:", r), { valid: !1, eventId: 0, errorCode: "invalid_token" };
|
|
901
902
|
}
|
|
902
903
|
}
|
|
903
|
-
async function
|
|
904
|
+
async function or(t) {
|
|
904
905
|
const e = {
|
|
905
906
|
waitlistEnabled: !1,
|
|
906
907
|
soldOut: !1,
|
|
@@ -919,21 +920,21 @@ async function ar(t) {
|
|
|
919
920
|
return O.error("getWaitlistStatus error:", r), e;
|
|
920
921
|
}
|
|
921
922
|
}
|
|
922
|
-
function
|
|
923
|
+
function ir(t, e, r = {}) {
|
|
923
924
|
const {
|
|
924
925
|
cancelled: n = !1,
|
|
925
926
|
isRegistration: a = !1,
|
|
926
927
|
waitlistEnabled: s = !1
|
|
927
|
-
} = r, o =
|
|
928
|
+
} = r, o = he();
|
|
928
929
|
if (n)
|
|
929
930
|
return { text: "Cancelled", disabled: !0, reason: "cancelled" };
|
|
930
931
|
const i = t.endDateTime || t.startDateTime;
|
|
931
932
|
if (i && new Date(i) < o)
|
|
932
933
|
return { text: "Sales ended", disabled: !0, reason: "event_past" };
|
|
933
|
-
const u = t?.hasPurchasableHiddenTickets === !0 || Array.isArray(e) && e.some(
|
|
934
|
+
const u = t?.hasPurchasableHiddenTickets === !0 || Array.isArray(e) && e.some(_e), S = (e || []).filter(
|
|
934
935
|
(l) => l.salesChannel !== 2 && !l.isHidden && !(typeof l.visibility == "number" && l.visibility >= 2)
|
|
935
936
|
);
|
|
936
|
-
if (
|
|
937
|
+
if (S.length === 0)
|
|
937
938
|
return u ? {
|
|
938
939
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
939
940
|
disabled: !1,
|
|
@@ -943,12 +944,12 @@ function sr(t, e, r = {}) {
|
|
|
943
944
|
disabled: !0,
|
|
944
945
|
reason: "no_tickets"
|
|
945
946
|
};
|
|
946
|
-
let y = !1,
|
|
947
|
-
for (const l of
|
|
948
|
-
const
|
|
949
|
-
if (!
|
|
950
|
-
const
|
|
951
|
-
(!v ||
|
|
947
|
+
let y = !1, b = !0, g = !0, v = null;
|
|
948
|
+
for (const l of S) {
|
|
949
|
+
const P = l.salesBegin || l.salesStart || l.saleBegin || l.onSaleStart, U = l.salesEnd || l.saleEnd || l.onSaleEnd, I = l.remainingCapacity ?? l.quantityRemaining ?? l.quantity, w = l.soldOut || I != null && I <= 0, E = P ? new Date(P) > o : !1, G = U ? new Date(U) < o : !1;
|
|
950
|
+
if (!w && !E && !G && (y = !0), w || (b = !1), E || (g = !1), E && P && !w && !G) {
|
|
951
|
+
const j = new Date(P);
|
|
952
|
+
(!v || j < v) && (v = j);
|
|
952
953
|
}
|
|
953
954
|
}
|
|
954
955
|
if (y)
|
|
@@ -964,27 +965,27 @@ function sr(t, e, r = {}) {
|
|
|
964
965
|
disabled: !1,
|
|
965
966
|
reason: "hidden_only"
|
|
966
967
|
};
|
|
967
|
-
const l = v.getTime() - o.getTime(),
|
|
968
|
-
|
|
968
|
+
const l = v.getTime() - o.getTime(), P = l / (1e3 * 60 * 60), U = l / (1e3 * 60 * 60 * 24), I = (E) => q(
|
|
969
|
+
E,
|
|
969
970
|
{ hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
970
971
|
"en-US"
|
|
971
972
|
);
|
|
972
|
-
let
|
|
973
|
-
return
|
|
973
|
+
let w;
|
|
974
|
+
return P < 24 ? w = I(v) : U <= 7 ? w = q(
|
|
974
975
|
v,
|
|
975
976
|
{ weekday: "short", hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
976
977
|
"en-US"
|
|
977
|
-
) :
|
|
978
|
+
) : w = `${q(
|
|
978
979
|
v,
|
|
979
980
|
{ month: "short", day: "numeric" },
|
|
980
981
|
"en-US"
|
|
981
|
-
)} ${
|
|
982
|
-
text: `On sale ${
|
|
982
|
+
)} ${I(v)}`, {
|
|
983
|
+
text: `On sale ${w}`,
|
|
983
984
|
disabled: !0,
|
|
984
985
|
reason: "coming_soon"
|
|
985
986
|
};
|
|
986
987
|
}
|
|
987
|
-
return
|
|
988
|
+
return b ? u ? {
|
|
988
989
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
989
990
|
disabled: !1,
|
|
990
991
|
reason: "hidden_only"
|
|
@@ -1037,8 +1038,8 @@ function ce(t) {
|
|
|
1037
1038
|
updatedAt: e.updatedAt || e.updated_at
|
|
1038
1039
|
};
|
|
1039
1040
|
}
|
|
1040
|
-
const
|
|
1041
|
-
function
|
|
1041
|
+
const cr = ie, ur = ce;
|
|
1042
|
+
function lr(t) {
|
|
1042
1043
|
const e = ce(t), r = e.uuid.split("-")[0] || e.uuid, n = Number(e.totalAmount);
|
|
1043
1044
|
return {
|
|
1044
1045
|
orderId: e.uuid,
|
|
@@ -1051,14 +1052,14 @@ function cr(t) {
|
|
|
1051
1052
|
status: e.status
|
|
1052
1053
|
};
|
|
1053
1054
|
}
|
|
1054
|
-
function
|
|
1055
|
+
function nt(t) {
|
|
1055
1056
|
return X(t, { cdn: !0 });
|
|
1056
1057
|
}
|
|
1057
|
-
function
|
|
1058
|
+
function K(t) {
|
|
1058
1059
|
const e = t.imageUrl || t.imageURL || t.image_url || t.image || "";
|
|
1059
|
-
return
|
|
1060
|
+
return nt(e);
|
|
1060
1061
|
}
|
|
1061
|
-
function
|
|
1062
|
+
function at(t) {
|
|
1062
1063
|
switch (t) {
|
|
1063
1064
|
case "available":
|
|
1064
1065
|
case "sold_out":
|
|
@@ -1069,10 +1070,10 @@ function tt(t) {
|
|
|
1069
1070
|
return null;
|
|
1070
1071
|
}
|
|
1071
1072
|
}
|
|
1072
|
-
function
|
|
1073
|
+
function st(t) {
|
|
1073
1074
|
const e = t.ctaState || t.cta_state;
|
|
1074
1075
|
if (e) {
|
|
1075
|
-
const o =
|
|
1076
|
+
const o = at(e);
|
|
1076
1077
|
if (o)
|
|
1077
1078
|
return o;
|
|
1078
1079
|
}
|
|
@@ -1089,8 +1090,8 @@ function rt(t) {
|
|
|
1089
1090
|
return n <= 0 ? "sold_out" : "available";
|
|
1090
1091
|
const a = t.availableTickets || t.available_tickets || t.tickets || [];
|
|
1091
1092
|
return a.length === 0 ? "coming_soon" : a.reduce((o, i) => {
|
|
1092
|
-
const u = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0,
|
|
1093
|
-
return o + Math.max(0, u -
|
|
1093
|
+
const u = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0, S = i.quantitySold ?? i.quantity_sold ?? 0;
|
|
1094
|
+
return o + Math.max(0, u - S);
|
|
1094
1095
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
1095
1096
|
}
|
|
1096
1097
|
function ue(t) {
|
|
@@ -1132,8 +1133,8 @@ function le(t) {
|
|
|
1132
1133
|
venueName: e.venueName || e.venue_name,
|
|
1133
1134
|
venueAddress: e.venueAddress || e.venue_address,
|
|
1134
1135
|
location: e.location || e.venueAddress || e.venue_address,
|
|
1135
|
-
imageUrl:
|
|
1136
|
-
imageURL:
|
|
1136
|
+
imageUrl: K(e),
|
|
1137
|
+
imageURL: K(e),
|
|
1137
1138
|
status: e.status,
|
|
1138
1139
|
isPublished: e.isPublished ?? e.is_published,
|
|
1139
1140
|
isCancelled: e.isCancelled ?? e.is_cancelled,
|
|
@@ -1143,7 +1144,7 @@ function le(t) {
|
|
|
1143
1144
|
minPrice: e.minPrice ?? e.min_price ?? s,
|
|
1144
1145
|
maxPrice: e.maxPrice ?? e.max_price ?? o,
|
|
1145
1146
|
ctaText: e.ctaText || e.cta_text,
|
|
1146
|
-
ctaState:
|
|
1147
|
+
ctaState: st(e),
|
|
1147
1148
|
showPerformers: e.showPerformers ?? e.show_performers,
|
|
1148
1149
|
eventSeriesId: e.eventSeriesId || e.event_series_id,
|
|
1149
1150
|
seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number,
|
|
@@ -1177,11 +1178,11 @@ function le(t) {
|
|
|
1177
1178
|
purchasedTickets: e.purchasedTickets
|
|
1178
1179
|
};
|
|
1179
1180
|
}
|
|
1180
|
-
const
|
|
1181
|
-
function
|
|
1181
|
+
const dr = ue, fr = le, mr = le;
|
|
1182
|
+
function ot(t) {
|
|
1182
1183
|
return X(t, { cdn: !0 });
|
|
1183
1184
|
}
|
|
1184
|
-
function
|
|
1185
|
+
function it(t) {
|
|
1185
1186
|
const e = t, r = e.logoUrl || e.logo_url || e.logo;
|
|
1186
1187
|
return {
|
|
1187
1188
|
id: e.id || e.ID || 0,
|
|
@@ -1194,15 +1195,15 @@ function at(t) {
|
|
|
1194
1195
|
zipCode: e.zipCode || e.zip_code,
|
|
1195
1196
|
country: e.country,
|
|
1196
1197
|
timezone: e.timezone || e.time_zone,
|
|
1197
|
-
logoUrl:
|
|
1198
|
+
logoUrl: ot(r),
|
|
1198
1199
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
1199
1200
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
1200
1201
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
|
|
1201
1202
|
organizationId: e.organizationId || e.organization_id
|
|
1202
1203
|
};
|
|
1203
1204
|
}
|
|
1204
|
-
const
|
|
1205
|
-
function
|
|
1205
|
+
const pr = it;
|
|
1206
|
+
function yr(t) {
|
|
1206
1207
|
const e = t;
|
|
1207
1208
|
return {
|
|
1208
1209
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
@@ -1210,90 +1211,89 @@ function mr(t) {
|
|
|
1210
1211
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
|
|
1211
1212
|
};
|
|
1212
1213
|
}
|
|
1213
|
-
function
|
|
1214
|
+
function gr(t) {
|
|
1214
1215
|
return [t.address, t.city, t.state, t.zipCode].filter(
|
|
1215
1216
|
Boolean
|
|
1216
1217
|
).join(", ");
|
|
1217
1218
|
}
|
|
1218
1219
|
export {
|
|
1219
|
-
|
|
1220
|
+
Ce as apiDelete,
|
|
1220
1221
|
T as apiGet,
|
|
1221
1222
|
f as apiPost,
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
ht as
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
We as getOrgMonthEventsResult,
|
|
1223
|
+
_t as apiPut,
|
|
1224
|
+
tr as applyGiftCard,
|
|
1225
|
+
Ut as applyPromoCode,
|
|
1226
|
+
st as calculateCtaState,
|
|
1227
|
+
Ct as cancelReservation,
|
|
1228
|
+
Jt as checkCollectionPassword,
|
|
1229
|
+
Qt as checkEventPassword,
|
|
1230
|
+
nr as completeGiftCardPayment,
|
|
1231
|
+
$t as completeReservation,
|
|
1232
|
+
ir as computeCtaState,
|
|
1233
|
+
yt as configureApi,
|
|
1234
|
+
er as createGiftCardPurchase,
|
|
1235
|
+
Tt as createOrder,
|
|
1236
|
+
wt as createPaymentIntent,
|
|
1237
|
+
$ as err,
|
|
1238
|
+
B as errNotFound,
|
|
1239
|
+
It as extendCheckoutSession,
|
|
1240
|
+
yr as extractVenueFees,
|
|
1241
|
+
Mt as fetchAllVenues,
|
|
1242
|
+
He as fetchAllVenuesResult,
|
|
1243
|
+
Vt as fetchEventDetails,
|
|
1244
|
+
We as fetchEventDetailsResult,
|
|
1245
|
+
Lt as fetchEventPerformers,
|
|
1246
|
+
Be as fetchEventPerformersResult,
|
|
1247
|
+
qt as fetchEventTickets,
|
|
1248
|
+
ze as fetchEventTicketsResult,
|
|
1249
|
+
Kt as fetchPublicCollection,
|
|
1250
|
+
Bt as fetchSeriesOccurrences,
|
|
1251
|
+
Xe as fetchSeriesOccurrencesResult,
|
|
1252
|
+
Gt as fetchVenueEvents,
|
|
1253
|
+
Ke as fetchVenueEventsResult,
|
|
1254
|
+
gr as formatVenueAddress,
|
|
1255
|
+
gt as getApiConfig,
|
|
1256
|
+
nt as getCDNImageUrl,
|
|
1257
|
+
kt as getCartByUUID,
|
|
1258
|
+
ht as getClientIP,
|
|
1259
|
+
K as getEventImageUrl,
|
|
1260
|
+
vt as getLegacyPublicUrl,
|
|
1261
|
+
jt as getMonthEvents,
|
|
1262
|
+
Je as getMonthEventsResult,
|
|
1263
|
+
St as getOrder,
|
|
1264
|
+
_ as getOrdersV2Url,
|
|
1265
|
+
Wt as getOrgMonthEvents,
|
|
1266
|
+
Qe as getOrgMonthEventsResult,
|
|
1267
1267
|
c as getPublicBaseUrl,
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1268
|
+
zt as getSeriesOccurrences,
|
|
1269
|
+
Ye as getSeriesOccurrencesResult,
|
|
1270
|
+
Et as getSessionStatus,
|
|
1271
|
+
Ze as getVenue,
|
|
1272
|
+
Zt as getVenueBySlug,
|
|
1273
|
+
Xt as getVenueFees,
|
|
1274
|
+
or as getWaitlistStatus,
|
|
1275
|
+
Dt as hasPromoCodes,
|
|
1276
|
+
Nt as initiateOrder,
|
|
1277
|
+
Ft as isErr,
|
|
1278
|
+
Ot as isOk,
|
|
1279
|
+
ar as joinWaitlist,
|
|
1280
1280
|
se as ok,
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1281
|
+
rr as removeGiftCard,
|
|
1282
|
+
xt as removePromoCode,
|
|
1283
|
+
Ht as resolvePublicEntity,
|
|
1284
|
+
Yt as testNetworkConnection,
|
|
1285
|
+
Rt as trackUTMSource,
|
|
1286
|
+
dr as transformAvailableTicket,
|
|
1287
|
+
fr as transformEvent,
|
|
1288
|
+
mr as transformEventData,
|
|
1289
|
+
ur as transformOrder,
|
|
1290
|
+
lr as transformOrderForDisplay,
|
|
1291
|
+
cr as transformTicket,
|
|
1292
|
+
pr as transformVenue,
|
|
1293
|
+
A as unwrapOr,
|
|
1294
|
+
bt as updateCartQuantities,
|
|
1295
|
+
Pt as validatePaymentIntent,
|
|
1296
|
+
At as validatePromoCode,
|
|
1297
|
+
sr as validateWaitlistToken
|
|
1298
1298
|
};
|
|
1299
1299
|
//# sourceMappingURL=api.mjs.map
|