@getmicdrop/venue-calendar 4.0.92 → 4.0.93
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-R5Z2q4Hy.js +2380 -0
- package/dist/CartView-R5Z2q4Hy.js.map +1 -0
- package/dist/Checkout-BUwdMMjA.js +1040 -0
- package/dist/Checkout-BUwdMMjA.js.map +1 -0
- package/dist/{Checkout-BscK0fmI.js → Checkout-avoTg_Zw.js} +612 -587
- package/dist/Checkout-avoTg_Zw.js.map +1 -0
- package/dist/{CheckoutTimer-CF6emJxC.js → CheckoutTimer-C_ax1Uo2.js} +37 -37
- package/dist/CheckoutTimer-C_ax1Uo2.js.map +1 -0
- package/dist/ClockIcon-C5muTIYL.js +32 -0
- package/dist/ClockIcon-C5muTIYL.js.map +1 -0
- package/dist/CollectionView-3MHrh5Zm.js +299 -0
- package/dist/CollectionView-3MHrh5Zm.js.map +1 -0
- package/dist/{Event-BzBZmp6N.js → Event-vR1aE543.js} +1593 -1509
- package/dist/Event-vR1aE543.js.map +1 -0
- package/dist/EventPage-Bhg-8-5x.js +566 -0
- package/dist/EventPage-Bhg-8-5x.js.map +1 -0
- package/dist/{Heading-BswFTsr3.js → Heading-ZcvybCi8.js} +30 -30
- package/dist/Heading-ZcvybCi8.js.map +1 -0
- package/dist/ScarcityBadge-CjTFAhat.js +167 -0
- package/dist/ScarcityBadge-CjTFAhat.js.map +1 -0
- package/dist/{SeriesPage-CbmuRofu.js → SeriesPage-DTEY83yR.js} +5 -5
- package/dist/{SeriesPage-CbmuRofu.js.map → SeriesPage-DTEY83yR.js.map} +1 -1
- package/dist/{Spinner-CAxL7NK0.js → Spinner--YBVljiP.js} +10 -10
- package/dist/Spinner--YBVljiP.js.map +1 -0
- package/dist/Success-ClCvTxTH.js +848 -0
- package/dist/Success-ClCvTxTH.js.map +1 -0
- package/dist/Text-SlV9H-GU.js +171 -0
- package/dist/Text-SlV9H-GU.js.map +1 -0
- package/dist/VenueCalendar-Bth_j-Wp.js +15657 -0
- package/dist/VenueCalendar-Bth_j-Wp.js.map +1 -0
- package/dist/{ViewTicketsEmbed-C7GPK33F.js → ViewTicketsEmbed-D7g7RYZI.js} +375 -364
- package/dist/{ViewTicketsEmbed-C7GPK33F.js.map → ViewTicketsEmbed-D7g7RYZI.js.map} +1 -1
- package/dist/api/{events.d.ts → api/events.d.ts} +9 -10
- package/dist/api/{index.d.ts → api/index.d.ts} +2 -1
- package/dist/api/api/result.d.ts +48 -0
- package/dist/api/{transformers → api/transformers}/event.d.ts +19 -10
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +688 -594
- package/dist/api/api.mjs.map +1 -1
- package/dist/api/types.d.ts +447 -438
- package/dist/{data-toggle-store.svelte-BUOQgWTH.js → data-toggle-store.svelte-CFAVM8I0.js} +2 -2
- package/dist/{data-toggle-store.svelte-BUOQgWTH.js.map → data-toggle-store.svelte-CFAVM8I0.js.map} +1 -1
- package/dist/labels-CnpAWtkz.js +640 -0
- package/dist/labels-CnpAWtkz.js.map +1 -0
- package/dist/{modalManager.svelte-C8L8XPBi.js → modalManager.svelte-T2RGHhZH.js} +2 -2
- package/dist/{modalManager.svelte-C8L8XPBi.js.map → modalManager.svelte-T2RGHhZH.js.map} +1 -1
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.cjs.map +1 -1
- package/dist/seo/seo.mjs +78 -74
- package/dist/seo/seo.mjs.map +1 -1
- package/dist/transform-C3TwZSH6.js +349 -0
- package/dist/transform-C3TwZSH6.js.map +1 -0
- package/dist/types/index.d.ts +22 -10
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +18 -18
- package/dist/venue-calendar.iife.js +46 -32
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +45 -31
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +7 -5
- package/dist/CartView-IiXG4UTa.js +0 -2366
- package/dist/CartView-IiXG4UTa.js.map +0 -1
- package/dist/Checkout-BscK0fmI.js.map +0 -1
- package/dist/Checkout-Dx7QWFn9.js +0 -916
- package/dist/Checkout-Dx7QWFn9.js.map +0 -1
- package/dist/CheckoutTimer-CF6emJxC.js.map +0 -1
- package/dist/CollectionView-BAy5mYKg.js +0 -299
- package/dist/CollectionView-BAy5mYKg.js.map +0 -1
- package/dist/Event-BzBZmp6N.js.map +0 -1
- package/dist/EventPage-TNjZq1ls.js +0 -532
- package/dist/EventPage-TNjZq1ls.js.map +0 -1
- package/dist/Heading-BswFTsr3.js.map +0 -1
- package/dist/ScarcityBadge-DEzS1qXs.js +0 -90
- package/dist/ScarcityBadge-DEzS1qXs.js.map +0 -1
- package/dist/Spinner-CAxL7NK0.js.map +0 -1
- package/dist/Success-DdWMiFHS.js +0 -729
- package/dist/Success-DdWMiFHS.js.map +0 -1
- package/dist/Text-HvIEXENM.js +0 -167
- package/dist/Text-HvIEXENM.js.map +0 -1
- package/dist/VenueCalendar-DhxkKfli.js +0 -18400
- package/dist/VenueCalendar-DhxkKfli.js.map +0 -1
- package/dist/labels-Bwet5rDx.js +0 -965
- package/dist/labels-Bwet5rDx.js.map +0 -1
- package/dist/transform-5AH-sRWT.js +0 -274
- package/dist/transform-5AH-sRWT.js.map +0 -1
- /package/dist/api/{client.d.ts → api/client.d.ts} +0 -0
- /package/dist/api/{cta.d.ts → api/cta.d.ts} +0 -0
- /package/dist/api/{gift-cards.d.ts → api/gift-cards.d.ts} +0 -0
- /package/dist/api/{orders.d.ts → api/orders.d.ts} +0 -0
- /package/dist/api/{promo.d.ts → api/promo.d.ts} +0 -0
- /package/dist/api/{transformers → api/transformers}/address.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/cart.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/collection.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/giftCard.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/index.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/order.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/performer.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/series.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/venue.d.ts +0 -0
- /package/dist/api/{venues.d.ts → api/venues.d.ts} +0 -0
- /package/dist/api/{waitlist.d.ts → api/waitlist.d.ts} +0 -0
package/dist/api/api.mjs
CHANGED
|
@@ -1,116 +1,115 @@
|
|
|
1
1
|
import { createLogger as b } from "@getmicdrop/svelte-components/utils/logger";
|
|
2
|
-
import {
|
|
3
|
-
import { formatTime as B, formatDateRaw as
|
|
4
|
-
import { isHiddenTicketPurchasable as
|
|
5
|
-
|
|
6
|
-
const F = b("VC"), X = {
|
|
2
|
+
import { getLocalStorage as ce, setLocalStorage as ue, getSessionStorage as Y, setSessionStorage as le, createLogger as de, AppError as S, formatCurrency as fe, resolveImageUrl as K } from "@getmicdrop/svelte-components";
|
|
3
|
+
import { formatTime as B, formatDateRaw as H } from "@getmicdrop/svelte-components/utils/formatters";
|
|
4
|
+
import { isHiddenTicketPurchasable as me } from "@getmicdrop/svelte-components/transforms";
|
|
5
|
+
const q = b("VC"), pe = {
|
|
7
6
|
baseUrl: "https://get-micdrop.com",
|
|
8
7
|
timeout: 3e4,
|
|
9
8
|
retries: 2,
|
|
10
9
|
retryDelay: 500,
|
|
11
|
-
onError: (
|
|
10
|
+
onError: (t) => q.error("API Error:", t)
|
|
12
11
|
};
|
|
13
|
-
let
|
|
14
|
-
function
|
|
15
|
-
|
|
12
|
+
let p = { ...pe };
|
|
13
|
+
function ot(t) {
|
|
14
|
+
p = { ...p, ...t };
|
|
16
15
|
}
|
|
17
|
-
function
|
|
18
|
-
return { ...
|
|
16
|
+
function it() {
|
|
17
|
+
return { ...p };
|
|
19
18
|
}
|
|
20
|
-
function
|
|
21
|
-
return `${
|
|
19
|
+
function c() {
|
|
20
|
+
return `${p.baseUrl}/api/v2/public`;
|
|
22
21
|
}
|
|
23
|
-
function
|
|
24
|
-
return `${
|
|
22
|
+
function ct() {
|
|
23
|
+
return `${p.baseUrl}/api/public`;
|
|
25
24
|
}
|
|
26
25
|
function I() {
|
|
27
|
-
return `${
|
|
26
|
+
return `${p.baseUrl}/api/orders/v2/public`;
|
|
28
27
|
}
|
|
29
|
-
async function
|
|
28
|
+
async function ut() {
|
|
30
29
|
return "";
|
|
31
30
|
}
|
|
32
|
-
const
|
|
33
|
-
async function
|
|
34
|
-
const n = (e.method || "GET").toUpperCase(),
|
|
35
|
-
let
|
|
36
|
-
for (let i = 1; i <=
|
|
37
|
-
const
|
|
31
|
+
const ye = (t) => new Promise((e) => setTimeout(e, t));
|
|
32
|
+
async function Z(t, e, r) {
|
|
33
|
+
const n = (e.method || "GET").toUpperCase(), s = n === "GET" || n === "HEAD" ? r.retries + 1 : 1;
|
|
34
|
+
let o;
|
|
35
|
+
for (let i = 1; i <= s; i++) {
|
|
36
|
+
const u = new AbortController(), C = setTimeout(() => u.abort(), r.timeout), y = e.signal;
|
|
38
37
|
let k;
|
|
39
|
-
|
|
38
|
+
y && (y.aborted ? u.abort() : (k = () => u.abort(), y.addEventListener("abort", k, { once: !0 })));
|
|
40
39
|
try {
|
|
41
|
-
const g = await fetch(
|
|
42
|
-
if (g.status >= 500 && i <
|
|
43
|
-
|
|
40
|
+
const g = await fetch(t, { ...e, signal: u.signal });
|
|
41
|
+
if (g.status >= 500 && i < s)
|
|
42
|
+
o = new Error(`HTTP ${g.status}`);
|
|
44
43
|
else
|
|
45
44
|
return g;
|
|
46
45
|
} catch (g) {
|
|
47
|
-
if (
|
|
46
|
+
if (o = g, y?.aborted) throw g;
|
|
48
47
|
} finally {
|
|
49
|
-
clearTimeout(
|
|
48
|
+
clearTimeout(C), y && k && y.removeEventListener("abort", k);
|
|
50
49
|
}
|
|
51
|
-
i <
|
|
50
|
+
i < s && await ye(r.retryDelay * Math.pow(2, i - 1));
|
|
52
51
|
}
|
|
53
|
-
throw
|
|
52
|
+
throw o;
|
|
54
53
|
}
|
|
55
|
-
async function $(
|
|
56
|
-
return
|
|
54
|
+
async function $(t, e) {
|
|
55
|
+
return F("GET", t, void 0, e);
|
|
57
56
|
}
|
|
58
|
-
async function
|
|
59
|
-
return
|
|
57
|
+
async function f(t, e, r) {
|
|
58
|
+
return F("POST", t, e, r);
|
|
60
59
|
}
|
|
61
|
-
async function
|
|
62
|
-
return
|
|
60
|
+
async function lt(t, e, r) {
|
|
61
|
+
return F("PUT", t, e, r);
|
|
63
62
|
}
|
|
64
|
-
async function
|
|
65
|
-
return
|
|
63
|
+
async function ge(t, e) {
|
|
64
|
+
return F("DELETE", t, void 0, e);
|
|
66
65
|
}
|
|
67
|
-
async function
|
|
68
|
-
const a = e.startsWith("http") ? e : `${
|
|
66
|
+
async function F(t, e, r, n) {
|
|
67
|
+
const a = e.startsWith("http") ? e : `${c()}${e}`;
|
|
69
68
|
try {
|
|
70
|
-
const
|
|
69
|
+
const s = await Z(
|
|
71
70
|
a,
|
|
72
71
|
{
|
|
73
|
-
method:
|
|
72
|
+
method: t,
|
|
74
73
|
headers: {
|
|
75
74
|
"Content-Type": "application/json",
|
|
76
75
|
...n?.headers
|
|
77
76
|
},
|
|
78
|
-
body:
|
|
77
|
+
body: r !== void 0 ? JSON.stringify(r) : void 0,
|
|
79
78
|
credentials: "include",
|
|
80
79
|
...n
|
|
81
80
|
},
|
|
82
|
-
|
|
81
|
+
p
|
|
83
82
|
);
|
|
84
|
-
if (!
|
|
85
|
-
const i = await
|
|
86
|
-
return
|
|
83
|
+
if (!s.ok) {
|
|
84
|
+
const i = await s.json().catch(() => ({})), u = i.error || i.message || `HTTP ${s.status}`;
|
|
85
|
+
return p.onError(new Error(u)), { success: !1, error: u, statusCode: s.status };
|
|
87
86
|
}
|
|
88
|
-
return { success: !0, data: await
|
|
89
|
-
} catch (
|
|
90
|
-
const
|
|
91
|
-
return
|
|
92
|
-
|
|
93
|
-
), { success: !1, error:
|
|
87
|
+
return { success: !0, data: await s.json(), statusCode: s.status };
|
|
88
|
+
} catch (s) {
|
|
89
|
+
const o = s instanceof Error ? s.name === "AbortError" ? "Request timed out" : s.message : "Unknown error";
|
|
90
|
+
return p.onError(
|
|
91
|
+
s instanceof Error ? s : new Error(o)
|
|
92
|
+
), { success: !1, error: o };
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
|
-
async function
|
|
95
|
+
async function E(t, e) {
|
|
97
96
|
try {
|
|
98
|
-
const
|
|
99
|
-
|
|
97
|
+
const r = await Z(
|
|
98
|
+
t,
|
|
100
99
|
{ credentials: "include", ...e },
|
|
101
|
-
|
|
100
|
+
p
|
|
102
101
|
);
|
|
103
|
-
if (!
|
|
104
|
-
const n = await
|
|
105
|
-
return
|
|
102
|
+
if (!r.ok) {
|
|
103
|
+
const n = await r.json().catch(() => ({}));
|
|
104
|
+
return q.error(`API request failed: ${r.status}`, n), null;
|
|
106
105
|
}
|
|
107
|
-
return
|
|
108
|
-
} catch (
|
|
109
|
-
return
|
|
106
|
+
return r.json();
|
|
107
|
+
} catch (r) {
|
|
108
|
+
return q.error("API request error:", r), null;
|
|
110
109
|
}
|
|
111
110
|
}
|
|
112
|
-
function
|
|
113
|
-
const e =
|
|
111
|
+
function ve(t) {
|
|
112
|
+
const e = t ?? {};
|
|
114
113
|
return {
|
|
115
114
|
ticketID: Number(e.TicketID ?? e.ticketID ?? 0),
|
|
116
115
|
quantity: Number(e.Quantity ?? e.quantity ?? 0),
|
|
@@ -120,60 +119,165 @@ function te(r) {
|
|
|
120
119
|
status: String(e.Status ?? e.status ?? "")
|
|
121
120
|
};
|
|
122
121
|
}
|
|
123
|
-
function
|
|
124
|
-
const e =
|
|
125
|
-
return { uuid:
|
|
122
|
+
function he(t) {
|
|
123
|
+
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(ve);
|
|
124
|
+
return { uuid: r, eventID: n, status: a, expiresAt: s, reservations: i };
|
|
125
|
+
}
|
|
126
|
+
const X = [
|
|
127
|
+
"utmSource",
|
|
128
|
+
"utmMedium",
|
|
129
|
+
"utmCampaign",
|
|
130
|
+
"utmContent",
|
|
131
|
+
"utmTerm"
|
|
132
|
+
], _e = {
|
|
133
|
+
utmSource: "utm_source",
|
|
134
|
+
utmMedium: "utm_medium",
|
|
135
|
+
utmCampaign: "utm_campaign",
|
|
136
|
+
utmContent: "utm_content",
|
|
137
|
+
utmTerm: "utm_term"
|
|
138
|
+
}, ee = "direct";
|
|
139
|
+
function te(t) {
|
|
140
|
+
return t ? t.trim().toLowerCase().replace(/\s+/g, "_") : "";
|
|
141
|
+
}
|
|
142
|
+
function we(t) {
|
|
143
|
+
const e = {};
|
|
144
|
+
for (const r of X)
|
|
145
|
+
e[r] = te(t[r]);
|
|
146
|
+
return e.utmSource || (e.utmSource = ee), e;
|
|
147
|
+
}
|
|
148
|
+
function ke(t) {
|
|
149
|
+
const e = {};
|
|
150
|
+
for (const r of X)
|
|
151
|
+
e[r] = t.get(_e[r]);
|
|
152
|
+
return we(e);
|
|
153
|
+
}
|
|
154
|
+
function be() {
|
|
155
|
+
if (typeof window > "u") return !0;
|
|
156
|
+
try {
|
|
157
|
+
return window.self === window.top;
|
|
158
|
+
} catch {
|
|
159
|
+
return !1;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function $e() {
|
|
163
|
+
const t = typeof window < "u", e = be(), r = t ? window.location.search : "", n = (typeof document < "u" ? document.referrer : "") ?? "", a = t && e ? window.location.href : "";
|
|
164
|
+
return {
|
|
165
|
+
utm: ke(new URLSearchParams(r)),
|
|
166
|
+
referrer: n || "",
|
|
167
|
+
pageUrl: a || ""
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
let Ce = !1;
|
|
171
|
+
function Te() {
|
|
172
|
+
return typeof window < "u" && typeof window.__tcfapi == "function";
|
|
173
|
+
}
|
|
174
|
+
function Pe() {
|
|
175
|
+
return Te();
|
|
176
|
+
}
|
|
177
|
+
function Se() {
|
|
178
|
+
return Pe() ? Ce : !0;
|
|
179
|
+
}
|
|
180
|
+
const W = "micdrop_session_id", Q = "micdrop_visitor_id", Ie = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
181
|
+
function Ee(t) {
|
|
182
|
+
return typeof t == "string" && Ie.test(t);
|
|
183
|
+
}
|
|
184
|
+
function re() {
|
|
185
|
+
const t = typeof crypto < "u" ? crypto : void 0;
|
|
186
|
+
if (t?.randomUUID) return t.randomUUID();
|
|
187
|
+
const e = new Uint8Array(16);
|
|
188
|
+
if (t?.getRandomValues)
|
|
189
|
+
t.getRandomValues(e);
|
|
190
|
+
else
|
|
191
|
+
for (let n = 0; n < 16; n++) e[n] = Math.floor(Math.random() * 256);
|
|
192
|
+
e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128;
|
|
193
|
+
const r = [];
|
|
194
|
+
for (let n = 0; n < 16; n++) r.push(e[n].toString(16).padStart(2, "0"));
|
|
195
|
+
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]}`;
|
|
196
|
+
}
|
|
197
|
+
function Re() {
|
|
198
|
+
let t = Y(W);
|
|
199
|
+
return t || (t = re(), le(W, t)), t;
|
|
200
|
+
}
|
|
201
|
+
function Ae() {
|
|
202
|
+
if (!Se()) return null;
|
|
203
|
+
const t = ce(Q);
|
|
204
|
+
if (Ee(t)) return t;
|
|
205
|
+
const e = re();
|
|
206
|
+
return ue(Q, e), e;
|
|
207
|
+
}
|
|
208
|
+
const De = "micdrop_attribution";
|
|
209
|
+
function Ne() {
|
|
210
|
+
const t = Y(De);
|
|
211
|
+
return !t || !t.utm || typeof t.utm.utmSource != "string" ? null : t;
|
|
212
|
+
}
|
|
213
|
+
function U() {
|
|
214
|
+
const e = Ne() ?? $e();
|
|
215
|
+
return {
|
|
216
|
+
sessionId: Re(),
|
|
217
|
+
visitorId: Ae(),
|
|
218
|
+
utmSource: e.utm.utmSource,
|
|
219
|
+
utmMedium: e.utm.utmMedium,
|
|
220
|
+
utmCampaign: e.utm.utmCampaign,
|
|
221
|
+
utmContent: e.utm.utmContent,
|
|
222
|
+
utmTerm: e.utm.utmTerm,
|
|
223
|
+
referrer: e.referrer || ""
|
|
224
|
+
};
|
|
126
225
|
}
|
|
127
|
-
|
|
128
|
-
|
|
226
|
+
de("tracking");
|
|
227
|
+
const d = b("VC");
|
|
228
|
+
async function dt(t, e, r) {
|
|
129
229
|
try {
|
|
130
|
-
const n = await
|
|
131
|
-
`${I()}/cart/${
|
|
230
|
+
const n = await f(
|
|
231
|
+
`${I()}/cart/${t}/payment-intent`,
|
|
132
232
|
{
|
|
133
233
|
productQuantities: e,
|
|
134
|
-
...
|
|
234
|
+
...r && Object.keys(r).length > 0 ? { donationAmounts: r } : {},
|
|
235
|
+
// Order attribution (MISSION-TRUTH C2) — additive; ignored by a backend
|
|
236
|
+
// that hasn't shipped MIC-1255 yet. Free orders finalize via this
|
|
237
|
+
// payment-intent pre-submit, so this covers the free-order path too.
|
|
238
|
+
attribution: U()
|
|
135
239
|
}
|
|
136
240
|
);
|
|
137
241
|
if (!n.success)
|
|
138
|
-
throw
|
|
242
|
+
throw d.error("Payment intent creation failed:", n.error), new S(
|
|
139
243
|
n.error || "Failed to create payment intent",
|
|
140
244
|
"lib/api/orders/createPaymentIntent"
|
|
141
245
|
);
|
|
142
|
-
return
|
|
246
|
+
return d.debug("Payment intent created:", n.data), n.data;
|
|
143
247
|
} catch (n) {
|
|
144
|
-
return
|
|
248
|
+
return d.error("createPaymentIntent error:", n), null;
|
|
145
249
|
}
|
|
146
250
|
}
|
|
147
|
-
async function
|
|
148
|
-
if (!
|
|
251
|
+
async function ft(t, e) {
|
|
252
|
+
if (!t) return null;
|
|
149
253
|
try {
|
|
150
|
-
const
|
|
151
|
-
`${I()}/cart/${
|
|
254
|
+
const r = await $(
|
|
255
|
+
`${I()}/cart/${t}`
|
|
152
256
|
);
|
|
153
|
-
if (!
|
|
257
|
+
if (!r.success)
|
|
154
258
|
return null;
|
|
155
|
-
const { uuid: n, eventID: a, status:
|
|
156
|
-
|
|
259
|
+
const { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i } = he(
|
|
260
|
+
r.data
|
|
157
261
|
);
|
|
158
|
-
return
|
|
159
|
-
} catch (
|
|
160
|
-
return
|
|
262
|
+
return s !== "reserved" && s !== "active" || e !== void 0 && a !== Number(e) ? null : { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i };
|
|
263
|
+
} catch (r) {
|
|
264
|
+
return d.error("getCartByUUID error:", r), null;
|
|
161
265
|
}
|
|
162
266
|
}
|
|
163
|
-
async function
|
|
267
|
+
async function mt(t, e, r) {
|
|
164
268
|
try {
|
|
165
269
|
const n = {};
|
|
166
|
-
for (const [
|
|
167
|
-
const
|
|
168
|
-
!Number.isNaN(
|
|
270
|
+
for (const [o, i] of Object.entries(e)) {
|
|
271
|
+
const u = typeof o == "number" ? o : parseInt(o, 10);
|
|
272
|
+
!Number.isNaN(u) && i > 0 && (n[u] = i);
|
|
169
273
|
}
|
|
170
274
|
const a = {};
|
|
171
|
-
if (
|
|
172
|
-
for (const [
|
|
173
|
-
const
|
|
174
|
-
!Number.isNaN(
|
|
275
|
+
if (r)
|
|
276
|
+
for (const [o, i] of Object.entries(r)) {
|
|
277
|
+
const u = typeof o == "number" ? o : parseInt(o, 10);
|
|
278
|
+
!Number.isNaN(u) && i > 0 && (a[u] = i);
|
|
175
279
|
}
|
|
176
|
-
const
|
|
280
|
+
const s = await fetch(`${I()}/cart/${t}`, {
|
|
177
281
|
method: "PUT",
|
|
178
282
|
headers: { "Content-Type": "application/json" },
|
|
179
283
|
credentials: "include",
|
|
@@ -182,19 +286,19 @@ async function Re(r, e, t) {
|
|
|
182
286
|
...Object.keys(a).length > 0 ? { donationAmounts: a } : {}
|
|
183
287
|
})
|
|
184
288
|
});
|
|
185
|
-
if (!
|
|
186
|
-
const
|
|
187
|
-
return
|
|
289
|
+
if (!s.ok) {
|
|
290
|
+
const o = await s.json().catch(() => ({}));
|
|
291
|
+
return d.error("Cart update failed:", o), !1;
|
|
188
292
|
}
|
|
189
293
|
return !0;
|
|
190
294
|
} catch (n) {
|
|
191
|
-
return
|
|
295
|
+
return d.error("updateCartQuantities error:", n), !1;
|
|
192
296
|
}
|
|
193
297
|
}
|
|
194
|
-
async function
|
|
298
|
+
async function pt(t) {
|
|
195
299
|
try {
|
|
196
|
-
const e = await
|
|
197
|
-
`${
|
|
300
|
+
const e = await f(
|
|
301
|
+
`${c()}/orders/complete/${t}`
|
|
198
302
|
);
|
|
199
303
|
return e.success ? {
|
|
200
304
|
success: !0,
|
|
@@ -204,13 +308,13 @@ async function De(r) {
|
|
|
204
308
|
error: e.error || "Failed to complete reservation"
|
|
205
309
|
};
|
|
206
310
|
} catch (e) {
|
|
207
|
-
return
|
|
311
|
+
return d.error("Error completing reservation:", e), { success: !1, error: "Network error completing reservation" };
|
|
208
312
|
}
|
|
209
313
|
}
|
|
210
|
-
async function
|
|
314
|
+
async function yt(t) {
|
|
211
315
|
try {
|
|
212
|
-
const e = await
|
|
213
|
-
`${
|
|
316
|
+
const e = await f(
|
|
317
|
+
`${c()}/orders/cancel/${t}`
|
|
214
318
|
);
|
|
215
319
|
return e.success ? {
|
|
216
320
|
success: !0,
|
|
@@ -220,33 +324,37 @@ async function xe(r) {
|
|
|
220
324
|
error: e.error || "Failed to cancel reservation"
|
|
221
325
|
};
|
|
222
326
|
} catch (e) {
|
|
223
|
-
return
|
|
327
|
+
return d.error("Error cancelling reservation:", e), { success: !1, error: "Network error cancelling reservation" };
|
|
224
328
|
}
|
|
225
329
|
}
|
|
226
|
-
async function
|
|
330
|
+
async function gt(t, e) {
|
|
227
331
|
try {
|
|
228
|
-
const
|
|
229
|
-
`${
|
|
230
|
-
|
|
332
|
+
const r = await f(
|
|
333
|
+
`${c()}/orders/create`,
|
|
334
|
+
// attribution (MISSION-TRUTH C2) rides on cart-create additively.
|
|
335
|
+
{ eventID: t, promoCode: e, attribution: U() }
|
|
231
336
|
);
|
|
232
|
-
return
|
|
233
|
-
} catch (
|
|
234
|
-
return
|
|
337
|
+
return r.success ? r.data : (d.error("Create order failed:", r.error), null);
|
|
338
|
+
} catch (r) {
|
|
339
|
+
return d.error("createOrder error:", r), null;
|
|
235
340
|
}
|
|
236
341
|
}
|
|
237
|
-
async function
|
|
238
|
-
return
|
|
342
|
+
async function vt(t) {
|
|
343
|
+
return E(`${c()}/orders/${t}`);
|
|
239
344
|
}
|
|
240
|
-
async function
|
|
345
|
+
async function ht(t, e) {
|
|
241
346
|
try {
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
|
|
347
|
+
const r = await f(`${I()}/validatePaymentIntent/${t}`, {
|
|
348
|
+
...e,
|
|
349
|
+
attribution: U()
|
|
350
|
+
});
|
|
351
|
+
if (!r.success)
|
|
352
|
+
return d.error("Payment validation failed:", r.error), {
|
|
245
353
|
success: !1,
|
|
246
354
|
status: "failed",
|
|
247
|
-
error:
|
|
355
|
+
error: r.error || "Payment validation failed"
|
|
248
356
|
};
|
|
249
|
-
const n =
|
|
357
|
+
const n = r.data;
|
|
250
358
|
return n.eventCanceled || n.eventPostponed ? {
|
|
251
359
|
success: !1,
|
|
252
360
|
status: "failed",
|
|
@@ -257,81 +365,82 @@ async function Fe(r, e) {
|
|
|
257
365
|
status: n.status || "Payment succeeded",
|
|
258
366
|
orderUUID: n.orderUUID || n.uuid
|
|
259
367
|
};
|
|
260
|
-
} catch (
|
|
261
|
-
return
|
|
368
|
+
} catch (r) {
|
|
369
|
+
return d.error("validatePaymentIntent error:", r), null;
|
|
262
370
|
}
|
|
263
371
|
}
|
|
264
|
-
async function
|
|
372
|
+
async function _t(t) {
|
|
265
373
|
try {
|
|
266
|
-
const e = await
|
|
374
|
+
const e = await f(`${c()}/orders/extend-session`, { orderUuid: t });
|
|
267
375
|
if (!e.success)
|
|
268
376
|
return {
|
|
269
377
|
success: !1,
|
|
270
378
|
error: e.error || "Failed to extend session",
|
|
271
379
|
statusCode: e.statusCode
|
|
272
380
|
};
|
|
273
|
-
const
|
|
381
|
+
const r = e.data;
|
|
274
382
|
return {
|
|
275
383
|
success: !0,
|
|
276
|
-
newExpiryTime:
|
|
277
|
-
remainingExtensions:
|
|
384
|
+
newExpiryTime: r.newExpiryTime,
|
|
385
|
+
remainingExtensions: r.remainingExtensions
|
|
278
386
|
};
|
|
279
387
|
} catch (e) {
|
|
280
|
-
return
|
|
388
|
+
return d.error("Error extending checkout session:", e), { success: !1, error: "Network error extending session" };
|
|
281
389
|
}
|
|
282
390
|
}
|
|
283
|
-
async function
|
|
391
|
+
async function wt(t) {
|
|
284
392
|
try {
|
|
285
393
|
const e = await $(
|
|
286
|
-
`${
|
|
394
|
+
`${c()}/orders/session/${t}`
|
|
287
395
|
);
|
|
288
396
|
if (!e.success)
|
|
289
397
|
return {
|
|
290
398
|
error: e.error || "No active session found",
|
|
291
399
|
notFound: e.statusCode === 404
|
|
292
400
|
};
|
|
293
|
-
const
|
|
401
|
+
const r = e.data;
|
|
294
402
|
return {
|
|
295
|
-
expiresAt:
|
|
296
|
-
extensionCount:
|
|
297
|
-
remainingExtensions:
|
|
298
|
-
canExtend:
|
|
299
|
-
reservationCount:
|
|
300
|
-
eventStatus:
|
|
403
|
+
expiresAt: r.expiresAt,
|
|
404
|
+
extensionCount: r.extensionCount,
|
|
405
|
+
remainingExtensions: r.remainingExtensions,
|
|
406
|
+
canExtend: r.canExtend,
|
|
407
|
+
reservationCount: r.reservationCount,
|
|
408
|
+
eventStatus: r.eventStatus
|
|
301
409
|
};
|
|
302
410
|
} catch (e) {
|
|
303
|
-
return
|
|
411
|
+
return d.error("Error getting session status:", e), { error: "Network error getting session status" };
|
|
304
412
|
}
|
|
305
413
|
}
|
|
306
|
-
async function
|
|
414
|
+
async function kt(t = { eventID: "" }) {
|
|
307
415
|
try {
|
|
308
|
-
const e = await
|
|
309
|
-
`${
|
|
310
|
-
|
|
416
|
+
const e = await f(
|
|
417
|
+
`${c()}/orders/create`,
|
|
418
|
+
// attribution (MISSION-TRUTH C2) rides on cart-create additively.
|
|
419
|
+
{ ...t, attribution: U() }
|
|
311
420
|
);
|
|
312
|
-
return e.success ? e.data?.uuid ?? null : (
|
|
421
|
+
return e.success ? e.data?.uuid ?? null : (d.error("Order initiation failed:", e.error), null);
|
|
313
422
|
} catch (e) {
|
|
314
|
-
return
|
|
423
|
+
return d.error("initiateOrder error:", e), null;
|
|
315
424
|
}
|
|
316
425
|
}
|
|
317
|
-
async function
|
|
426
|
+
async function bt(t) {
|
|
318
427
|
if (typeof window > "u") return;
|
|
319
|
-
const
|
|
428
|
+
const e = new URLSearchParams(window.location.search), r = te(e.get("utm_source")) || ee;
|
|
320
429
|
try {
|
|
321
430
|
await fetch(
|
|
322
|
-
`${
|
|
431
|
+
`${c()}/utm/${t}/${encodeURIComponent(r)}`
|
|
323
432
|
);
|
|
324
433
|
} catch (n) {
|
|
325
|
-
|
|
434
|
+
d.error("UTM tracking failed:", n);
|
|
326
435
|
}
|
|
327
436
|
}
|
|
328
|
-
const
|
|
329
|
-
async function
|
|
437
|
+
const V = b("VC"), Ue = () => I();
|
|
438
|
+
async function $t(t, e) {
|
|
330
439
|
try {
|
|
331
440
|
if (!e || !e.trim())
|
|
332
441
|
return { valid: !1, error: "Promo code is required" };
|
|
333
|
-
const
|
|
334
|
-
`/promo-codes/validate/${
|
|
442
|
+
const r = encodeURIComponent(e.trim()), n = await $(
|
|
443
|
+
`/promo-codes/validate/${t}/${r}`
|
|
335
444
|
);
|
|
336
445
|
if (!n.success)
|
|
337
446
|
return n.statusCode === 404 ? { valid: !1, error: "Invalid promo code" } : { valid: !1, error: "Failed to validate code" };
|
|
@@ -345,415 +454,448 @@ async function Ge(r, e) {
|
|
|
345
454
|
amount: a.amount,
|
|
346
455
|
code: a.code || e
|
|
347
456
|
};
|
|
348
|
-
} catch (
|
|
349
|
-
return
|
|
457
|
+
} catch (r) {
|
|
458
|
+
return V.error("Error validating promo code:", r), { valid: !1, error: "Network error validating code" };
|
|
350
459
|
}
|
|
351
460
|
}
|
|
352
|
-
async function
|
|
461
|
+
async function Ct(t) {
|
|
353
462
|
try {
|
|
354
463
|
const e = await $(
|
|
355
|
-
`/promo-codes/check/${
|
|
464
|
+
`/promo-codes/check/${t}`
|
|
356
465
|
);
|
|
357
466
|
return e.success ? e.data.hasPromoCodes === !0 : !0;
|
|
358
467
|
} catch (e) {
|
|
359
|
-
return
|
|
468
|
+
return V.error("Error checking promo codes availability:", e), !0;
|
|
360
469
|
}
|
|
361
470
|
}
|
|
362
|
-
async function
|
|
471
|
+
async function Tt(t, e) {
|
|
363
472
|
try {
|
|
364
|
-
const
|
|
365
|
-
`${
|
|
473
|
+
const r = await f(
|
|
474
|
+
`${Ue()}/cart/${t}/apply-promo`,
|
|
366
475
|
{ promoCode: e }
|
|
367
476
|
);
|
|
368
|
-
return
|
|
477
|
+
return r.success ? { success: !0 } : {
|
|
369
478
|
success: !1,
|
|
370
|
-
error:
|
|
479
|
+
error: r.error || "Failed to apply promo code"
|
|
371
480
|
};
|
|
372
|
-
} catch (
|
|
373
|
-
return
|
|
481
|
+
} catch (r) {
|
|
482
|
+
return V.error("Error applying promo code:", r), { success: !1, error: "Network error applying code" };
|
|
374
483
|
}
|
|
375
484
|
}
|
|
376
|
-
async function
|
|
485
|
+
async function Pt(t) {
|
|
377
486
|
try {
|
|
378
|
-
const e = await
|
|
487
|
+
const e = await f(`/orders/${t}/remove-promo`);
|
|
379
488
|
return e.success ? { success: !0 } : {
|
|
380
489
|
success: !1,
|
|
381
490
|
error: e.error || "Failed to remove promo code"
|
|
382
491
|
};
|
|
383
492
|
} catch (e) {
|
|
384
|
-
return
|
|
493
|
+
return V.error("Error removing promo code:", e), { success: !1, error: "Network error removing code" };
|
|
385
494
|
}
|
|
386
495
|
}
|
|
387
|
-
function
|
|
388
|
-
const e =
|
|
496
|
+
function xe(t) {
|
|
497
|
+
const e = t ?? {};
|
|
389
498
|
return {
|
|
390
499
|
performers: Array.isArray(e.performers) ? e.performers : [],
|
|
391
500
|
showPerformers: e.showPerformers === !0
|
|
392
501
|
};
|
|
393
502
|
}
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
503
|
+
function Oe(t) {
|
|
504
|
+
return { ok: !0, data: t };
|
|
505
|
+
}
|
|
506
|
+
function N(t) {
|
|
507
|
+
return { ok: !1, error: t };
|
|
508
|
+
}
|
|
509
|
+
function St(t) {
|
|
510
|
+
return t.ok;
|
|
511
|
+
}
|
|
512
|
+
function R(t, e) {
|
|
513
|
+
return t.ok ? t.data : e;
|
|
514
|
+
}
|
|
515
|
+
const m = b("VC"), O = /* @__PURE__ */ new Map();
|
|
516
|
+
async function It(t, e = fetch, r) {
|
|
517
|
+
const n = r ? `${t}:pw` : String(t);
|
|
397
518
|
if (e === fetch) {
|
|
398
|
-
const
|
|
399
|
-
if (
|
|
519
|
+
const s = O.get(n);
|
|
520
|
+
if (s) return s;
|
|
400
521
|
}
|
|
401
522
|
const a = (async () => {
|
|
402
523
|
try {
|
|
403
|
-
const
|
|
404
|
-
if (!
|
|
405
|
-
throw new
|
|
406
|
-
`Failed to fetch event details: ${
|
|
524
|
+
const s = r ? `${c()}/events/${t}?password=${encodeURIComponent(r)}` : `${c()}/events/${t}`, o = await e(s);
|
|
525
|
+
if (!o.ok)
|
|
526
|
+
throw new S(
|
|
527
|
+
`Failed to fetch event details: ${o.status}`,
|
|
407
528
|
"lib/api/events/fetchEventDetails"
|
|
408
529
|
);
|
|
409
|
-
return await
|
|
410
|
-
} catch (
|
|
411
|
-
return
|
|
530
|
+
return await o.json();
|
|
531
|
+
} catch (s) {
|
|
532
|
+
return m.error("Error fetching event details:", s), null;
|
|
412
533
|
}
|
|
413
534
|
})();
|
|
414
|
-
return e === fetch && (
|
|
415
|
-
|
|
535
|
+
return e === fetch && (O.set(n, a), a.finally(() => {
|
|
536
|
+
O.get(n) === a && O.delete(n);
|
|
416
537
|
})), a;
|
|
417
538
|
}
|
|
418
|
-
async function
|
|
539
|
+
async function w(t, e, r = (n) => n) {
|
|
419
540
|
try {
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
return
|
|
424
|
-
} catch (e) {
|
|
425
|
-
return l.error("Error fetching tickets:", e), [];
|
|
541
|
+
const n = await E(t);
|
|
542
|
+
return n ? Oe(r(n)) : (m.error(`Failed to load (${e}): network or server error`), N(e));
|
|
543
|
+
} catch (n) {
|
|
544
|
+
return m.error(`Error loading (${e}):`, n), N(e);
|
|
426
545
|
}
|
|
427
546
|
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
if (!r)
|
|
431
|
-
return l.warn("fetchEventPerformers called without eventId"), { performers: [], showPerformers: !1 };
|
|
432
|
-
const e = await y(
|
|
433
|
-
`${u()}/events/${r}/performers`
|
|
434
|
-
);
|
|
435
|
-
return e ? se(e) : (l.error("Failed to fetch performers: network or server error"), { performers: [], showPerformers: !1 });
|
|
436
|
-
} catch (e) {
|
|
437
|
-
return l.error("Error fetching event performers:", e), { performers: [], showPerformers: !1 };
|
|
438
|
-
}
|
|
547
|
+
function M(t) {
|
|
548
|
+
return Array.isArray(t) ? t : [];
|
|
439
549
|
}
|
|
440
|
-
async function
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
);
|
|
447
|
-
return e ? Array.isArray(e) ? e : [] : (l.error("Failed to fetch venues: network or server error"), []);
|
|
448
|
-
} catch (e) {
|
|
449
|
-
return l.error("Error fetching venues:", e), [];
|
|
450
|
-
}
|
|
550
|
+
async function Fe(t) {
|
|
551
|
+
return w(
|
|
552
|
+
`${c()}/tickets/event/${t}`,
|
|
553
|
+
"tickets_fetch_failed",
|
|
554
|
+
M
|
|
555
|
+
);
|
|
451
556
|
}
|
|
452
|
-
async function
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
557
|
+
async function Et(t) {
|
|
558
|
+
return R(await Fe(t), []);
|
|
559
|
+
}
|
|
560
|
+
async function Ve(t) {
|
|
561
|
+
return t ? w(
|
|
562
|
+
`${c()}/events/${t}/performers`,
|
|
563
|
+
"performers_fetch_failed",
|
|
564
|
+
(e) => xe(e)
|
|
565
|
+
) : (m.warn("fetchEventPerformers called without eventId"), N("performers_missing_event_id"));
|
|
566
|
+
}
|
|
567
|
+
async function Rt(t) {
|
|
568
|
+
return R(await Ve(t), {
|
|
569
|
+
performers: [],
|
|
570
|
+
showPerformers: !1
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
async function qe(t) {
|
|
574
|
+
return t ? w(
|
|
575
|
+
`${c()}/venues/organization/${t}`,
|
|
576
|
+
"venues_fetch_failed",
|
|
577
|
+
M
|
|
578
|
+
) : (m.warn("fetchAllVenues called without orgId"), N("venues_missing_org_id"));
|
|
579
|
+
}
|
|
580
|
+
async function At(t) {
|
|
581
|
+
return R(await qe(t), []);
|
|
582
|
+
}
|
|
583
|
+
async function Le(t) {
|
|
584
|
+
return t ? w(
|
|
585
|
+
`${c()}/events/venue/${t}`,
|
|
586
|
+
"venue_events_fetch_failed",
|
|
587
|
+
M
|
|
588
|
+
) : (m.warn("fetchVenueEvents called without venueId"), N("venue_events_missing_venue_id"));
|
|
589
|
+
}
|
|
590
|
+
async function Dt(t) {
|
|
591
|
+
return R(await Le(t), []);
|
|
592
|
+
}
|
|
593
|
+
function ne(t) {
|
|
594
|
+
return Array.isArray(t) ? t : Array.isArray(t.events) ? t.events : [];
|
|
595
|
+
}
|
|
596
|
+
async function Me(t, e, r) {
|
|
597
|
+
return w(
|
|
598
|
+
`${c()}/events/venue/${t}/month/${e}/${r}`,
|
|
599
|
+
"month_events_fetch_failed",
|
|
600
|
+
(n) => ne(n)
|
|
601
|
+
);
|
|
463
602
|
}
|
|
464
|
-
async function
|
|
465
|
-
|
|
466
|
-
const n = await y(
|
|
467
|
-
`${u()}/events/venue/${r}/month/${e}/${t}`
|
|
468
|
-
);
|
|
469
|
-
return n ? Array.isArray(n) ? n : Array.isArray(n.events) ? n.events : [] : (l.error("Failed to fetch month events: network or server error"), []);
|
|
470
|
-
} catch (n) {
|
|
471
|
-
return l.error("Error fetching month events:", n), [];
|
|
472
|
-
}
|
|
603
|
+
async function Nt(t, e, r) {
|
|
604
|
+
return R(await Me(t, e, r), []);
|
|
473
605
|
}
|
|
474
|
-
async function
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
)
|
|
479
|
-
|
|
480
|
-
} catch (n) {
|
|
481
|
-
return l.error("Error fetching org month events:", n), [];
|
|
482
|
-
}
|
|
606
|
+
async function Ge(t, e, r) {
|
|
607
|
+
return w(
|
|
608
|
+
`${c()}/events/organization/${t}/month/${e}/${r}`,
|
|
609
|
+
"org_month_events_fetch_failed",
|
|
610
|
+
(n) => ne(n)
|
|
611
|
+
);
|
|
483
612
|
}
|
|
484
|
-
async function
|
|
485
|
-
|
|
486
|
-
const e = await y(
|
|
487
|
-
`${u()}/series/${r}/occurrences`
|
|
488
|
-
);
|
|
489
|
-
return e || (l.error(
|
|
490
|
-
"Failed to fetch series occurrences: network or server error"
|
|
491
|
-
), null);
|
|
492
|
-
} catch (e) {
|
|
493
|
-
return l.error("Error fetching series occurrences:", e), null;
|
|
494
|
-
}
|
|
613
|
+
async function Ut(t, e, r) {
|
|
614
|
+
return R(await Ge(t, e, r), []);
|
|
495
615
|
}
|
|
496
|
-
async function
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
616
|
+
async function je(t) {
|
|
617
|
+
return w(
|
|
618
|
+
`${c()}/series/${t}/occurrences`,
|
|
619
|
+
"series_occurrences_fetch_failed"
|
|
620
|
+
);
|
|
621
|
+
}
|
|
622
|
+
async function xt(t) {
|
|
623
|
+
const e = await je(t);
|
|
624
|
+
return e.ok ? e.data : null;
|
|
625
|
+
}
|
|
626
|
+
async function ze(t, e) {
|
|
627
|
+
return w(
|
|
628
|
+
`${c()}/series/${t}/occurrences?venueId=${e}`,
|
|
629
|
+
"series_cta_fetch_failed"
|
|
630
|
+
);
|
|
505
631
|
}
|
|
506
|
-
async function
|
|
632
|
+
async function Ot(t, e) {
|
|
633
|
+
const r = await ze(t, e);
|
|
634
|
+
return r.ok ? r.data : null;
|
|
635
|
+
}
|
|
636
|
+
async function Ft(t, e) {
|
|
507
637
|
try {
|
|
508
|
-
const
|
|
509
|
-
`${
|
|
638
|
+
const r = e ? `?slug=${encodeURIComponent(e)}` : "", n = await E(
|
|
639
|
+
`${c()}/resolve/${encodeURIComponent(String(t))}${r}`
|
|
510
640
|
);
|
|
511
641
|
if (!n || !n.type)
|
|
512
|
-
throw new
|
|
642
|
+
throw new S(
|
|
513
643
|
"Failed to resolve entity",
|
|
514
644
|
"lib/api/events/resolvePublicEntity"
|
|
515
645
|
);
|
|
516
646
|
return n;
|
|
517
|
-
} catch (
|
|
518
|
-
return
|
|
647
|
+
} catch (r) {
|
|
648
|
+
return m.error("Error resolving public entity:", r), null;
|
|
519
649
|
}
|
|
520
650
|
}
|
|
521
|
-
async function
|
|
651
|
+
async function Vt(t) {
|
|
522
652
|
try {
|
|
523
|
-
const e = await
|
|
524
|
-
`${
|
|
653
|
+
const e = await E(
|
|
654
|
+
`${c()}/series/${t}/page`
|
|
525
655
|
);
|
|
526
656
|
if (!e)
|
|
527
|
-
throw new
|
|
657
|
+
throw new S(
|
|
528
658
|
"Failed to fetch series page",
|
|
529
659
|
"lib/api/events/fetchSeriesPage"
|
|
530
660
|
);
|
|
531
661
|
return e;
|
|
532
662
|
} catch (e) {
|
|
533
|
-
return
|
|
663
|
+
return m.error("Error fetching series page:", e), null;
|
|
534
664
|
}
|
|
535
665
|
}
|
|
536
|
-
async function
|
|
666
|
+
async function qt(t, e) {
|
|
537
667
|
try {
|
|
538
|
-
const
|
|
668
|
+
const r = e ? `${c()}/collections/${t}?password=${encodeURIComponent(e)}` : `${c()}/collections/${t}`, n = await E(r);
|
|
539
669
|
if (!n)
|
|
540
|
-
throw new
|
|
670
|
+
throw new S(
|
|
541
671
|
"Failed to fetch collection",
|
|
542
672
|
"lib/api/events/fetchPublicCollection"
|
|
543
673
|
);
|
|
544
674
|
return n;
|
|
545
|
-
} catch (
|
|
546
|
-
return
|
|
675
|
+
} catch (r) {
|
|
676
|
+
return m.error("Error fetching collection:", r), null;
|
|
547
677
|
}
|
|
548
678
|
}
|
|
549
|
-
async function
|
|
679
|
+
async function Lt(t, e) {
|
|
550
680
|
try {
|
|
551
|
-
const
|
|
552
|
-
return (await
|
|
553
|
-
`${
|
|
681
|
+
const r = encodeURIComponent(e);
|
|
682
|
+
return (await E(
|
|
683
|
+
`${c()}/collections/${t}/check-password/${r}`
|
|
554
684
|
))?.valid === !0;
|
|
555
|
-
} catch (
|
|
556
|
-
return
|
|
685
|
+
} catch (r) {
|
|
686
|
+
return m.error("Error checking collection password:", r), !1;
|
|
557
687
|
}
|
|
558
688
|
}
|
|
559
|
-
async function
|
|
689
|
+
async function Mt(t, e) {
|
|
560
690
|
try {
|
|
561
|
-
const
|
|
562
|
-
`${
|
|
691
|
+
const r = await f(
|
|
692
|
+
`${c()}/events/${t}/check-password`,
|
|
563
693
|
{ password: e }
|
|
564
694
|
);
|
|
565
|
-
if (!
|
|
566
|
-
const n =
|
|
695
|
+
if (!r.success) return { valid: !1 };
|
|
696
|
+
const n = r.data;
|
|
567
697
|
return typeof n == "boolean" ? { valid: n } : { valid: n.valid === !0 };
|
|
568
|
-
} catch (
|
|
569
|
-
return
|
|
698
|
+
} catch (r) {
|
|
699
|
+
return m.error("Error checking event password:", r), { valid: !1 };
|
|
570
700
|
}
|
|
571
701
|
}
|
|
572
|
-
async function
|
|
702
|
+
async function Gt(t, e) {
|
|
573
703
|
try {
|
|
574
|
-
const
|
|
575
|
-
return (await fetch(
|
|
704
|
+
const r = e ? `${c()}/events/venue/${e}` : t ? `${c()}/venues/organization/${t}` : `${c()}/health`;
|
|
705
|
+
return (await fetch(r, {
|
|
576
706
|
method: "HEAD"
|
|
577
707
|
})).ok;
|
|
578
|
-
} catch (
|
|
579
|
-
return
|
|
708
|
+
} catch (r) {
|
|
709
|
+
return m.error("Network connection test failed:", r), !1;
|
|
580
710
|
}
|
|
581
711
|
}
|
|
582
|
-
const
|
|
583
|
-
async function
|
|
712
|
+
const P = b("VC");
|
|
713
|
+
async function Be(t) {
|
|
584
714
|
try {
|
|
585
|
-
if (!
|
|
586
|
-
return
|
|
587
|
-
const e = await $(`/venues/${
|
|
588
|
-
return e.success ? e.data ?? null : (
|
|
715
|
+
if (!t)
|
|
716
|
+
return P.warn("getVenue called without venueId"), null;
|
|
717
|
+
const e = await $(`/venues/${t}`);
|
|
718
|
+
return e.success ? e.data ?? null : (P.error(`Failed to fetch venue: ${e.statusCode}`), null);
|
|
589
719
|
} catch (e) {
|
|
590
|
-
return
|
|
720
|
+
return P.error("Error fetching venue:", e), null;
|
|
591
721
|
}
|
|
592
722
|
}
|
|
593
|
-
async function
|
|
594
|
-
const e = await
|
|
723
|
+
async function jt(t) {
|
|
724
|
+
const e = await Be(t);
|
|
595
725
|
return e ? {
|
|
596
726
|
serviceFeePercentage: e.serviceFeePercentage ?? 0,
|
|
597
727
|
serviceFeeCents: e.serviceFeeCents ?? 0,
|
|
598
728
|
taxPercentage: e.taxPercentage ?? 0
|
|
599
729
|
} : null;
|
|
600
730
|
}
|
|
601
|
-
async function
|
|
731
|
+
async function zt(t) {
|
|
602
732
|
try {
|
|
603
|
-
if (!
|
|
604
|
-
return
|
|
605
|
-
const e = encodeURIComponent(
|
|
606
|
-
return
|
|
733
|
+
if (!t)
|
|
734
|
+
return P.warn("getVenueBySlug called without slug"), null;
|
|
735
|
+
const e = encodeURIComponent(t), r = await $(`/venues/slug/${e}`);
|
|
736
|
+
return r.success ? r.data ?? null : (P.error(`Failed to fetch venue by slug: ${r.statusCode}`), null);
|
|
607
737
|
} catch (e) {
|
|
608
|
-
return
|
|
738
|
+
return P.error("Error fetching venue by slug:", e), null;
|
|
609
739
|
}
|
|
610
740
|
}
|
|
611
|
-
function
|
|
612
|
-
const e =
|
|
741
|
+
function He(t) {
|
|
742
|
+
const e = t ?? {}, r = (e.appliedAmount ?? 0) / 100, n = e.remainingTotal ?? 0, a = e.fullyCoveredByCard ?? n <= 0, s = !a;
|
|
613
743
|
return {
|
|
614
744
|
valid: !0,
|
|
615
745
|
giftCardCode: e.giftCardCode,
|
|
616
|
-
giftCardAmount:
|
|
746
|
+
giftCardAmount: r,
|
|
617
747
|
giftCardBalance: e.giftCardBalance,
|
|
618
748
|
paymentType: a ? "gift_card_only" : "split",
|
|
619
749
|
stripeAmount: n,
|
|
620
|
-
orderTotal:
|
|
621
|
-
requiresStripe:
|
|
750
|
+
orderTotal: r + n,
|
|
751
|
+
requiresStripe: s
|
|
622
752
|
};
|
|
623
753
|
}
|
|
624
|
-
const
|
|
625
|
-
async function
|
|
754
|
+
const h = b("VC"), We = "https://get-micdrop.com", Qe = `${We}/api/orders/v2`, G = () => I();
|
|
755
|
+
async function Bt(t) {
|
|
626
756
|
try {
|
|
627
|
-
const e = await
|
|
628
|
-
`${
|
|
629
|
-
|
|
757
|
+
const e = await f(
|
|
758
|
+
`${Qe}/gift-cards`,
|
|
759
|
+
t
|
|
630
760
|
);
|
|
631
761
|
if (!e.success)
|
|
632
|
-
throw
|
|
633
|
-
|
|
762
|
+
throw h.error("Gift card purchase creation failed:", e.error), new S(
|
|
763
|
+
e.error || "Failed to create gift card purchase",
|
|
764
|
+
"lib/api/gift-cards/createGiftCardPurchase"
|
|
765
|
+
);
|
|
766
|
+
return h.debug("Gift card purchase created:", e.data), e.data;
|
|
634
767
|
} catch (e) {
|
|
635
|
-
return
|
|
768
|
+
return h.error("Gift card purchase creation error:", e), null;
|
|
636
769
|
}
|
|
637
770
|
}
|
|
638
|
-
async function
|
|
771
|
+
async function Ht(t, e) {
|
|
639
772
|
try {
|
|
640
|
-
const
|
|
641
|
-
`${
|
|
773
|
+
const r = await f(
|
|
774
|
+
`${G()}/cart/${t}/apply-gift-card`,
|
|
642
775
|
{ giftCardCode: e }
|
|
643
776
|
);
|
|
644
|
-
return
|
|
777
|
+
return r.success ? He(r.data) : r.statusCode === 429 ? {
|
|
645
778
|
valid: !1,
|
|
646
779
|
error: "Too many attempts. Please wait a moment and try again."
|
|
647
|
-
} : (
|
|
648
|
-
|
|
649
|
-
|
|
780
|
+
} : (h.error("Apply gift card failed:", r.error), {
|
|
781
|
+
valid: !1,
|
|
782
|
+
error: r.error || "Invalid gift card code"
|
|
783
|
+
});
|
|
784
|
+
} catch (r) {
|
|
785
|
+
return h.error("applyGiftCard error:", r), {
|
|
650
786
|
valid: !1,
|
|
651
787
|
error: "Network error. Please check your connection and try again."
|
|
652
788
|
};
|
|
653
789
|
}
|
|
654
790
|
}
|
|
655
|
-
async function
|
|
791
|
+
async function Wt(t, e) {
|
|
656
792
|
try {
|
|
657
|
-
const
|
|
658
|
-
`${
|
|
793
|
+
const r = await ge(
|
|
794
|
+
`${G()}/cart/${t}/gift-card`,
|
|
659
795
|
e ? { body: JSON.stringify({ giftCardCode: e }) } : void 0
|
|
660
796
|
);
|
|
661
|
-
return
|
|
662
|
-
|
|
663
|
-
|
|
797
|
+
return r.success ? { success: !0 } : (h.error("Remove gift card failed:", r.error), {
|
|
798
|
+
success: !1,
|
|
799
|
+
error: r.error || "Failed to remove gift card"
|
|
800
|
+
});
|
|
801
|
+
} catch (r) {
|
|
802
|
+
return h.error("removeGiftCard error:", r), {
|
|
664
803
|
success: !1,
|
|
665
804
|
error: "Network error. Please check your connection and try again."
|
|
666
805
|
};
|
|
667
806
|
}
|
|
668
807
|
}
|
|
669
|
-
async function
|
|
808
|
+
async function Qt(t, e) {
|
|
670
809
|
try {
|
|
671
|
-
const
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
);
|
|
681
|
-
return
|
|
810
|
+
const r = await f(`${G()}/cart/${t}/complete-gift-card-payment`, {
|
|
811
|
+
firstName: e.firstName,
|
|
812
|
+
lastName: e.lastName,
|
|
813
|
+
email: e.email,
|
|
814
|
+
phoneNumber: e.phoneNumber || null,
|
|
815
|
+
mailingList: e.mailingList || !1,
|
|
816
|
+
// Order attribution (MISSION-TRUTH C2) — gift-card-only orders take this
|
|
817
|
+
// finalize endpoint, so attribution must ride here too; additive.
|
|
818
|
+
attribution: U()
|
|
819
|
+
});
|
|
820
|
+
return r.success ? {
|
|
682
821
|
success: !0,
|
|
683
|
-
orderId:
|
|
684
|
-
confirmationNumber:
|
|
685
|
-
} : (
|
|
686
|
-
|
|
687
|
-
|
|
822
|
+
orderId: r.data?.orderId,
|
|
823
|
+
confirmationNumber: r.data?.confirmationNumber
|
|
824
|
+
} : (h.error("Complete gift card payment failed:", r.error), {
|
|
825
|
+
success: !1,
|
|
826
|
+
error: r.error || "Failed to complete payment"
|
|
827
|
+
});
|
|
828
|
+
} catch (r) {
|
|
829
|
+
return h.error("completeGiftCardPayment error:", r), {
|
|
688
830
|
success: !1,
|
|
689
831
|
error: "Network error. Please check your connection and try again."
|
|
690
832
|
};
|
|
691
833
|
}
|
|
692
834
|
}
|
|
693
|
-
const
|
|
835
|
+
const L = b("VC"), Je = {
|
|
694
836
|
waitlist_not_enabled: "Waitlist is not available for this event",
|
|
695
837
|
event_not_found: "Event not found",
|
|
696
838
|
invalid_phone: "Please enter a valid phone number",
|
|
697
839
|
already_purchased: "You have already purchased tickets for this event",
|
|
698
840
|
phone_already_registered: "This phone number is already on the waitlist"
|
|
699
841
|
};
|
|
700
|
-
async function
|
|
842
|
+
async function Jt(t, e, r = null, n = !1) {
|
|
701
843
|
try {
|
|
702
844
|
const a = { email: e };
|
|
703
|
-
|
|
704
|
-
const
|
|
705
|
-
`/events/${
|
|
845
|
+
r && n && (a.phone = r, a.smsOptIn = !0);
|
|
846
|
+
const s = await f(
|
|
847
|
+
`/events/${t}/waitlist`,
|
|
706
848
|
a
|
|
707
849
|
);
|
|
708
|
-
return
|
|
850
|
+
return s.success ? {
|
|
709
851
|
success: !0,
|
|
710
|
-
updated:
|
|
711
|
-
} : (
|
|
852
|
+
updated: s.data?.updated
|
|
853
|
+
} : (L.error("Join waitlist failed:", s.error), {
|
|
712
854
|
success: !1,
|
|
713
|
-
error:
|
|
855
|
+
error: Je[s.error ?? ""] || "Failed to join waitlist. Please try again."
|
|
714
856
|
});
|
|
715
857
|
} catch (a) {
|
|
716
|
-
return
|
|
858
|
+
return L.error("joinWaitlist error:", a), {
|
|
717
859
|
success: !1,
|
|
718
860
|
error: "Network error. Please check your connection and try again."
|
|
719
861
|
};
|
|
720
862
|
}
|
|
721
863
|
}
|
|
722
|
-
async function
|
|
864
|
+
async function Yt(t) {
|
|
723
865
|
const e = {
|
|
724
866
|
waitlistEnabled: !1,
|
|
725
867
|
soldOut: !1,
|
|
726
868
|
gated: !1
|
|
727
869
|
};
|
|
728
870
|
try {
|
|
729
|
-
const
|
|
730
|
-
`/events/${
|
|
871
|
+
const r = await $(
|
|
872
|
+
`/events/${t}/waitlist/status`
|
|
731
873
|
);
|
|
732
|
-
return
|
|
733
|
-
waitlistEnabled: !!
|
|
734
|
-
soldOut: !!
|
|
735
|
-
gated: !!
|
|
874
|
+
return r.success ? {
|
|
875
|
+
waitlistEnabled: !!r.data?.waitlistEnabled,
|
|
876
|
+
soldOut: !!r.data?.soldOut,
|
|
877
|
+
gated: !!r.data?.gated
|
|
736
878
|
} : e;
|
|
737
|
-
} catch (
|
|
738
|
-
return
|
|
879
|
+
} catch (r) {
|
|
880
|
+
return L.error("getWaitlistStatus error:", r), e;
|
|
739
881
|
}
|
|
740
882
|
}
|
|
741
|
-
function
|
|
883
|
+
function Kt(t, e, r = {}) {
|
|
742
884
|
const {
|
|
743
885
|
cancelled: n = !1,
|
|
744
886
|
isRegistration: a = !1,
|
|
745
|
-
waitlistEnabled:
|
|
746
|
-
} =
|
|
887
|
+
waitlistEnabled: s = !1
|
|
888
|
+
} = r, o = /* @__PURE__ */ new Date();
|
|
747
889
|
if (n)
|
|
748
890
|
return { text: "Cancelled", disabled: !0, reason: "cancelled" };
|
|
749
|
-
const i =
|
|
750
|
-
if (i && new Date(i) <
|
|
891
|
+
const i = t.endDateTime || t.startDateTime;
|
|
892
|
+
if (i && new Date(i) < o)
|
|
751
893
|
return { text: "Sales ended", disabled: !0, reason: "event_past" };
|
|
752
|
-
const
|
|
753
|
-
(
|
|
894
|
+
const u = t?.hasPurchasableHiddenTickets === !0 || Array.isArray(e) && e.some(me), C = (e || []).filter(
|
|
895
|
+
(l) => l.salesChannel !== 2 && !l.isHidden && !(typeof l.visibility == "number" && l.visibility >= 2)
|
|
754
896
|
);
|
|
755
|
-
if (
|
|
756
|
-
return
|
|
897
|
+
if (C.length === 0)
|
|
898
|
+
return u ? {
|
|
757
899
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
758
900
|
disabled: !1,
|
|
759
901
|
reason: "hidden_only"
|
|
@@ -762,67 +904,67 @@ function pr(r, e, t = {}) {
|
|
|
762
904
|
disabled: !0,
|
|
763
905
|
reason: "no_tickets"
|
|
764
906
|
};
|
|
765
|
-
let
|
|
766
|
-
for (const
|
|
767
|
-
const
|
|
768
|
-
if (!A && !
|
|
769
|
-
const
|
|
770
|
-
(!
|
|
907
|
+
let y = !1, k = !0, g = !0, v = null;
|
|
908
|
+
for (const l of C) {
|
|
909
|
+
const T = l.salesBegin || l.salesStart || l.saleBegin || l.onSaleStart, x = l.salesEnd || l.saleEnd || l.onSaleEnd, _ = l.remainingCapacity ?? l.quantityRemaining ?? l.quantity, A = l.soldOut || _ != null && _ <= 0, D = T ? new Date(T) > o : !1, j = x ? new Date(x) < o : !1;
|
|
910
|
+
if (!A && !D && !j && (y = !0), A || (k = !1), D || (g = !1), D && T && !A && !j) {
|
|
911
|
+
const z = new Date(T);
|
|
912
|
+
(!v || z < v) && (v = z);
|
|
771
913
|
}
|
|
772
914
|
}
|
|
773
|
-
if (
|
|
915
|
+
if (y)
|
|
774
916
|
return {
|
|
775
917
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
776
918
|
disabled: !1,
|
|
777
919
|
reason: "available"
|
|
778
920
|
};
|
|
779
|
-
if (g &&
|
|
780
|
-
if (
|
|
921
|
+
if (g && v) {
|
|
922
|
+
if (u)
|
|
781
923
|
return {
|
|
782
924
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
783
925
|
disabled: !1,
|
|
784
926
|
reason: "hidden_only"
|
|
785
927
|
};
|
|
786
|
-
const
|
|
787
|
-
let
|
|
788
|
-
if (
|
|
789
|
-
|
|
790
|
-
else if (
|
|
791
|
-
|
|
792
|
-
|
|
928
|
+
const l = v.getTime() - o.getTime(), T = l / (1e3 * 60 * 60), x = l / (1e3 * 60 * 60 * 24);
|
|
929
|
+
let _;
|
|
930
|
+
if (T < 24)
|
|
931
|
+
_ = B(v, { hour12: !0 }, "en-US");
|
|
932
|
+
else if (x <= 7)
|
|
933
|
+
_ = H(
|
|
934
|
+
v,
|
|
793
935
|
{ weekday: "short", hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
794
936
|
"en-US"
|
|
795
937
|
);
|
|
796
938
|
else {
|
|
797
|
-
const A =
|
|
798
|
-
|
|
939
|
+
const A = H(
|
|
940
|
+
v,
|
|
799
941
|
{ month: "short", day: "numeric" },
|
|
800
942
|
"en-US"
|
|
801
|
-
),
|
|
802
|
-
|
|
943
|
+
), D = B(v, { hour12: !0 }, "en-US");
|
|
944
|
+
_ = `${A} ${D}`;
|
|
803
945
|
}
|
|
804
946
|
return {
|
|
805
|
-
text: `On sale ${
|
|
947
|
+
text: `On sale ${_}`,
|
|
806
948
|
disabled: !0,
|
|
807
949
|
reason: "coming_soon"
|
|
808
950
|
};
|
|
809
951
|
}
|
|
810
|
-
return k ?
|
|
952
|
+
return k ? u ? {
|
|
811
953
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
812
954
|
disabled: !1,
|
|
813
955
|
reason: "hidden_only"
|
|
814
|
-
} :
|
|
956
|
+
} : s ? {
|
|
815
957
|
text: "Join Waitlist",
|
|
816
958
|
disabled: !1,
|
|
817
959
|
reason: "sold_out_waitlist"
|
|
818
|
-
} : { text: "Sold out", disabled: !0, reason: "sold_out" } :
|
|
960
|
+
} : { text: "Sold out", disabled: !0, reason: "sold_out" } : u ? {
|
|
819
961
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
820
962
|
disabled: !1,
|
|
821
963
|
reason: "hidden_only"
|
|
822
964
|
} : { text: "Sales ended", disabled: !0, reason: "sales_ended" };
|
|
823
965
|
}
|
|
824
|
-
function
|
|
825
|
-
const e =
|
|
966
|
+
function ae(t) {
|
|
967
|
+
const e = t;
|
|
826
968
|
return {
|
|
827
969
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
828
970
|
id: e.id || e.ID,
|
|
@@ -839,8 +981,8 @@ function W(r) {
|
|
|
839
981
|
checkedInAt: e.checkedInAt || e.checked_in_at
|
|
840
982
|
};
|
|
841
983
|
}
|
|
842
|
-
function
|
|
843
|
-
const e =
|
|
984
|
+
function se(t) {
|
|
985
|
+
const e = t, r = e.purchasedTickets || e.tickets || e.purchased_tickets || [];
|
|
844
986
|
return {
|
|
845
987
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
846
988
|
id: e.id || e.ID,
|
|
@@ -855,21 +997,21 @@ function Q(r) {
|
|
|
855
997
|
discount: e.discount || 0,
|
|
856
998
|
paymentIntentId: e.paymentIntentId || e.payment_intent_id,
|
|
857
999
|
paymentMethod: e.paymentMethod || e.payment_method,
|
|
858
|
-
purchasedTickets:
|
|
1000
|
+
purchasedTickets: r.map(ae),
|
|
859
1001
|
createdAt: e.createdAt || e.created_at,
|
|
860
1002
|
updatedAt: e.updatedAt || e.updated_at
|
|
861
1003
|
};
|
|
862
1004
|
}
|
|
863
|
-
const
|
|
864
|
-
function
|
|
865
|
-
const e =
|
|
1005
|
+
const Zt = ae, Xt = se;
|
|
1006
|
+
function er(t) {
|
|
1007
|
+
const e = se(t), r = e.uuid.split("-")[0] || e.uuid;
|
|
866
1008
|
return {
|
|
867
1009
|
orderId: e.uuid,
|
|
868
|
-
displayOrderId:
|
|
1010
|
+
displayOrderId: r,
|
|
869
1011
|
email: e.customerEmail,
|
|
870
1012
|
customerName: [e.customerFirstName, e.customerLastName].filter(Boolean).join(" "),
|
|
871
1013
|
total: e.totalAmount,
|
|
872
|
-
formattedTotal: `${
|
|
1014
|
+
formattedTotal: `${fe(
|
|
873
1015
|
e.totalAmount / 100
|
|
874
1016
|
/* FIXME(canonical-cleanup:toFixed): this cast bypasses the brand boundary; replace with toCents/toUSD at the API-response-transform layer. */
|
|
875
1017
|
)}`,
|
|
@@ -877,37 +1019,50 @@ function gr(r) {
|
|
|
877
1019
|
status: e.status
|
|
878
1020
|
};
|
|
879
1021
|
}
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
1022
|
+
function Ye(t) {
|
|
1023
|
+
return K(t, { cdn: !0 });
|
|
1024
|
+
}
|
|
1025
|
+
function J(t) {
|
|
1026
|
+
const e = t.imageUrl || t.imageURL || t.image_url || t.image || "";
|
|
1027
|
+
return Ye(e);
|
|
1028
|
+
}
|
|
1029
|
+
function Ke(t) {
|
|
1030
|
+
switch (t) {
|
|
1031
|
+
case "available":
|
|
1032
|
+
case "sold_out":
|
|
1033
|
+
case "coming_soon":
|
|
1034
|
+
case "ended":
|
|
1035
|
+
return t;
|
|
1036
|
+
default:
|
|
1037
|
+
return null;
|
|
1038
|
+
}
|
|
887
1039
|
}
|
|
888
|
-
function
|
|
889
|
-
const e =
|
|
890
|
-
if (e)
|
|
891
|
-
|
|
892
|
-
|
|
1040
|
+
function Ze(t) {
|
|
1041
|
+
const e = t.ctaState || t.cta_state;
|
|
1042
|
+
if (e) {
|
|
1043
|
+
const o = Ke(e);
|
|
1044
|
+
if (o)
|
|
1045
|
+
return o;
|
|
1046
|
+
}
|
|
1047
|
+
if (t.isCancelled || t.is_cancelled)
|
|
893
1048
|
return "ended";
|
|
894
|
-
const
|
|
895
|
-
if (
|
|
896
|
-
const
|
|
897
|
-
if (
|
|
1049
|
+
const r = t.startDateTime || t.start_date_time || t.date;
|
|
1050
|
+
if (r) {
|
|
1051
|
+
const o = new Date(r).getTime(), i = Date.now();
|
|
1052
|
+
if (o < i)
|
|
898
1053
|
return "ended";
|
|
899
1054
|
}
|
|
900
|
-
const n =
|
|
1055
|
+
const n = t.ticketsAvailable ?? t.tickets_available;
|
|
901
1056
|
if (n !== void 0)
|
|
902
1057
|
return n <= 0 ? "sold_out" : "available";
|
|
903
|
-
const a =
|
|
904
|
-
return a.length === 0 ? "coming_soon" : a.reduce((
|
|
905
|
-
const
|
|
906
|
-
return
|
|
1058
|
+
const a = t.availableTickets || t.available_tickets || t.tickets || [];
|
|
1059
|
+
return a.length === 0 ? "coming_soon" : a.reduce((o, i) => {
|
|
1060
|
+
const u = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0, C = i.quantitySold ?? i.quantity_sold ?? 0;
|
|
1061
|
+
return o + Math.max(0, u - C);
|
|
907
1062
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
908
1063
|
}
|
|
909
|
-
function
|
|
910
|
-
const e =
|
|
1064
|
+
function oe(t) {
|
|
1065
|
+
const e = t;
|
|
911
1066
|
return {
|
|
912
1067
|
id: e.id || e.ID,
|
|
913
1068
|
name: e.name || e.ticketName || "",
|
|
@@ -927,8 +1082,8 @@ function J(r) {
|
|
|
927
1082
|
sortOrder: e.sortOrder || e.sort_order || 0
|
|
928
1083
|
};
|
|
929
1084
|
}
|
|
930
|
-
function
|
|
931
|
-
const e =
|
|
1085
|
+
function ie(t) {
|
|
1086
|
+
const e = t, n = (e.availableTickets || e.available_tickets || e.tickets || []).map(oe), a = n.map((i) => i.price).filter((i) => i > 0), s = a.length > 0 ? Math.min(...a) : void 0, o = a.length > 0 ? Math.max(...a) : void 0;
|
|
932
1087
|
return {
|
|
933
1088
|
eventID: e.eventID || e.id || e.ID || 0,
|
|
934
1089
|
id: e.id || e.ID,
|
|
@@ -945,18 +1100,18 @@ function Z(r) {
|
|
|
945
1100
|
venueName: e.venueName || e.venue_name,
|
|
946
1101
|
venueAddress: e.venueAddress || e.venue_address,
|
|
947
1102
|
location: e.location || e.venueAddress || e.venue_address,
|
|
948
|
-
imageUrl:
|
|
949
|
-
imageURL:
|
|
1103
|
+
imageUrl: J(e),
|
|
1104
|
+
imageURL: J(e),
|
|
950
1105
|
status: e.status,
|
|
951
1106
|
isPublished: e.isPublished ?? e.is_published,
|
|
952
1107
|
isCancelled: e.isCancelled ?? e.is_cancelled,
|
|
953
1108
|
availableTickets: n,
|
|
954
|
-
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? n.reduce((i,
|
|
1109
|
+
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? n.reduce((i, u) => i + (u.quantityAvailable || 0), 0),
|
|
955
1110
|
ticketsSold: e.ticketsSold ?? e.tickets_sold,
|
|
956
|
-
minPrice: e.minPrice ?? e.min_price ??
|
|
957
|
-
maxPrice: e.maxPrice ?? e.max_price ??
|
|
1111
|
+
minPrice: e.minPrice ?? e.min_price ?? s,
|
|
1112
|
+
maxPrice: e.maxPrice ?? e.max_price ?? o,
|
|
958
1113
|
ctaText: e.ctaText || e.cta_text,
|
|
959
|
-
ctaState:
|
|
1114
|
+
ctaState: Ze(e),
|
|
960
1115
|
showPerformers: e.showPerformers ?? e.show_performers,
|
|
961
1116
|
eventSeriesId: e.eventSeriesId || e.event_series_id,
|
|
962
1117
|
seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number,
|
|
@@ -990,12 +1145,12 @@ function Z(r) {
|
|
|
990
1145
|
purchasedTickets: e.purchasedTickets
|
|
991
1146
|
};
|
|
992
1147
|
}
|
|
993
|
-
const
|
|
994
|
-
function
|
|
995
|
-
return
|
|
1148
|
+
const tr = oe, rr = ie, nr = ie;
|
|
1149
|
+
function Xe(t) {
|
|
1150
|
+
return K(t, { cdn: !0 });
|
|
996
1151
|
}
|
|
997
|
-
function
|
|
998
|
-
const e =
|
|
1152
|
+
function et(t) {
|
|
1153
|
+
const e = t, r = e.logoUrl || e.logo_url || e.logo;
|
|
999
1154
|
return {
|
|
1000
1155
|
id: e.id || e.ID || 0,
|
|
1001
1156
|
name: e.name || "",
|
|
@@ -1007,163 +1162,102 @@ function ve(r) {
|
|
|
1007
1162
|
zipCode: e.zipCode || e.zip_code,
|
|
1008
1163
|
country: e.country,
|
|
1009
1164
|
timezone: e.timezone || e.time_zone,
|
|
1010
|
-
logoUrl:
|
|
1165
|
+
logoUrl: Xe(r),
|
|
1011
1166
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
1012
1167
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
1013
1168
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
|
|
1014
1169
|
organizationId: e.organizationId || e.organization_id
|
|
1015
1170
|
};
|
|
1016
1171
|
}
|
|
1017
|
-
const
|
|
1018
|
-
function
|
|
1019
|
-
const e =
|
|
1172
|
+
const ar = et;
|
|
1173
|
+
function sr(t) {
|
|
1174
|
+
const e = t;
|
|
1020
1175
|
return {
|
|
1021
1176
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
1022
1177
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
1023
1178
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
|
|
1024
1179
|
};
|
|
1025
1180
|
}
|
|
1026
|
-
function
|
|
1027
|
-
return [
|
|
1181
|
+
function or(t) {
|
|
1182
|
+
return [t.address, t.city, t.state, t.zipCode].filter(
|
|
1028
1183
|
Boolean
|
|
1029
1184
|
).join(", ");
|
|
1030
1185
|
}
|
|
1031
|
-
function x(r) {
|
|
1032
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1033
|
-
var t = arguments[e];
|
|
1034
|
-
for (var n in t)
|
|
1035
|
-
n !== "__proto__" && (r[n] = t[n]);
|
|
1036
|
-
}
|
|
1037
|
-
return r;
|
|
1038
|
-
}
|
|
1039
|
-
var ge = {
|
|
1040
|
-
read: function(r) {
|
|
1041
|
-
return r[0] === '"' && (r = r.slice(1, -1)), r.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
1042
|
-
},
|
|
1043
|
-
write: function(r) {
|
|
1044
|
-
return encodeURIComponent(r).replace(
|
|
1045
|
-
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
1046
|
-
decodeURIComponent
|
|
1047
|
-
);
|
|
1048
|
-
}
|
|
1049
|
-
};
|
|
1050
|
-
function q(r, e) {
|
|
1051
|
-
function t(a, o, s) {
|
|
1052
|
-
if (!(typeof document > "u")) {
|
|
1053
|
-
s = x({}, e, s), typeof s.expires == "number" && (s.expires = new Date(Date.now() + s.expires * 864e5)), s.expires && (s.expires = s.expires.toUTCString()), a = encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
1054
|
-
var i = "";
|
|
1055
|
-
for (var c in s)
|
|
1056
|
-
s[c] && (i += "; " + c, s[c] !== !0 && (i += "=" + s[c].split(";")[0]));
|
|
1057
|
-
return document.cookie = a + "=" + r.write(o, a) + i;
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
function n(a) {
|
|
1061
|
-
if (!(typeof document > "u" || arguments.length && !a)) {
|
|
1062
|
-
for (var o = document.cookie ? document.cookie.split("; ") : [], s = {}, i = 0; i < o.length; i++) {
|
|
1063
|
-
var c = o[i].split("="), _ = c.slice(1).join("=");
|
|
1064
|
-
try {
|
|
1065
|
-
var m = decodeURIComponent(c[0]);
|
|
1066
|
-
if (m in s || (s[m] = r.read(_, m)), a === m)
|
|
1067
|
-
break;
|
|
1068
|
-
} catch {
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
return a ? s[a] : s;
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
return Object.create(
|
|
1075
|
-
{
|
|
1076
|
-
set: t,
|
|
1077
|
-
get: n,
|
|
1078
|
-
remove: function(a, o) {
|
|
1079
|
-
t(
|
|
1080
|
-
a,
|
|
1081
|
-
"",
|
|
1082
|
-
x({}, o, {
|
|
1083
|
-
expires: -1
|
|
1084
|
-
})
|
|
1085
|
-
);
|
|
1086
|
-
},
|
|
1087
|
-
withAttributes: function(a) {
|
|
1088
|
-
return q(this.converter, x({}, this.attributes, a));
|
|
1089
|
-
},
|
|
1090
|
-
withConverter: function(a) {
|
|
1091
|
-
return q(x({}, this.converter, a), this.attributes);
|
|
1092
|
-
}
|
|
1093
|
-
},
|
|
1094
|
-
{
|
|
1095
|
-
attributes: { value: Object.freeze(e) },
|
|
1096
|
-
converter: { value: Object.freeze(r) }
|
|
1097
|
-
}
|
|
1098
|
-
);
|
|
1099
|
-
}
|
|
1100
|
-
q(ge, { path: "/" });
|
|
1101
|
-
L("checkoutState");
|
|
1102
|
-
L("orderApi");
|
|
1103
|
-
L("utm");
|
|
1104
1186
|
export {
|
|
1105
|
-
|
|
1187
|
+
ge as apiDelete,
|
|
1106
1188
|
$ as apiGet,
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1189
|
+
f as apiPost,
|
|
1190
|
+
lt as apiPut,
|
|
1191
|
+
Ht as applyGiftCard,
|
|
1192
|
+
Tt as applyPromoCode,
|
|
1193
|
+
Ze as calculateCtaState,
|
|
1194
|
+
yt as cancelReservation,
|
|
1195
|
+
Lt as checkCollectionPassword,
|
|
1196
|
+
Mt as checkEventPassword,
|
|
1197
|
+
Qt as completeGiftCardPayment,
|
|
1198
|
+
pt as completeReservation,
|
|
1199
|
+
Kt as computeCtaState,
|
|
1200
|
+
ot as configureApi,
|
|
1201
|
+
Bt as createGiftCardPurchase,
|
|
1202
|
+
gt as createOrder,
|
|
1203
|
+
dt as createPaymentIntent,
|
|
1204
|
+
N as err,
|
|
1205
|
+
_t as extendCheckoutSession,
|
|
1206
|
+
sr as extractVenueFees,
|
|
1207
|
+
At as fetchAllVenues,
|
|
1208
|
+
qe as fetchAllVenuesResult,
|
|
1209
|
+
It as fetchEventDetails,
|
|
1210
|
+
Rt as fetchEventPerformers,
|
|
1211
|
+
Ve as fetchEventPerformersResult,
|
|
1212
|
+
Et as fetchEventTickets,
|
|
1213
|
+
Fe as fetchEventTicketsResult,
|
|
1214
|
+
qt as fetchPublicCollection,
|
|
1215
|
+
Ot as fetchSeriesOccurrences,
|
|
1216
|
+
ze as fetchSeriesOccurrencesResult,
|
|
1217
|
+
Vt as fetchSeriesPage,
|
|
1218
|
+
Dt as fetchVenueEvents,
|
|
1219
|
+
Le as fetchVenueEventsResult,
|
|
1220
|
+
or as formatVenueAddress,
|
|
1221
|
+
it as getApiConfig,
|
|
1222
|
+
Ye as getCDNImageUrl,
|
|
1223
|
+
ft as getCartByUUID,
|
|
1224
|
+
ut as getClientIP,
|
|
1225
|
+
J as getEventImageUrl,
|
|
1226
|
+
ct as getLegacyPublicUrl,
|
|
1227
|
+
Nt as getMonthEvents,
|
|
1228
|
+
Me as getMonthEventsResult,
|
|
1229
|
+
vt as getOrder,
|
|
1141
1230
|
I as getOrdersV2Url,
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1231
|
+
Ut as getOrgMonthEvents,
|
|
1232
|
+
Ge as getOrgMonthEventsResult,
|
|
1233
|
+
c as getPublicBaseUrl,
|
|
1234
|
+
xt as getSeriesOccurrences,
|
|
1235
|
+
je as getSeriesOccurrencesResult,
|
|
1236
|
+
wt as getSessionStatus,
|
|
1237
|
+
Be as getVenue,
|
|
1238
|
+
zt as getVenueBySlug,
|
|
1239
|
+
jt as getVenueFees,
|
|
1240
|
+
Yt as getWaitlistStatus,
|
|
1241
|
+
Ct as hasPromoCodes,
|
|
1242
|
+
kt as initiateOrder,
|
|
1243
|
+
St as isOk,
|
|
1244
|
+
Jt as joinWaitlist,
|
|
1245
|
+
Oe as ok,
|
|
1246
|
+
Wt as removeGiftCard,
|
|
1247
|
+
Pt as removePromoCode,
|
|
1248
|
+
Ft as resolvePublicEntity,
|
|
1249
|
+
Gt as testNetworkConnection,
|
|
1250
|
+
bt as trackUTMSource,
|
|
1251
|
+
tr as transformAvailableTicket,
|
|
1252
|
+
rr as transformEvent,
|
|
1253
|
+
nr as transformEventData,
|
|
1254
|
+
Xt as transformOrder,
|
|
1255
|
+
er as transformOrderForDisplay,
|
|
1256
|
+
Zt as transformTicket,
|
|
1257
|
+
ar as transformVenue,
|
|
1258
|
+
R as unwrapOr,
|
|
1259
|
+
mt as updateCartQuantities,
|
|
1260
|
+
ht as validatePaymentIntent,
|
|
1261
|
+
$t as validatePromoCode
|
|
1168
1262
|
};
|
|
1169
1263
|
//# sourceMappingURL=api.mjs.map
|