@getmicdrop/venue-calendar 4.0.97 → 4.0.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CartView-C3CM_of4.js → CartView-inr4N-_2.js} +7 -7
- package/dist/{CartView-C3CM_of4.js.map → CartView-inr4N-_2.js.map} +1 -1
- package/dist/{Checkout-DlwrJNFl.js → Checkout-BILhpPY7.js} +3 -3
- package/dist/{Checkout-DlwrJNFl.js.map → Checkout-BILhpPY7.js.map} +1 -1
- package/dist/{Checkout-C-M3GkqC.js → Checkout-CssZ6V2A.js} +9 -9
- package/dist/{Checkout-C-M3GkqC.js.map → Checkout-CssZ6V2A.js.map} +1 -1
- package/dist/{CheckoutTimer-BGpTXav2.js → CheckoutTimer-CKd1wmyV.js} +5 -5
- package/dist/{CheckoutTimer-BGpTXav2.js.map → CheckoutTimer-CKd1wmyV.js.map} +1 -1
- package/dist/{ClockIcon-CbUBc37W.js → ClockIcon-DTUfaeDB.js} +2 -2
- package/dist/{ClockIcon-CbUBc37W.js.map → ClockIcon-DTUfaeDB.js.map} +1 -1
- package/dist/{CollectionView-C8jLl4ZF.js → CollectionView-eLbVZUv0.js} +5 -5
- package/dist/{CollectionView-C8jLl4ZF.js.map → CollectionView-eLbVZUv0.js.map} +1 -1
- package/dist/{Event-BIxmGbtN.js → Event-DLA5gaig.js} +8 -8
- package/dist/{Event-BIxmGbtN.js.map → Event-DLA5gaig.js.map} +1 -1
- package/dist/{EventPage-CfFdjshw.js → EventPage-LK1nOFoA.js} +6 -6
- package/dist/{EventPage-CfFdjshw.js.map → EventPage-LK1nOFoA.js.map} +1 -1
- package/dist/{Heading-BftmeVf1.js → Heading-CYIcD7lJ.js} +2 -2
- package/dist/{Heading-BftmeVf1.js.map → Heading-CYIcD7lJ.js.map} +1 -1
- package/dist/{ScarcityBadge-Cj7ihi0s.js → ScarcityBadge-CB8Wv6_P.js} +2 -2
- package/dist/{ScarcityBadge-Cj7ihi0s.js.map → ScarcityBadge-CB8Wv6_P.js.map} +1 -1
- package/dist/{SeriesPage-LSLEq-VI.js → SeriesPage-BhwhYFnc.js} +5 -5
- package/dist/{SeriesPage-LSLEq-VI.js.map → SeriesPage-BhwhYFnc.js.map} +1 -1
- package/dist/{Spinner-D6pWJ-VV.js → Spinner-DllDTBA9.js} +2 -2
- package/dist/{Spinner-D6pWJ-VV.js.map → Spinner-DllDTBA9.js.map} +1 -1
- package/dist/{Success-BwzdTBRN.js → Success-CjemAJNU.js} +7 -7
- package/dist/{Success-BwzdTBRN.js.map → Success-CjemAJNU.js.map} +1 -1
- package/dist/{Text-DvAmz2c4.js → Text-BM11r41a.js} +2 -2
- package/dist/{Text-DvAmz2c4.js.map → Text-BM11r41a.js.map} +1 -1
- package/dist/{VenueCalendar-ZIexgvtu.js → VenueCalendar-DDEZQUrA.js} +21 -16
- package/dist/{VenueCalendar-ZIexgvtu.js.map → VenueCalendar-DDEZQUrA.js.map} +1 -1
- package/dist/{ViewTicketsEmbed-Ex-uXFdv.js → ViewTicketsEmbed-BIFKEUos.js} +5 -5
- package/dist/{ViewTicketsEmbed-Ex-uXFdv.js.map → ViewTicketsEmbed-BIFKEUos.js.map} +1 -1
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +86 -77
- package/dist/api/api.mjs.map +1 -1
- package/dist/{data-toggle-store.svelte-CIisuuz8.js → data-toggle-store.svelte-B6_uWGtS.js} +2 -2
- package/dist/{data-toggle-store.svelte-CIisuuz8.js.map → data-toggle-store.svelte-B6_uWGtS.js.map} +1 -1
- package/dist/{labels-CGPu9d2k.js → labels-DmANUTR_.js} +3 -3
- package/dist/{labels-CGPu9d2k.js.map → labels-DmANUTR_.js.map} +1 -1
- package/dist/{modalManager.svelte-CDhdha2m.js → modalManager.svelte-CT1YXxAF.js} +2 -2
- package/dist/{modalManager.svelte-CDhdha2m.js.map → modalManager.svelte-CT1YXxAF.js.map} +1 -1
- package/dist/{transform-ati8Nk1h.js → transform-RsoCHJIj.js} +2 -2
- package/dist/{transform-ati8Nk1h.js.map → transform-RsoCHJIj.js.map} +1 -1
- package/dist/venue-calendar.es.js +1 -1
- package/dist/venue-calendar.iife.js +2 -2
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +2 -2
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/api/api.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger as $ } from "@getmicdrop/svelte-components/utils/logger";
|
|
2
|
-
import { getLocalStorage as ue, setLocalStorage as le, getSessionStorage as Y, setSessionStorage as de, createLogger as fe, AppError as
|
|
2
|
+
import { getLocalStorage as ue, setLocalStorage as le, getSessionStorage as Y, setSessionStorage as de, createLogger as fe, AppError as D, formatCurrency as me, asUSD as pe, resolveImageUrl as K } from "@getmicdrop/svelte-components";
|
|
3
3
|
import { formatLocal as L } from "@getmicdrop/svelte-components/datetime";
|
|
4
4
|
import { isHiddenTicketPurchasable as ye } from "@getmicdrop/svelte-components/transforms";
|
|
5
5
|
import "@getmicdrop/svelte-components/utils/timezones";
|
|
@@ -34,7 +34,7 @@ async function Z(t, e, r) {
|
|
|
34
34
|
const n = (e.method || "GET").toUpperCase(), s = n === "GET" || n === "HEAD" ? r.retries + 1 : 1;
|
|
35
35
|
let o;
|
|
36
36
|
for (let i = 1; i <= s; i++) {
|
|
37
|
-
const u = new AbortController(),
|
|
37
|
+
const u = new AbortController(), P = setTimeout(() => u.abort(), r.timeout), y = e.signal;
|
|
38
38
|
let k;
|
|
39
39
|
y && (y.aborted ? u.abort() : (k = () => u.abort(), y.addEventListener("abort", k, { once: !0 })));
|
|
40
40
|
try {
|
|
@@ -46,7 +46,7 @@ async function Z(t, e, r) {
|
|
|
46
46
|
} catch (g) {
|
|
47
47
|
if (o = g, y?.aborted) throw g;
|
|
48
48
|
} finally {
|
|
49
|
-
clearTimeout(
|
|
49
|
+
clearTimeout(P), y && k && y.removeEventListener("abort", k);
|
|
50
50
|
}
|
|
51
51
|
i < s && await ve(r.retryDelay * Math.pow(2, i - 1));
|
|
52
52
|
}
|
|
@@ -93,7 +93,7 @@ async function F(t, e, r, n) {
|
|
|
93
93
|
), { success: !1, error: o };
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
async function
|
|
96
|
+
async function T(t, e) {
|
|
97
97
|
try {
|
|
98
98
|
const r = await Z(
|
|
99
99
|
t,
|
|
@@ -160,7 +160,7 @@ function Ce() {
|
|
|
160
160
|
return !1;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Te() {
|
|
164
164
|
const t = typeof window < "u", e = Ce(), r = t ? window.location.search : "", n = (typeof document < "u" ? document.referrer : "") ?? "", a = t && e ? window.location.href : "";
|
|
165
165
|
return {
|
|
166
166
|
utm: $e(new URLSearchParams(r)),
|
|
@@ -168,15 +168,15 @@ function Pe() {
|
|
|
168
168
|
pageUrl: a || ""
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
let
|
|
172
|
-
function
|
|
171
|
+
let Pe = !1;
|
|
172
|
+
function Se() {
|
|
173
173
|
return typeof window < "u" && typeof window.__tcfapi == "function";
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return
|
|
175
|
+
function Ie() {
|
|
176
|
+
return Se();
|
|
177
177
|
}
|
|
178
178
|
function Ee() {
|
|
179
|
-
return
|
|
179
|
+
return Ie() ? Pe : !0;
|
|
180
180
|
}
|
|
181
181
|
const H = "micdrop_session_id", W = "micdrop_visitor_id", Re = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
182
182
|
function Ae(t) {
|
|
@@ -195,11 +195,11 @@ function re() {
|
|
|
195
195
|
for (let n = 0; n < 16; n++) r.push(e[n].toString(16).padStart(2, "0"));
|
|
196
196
|
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]}`;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function Ne() {
|
|
199
199
|
let t = Y(H);
|
|
200
200
|
return t || (t = re(), de(H, t)), t;
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function De() {
|
|
203
203
|
if (!Ee()) return null;
|
|
204
204
|
const t = ue(W);
|
|
205
205
|
if (Ae(t)) return t;
|
|
@@ -212,10 +212,10 @@ function xe() {
|
|
|
212
212
|
return !t || !t.utm || typeof t.utm.utmSource != "string" ? null : t;
|
|
213
213
|
}
|
|
214
214
|
function U() {
|
|
215
|
-
const e = xe() ??
|
|
215
|
+
const e = xe() ?? Te();
|
|
216
216
|
return {
|
|
217
|
-
sessionId:
|
|
218
|
-
visitorId:
|
|
217
|
+
sessionId: Ne(),
|
|
218
|
+
visitorId: De(),
|
|
219
219
|
utmSource: e.utm.utmSource,
|
|
220
220
|
utmMedium: e.utm.utmMedium,
|
|
221
221
|
utmCampaign: e.utm.utmCampaign,
|
|
@@ -240,7 +240,7 @@ async function pt(t, e, r) {
|
|
|
240
240
|
}
|
|
241
241
|
);
|
|
242
242
|
if (!n.success)
|
|
243
|
-
throw d.error("Payment intent creation failed:", n.error), new
|
|
243
|
+
throw d.error("Payment intent creation failed:", n.error), new D(
|
|
244
244
|
n.error || "Failed to create payment intent",
|
|
245
245
|
"lib/api/orders/createPaymentIntent"
|
|
246
246
|
);
|
|
@@ -341,7 +341,7 @@ async function _t(t, e) {
|
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
async function wt(t) {
|
|
344
|
-
return
|
|
344
|
+
return T(`${c()}/orders/${t}`);
|
|
345
345
|
}
|
|
346
346
|
async function kt(t, e) {
|
|
347
347
|
try {
|
|
@@ -424,7 +424,7 @@ async function Ct(t = { eventID: "" }) {
|
|
|
424
424
|
return d.error("initiateOrder error:", e), null;
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
-
async function
|
|
427
|
+
async function Tt(t) {
|
|
428
428
|
if (typeof window > "u") return;
|
|
429
429
|
const e = new URLSearchParams(window.location.search), r = te(e.get("utm_source")) || ee;
|
|
430
430
|
try {
|
|
@@ -436,7 +436,7 @@ async function Pt(t) {
|
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
const V = $("VC"), Oe = () => A();
|
|
439
|
-
async function
|
|
439
|
+
async function Pt(t, e) {
|
|
440
440
|
try {
|
|
441
441
|
if (!e || !e.trim())
|
|
442
442
|
return { valid: !1, error: "Promo code is required" };
|
|
@@ -459,7 +459,7 @@ async function Tt(t, e) {
|
|
|
459
459
|
return V.error("Error validating promo code:", r), { valid: !1, error: "Network error validating code" };
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
async function
|
|
462
|
+
async function St(t) {
|
|
463
463
|
try {
|
|
464
464
|
const e = await C(
|
|
465
465
|
`/promo-codes/check/${t}`
|
|
@@ -469,7 +469,7 @@ async function It(t) {
|
|
|
469
469
|
return V.error("Error checking promo codes availability:", e), !0;
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
async function
|
|
472
|
+
async function It(t, e) {
|
|
473
473
|
try {
|
|
474
474
|
const r = await m(
|
|
475
475
|
`${Oe()}/cart/${t}/apply-promo`,
|
|
@@ -507,7 +507,7 @@ function ne(t) {
|
|
|
507
507
|
function b(t) {
|
|
508
508
|
return { ok: !1, error: t };
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function J(t) {
|
|
511
511
|
return { ok: !1, error: t, notFound: !0 };
|
|
512
512
|
}
|
|
513
513
|
function Rt(t) {
|
|
@@ -516,7 +516,7 @@ function Rt(t) {
|
|
|
516
516
|
function At(t) {
|
|
517
517
|
return !t.ok;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function N(t, e) {
|
|
520
520
|
return t.ok ? t.data : e;
|
|
521
521
|
}
|
|
522
522
|
const f = $("VC"), O = /* @__PURE__ */ new Map();
|
|
@@ -530,9 +530,9 @@ async function Ve(t, e = fetch, r) {
|
|
|
530
530
|
try {
|
|
531
531
|
const s = r ? `${c()}/events/${t}?password=${encodeURIComponent(r)}` : `${c()}/events/${t}`, o = await e(s);
|
|
532
532
|
if (!o.ok)
|
|
533
|
-
return o.status === 404 ?
|
|
533
|
+
return o.status === 404 ? J("event_not_found") : (f.error(`Failed to fetch event details: ${o.status}`), b("event_fetch_failed"));
|
|
534
534
|
const i = await o.json();
|
|
535
|
-
return i ? ne(i) :
|
|
535
|
+
return i ? ne(i) : J("event_not_found");
|
|
536
536
|
} catch (s) {
|
|
537
537
|
return f.error("Error fetching event details:", s), b("event_fetch_failed");
|
|
538
538
|
}
|
|
@@ -541,13 +541,13 @@ async function Ve(t, e = fetch, r) {
|
|
|
541
541
|
O.get(n) === a && O.delete(n);
|
|
542
542
|
})), a;
|
|
543
543
|
}
|
|
544
|
-
async function
|
|
544
|
+
async function Nt(t, e = fetch, r) {
|
|
545
545
|
const n = await Ve(t, e, r);
|
|
546
546
|
return n.ok ? n.data : null;
|
|
547
547
|
}
|
|
548
548
|
async function w(t, e, r = (n) => n) {
|
|
549
549
|
try {
|
|
550
|
-
const n = await
|
|
550
|
+
const n = await T(t);
|
|
551
551
|
return n ? ne(r(n)) : (f.error(`Failed to load (${e}): network or server error`), b(e));
|
|
552
552
|
} catch (n) {
|
|
553
553
|
return f.error(`Error loading (${e}):`, n), b(e);
|
|
@@ -563,8 +563,8 @@ async function Le(t) {
|
|
|
563
563
|
G
|
|
564
564
|
);
|
|
565
565
|
}
|
|
566
|
-
async function
|
|
567
|
-
return
|
|
566
|
+
async function Dt(t) {
|
|
567
|
+
return N(await Le(t), []);
|
|
568
568
|
}
|
|
569
569
|
async function qe(t) {
|
|
570
570
|
return t ? w(
|
|
@@ -574,7 +574,7 @@ async function qe(t) {
|
|
|
574
574
|
) : (f.warn("fetchEventPerformers called without eventId"), b("performers_missing_event_id"));
|
|
575
575
|
}
|
|
576
576
|
async function Ut(t) {
|
|
577
|
-
return
|
|
577
|
+
return N(await qe(t), {
|
|
578
578
|
performers: [],
|
|
579
579
|
showPerformers: !1
|
|
580
580
|
});
|
|
@@ -587,7 +587,7 @@ async function Me(t) {
|
|
|
587
587
|
) : (f.warn("fetchAllVenues called without orgId"), b("venues_missing_org_id"));
|
|
588
588
|
}
|
|
589
589
|
async function xt(t) {
|
|
590
|
-
return
|
|
590
|
+
return N(await Me(t), []);
|
|
591
591
|
}
|
|
592
592
|
async function Ge(t) {
|
|
593
593
|
return t ? w(
|
|
@@ -597,7 +597,7 @@ async function Ge(t) {
|
|
|
597
597
|
) : (f.warn("fetchVenueEvents called without venueId"), b("venue_events_missing_venue_id"));
|
|
598
598
|
}
|
|
599
599
|
async function Ot(t) {
|
|
600
|
-
return
|
|
600
|
+
return N(await Ge(t), []);
|
|
601
601
|
}
|
|
602
602
|
function ae(t) {
|
|
603
603
|
return Array.isArray(t) ? t : Array.isArray(t.events) ? t.events : [];
|
|
@@ -610,7 +610,7 @@ async function je(t, e, r) {
|
|
|
610
610
|
);
|
|
611
611
|
}
|
|
612
612
|
async function Ft(t, e, r) {
|
|
613
|
-
return
|
|
613
|
+
return N(await je(t, e, r), []);
|
|
614
614
|
}
|
|
615
615
|
async function ze(t, e, r) {
|
|
616
616
|
return w(
|
|
@@ -620,7 +620,7 @@ async function ze(t, e, r) {
|
|
|
620
620
|
);
|
|
621
621
|
}
|
|
622
622
|
async function Vt(t, e, r) {
|
|
623
|
-
return
|
|
623
|
+
return N(await ze(t, e, r), []);
|
|
624
624
|
}
|
|
625
625
|
async function Be(t) {
|
|
626
626
|
return w(
|
|
@@ -644,11 +644,11 @@ async function qt(t, e) {
|
|
|
644
644
|
}
|
|
645
645
|
async function Mt(t, e) {
|
|
646
646
|
try {
|
|
647
|
-
const r = e ? `?slug=${encodeURIComponent(e)}` : "", n = await
|
|
647
|
+
const r = e ? `?slug=${encodeURIComponent(e)}` : "", n = await T(
|
|
648
648
|
`${c()}/resolve/${encodeURIComponent(String(t))}${r}`
|
|
649
649
|
);
|
|
650
650
|
if (!n || !n.type)
|
|
651
|
-
throw new
|
|
651
|
+
throw new D(
|
|
652
652
|
"Failed to resolve entity",
|
|
653
653
|
"lib/api/events/resolvePublicEntity"
|
|
654
654
|
);
|
|
@@ -659,11 +659,11 @@ async function Mt(t, e) {
|
|
|
659
659
|
}
|
|
660
660
|
async function Gt(t) {
|
|
661
661
|
try {
|
|
662
|
-
const e = await
|
|
662
|
+
const e = await T(
|
|
663
663
|
`${c()}/series/${t}/page`
|
|
664
664
|
);
|
|
665
665
|
if (!e)
|
|
666
|
-
throw new
|
|
666
|
+
throw new D(
|
|
667
667
|
"Failed to fetch series page",
|
|
668
668
|
"lib/api/events/fetchSeriesPage"
|
|
669
669
|
);
|
|
@@ -674,9 +674,9 @@ async function Gt(t) {
|
|
|
674
674
|
}
|
|
675
675
|
async function jt(t, e) {
|
|
676
676
|
try {
|
|
677
|
-
const r = e ? `${c()}/collections/${t}?password=${encodeURIComponent(e)}` : `${c()}/collections/${t}`, n = await
|
|
677
|
+
const r = e ? `${c()}/collections/${t}?password=${encodeURIComponent(e)}` : `${c()}/collections/${t}`, n = await T(r);
|
|
678
678
|
if (!n)
|
|
679
|
-
throw new
|
|
679
|
+
throw new D(
|
|
680
680
|
"Failed to fetch collection",
|
|
681
681
|
"lib/api/events/fetchPublicCollection"
|
|
682
682
|
);
|
|
@@ -687,9 +687,13 @@ async function jt(t, e) {
|
|
|
687
687
|
}
|
|
688
688
|
async function zt(t, e) {
|
|
689
689
|
try {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
690
|
+
return (await T(
|
|
691
|
+
`${c()}/collections/${t}/check-password`,
|
|
692
|
+
{
|
|
693
|
+
method: "POST",
|
|
694
|
+
headers: { "Content-Type": "application/json" },
|
|
695
|
+
body: JSON.stringify({ password: e })
|
|
696
|
+
}
|
|
693
697
|
))?.valid === !0;
|
|
694
698
|
} catch (r) {
|
|
695
699
|
return f.error("Error checking collection password:", r), !1;
|
|
@@ -697,10 +701,15 @@ async function zt(t, e) {
|
|
|
697
701
|
}
|
|
698
702
|
async function Bt(t, e) {
|
|
699
703
|
try {
|
|
700
|
-
const r =
|
|
701
|
-
`${c()}/events/${t}/check-password
|
|
704
|
+
const r = await T(
|
|
705
|
+
`${c()}/events/${t}/check-password`,
|
|
706
|
+
{
|
|
707
|
+
method: "POST",
|
|
708
|
+
headers: { "Content-Type": "application/json" },
|
|
709
|
+
body: JSON.stringify({ password: e })
|
|
710
|
+
}
|
|
702
711
|
);
|
|
703
|
-
return typeof
|
|
712
|
+
return typeof r == "boolean" ? { valid: r } : { valid: r?.valid === !0 };
|
|
704
713
|
} catch (r) {
|
|
705
714
|
return f.error("Error checking event password:", r), { valid: !1 };
|
|
706
715
|
}
|
|
@@ -734,7 +743,7 @@ async function Wt(t) {
|
|
|
734
743
|
taxPercentage: e.taxPercentage ?? 0
|
|
735
744
|
} : null;
|
|
736
745
|
}
|
|
737
|
-
async function
|
|
746
|
+
async function Jt(t) {
|
|
738
747
|
try {
|
|
739
748
|
if (!t)
|
|
740
749
|
return R.warn("getVenueBySlug called without slug"), null;
|
|
@@ -744,7 +753,7 @@ async function Qt(t) {
|
|
|
744
753
|
return R.error("Error fetching venue by slug:", e), null;
|
|
745
754
|
}
|
|
746
755
|
}
|
|
747
|
-
function
|
|
756
|
+
function Je(t) {
|
|
748
757
|
const e = t ?? {}, r = (e.appliedAmount ?? 0) / 100, n = e.remainingTotal ?? 0, a = e.fullyCoveredByCard ?? n <= 0, s = !a;
|
|
749
758
|
return {
|
|
750
759
|
valid: !0,
|
|
@@ -757,15 +766,15 @@ function Qe(t) {
|
|
|
757
766
|
requiresStripe: s
|
|
758
767
|
};
|
|
759
768
|
}
|
|
760
|
-
const h = $("VC"),
|
|
761
|
-
async function
|
|
769
|
+
const h = $("VC"), Qe = "https://get-micdrop.com", Ye = `${Qe}/api/orders/v2`, j = () => A();
|
|
770
|
+
async function Qt(t) {
|
|
762
771
|
try {
|
|
763
772
|
const e = await m(
|
|
764
773
|
`${Ye}/gift-cards`,
|
|
765
774
|
t
|
|
766
775
|
);
|
|
767
776
|
if (!e.success)
|
|
768
|
-
throw h.error("Gift card purchase creation failed:", e.error), new
|
|
777
|
+
throw h.error("Gift card purchase creation failed:", e.error), new D(
|
|
769
778
|
e.error || "Failed to create gift card purchase",
|
|
770
779
|
"lib/api/gift-cards/createGiftCardPurchase"
|
|
771
780
|
);
|
|
@@ -780,7 +789,7 @@ async function Yt(t, e) {
|
|
|
780
789
|
`${j()}/cart/${t}/apply-gift-card`,
|
|
781
790
|
{ giftCardCode: e }
|
|
782
791
|
);
|
|
783
|
-
return r.success ?
|
|
792
|
+
return r.success ? Je(r.data) : r.statusCode === 429 ? {
|
|
784
793
|
valid: !1,
|
|
785
794
|
error: "Too many attempts. Please wait a moment and try again."
|
|
786
795
|
} : (h.error("Apply gift card failed:", r.error), {
|
|
@@ -897,10 +906,10 @@ function tr(t, e, r = {}) {
|
|
|
897
906
|
const i = t.endDateTime || t.startDateTime;
|
|
898
907
|
if (i && new Date(i) < o)
|
|
899
908
|
return { text: "Sales ended", disabled: !0, reason: "event_past" };
|
|
900
|
-
const u = t?.hasPurchasableHiddenTickets === !0 || Array.isArray(e) && e.some(ye),
|
|
909
|
+
const u = t?.hasPurchasableHiddenTickets === !0 || Array.isArray(e) && e.some(ye), P = (e || []).filter(
|
|
901
910
|
(l) => l.salesChannel !== 2 && !l.isHidden && !(typeof l.visibility == "number" && l.visibility >= 2)
|
|
902
911
|
);
|
|
903
|
-
if (
|
|
912
|
+
if (P.length === 0)
|
|
904
913
|
return u ? {
|
|
905
914
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
906
915
|
disabled: !1,
|
|
@@ -911,10 +920,10 @@ function tr(t, e, r = {}) {
|
|
|
911
920
|
reason: "no_tickets"
|
|
912
921
|
};
|
|
913
922
|
let y = !1, k = !0, g = !0, v = null;
|
|
914
|
-
for (const l of
|
|
915
|
-
const
|
|
916
|
-
if (!_ && !E && !z && (y = !0), _ || (k = !1), E || (g = !1), E &&
|
|
917
|
-
const B = new Date(
|
|
923
|
+
for (const l of P) {
|
|
924
|
+
const S = l.salesBegin || l.salesStart || l.saleBegin || l.onSaleStart, x = l.salesEnd || l.saleEnd || l.onSaleEnd, I = l.remainingCapacity ?? l.quantityRemaining ?? l.quantity, _ = l.soldOut || I != null && I <= 0, E = S ? new Date(S) > o : !1, z = x ? new Date(x) < o : !1;
|
|
925
|
+
if (!_ && !E && !z && (y = !0), _ || (k = !1), E || (g = !1), E && S && !_ && !z) {
|
|
926
|
+
const B = new Date(S);
|
|
918
927
|
(!v || B < v) && (v = B);
|
|
919
928
|
}
|
|
920
929
|
}
|
|
@@ -931,13 +940,13 @@ function tr(t, e, r = {}) {
|
|
|
931
940
|
disabled: !1,
|
|
932
941
|
reason: "hidden_only"
|
|
933
942
|
};
|
|
934
|
-
const l = v.getTime() - o.getTime(),
|
|
943
|
+
const l = v.getTime() - o.getTime(), S = l / (1e3 * 60 * 60), x = l / (1e3 * 60 * 60 * 24), I = (E) => L(
|
|
935
944
|
E,
|
|
936
945
|
{ hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
937
946
|
"en-US"
|
|
938
947
|
);
|
|
939
948
|
let _;
|
|
940
|
-
return
|
|
949
|
+
return S < 24 ? _ = I(v) : x <= 7 ? _ = L(
|
|
941
950
|
v,
|
|
942
951
|
{ weekday: "short", hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
943
952
|
"en-US"
|
|
@@ -945,7 +954,7 @@ function tr(t, e, r = {}) {
|
|
|
945
954
|
v,
|
|
946
955
|
{ month: "short", day: "numeric" },
|
|
947
956
|
"en-US"
|
|
948
|
-
)} ${
|
|
957
|
+
)} ${I(v)}`, {
|
|
949
958
|
text: `On sale ${_}`,
|
|
950
959
|
disabled: !0,
|
|
951
960
|
reason: "coming_soon"
|
|
@@ -1021,7 +1030,7 @@ function ar(t) {
|
|
|
1021
1030
|
function Ze(t) {
|
|
1022
1031
|
return K(t, { cdn: !0 });
|
|
1023
1032
|
}
|
|
1024
|
-
function
|
|
1033
|
+
function Q(t) {
|
|
1025
1034
|
const e = t.imageUrl || t.imageURL || t.image_url || t.image || "";
|
|
1026
1035
|
return Ze(e);
|
|
1027
1036
|
}
|
|
@@ -1056,8 +1065,8 @@ function et(t) {
|
|
|
1056
1065
|
return n <= 0 ? "sold_out" : "available";
|
|
1057
1066
|
const a = t.availableTickets || t.available_tickets || t.tickets || [];
|
|
1058
1067
|
return a.length === 0 ? "coming_soon" : a.reduce((o, i) => {
|
|
1059
|
-
const u = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0,
|
|
1060
|
-
return o + Math.max(0, u -
|
|
1068
|
+
const u = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0, P = i.quantitySold ?? i.quantity_sold ?? 0;
|
|
1069
|
+
return o + Math.max(0, u - P);
|
|
1061
1070
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
1062
1071
|
}
|
|
1063
1072
|
function ie(t) {
|
|
@@ -1099,8 +1108,8 @@ function ce(t) {
|
|
|
1099
1108
|
venueName: e.venueName || e.venue_name,
|
|
1100
1109
|
venueAddress: e.venueAddress || e.venue_address,
|
|
1101
1110
|
location: e.location || e.venueAddress || e.venue_address,
|
|
1102
|
-
imageUrl:
|
|
1103
|
-
imageURL:
|
|
1111
|
+
imageUrl: Q(e),
|
|
1112
|
+
imageURL: Q(e),
|
|
1104
1113
|
status: e.status,
|
|
1105
1114
|
isPublished: e.isPublished ?? e.is_published,
|
|
1106
1115
|
isCancelled: e.isCancelled ?? e.is_cancelled,
|
|
@@ -1188,7 +1197,7 @@ export {
|
|
|
1188
1197
|
m as apiPost,
|
|
1189
1198
|
mt as apiPut,
|
|
1190
1199
|
Yt as applyGiftCard,
|
|
1191
|
-
|
|
1200
|
+
It as applyPromoCode,
|
|
1192
1201
|
et as calculateCtaState,
|
|
1193
1202
|
ht as cancelReservation,
|
|
1194
1203
|
zt as checkCollectionPassword,
|
|
@@ -1197,20 +1206,20 @@ export {
|
|
|
1197
1206
|
vt as completeReservation,
|
|
1198
1207
|
tr as computeCtaState,
|
|
1199
1208
|
ut as configureApi,
|
|
1200
|
-
|
|
1209
|
+
Qt as createGiftCardPurchase,
|
|
1201
1210
|
_t as createOrder,
|
|
1202
1211
|
pt as createPaymentIntent,
|
|
1203
1212
|
b as err,
|
|
1204
|
-
|
|
1213
|
+
J as errNotFound,
|
|
1205
1214
|
bt as extendCheckoutSession,
|
|
1206
1215
|
ur as extractVenueFees,
|
|
1207
1216
|
xt as fetchAllVenues,
|
|
1208
1217
|
Me as fetchAllVenuesResult,
|
|
1209
|
-
|
|
1218
|
+
Nt as fetchEventDetails,
|
|
1210
1219
|
Ve as fetchEventDetailsResult,
|
|
1211
1220
|
Ut as fetchEventPerformers,
|
|
1212
1221
|
qe as fetchEventPerformersResult,
|
|
1213
|
-
|
|
1222
|
+
Dt as fetchEventTickets,
|
|
1214
1223
|
Le as fetchEventTicketsResult,
|
|
1215
1224
|
jt as fetchPublicCollection,
|
|
1216
1225
|
qt as fetchSeriesOccurrences,
|
|
@@ -1223,7 +1232,7 @@ export {
|
|
|
1223
1232
|
Ze as getCDNImageUrl,
|
|
1224
1233
|
yt as getCartByUUID,
|
|
1225
1234
|
ft as getClientIP,
|
|
1226
|
-
|
|
1235
|
+
Q as getEventImageUrl,
|
|
1227
1236
|
dt as getLegacyPublicUrl,
|
|
1228
1237
|
Ft as getMonthEvents,
|
|
1229
1238
|
je as getMonthEventsResult,
|
|
@@ -1236,10 +1245,10 @@ export {
|
|
|
1236
1245
|
Be as getSeriesOccurrencesResult,
|
|
1237
1246
|
$t as getSessionStatus,
|
|
1238
1247
|
We as getVenue,
|
|
1239
|
-
|
|
1248
|
+
Jt as getVenueBySlug,
|
|
1240
1249
|
Wt as getVenueFees,
|
|
1241
1250
|
er as getWaitlistStatus,
|
|
1242
|
-
|
|
1251
|
+
St as hasPromoCodes,
|
|
1243
1252
|
Ct as initiateOrder,
|
|
1244
1253
|
At as isErr,
|
|
1245
1254
|
Rt as isOk,
|
|
@@ -1249,7 +1258,7 @@ export {
|
|
|
1249
1258
|
Et as removePromoCode,
|
|
1250
1259
|
Mt as resolvePublicEntity,
|
|
1251
1260
|
Ht as testNetworkConnection,
|
|
1252
|
-
|
|
1261
|
+
Tt as trackUTMSource,
|
|
1253
1262
|
sr as transformAvailableTicket,
|
|
1254
1263
|
or as transformEvent,
|
|
1255
1264
|
ir as transformEventData,
|
|
@@ -1257,9 +1266,9 @@ export {
|
|
|
1257
1266
|
ar as transformOrderForDisplay,
|
|
1258
1267
|
rr as transformTicket,
|
|
1259
1268
|
cr as transformVenue,
|
|
1260
|
-
|
|
1269
|
+
N as unwrapOr,
|
|
1261
1270
|
gt as updateCartQuantities,
|
|
1262
1271
|
kt as validatePaymentIntent,
|
|
1263
|
-
|
|
1272
|
+
Pt as validatePromoCode
|
|
1264
1273
|
};
|
|
1265
1274
|
//# sourceMappingURL=api.mjs.map
|