@getmicdrop/venue-calendar 4.3.121 → 4.3.123
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/README.md +22 -0
- package/dist/{AddOnCard-jj59e855.js → AddOnCard-nTlOLRHQ.js} +21 -21
- package/dist/{ArrowLeftIcon-t-CY0sbi.js → ArrowLeftIcon-D5-uNI0U.js} +2 -2
- package/dist/{BlockPlaceholder-BmEZ68_q.js → BlockPlaceholder-CuoGXCMh.js} +4 -4
- package/dist/{Button-VUB2WJ88.js → Button-BLmw_oMF.js} +11 -11
- package/dist/{Button-B58iYo_t.js → Button-DoHESV6k.js} +5 -5
- package/dist/{Calendar-hxcQBkTF.js → Calendar-C9hahXIM.js} +142 -161
- package/dist/{CalendarFoundryView-CSAKDe-F.js → CalendarFoundryView-Cv-ICYi9.js} +1475 -1473
- package/dist/{CalendarIcon-B5JWs0gm.js → CalendarIcon-5pe0K5ma.js} +2 -2
- package/dist/{CartView-CF2y1JDa.js → CartView-CXp67TQT.js} +287 -284
- package/dist/{ChartBlock-SYOAO1s_.js → ChartBlock-VVDwIPue.js} +36 -36
- package/dist/{CheckIcon-BSwoGox7.js → CheckIcon-FxQwEejD.js} +2 -2
- package/dist/{Checkbox-BtJwg_CF.js → Checkbox-Cn1nEBOm.js} +1 -1
- package/dist/{Checkout-2h2K3-bE.js → Checkout-BOftqs3v.js} +383 -381
- package/dist/Checkout-DQrcjCeh.js +1934 -0
- package/dist/{CheckoutTimer-Bpt5gPyA.js → CheckoutTimer-DPuy8TpI.js} +7 -7
- package/dist/{ChevronDownIcon-CVZ0usBx.js → ChevronDownIcon-ADsji-Ia.js} +2 -2
- package/dist/{ChevronDownOutline-D7YDiKBF.js → ChevronDownOutline-CAboOQwi.js} +1 -1
- package/dist/ChevronRightOutline-BWIIgG7O.js +23 -0
- package/dist/{CloseIcon-DUnvWXUY.js → CloseIcon-BgvYIos-.js} +3 -3
- package/dist/{CloseOutline-qpVa62mu.js → CloseOutline-BJtQbSqD.js} +1 -1
- package/dist/{CollectionView-XdNMvMtn.js → CollectionView-Ds3iGZYx.js} +8 -8
- package/dist/{CropImage-C8W_Xb_V.js → CropImage-Cvl-yxAB.js} +15 -15
- package/dist/{EmptyState-CMFePII9.js → EmptyState-BXE5HfzR.js} +2 -2
- package/dist/{Event-B_9T21du.js → Event-C8Y3zpPM.js} +620 -534
- package/dist/EventCard-DGnCiMw9.js +175 -0
- package/dist/{EventPage-BMnKpciU.js → EventPage-DjP9llB-.js} +294 -270
- package/dist/{ExclamationCircleOutline-D3XbhOwM.js → ExclamationCircleOutline-CmH69h0L.js} +1 -1
- package/dist/{action-test-id-7RXdHucW.js → FallbackBlock-C_-N8OKB.js} +72 -72
- package/dist/{Grid-kuP6V0GW.js → Grid-BKWXQEkM.js} +2 -2
- package/dist/{Heading-vOVPxhJF.js → Heading-CrJEsrFE.js} +4 -4
- package/dist/{Input-BXZmvQ0p.js → Input-komF5aTV.js} +10 -10
- package/dist/{LiveRegion-D9Me4kBs.js → LiveRegion-B_OI5McX.js} +2 -2
- package/dist/{LocationIcon-E-7CQh4E.js → LocationIcon-D7SbJ6q_.js} +3 -3
- package/dist/{Modal-kG0LKgMZ.js → Modal-_a_bJbko.js} +3 -3
- package/dist/{ModalFooter-CM5RDuvB.js → ModalFooter-CJPDF8Zl.js} +15 -15
- package/dist/{ModalHeader-DBVXezSL.js → ModalHeader-B3K9xN0J.js} +3 -3
- package/dist/{PasswordInput-DzXNIwRc.js → PasswordInput-C-SJ5Oix.js} +7 -7
- package/dist/{PhoneInput-DnmN_L03.js → PhoneInput-CYg7S7S7.js} +13 -13
- package/dist/{RecommendationsRail-DrzM8h2r.js → RecommendationsRail-QP0CJ7-3.js} +71 -68
- package/dist/{ScarcityBadge-DjzrzvId.js → ScarcityBadge-Cawy-u79.js} +7 -7
- package/dist/{SeriesPage-Ds_FEEZW.js → SeriesPage-BXLOd-gT.js} +3 -3
- package/dist/{Spinner-B2rdbspc.js → Spinner-DMSIvUd3.js} +3 -3
- package/dist/{Success-Dkak0iM9.js → Success-DCJLQx8J.js} +178 -175
- package/dist/{TagIcon-BY8tK_qA.js → TagIcon-CwCUhnam.js} +2 -2
- package/dist/{Text-CqjLjIF8.js → Text-uKiMcqy6.js} +1 -1
- package/dist/{Textarea-Cymhixzd.js → Textarea-DHm4GHH9.js} +3 -3
- package/dist/{ViewTicketsEmbed-B_fqalQh.js → ViewTicketsEmbed-Cblb2S6M.js} +24 -23
- package/dist/{WarningCircleIcon-C5Lc7qkF.js → WarningCircleIcon-ClRHaffl.js} +4 -4
- package/dist/{WarningTriIcon-BM8qc9xx.js → WarningTriIcon-zhqOKjq8.js} +2 -2
- package/dist/adapter-DwqQNwIc.js +164 -0
- package/dist/api--R8K0DjS.js +489 -0
- package/dist/{browser-DxdP6IWt.js → browser-o9TsPy0d.js} +1 -1
- package/dist/checkoutState-BtNPT28I.js +198 -0
- package/dist/client-CS0e2JHE.js +262 -0
- package/dist/{constants-C6MZgb2S.js → constants-lKAMwRvZ.js} +5 -1
- package/dist/{controlAria-CGb-KeRn.js → controlAria-DSrMfxwY.js} +2 -2
- package/dist/{copyToClipboard-F-akSgaF.js → copyToClipboard-198pSFq9.js} +3 -3
- package/dist/{createErrorGate.svelte-CEGaIQeI.js → createErrorGate.svelte-D96YnnB4.js} +5 -5
- package/dist/cta-bYAHgtET.js +116 -0
- package/dist/{datetime-BnKG6Hjm.js → datetime-B0mHwpmb.js} +53 -53
- package/dist/{de-BHcAXwnM.js → de-C3szl-Vf.js} +10 -4
- package/dist/{de-BPmqZ6ao.js → de-CX7o2WAr.js} +5 -1
- package/dist/{defaultLabels-BbNEEsF7.js → defaultLabels-C8IfDtR9.js} +210 -240
- package/dist/{defaults-CgsFJvJ2.js → defaults-vPJmFph1.js} +7 -7
- package/dist/{dist-bwbfGPKR.js → dist-xFB1K0Ua.js} +2 -2
- package/dist/{es-BV3Sgeg-.js → es-DS1-fjU8.js} +5 -1
- package/dist/{es-DZ3yceh-.js → es-QnJXFKEx.js} +10 -4
- package/dist/{event-DfqUhl5j.js → event-Cn1I6eqc.js} +2 -2
- package/dist/{event-transform-Bk1IoYh5.js → event-transform-DqzYVPvy.js} +18 -18
- package/dist/{eventStatusStream-CE0PwO0c.js → eventStatusStream-D27L0zB8.js} +2 -2
- package/dist/{filepond-plugin-file-validate-size-DNnItZ84.js → filepond-plugin-file-validate-size-DSfmFeGz.js} +1 -1
- package/dist/{filepond-plugin-file-validate-type-CUMTkI8X.js → filepond-plugin-file-validate-type-C44EKcE7.js} +1 -1
- package/dist/{filepond-plugin-image-exif-orientation-GEwHZTBU.js → filepond-plugin-image-exif-orientation-DNdFnriO.js} +1 -1
- package/dist/{filepond-plugin-image-preview-DKfgAnVa.js → filepond-plugin-image-preview-BVewVSQZ.js} +1 -1
- package/dist/{floatingPosition-XIv5DYuP.js → floatingPosition-TQ0h6TbT.js} +6 -6
- package/dist/{fr-Dyi163Vk.js → fr-BVgQDC6c.js} +10 -4
- package/dist/{fr-BJ0VQGEj.js → fr-CN3PiNzU.js} +5 -1
- package/dist/{href-CfWGAmkP.js → href-Cl_PNVlB.js} +24 -24
- package/dist/i18n-BsgEaeHp.js +497 -0
- package/dist/i18n-SDe3ZEhB.js +28 -0
- package/dist/{id-CVXaHHqU.js → id-CPG4tPVY.js} +5 -1
- package/dist/{id-DvFRZVAm.js → id-DCcXxLEY.js} +10 -4
- package/dist/{imageOptimizer-B3fj8_30.js → imageOptimizer-C8racBby.js} +11 -11
- package/dist/{imageUrl-xyMedKrE.js → imageUrl-ClaMf08i.js} +1 -1
- package/dist/{it-C0lzsHje.js → it-CjwnCYFF.js} +5 -1
- package/dist/{it-Bh05tcLv.js → it-CufAwhe3.js} +10 -4
- package/dist/{ja-Dl2r6tQ6.js → ja-C2uiNCJX.js} +5 -1
- package/dist/{ja-CU4PQS4j.js → ja-CMa_nsLY.js} +10 -4
- package/dist/{keyboard-DhCcdIyh.js → keyboard-enDXh6xy.js} +4 -4
- package/dist/{ko-DINqFSE1.js → ko-Bh97byDf.js} +5 -1
- package/dist/{ko-DDk6EdWm.js → ko-BwJHUjqS.js} +10 -4
- package/dist/{lazyOnce-CCfEO1xG.js → lazyOnce-BL5svIPP.js} +1 -1
- package/dist/locales/{4.3.121 → 4.3.123}/flow/de.js +1 -1
- package/dist/locales/{4.3.121 → 4.3.123}/flow/es.js +1 -1
- package/dist/locales/{4.3.121 → 4.3.123}/flow/fr.js +1 -1
- package/dist/locales/{4.3.121 → 4.3.123}/flow/id.js +1 -1
- package/dist/locales/{4.3.121 → 4.3.123}/flow/it.js +1 -1
- package/dist/locales/{4.3.121 → 4.3.123}/flow/ja.js +1 -1
- package/dist/locales/{4.3.121 → 4.3.123}/flow/ko.js +1 -1
- package/dist/locales/{4.3.121 → 4.3.123}/flow/nl.js +1 -1
- package/dist/locales/{4.3.121 → 4.3.123}/flow/pl.js +1 -1
- package/dist/locales/{4.3.121 → 4.3.123}/flow/pt-br.js +1 -1
- package/dist/locales/{4.3.121 → 4.3.123}/flow/tr.js +1 -1
- package/dist/locales/{4.3.121 → 4.3.123}/flow/zh.js +1 -1
- package/dist/locales/4.3.123/main/de.js +1 -0
- package/dist/locales/4.3.123/main/es.js +1 -0
- package/dist/locales/4.3.123/main/fr.js +1 -0
- package/dist/locales/4.3.123/main/id.js +1 -0
- package/dist/locales/4.3.123/main/it.js +1 -0
- package/dist/locales/4.3.123/main/ja.js +1 -0
- package/dist/locales/4.3.123/main/ko.js +1 -0
- package/dist/locales/4.3.123/main/nl.js +1 -0
- package/dist/locales/4.3.123/main/pl.js +1 -0
- package/dist/locales/4.3.123/main/pt-br.js +1 -0
- package/dist/locales/4.3.123/main/tr.js +1 -0
- package/dist/locales/4.3.123/main/zh.js +1 -0
- package/dist/look-island.svelte-Dr-Vl_J1.js +1279 -0
- package/dist/looks/4.3.123/looks.js +226 -0
- package/dist/looks/4.3.123/micdrop-wordmark-BYMG6vLR.svg +1 -0
- package/dist/looks/4.3.123/microphone-Ccv4r-kd.webp +0 -0
- package/dist/looks/4.3.123/superuser-CZF6a5gO.webp +0 -0
- package/dist/looks/4.3.123/treasury-DUE7lZzT.webp +0 -0
- package/dist/looks/4.3.123/user-image-yuS4errP.svg +9 -0
- package/dist/{modalManager.svelte-Cz_6x1Qd.js → modalManager.svelte-BUU99uSO.js} +1 -1
- package/dist/navigation-DlpJzq1c.js +176 -0
- package/dist/{nl-DOSKYHSx.js → nl-BQALrtyB.js} +10 -4
- package/dist/{nl-D92n5tHa.js → nl-ve_OaXOQ.js} +5 -1
- package/dist/normalizers-B8Ruvrlh.js +44 -0
- package/dist/{phoneUtils-CS66SHie.js → phoneUtils-CQvpvMDO.js} +50 -50
- package/dist/{pixels-Bu5-BISs.js → pixels-BZQYpQU0.js} +3 -3
- package/dist/{pl-BlZHcnlS.js → pl-BHBBOz2I.js} +5 -1
- package/dist/{pl-CkLEymA2.js → pl-DaPcPjBE.js} +10 -4
- package/dist/{portal-D-oaEWsY.js → portal-CLBp645_.js} +2 -2
- package/dist/{portalContainment-CeAVqIb-.js → portalContainment-Dz0y6lW6.js} +2 -2
- package/dist/{pt-br-BHuCQSM-.js → pt-br-BxdP86Vr.js} +10 -4
- package/dist/{pt-br-BrxthY0b.js → pt-br-D30dkLzU.js} +5 -1
- package/dist/seo/seo.mjs +9 -9
- package/dist/{serverTotals-B8SJCzxE.js → serverTotals-F3SRKn1I.js} +6 -6
- package/dist/{showcase-state-options-KO_TYk3I.js → showcase-state-options-DRCOUibv.js} +3 -3
- package/dist/{sizing-B7ixYndz.js → sizing-DFjg7-wy.js} +3 -3
- package/dist/{sortable.esm--ZtTTTPp.js → sortable.esm-RsK3eRs6.js} +1 -1
- package/dist/{src-DZgagYE3.js → src-DJtQCBFq.js} +1 -1
- package/dist/to-event-card-props-CBtlDgMr.js +205 -0
- package/dist/{tr-BnAdi4HO.js → tr-CFVBCuqV.js} +5 -1
- package/dist/{tr-Bvc34ODh.js → tr-CSfagpI3.js} +10 -4
- package/dist/types/index.d.ts +21 -4
- package/dist/utils-BXiwc_cU.js +219 -0
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +1591 -1895
- package/dist/venue-calendar.iife.js +35 -35
- package/dist/venue-calendar.umd.js +175 -54
- package/dist/widget-key-context-litAkRgC.js +744 -0
- package/dist/{zh-K0hOzZ3G.js → zh-DWMcKVLH.js} +10 -4
- package/dist/{zh-Tg1OTvWs.js → zh-DeEOoOFR.js} +5 -1
- package/package.json +3 -3
- package/src/lib/theme.js +222 -222
- package/dist/Checkout-BFu5dTw_.js +0 -1933
- package/dist/api-BEYkGabB.js +0 -654
- package/dist/i18n-B705OXZp.js +0 -28
- package/dist/i18n-BoMUWcCq.js +0 -608
- package/dist/locales/4.3.121/main/de.js +0 -1
- package/dist/locales/4.3.121/main/es.js +0 -1
- package/dist/locales/4.3.121/main/fr.js +0 -1
- package/dist/locales/4.3.121/main/id.js +0 -1
- package/dist/locales/4.3.121/main/it.js +0 -1
- package/dist/locales/4.3.121/main/ja.js +0 -1
- package/dist/locales/4.3.121/main/ko.js +0 -1
- package/dist/locales/4.3.121/main/nl.js +0 -1
- package/dist/locales/4.3.121/main/pl.js +0 -1
- package/dist/locales/4.3.121/main/pt-br.js +0 -1
- package/dist/locales/4.3.121/main/tr.js +0 -1
- package/dist/locales/4.3.121/main/zh.js +0 -1
- package/dist/to-event-card-props-DYIfPN8e.js +0 -379
- package/dist/utils-NMx3aPDk.js +0 -412
- package/dist/widget-key-context-D2zj4sp5.js +0 -988
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
import { g as e } from "./sizing-DFjg7-wy.js";
|
|
2
|
+
import { D as t } from "./datetime-B0mHwpmb.js";
|
|
3
|
+
import { E as n, N as r } from "./defaultLabels-C8IfDtR9.js";
|
|
4
|
+
import { n as i } from "./Button-BLmw_oMF.js";
|
|
5
|
+
import { a, i as o } from "./normalizers-B8Ruvrlh.js";
|
|
6
|
+
import { C as s, d as c } from "./widget-key-context-litAkRgC.js";
|
|
7
|
+
import { d as l, l as u, n as d, o as f, r as p, s as m, t as h } from "./client-CS0e2JHE.js";
|
|
8
|
+
import { l as g } from "./navigation-DlpJzq1c.js";
|
|
9
|
+
//#region ../../../jetbook/npm-calendar/node_modules/@getmicdrop/svelte-components/dist/utils/liveAnnouncer.js
|
|
10
|
+
var _ = null;
|
|
11
|
+
function v() {
|
|
12
|
+
return _ && document.body.contains(_) ? _ : (_ = document.createElement("div"), _.id = "a11y-live-region", _.setAttribute("role", "status"), _.setAttribute("aria-live", "polite"), _.setAttribute("aria-atomic", "true"), _.className = "sr-only", Object.assign(_.style, {
|
|
13
|
+
position: "absolute",
|
|
14
|
+
width: "1px",
|
|
15
|
+
height: "1px",
|
|
16
|
+
padding: "0",
|
|
17
|
+
margin: "-1px",
|
|
18
|
+
overflow: "hidden",
|
|
19
|
+
clip: "rect(0, 0, 0, 0)",
|
|
20
|
+
whiteSpace: "nowrap",
|
|
21
|
+
border: "0"
|
|
22
|
+
}), document.body.appendChild(_), _);
|
|
23
|
+
}
|
|
24
|
+
function y(e, t = {}) {
|
|
25
|
+
if (typeof document > "u") return;
|
|
26
|
+
let { politeness: n = "polite", atomic: r = !0, delay: i = 100 } = t, a = v();
|
|
27
|
+
a.setAttribute("aria-live", n), a.setAttribute("aria-atomic", String(r)), a.textContent = "", setTimeout(() => {
|
|
28
|
+
typeof document > "u" || !a.isConnected || (a.textContent = e);
|
|
29
|
+
}, i);
|
|
30
|
+
}
|
|
31
|
+
function b(e = 500) {
|
|
32
|
+
let t = null;
|
|
33
|
+
return (n, r) => {
|
|
34
|
+
t && clearTimeout(t), t = setTimeout(() => {
|
|
35
|
+
y(n, r), t = null;
|
|
36
|
+
}, e);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region ../../../jetbook/npm-calendar/node_modules/@getmicdrop/svelte-components/dist/errors/classes/NotFoundError.js
|
|
41
|
+
var x = class extends i {
|
|
42
|
+
constructor(e, t) {
|
|
43
|
+
let n = t ? `${e} with ID ${t} not found` : `${e} not found`;
|
|
44
|
+
super(n, "NOT_FOUND", {
|
|
45
|
+
status: 404,
|
|
46
|
+
recoverable: !1,
|
|
47
|
+
details: {
|
|
48
|
+
resourceType: e,
|
|
49
|
+
resourceId: t
|
|
50
|
+
}
|
|
51
|
+
}), this.name = "NotFoundError", this.resourceType = e, this.resourceId = t;
|
|
52
|
+
}
|
|
53
|
+
getUserMessage(e) {
|
|
54
|
+
return a(e)?.fromCode?.(this.code) || o(this.resourceType.toLowerCase());
|
|
55
|
+
}
|
|
56
|
+
}, S = e("VC");
|
|
57
|
+
function ee(e, t) {
|
|
58
|
+
if (e === 404) return "Promo code isn't valid.";
|
|
59
|
+
let n = (t ?? "").toLowerCase();
|
|
60
|
+
return e === 400 ? n.includes("not yet active") ? "Promo code doesn't apply." : n.includes("expired") ? "Promo code expired." : n.includes("limit") ? "Promo code has reached its limit." : "Promo code isn't valid." : "Failed to validate code";
|
|
61
|
+
}
|
|
62
|
+
async function te(e, t, n) {
|
|
63
|
+
try {
|
|
64
|
+
if (!t || !t.trim()) return {
|
|
65
|
+
valid: !1,
|
|
66
|
+
error: "Promo code is required"
|
|
67
|
+
};
|
|
68
|
+
let r = encodeURIComponent(t.trim()), i = await d(`/promo-codes/validate/${e}/${r}`, { widgetKey: n?.widgetKey });
|
|
69
|
+
if (!i.success) return {
|
|
70
|
+
valid: !1,
|
|
71
|
+
error: ee(i.statusCode, i.error)
|
|
72
|
+
};
|
|
73
|
+
let a = i.data;
|
|
74
|
+
return {
|
|
75
|
+
valid: a.valid ?? !0,
|
|
76
|
+
revealHiddenTickets: a.revealHiddenTickets,
|
|
77
|
+
revealTicketIds: a.revealTicketIds,
|
|
78
|
+
provideDiscount: a.provideDiscount,
|
|
79
|
+
discountType: a.discountType,
|
|
80
|
+
amount: a.discount ?? a.amount,
|
|
81
|
+
code: a.name || a.code || t,
|
|
82
|
+
appliesToAllTickets: a.appliesToAllTickets,
|
|
83
|
+
applyToTicketIds: a.applyToTicketIds
|
|
84
|
+
};
|
|
85
|
+
} catch (e) {
|
|
86
|
+
return S.error("Error validating promo code:", e), {
|
|
87
|
+
valid: !1,
|
|
88
|
+
error: "Network error validating code"
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async function ne(e, t) {
|
|
93
|
+
try {
|
|
94
|
+
let n = await d(`/promo-codes/check/${e}`, { widgetKey: t?.widgetKey });
|
|
95
|
+
return !n.success || n.data.hasPromoCodes === !0;
|
|
96
|
+
} catch (e) {
|
|
97
|
+
return S.error("Error checking promo codes availability:", e), !0;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
async function re(e, t, n, r) {
|
|
101
|
+
try {
|
|
102
|
+
let i = { promoCode: t };
|
|
103
|
+
n && Object.keys(n).length > 0 && (i.productQuantities = n);
|
|
104
|
+
let a = await p(`${f()}/cart/${e}/apply-promo`, i, { widgetKey: r?.widgetKey });
|
|
105
|
+
return a.success ? { success: !0 } : {
|
|
106
|
+
success: !1,
|
|
107
|
+
error: a.error || "Failed to apply promo code"
|
|
108
|
+
};
|
|
109
|
+
} catch (e) {
|
|
110
|
+
return S.error("Error applying promo code:", e), {
|
|
111
|
+
success: !1,
|
|
112
|
+
error: "Network error applying code"
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/lib/api/result.ts
|
|
118
|
+
function C(e) {
|
|
119
|
+
return {
|
|
120
|
+
ok: !0,
|
|
121
|
+
data: e
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function w(e) {
|
|
125
|
+
return {
|
|
126
|
+
ok: !1,
|
|
127
|
+
error: e
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function T(e) {
|
|
131
|
+
return {
|
|
132
|
+
ok: !1,
|
|
133
|
+
error: e,
|
|
134
|
+
notFound: !0
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
function E(e, t) {
|
|
138
|
+
return e.ok ? e.data : t;
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/lib/api/route-manifest.ts
|
|
142
|
+
var D = "/api/v2/public", O = "/api/orders/v2/public", k = "/api/orders/v2", A = "00000000-0000-0000-0000-000000000000";
|
|
143
|
+
`${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}`, `${D}`, `${D}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}`, `${D}`, `${D}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}`, `${D}`, `${D}`, `${D}`, `${D}${A}`, `${O}`, `${O}`, `${O}`, `${O}${A}`, `${O}`, `${O}${A}`, `${O}`, `${O}${A}`, `${O}`, `${O}${A}`, `${O}`, `${O}${A}`, `${O}`, `${O}${A}`, `${O}`, `${O}${A}`, `${O}`, `${O}${A}`, `${k}`, `${k}`, `${O}`, `${O}`, `${O}`, `${O}`, `${O}`, `${O}${A}`, `${D}`, `${D}${A}`, `${D}`, `${D}`;
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/lib/api/events.ts
|
|
146
|
+
var j = e("VC"), M = /* @__PURE__ */ new Map();
|
|
147
|
+
async function N(e, t = fetch, n, r) {
|
|
148
|
+
let i = n ? `${e}:pw` : String(e), a = `${r?.widgetKey ?? ""}|${i}`;
|
|
149
|
+
if (t === fetch) {
|
|
150
|
+
let e = M.get(a);
|
|
151
|
+
if (e) return e;
|
|
152
|
+
}
|
|
153
|
+
let o = (async () => {
|
|
154
|
+
try {
|
|
155
|
+
let i = await t(n ? `${m()}/events/${e}?password=${encodeURIComponent(n)}` : `${m()}/events/${e}`, { headers: l(void 0, r?.widgetKey) });
|
|
156
|
+
if (!i.ok) return i.status === 404 ? T("event_not_found") : (j.error(`Failed to fetch event details: ${i.status}`), w("event_fetch_failed"));
|
|
157
|
+
let a = await i.json();
|
|
158
|
+
return a ? C(a) : T("event_not_found");
|
|
159
|
+
} catch (e) {
|
|
160
|
+
return j.error("Error fetching event details:", e), w("event_fetch_failed");
|
|
161
|
+
}
|
|
162
|
+
})();
|
|
163
|
+
return t === fetch && (M.set(a, o), o.finally(() => {
|
|
164
|
+
M.get(a) === o && M.delete(a);
|
|
165
|
+
})), o;
|
|
166
|
+
}
|
|
167
|
+
async function P(e, t = fetch, n, r) {
|
|
168
|
+
let i = await N(e, t, n, r);
|
|
169
|
+
return i.ok ? i.data : null;
|
|
170
|
+
}
|
|
171
|
+
async function F(e, t, n = (e) => e, r) {
|
|
172
|
+
try {
|
|
173
|
+
let i = await u(e, { widgetKey: r?.widgetKey });
|
|
174
|
+
return i ? C(n(i)) : (j.error(`Failed to load (${t}): network or server error`), w(t));
|
|
175
|
+
} catch (e) {
|
|
176
|
+
return j.error(`Error loading (${t}):`, e), w(t);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
function I(e) {
|
|
180
|
+
return Array.isArray(e) ? e : [];
|
|
181
|
+
}
|
|
182
|
+
async function L(e, t, n) {
|
|
183
|
+
let r = t?.trim(), i = r ? `?promoCode=${encodeURIComponent(r)}` : "";
|
|
184
|
+
return F(`${m()}/tickets/event/${e}${i}`, "tickets_fetch_failed", I, n);
|
|
185
|
+
}
|
|
186
|
+
async function R(e, t, n) {
|
|
187
|
+
return E(await L(e, t, n), []);
|
|
188
|
+
}
|
|
189
|
+
async function z(e, t) {
|
|
190
|
+
return e ? F(`${m()}/venues/organization/${e}`, "venues_fetch_failed", I, t) : (j.warn("fetchAllVenues called without orgId"), w("venues_missing_org_id"));
|
|
191
|
+
}
|
|
192
|
+
async function B(e, t) {
|
|
193
|
+
return E(await z(e, t), []);
|
|
194
|
+
}
|
|
195
|
+
function V(e) {
|
|
196
|
+
return Array.isArray(e) ? e : Array.isArray(e.events) ? e.events : [];
|
|
197
|
+
}
|
|
198
|
+
var H = /* @__PURE__ */ new Map();
|
|
199
|
+
function U(e, t, n, r) {
|
|
200
|
+
let i = `${r?.widgetKey ?? ""}|${e}`;
|
|
201
|
+
if (!n?.fresh) {
|
|
202
|
+
let e = H.get(i);
|
|
203
|
+
if (e) return e;
|
|
204
|
+
}
|
|
205
|
+
let a = F(e, t, (e) => V(e), r);
|
|
206
|
+
return H.set(i, a), a.finally(() => {
|
|
207
|
+
H.get(i) === a && H.delete(i);
|
|
208
|
+
}), a;
|
|
209
|
+
}
|
|
210
|
+
async function W(e, t, n, r, i) {
|
|
211
|
+
return U(`${m()}/events/venue/${e}/month/${t}/${n}`, "month_events_fetch_failed", r, i);
|
|
212
|
+
}
|
|
213
|
+
async function G(e, t, n, r, i) {
|
|
214
|
+
return U(`${m()}/events/organization/${e}/month/${t}/${n}`, "org_month_events_fetch_failed", r, i);
|
|
215
|
+
}
|
|
216
|
+
async function K(e, t, n) {
|
|
217
|
+
return F(`${m()}/series/${e}/occurrences?venueId=${t}`, "series_cta_fetch_failed", void 0, n);
|
|
218
|
+
}
|
|
219
|
+
async function q(e, t, n) {
|
|
220
|
+
let r = await K(e, t, n);
|
|
221
|
+
return r.ok ? r.data : null;
|
|
222
|
+
}
|
|
223
|
+
async function J(e, t, n) {
|
|
224
|
+
try {
|
|
225
|
+
let r = t ? `?slug=${encodeURIComponent(t)}` : "", i = await u(`${m()}/resolve/${encodeURIComponent(String(e))}${r}`, { widgetKey: n?.widgetKey });
|
|
226
|
+
if (!i || !i.type) throw new x("entity", String(e));
|
|
227
|
+
return i;
|
|
228
|
+
} catch (e) {
|
|
229
|
+
return j.error("Error resolving public entity:", e), null;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
async function ie(e, t, n) {
|
|
233
|
+
try {
|
|
234
|
+
let r = t ? `${m()}/collections/${e}?password=${encodeURIComponent(t)}` : `${m()}/collections/${e}`, i = await u(r, { widgetKey: n?.widgetKey });
|
|
235
|
+
if (!i) throw new x("collection", String(e));
|
|
236
|
+
return i;
|
|
237
|
+
} catch (e) {
|
|
238
|
+
return j.error("Error fetching collection:", e), null;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
async function Y(e, t, n) {
|
|
242
|
+
try {
|
|
243
|
+
let r = await u(`${m()}/events/${e}/check-password`, {
|
|
244
|
+
method: "POST",
|
|
245
|
+
headers: { "Content-Type": "application/json" },
|
|
246
|
+
body: JSON.stringify({ password: t }),
|
|
247
|
+
widgetKey: n?.widgetKey
|
|
248
|
+
});
|
|
249
|
+
return typeof r == "boolean" ? { valid: r } : { valid: r?.valid === !0 };
|
|
250
|
+
} catch (e) {
|
|
251
|
+
return j.error("Error checking event password:", e), { valid: !1 };
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/lib/api/venues.ts
|
|
256
|
+
var X = e("VC");
|
|
257
|
+
async function ae(e, t) {
|
|
258
|
+
try {
|
|
259
|
+
if (!e) return X.warn("getVenue called without venueId"), null;
|
|
260
|
+
let n = await d(`/venues/${e}`, { widgetKey: t?.widgetKey });
|
|
261
|
+
return n.success ? n.data ?? null : (X.error(`Failed to fetch venue: ${n.statusCode}`), null);
|
|
262
|
+
} catch (e) {
|
|
263
|
+
return X.error("Error fetching venue:", e), null;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
async function oe(e, t) {
|
|
267
|
+
let n = g(e);
|
|
268
|
+
if (!n) return !1;
|
|
269
|
+
try {
|
|
270
|
+
let e = await d(`/sites/by-host/${encodeURIComponent(new URL(n).host)}`, { widgetKey: t?.widgetKey });
|
|
271
|
+
return !!(e.success && e.data);
|
|
272
|
+
} catch (e) {
|
|
273
|
+
return X.warn("hasPublishedSite failed:", e), !1;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
//#endregion
|
|
277
|
+
//#region src/lib/api/transformers/giftCard.ts
|
|
278
|
+
function Z(e, t) {
|
|
279
|
+
return e == null || t(e);
|
|
280
|
+
}
|
|
281
|
+
function se(e) {
|
|
282
|
+
if (typeof e != "object" || !e) return !1;
|
|
283
|
+
let t = e;
|
|
284
|
+
return t.valid === !0 && Number.isInteger(t.appliedAmount) && typeof t.remainingTotal == "number" && Number.isFinite(t.remainingTotal) && Z(t.giftCardCode, (e) => typeof e == "string") && Z(t.giftCardBalance, (e) => typeof e == "number" && Number.isFinite(e)) && Z(t.fullyCoveredByCard, (e) => typeof e == "boolean");
|
|
285
|
+
}
|
|
286
|
+
var ce = "We couldn't apply that gift card. Please try again.";
|
|
287
|
+
function le(e) {
|
|
288
|
+
if (!se(e)) return {
|
|
289
|
+
valid: !1,
|
|
290
|
+
error: ce
|
|
291
|
+
};
|
|
292
|
+
let t = e, i = n(r(t.appliedAmount)), a = t.remainingTotal, o = t.fullyCoveredByCard ?? a <= 0, s = !o;
|
|
293
|
+
return {
|
|
294
|
+
valid: !0,
|
|
295
|
+
giftCardCode: t.giftCardCode ?? void 0,
|
|
296
|
+
giftCardAmount: i,
|
|
297
|
+
giftCardBalance: t.giftCardBalance ?? void 0,
|
|
298
|
+
paymentType: o ? "gift_card_only" : "split",
|
|
299
|
+
stripeAmount: a,
|
|
300
|
+
orderTotal: i + a,
|
|
301
|
+
requiresStripe: s
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
//#endregion
|
|
305
|
+
//#region src/lib/api/gift-cards.ts
|
|
306
|
+
var Q = e("VC");
|
|
307
|
+
async function ue(e, t, n) {
|
|
308
|
+
try {
|
|
309
|
+
let r = await p(`${f()}/cart/${e}/apply-gift-card`, { giftCardCode: t }, { widgetKey: n?.widgetKey });
|
|
310
|
+
if (!r.success) return r.statusCode === 429 ? {
|
|
311
|
+
valid: !1,
|
|
312
|
+
error: "Too many attempts. Please wait a moment and try again."
|
|
313
|
+
} : (Q.error("Apply gift card failed:", r.error), {
|
|
314
|
+
valid: !1,
|
|
315
|
+
error: r.error || "Invalid gift card code"
|
|
316
|
+
});
|
|
317
|
+
let i = le(r.data);
|
|
318
|
+
return i.valid || Q.error("Apply gift card returned an unusable payload:", r.data), i;
|
|
319
|
+
} catch (e) {
|
|
320
|
+
return Q.error("applyGiftCard error:", e), {
|
|
321
|
+
valid: !1,
|
|
322
|
+
error: "Network error. Please check your connection and try again."
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
async function de(e, t, n) {
|
|
327
|
+
try {
|
|
328
|
+
let r = t?.giftCardId ? { giftCardId: t.giftCardId } : t?.code ? { giftCardCode: t.code } : null, i = await h(`${f()}/cart/${e}/gift-card`, r ? {
|
|
329
|
+
body: JSON.stringify(r),
|
|
330
|
+
widgetKey: n?.widgetKey
|
|
331
|
+
} : { widgetKey: n?.widgetKey });
|
|
332
|
+
if (!i.success) return Q.error("Remove gift card failed:", i.error), {
|
|
333
|
+
success: !1,
|
|
334
|
+
error: i.error || "Failed to remove gift card"
|
|
335
|
+
};
|
|
336
|
+
let a = i.data ?? {}, o = a.newTotal ?? a.NewTotal;
|
|
337
|
+
return {
|
|
338
|
+
success: !0,
|
|
339
|
+
...typeof o == "number" ? { remainingTotal: o } : {}
|
|
340
|
+
};
|
|
341
|
+
} catch (e) {
|
|
342
|
+
return Q.error("removeGiftCard error:", e), {
|
|
343
|
+
success: !1,
|
|
344
|
+
error: "Network error. Please check your connection and try again."
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
async function fe(e, n, r, i) {
|
|
349
|
+
let a = c(r);
|
|
350
|
+
try {
|
|
351
|
+
let r = await p(`${f()}/cart/${e}/complete-gift-card-payment`, {
|
|
352
|
+
customerName: t(n.firstName, n.lastName),
|
|
353
|
+
customerEmail: n.email,
|
|
354
|
+
firstName: n.firstName,
|
|
355
|
+
lastName: n.lastName,
|
|
356
|
+
email: n.email,
|
|
357
|
+
phoneNumber: n.phoneNumber || null,
|
|
358
|
+
questionAnswer: n.questionAnswer || "",
|
|
359
|
+
mailingList: n.mailingList || !1,
|
|
360
|
+
attribution: s(),
|
|
361
|
+
...a ? { locale: a } : {}
|
|
362
|
+
}, { widgetKey: i?.widgetKey });
|
|
363
|
+
return r.success ? {
|
|
364
|
+
success: !0,
|
|
365
|
+
orderId: r.data?.orderId,
|
|
366
|
+
confirmationNumber: r.data?.confirmationNumber
|
|
367
|
+
} : (Q.error("Complete gift card payment failed:", r.error), {
|
|
368
|
+
success: !1,
|
|
369
|
+
error: r.error || "Failed to complete payment"
|
|
370
|
+
});
|
|
371
|
+
} catch (e) {
|
|
372
|
+
return Q.error("completeGiftCardPayment error:", e), {
|
|
373
|
+
success: !1,
|
|
374
|
+
error: "Network error. Please check your connection and try again."
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region src/lib/api/cart-addons.ts
|
|
380
|
+
var pe = e("VC");
|
|
381
|
+
async function me(e, t, n) {
|
|
382
|
+
let r = (e) => ({
|
|
383
|
+
success: !1,
|
|
384
|
+
error: e,
|
|
385
|
+
lines: [],
|
|
386
|
+
addOnQuantity: 0,
|
|
387
|
+
repriced: !1
|
|
388
|
+
});
|
|
389
|
+
if (!e) return r(null);
|
|
390
|
+
let i = {};
|
|
391
|
+
for (let [e, n] of Object.entries(t)) {
|
|
392
|
+
let t = typeof e == "number" ? e : parseInt(e, 10);
|
|
393
|
+
!Number.isNaN(t) && n > 0 && (i[t] = n);
|
|
394
|
+
}
|
|
395
|
+
try {
|
|
396
|
+
let t = await p(`${f()}/cart/${e}/add-ons`, { addOnQuantities: i }, { widgetKey: n?.widgetKey });
|
|
397
|
+
if (!t.success) return r(t.error || null);
|
|
398
|
+
let a = t.data || {};
|
|
399
|
+
return {
|
|
400
|
+
success: !0,
|
|
401
|
+
error: null,
|
|
402
|
+
lines: a.addOns || [],
|
|
403
|
+
addOnQuantity: a.addOnQuantity || 0,
|
|
404
|
+
repriced: a.repriced === !0
|
|
405
|
+
};
|
|
406
|
+
} catch (e) {
|
|
407
|
+
return pe.error("updateCartAddOns error:", e), r(null);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region src/lib/api/waitlist.ts
|
|
412
|
+
var $ = e("VC");
|
|
413
|
+
async function he(e, t, n = null, r = !1, i) {
|
|
414
|
+
try {
|
|
415
|
+
let a = { email: t };
|
|
416
|
+
n && r && (a.phone = n, a.smsOptIn = !0);
|
|
417
|
+
let o = await p(`/events/${e}/waitlist`, a, { widgetKey: i?.widgetKey });
|
|
418
|
+
return o.success ? {
|
|
419
|
+
success: !0,
|
|
420
|
+
updated: o.data?.updated,
|
|
421
|
+
position: o.data?.position
|
|
422
|
+
} : ($.error("Join waitlist failed:", o.error), {
|
|
423
|
+
success: !1,
|
|
424
|
+
errorCode: o.error || "join_failed"
|
|
425
|
+
});
|
|
426
|
+
} catch (e) {
|
|
427
|
+
return $.error("joinWaitlist error:", e), {
|
|
428
|
+
success: !1,
|
|
429
|
+
errorCode: "network_error"
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
async function ge(e, t, n) {
|
|
434
|
+
try {
|
|
435
|
+
let r = await p(`/checkout/validate-token/${e}`, { email: t }, { widgetKey: n?.widgetKey });
|
|
436
|
+
return r.success ? {
|
|
437
|
+
valid: !0,
|
|
438
|
+
eventId: r.data?.eventId ?? 0,
|
|
439
|
+
expiresAt: r.data?.expiresAt
|
|
440
|
+
} : {
|
|
441
|
+
valid: !1,
|
|
442
|
+
eventId: 0,
|
|
443
|
+
errorCode: r.error
|
|
444
|
+
};
|
|
445
|
+
} catch (e) {
|
|
446
|
+
return $.error("validateWaitlistToken error:", e), {
|
|
447
|
+
valid: !1,
|
|
448
|
+
eventId: 0,
|
|
449
|
+
errorCode: "invalid_token"
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
async function _e(e, t, n) {
|
|
454
|
+
try {
|
|
455
|
+
let r = await p(`/waitlist/requeue/${e}`, { email: t }, { widgetKey: n?.widgetKey });
|
|
456
|
+
return r.success ? { success: !0 } : {
|
|
457
|
+
success: !1,
|
|
458
|
+
errorCode: r.error
|
|
459
|
+
};
|
|
460
|
+
} catch (e) {
|
|
461
|
+
return $.error("requeueWaitlistToFront error:", e), {
|
|
462
|
+
success: !1,
|
|
463
|
+
errorCode: "internal_error"
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
async function ve(e, t) {
|
|
468
|
+
let n = {
|
|
469
|
+
waitlistEnabled: !1,
|
|
470
|
+
soldOut: !1,
|
|
471
|
+
gated: !1
|
|
472
|
+
};
|
|
473
|
+
try {
|
|
474
|
+
let r = await d(`/events/${e}/waitlist/status`, { widgetKey: t?.widgetKey });
|
|
475
|
+
return r.success ? {
|
|
476
|
+
waitlistEnabled: !!r.data?.waitlistEnabled,
|
|
477
|
+
soldOut: !!r.data?.soldOut,
|
|
478
|
+
gated: !!r.data?.gated
|
|
479
|
+
} : n;
|
|
480
|
+
} catch (e) {
|
|
481
|
+
return $.error("getWaitlistStatus error:", e), n;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
function ye(e) {
|
|
485
|
+
let t = String(e % 60).padStart(2, "0");
|
|
486
|
+
return e >= 3600 ? `${Math.floor(e / 3600)}:${String(Math.floor(e % 3600 / 60)).padStart(2, "0")}:${t}` : `${Math.floor(e / 60)}:${t}`;
|
|
487
|
+
}
|
|
488
|
+
//#endregion
|
|
489
|
+
export { ne as C, b as E, re as S, y as T, ie as _, ge as a, G as b, fe as c, oe as d, Y as f, L as g, R as h, _e as i, de as l, P as m, ve as n, me as o, B as p, he as r, ue as s, ye as t, ae as u, q as v, te as w, J as x, W as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-DtPi1Y-2.js";
|
|
2
|
-
//#region node_modules/qrcode/lib/can-promise.js
|
|
2
|
+
//#region ../../../jetbook/npm-calendar/node_modules/qrcode/lib/can-promise.js
|
|
3
3
|
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
4
|
t.exports = function() {
|
|
5
5
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { g as e } from "./sizing-DFjg7-wy.js";
|
|
2
|
+
import { C as t, T as n, x as r } from "./client-CS0e2JHE.js";
|
|
3
|
+
//#region ../../../jetbook/npm-calendar/node_modules/js-cookie/dist/js.cookie.mjs
|
|
4
|
+
function i(e) {
|
|
5
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
6
|
+
var n = arguments[t];
|
|
7
|
+
for (var r in n) r !== "__proto__" && (e[r] = n[r]);
|
|
8
|
+
}
|
|
9
|
+
return e;
|
|
10
|
+
}
|
|
11
|
+
var a = {
|
|
12
|
+
read: function(e) {
|
|
13
|
+
return e[0] === "\"" && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
14
|
+
},
|
|
15
|
+
write: function(e) {
|
|
16
|
+
return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
function o(e, t) {
|
|
20
|
+
function n(n, r, a) {
|
|
21
|
+
if (!(typeof document > "u")) {
|
|
22
|
+
a = i({}, t, a), typeof a.expires == "number" && (a.expires = new Date(Date.now() + a.expires * 864e5)), a.expires && (a.expires = a.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
23
|
+
var o = "";
|
|
24
|
+
for (var s in a) a[s] && (o += "; " + s, a[s] !== !0 && (o += "=" + a[s].split(";")[0]));
|
|
25
|
+
return document.cookie = n + "=" + e.write(r, n) + o;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function r(t) {
|
|
29
|
+
if (!(typeof document > "u" || arguments.length && !t)) {
|
|
30
|
+
for (var n = document.cookie ? document.cookie.split("; ") : [], r = {}, i = 0; i < n.length; i++) {
|
|
31
|
+
var a = n[i].split("="), o = a.slice(1).join("=");
|
|
32
|
+
try {
|
|
33
|
+
var s = decodeURIComponent(a[0]);
|
|
34
|
+
if (s in r || (r[s] = e.read(o, s)), t === s) break;
|
|
35
|
+
} catch {}
|
|
36
|
+
}
|
|
37
|
+
return t ? r[t] : r;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return Object.create({
|
|
41
|
+
set: n,
|
|
42
|
+
get: r,
|
|
43
|
+
remove: function(e, t) {
|
|
44
|
+
n(e, "", i({}, t, { expires: -1 }));
|
|
45
|
+
},
|
|
46
|
+
withAttributes: function(e) {
|
|
47
|
+
return o(this.converter, i({}, this.attributes, e));
|
|
48
|
+
},
|
|
49
|
+
withConverter: function(e) {
|
|
50
|
+
return o(i({}, this.converter, e), this.attributes);
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
attributes: { value: Object.freeze(t) },
|
|
54
|
+
converter: { value: Object.freeze(e) }
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
var s = o(a, { path: "/" });
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/lib/utils/cookies.ts
|
|
60
|
+
function c(e, t, n = {}) {
|
|
61
|
+
s.set(e, t, n);
|
|
62
|
+
}
|
|
63
|
+
function l(e) {
|
|
64
|
+
return s.get(e);
|
|
65
|
+
}
|
|
66
|
+
function u(e) {
|
|
67
|
+
s.remove(e);
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/lib/utils/checkoutState.ts
|
|
71
|
+
var d = e("checkoutState"), f = (e) => `micdrop:vc:${e}`, p = (e) => `micdrop-${e}`, m = (e) => f(`checkout-state-${e}`), h = (e) => `checkout-state-${e}`, g = (e) => f(`checkout-expiry-${e}`), _ = (e) => `checkout-expiry-${e}`, v = p("cartid"), y = "checkout-cartid";
|
|
72
|
+
function b(e) {
|
|
73
|
+
return Number(e.type) === 2;
|
|
74
|
+
}
|
|
75
|
+
function x() {
|
|
76
|
+
let e = typeof window < "u" && window.location.protocol === "https:";
|
|
77
|
+
return {
|
|
78
|
+
secure: e,
|
|
79
|
+
sameSite: e ? "none" : "lax",
|
|
80
|
+
path: "/"
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function S(e) {
|
|
84
|
+
let i = {}, a = {}, o = [], s = "", c = 0, u = {};
|
|
85
|
+
if (typeof window > "u") return {
|
|
86
|
+
quantities: i,
|
|
87
|
+
donationAmounts: a,
|
|
88
|
+
addOnQuantities: u,
|
|
89
|
+
promocode: s,
|
|
90
|
+
promoDiscountAmount: c,
|
|
91
|
+
tickets: o
|
|
92
|
+
};
|
|
93
|
+
let f = r(m(e), null);
|
|
94
|
+
if (!f) {
|
|
95
|
+
let i = r(h(e), null);
|
|
96
|
+
i && (f = i, n(m(e), i), t(h(e)));
|
|
97
|
+
}
|
|
98
|
+
if (f) return {
|
|
99
|
+
quantities: f.quantities || {},
|
|
100
|
+
donationAmounts: f.donationAmounts || {},
|
|
101
|
+
addOnQuantities: f.addOnQuantities || {},
|
|
102
|
+
promocode: f.promocode || "",
|
|
103
|
+
promoDiscountAmount: parseFloat(String(f.promoDiscountAmount)) || 0,
|
|
104
|
+
tickets: f.tickets || []
|
|
105
|
+
};
|
|
106
|
+
try {
|
|
107
|
+
i = JSON.parse(l(`checkout-quantities-${e}`) || "{}");
|
|
108
|
+
} catch (e) {
|
|
109
|
+
d.warn("Failed to parse checkout quantities cookie:", e), i = {};
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
o = JSON.parse(l(`checkout-tickets-${e}`) || "[]");
|
|
113
|
+
} catch (e) {
|
|
114
|
+
d.warn("Failed to parse checkout tickets cookie:", e), o = [];
|
|
115
|
+
}
|
|
116
|
+
return s = l(`checkout-promocode-${e}`) || "", c = parseFloat(l(`checkout-promo-discount-${e}`) || "0"), (Object.keys(i).length > 0 || o.length > 0 || s) && (T({
|
|
117
|
+
eventID: e,
|
|
118
|
+
quantities: i,
|
|
119
|
+
donationAmounts: a,
|
|
120
|
+
promocode: s,
|
|
121
|
+
promoDiscountAmount: c,
|
|
122
|
+
tickets: o
|
|
123
|
+
}), C(e)), {
|
|
124
|
+
quantities: i,
|
|
125
|
+
donationAmounts: a,
|
|
126
|
+
addOnQuantities: u,
|
|
127
|
+
promocode: s,
|
|
128
|
+
promoDiscountAmount: c,
|
|
129
|
+
tickets: o
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function C(e) {
|
|
133
|
+
u(`checkout-quantities-${e}`), u(`checkout-tickets-${e}`), u(`checkout-promocode-${e}`), u(`checkout-promo-discount-${e}`);
|
|
134
|
+
}
|
|
135
|
+
function w(e) {
|
|
136
|
+
t(m(e)), t(h(e)), C(e), u(`checkout-promo-discount-type-${e}`), u(`checkout-promo-reveal-${e}`), u(`checkout-promo-reveal-ids-${e}`), u(`checkout-promo-ticket-ids-${e}`);
|
|
137
|
+
}
|
|
138
|
+
function T({ eventID: e, quantities: t, donationAmounts: r, addOnQuantities: i, promocode: a, promoDiscountAmount: o, tickets: s }) {
|
|
139
|
+
if (typeof window > "u") return;
|
|
140
|
+
let c = (s || []).map((e) => ({
|
|
141
|
+
ID: e.ID,
|
|
142
|
+
name: e.name,
|
|
143
|
+
price: e.price,
|
|
144
|
+
type: e.type,
|
|
145
|
+
visibility: e.visibility,
|
|
146
|
+
salesChannel: e.salesChannel
|
|
147
|
+
})), l = {
|
|
148
|
+
quantities: t || {},
|
|
149
|
+
donationAmounts: r || {},
|
|
150
|
+
addOnQuantities: i || {},
|
|
151
|
+
promocode: a || "",
|
|
152
|
+
promoDiscountAmount: o || 0,
|
|
153
|
+
tickets: c,
|
|
154
|
+
updatedAt: Date.now()
|
|
155
|
+
};
|
|
156
|
+
n(m(e), l);
|
|
157
|
+
}
|
|
158
|
+
function E(e) {
|
|
159
|
+
if (!e) return null;
|
|
160
|
+
let i = r(g(e), null);
|
|
161
|
+
if (i != null) return k(i);
|
|
162
|
+
let a = r(_(e), null);
|
|
163
|
+
if (a == null) return null;
|
|
164
|
+
let o = k(a);
|
|
165
|
+
return o != null && (n(g(e), o), t(_(e))), o;
|
|
166
|
+
}
|
|
167
|
+
function D(e, t) {
|
|
168
|
+
!e || !Number.isFinite(t) || n(g(e), t);
|
|
169
|
+
}
|
|
170
|
+
function O(e) {
|
|
171
|
+
e && (t(g(e)), t(_(e)));
|
|
172
|
+
}
|
|
173
|
+
function k(e) {
|
|
174
|
+
let t = typeof e == "number" ? e : parseInt(e, 10);
|
|
175
|
+
return Number.isFinite(t) && t > 0 ? t : null;
|
|
176
|
+
}
|
|
177
|
+
function A(e) {
|
|
178
|
+
let t = x();
|
|
179
|
+
c(v, e, t), c(y, e, t);
|
|
180
|
+
}
|
|
181
|
+
async function j(e) {
|
|
182
|
+
let t = p(`order-id-${e}`), n = `order-id-${e}`, r = l(t) || l(n);
|
|
183
|
+
if (r) return r;
|
|
184
|
+
let i = `order-${e}-${Date.now()}`, a = x();
|
|
185
|
+
return c(t, i, a), c(n, i, a), i;
|
|
186
|
+
}
|
|
187
|
+
var M = (e) => f(`queue-token-${e}`);
|
|
188
|
+
function N(e) {
|
|
189
|
+
return r(M(e), null);
|
|
190
|
+
}
|
|
191
|
+
function P(e, t) {
|
|
192
|
+
t && n(M(e), t);
|
|
193
|
+
}
|
|
194
|
+
function F(e) {
|
|
195
|
+
t(M(e));
|
|
196
|
+
}
|
|
197
|
+
//#endregion
|
|
198
|
+
export { c as _, F as a, S as c, N as d, A as f, u as g, l as h, O as i, T as l, P as m, y as n, j as o, D as p, w as r, b as s, v as t, E as u };
|