@getmicdrop/venue-calendar 4.0.107 → 4.0.109

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