@getmicdrop/venue-calendar 4.2.4 → 4.2.5

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 (101) hide show
  1. package/dist/{ArrowLeftIcon-BGd-X_Qm.js → ArrowLeftIcon-BxKUPFOE.js} +1 -1
  2. package/dist/{Badge-Bv_MT-Vt.js → Badge-M6qZyfTF.js} +9 -10
  3. package/dist/BlockPlaceholder-CLdS2Y-c.js +62 -0
  4. package/dist/{Calendar-DafPX3k_.js → Calendar-DwNhbEQY.js} +290 -292
  5. package/dist/CalendarFoundryView-BX5mT6NY.js +23561 -0
  6. package/dist/{CalendarIcon-CeQ1_FWq.js → CalendarIcon-jLckZ_4N.js} +1 -1
  7. package/dist/{CartView-nvVA8vWk.js → CartView-B61KRyFq.js} +644 -651
  8. package/dist/Checkout-CoExiUba.js +1809 -0
  9. package/dist/{Checkout-Ow2x8cNL.js → Checkout-DlQ2x3L6.js} +97 -97
  10. package/dist/{CheckoutTimer-DJlt5M2b.js → CheckoutTimer-Cv9iQj2d.js} +5 -5
  11. package/dist/{ChevronDownIcon-y7oNyepp.js → ChevronDownIcon-DiZxxS3e.js} +1 -1
  12. package/dist/{ClockIcon-BGTz8dak.js → ClockIcon-BrWavNGl.js} +1 -1
  13. package/dist/{CloseIcon-C9SHeORJ.js → CloseIcon-Cmddp2PA.js} +1 -1
  14. package/dist/{CollectionView-BAIlcuqO.js → CollectionView-DpkF55yD.js} +12 -13
  15. package/dist/Event-CzNN2jRR.js +3040 -0
  16. package/dist/{EventPage-LuA-aEYZ.js → EventPage-DnKNNWk8.js} +167 -168
  17. package/dist/{Heading-Dfo3bjyn.js → Heading-B7VYbbfJ.js} +3 -4
  18. package/dist/Image-DBJAfLYe.js +81 -0
  19. package/dist/{phoneUtils-BJeAIGYo.js → Input-DsWjpYtc.js} +1132 -694
  20. package/dist/{MailIcon-xtNog-7h.js → MailIcon-gpZMGdBK.js} +1 -1
  21. package/dist/{Modal-CqzRblrN.js → Modal-D4AUdrz8.js} +2 -2
  22. package/dist/{ModalFooter-DHhBLDbO.js → ModalFooter-8Di4-qKC.js} +57 -59
  23. package/dist/{PasswordInput-Czm5Pe_p.js → PasswordInput-Buk60yEf.js} +4 -4
  24. package/dist/{ScarcityBadge-CdgQmt1D.js → ScarcityBadge-DgrS89hq.js} +4 -4
  25. package/dist/{SeriesPage-DfCyV1ka.js → SeriesPage-BCovOJ6a.js} +5 -5
  26. package/dist/{Spinner-BwiDys7C.js → Spinner-ChTN7t75.js} +3 -3
  27. package/dist/{Success-CsYxRkLE.js → Success-BRufJqwQ.js} +76 -77
  28. package/dist/{TagIcon-DJSTnymB.js → TagIcon-C0uTQgU8.js} +1 -1
  29. package/dist/{ViewTicketsEmbed-CKucKt-W.js → ViewTicketsEmbed-CfagtvVL.js} +59 -60
  30. package/dist/{WarningCircleIcon-BKSQbu7p.js → WarningCircleIcon-B2hkUrvV.js} +1 -1
  31. package/dist/{WarningTriIcon-DgwTwlxe.js → WarningTriIcon-Boy4IW6-.js} +1 -1
  32. package/dist/{__SKIP_PATHS__-BTbGfN80.js → __SKIP_PATHS__-DPK-YB-V.js} +1 -1
  33. package/dist/{href-DJeJpcO9.js → allowlist-Cu2kP6jt.js} +4 -21
  34. package/dist/api/api.cjs +1 -1
  35. package/dist/api/api.mjs +123 -112
  36. package/dist/api/events.d.ts +21 -2
  37. package/dist/api/types.d.ts +17 -0
  38. package/dist/{browser-Um8Y6K99.js → browser-25hnscei.js} +7 -7
  39. package/dist/cancel-gqtaw6SK.js +59 -0
  40. package/dist/{colors-DeJAzg_q.js → colors-B9hMXv8l.js} +123 -113
  41. package/dist/{constants-OTS1wmXZ.js → constants-DBwdjnEU.js} +74 -74
  42. package/dist/{copyToClipboard-CRDdh3r8.js → copyToClipboard-BDa2_uNf.js} +1 -1
  43. package/dist/{createI18n-DBUVdZra.js → createI18n-08XGDh1_.js} +1 -1
  44. package/dist/{event-BrptLro8.js → event-Cp5D4ctZ.js} +1 -1
  45. package/dist/{event-transform-BaJ7M1DL.js → event-transform-BFJTgtU9.js} +4 -4
  46. package/dist/{eventStatusStream-sq6uPnMe.js → eventStatusStream-SyvhRCtk.js} +2 -2
  47. package/dist/{i18n-GzfxX0Ad.js → i18n-4ZGOM8hY.js} +11 -11
  48. package/dist/{labels-CqodQmuY.js → labels-99RC9gAv.js} +1 -1
  49. package/dist/{modalManager.svelte-OSPs3dSW.js → modalManager.svelte-BdNsCq6n.js} +2 -2
  50. package/dist/{order-totals-BAKL9cOB.js → order-totals-CQ0V7Fdc.js} +13 -15
  51. package/dist/{orders-NZP81zYT.js → orders-oRqSQXSf.js} +19 -20
  52. package/dist/{pixels-BBruZizp.js → pixels-DycN_8bu.js} +7 -8
  53. package/dist/{promo-DtLZRskK.js → promo-BrMcoTYh.js} +3 -3
  54. package/dist/{serverTotals-BO126TTd.js → serverTotals-CpRaEe9K.js} +1 -1
  55. package/dist/{shareCopyFeedback.svelte-BRInK1hH.js → shareCopyFeedback.svelte-D314p5oA.js} +25 -25
  56. package/dist/{showcase-state-options-BoJxiEsg.js → showcase-state-options-B2XfybZq.js} +1 -1
  57. package/dist/timezones-Cq1mLtfM.js +4170 -0
  58. package/dist/{to-event-card-props-CO3aPBdH.js → to-event-card-props-BNBWYYPo.js} +23 -24
  59. package/dist/{utils-C8GgxJMv.js → utils-CrlClQxc.js} +3 -3
  60. package/dist/venue-calendar.css +1 -1
  61. package/dist/venue-calendar.es.js +209 -210
  62. package/dist/venue-calendar.iife.js +63 -64
  63. package/dist/venue-calendar.umd.js +59 -60
  64. package/package.json +220 -220
  65. package/dist/BlockPlaceholder-Wl39H9Z7.js +0 -52
  66. package/dist/Button-C4uFgl7L.js +0 -2141
  67. package/dist/CalendarFoundryView-COkX5oQx.js +0 -22292
  68. package/dist/Checkout-BphC7gak.js +0 -1807
  69. package/dist/CloseOutline-qpVa62mu.js +0 -13
  70. package/dist/CropImage-B0tj2_uN.js +0 -404
  71. package/dist/Event-CTaXLze_.js +0 -3034
  72. package/dist/Image-B3cEndLZ.js +0 -87
  73. package/dist/Input-iXqece97.js +0 -487
  74. package/dist/imageOptimizer-CB3wKJU8.js +0 -47
  75. package/dist/sortable.esm--ZtTTTPp.js +0 -1451
  76. package/dist/timezones-C5l0SSHK.js +0 -2030
  77. package/dist/z-index-B0Vk_Mp1.js +0 -27
  78. /package/dist/locales/{4.2.4 → 4.2.5}/flow/de.js +0 -0
  79. /package/dist/locales/{4.2.4 → 4.2.5}/flow/es.js +0 -0
  80. /package/dist/locales/{4.2.4 → 4.2.5}/flow/fr.js +0 -0
  81. /package/dist/locales/{4.2.4 → 4.2.5}/flow/id.js +0 -0
  82. /package/dist/locales/{4.2.4 → 4.2.5}/flow/it.js +0 -0
  83. /package/dist/locales/{4.2.4 → 4.2.5}/flow/ja.js +0 -0
  84. /package/dist/locales/{4.2.4 → 4.2.5}/flow/ko.js +0 -0
  85. /package/dist/locales/{4.2.4 → 4.2.5}/flow/nl.js +0 -0
  86. /package/dist/locales/{4.2.4 → 4.2.5}/flow/pl.js +0 -0
  87. /package/dist/locales/{4.2.4 → 4.2.5}/flow/pt-br.js +0 -0
  88. /package/dist/locales/{4.2.4 → 4.2.5}/flow/tr.js +0 -0
  89. /package/dist/locales/{4.2.4 → 4.2.5}/flow/zh.js +0 -0
  90. /package/dist/locales/{4.2.4 → 4.2.5}/main/de.js +0 -0
  91. /package/dist/locales/{4.2.4 → 4.2.5}/main/es.js +0 -0
  92. /package/dist/locales/{4.2.4 → 4.2.5}/main/fr.js +0 -0
  93. /package/dist/locales/{4.2.4 → 4.2.5}/main/id.js +0 -0
  94. /package/dist/locales/{4.2.4 → 4.2.5}/main/it.js +0 -0
  95. /package/dist/locales/{4.2.4 → 4.2.5}/main/ja.js +0 -0
  96. /package/dist/locales/{4.2.4 → 4.2.5}/main/ko.js +0 -0
  97. /package/dist/locales/{4.2.4 → 4.2.5}/main/nl.js +0 -0
  98. /package/dist/locales/{4.2.4 → 4.2.5}/main/pl.js +0 -0
  99. /package/dist/locales/{4.2.4 → 4.2.5}/main/pt-br.js +0 -0
  100. /package/dist/locales/{4.2.4 → 4.2.5}/main/tr.js +0 -0
  101. /package/dist/locales/{4.2.4 → 4.2.5}/main/zh.js +0 -0
package/dist/api/api.mjs CHANGED
@@ -66,7 +66,7 @@ async function ue() {
66
66
  return "";
67
67
  }
68
68
  var de = (e) => new Promise((t) => setTimeout(t, e));
69
- async function fe(e, t, n) {
69
+ async function S(e, t, n) {
70
70
  let r = (t.method || "GET").toUpperCase(), i = r === "GET" || r === "HEAD" ? n.retries + 1 : 1, a;
71
71
  for (let r = 1; r <= i; r++) {
72
72
  let o = new AbortController(), s = setTimeout(() => o.abort(), n.timeout), c = t.signal, l;
@@ -87,16 +87,16 @@ async function fe(e, t, n) {
87
87
  }
88
88
  throw a;
89
89
  }
90
- async function S(e, t) {
90
+ async function C(e, t) {
91
91
  return T("GET", e, void 0, t);
92
92
  }
93
- async function C(e, t, n) {
93
+ async function w(e, t, n) {
94
94
  return T("POST", e, t, n);
95
95
  }
96
- async function pe(e, t, n) {
96
+ async function fe(e, t, n) {
97
97
  return T("PUT", e, t, n);
98
98
  }
99
- async function w(e, t) {
99
+ async function pe(e, t) {
100
100
  return T("DELETE", e, void 0, t);
101
101
  }
102
102
  async function T(e, t, n, r) {
@@ -104,7 +104,7 @@ async function T(e, t, n, r) {
104
104
  o || y.onError(e);
105
105
  };
106
106
  try {
107
- let t = await fe(i, {
107
+ let t = await S(i, {
108
108
  method: e,
109
109
  headers: ie({
110
110
  "Content-Type": "application/json",
@@ -143,7 +143,7 @@ async function T(e, t, n, r) {
143
143
  }
144
144
  async function E(e, t) {
145
145
  try {
146
- let n = e.startsWith(y.baseUrl), { widgetKey: r, ...i } = t ?? {}, a = await fe(e, {
146
+ let n = e.startsWith(y.baseUrl), { widgetKey: r, ...i } = t ?? {}, a = await S(e, {
147
147
  ...i,
148
148
  ...n ? { headers: ie(i.headers, r) } : {}
149
149
  }, y);
@@ -328,7 +328,7 @@ a("tracking");
328
328
  var N = e("VC");
329
329
  async function Ie(e, n, r, i) {
330
330
  try {
331
- let a = await C(`${x()}/cart/${e}/payment-intent`, {
331
+ let a = await w(`${x()}/cart/${e}/payment-intent`, {
332
332
  productQuantities: n,
333
333
  ...r && Object.keys(r).length > 0 ? { donationAmounts: r } : {},
334
334
  ...i ? {
@@ -351,7 +351,7 @@ async function Ie(e, n, r, i) {
351
351
  async function Le(e, t) {
352
352
  if (!e) return null;
353
353
  try {
354
- let n = await S(`${x()}/cart/${e}`);
354
+ let n = await C(`${x()}/cart/${e}`);
355
355
  if (!n.success) return null;
356
356
  let { uuid: r, eventID: i, status: a, expiresAt: o, reservations: s } = he(n.data);
357
357
  return a !== "reserved" && a !== "active" || t !== void 0 && i !== Number(t) ? null : {
@@ -396,7 +396,7 @@ async function Re(e, t, n) {
396
396
  }
397
397
  async function ze(e) {
398
398
  try {
399
- let t = await C(`${b()}/orders/complete/${e}`);
399
+ let t = await w(`${b()}/orders/complete/${e}`);
400
400
  return t.success ? {
401
401
  success: !0,
402
402
  message: t.data?.message
@@ -413,7 +413,7 @@ async function ze(e) {
413
413
  }
414
414
  async function Be(e) {
415
415
  try {
416
- let t = await C(`${b()}/orders/cancel/${e}`);
416
+ let t = await w(`${b()}/orders/cancel/${e}`);
417
417
  return t.success ? {
418
418
  success: !0,
419
419
  message: t.data?.message
@@ -430,7 +430,7 @@ async function Be(e) {
430
430
  }
431
431
  async function Ve(e, t) {
432
432
  try {
433
- let n = await C(`${b()}/orders/create`, {
433
+ let n = await w(`${b()}/orders/create`, {
434
434
  eventID: e,
435
435
  promoCode: t,
436
436
  attribution: M()
@@ -445,7 +445,7 @@ async function He(e) {
445
445
  }
446
446
  async function Ue(e, t) {
447
447
  try {
448
- let n = await C(`${x()}/validatePaymentIntent/${e}`, {
448
+ let n = await w(`${x()}/validatePaymentIntent/${e}`, {
449
449
  ...t,
450
450
  attribution: M()
451
451
  });
@@ -471,7 +471,7 @@ async function Ue(e, t) {
471
471
  }
472
472
  async function We(e) {
473
473
  try {
474
- let t = await C(`${b()}/orders/extend-session`, { orderUuid: e });
474
+ let t = await w(`${b()}/orders/extend-session`, { orderUuid: e });
475
475
  if (!t.success) return {
476
476
  success: !1,
477
477
  error: t.error || "Failed to extend session",
@@ -492,7 +492,7 @@ async function We(e) {
492
492
  }
493
493
  async function Ge(e) {
494
494
  try {
495
- let t = await S(`${b()}/orders/session/${e}`);
495
+ let t = await C(`${b()}/orders/session/${e}`);
496
496
  if (!t.success) return {
497
497
  error: t.error || "No active session found",
498
498
  notFound: t.statusCode === 404
@@ -512,7 +512,7 @@ async function Ge(e) {
512
512
  }
513
513
  async function Ke(e = { eventID: "" }) {
514
514
  try {
515
- let t = await C(`${b()}/orders/create`, {
515
+ let t = await w(`${b()}/orders/create`, {
516
516
  ...e,
517
517
  attribution: M()
518
518
  });
@@ -539,7 +539,7 @@ async function Je(e, t) {
539
539
  valid: !1,
540
540
  error: "Promo code is required"
541
541
  };
542
- let n = await S(`/promo-codes/validate/${e}/${encodeURIComponent(t.trim())}`);
542
+ let n = await C(`/promo-codes/validate/${e}/${encodeURIComponent(t.trim())}`);
543
543
  if (!n.success) return n.statusCode === 404 ? {
544
544
  valid: !1,
545
545
  error: "Invalid promo code"
@@ -568,7 +568,7 @@ async function Je(e, t) {
568
568
  }
569
569
  async function Ye(e) {
570
570
  try {
571
- let t = await S(`/promo-codes/check/${e}`);
571
+ let t = await C(`/promo-codes/check/${e}`);
572
572
  return !t.success || t.data.hasPromoCodes === !0;
573
573
  } catch (e) {
574
574
  return P.error("Error checking promo codes availability:", e), !0;
@@ -578,7 +578,7 @@ async function Xe(e, t, n) {
578
578
  try {
579
579
  let r = { promoCode: t };
580
580
  n && Object.keys(n).length > 0 && (r.productQuantities = n);
581
- let i = await C(`${x()}/cart/${e}/apply-promo`, r);
581
+ let i = await w(`${x()}/cart/${e}/apply-promo`, r);
582
582
  return i.success ? { success: !0 } : {
583
583
  success: !1,
584
584
  error: i.error || "Failed to apply promo code"
@@ -592,7 +592,7 @@ async function Xe(e, t, n) {
592
592
  }
593
593
  async function Ze(e) {
594
594
  try {
595
- let t = await C(`/orders/${e}/remove-promo`);
595
+ let t = await w(`/orders/${e}/remove-promo`);
596
596
  return t.success ? { success: !0 } : {
597
597
  success: !1,
598
598
  error: t.error || "Failed to remove promo code"
@@ -650,7 +650,7 @@ var z = "/api/v2/public", B = "/api/orders/v2/public", V = "/api/orders/v2", H =
650
650
  //#endregion
651
651
  //#region src/lib/api/events.ts
652
652
  var W = e("VC"), G = /* @__PURE__ */ new Map();
653
- async function K(e, t = fetch, n) {
653
+ async function tt(e, t = fetch, n) {
654
654
  let r = n ? `${e}:pw` : String(e);
655
655
  if (t === fetch) {
656
656
  let e = G.get(r);
@@ -670,11 +670,11 @@ async function K(e, t = fetch, n) {
670
670
  G.get(r) === i && G.delete(r);
671
671
  })), i;
672
672
  }
673
- async function tt(e, t = fetch, n) {
674
- let r = await K(e, t, n);
673
+ async function nt(e, t = fetch, n) {
674
+ let r = await tt(e, t, n);
675
675
  return r.ok ? r.data : null;
676
676
  }
677
- async function q(e, t, n = (e) => e) {
677
+ async function K(e, t, n = (e) => e) {
678
678
  try {
679
679
  let r = await E(e);
680
680
  return r ? F(n(r)) : (W.error(`Failed to load (${t}): network or server error`), I(t));
@@ -682,67 +682,78 @@ async function q(e, t, n = (e) => e) {
682
682
  return W.error(`Error loading (${t}):`, e), I(t);
683
683
  }
684
684
  }
685
- function J(e) {
685
+ function q(e) {
686
686
  return Array.isArray(e) ? e : [];
687
687
  }
688
- async function nt(e, t) {
689
- let n = t?.trim(), r = n ? `?promoCode=${encodeURIComponent(n)}` : "";
690
- return q(`${b()}/tickets/event/${e}${r}`, "tickets_fetch_failed", J);
691
- }
692
688
  async function rt(e, t) {
693
- return R(await nt(e, t), []);
689
+ let n = t?.trim(), r = n ? `?promoCode=${encodeURIComponent(n)}` : "";
690
+ return K(`${b()}/tickets/event/${e}${r}`, "tickets_fetch_failed", q);
694
691
  }
695
- async function it(e) {
696
- return e ? q(`${b()}/events/${e}/performers`, "performers_fetch_failed", (e) => Qe(e)) : (W.warn("fetchEventPerformers called without eventId"), I("performers_missing_event_id"));
692
+ async function it(e, t) {
693
+ return R(await rt(e, t), []);
697
694
  }
698
695
  async function at(e) {
699
- return R(await it(e), {
696
+ return e ? K(`${b()}/events/${e}/performers`, "performers_fetch_failed", (e) => Qe(e)) : (W.warn("fetchEventPerformers called without eventId"), I("performers_missing_event_id"));
697
+ }
698
+ async function ot(e) {
699
+ return R(await at(e), {
700
700
  performers: [],
701
701
  showPerformers: !1
702
702
  });
703
703
  }
704
- async function ot(e) {
705
- return e ? q(`${b()}/venues/organization/${e}`, "venues_fetch_failed", J) : (W.warn("fetchAllVenues called without orgId"), I("venues_missing_org_id"));
706
- }
707
704
  async function st(e) {
708
- return R(await ot(e), []);
705
+ return e ? K(`${b()}/venues/organization/${e}`, "venues_fetch_failed", q) : (W.warn("fetchAllVenues called without orgId"), I("venues_missing_org_id"));
709
706
  }
710
707
  async function ct(e) {
711
- return e ? q(`${b()}/events/venue/${e}`, "venue_events_fetch_failed", J) : (W.warn("fetchVenueEvents called without venueId"), I("venue_events_missing_venue_id"));
708
+ return R(await st(e), []);
712
709
  }
713
710
  async function lt(e) {
714
- return R(await ct(e), []);
711
+ return e ? K(`${b()}/events/venue/${e}`, "venue_events_fetch_failed", q) : (W.warn("fetchVenueEvents called without venueId"), I("venue_events_missing_venue_id"));
715
712
  }
716
- function ut(e) {
717
- return Array.isArray(e) ? e : Array.isArray(e.events) ? e.events : [];
713
+ async function ut(e) {
714
+ return R(await lt(e), []);
718
715
  }
719
- async function dt(e, t, n) {
720
- return q(`${b()}/events/venue/${e}/month/${t}/${n}`, "month_events_fetch_failed", (e) => ut(e));
716
+ function dt(e) {
717
+ return Array.isArray(e) ? e : Array.isArray(e.events) ? e.events : [];
721
718
  }
722
- async function ft(e, t, n) {
723
- return R(await dt(e, t, n), []);
719
+ var J = /* @__PURE__ */ new Map();
720
+ function ft(e, t, n) {
721
+ if (!n?.fresh) {
722
+ let t = J.get(e);
723
+ if (t) return t;
724
+ }
725
+ let r = K(e, t, (e) => dt(e));
726
+ return J.set(e, r), r.finally(() => {
727
+ J.get(e) === r && J.delete(e);
728
+ }), r;
724
729
  }
725
- async function pt(e, t, n) {
726
- return q(`${b()}/events/organization/${e}/month/${t}/${n}`, "org_month_events_fetch_failed", (e) => ut(e));
730
+ async function pt(e, t, n, r) {
731
+ return ft(`${b()}/events/venue/${e}/month/${t}/${n}`, "month_events_fetch_failed", r);
727
732
  }
728
733
  async function mt(e, t, n) {
729
734
  return R(await pt(e, t, n), []);
730
735
  }
731
- async function ht(e) {
732
- return q(`${b()}/series/${e}/occurrences`, "series_occurrences_fetch_failed");
736
+ async function ht(e, t, n, r) {
737
+ return ft(`${b()}/events/organization/${e}/month/${t}/${n}`, "org_month_events_fetch_failed", r);
738
+ }
739
+ async function gt(e, t, n) {
740
+ return R(await ht(e, t, n), []);
741
+ }
742
+ async function _t(e) {
743
+ return K(`${b()}/series/${e}/occurrences`, "series_occurrences_fetch_failed");
733
744
  }
734
- async function gt(e) {
735
- let t = await ht(e);
745
+ async function vt(e) {
746
+ let t = await _t(e);
736
747
  return t.ok ? t.data : null;
737
748
  }
738
- async function _t(e, t) {
739
- return q(`${b()}/series/${e}/occurrences?venueId=${t}`, "series_cta_fetch_failed");
749
+ async function yt(e, t) {
750
+ return K(`${b()}/series/${e}/occurrences?venueId=${t}`, "series_cta_fetch_failed");
740
751
  }
741
- async function vt(e, t) {
742
- let n = await _t(e, t);
752
+ async function bt(e, t) {
753
+ let n = await yt(e, t);
743
754
  return n.ok ? n.data : null;
744
755
  }
745
- async function yt(e, t) {
756
+ async function xt(e, t) {
746
757
  try {
747
758
  let r = t ? `?slug=${encodeURIComponent(t)}` : "", i = await E(`${b()}/resolve/${encodeURIComponent(String(e))}${r}`);
748
759
  if (!i || !i.type) throw new n("entity", String(e));
@@ -751,7 +762,7 @@ async function yt(e, t) {
751
762
  return W.error("Error resolving public entity:", e), null;
752
763
  }
753
764
  }
754
- async function bt(e, t) {
765
+ async function St(e, t) {
755
766
  try {
756
767
  let r = await E(t ? `${b()}/collections/${e}?password=${encodeURIComponent(t)}` : `${b()}/collections/${e}`);
757
768
  if (!r) throw new n("collection", String(e));
@@ -760,7 +771,7 @@ async function bt(e, t) {
760
771
  return W.error("Error fetching collection:", e), null;
761
772
  }
762
773
  }
763
- async function xt(e, t) {
774
+ async function Ct(e, t) {
764
775
  try {
765
776
  return (await E(`${b()}/collections/${e}/check-password`, {
766
777
  method: "POST",
@@ -771,7 +782,7 @@ async function xt(e, t) {
771
782
  return W.error("Error checking collection password:", e), !1;
772
783
  }
773
784
  }
774
- async function St(e, t) {
785
+ async function wt(e, t) {
775
786
  try {
776
787
  let n = await E(`${b()}/events/${e}/check-password`, {
777
788
  method: "POST",
@@ -783,7 +794,7 @@ async function St(e, t) {
783
794
  return W.error("Error checking event password:", e), { valid: !1 };
784
795
  }
785
796
  }
786
- async function Ct(e, t) {
797
+ async function Tt(e, t) {
787
798
  try {
788
799
  let n = t ? `${b()}/events/venue/${t}` : e ? `${b()}/venues/organization/${e}` : `${b()}/venues/${H}`;
789
800
  return (await fetch(n, { method: "HEAD" })).status < 500;
@@ -794,27 +805,27 @@ async function Ct(e, t) {
794
805
  //#endregion
795
806
  //#region src/lib/api/venues.ts
796
807
  var Y = e("VC");
797
- async function wt(e) {
808
+ async function Et(e) {
798
809
  try {
799
810
  if (!e) return Y.warn("getVenue called without venueId"), null;
800
- let t = await S(`/venues/${e}`);
811
+ let t = await C(`/venues/${e}`);
801
812
  return t.success ? t.data ?? null : (Y.error(`Failed to fetch venue: ${t.statusCode}`), null);
802
813
  } catch (e) {
803
814
  return Y.error("Error fetching venue:", e), null;
804
815
  }
805
816
  }
806
- async function Tt(e) {
807
- let t = await wt(e);
817
+ async function Dt(e) {
818
+ let t = await Et(e);
808
819
  return t ? {
809
820
  serviceFeePercentage: t.serviceFeePercentage ?? 0,
810
821
  serviceFeeCents: t.serviceFeeCents == null ? 0 : t.serviceFeeCents,
811
822
  taxPercentage: t.taxPercentage ?? 0
812
823
  } : null;
813
824
  }
814
- async function Et(e) {
825
+ async function Ot(e) {
815
826
  try {
816
827
  if (!e) return Y.warn("getVenueBySlug called without slug"), null;
817
- let t = await S(`/venues/slug/${encodeURIComponent(e)}`);
828
+ let t = await C(`/venues/slug/${encodeURIComponent(e)}`);
818
829
  return t.success ? t.data ?? null : (Y.error(`Failed to fetch venue by slug: ${t.statusCode}`), null);
819
830
  } catch (e) {
820
831
  return Y.error("Error fetching venue by slug:", e), null;
@@ -825,16 +836,16 @@ async function Et(e) {
825
836
  function X(e, t) {
826
837
  return e == null || t(e);
827
838
  }
828
- function Dt(e) {
839
+ function kt(e) {
829
840
  if (typeof e != "object" || !e) return !1;
830
841
  let t = e;
831
842
  return t.valid === !0 && Number.isInteger(t.appliedAmount) && typeof t.remainingTotal == "number" && Number.isFinite(t.remainingTotal) && X(t.giftCardCode, (e) => typeof e == "string") && X(t.giftCardBalance, (e) => typeof e == "number" && Number.isFinite(e)) && X(t.fullyCoveredByCard, (e) => typeof e == "boolean");
832
843
  }
833
- var Ot = "We couldn't apply that gift card. Please try again.";
834
- function kt(e) {
835
- if (!Dt(e)) return {
844
+ var At = "We couldn't apply that gift card. Please try again.";
845
+ function jt(e) {
846
+ if (!kt(e)) return {
836
847
  valid: !1,
837
- error: Ot
848
+ error: At
838
849
  };
839
850
  let t = e, n = i(p(t.appliedAmount)), r = t.remainingTotal, a = t.fullyCoveredByCard ?? r <= 0, o = !a;
840
851
  return {
@@ -851,9 +862,9 @@ function kt(e) {
851
862
  //#endregion
852
863
  //#region src/lib/api/gift-cards.ts
853
864
  var Z = e("VC");
854
- async function At(e) {
865
+ async function Mt(e) {
855
866
  try {
856
- let n = await C(`${x()}/gift-cards/purchase/create`, e);
867
+ let n = await w(`${x()}/gift-cards/purchase/create`, e);
857
868
  if (!n.success) throw Z.error("Gift card purchase creation failed:", n.error), new t(n.error || "Failed to create gift card purchase", n.statusCode ?? 0, {
858
869
  endpoint: `${x()}/gift-cards/purchase/create`,
859
870
  method: "POST"
@@ -863,9 +874,9 @@ async function At(e) {
863
874
  return Z.error("Gift card purchase creation error:", e), null;
864
875
  }
865
876
  }
866
- async function jt(e, t) {
877
+ async function Nt(e, t) {
867
878
  try {
868
- let n = await C(`${x()}/cart/${e}/apply-gift-card`, { giftCardCode: t });
879
+ let n = await w(`${x()}/cart/${e}/apply-gift-card`, { giftCardCode: t });
869
880
  if (!n.success) return n.statusCode === 429 ? {
870
881
  valid: !1,
871
882
  error: "Too many attempts. Please wait a moment and try again."
@@ -873,7 +884,7 @@ async function jt(e, t) {
873
884
  valid: !1,
874
885
  error: n.error || "Invalid gift card code"
875
886
  });
876
- let r = kt(n.data);
887
+ let r = jt(n.data);
877
888
  return r.valid || Z.error("Apply gift card returned an unusable payload:", n.data), r;
878
889
  } catch (e) {
879
890
  return Z.error("applyGiftCard error:", e), {
@@ -882,9 +893,9 @@ async function jt(e, t) {
882
893
  };
883
894
  }
884
895
  }
885
- async function Mt(e, t) {
896
+ async function Pt(e, t) {
886
897
  try {
887
- let n = await w(`${x()}/cart/${e}/gift-card`, t ? { body: JSON.stringify({ giftCardCode: t }) } : void 0);
898
+ let n = await pe(`${x()}/cart/${e}/gift-card`, t ? { body: JSON.stringify({ giftCardCode: t }) } : void 0);
888
899
  return n.success ? { success: !0 } : (Z.error("Remove gift card failed:", n.error), {
889
900
  success: !1,
890
901
  error: n.error || "Failed to remove gift card"
@@ -896,9 +907,9 @@ async function Mt(e, t) {
896
907
  };
897
908
  }
898
909
  }
899
- async function Nt(e, t) {
910
+ async function Ft(e, t) {
900
911
  try {
901
- let n = await C(`${x()}/cart/${e}/complete-gift-card-payment`, {
912
+ let n = await w(`${x()}/cart/${e}/complete-gift-card-payment`, {
902
913
  customerName: s(t.firstName, t.lastName),
903
914
  customerEmail: t.email,
904
915
  firstName: t.firstName,
@@ -925,24 +936,24 @@ async function Nt(e, t) {
925
936
  }
926
937
  //#endregion
927
938
  //#region src/lib/api/waitlist.ts
928
- var Q = e("VC"), Pt = {
939
+ var Q = e("VC"), It = {
929
940
  waitlist_not_enabled: "Waitlist is not available for this event",
930
941
  event_not_found: "Event not found",
931
942
  invalid_phone: "Please enter a valid phone number",
932
943
  already_purchased: "You have already purchased tickets for this event",
933
944
  phone_already_registered: "This phone number is already on the waitlist"
934
945
  };
935
- async function Ft(e, t, n = null, r = !1) {
946
+ async function Lt(e, t, n = null, r = !1) {
936
947
  try {
937
948
  let i = { email: t };
938
949
  n && r && (i.phone = n, i.smsOptIn = !0);
939
- let a = await C(`/events/${e}/waitlist`, i);
950
+ let a = await w(`/events/${e}/waitlist`, i);
940
951
  return a.success ? {
941
952
  success: !0,
942
953
  updated: a.data?.updated
943
954
  } : (Q.error("Join waitlist failed:", a.error), {
944
955
  success: !1,
945
- error: Pt[a.error ?? ""] || "Failed to join waitlist. Please try again."
956
+ error: It[a.error ?? ""] || "Failed to join waitlist. Please try again."
946
957
  });
947
958
  } catch (e) {
948
959
  return Q.error("joinWaitlist error:", e), {
@@ -951,9 +962,9 @@ async function Ft(e, t, n = null, r = !1) {
951
962
  };
952
963
  }
953
964
  }
954
- async function It(e, t) {
965
+ async function Rt(e, t) {
955
966
  try {
956
- let n = await C(`/checkout/validate-token/${e}`, { email: t });
967
+ let n = await w(`/checkout/validate-token/${e}`, { email: t });
957
968
  return n.success ? {
958
969
  valid: !0,
959
970
  eventId: n.data?.eventId ?? 0
@@ -970,14 +981,14 @@ async function It(e, t) {
970
981
  };
971
982
  }
972
983
  }
973
- async function Lt(e) {
984
+ async function zt(e) {
974
985
  let t = {
975
986
  waitlistEnabled: !1,
976
987
  soldOut: !1,
977
988
  gated: !1
978
989
  };
979
990
  try {
980
- let n = await S(`/events/${e}/waitlist/status`);
991
+ let n = await C(`/events/${e}/waitlist/status`);
981
992
  return n.success ? {
982
993
  waitlistEnabled: !!n.data?.waitlistEnabled,
983
994
  soldOut: !!n.data?.soldOut,
@@ -989,7 +1000,7 @@ async function Lt(e) {
989
1000
  }
990
1001
  //#endregion
991
1002
  //#region src/lib/api/cta.ts
992
- function Rt(e, t, n = {}) {
1003
+ function Bt(e, t, n = {}) {
993
1004
  let { cancelled: r = !1, isRegistration: i = !1, waitlistEnabled: a = !1 } = n, o = ee();
994
1005
  if (r) return {
995
1006
  text: "Cancelled",
@@ -1089,7 +1100,7 @@ function Rt(e, t, n = {}) {
1089
1100
  }
1090
1101
  //#endregion
1091
1102
  //#region src/lib/api/transformers/order.ts
1092
- function zt(e) {
1103
+ function Vt(e) {
1093
1104
  let t = e;
1094
1105
  return {
1095
1106
  uuid: t.uuid || String(t.id || t.ID || ""),
@@ -1107,7 +1118,7 @@ function zt(e) {
1107
1118
  checkedInAt: t.checkedInAt || t.checked_in_at
1108
1119
  };
1109
1120
  }
1110
- function Bt(e) {
1121
+ function Ht(e) {
1111
1122
  let t = e, n = t.purchasedTickets || t.tickets || t.purchased_tickets || [];
1112
1123
  return {
1113
1124
  uuid: t.uuid || String(t.id || t.ID || ""),
@@ -1123,14 +1134,14 @@ function Bt(e) {
1123
1134
  discount: t.discount == null ? 0 : t.discount,
1124
1135
  paymentIntentId: t.paymentIntentId || t.payment_intent_id,
1125
1136
  paymentMethod: t.paymentMethod || t.payment_method,
1126
- purchasedTickets: n.map(zt),
1137
+ purchasedTickets: n.map(Vt),
1127
1138
  createdAt: t.createdAt || t.created_at,
1128
1139
  updatedAt: t.updatedAt || t.updated_at
1129
1140
  };
1130
1141
  }
1131
- var Vt = zt, Ht = Bt;
1132
- function Ut(e) {
1133
- let t = Bt(e), n = t.uuid.split("-")[0] || t.uuid, i = Number(t.totalAmount);
1142
+ var Ut = Vt, Wt = Ht;
1143
+ function Gt(e) {
1144
+ let t = Ht(e), n = t.uuid.split("-")[0] || t.uuid, i = Number(t.totalAmount);
1134
1145
  return {
1135
1146
  orderId: t.uuid,
1136
1147
  displayOrderId: n,
@@ -1144,13 +1155,13 @@ function Ut(e) {
1144
1155
  }
1145
1156
  //#endregion
1146
1157
  //#region src/lib/api/transformers/event.ts
1147
- function Wt(e) {
1158
+ function Kt(e) {
1148
1159
  return u(e, { cdn: !0 });
1149
1160
  }
1150
1161
  function $(e) {
1151
- return Wt(e.imageUrl || e.imageURL || e.image_url || e.image || "");
1162
+ return Kt(e.imageUrl || e.imageURL || e.image_url || e.image || "");
1152
1163
  }
1153
- function Gt(e) {
1164
+ function qt(e) {
1154
1165
  switch (e) {
1155
1166
  case "available":
1156
1167
  case "sold_out":
@@ -1159,10 +1170,10 @@ function Gt(e) {
1159
1170
  default: return null;
1160
1171
  }
1161
1172
  }
1162
- function Kt(e) {
1173
+ function Jt(e) {
1163
1174
  let t = e.ctaState || e.cta_state;
1164
1175
  if (t) {
1165
- let e = Gt(t);
1176
+ let e = qt(t);
1166
1177
  if (e) return e;
1167
1178
  }
1168
1179
  if (e.isCancelled || e.is_cancelled) return "ended";
@@ -1179,7 +1190,7 @@ function Kt(e) {
1179
1190
  return e + Math.max(0, n - r);
1180
1191
  }, 0) <= 0 ? "sold_out" : "available";
1181
1192
  }
1182
- function qt(e) {
1193
+ function Yt(e) {
1183
1194
  let t = e;
1184
1195
  return {
1185
1196
  id: t.id || t.ID,
@@ -1200,8 +1211,8 @@ function qt(e) {
1200
1211
  sortOrder: t.sortOrder || t.sort_order || 0
1201
1212
  };
1202
1213
  }
1203
- function Jt(e) {
1204
- let t = e, n = (t.availableTickets || t.available_tickets || t.tickets || []).map(qt), r = n.map((e) => e.price).filter((e) => e > 0), i = r.length > 0 ? Math.min(...r) : void 0, a = r.length > 0 ? Math.max(...r) : void 0;
1214
+ function Xt(e) {
1215
+ let t = e, n = (t.availableTickets || t.available_tickets || t.tickets || []).map(Yt), r = n.map((e) => e.price).filter((e) => e > 0), i = r.length > 0 ? Math.min(...r) : void 0, a = r.length > 0 ? Math.max(...r) : void 0;
1205
1216
  return {
1206
1217
  eventID: t.eventID || t.id || t.ID || 0,
1207
1218
  id: t.id || t.ID,
@@ -1229,7 +1240,7 @@ function Jt(e) {
1229
1240
  minPrice: t.minPrice ?? t.min_price ?? i,
1230
1241
  maxPrice: t.maxPrice ?? t.max_price ?? a,
1231
1242
  ctaText: t.ctaText || t.cta_text,
1232
- ctaState: Kt(t),
1243
+ ctaState: Jt(t),
1233
1244
  showPerformers: t.showPerformers ?? t.show_performers,
1234
1245
  eventSeriesId: t.eventSeriesId || t.event_series_id,
1235
1246
  seriesInstanceNumber: t.seriesInstanceNumber || t.series_instance_number,
@@ -1263,13 +1274,13 @@ function Jt(e) {
1263
1274
  purchasedTickets: t.purchasedTickets
1264
1275
  };
1265
1276
  }
1266
- var Yt = qt, Xt = Jt, Zt = Jt;
1277
+ var Zt = Yt, Qt = Xt, $t = Xt;
1267
1278
  //#endregion
1268
1279
  //#region src/lib/api/transformers/venue.ts
1269
- function Qt(e) {
1280
+ function en(e) {
1270
1281
  return u(e, { cdn: !0 });
1271
1282
  }
1272
- function $t(e) {
1283
+ function tn(e) {
1273
1284
  let t = e, n = t.logoUrl || t.logo_url || t.logo;
1274
1285
  return {
1275
1286
  id: t.id || t.ID || 0,
@@ -1282,7 +1293,7 @@ function $t(e) {
1282
1293
  zipCode: t.zipCode || t.zip_code,
1283
1294
  country: t.country,
1284
1295
  timezone: t.timezone || t.time_zone,
1285
- logoUrl: Qt(n),
1296
+ logoUrl: en(n),
1286
1297
  serviceFeePercentage: t.serviceFeePercentage ?? t.service_fee_percentage ?? 0,
1287
1298
  serviceFeeCents: t.serviceFeeCents ?? t.service_fee_cents ?? 0,
1288
1299
  absorbServiceFee: (t.absorbServiceFee ?? t.absorb_service_fee) === !0,
@@ -1290,8 +1301,8 @@ function $t(e) {
1290
1301
  organizationId: t.organizationId || t.organization_id
1291
1302
  };
1292
1303
  }
1293
- var en = $t;
1294
- function tn(e) {
1304
+ var nn = tn;
1305
+ function rn(e) {
1295
1306
  let t = e;
1296
1307
  return {
1297
1308
  serviceFeePercentage: t.serviceFeePercentage ?? t.service_fee_percentage ?? 0,
@@ -1299,7 +1310,7 @@ function tn(e) {
1299
1310
  taxPercentage: t.taxPercentage ?? t.tax_percentage ?? 0
1300
1311
  };
1301
1312
  }
1302
- function nn(e) {
1313
+ function an(e) {
1303
1314
  return [
1304
1315
  e.address,
1305
1316
  e.city,
@@ -1308,4 +1319,4 @@ function nn(e) {
1308
1319
  ].filter(Boolean).join(", ");
1309
1320
  }
1310
1321
  //#endregion
1311
- export { w as apiDelete, S as apiGet, C as apiPost, pe as apiPut, jt as applyGiftCard, Xe as applyPromoCode, Kt as calculateCtaState, Be as cancelReservation, xt as checkCollectionPassword, St as checkEventPassword, Nt as completeGiftCardPayment, ze as completeReservation, Rt as computeCtaState, se as configureApi, At as createGiftCardPurchase, Ve as createOrder, Ie as createPaymentIntent, I as err, L as errNotFound, We as extendCheckoutSession, tn as extractVenueFees, st as fetchAllVenues, ot as fetchAllVenuesResult, tt as fetchEventDetails, K as fetchEventDetailsResult, at as fetchEventPerformers, it as fetchEventPerformersResult, rt as fetchEventTickets, nt as fetchEventTicketsResult, bt as fetchPublicCollection, vt as fetchSeriesOccurrences, _t as fetchSeriesOccurrencesResult, lt as fetchVenueEvents, ct as fetchVenueEventsResult, nn as formatVenueAddress, ce as getApiConfig, Wt as getCDNImageUrl, Le as getCartByUUID, ue as getClientIP, $ as getEventImageUrl, le as getLegacyPublicUrl, ft as getMonthEvents, dt as getMonthEventsResult, He as getOrder, x as getOrdersV2Url, mt as getOrgMonthEvents, pt as getOrgMonthEventsResult, b as getPublicBaseUrl, gt as getSeriesOccurrences, ht as getSeriesOccurrencesResult, Ge as getSessionStatus, wt as getVenue, Et as getVenueBySlug, Tt as getVenueFees, Lt as getWaitlistStatus, Ye as hasPromoCodes, Ke as initiateOrder, et as isErr, $e as isOk, Ft as joinWaitlist, F as ok, Mt as removeGiftCard, Ze as removePromoCode, yt as resolvePublicEntity, Ct as testNetworkConnection, qe as trackUTMSource, Yt as transformAvailableTicket, Xt as transformEvent, Zt as transformEventData, Ht as transformOrder, Ut as transformOrderForDisplay, Vt as transformTicket, en as transformVenue, R as unwrapOr, Re as updateCartQuantities, Ue as validatePaymentIntent, Je as validatePromoCode, It as validateWaitlistToken };
1322
+ export { pe as apiDelete, C as apiGet, w as apiPost, fe as apiPut, Nt as applyGiftCard, Xe as applyPromoCode, Jt as calculateCtaState, Be as cancelReservation, Ct as checkCollectionPassword, wt as checkEventPassword, Ft as completeGiftCardPayment, ze as completeReservation, Bt as computeCtaState, se as configureApi, Mt as createGiftCardPurchase, Ve as createOrder, Ie as createPaymentIntent, I as err, L as errNotFound, We as extendCheckoutSession, rn as extractVenueFees, ct as fetchAllVenues, st as fetchAllVenuesResult, nt as fetchEventDetails, tt as fetchEventDetailsResult, ot as fetchEventPerformers, at as fetchEventPerformersResult, it as fetchEventTickets, rt as fetchEventTicketsResult, St as fetchPublicCollection, bt as fetchSeriesOccurrences, yt as fetchSeriesOccurrencesResult, ut as fetchVenueEvents, lt as fetchVenueEventsResult, an as formatVenueAddress, ce as getApiConfig, Kt as getCDNImageUrl, Le as getCartByUUID, ue as getClientIP, $ as getEventImageUrl, le as getLegacyPublicUrl, mt as getMonthEvents, pt as getMonthEventsResult, He as getOrder, x as getOrdersV2Url, gt as getOrgMonthEvents, ht as getOrgMonthEventsResult, b as getPublicBaseUrl, vt as getSeriesOccurrences, _t as getSeriesOccurrencesResult, Ge as getSessionStatus, Et as getVenue, Ot as getVenueBySlug, Dt as getVenueFees, zt as getWaitlistStatus, Ye as hasPromoCodes, Ke as initiateOrder, et as isErr, $e as isOk, Lt as joinWaitlist, F as ok, Pt as removeGiftCard, Ze as removePromoCode, xt as resolvePublicEntity, Tt as testNetworkConnection, qe as trackUTMSource, Zt as transformAvailableTicket, Qt as transformEvent, $t as transformEventData, Wt as transformOrder, Gt as transformOrderForDisplay, Ut as transformTicket, nn as transformVenue, R as unwrapOr, Re as updateCartQuantities, Ue as validatePaymentIntent, Je as validatePromoCode, Rt as validateWaitlistToken };