@getmicdrop/venue-calendar 4.0.68 → 4.0.70

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 (69) hide show
  1. package/dist/{CarouselView.legacy-DtlaKenI.js → CarouselView.legacy-CAtJAiSb.js} +3 -3
  2. package/dist/{CarouselView.legacy-DtlaKenI.js.map → CarouselView.legacy-CAtJAiSb.js.map} +1 -1
  3. package/dist/{CartView-xAVJT3Wf.js → CartView-CpA__vH7.js} +53 -53
  4. package/dist/{CartView-xAVJT3Wf.js.map → CartView-CpA__vH7.js.map} +1 -1
  5. package/dist/{Checkout-C8E5Q9nl.js → Checkout-Bm3yGYYr.js} +278 -273
  6. package/dist/Checkout-Bm3yGYYr.js.map +1 -0
  7. package/dist/{Checkout-WYIEsOZ0.js → Checkout-CRBwRTOc.js} +114 -114
  8. package/dist/{Checkout-WYIEsOZ0.js.map → Checkout-CRBwRTOc.js.map} +1 -1
  9. package/dist/{Checkout.legacy-Bjj390J_.js → Checkout.legacy-CpgxTxZl.js} +5 -5
  10. package/dist/{Checkout.legacy-Bjj390J_.js.map → Checkout.legacy-CpgxTxZl.js.map} +1 -1
  11. package/dist/{CheckoutTimer-DlnXHs-c.js → CheckoutTimer-SMZRnL_T.js} +2 -2
  12. package/dist/{CheckoutTimer-DlnXHs-c.js.map → CheckoutTimer-SMZRnL_T.js.map} +1 -1
  13. package/dist/{CollectionView-89AFwGuE.js → CollectionView-DgVzimMX.js} +5 -5
  14. package/dist/{CollectionView-89AFwGuE.js.map → CollectionView-DgVzimMX.js.map} +1 -1
  15. package/dist/{CollectionView.legacy-Czq6UrTZ.js → CollectionView.legacy-BTAS-mTd.js} +31 -31
  16. package/dist/{CollectionView.legacy-Czq6UrTZ.js.map → CollectionView.legacy-BTAS-mTd.js.map} +1 -1
  17. package/dist/{Event-DhvEjKVz.js → Event-BNVO_E6j.js} +145 -145
  18. package/dist/{Event-DhvEjKVz.js.map → Event-BNVO_E6j.js.map} +1 -1
  19. package/dist/{EventDetailsView-4f1xNl1a.js → EventDetailsView-CXvl9xwe.js} +140 -140
  20. package/dist/EventDetailsView-CXvl9xwe.js.map +1 -0
  21. package/dist/{EventPage-D75bt8XZ.js → EventPage-Dc4CtBeS.js} +5 -5
  22. package/dist/{EventPage-D75bt8XZ.js.map → EventPage-Dc4CtBeS.js.map} +1 -1
  23. package/dist/{EventPage.legacy-DU0ZcZg9.js → EventPage.legacy-D-9svuzb.js} +49 -49
  24. package/dist/{EventPage.legacy-DU0ZcZg9.js.map → EventPage.legacy-D-9svuzb.js.map} +1 -1
  25. package/dist/{FeaturedView.legacy-BgZu-R0y.js → FeaturedView.legacy-BKF3u2sH.js} +19 -19
  26. package/dist/{FeaturedView.legacy-BgZu-R0y.js.map → FeaturedView.legacy-BKF3u2sH.js.map} +1 -1
  27. package/dist/{GalleryCard-DdHqVAXD.js → GalleryCard-lNx3CEtB.js} +9 -9
  28. package/dist/{GalleryCard-DdHqVAXD.js.map → GalleryCard-lNx3CEtB.js.map} +1 -1
  29. package/dist/{GalleryView.legacy-F46Bwi9x.js → GalleryView.legacy-CMjIfp2b.js} +3 -3
  30. package/dist/{GalleryView.legacy-F46Bwi9x.js.map → GalleryView.legacy-CMjIfp2b.js.map} +1 -1
  31. package/dist/{GroupedListView.legacy-CLnOs7Ls.js → GroupedListView.legacy-BybmHzIV.js} +23 -23
  32. package/dist/{GroupedListView.legacy-CLnOs7Ls.js.map → GroupedListView.legacy-BybmHzIV.js.map} +1 -1
  33. package/dist/{OrderSummary-BYSCmf9h.js → OrderSummary-B1GhsUnc.js} +7 -7
  34. package/dist/{OrderSummary-BYSCmf9h.js.map → OrderSummary-B1GhsUnc.js.map} +1 -1
  35. package/dist/{PromoCodeInput-B8agz1bc.js → PromoCodeInput-CrXBD0oq.js} +30 -30
  36. package/dist/{PromoCodeInput-B8agz1bc.js.map → PromoCodeInput-CrXBD0oq.js.map} +1 -1
  37. package/dist/{SeriesPage-CH8STWTA.js → SeriesPage-DEDSbKuu.js} +5 -5
  38. package/dist/{SeriesPage-CH8STWTA.js.map → SeriesPage-DEDSbKuu.js.map} +1 -1
  39. package/dist/{SeriesPage.legacy-Cg5j7_1m.js → SeriesPage.legacy-BlqTBr4n.js} +38 -38
  40. package/dist/{SeriesPage.legacy-Cg5j7_1m.js.map → SeriesPage.legacy-BlqTBr4n.js.map} +1 -1
  41. package/dist/{Success-DMGAgbh-.js → Success-CD4K7aRv.js} +24 -24
  42. package/dist/{Success-DMGAgbh-.js.map → Success-CD4K7aRv.js.map} +1 -1
  43. package/dist/{Success.legacy-CY33Nix8.js → Success.legacy-B1Jvy8N0.js} +2 -2
  44. package/dist/{Success.legacy-CY33Nix8.js.map → Success.legacy-B1Jvy8N0.js.map} +1 -1
  45. package/dist/{VenueCalendar-H0gMPiFX.js → VenueCalendar-BoSdP7xI.js} +1472 -1457
  46. package/dist/{VenueCalendar-H0gMPiFX.js.map → VenueCalendar-BoSdP7xI.js.map} +1 -1
  47. package/dist/{ViewTicketsEmbed-DiGhZiyP.js → ViewTicketsEmbed-D1nD9zJY.js} +42 -42
  48. package/dist/{ViewTicketsEmbed-DiGhZiyP.js.map → ViewTicketsEmbed-D1nD9zJY.js.map} +1 -1
  49. package/dist/{WaitlistModal-CA8-Rcff.js → WaitlistModal-DWcbQmfW.js} +35 -35
  50. package/dist/{WaitlistModal-CA8-Rcff.js.map → WaitlistModal-DWcbQmfW.js.map} +1 -1
  51. package/dist/api/api.cjs +1 -1
  52. package/dist/api/api.cjs.map +1 -1
  53. package/dist/api/api.mjs +160 -157
  54. package/dist/api/api.mjs.map +1 -1
  55. package/dist/{api-IWcZsS94.js → api-CCKXC9Qs.js} +2 -2
  56. package/dist/{api-IWcZsS94.js.map → api-CCKXC9Qs.js.map} +1 -1
  57. package/dist/{data-toggle-store.svelte-D6pqR0Zt.js → data-toggle-store.svelte-CB6WLZEE.js} +2 -2
  58. package/dist/{data-toggle-store.svelte-D6pqR0Zt.js.map → data-toggle-store.svelte-CB6WLZEE.js.map} +1 -1
  59. package/dist/{transform-BPCR9pPY.js → transform-BrlBxayh.js} +6 -3
  60. package/dist/transform-BrlBxayh.js.map +1 -0
  61. package/dist/venue-calendar.es.js +1 -1
  62. package/dist/venue-calendar.iife.js +32 -32
  63. package/dist/venue-calendar.iife.js.map +1 -1
  64. package/dist/venue-calendar.umd.js +30 -30
  65. package/dist/venue-calendar.umd.js.map +1 -1
  66. package/package.json +1 -1
  67. package/dist/Checkout-C8E5Q9nl.js.map +0 -1
  68. package/dist/EventDetailsView-4f1xNl1a.js.map +0 -1
  69. package/dist/transform-BPCR9pPY.js.map +0 -1
package/dist/api/api.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createLogger as P } from "@getmicdrop/svelte-components/utils/logger";
2
- import { AppError as p, formatCurrency as M } from "@getmicdrop/svelte-components";
2
+ import { AppError as D, formatCurrency as M } from "@getmicdrop/svelte-components";
3
3
  import { formatTime as j, formatDateRaw as z } from "@getmicdrop/svelte-components/utils/formatters";
4
4
  const q = P("VC"), W = {
5
5
  baseUrl: "https://get-micdrop.com",
@@ -9,22 +9,22 @@ const q = P("VC"), W = {
9
9
  onError: (e) => q.error("API Error:", e)
10
10
  };
11
11
  let v = { ...W };
12
- function fe(e) {
12
+ function me(e) {
13
13
  v = { ...v, ...e };
14
14
  }
15
- function me() {
15
+ function ye() {
16
16
  return { ...v };
17
17
  }
18
18
  function i() {
19
19
  return `${v.baseUrl}/api/v2/public`;
20
20
  }
21
- function ye() {
21
+ function he() {
22
22
  return `${v.baseUrl}/api/public`;
23
23
  }
24
- function R() {
24
+ function p() {
25
25
  return `${v.baseUrl}/api/orders/v2/public`;
26
26
  }
27
- async function he() {
27
+ async function ge() {
28
28
  return "";
29
29
  }
30
30
  const O = (e) => new Promise((r) => setTimeout(r, e));
@@ -51,18 +51,18 @@ async function H(e, r, t) {
51
51
  throw o;
52
52
  }
53
53
  async function A(e, r) {
54
- return U("GET", e, void 0, r);
54
+ return F("GET", e, void 0, r);
55
55
  }
56
56
  async function y(e, r, t) {
57
- return U("POST", e, r, t);
57
+ return F("POST", e, r, t);
58
58
  }
59
- async function ge(e, r, t) {
60
- return U("PUT", e, r, t);
59
+ async function ve(e, r, t) {
60
+ return F("PUT", e, r, t);
61
61
  }
62
62
  async function Q(e, r) {
63
- return U("DELETE", e, void 0, r);
63
+ return F("DELETE", e, void 0, r);
64
64
  }
65
- async function U(e, r, t, s) {
65
+ async function F(e, r, t, s) {
66
66
  const n = r.startsWith("http") ? r : `${i()}${r}`;
67
67
  try {
68
68
  const a = await H(
@@ -108,27 +108,27 @@ async function h(e, r) {
108
108
  }
109
109
  }
110
110
  const f = P("VC");
111
- async function ve(e, r, t) {
111
+ async function we(e, r, t) {
112
112
  try {
113
113
  const s = await y(
114
- `${R()}/cart/${e}/payment-intent`,
114
+ `${p()}/cart/${e}/payment-intent`,
115
115
  {
116
116
  productQuantities: r,
117
117
  ...t && Object.keys(t).length > 0 ? { donationAmounts: t } : {}
118
118
  }
119
119
  );
120
120
  if (!s.success)
121
- throw f.error("Payment intent creation failed:", s.error), new p(s.error || "Failed to create payment intent", "lib/api/orders/createPaymentIntent");
121
+ throw f.error("Payment intent creation failed:", s.error), new D(s.error || "Failed to create payment intent", "lib/api/orders/createPaymentIntent");
122
122
  return f.debug("Payment intent created:", s.data), s.data;
123
123
  } catch (s) {
124
124
  return f.error("createPaymentIntent error:", s), null;
125
125
  }
126
126
  }
127
- async function we(e, r) {
127
+ async function _e(e, r) {
128
128
  if (!e) return null;
129
129
  try {
130
130
  const t = await A(
131
- `${R()}/cart/${e}`
131
+ `${p()}/cart/${e}`
132
132
  );
133
133
  if (!t.success)
134
134
  return null;
@@ -148,7 +148,7 @@ async function we(e, r) {
148
148
  return f.error("getCartByUUID error:", t), null;
149
149
  }
150
150
  }
151
- async function _e(e, r, t) {
151
+ async function be(e, r, t) {
152
152
  try {
153
153
  const s = {};
154
154
  for (const [o, c] of Object.entries(r)) {
@@ -161,7 +161,7 @@ async function _e(e, r, t) {
161
161
  const l = typeof o == "number" ? o : parseInt(o, 10);
162
162
  !Number.isNaN(l) && c > 0 && (n[l] = c);
163
163
  }
164
- const a = await fetch(`${R()}/cart/${e}`, {
164
+ const a = await fetch(`${p()}/cart/${e}`, {
165
165
  method: "PUT",
166
166
  headers: { "Content-Type": "application/json" },
167
167
  credentials: "include",
@@ -179,7 +179,7 @@ async function _e(e, r, t) {
179
179
  return f.error("updateCartQuantities error:", s), !1;
180
180
  }
181
181
  }
182
- async function be(e) {
182
+ async function $e(e) {
183
183
  try {
184
184
  const r = await y(
185
185
  `${i()}/orders/complete/${e}`
@@ -195,7 +195,7 @@ async function be(e) {
195
195
  return f.error("Error completing reservation:", r), { success: !1, error: "Network error completing reservation" };
196
196
  }
197
197
  }
198
- async function $e(e) {
198
+ async function Ce(e) {
199
199
  try {
200
200
  const r = await y(
201
201
  `${i()}/orders/cancel/${e}`
@@ -211,7 +211,7 @@ async function $e(e) {
211
211
  return f.error("Error cancelling reservation:", r), { success: !1, error: "Network error cancelling reservation" };
212
212
  }
213
213
  }
214
- async function Ce(e, r) {
214
+ async function Pe(e, r) {
215
215
  try {
216
216
  const t = await y(
217
217
  `${i()}/orders/create`,
@@ -222,13 +222,13 @@ async function Ce(e, r) {
222
222
  return f.error("createOrder error:", t), null;
223
223
  }
224
224
  }
225
- async function Pe(e) {
225
+ async function Ae(e) {
226
226
  return h(`${i()}/orders/${e}`);
227
227
  }
228
- async function Ae(e, r) {
228
+ async function Ie(e, r) {
229
229
  try {
230
230
  const t = await y(
231
- `${R()}/validatePaymentIntent/${e}`,
231
+ `${p()}/validatePaymentIntent/${e}`,
232
232
  r
233
233
  );
234
234
  if (!t.success)
@@ -247,7 +247,7 @@ async function Ae(e, r) {
247
247
  return f.error("validatePaymentIntent error:", t), null;
248
248
  }
249
249
  }
250
- async function Ie(e) {
250
+ async function Se(e) {
251
251
  try {
252
252
  const r = await y(
253
253
  `${i()}/orders/extend-session`,
@@ -269,7 +269,7 @@ async function Ie(e) {
269
269
  return f.error("Error extending checkout session:", r), { success: !1, error: "Network error extending session" };
270
270
  }
271
271
  }
272
- async function Se(e) {
272
+ async function De(e) {
273
273
  try {
274
274
  const r = await A(
275
275
  `${i()}/orders/session/${e}`
@@ -302,7 +302,7 @@ async function pe(e = {}) {
302
302
  return f.error("initiateOrder error:", r), null;
303
303
  }
304
304
  }
305
- async function De(e) {
305
+ async function Ne(e) {
306
306
  if (typeof window > "u") return;
307
307
  const t = new URLSearchParams(window.location.search).get("utm_source") || "Direct";
308
308
  try {
@@ -313,8 +313,8 @@ async function De(e) {
313
313
  f.error("UTM tracking failed:", s);
314
314
  }
315
315
  }
316
- const k = P("VC");
317
- async function Ne(e, r) {
316
+ const k = P("VC"), J = () => p();
317
+ async function Re(e, r) {
318
318
  try {
319
319
  if (!r || !r.trim())
320
320
  return { valid: !1, error: "Promo code is required" };
@@ -337,7 +337,7 @@ async function Ne(e, r) {
337
337
  return k.error("Error validating promo code:", t), { valid: !1, error: "Network error validating code" };
338
338
  }
339
339
  }
340
- async function Re(e) {
340
+ async function xe(e) {
341
341
  try {
342
342
  const r = await A(
343
343
  `/promo-codes/check/${e}`
@@ -347,9 +347,12 @@ async function Re(e) {
347
347
  return k.error("Error checking promo codes availability:", r), !0;
348
348
  }
349
349
  }
350
- async function xe(e, r) {
350
+ async function Ue(e, r) {
351
351
  try {
352
- const t = await y(`/orders/${e}/apply-promo`, { code: r });
352
+ const t = await y(
353
+ `${J()}/cart/${e}/apply-promo`,
354
+ { promoCode: r }
355
+ );
353
356
  return t.success ? { success: !0 } : {
354
357
  success: !1,
355
358
  error: t.error || "Failed to apply promo code"
@@ -369,28 +372,28 @@ async function Fe(e) {
369
372
  return k.error("Error removing promo code:", r), { success: !1, error: "Network error removing code" };
370
373
  }
371
374
  }
372
- const u = P("VC"), F = /* @__PURE__ */ new Map();
373
- async function Ue(e, r = fetch) {
375
+ const u = P("VC"), U = /* @__PURE__ */ new Map();
376
+ async function ke(e, r = fetch) {
374
377
  const t = String(e);
375
378
  if (r === fetch) {
376
- const n = F.get(t);
379
+ const n = U.get(t);
377
380
  if (n) return n;
378
381
  }
379
382
  const s = (async () => {
380
383
  try {
381
384
  const n = await r(`${i()}/events/${e}`);
382
385
  if (!n.ok)
383
- throw new p(`Failed to fetch event details: ${n.status}`, "lib/api/events/fetchEventDetails");
386
+ throw new D(`Failed to fetch event details: ${n.status}`, "lib/api/events/fetchEventDetails");
384
387
  return await n.json();
385
388
  } catch (n) {
386
389
  return u.error("Error fetching event details:", n), null;
387
390
  }
388
391
  })();
389
- return r === fetch && (F.set(t, s), s.finally(() => {
390
- F.get(t) === s && F.delete(t);
392
+ return r === fetch && (U.set(t, s), s.finally(() => {
393
+ U.get(t) === s && U.delete(t);
391
394
  })), s;
392
395
  }
393
- async function ke(e) {
396
+ async function qe(e) {
394
397
  try {
395
398
  const r = await h(
396
399
  `${i()}/tickets/event/${e}`
@@ -400,7 +403,7 @@ async function ke(e) {
400
403
  return u.error("Error fetching tickets:", r), [];
401
404
  }
402
405
  }
403
- async function qe(e) {
406
+ async function Ee(e) {
404
407
  try {
405
408
  if (!e)
406
409
  return u.warn("fetchEventPerformers called without eventId"), { performers: [], showPerformers: !1 };
@@ -415,7 +418,7 @@ async function qe(e) {
415
418
  return u.error("Error fetching event performers:", r), { performers: [], showPerformers: !1 };
416
419
  }
417
420
  }
418
- async function Ee(e) {
421
+ async function Le(e) {
419
422
  try {
420
423
  if (!e)
421
424
  return u.warn("fetchAllVenues called without orgId"), [];
@@ -427,7 +430,7 @@ async function Ee(e) {
427
430
  return u.error("Error fetching venues:", r), [];
428
431
  }
429
432
  }
430
- async function Le(e) {
433
+ async function Ge(e) {
431
434
  try {
432
435
  if (!e)
433
436
  return u.warn("fetchVenueEvents called without venueId"), [];
@@ -439,7 +442,7 @@ async function Le(e) {
439
442
  return u.error("Error fetching venue events:", r), [];
440
443
  }
441
444
  }
442
- async function Ge(e, r, t) {
445
+ async function Be(e, r, t) {
443
446
  try {
444
447
  const s = await h(
445
448
  `${i()}/events/venue/${e}/month/${r}/${t}`
@@ -449,7 +452,7 @@ async function Ge(e, r, t) {
449
452
  return u.error("Error fetching month events:", s), [];
450
453
  }
451
454
  }
452
- async function Be(e, r, t) {
455
+ async function je(e, r, t) {
453
456
  try {
454
457
  const s = await h(
455
458
  `${i()}/events/organization/${e}/month/${r}/${t}`
@@ -459,7 +462,7 @@ async function Be(e, r, t) {
459
462
  return u.error("Error fetching org month events:", s), [];
460
463
  }
461
464
  }
462
- async function je(e) {
465
+ async function ze(e) {
463
466
  try {
464
467
  const r = await h(
465
468
  `${i()}/series/${e}/occurrences`
@@ -469,7 +472,7 @@ async function je(e) {
469
472
  return u.error("Error fetching series occurrences:", r), null;
470
473
  }
471
474
  }
472
- async function ze(e, r) {
475
+ async function Te(e, r) {
473
476
  try {
474
477
  const t = await h(
475
478
  `${i()}/series/${e}/occurrences?venueId=${r}`
@@ -479,13 +482,13 @@ async function ze(e, r) {
479
482
  return u.error("Error fetching series occurrences:", t), null;
480
483
  }
481
484
  }
482
- async function Te(e, r) {
485
+ async function He(e, r) {
483
486
  try {
484
487
  const t = r ? `?slug=${encodeURIComponent(r)}` : "", s = await h(
485
488
  `${i()}/resolve/${encodeURIComponent(String(e))}${t}`
486
489
  );
487
490
  if (!s || !s.type)
488
- throw new p(
491
+ throw new D(
489
492
  "Failed to resolve entity",
490
493
  "lib/api/events/resolvePublicEntity"
491
494
  );
@@ -494,29 +497,29 @@ async function Te(e, r) {
494
497
  return u.error("Error resolving public entity:", t), null;
495
498
  }
496
499
  }
497
- async function He(e) {
500
+ async function Me(e) {
498
501
  try {
499
502
  const r = await h(
500
503
  `${i()}/series/${e}/page`
501
504
  );
502
505
  if (!r)
503
- throw new p("Failed to fetch series page", "lib/api/events/fetchSeriesPage");
506
+ throw new D("Failed to fetch series page", "lib/api/events/fetchSeriesPage");
504
507
  return r;
505
508
  } catch (r) {
506
509
  return u.error("Error fetching series page:", r), null;
507
510
  }
508
511
  }
509
- async function Me(e, r) {
512
+ async function We(e, r) {
510
513
  try {
511
- const t = r ? `${i()}/collections/${e}/public?password=${encodeURIComponent(r)}` : `${i()}/collections/${e}/public`, s = await h(t);
514
+ const t = r ? `${i()}/collections/${e}?password=${encodeURIComponent(r)}` : `${i()}/collections/${e}`, s = await h(t);
512
515
  if (!s)
513
- throw new p("Failed to fetch collection", "lib/api/events/fetchPublicCollection");
516
+ throw new D("Failed to fetch collection", "lib/api/events/fetchPublicCollection");
514
517
  return s;
515
518
  } catch (t) {
516
519
  return u.error("Error fetching collection:", t), null;
517
520
  }
518
521
  }
519
- async function We(e, r) {
522
+ async function Oe(e, r) {
520
523
  try {
521
524
  const t = encodeURIComponent(r);
522
525
  return (await h(
@@ -526,7 +529,7 @@ async function We(e, r) {
526
529
  return u.error("Error checking collection password:", t), !1;
527
530
  }
528
531
  }
529
- async function Oe(e, r) {
532
+ async function Qe(e, r) {
530
533
  try {
531
534
  const t = await y(
532
535
  `${i()}/events/${e}/check-password`,
@@ -539,7 +542,7 @@ async function Oe(e, r) {
539
542
  return u.error("Error checking event password:", t), { valid: !1 };
540
543
  }
541
544
  }
542
- async function Qe(e, r) {
545
+ async function Je(e, r) {
543
546
  try {
544
547
  const t = r ? `${i()}/events/venue/${r}` : e ? `${i()}/venues/organization/${e}` : `${i()}/health`;
545
548
  return (await fetch(t, {
@@ -550,7 +553,7 @@ async function Qe(e, r) {
550
553
  }
551
554
  }
552
555
  const S = P("VC");
553
- async function J(e) {
556
+ async function Y(e) {
554
557
  try {
555
558
  if (!e)
556
559
  return S.warn("getVenue called without venueId"), null;
@@ -560,15 +563,15 @@ async function J(e) {
560
563
  return S.error("Error fetching venue:", r), null;
561
564
  }
562
565
  }
563
- async function Je(e) {
564
- const r = await J(e);
566
+ async function Ye(e) {
567
+ const r = await Y(e);
565
568
  return r ? {
566
569
  serviceFeePercentage: r.serviceFeePercentage ?? 0,
567
570
  serviceFeeCents: r.serviceFeeCents ?? 0,
568
571
  taxPercentage: r.taxPercentage ?? 0
569
572
  } : null;
570
573
  }
571
- async function Ye(e) {
574
+ async function Ke(e) {
572
575
  try {
573
576
  if (!e)
574
577
  return S.warn("getVenueBySlug called without slug"), null;
@@ -578,21 +581,21 @@ async function Ye(e) {
578
581
  return S.error("Error fetching venue by slug:", r), null;
579
582
  }
580
583
  }
581
- const b = P("VC"), Y = "https://get-micdrop.com", K = `${Y}/api/orders/v2`, L = () => R();
582
- async function Ke(e) {
584
+ const b = P("VC"), K = "https://get-micdrop.com", X = `${K}/api/orders/v2`, L = () => p();
585
+ async function Xe(e) {
583
586
  try {
584
587
  const r = await y(
585
- `${K}/gift-cards`,
588
+ `${X}/gift-cards`,
586
589
  e
587
590
  );
588
591
  if (!r.success)
589
- throw b.error("Gift card purchase creation failed:", r.error), new p(r.error || "Failed to create gift card purchase", "lib/api/gift-cards/createGiftCardPurchase");
592
+ throw b.error("Gift card purchase creation failed:", r.error), new D(r.error || "Failed to create gift card purchase", "lib/api/gift-cards/createGiftCardPurchase");
590
593
  return b.debug("Gift card purchase created:", r.data), r.data;
591
594
  } catch (r) {
592
595
  return b.error("Gift card purchase creation error:", r), null;
593
596
  }
594
597
  }
595
- async function Xe(e, r) {
598
+ async function Ze(e, r) {
596
599
  try {
597
600
  const t = await y(
598
601
  `${L()}/cart/${e}/apply-gift-card`,
@@ -621,7 +624,7 @@ async function Xe(e, r) {
621
624
  };
622
625
  }
623
626
  }
624
- async function Ze(e) {
627
+ async function Ve(e) {
625
628
  try {
626
629
  const r = await Q(`${L()}/cart/${e}/gift-card`);
627
630
  return r.success ? { success: !0 } : (b.error("Remove gift card failed:", r.error), { success: !1, error: r.error || "Failed to remove gift card" });
@@ -632,7 +635,7 @@ async function Ze(e) {
632
635
  };
633
636
  }
634
637
  }
635
- async function Ve(e, r) {
638
+ async function er(e, r) {
636
639
  try {
637
640
  const t = await y(
638
641
  `${L()}/cart/${e}/complete-gift-card-payment`,
@@ -656,14 +659,14 @@ async function Ve(e, r) {
656
659
  };
657
660
  }
658
661
  }
659
- const E = P("VC"), X = {
662
+ const E = P("VC"), Z = {
660
663
  waitlist_not_enabled: "Waitlist is not available for this event",
661
664
  event_not_found: "Event not found",
662
665
  invalid_phone: "Please enter a valid phone number",
663
666
  already_purchased: "You have already purchased tickets for this event",
664
667
  phone_already_registered: "This phone number is already on the waitlist"
665
668
  };
666
- async function er(e, r, t = null, s = !1) {
669
+ async function rr(e, r, t = null, s = !1) {
667
670
  try {
668
671
  const n = { email: r };
669
672
  t && s && (n.phone = t, n.smsOptIn = !0);
@@ -676,7 +679,7 @@ async function er(e, r, t = null, s = !1) {
676
679
  updated: a.data?.updated
677
680
  } : (E.error("Join waitlist failed:", a.error), {
678
681
  success: !1,
679
- error: X[a.error ?? ""] || "Failed to join waitlist. Please try again."
682
+ error: Z[a.error ?? ""] || "Failed to join waitlist. Please try again."
680
683
  });
681
684
  } catch (n) {
682
685
  return E.error("joinWaitlist error:", n), {
@@ -685,7 +688,7 @@ async function er(e, r, t = null, s = !1) {
685
688
  };
686
689
  }
687
690
  }
688
- async function rr(e) {
691
+ async function tr(e) {
689
692
  const r = {
690
693
  waitlistEnabled: !1,
691
694
  soldOut: !1,
@@ -704,14 +707,14 @@ async function rr(e) {
704
707
  return E.error("getWaitlistStatus error:", t), r;
705
708
  }
706
709
  }
707
- function Z(e) {
710
+ function V(e) {
708
711
  if (!e || !(e.isHidden === !0 || typeof e.visibility == "number" && e.visibility >= 2) || e.salesChannel === 2) return !1;
709
712
  const t = /* @__PURE__ */ new Date(), s = e.salesBegin || e.salesStart || e.saleBegin || e.onSaleStart, n = e.salesEnd || e.saleEnd || e.onSaleEnd;
710
713
  if (s && new Date(s) > t || n && new Date(n) < t) return !1;
711
714
  const a = e.remainingCapacity ?? e.quantityRemaining ?? e.quantity;
712
715
  return !(e.soldOut || a != null && a <= 0);
713
716
  }
714
- function tr(e, r, t = {}) {
717
+ function sr(e, r, t = {}) {
715
718
  const {
716
719
  cancelled: s = !1,
717
720
  isRegistration: n = !1,
@@ -722,7 +725,7 @@ function tr(e, r, t = {}) {
722
725
  const c = e.endDateTime || e.startDateTime;
723
726
  if (c && new Date(c) < o)
724
727
  return { text: "Sales ended", disabled: !0, reason: "event_past" };
725
- const l = e?.hasPurchasableHiddenTickets === !0 || Array.isArray(r) && r.some(Z), $ = (r || []).filter(
728
+ const l = e?.hasPurchasableHiddenTickets === !0 || Array.isArray(r) && r.some(V), $ = (r || []).filter(
726
729
  (d) => d.salesChannel !== 2 && !d.isHidden && !(typeof d.visibility == "number" && d.visibility >= 2)
727
730
  );
728
731
  if ($.length === 0)
@@ -737,8 +740,8 @@ function tr(e, r, t = {}) {
737
740
  };
738
741
  let g = !1, m = !0, w = !0, _ = null;
739
742
  for (const d of $) {
740
- const I = d.salesBegin || d.salesStart || d.saleBegin || d.onSaleStart, x = d.salesEnd || d.saleEnd || d.onSaleEnd, C = d.remainingCapacity ?? d.quantityRemaining ?? d.quantity, D = d.soldOut || C != null && C <= 0, N = I ? new Date(I) > o : !1, G = x ? new Date(x) < o : !1;
741
- if (!D && !N && !G && (g = !0), D || (m = !1), N || (w = !1), N && I && !D && !G) {
743
+ const I = d.salesBegin || d.salesStart || d.saleBegin || d.onSaleStart, x = d.salesEnd || d.saleEnd || d.onSaleEnd, C = d.remainingCapacity ?? d.quantityRemaining ?? d.quantity, N = d.soldOut || C != null && C <= 0, R = I ? new Date(I) > o : !1, G = x ? new Date(x) < o : !1;
744
+ if (!N && !R && !G && (g = !0), N || (m = !1), R || (w = !1), R && I && !N && !G) {
742
745
  const B = new Date(I);
743
746
  (!_ || B < _) && (_ = B);
744
747
  }
@@ -767,12 +770,12 @@ function tr(e, r, t = {}) {
767
770
  "en-US"
768
771
  );
769
772
  else {
770
- const D = z(
773
+ const N = z(
771
774
  _,
772
775
  { month: "short", day: "numeric" },
773
776
  "en-US"
774
- ), N = j(_, { hour12: !0 }, "en-US");
775
- C = `${D} ${N}`;
777
+ ), R = j(_, { hour12: !0 }, "en-US");
778
+ C = `${N} ${R}`;
776
779
  }
777
780
  return {
778
781
  text: `On sale ${C}`,
@@ -794,7 +797,7 @@ function tr(e, r, t = {}) {
794
797
  reason: "hidden_only"
795
798
  } : { text: "Sales ended", disabled: !0, reason: "sales_ended" };
796
799
  }
797
- function V(e) {
800
+ function ee(e) {
798
801
  return {
799
802
  uuid: e.uuid || String(e.id || e.ID || ""),
800
803
  id: e.id || e.ID,
@@ -811,7 +814,7 @@ function V(e) {
811
814
  checkedInAt: e.checkedInAt || e.checked_in_at
812
815
  };
813
816
  }
814
- function ee(e) {
817
+ function re(e) {
815
818
  const r = e.purchasedTickets || e.tickets || e.purchased_tickets || [];
816
819
  return {
817
820
  uuid: e.uuid || String(e.id || e.ID || ""),
@@ -827,13 +830,13 @@ function ee(e) {
827
830
  discount: e.discount || 0,
828
831
  paymentIntentId: e.paymentIntentId || e.payment_intent_id,
829
832
  paymentMethod: e.paymentMethod || e.payment_method,
830
- purchasedTickets: r.map(V),
833
+ purchasedTickets: r.map(ee),
831
834
  createdAt: e.createdAt || e.created_at,
832
835
  updatedAt: e.updatedAt || e.updated_at
833
836
  };
834
837
  }
835
- function sr(e) {
836
- const r = ee(e), t = r.uuid.split("-")[0] || r.uuid;
838
+ function nr(e) {
839
+ const r = re(e), t = r.uuid.split("-")[0] || r.uuid;
837
840
  return {
838
841
  orderId: r.uuid,
839
842
  displayOrderId: t,
@@ -848,15 +851,15 @@ function sr(e) {
848
851
  status: r.status
849
852
  };
850
853
  }
851
- const re = "https://micdrop-images.sfo3.digitaloceanspaces.com";
852
- function te(e) {
853
- return e ? e.startsWith("http") ? e : `${re}/${e.replace(/^\//, "")}` : "";
854
+ const te = "https://micdrop-images.sfo3.digitaloceanspaces.com";
855
+ function se(e) {
856
+ return e ? e.startsWith("http") ? e : `${te}/${e.replace(/^\//, "")}` : "";
854
857
  }
855
858
  function T(e) {
856
859
  const r = e.imageUrl || e.imageURL || e.image_url || e.image || "";
857
- return te(r);
860
+ return se(r);
858
861
  }
859
- function se(e) {
862
+ function ne(e) {
860
863
  const r = e.ctaState || e.cta_state;
861
864
  if (r)
862
865
  return r;
@@ -877,7 +880,7 @@ function se(e) {
877
880
  return o + Math.max(0, l - $);
878
881
  }, 0) <= 0 ? "sold_out" : "available";
879
882
  }
880
- function ne(e) {
883
+ function oe(e) {
881
884
  return {
882
885
  id: e.id || e.ID,
883
886
  name: e.name || e.ticketName || "",
@@ -897,8 +900,8 @@ function ne(e) {
897
900
  sortOrder: e.sortOrder || e.sort_order || 0
898
901
  };
899
902
  }
900
- function oe(e) {
901
- const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(ne), s = t.map((o) => o.price).filter((o) => o > 0), n = s.length > 0 ? Math.min(...s) : void 0, a = s.length > 0 ? Math.max(...s) : void 0;
903
+ function ae(e) {
904
+ const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(oe), s = t.map((o) => o.price).filter((o) => o > 0), n = s.length > 0 ? Math.min(...s) : void 0, a = s.length > 0 ? Math.max(...s) : void 0;
902
905
  return {
903
906
  eventID: e.eventID || e.id || e.ID || 0,
904
907
  id: e.id || e.ID,
@@ -926,17 +929,17 @@ function oe(e) {
926
929
  minPrice: e.minPrice ?? e.min_price ?? n,
927
930
  maxPrice: e.maxPrice ?? e.max_price ?? a,
928
931
  ctaText: e.ctaText || e.cta_text,
929
- ctaState: se(e),
932
+ ctaState: ne(e),
930
933
  showPerformers: e.showPerformers ?? e.show_performers,
931
934
  eventSeriesId: e.eventSeriesId || e.event_series_id,
932
935
  seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number
933
936
  };
934
937
  }
935
- const nr = oe, ae = "https://micdrop-images.sfo3.digitaloceanspaces.com";
936
- function ce(e) {
937
- return e ? e.startsWith("http") ? e : `${ae}/${e.replace(/^\//, "")}` : "";
938
+ const or = ae, ce = "https://micdrop-images.sfo3.digitaloceanspaces.com";
939
+ function ie(e) {
940
+ return e ? e.startsWith("http") ? e : `${ce}/${e.replace(/^\//, "")}` : "";
938
941
  }
939
- function or(e) {
942
+ function ar(e) {
940
943
  const r = e.logoUrl || e.logo_url || e.logo;
941
944
  return {
942
945
  id: e.id || e.ID || 0,
@@ -949,21 +952,21 @@ function or(e) {
949
952
  zipCode: e.zipCode || e.zip_code,
950
953
  country: e.country,
951
954
  timezone: e.timezone || e.time_zone,
952
- logoUrl: ce(r),
955
+ logoUrl: ie(r),
953
956
  serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
954
957
  serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
955
958
  taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
956
959
  organizationId: e.organizationId || e.organization_id
957
960
  };
958
961
  }
959
- function ar(e) {
962
+ function cr(e) {
960
963
  return {
961
964
  serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
962
965
  serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
963
966
  taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
964
967
  };
965
968
  }
966
- function cr(e) {
969
+ function ir(e) {
967
970
  return [
968
971
  e.address,
969
972
  e.city,
@@ -975,65 +978,65 @@ export {
975
978
  Q as apiDelete,
976
979
  A as apiGet,
977
980
  y as apiPost,
978
- ge as apiPut,
979
- Xe as applyGiftCard,
980
- xe as applyPromoCode,
981
- se as calculateCtaState,
982
- $e as cancelReservation,
983
- We as checkCollectionPassword,
984
- Oe as checkEventPassword,
985
- Ve as completeGiftCardPayment,
986
- be as completeReservation,
987
- tr as computeCtaState,
988
- fe as configureApi,
989
- Ke as createGiftCardPurchase,
990
- Ce as createOrder,
991
- ve as createPaymentIntent,
992
- Ie as extendCheckoutSession,
993
- ar as extractVenueFees,
994
- Ee as fetchAllVenues,
995
- Ue as fetchEventDetails,
996
- qe as fetchEventPerformers,
997
- ke as fetchEventTickets,
998
- Me as fetchPublicCollection,
999
- ze as fetchSeriesOccurrences,
1000
- He as fetchSeriesPage,
1001
- Le as fetchVenueEvents,
1002
- cr as formatVenueAddress,
1003
- me as getApiConfig,
1004
- te as getCDNImageUrl,
1005
- we as getCartByUUID,
1006
- he as getClientIP,
981
+ ve as apiPut,
982
+ Ze as applyGiftCard,
983
+ Ue as applyPromoCode,
984
+ ne as calculateCtaState,
985
+ Ce as cancelReservation,
986
+ Oe as checkCollectionPassword,
987
+ Qe as checkEventPassword,
988
+ er as completeGiftCardPayment,
989
+ $e as completeReservation,
990
+ sr as computeCtaState,
991
+ me as configureApi,
992
+ Xe as createGiftCardPurchase,
993
+ Pe as createOrder,
994
+ we as createPaymentIntent,
995
+ Se as extendCheckoutSession,
996
+ cr as extractVenueFees,
997
+ Le as fetchAllVenues,
998
+ ke as fetchEventDetails,
999
+ Ee as fetchEventPerformers,
1000
+ qe as fetchEventTickets,
1001
+ We as fetchPublicCollection,
1002
+ Te as fetchSeriesOccurrences,
1003
+ Me as fetchSeriesPage,
1004
+ Ge as fetchVenueEvents,
1005
+ ir as formatVenueAddress,
1006
+ ye as getApiConfig,
1007
+ se as getCDNImageUrl,
1008
+ _e as getCartByUUID,
1009
+ ge as getClientIP,
1007
1010
  T as getEventImageUrl,
1008
- ye as getLegacyPublicUrl,
1009
- Ge as getMonthEvents,
1010
- Pe as getOrder,
1011
- R as getOrdersV2Url,
1012
- Be as getOrgMonthEvents,
1011
+ he as getLegacyPublicUrl,
1012
+ Be as getMonthEvents,
1013
+ Ae as getOrder,
1014
+ p as getOrdersV2Url,
1015
+ je as getOrgMonthEvents,
1013
1016
  i as getPublicBaseUrl,
1014
- je as getSeriesOccurrences,
1015
- Se as getSessionStatus,
1016
- J as getVenue,
1017
- Ye as getVenueBySlug,
1018
- Je as getVenueFees,
1019
- rr as getWaitlistStatus,
1020
- Re as hasPromoCodes,
1017
+ ze as getSeriesOccurrences,
1018
+ De as getSessionStatus,
1019
+ Y as getVenue,
1020
+ Ke as getVenueBySlug,
1021
+ Ye as getVenueFees,
1022
+ tr as getWaitlistStatus,
1023
+ xe as hasPromoCodes,
1021
1024
  pe as initiateOrder,
1022
- er as joinWaitlist,
1023
- Ze as removeGiftCard,
1025
+ rr as joinWaitlist,
1026
+ Ve as removeGiftCard,
1024
1027
  Fe as removePromoCode,
1025
- Te as resolvePublicEntity,
1026
- Qe as testNetworkConnection,
1027
- De as trackUTMSource,
1028
- ne as transformAvailableTicket,
1029
- oe as transformEvent,
1030
- nr as transformEventData,
1031
- ee as transformOrder,
1032
- sr as transformOrderForDisplay,
1033
- V as transformTicket,
1034
- or as transformVenue,
1035
- _e as updateCartQuantities,
1036
- Ae as validatePaymentIntent,
1037
- Ne as validatePromoCode
1028
+ He as resolvePublicEntity,
1029
+ Je as testNetworkConnection,
1030
+ Ne as trackUTMSource,
1031
+ oe as transformAvailableTicket,
1032
+ ae as transformEvent,
1033
+ or as transformEventData,
1034
+ re as transformOrder,
1035
+ nr as transformOrderForDisplay,
1036
+ ee as transformTicket,
1037
+ ar as transformVenue,
1038
+ be as updateCartQuantities,
1039
+ Ie as validatePaymentIntent,
1040
+ Re as validatePromoCode
1038
1041
  };
1039
1042
  //# sourceMappingURL=api.mjs.map