@getmicdrop/venue-calendar 3.8.3 → 4.0.3
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/README.md +700 -661
- package/dist/AirbnbSplitMain-BfddFqOQ.js +2201 -0
- package/dist/AirbnbSplitMain-BfddFqOQ.js.map +1 -0
- package/dist/{CarouselView.legacy-BED9P-az.js → CarouselView.legacy-BKXwmB2P.js} +11 -10
- package/dist/CarouselView.legacy-BKXwmB2P.js.map +1 -0
- package/dist/CartView-iIEjDwFN.js +1667 -0
- package/dist/CartView-iIEjDwFN.js.map +1 -0
- package/dist/Checkout-Cu0D8mFn.js +743 -0
- package/dist/Checkout-Cu0D8mFn.js.map +1 -0
- package/dist/{Checkout.legacy-B1Ui4zZN.js → Checkout.legacy-C6V9HmUZ.js} +374 -359
- package/dist/Checkout.legacy-C6V9HmUZ.js.map +1 -0
- package/dist/CheckoutMain-B17znLe0.js +1403 -0
- package/dist/CheckoutMain-B17znLe0.js.map +1 -0
- package/dist/CheckoutTimer-BsI1r6lY.js +34 -0
- package/dist/CheckoutTimer-BsI1r6lY.js.map +1 -0
- package/dist/CollectionView-CQgKWQHT.js +142 -0
- package/dist/CollectionView-CQgKWQHT.js.map +1 -0
- package/dist/{CollectionView.legacy-CXv5mTUk.js → CollectionView.legacy-B8SDspBL.js} +25 -24
- package/dist/CollectionView.legacy-B8SDspBL.js.map +1 -0
- package/dist/EventDetailsView-XXl8aQJ9.js +1187 -0
- package/dist/EventDetailsView-XXl8aQJ9.js.map +1 -0
- package/dist/{FeaturedView.legacy-C5yztREl.js → FeaturedView.legacy-Dse2jnrt.js} +15 -15
- package/dist/FeaturedView.legacy-Dse2jnrt.js.map +1 -0
- package/dist/GalleryCard-CDaYD8XI.js +92 -0
- package/dist/GalleryCard-CDaYD8XI.js.map +1 -0
- package/dist/{GalleryView.legacy-DoM4NcPc.js → GalleryView.legacy-U_ripo22.js} +18 -17
- package/dist/GalleryView.legacy-U_ripo22.js.map +1 -0
- package/dist/{GroupedListView.legacy-Dmm_z1rM.js → GroupedListView.legacy-BrickaeB.js} +25 -25
- package/dist/GroupedListView.legacy-BrickaeB.js.map +1 -0
- package/dist/Heading-AFd3o0xt.js +44 -0
- package/dist/Heading-AFd3o0xt.js.map +1 -0
- package/dist/OrderSummarySkeleton-dDKUH741.js +16 -0
- package/dist/OrderSummarySkeleton-dDKUH741.js.map +1 -0
- package/dist/SeriesPage-CNoI4R4M.js +56 -0
- package/dist/SeriesPage-CNoI4R4M.js.map +1 -0
- package/dist/SeriesPage.legacy-Cugebbf0.js +195 -0
- package/dist/SeriesPage.legacy-Cugebbf0.js.map +1 -0
- package/dist/Success-BQAu7uZn.js +715 -0
- package/dist/Success-BQAu7uZn.js.map +1 -0
- package/dist/Success.legacy-DSmTsdB_.js +195 -0
- package/dist/Success.legacy-DSmTsdB_.js.map +1 -0
- package/dist/Text-CXR2fhx6.js +54 -0
- package/dist/Text-CXR2fhx6.js.map +1 -0
- package/dist/{VenueCalendar-DIQ8H0q7.js → VenueCalendar-DzTrcN8J.js} +11242 -21624
- package/dist/VenueCalendar-DzTrcN8J.js.map +1 -0
- package/dist/ViewTicketsEmbed-DOTq6kSz.js +2038 -0
- package/dist/ViewTicketsEmbed-DOTq6kSz.js.map +1 -0
- package/dist/__SKIP_NAVIGATION__-CJ96TTPE.js +7 -0
- package/dist/__SKIP_NAVIGATION__-CJ96TTPE.js.map +1 -0
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +511 -279
- package/dist/api/api.mjs.map +1 -1
- package/dist/api/client.d.ts +3 -33
- package/dist/api/cta.d.ts +38 -0
- package/dist/api/events.d.ts +3 -1
- package/dist/api/gift-cards.d.ts +88 -0
- package/dist/api/index.d.ts +6 -0
- package/dist/api/types.d.ts +353 -349
- package/dist/api/waitlist.d.ts +23 -0
- package/dist/colors-BZoMuXdh.js.map +1 -1
- package/dist/labels-BPzDu-3y.js +1351 -0
- package/dist/labels-BPzDu-3y.js.map +1 -0
- package/dist/seo/HostSeoController.d.ts +9 -1
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.cjs.map +1 -1
- package/dist/seo/seo.mjs +53 -50
- package/dist/seo/seo.mjs.map +1 -1
- package/dist/seo/types.d.ts +137 -136
- package/dist/transform-CZI_M7Wk.js +218 -0
- package/dist/transform-CZI_M7Wk.js.map +1 -0
- package/dist/types/index.d.ts +387 -387
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +36 -28
- package/dist/venue-calendar.es.js.map +1 -1
- package/dist/venue-calendar.iife.js +43 -43
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +40 -40
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +44 -6
- package/src/lib/theme.js +13 -0
- package/dist/CarouselView.legacy-BED9P-az.js.map +0 -1
- package/dist/Checkout.legacy-B1Ui4zZN.js.map +0 -1
- package/dist/CollectionView.legacy-CXv5mTUk.js.map +0 -1
- package/dist/FeaturedView.legacy-C5yztREl.js.map +0 -1
- package/dist/GalleryView.legacy-DoM4NcPc.js.map +0 -1
- package/dist/GroupedListView.legacy-Dmm_z1rM.js.map +0 -1
- package/dist/SeriesPage.legacy-Cgtr6qB_.js +0 -190
- package/dist/SeriesPage.legacy-Cgtr6qB_.js.map +0 -1
- package/dist/Success.legacy-DHG9NwIq.js +0 -194
- package/dist/Success.legacy-DHG9NwIq.js.map +0 -1
- package/dist/VenueCalendar-DIQ8H0q7.js.map +0 -1
package/dist/api/api.mjs
CHANGED
|
@@ -1,134 +1,116 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
warn: 2,
|
|
5
|
-
error: 3
|
|
6
|
-
}, P = () => typeof window < "u" && (typeof process > "u" || process.env?.NODE_ENV !== "production");
|
|
7
|
-
function y(e, r = {}) {
|
|
8
|
-
let t = {
|
|
9
|
-
enabled: r.enabled ?? P(),
|
|
10
|
-
level: r.level ?? "debug",
|
|
11
|
-
prefix: e.startsWith("[") ? e : `[${e}]`
|
|
12
|
-
};
|
|
13
|
-
function o(c) {
|
|
14
|
-
return t.enabled && _[c] >= _[t.level];
|
|
15
|
-
}
|
|
16
|
-
function n(c, u) {
|
|
17
|
-
return `${t.prefix} [${c.toUpperCase()}] ${u}`;
|
|
18
|
-
}
|
|
19
|
-
return {
|
|
20
|
-
debug(c, ...u) {
|
|
21
|
-
o("debug") && console.log(n("debug", c), ...u);
|
|
22
|
-
},
|
|
23
|
-
info(c, ...u) {
|
|
24
|
-
o("info") && console.info(n("info", c), ...u);
|
|
25
|
-
},
|
|
26
|
-
warn(c, ...u) {
|
|
27
|
-
o("warn") && console.warn(n("warn", c), ...u);
|
|
28
|
-
},
|
|
29
|
-
error(c, ...u) {
|
|
30
|
-
o("error") && console.error(n("error", c), ...u);
|
|
31
|
-
},
|
|
32
|
-
configure(c) {
|
|
33
|
-
t = { ...t, ...c };
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
P();
|
|
38
|
-
const $ = y("VC"), D = {
|
|
1
|
+
import { createLogger as v } from "@getmicdrop/svelte-components/utils/logger";
|
|
2
|
+
import { formatDateRaw as U, formatCurrency as q } from "@getmicdrop/svelte-components/utils/formatters";
|
|
3
|
+
const A = v("VC"), E = {
|
|
39
4
|
baseUrl: "https://get-micdrop.com",
|
|
40
5
|
timeout: 3e4,
|
|
41
|
-
|
|
6
|
+
retries: 2,
|
|
7
|
+
retryDelay: 500,
|
|
8
|
+
onError: (e) => A.error("API Error:", e)
|
|
42
9
|
};
|
|
43
|
-
let
|
|
44
|
-
function
|
|
45
|
-
|
|
10
|
+
let h = { ...E };
|
|
11
|
+
function ne(e) {
|
|
12
|
+
h = { ...h, ...e };
|
|
46
13
|
}
|
|
47
|
-
function
|
|
48
|
-
return { ...
|
|
14
|
+
function se() {
|
|
15
|
+
return { ...h };
|
|
49
16
|
}
|
|
50
17
|
function s() {
|
|
51
|
-
return `${
|
|
18
|
+
return `${h.baseUrl}/api/v2/public`;
|
|
52
19
|
}
|
|
53
|
-
function
|
|
54
|
-
return `${
|
|
20
|
+
function ae() {
|
|
21
|
+
return `${h.baseUrl}/api/public`;
|
|
55
22
|
}
|
|
56
|
-
function
|
|
57
|
-
return `${
|
|
23
|
+
function N() {
|
|
24
|
+
return `${h.baseUrl}/api/orders/v2/public`;
|
|
58
25
|
}
|
|
59
|
-
async function
|
|
26
|
+
async function ce() {
|
|
60
27
|
return "";
|
|
61
28
|
}
|
|
62
|
-
|
|
63
|
-
|
|
29
|
+
const O = (e) => new Promise((r) => setTimeout(r, e));
|
|
30
|
+
async function L(e, r, t) {
|
|
31
|
+
const o = (r.method || "GET").toUpperCase(), a = o === "GET" || o === "HEAD" ? t.retries + 1 : 1;
|
|
32
|
+
let c;
|
|
33
|
+
for (let i = 1; i <= a; i++) {
|
|
34
|
+
const m = new AbortController(), $ = setTimeout(() => m.abort(), t.timeout), y = r.signal;
|
|
35
|
+
let _;
|
|
36
|
+
y && (y.aborted ? m.abort() : (_ = () => m.abort(), y.addEventListener("abort", _, { once: !0 })));
|
|
37
|
+
try {
|
|
38
|
+
const u = await fetch(e, { ...r, signal: m.signal });
|
|
39
|
+
if (u.status >= 500 && i < a)
|
|
40
|
+
c = new Error(`HTTP ${u.status}`);
|
|
41
|
+
else
|
|
42
|
+
return u;
|
|
43
|
+
} catch (u) {
|
|
44
|
+
if (c = u, y?.aborted) throw u;
|
|
45
|
+
} finally {
|
|
46
|
+
clearTimeout($), y && _ && y.removeEventListener("abort", _);
|
|
47
|
+
}
|
|
48
|
+
i < a && await O(t.retryDelay * Math.pow(2, i - 1));
|
|
49
|
+
}
|
|
50
|
+
throw c;
|
|
51
|
+
}
|
|
52
|
+
async function ie(e, r) {
|
|
53
|
+
return k("GET", e, void 0, r);
|
|
64
54
|
}
|
|
65
|
-
async function
|
|
66
|
-
return
|
|
55
|
+
async function le(e, r, t) {
|
|
56
|
+
return k("POST", e, r, t);
|
|
67
57
|
}
|
|
68
|
-
async function
|
|
69
|
-
return
|
|
58
|
+
async function ue(e, r, t) {
|
|
59
|
+
return k("PUT", e, r, t);
|
|
70
60
|
}
|
|
71
|
-
async function
|
|
72
|
-
return
|
|
61
|
+
async function de(e, r) {
|
|
62
|
+
return k("DELETE", e, void 0, r);
|
|
73
63
|
}
|
|
74
|
-
async function
|
|
75
|
-
const n = r.startsWith("http") ? r : `${s()}${r}
|
|
64
|
+
async function k(e, r, t, o) {
|
|
65
|
+
const n = r.startsWith("http") ? r : `${s()}${r}`;
|
|
76
66
|
try {
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
67
|
+
const a = await L(
|
|
68
|
+
n,
|
|
69
|
+
{
|
|
70
|
+
method: e,
|
|
71
|
+
headers: {
|
|
72
|
+
"Content-Type": "application/json",
|
|
73
|
+
...o?.headers
|
|
74
|
+
},
|
|
75
|
+
body: t !== void 0 ? JSON.stringify(t) : void 0,
|
|
76
|
+
credentials: "include",
|
|
77
|
+
...o
|
|
82
78
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if (clearTimeout(u), !i.ok) {
|
|
89
|
-
const f = await i.json().catch(() => ({})), C = new Error(
|
|
90
|
-
f.error || f.message || `HTTP ${i.status}`
|
|
91
|
-
);
|
|
92
|
-
return d.onError(C), {
|
|
93
|
-
success: !1,
|
|
94
|
-
error: f.error || f.message || `HTTP ${i.status}`,
|
|
95
|
-
statusCode: i.status
|
|
96
|
-
};
|
|
79
|
+
h
|
|
80
|
+
);
|
|
81
|
+
if (!a.ok) {
|
|
82
|
+
const i = await a.json().catch(() => ({})), m = i.error || i.message || `HTTP ${a.status}`;
|
|
83
|
+
return h.onError(new Error(m)), { success: !1, error: m, statusCode: a.status };
|
|
97
84
|
}
|
|
98
|
-
return {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
clearTimeout(u);
|
|
105
|
-
const h = i instanceof Error ? i.name === "AbortError" ? "Request timed out" : i.message : "Unknown error";
|
|
106
|
-
return d.onError(i instanceof Error ? i : new Error(h)), {
|
|
107
|
-
success: !1,
|
|
108
|
-
error: h
|
|
109
|
-
};
|
|
85
|
+
return { success: !0, data: await a.json(), statusCode: a.status };
|
|
86
|
+
} catch (a) {
|
|
87
|
+
const c = a instanceof Error ? a.name === "AbortError" ? "Request timed out" : a.message : "Unknown error";
|
|
88
|
+
return h.onError(
|
|
89
|
+
a instanceof Error ? a : new Error(c)
|
|
90
|
+
), { success: !1, error: c };
|
|
110
91
|
}
|
|
111
92
|
}
|
|
112
|
-
async function
|
|
93
|
+
async function G(e, r) {
|
|
113
94
|
try {
|
|
114
|
-
const t = await
|
|
115
|
-
|
|
116
|
-
...r
|
|
117
|
-
|
|
95
|
+
const t = await L(
|
|
96
|
+
e,
|
|
97
|
+
{ credentials: "include", ...r },
|
|
98
|
+
h
|
|
99
|
+
);
|
|
118
100
|
if (!t.ok) {
|
|
119
101
|
const o = await t.json().catch(() => ({}));
|
|
120
|
-
return
|
|
102
|
+
return A.error(`API request failed: ${t.status}`, o), null;
|
|
121
103
|
}
|
|
122
104
|
return t.json();
|
|
123
105
|
} catch (t) {
|
|
124
|
-
return
|
|
106
|
+
return A.error("API request error:", t), null;
|
|
125
107
|
}
|
|
126
108
|
}
|
|
127
|
-
const
|
|
128
|
-
async function
|
|
109
|
+
const f = v("VC");
|
|
110
|
+
async function fe(e, r, t) {
|
|
129
111
|
try {
|
|
130
112
|
const o = await fetch(
|
|
131
|
-
`${
|
|
113
|
+
`${N()}/cart/${e}/payment-intent`,
|
|
132
114
|
{
|
|
133
115
|
method: "POST",
|
|
134
116
|
headers: {
|
|
@@ -142,16 +124,16 @@ async function E(e, r, t) {
|
|
|
142
124
|
}
|
|
143
125
|
);
|
|
144
126
|
if (!o.ok) {
|
|
145
|
-
const
|
|
146
|
-
throw
|
|
127
|
+
const a = await o.json().catch(() => ({}));
|
|
128
|
+
throw f.error("Payment intent creation failed:", a), new Error(a.error || "Failed to create payment intent");
|
|
147
129
|
}
|
|
148
130
|
const n = await o.json();
|
|
149
|
-
return
|
|
131
|
+
return f.debug("Payment intent created:", n), n;
|
|
150
132
|
} catch (o) {
|
|
151
|
-
return
|
|
133
|
+
return f.error("createPaymentIntent error:", o), null;
|
|
152
134
|
}
|
|
153
135
|
}
|
|
154
|
-
async function
|
|
136
|
+
async function me(e) {
|
|
155
137
|
try {
|
|
156
138
|
const r = await fetch(
|
|
157
139
|
`${s()}/orders/complete/${e}`,
|
|
@@ -170,10 +152,10 @@ async function W(e) {
|
|
|
170
152
|
error: (await r.json().catch(() => ({}))).error || "Failed to complete reservation"
|
|
171
153
|
};
|
|
172
154
|
} catch (r) {
|
|
173
|
-
return
|
|
155
|
+
return f.error("Error completing reservation:", r), { success: !1, error: "Network error completing reservation" };
|
|
174
156
|
}
|
|
175
157
|
}
|
|
176
|
-
async function
|
|
158
|
+
async function he(e) {
|
|
177
159
|
try {
|
|
178
160
|
const r = await fetch(
|
|
179
161
|
`${s()}/orders/cancel/${e}`,
|
|
@@ -192,10 +174,10 @@ async function O(e) {
|
|
|
192
174
|
error: (await r.json().catch(() => ({}))).error || "Failed to cancel reservation"
|
|
193
175
|
};
|
|
194
176
|
} catch (r) {
|
|
195
|
-
return
|
|
177
|
+
return f.error("Error cancelling reservation:", r), { success: !1, error: "Network error cancelling reservation" };
|
|
196
178
|
}
|
|
197
179
|
}
|
|
198
|
-
async function
|
|
180
|
+
async function ye(e, r) {
|
|
199
181
|
try {
|
|
200
182
|
const t = await fetch(`${s()}/orders/create`, {
|
|
201
183
|
method: "POST",
|
|
@@ -209,20 +191,20 @@ async function G(e, r) {
|
|
|
209
191
|
});
|
|
210
192
|
if (!t.ok) {
|
|
211
193
|
const o = await t.json().catch(() => ({}));
|
|
212
|
-
return
|
|
194
|
+
return f.error("Create order failed:", o), null;
|
|
213
195
|
}
|
|
214
196
|
return t.json();
|
|
215
197
|
} catch (t) {
|
|
216
|
-
return
|
|
198
|
+
return f.error("createOrder error:", t), null;
|
|
217
199
|
}
|
|
218
200
|
}
|
|
219
|
-
async function
|
|
220
|
-
return
|
|
201
|
+
async function ge(e) {
|
|
202
|
+
return G(`${s()}/orders/${e}`);
|
|
221
203
|
}
|
|
222
|
-
async function
|
|
204
|
+
async function we(e, r) {
|
|
223
205
|
try {
|
|
224
206
|
const t = await fetch(
|
|
225
|
-
`${
|
|
207
|
+
`${N()}/validatePaymentIntent/${e}`,
|
|
226
208
|
{
|
|
227
209
|
method: "POST",
|
|
228
210
|
headers: {
|
|
@@ -233,7 +215,7 @@ async function K(e, r) {
|
|
|
233
215
|
);
|
|
234
216
|
if (!t.ok) {
|
|
235
217
|
const n = await t.json().catch(() => ({}));
|
|
236
|
-
return
|
|
218
|
+
return f.error("Payment validation failed:", n), {
|
|
237
219
|
success: !1,
|
|
238
220
|
status: "failed",
|
|
239
221
|
error: n.error || "Payment validation failed"
|
|
@@ -246,10 +228,10 @@ async function K(e, r) {
|
|
|
246
228
|
orderUUID: o.orderUUID || o.uuid
|
|
247
229
|
};
|
|
248
230
|
} catch (t) {
|
|
249
|
-
return
|
|
231
|
+
return f.error("validatePaymentIntent error:", t), null;
|
|
250
232
|
}
|
|
251
233
|
}
|
|
252
|
-
async function
|
|
234
|
+
async function _e(e) {
|
|
253
235
|
try {
|
|
254
236
|
const r = await fetch(`${s()}/orders/extend-session`, {
|
|
255
237
|
method: "POST",
|
|
@@ -270,10 +252,10 @@ async function X(e) {
|
|
|
270
252
|
remainingExtensions: t.remainingExtensions
|
|
271
253
|
};
|
|
272
254
|
} catch (r) {
|
|
273
|
-
return
|
|
255
|
+
return f.error("Error extending checkout session:", r), { success: !1, error: "Network error extending session" };
|
|
274
256
|
}
|
|
275
257
|
}
|
|
276
|
-
async function
|
|
258
|
+
async function ve(e) {
|
|
277
259
|
try {
|
|
278
260
|
const r = await fetch(
|
|
279
261
|
`${s()}/orders/session/${e}`
|
|
@@ -289,10 +271,10 @@ async function Y(e) {
|
|
|
289
271
|
reservationCount: t.reservationCount
|
|
290
272
|
};
|
|
291
273
|
} catch (r) {
|
|
292
|
-
return
|
|
274
|
+
return f.error("Error getting session status:", r), { error: "Network error getting session status" };
|
|
293
275
|
}
|
|
294
276
|
}
|
|
295
|
-
async function
|
|
277
|
+
async function $e(e = {}) {
|
|
296
278
|
try {
|
|
297
279
|
const r = await fetch(`${s()}/orders/create`, {
|
|
298
280
|
method: "POST",
|
|
@@ -303,14 +285,14 @@ async function Z(e = {}) {
|
|
|
303
285
|
});
|
|
304
286
|
if (!r.ok) {
|
|
305
287
|
const o = await r.json().catch(() => ({}));
|
|
306
|
-
return
|
|
288
|
+
return f.error("Order initiation failed:", o), null;
|
|
307
289
|
}
|
|
308
290
|
return (await r.json()).uuid;
|
|
309
291
|
} catch (r) {
|
|
310
|
-
return
|
|
292
|
+
return f.error("initiateOrder error:", r), null;
|
|
311
293
|
}
|
|
312
294
|
}
|
|
313
|
-
async function
|
|
295
|
+
async function Pe(e) {
|
|
314
296
|
if (typeof window > "u") return;
|
|
315
297
|
const t = new URLSearchParams(window.location.search).get("utm_source") || "Direct";
|
|
316
298
|
try {
|
|
@@ -318,11 +300,11 @@ async function V(e) {
|
|
|
318
300
|
`${s()}/utm/${e}/${encodeURIComponent(t)}`
|
|
319
301
|
);
|
|
320
302
|
} catch (o) {
|
|
321
|
-
|
|
303
|
+
f.error("UTM tracking failed:", o);
|
|
322
304
|
}
|
|
323
305
|
}
|
|
324
|
-
const
|
|
325
|
-
async function
|
|
306
|
+
const j = v("VC");
|
|
307
|
+
async function Ce(e, r) {
|
|
326
308
|
try {
|
|
327
309
|
if (!r || !r.trim())
|
|
328
310
|
return { valid: !1, error: "Promo code is required" };
|
|
@@ -342,20 +324,20 @@ async function ee(e, r) {
|
|
|
342
324
|
code: n.code || r
|
|
343
325
|
};
|
|
344
326
|
} catch (t) {
|
|
345
|
-
return
|
|
327
|
+
return j.error("Error validating promo code:", t), { valid: !1, error: "Network error validating code" };
|
|
346
328
|
}
|
|
347
329
|
}
|
|
348
|
-
async function
|
|
330
|
+
async function be(e) {
|
|
349
331
|
try {
|
|
350
332
|
const r = await fetch(
|
|
351
333
|
`${s()}/promo-codes/check/${e}`
|
|
352
334
|
);
|
|
353
335
|
return r.ok ? (await r.json()).hasPromoCodes === !0 : !0;
|
|
354
336
|
} catch (r) {
|
|
355
|
-
return
|
|
337
|
+
return j.error("Error checking promo codes availability:", r), !0;
|
|
356
338
|
}
|
|
357
339
|
}
|
|
358
|
-
async function
|
|
340
|
+
async function pe(e, r) {
|
|
359
341
|
try {
|
|
360
342
|
const t = await fetch(
|
|
361
343
|
`${s()}/orders/${e}/apply-promo`,
|
|
@@ -372,10 +354,10 @@ async function te(e, r) {
|
|
|
372
354
|
error: (await t.json().catch(() => ({}))).error || "Failed to apply promo code"
|
|
373
355
|
};
|
|
374
356
|
} catch (t) {
|
|
375
|
-
return
|
|
357
|
+
return j.error("Error applying promo code:", t), { success: !1, error: "Network error applying code" };
|
|
376
358
|
}
|
|
377
359
|
}
|
|
378
|
-
async function
|
|
360
|
+
async function Se(e) {
|
|
379
361
|
try {
|
|
380
362
|
const r = await fetch(
|
|
381
363
|
`${s()}/orders/${e}/remove-promo`,
|
|
@@ -391,21 +373,31 @@ async function oe(e) {
|
|
|
391
373
|
error: (await r.json().catch(() => ({}))).error || "Failed to remove promo code"
|
|
392
374
|
};
|
|
393
375
|
} catch (r) {
|
|
394
|
-
return
|
|
376
|
+
return j.error("Error removing promo code:", r), { success: !1, error: "Network error removing code" };
|
|
395
377
|
}
|
|
396
378
|
}
|
|
397
|
-
const
|
|
398
|
-
async function
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
return t.json();
|
|
404
|
-
} catch (t) {
|
|
405
|
-
return a.error("Error fetching event details:", t), null;
|
|
379
|
+
const l = v("VC"), D = /* @__PURE__ */ new Map();
|
|
380
|
+
async function De(e, r = fetch) {
|
|
381
|
+
const t = String(e);
|
|
382
|
+
if (r === fetch) {
|
|
383
|
+
const n = D.get(t);
|
|
384
|
+
if (n) return n;
|
|
406
385
|
}
|
|
386
|
+
const o = (async () => {
|
|
387
|
+
try {
|
|
388
|
+
const n = await r(`${s()}/events/${e}`);
|
|
389
|
+
if (!n.ok)
|
|
390
|
+
throw new Error(`Failed to fetch event details: ${n.status}`);
|
|
391
|
+
return await n.json();
|
|
392
|
+
} catch (n) {
|
|
393
|
+
return l.error("Error fetching event details:", n), null;
|
|
394
|
+
}
|
|
395
|
+
})();
|
|
396
|
+
return r === fetch && (D.set(t, o), o.finally(() => {
|
|
397
|
+
D.get(t) === o && D.delete(t);
|
|
398
|
+
})), o;
|
|
407
399
|
}
|
|
408
|
-
async function
|
|
400
|
+
async function ke(e) {
|
|
409
401
|
try {
|
|
410
402
|
const r = await fetch(
|
|
411
403
|
`${s()}/tickets/event/${e}`
|
|
@@ -415,18 +407,18 @@ async function se(e) {
|
|
|
415
407
|
const t = await r.json();
|
|
416
408
|
return Array.isArray(t) ? t : [];
|
|
417
409
|
} catch (r) {
|
|
418
|
-
return
|
|
410
|
+
return l.error("Error fetching tickets:", r), [];
|
|
419
411
|
}
|
|
420
412
|
}
|
|
421
|
-
async function
|
|
413
|
+
async function je(e) {
|
|
422
414
|
try {
|
|
423
415
|
if (!e)
|
|
424
|
-
return
|
|
416
|
+
return l.warn("fetchEventPerformers called without eventId"), { performers: [], showPerformers: !1 };
|
|
425
417
|
const r = await fetch(
|
|
426
418
|
`${s()}/events/${e}/performers`
|
|
427
419
|
);
|
|
428
420
|
if (!r.ok)
|
|
429
|
-
return
|
|
421
|
+
return l.error(
|
|
430
422
|
`Failed to fetch performers: ${r.status} ${r.statusText}`
|
|
431
423
|
), { performers: [], showPerformers: !1 };
|
|
432
424
|
const t = await r.json();
|
|
@@ -435,90 +427,90 @@ async function ae(e) {
|
|
|
435
427
|
showPerformers: t.showPerformers === !0
|
|
436
428
|
};
|
|
437
429
|
} catch (r) {
|
|
438
|
-
return
|
|
430
|
+
return l.error("Error fetching event performers:", r), { performers: [], showPerformers: !1 };
|
|
439
431
|
}
|
|
440
432
|
}
|
|
441
|
-
async function
|
|
433
|
+
async function Ae(e) {
|
|
442
434
|
try {
|
|
443
435
|
if (!e)
|
|
444
|
-
return
|
|
436
|
+
return l.warn("fetchAllVenues called without orgId"), [];
|
|
445
437
|
const r = await fetch(
|
|
446
438
|
`${s()}/venues/organization/${e}`
|
|
447
439
|
);
|
|
448
440
|
if (!r.ok)
|
|
449
|
-
return
|
|
441
|
+
return l.error(
|
|
450
442
|
`Failed to fetch venues: ${r.status} ${r.statusText}`
|
|
451
443
|
), [];
|
|
452
444
|
const t = await r.json();
|
|
453
445
|
return Array.isArray(t) ? t : [];
|
|
454
446
|
} catch (r) {
|
|
455
|
-
return
|
|
447
|
+
return l.error("Error fetching venues:", r), [];
|
|
456
448
|
}
|
|
457
449
|
}
|
|
458
|
-
async function
|
|
450
|
+
async function Ie(e) {
|
|
459
451
|
try {
|
|
460
452
|
if (!e)
|
|
461
|
-
return
|
|
453
|
+
return l.warn("fetchVenueEvents called without venueId"), [];
|
|
462
454
|
const r = await fetch(
|
|
463
455
|
`${s()}/events/venue/${e}`
|
|
464
456
|
);
|
|
465
457
|
if (!r.ok)
|
|
466
|
-
return
|
|
458
|
+
return l.error(
|
|
467
459
|
`Failed to fetch venue events: ${r.status} ${r.statusText}`
|
|
468
460
|
), [];
|
|
469
461
|
const t = await r.json();
|
|
470
462
|
return Array.isArray(t) ? t : [];
|
|
471
463
|
} catch (r) {
|
|
472
|
-
return
|
|
464
|
+
return l.error("Error fetching venue events:", r), [];
|
|
473
465
|
}
|
|
474
466
|
}
|
|
475
|
-
async function
|
|
467
|
+
async function Ne(e, r, t) {
|
|
476
468
|
try {
|
|
477
469
|
const o = await fetch(
|
|
478
470
|
`${s()}/events/venue/${e}/month/${r}/${t}`
|
|
479
471
|
);
|
|
480
472
|
if (!o.ok)
|
|
481
|
-
return
|
|
473
|
+
return l.error(`Failed to fetch month events: ${o.status}`), [];
|
|
482
474
|
const n = await o.json();
|
|
483
475
|
return Array.isArray(n.events) ? n.events : Array.isArray(n) ? n : [];
|
|
484
476
|
} catch (o) {
|
|
485
|
-
return
|
|
477
|
+
return l.error("Error fetching month events:", o), [];
|
|
486
478
|
}
|
|
487
479
|
}
|
|
488
|
-
async function
|
|
480
|
+
async function xe(e, r, t) {
|
|
489
481
|
try {
|
|
490
482
|
const o = await fetch(
|
|
491
483
|
`${s()}/events/organization/${e}/month/${r}/${t}`
|
|
492
484
|
);
|
|
493
485
|
if (!o.ok)
|
|
494
|
-
return
|
|
486
|
+
return l.error(`Failed to fetch org month events: ${o.status}`), [];
|
|
495
487
|
const n = await o.json();
|
|
496
488
|
return Array.isArray(n.events) ? n.events : Array.isArray(n) ? n : [];
|
|
497
489
|
} catch (o) {
|
|
498
|
-
return
|
|
490
|
+
return l.error("Error fetching org month events:", o), [];
|
|
499
491
|
}
|
|
500
492
|
}
|
|
501
|
-
async function
|
|
493
|
+
async function Fe(e) {
|
|
502
494
|
try {
|
|
503
495
|
const r = await fetch(
|
|
504
496
|
`${s()}/series/${e}/occurrences`
|
|
505
497
|
);
|
|
506
|
-
return r.ok ? r.json() : (
|
|
498
|
+
return r.ok ? r.json() : (l.error(`Failed to fetch series occurrences: ${r.status}`), null);
|
|
507
499
|
} catch (r) {
|
|
508
|
-
return
|
|
500
|
+
return l.error("Error fetching series occurrences:", r), null;
|
|
509
501
|
}
|
|
510
502
|
}
|
|
511
|
-
async function
|
|
503
|
+
async function Te(e, r) {
|
|
512
504
|
try {
|
|
513
505
|
const t = await fetch(
|
|
514
506
|
`${s()}/series/${e}/occurrences?venueId=${r}`
|
|
515
507
|
);
|
|
516
|
-
return t.ok ? t.json() : (
|
|
508
|
+
return t.ok ? t.json() : (l.error(`Failed to fetch series with CTA: ${t.status}`), null);
|
|
517
509
|
} catch (t) {
|
|
518
|
-
return
|
|
510
|
+
return l.error("Error fetching series occurrences:", t), null;
|
|
519
511
|
}
|
|
520
512
|
}
|
|
521
|
-
async function
|
|
513
|
+
async function Ue(e) {
|
|
522
514
|
try {
|
|
523
515
|
const r = await fetch(
|
|
524
516
|
`${s()}/series/${e}/page`
|
|
@@ -527,79 +519,309 @@ async function me(e) {
|
|
|
527
519
|
throw new Error(`Failed to fetch series page: ${r.status}`);
|
|
528
520
|
return r.json();
|
|
529
521
|
} catch (r) {
|
|
530
|
-
return
|
|
522
|
+
return l.error("Error fetching series page:", r), null;
|
|
531
523
|
}
|
|
532
524
|
}
|
|
533
|
-
async function
|
|
525
|
+
async function Re(e, r) {
|
|
534
526
|
try {
|
|
535
527
|
const t = r ? `${s()}/collections/${e}/public?password=${encodeURIComponent(r)}` : `${s()}/collections/${e}/public`, o = await fetch(t);
|
|
536
528
|
if (!o.ok)
|
|
537
529
|
throw new Error(`Failed to fetch collection: ${o.status}`);
|
|
538
530
|
return o.json();
|
|
539
531
|
} catch (t) {
|
|
540
|
-
return
|
|
532
|
+
return l.error("Error fetching collection:", t), null;
|
|
541
533
|
}
|
|
542
534
|
}
|
|
543
|
-
async function
|
|
535
|
+
async function Le(e, r) {
|
|
544
536
|
try {
|
|
545
537
|
const t = encodeURIComponent(r), o = await fetch(
|
|
546
538
|
`${s()}/collections/${e}/check-password/${t}`
|
|
547
539
|
);
|
|
548
540
|
return o.ok ? (await o.json()).valid === !0 : !1;
|
|
549
541
|
} catch (t) {
|
|
550
|
-
return
|
|
542
|
+
return l.error("Error checking collection password:", t), !1;
|
|
551
543
|
}
|
|
552
544
|
}
|
|
553
|
-
async function
|
|
545
|
+
async function qe(e, r) {
|
|
554
546
|
try {
|
|
555
|
-
const t =
|
|
556
|
-
`${s()}/events/${e}/check-password
|
|
547
|
+
const t = await fetch(
|
|
548
|
+
`${s()}/events/${e}/check-password`,
|
|
549
|
+
{
|
|
550
|
+
method: "POST",
|
|
551
|
+
headers: { "Content-Type": "application/json" },
|
|
552
|
+
body: JSON.stringify({ password: r })
|
|
553
|
+
}
|
|
557
554
|
);
|
|
558
|
-
|
|
555
|
+
if (!t.ok) return { valid: !1 };
|
|
556
|
+
const o = await t.json();
|
|
557
|
+
return typeof o == "boolean" ? { valid: o } : { valid: o.valid === !0 || o === !0 };
|
|
559
558
|
} catch (t) {
|
|
560
|
-
return
|
|
559
|
+
return l.error("Error checking event password:", t), { valid: !1 };
|
|
561
560
|
}
|
|
562
561
|
}
|
|
563
|
-
async function
|
|
562
|
+
async function Ee(e, r) {
|
|
564
563
|
try {
|
|
565
564
|
const t = r ? `${s()}/events/venue/${r}` : e ? `${s()}/venues/organization/${e}` : `${s()}/health`;
|
|
566
565
|
return (await fetch(t, {
|
|
567
566
|
method: "HEAD"
|
|
568
567
|
})).ok;
|
|
569
568
|
} catch (t) {
|
|
570
|
-
return
|
|
569
|
+
return l.error("Network connection test failed:", t), !1;
|
|
571
570
|
}
|
|
572
571
|
}
|
|
573
|
-
const
|
|
574
|
-
async function
|
|
572
|
+
const C = v("VC");
|
|
573
|
+
async function z(e) {
|
|
575
574
|
try {
|
|
576
575
|
if (!e)
|
|
577
|
-
return
|
|
576
|
+
return C.warn("getVenue called without venueId"), null;
|
|
578
577
|
const r = await fetch(`${s()}/venues/${e}`);
|
|
579
|
-
return r.ok ? r.json() : (
|
|
578
|
+
return r.ok ? r.json() : (C.error(`Failed to fetch venue: ${r.status}`), null);
|
|
580
579
|
} catch (r) {
|
|
581
|
-
return
|
|
580
|
+
return C.error("Error fetching venue:", r), null;
|
|
582
581
|
}
|
|
583
582
|
}
|
|
584
|
-
async function
|
|
585
|
-
const r = await
|
|
583
|
+
async function Oe(e) {
|
|
584
|
+
const r = await z(e);
|
|
586
585
|
return r ? {
|
|
587
586
|
serviceFeePercentage: r.serviceFeePercentage ?? 0,
|
|
588
587
|
serviceFeeCents: r.serviceFeeCents ?? 0,
|
|
589
588
|
taxPercentage: r.taxPercentage ?? 0
|
|
590
589
|
} : null;
|
|
591
590
|
}
|
|
592
|
-
async function
|
|
591
|
+
async function Ge(e) {
|
|
593
592
|
try {
|
|
594
593
|
if (!e)
|
|
595
|
-
return
|
|
594
|
+
return C.warn("getVenueBySlug called without slug"), null;
|
|
596
595
|
const r = encodeURIComponent(e), t = await fetch(`${s()}/venues/slug/${r}`);
|
|
597
|
-
return t.ok ? t.json() : (
|
|
596
|
+
return t.ok ? t.json() : (C.error(`Failed to fetch venue by slug: ${t.status}`), null);
|
|
598
597
|
} catch (r) {
|
|
599
|
-
return
|
|
598
|
+
return C.error("Error fetching venue by slug:", r), null;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
const g = v("VC"), B = "https://get-micdrop.com", J = `${B}/api/orders/v2`, x = () => N();
|
|
602
|
+
async function ze(e) {
|
|
603
|
+
try {
|
|
604
|
+
const r = await fetch(
|
|
605
|
+
`${J}/gift-cards`,
|
|
606
|
+
{
|
|
607
|
+
method: "POST",
|
|
608
|
+
headers: { "Content-Type": "application/json" },
|
|
609
|
+
body: JSON.stringify(e)
|
|
610
|
+
}
|
|
611
|
+
);
|
|
612
|
+
if (!r.ok) {
|
|
613
|
+
const o = await r.json().catch(() => ({}));
|
|
614
|
+
throw g.error("Gift card purchase creation failed:", o), new Error(o.error || "Failed to create gift card purchase");
|
|
615
|
+
}
|
|
616
|
+
const t = await r.json();
|
|
617
|
+
return g.debug("Gift card purchase created:", t), t;
|
|
618
|
+
} catch (r) {
|
|
619
|
+
return g.error("Gift card purchase creation error:", r), null;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
async function Be(e, r) {
|
|
623
|
+
try {
|
|
624
|
+
const t = await fetch(`${x()}/cart/${e}/apply-gift-card`, {
|
|
625
|
+
method: "POST",
|
|
626
|
+
headers: { "Content-Type": "application/json" },
|
|
627
|
+
body: JSON.stringify({ giftCardCode: r })
|
|
628
|
+
});
|
|
629
|
+
if (!t.ok) {
|
|
630
|
+
if (t.status === 429)
|
|
631
|
+
return {
|
|
632
|
+
valid: !1,
|
|
633
|
+
error: "Too many attempts. Please wait a moment and try again."
|
|
634
|
+
};
|
|
635
|
+
const n = await t.json().catch(() => ({}));
|
|
636
|
+
return g.error("Apply gift card failed:", n), { valid: !1, error: n.error || "Invalid gift card code" };
|
|
637
|
+
}
|
|
638
|
+
const o = await t.json();
|
|
639
|
+
return {
|
|
640
|
+
valid: !0,
|
|
641
|
+
giftCardCode: o.giftCardCode,
|
|
642
|
+
giftCardAmount: o.giftCardAmount,
|
|
643
|
+
giftCardBalance: o.giftCardBalance,
|
|
644
|
+
paymentType: o.paymentType,
|
|
645
|
+
stripeAmount: o.stripeAmount,
|
|
646
|
+
orderTotal: o.orderTotal,
|
|
647
|
+
requiresStripe: o.requiresStripe
|
|
648
|
+
};
|
|
649
|
+
} catch (t) {
|
|
650
|
+
return g.error("applyGiftCard error:", t), {
|
|
651
|
+
valid: !1,
|
|
652
|
+
error: "Network error. Please check your connection and try again."
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
async function Je(e) {
|
|
657
|
+
try {
|
|
658
|
+
const r = await fetch(`${x()}/cart/${e}/gift-card`, {
|
|
659
|
+
method: "DELETE",
|
|
660
|
+
headers: { "Content-Type": "application/json" }
|
|
661
|
+
});
|
|
662
|
+
if (!r.ok) {
|
|
663
|
+
const t = await r.json().catch(() => ({}));
|
|
664
|
+
return g.error("Remove gift card failed:", t), { success: !1, error: t.error || "Failed to remove gift card" };
|
|
665
|
+
}
|
|
666
|
+
return { success: !0 };
|
|
667
|
+
} catch (r) {
|
|
668
|
+
return g.error("removeGiftCard error:", r), {
|
|
669
|
+
success: !1,
|
|
670
|
+
error: "Network error. Please check your connection and try again."
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
async function Me(e, r) {
|
|
675
|
+
try {
|
|
676
|
+
const t = await fetch(
|
|
677
|
+
`${x()}/cart/${e}/complete-gift-card-payment`,
|
|
678
|
+
{
|
|
679
|
+
method: "POST",
|
|
680
|
+
headers: { "Content-Type": "application/json" },
|
|
681
|
+
body: JSON.stringify({
|
|
682
|
+
firstName: r.firstName,
|
|
683
|
+
lastName: r.lastName,
|
|
684
|
+
email: r.email,
|
|
685
|
+
phoneNumber: r.phoneNumber || null,
|
|
686
|
+
mailingList: r.mailingList || !1
|
|
687
|
+
})
|
|
688
|
+
}
|
|
689
|
+
);
|
|
690
|
+
if (!t.ok) {
|
|
691
|
+
const n = await t.json().catch(() => ({}));
|
|
692
|
+
return g.error("Complete gift card payment failed:", n), { success: !1, error: n.error || "Failed to complete payment" };
|
|
693
|
+
}
|
|
694
|
+
const o = await t.json();
|
|
695
|
+
return {
|
|
696
|
+
success: !0,
|
|
697
|
+
orderId: o.orderId,
|
|
698
|
+
confirmationNumber: o.confirmationNumber
|
|
699
|
+
};
|
|
700
|
+
} catch (t) {
|
|
701
|
+
return g.error("completeGiftCardPayment error:", t), {
|
|
702
|
+
success: !1,
|
|
703
|
+
error: "Network error. Please check your connection and try again."
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
const I = v("VC"), M = {
|
|
708
|
+
waitlist_not_enabled: "Waitlist is not available for this event",
|
|
709
|
+
event_not_found: "Event not found",
|
|
710
|
+
invalid_phone: "Please enter a valid phone number",
|
|
711
|
+
already_purchased: "You have already purchased tickets for this event",
|
|
712
|
+
phone_already_registered: "This phone number is already on the waitlist"
|
|
713
|
+
};
|
|
714
|
+
async function We(e, r, t = null, o = !1) {
|
|
715
|
+
try {
|
|
716
|
+
const n = { email: r };
|
|
717
|
+
t && o && (n.phone = t, n.smsOptIn = !0);
|
|
718
|
+
const a = await fetch(`${s()}/events/${e}/waitlist`, {
|
|
719
|
+
method: "POST",
|
|
720
|
+
headers: { "Content-Type": "application/json" },
|
|
721
|
+
body: JSON.stringify(n)
|
|
722
|
+
});
|
|
723
|
+
if (!a.ok) {
|
|
724
|
+
const i = await a.json().catch(() => ({}));
|
|
725
|
+
return I.error("Join waitlist failed:", i), {
|
|
726
|
+
success: !1,
|
|
727
|
+
error: M[i.error] || "Failed to join waitlist. Please try again."
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
const c = await a.json();
|
|
731
|
+
return {
|
|
732
|
+
success: !0,
|
|
733
|
+
position: c.position,
|
|
734
|
+
updated: c.updated
|
|
735
|
+
};
|
|
736
|
+
} catch (n) {
|
|
737
|
+
return I.error("joinWaitlist error:", n), {
|
|
738
|
+
success: !1,
|
|
739
|
+
error: "Network error. Please check your connection and try again."
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
async function He(e, r) {
|
|
744
|
+
try {
|
|
745
|
+
const t = await fetch(
|
|
746
|
+
`${s()}/events/${e}/waitlist/position?email=${encodeURIComponent(r)}`
|
|
747
|
+
);
|
|
748
|
+
return t.ok ? { position: (await t.json()).position } : t.status === 404 ? { position: null } : { position: null, error: "Failed to check position" };
|
|
749
|
+
} catch (t) {
|
|
750
|
+
return I.error("getWaitlistPosition error:", t), { position: null, error: "Network error" };
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
function Qe(e, r, t = {}) {
|
|
754
|
+
const {
|
|
755
|
+
cancelled: o = !1,
|
|
756
|
+
isRegistration: n = !1,
|
|
757
|
+
waitlistEnabled: a = !1
|
|
758
|
+
} = t, c = /* @__PURE__ */ new Date();
|
|
759
|
+
if (o)
|
|
760
|
+
return { text: "Cancelled", disabled: !0, reason: "cancelled" };
|
|
761
|
+
const i = e.endDateTime || e.startDateTime;
|
|
762
|
+
if (i && new Date(i) < c)
|
|
763
|
+
return { text: "Sales ended", disabled: !0, reason: "event_past" };
|
|
764
|
+
const m = (r || []).filter((d) => d.salesChannel !== 2);
|
|
765
|
+
if (m.length === 0)
|
|
766
|
+
return {
|
|
767
|
+
text: "No tickets available",
|
|
768
|
+
disabled: !0,
|
|
769
|
+
reason: "no_tickets"
|
|
770
|
+
};
|
|
771
|
+
let $ = !1, y = !0, _ = !0, u = null;
|
|
772
|
+
for (const d of m) {
|
|
773
|
+
const P = d.salesBegin || d.salesStart || d.saleBegin || d.onSaleStart, S = d.salesEnd || d.saleEnd || d.onSaleEnd, w = d.remainingCapacity ?? d.quantityRemaining ?? d.quantity, b = d.soldOut || w != null && w <= 0, p = P ? new Date(P) > c : !1, F = S ? new Date(S) < c : !1;
|
|
774
|
+
if (!b && !p && !F && ($ = !0), b || (y = !1), p || (_ = !1), p && P && !b && !F) {
|
|
775
|
+
const T = new Date(P);
|
|
776
|
+
(!u || T < u) && (u = T);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
if ($)
|
|
780
|
+
return {
|
|
781
|
+
text: n ? "Reserve a spot" : "Get tickets",
|
|
782
|
+
disabled: !1,
|
|
783
|
+
reason: "available"
|
|
784
|
+
};
|
|
785
|
+
if (_ && u) {
|
|
786
|
+
const d = u.getTime() - c.getTime(), P = d / (1e3 * 60 * 60), S = d / (1e3 * 60 * 60 * 24);
|
|
787
|
+
let w;
|
|
788
|
+
if (P < 24)
|
|
789
|
+
w = u.toLocaleTimeString("en-US", {
|
|
790
|
+
hour: "numeric",
|
|
791
|
+
minute: "2-digit",
|
|
792
|
+
hour12: !0
|
|
793
|
+
});
|
|
794
|
+
else if (S <= 7)
|
|
795
|
+
w = U(
|
|
796
|
+
u,
|
|
797
|
+
{ weekday: "short", hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
798
|
+
"en-US"
|
|
799
|
+
);
|
|
800
|
+
else {
|
|
801
|
+
const b = U(
|
|
802
|
+
u,
|
|
803
|
+
{ month: "short", day: "numeric" },
|
|
804
|
+
"en-US"
|
|
805
|
+
), p = u.toLocaleTimeString("en-US", {
|
|
806
|
+
hour: "numeric",
|
|
807
|
+
minute: "2-digit",
|
|
808
|
+
hour12: !0
|
|
809
|
+
});
|
|
810
|
+
w = `${b} ${p}`;
|
|
811
|
+
}
|
|
812
|
+
return {
|
|
813
|
+
text: `On sale ${w}`,
|
|
814
|
+
disabled: !0,
|
|
815
|
+
reason: "coming_soon"
|
|
816
|
+
};
|
|
600
817
|
}
|
|
818
|
+
return y ? a ? {
|
|
819
|
+
text: "Join Waitlist",
|
|
820
|
+
disabled: !1,
|
|
821
|
+
reason: "sold_out_waitlist"
|
|
822
|
+
} : { text: "Sold out", disabled: !0, reason: "sold_out" } : { text: "Sales ended", disabled: !0, reason: "sales_ended" };
|
|
601
823
|
}
|
|
602
|
-
function
|
|
824
|
+
function W(e) {
|
|
603
825
|
return {
|
|
604
826
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
605
827
|
id: e.id || e.ID,
|
|
@@ -616,7 +838,7 @@ function j(e) {
|
|
|
616
838
|
checkedInAt: e.checkedInAt || e.checked_in_at
|
|
617
839
|
};
|
|
618
840
|
}
|
|
619
|
-
function
|
|
841
|
+
function H(e) {
|
|
620
842
|
const r = e.purchasedTickets || e.tickets || e.purchased_tickets || [];
|
|
621
843
|
return {
|
|
622
844
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
@@ -632,33 +854,36 @@ function k(e) {
|
|
|
632
854
|
discount: e.discount || 0,
|
|
633
855
|
paymentIntentId: e.paymentIntentId || e.payment_intent_id,
|
|
634
856
|
paymentMethod: e.paymentMethod || e.payment_method,
|
|
635
|
-
purchasedTickets: r.map(
|
|
857
|
+
purchasedTickets: r.map(W),
|
|
636
858
|
createdAt: e.createdAt || e.created_at,
|
|
637
859
|
updatedAt: e.updatedAt || e.updated_at
|
|
638
860
|
};
|
|
639
861
|
}
|
|
640
|
-
function
|
|
641
|
-
const r =
|
|
862
|
+
function Ye(e) {
|
|
863
|
+
const r = H(e), t = r.uuid.split("-")[0] || r.uuid;
|
|
642
864
|
return {
|
|
643
865
|
orderId: r.uuid,
|
|
644
866
|
displayOrderId: t,
|
|
645
867
|
email: r.customerEmail,
|
|
646
868
|
customerName: [r.customerFirstName, r.customerLastName].filter(Boolean).join(" "),
|
|
647
869
|
total: r.totalAmount,
|
|
648
|
-
formattedTotal:
|
|
870
|
+
formattedTotal: `${q(
|
|
871
|
+
r.totalAmount / 100
|
|
872
|
+
/* FIXME(canonical-cleanup:toFixed): this cast bypasses the brand boundary; replace with toCents/toUSD at the API-response-transform layer. */
|
|
873
|
+
)}`,
|
|
649
874
|
ticketCount: r.purchasedTickets.length,
|
|
650
875
|
status: r.status
|
|
651
876
|
};
|
|
652
877
|
}
|
|
653
|
-
const
|
|
654
|
-
function
|
|
655
|
-
return e ? e.startsWith("http") ? e : `${
|
|
878
|
+
const Q = "https://micdrop-images.sfo3.digitaloceanspaces.com";
|
|
879
|
+
function Y(e) {
|
|
880
|
+
return e ? e.startsWith("http") ? e : `${Q}/${e.replace(/^\//, "")}` : "";
|
|
656
881
|
}
|
|
657
|
-
function
|
|
882
|
+
function R(e) {
|
|
658
883
|
const r = e.imageUrl || e.imageURL || e.image_url || e.image || "";
|
|
659
|
-
return
|
|
884
|
+
return Y(r);
|
|
660
885
|
}
|
|
661
|
-
function
|
|
886
|
+
function K(e) {
|
|
662
887
|
const r = e.ctaState || e.cta_state;
|
|
663
888
|
if (r)
|
|
664
889
|
return r;
|
|
@@ -666,20 +891,20 @@ function S(e) {
|
|
|
666
891
|
return "ended";
|
|
667
892
|
const t = e.startDateTime || e.start_date_time || e.date;
|
|
668
893
|
if (t) {
|
|
669
|
-
const
|
|
670
|
-
if (
|
|
894
|
+
const c = new Date(t).getTime(), i = Date.now();
|
|
895
|
+
if (c < i)
|
|
671
896
|
return "ended";
|
|
672
897
|
}
|
|
673
898
|
const o = e.ticketsAvailable ?? e.tickets_available;
|
|
674
899
|
if (o !== void 0)
|
|
675
900
|
return o <= 0 ? "sold_out" : "available";
|
|
676
901
|
const n = e.availableTickets || e.available_tickets || e.tickets || [];
|
|
677
|
-
return n.length === 0 ? "coming_soon" : n.reduce((
|
|
678
|
-
const
|
|
679
|
-
return
|
|
902
|
+
return n.length === 0 ? "coming_soon" : n.reduce((c, i) => {
|
|
903
|
+
const m = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0, $ = i.quantitySold ?? i.quantity_sold ?? 0;
|
|
904
|
+
return c + Math.max(0, m - $);
|
|
680
905
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
681
906
|
}
|
|
682
|
-
function
|
|
907
|
+
function X(e) {
|
|
683
908
|
return {
|
|
684
909
|
id: e.id || e.ID,
|
|
685
910
|
name: e.name || e.ticketName || "",
|
|
@@ -699,8 +924,8 @@ function F(e) {
|
|
|
699
924
|
sortOrder: e.sortOrder || e.sort_order || 0
|
|
700
925
|
};
|
|
701
926
|
}
|
|
702
|
-
function
|
|
703
|
-
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(
|
|
927
|
+
function Z(e) {
|
|
928
|
+
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(X), o = t.map((c) => c.price).filter((c) => c > 0), n = o.length > 0 ? Math.min(...o) : void 0, a = o.length > 0 ? Math.max(...o) : void 0;
|
|
704
929
|
return {
|
|
705
930
|
eventID: e.eventID || e.id || e.ID || 0,
|
|
706
931
|
id: e.id || e.ID,
|
|
@@ -717,28 +942,28 @@ function U(e) {
|
|
|
717
942
|
venueName: e.venueName || e.venue_name,
|
|
718
943
|
venueAddress: e.venueAddress || e.venue_address,
|
|
719
944
|
location: e.location || e.venueAddress || e.venue_address,
|
|
720
|
-
imageUrl:
|
|
721
|
-
imageURL:
|
|
945
|
+
imageUrl: R(e),
|
|
946
|
+
imageURL: R(e),
|
|
722
947
|
status: e.status,
|
|
723
948
|
isPublished: e.isPublished ?? e.is_published,
|
|
724
949
|
isCancelled: e.isCancelled ?? e.is_cancelled,
|
|
725
950
|
availableTickets: t,
|
|
726
|
-
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? t.reduce((
|
|
951
|
+
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? t.reduce((c, i) => c + (i.quantityAvailable || 0), 0),
|
|
727
952
|
ticketsSold: e.ticketsSold ?? e.tickets_sold,
|
|
728
953
|
minPrice: e.minPrice ?? e.min_price ?? n,
|
|
729
|
-
maxPrice: e.maxPrice ?? e.max_price ??
|
|
954
|
+
maxPrice: e.maxPrice ?? e.max_price ?? a,
|
|
730
955
|
ctaText: e.ctaText || e.cta_text,
|
|
731
|
-
ctaState:
|
|
956
|
+
ctaState: K(e),
|
|
732
957
|
showPerformers: e.showPerformers ?? e.show_performers,
|
|
733
958
|
eventSeriesId: e.eventSeriesId || e.event_series_id,
|
|
734
959
|
seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number
|
|
735
960
|
};
|
|
736
961
|
}
|
|
737
|
-
const
|
|
738
|
-
function
|
|
739
|
-
return e ? e.startsWith("http") ? e : `${
|
|
962
|
+
const Ke = Z, V = "https://micdrop-images.sfo3.digitaloceanspaces.com";
|
|
963
|
+
function ee(e) {
|
|
964
|
+
return e ? e.startsWith("http") ? e : `${V}/${e.replace(/^\//, "")}` : "";
|
|
740
965
|
}
|
|
741
|
-
function
|
|
966
|
+
function Xe(e) {
|
|
742
967
|
const r = e.logoUrl || e.logo_url || e.logo;
|
|
743
968
|
return {
|
|
744
969
|
id: e.id || e.ID || 0,
|
|
@@ -751,21 +976,21 @@ function be(e) {
|
|
|
751
976
|
zipCode: e.zipCode || e.zip_code,
|
|
752
977
|
country: e.country,
|
|
753
978
|
timezone: e.timezone || e.time_zone,
|
|
754
|
-
logoUrl:
|
|
979
|
+
logoUrl: ee(r),
|
|
755
980
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
756
981
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
757
982
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
|
|
758
983
|
organizationId: e.organizationId || e.organization_id
|
|
759
984
|
};
|
|
760
985
|
}
|
|
761
|
-
function
|
|
986
|
+
function Ze(e) {
|
|
762
987
|
return {
|
|
763
988
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
764
989
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
765
990
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
|
|
766
991
|
};
|
|
767
992
|
}
|
|
768
|
-
function
|
|
993
|
+
function Ve(e) {
|
|
769
994
|
return [
|
|
770
995
|
e.address,
|
|
771
996
|
e.city,
|
|
@@ -774,58 +999,65 @@ function De(e) {
|
|
|
774
999
|
].filter(Boolean).join(", ");
|
|
775
1000
|
}
|
|
776
1001
|
export {
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
1002
|
+
de as apiDelete,
|
|
1003
|
+
ie as apiGet,
|
|
1004
|
+
le as apiPost,
|
|
1005
|
+
ue as apiPut,
|
|
1006
|
+
Be as applyGiftCard,
|
|
1007
|
+
pe as applyPromoCode,
|
|
1008
|
+
K as calculateCtaState,
|
|
1009
|
+
he as cancelReservation,
|
|
1010
|
+
Le as checkCollectionPassword,
|
|
1011
|
+
qe as checkEventPassword,
|
|
1012
|
+
Me as completeGiftCardPayment,
|
|
1013
|
+
me as completeReservation,
|
|
1014
|
+
Qe as computeCtaState,
|
|
1015
|
+
ne as configureApi,
|
|
1016
|
+
ze as createGiftCardPurchase,
|
|
1017
|
+
ye as createOrder,
|
|
1018
|
+
fe as createPaymentIntent,
|
|
1019
|
+
_e as extendCheckoutSession,
|
|
1020
|
+
Ze as extractVenueFees,
|
|
1021
|
+
Ae as fetchAllVenues,
|
|
1022
|
+
De as fetchEventDetails,
|
|
1023
|
+
je as fetchEventPerformers,
|
|
1024
|
+
ke as fetchEventTickets,
|
|
1025
|
+
Re as fetchPublicCollection,
|
|
1026
|
+
Te as fetchSeriesOccurrences,
|
|
1027
|
+
Ue as fetchSeriesPage,
|
|
1028
|
+
Ie as fetchVenueEvents,
|
|
1029
|
+
Ve as formatVenueAddress,
|
|
1030
|
+
se as getApiConfig,
|
|
1031
|
+
Y as getCDNImageUrl,
|
|
1032
|
+
ce as getClientIP,
|
|
1033
|
+
R as getEventImageUrl,
|
|
1034
|
+
ae as getLegacyPublicUrl,
|
|
1035
|
+
Ne as getMonthEvents,
|
|
1036
|
+
ge as getOrder,
|
|
1037
|
+
N as getOrdersV2Url,
|
|
1038
|
+
xe as getOrgMonthEvents,
|
|
810
1039
|
s as getPublicBaseUrl,
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
Pe as
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
1040
|
+
Fe as getSeriesOccurrences,
|
|
1041
|
+
ve as getSessionStatus,
|
|
1042
|
+
z as getVenue,
|
|
1043
|
+
Ge as getVenueBySlug,
|
|
1044
|
+
Oe as getVenueFees,
|
|
1045
|
+
He as getWaitlistPosition,
|
|
1046
|
+
be as hasPromoCodes,
|
|
1047
|
+
$e as initiateOrder,
|
|
1048
|
+
We as joinWaitlist,
|
|
1049
|
+
Je as removeGiftCard,
|
|
1050
|
+
Se as removePromoCode,
|
|
1051
|
+
Ee as testNetworkConnection,
|
|
1052
|
+
Pe as trackUTMSource,
|
|
1053
|
+
X as transformAvailableTicket,
|
|
1054
|
+
Z as transformEvent,
|
|
1055
|
+
Ke as transformEventData,
|
|
1056
|
+
H as transformOrder,
|
|
1057
|
+
Ye as transformOrderForDisplay,
|
|
1058
|
+
W as transformTicket,
|
|
1059
|
+
Xe as transformVenue,
|
|
1060
|
+
we as validatePaymentIntent,
|
|
1061
|
+
Ce as validatePromoCode
|
|
830
1062
|
};
|
|
831
1063
|
//# sourceMappingURL=api.mjs.map
|