@getmicdrop/venue-calendar 4.3.122 → 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/dist/{AddOnCard-BkEFPzAX.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-CQZw_kwm.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-Bsx9d4qD.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-DXkBRGeQ.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-CmD84Ni8.js → Event-C8Y3zpPM.js} +620 -534
- package/dist/EventCard-DGnCiMw9.js +175 -0
- package/dist/{EventPage-4ToDFEaL.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-CrBSsbBD.js → RecommendationsRail-QP0CJ7-3.js} +71 -68
- package/dist/{ScarcityBadge-BL4shc2w.js → ScarcityBadge-Cawy-u79.js} +7 -7
- package/dist/{SeriesPage-Dt-T6mco.js → SeriesPage-BXLOd-gT.js} +3 -3
- package/dist/{Spinner-B2rdbspc.js → Spinner-DMSIvUd3.js} +3 -3
- package/dist/{Success-BTm0jRAO.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-BjqniKb9.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-CcPpWiyw.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-DJYPMj8I.js → event-transform-DqzYVPvy.js} +18 -18
- package/dist/{eventStatusStream-DXyc5Eng.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.122 → 4.3.123}/flow/de.js +1 -1
- package/dist/locales/{4.3.122 → 4.3.123}/flow/es.js +1 -1
- package/dist/locales/{4.3.122 → 4.3.123}/flow/fr.js +1 -1
- package/dist/locales/{4.3.122 → 4.3.123}/flow/id.js +1 -1
- package/dist/locales/{4.3.122 → 4.3.123}/flow/it.js +1 -1
- package/dist/locales/{4.3.122 → 4.3.123}/flow/ja.js +1 -1
- package/dist/locales/{4.3.122 → 4.3.123}/flow/ko.js +1 -1
- package/dist/locales/{4.3.122 → 4.3.123}/flow/nl.js +1 -1
- package/dist/locales/{4.3.122 → 4.3.123}/flow/pl.js +1 -1
- package/dist/locales/{4.3.122 → 4.3.123}/flow/pt-br.js +1 -1
- package/dist/locales/{4.3.122 → 4.3.123}/flow/tr.js +1 -1
- package/dist/locales/{4.3.122 → 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-CFwOgA2N.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-CN1o3v9L.js +0 -1933
- package/dist/api-0hNBT78w.js +0 -654
- package/dist/i18n-CIpUYDU6.js +0 -28
- package/dist/i18n-DyjdmQSR.js +0 -608
- package/dist/locales/4.3.122/main/de.js +0 -1
- package/dist/locales/4.3.122/main/es.js +0 -1
- package/dist/locales/4.3.122/main/fr.js +0 -1
- package/dist/locales/4.3.122/main/id.js +0 -1
- package/dist/locales/4.3.122/main/it.js +0 -1
- package/dist/locales/4.3.122/main/ja.js +0 -1
- package/dist/locales/4.3.122/main/ko.js +0 -1
- package/dist/locales/4.3.122/main/nl.js +0 -1
- package/dist/locales/4.3.122/main/pl.js +0 -1
- package/dist/locales/4.3.122/main/pt-br.js +0 -1
- package/dist/locales/4.3.122/main/tr.js +0 -1
- package/dist/locales/4.3.122/main/zh.js +0 -1
- package/dist/to-event-card-props-DYIfPN8e.js +0 -379
- package/dist/utils-BzgFQSTg.js +0 -412
- package/dist/widget-key-context-CmI7Qdtf.js +0 -991
|
@@ -0,0 +1,744 @@
|
|
|
1
|
+
import { g as e, v as t } from "./sizing-DFjg7-wy.js";
|
|
2
|
+
import { E as n, N as r } from "./defaultLabels-C8IfDtR9.js";
|
|
3
|
+
import { n as i } from "./Button-BLmw_oMF.js";
|
|
4
|
+
import { n as a, t as o } from "./normalizers-B8Ruvrlh.js";
|
|
5
|
+
import { E as s, S as c, T as l, n as u, o as d, r as f, s as p, x as ee } from "./client-CS0e2JHE.js";
|
|
6
|
+
import * as m from "svelte/internal/client";
|
|
7
|
+
import { getContext as te } from "svelte";
|
|
8
|
+
//#region ../../../jetbook/npm-calendar/node_modules/@getmicdrop/svelte-components/dist/errors/classes/ApiError.js
|
|
9
|
+
var h = class e extends i {
|
|
10
|
+
constructor(e, t, n = {}) {
|
|
11
|
+
super(e, `API_${t}`, {
|
|
12
|
+
status: t,
|
|
13
|
+
details: n.details,
|
|
14
|
+
recoverable: t < 500,
|
|
15
|
+
cause: n.cause
|
|
16
|
+
}), this.name = "ApiError", this.endpoint = n.endpoint, this.method = n.method, this.requestId = n.requestId;
|
|
17
|
+
}
|
|
18
|
+
getUserMessage(e) {
|
|
19
|
+
return a(this.status, this.message, e);
|
|
20
|
+
}
|
|
21
|
+
isRetryable() {
|
|
22
|
+
return this.status >= 500 || this.status === 429;
|
|
23
|
+
}
|
|
24
|
+
static async fromResponse(t, n, r) {
|
|
25
|
+
let i = `Request failed with status ${t.status}`, a;
|
|
26
|
+
try {
|
|
27
|
+
let e = await t.json();
|
|
28
|
+
i = o(e, i), a = e.details || e;
|
|
29
|
+
} catch {}
|
|
30
|
+
return new e(i, t.status, {
|
|
31
|
+
endpoint: n,
|
|
32
|
+
method: r,
|
|
33
|
+
details: a,
|
|
34
|
+
requestId: t.headers.get("x-request-id") || void 0
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}, g = [
|
|
38
|
+
"utmSource",
|
|
39
|
+
"utmMedium",
|
|
40
|
+
"utmCampaign",
|
|
41
|
+
"utmContent",
|
|
42
|
+
"utmTerm"
|
|
43
|
+
], ne = {
|
|
44
|
+
utmSource: "utm_source",
|
|
45
|
+
utmMedium: "utm_medium",
|
|
46
|
+
utmCampaign: "utm_campaign",
|
|
47
|
+
utmContent: "utm_content",
|
|
48
|
+
utmTerm: "utm_term"
|
|
49
|
+
}, _ = "direct";
|
|
50
|
+
function v(e) {
|
|
51
|
+
return e ? e.trim().toLowerCase().replace(/\s+/g, "_") : "";
|
|
52
|
+
}
|
|
53
|
+
function re(e) {
|
|
54
|
+
let t = {};
|
|
55
|
+
for (let n of g) t[n] = v(e[n]);
|
|
56
|
+
return t.utmSource ||= _, t;
|
|
57
|
+
}
|
|
58
|
+
function ie(e) {
|
|
59
|
+
let t = {};
|
|
60
|
+
for (let n of g) t[n] = e.get(ne[n]);
|
|
61
|
+
return re(t);
|
|
62
|
+
}
|
|
63
|
+
function y(e) {
|
|
64
|
+
return !!e.utmSource && e.utmSource !== "direct";
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/lib/tracking/context.ts
|
|
68
|
+
var b = null, x = null, S = {
|
|
69
|
+
search: null,
|
|
70
|
+
referrer: null,
|
|
71
|
+
pageUrl: null
|
|
72
|
+
};
|
|
73
|
+
function ae(e) {
|
|
74
|
+
e.widgetId !== void 0 && (b = e.widgetId || null), e.venueId !== void 0 && (x = e.venueId ?? null);
|
|
75
|
+
}
|
|
76
|
+
function oe(e) {
|
|
77
|
+
e.search !== void 0 && (S.search = e.search === null ? null : e.search instanceof URLSearchParams ? e.search.toString() : e.search), e.referrer !== void 0 && (S.referrer = e.referrer), e.pageUrl !== void 0 && (S.pageUrl = e.pageUrl);
|
|
78
|
+
}
|
|
79
|
+
function se() {
|
|
80
|
+
return b;
|
|
81
|
+
}
|
|
82
|
+
function ce() {
|
|
83
|
+
return x;
|
|
84
|
+
}
|
|
85
|
+
function le() {
|
|
86
|
+
if (typeof window > "u") return !0;
|
|
87
|
+
try {
|
|
88
|
+
return window.self === window.top;
|
|
89
|
+
} catch {
|
|
90
|
+
return !1;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function C() {
|
|
94
|
+
let e = typeof window < "u", t = le(), n = S.search ?? (e ? window.location.search : ""), r = S.referrer ?? (typeof document < "u" ? document.referrer : "") ?? "", i = S.pageUrl ?? (e && t ? window.location.href : "");
|
|
95
|
+
return {
|
|
96
|
+
utm: ie(new URLSearchParams(n)),
|
|
97
|
+
referrer: r || "",
|
|
98
|
+
pageUrl: i || ""
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function ue() {
|
|
102
|
+
if (typeof navigator > "u") return "desktop";
|
|
103
|
+
let e = navigator.userAgent.toLowerCase();
|
|
104
|
+
return /ipad|tablet|playbook|silk/.test(e) ? "tablet" : /mobile|iphone|ipod|android.*mobile|windows phone|blackberry/.test(e) ? "mobile" : /android/.test(e) ? "tablet" : "desktop";
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/lib/tracking/consent.ts
|
|
108
|
+
var w = null, T = !1, E = !1, D = !1;
|
|
109
|
+
function de(e) {
|
|
110
|
+
w = e;
|
|
111
|
+
}
|
|
112
|
+
function fe(e) {
|
|
113
|
+
T = e;
|
|
114
|
+
}
|
|
115
|
+
function pe(e) {
|
|
116
|
+
D = e;
|
|
117
|
+
}
|
|
118
|
+
function O() {
|
|
119
|
+
return D;
|
|
120
|
+
}
|
|
121
|
+
function k() {
|
|
122
|
+
return typeof window < "u" && typeof window.__tcfapi == "function";
|
|
123
|
+
}
|
|
124
|
+
function A() {
|
|
125
|
+
return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
|
|
126
|
+
}
|
|
127
|
+
function me() {
|
|
128
|
+
return D ? !0 : w === null ? k() || A() : w;
|
|
129
|
+
}
|
|
130
|
+
function j() {
|
|
131
|
+
return D ? !1 : !me() || T;
|
|
132
|
+
}
|
|
133
|
+
function he() {
|
|
134
|
+
return D ? !1 : T ? !0 : w === !1 && !A();
|
|
135
|
+
}
|
|
136
|
+
function ge() {
|
|
137
|
+
if (E || !k()) return;
|
|
138
|
+
E = !0;
|
|
139
|
+
let e = window.__tcfapi;
|
|
140
|
+
try {
|
|
141
|
+
e("addEventListener", 2, (e, t) => {
|
|
142
|
+
if (!(!t || !e)) {
|
|
143
|
+
if (e.gdprApplies === !1) {
|
|
144
|
+
A() || (T = !0);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (e.eventStatus === "tcloaded" || e.eventStatus === "useractioncomplete") {
|
|
148
|
+
let t = e.purpose?.consents;
|
|
149
|
+
T = !!t && Object.values(t).some(Boolean);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
} catch {}
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/lib/tracking/identity.ts
|
|
157
|
+
var M = "micdrop_session_id", N = "micdrop_visitor_id", _e = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
158
|
+
function P(e) {
|
|
159
|
+
return typeof e == "string" && _e.test(e);
|
|
160
|
+
}
|
|
161
|
+
function F() {
|
|
162
|
+
let e = typeof crypto < "u" ? crypto : void 0;
|
|
163
|
+
if (e?.randomUUID) return e.randomUUID();
|
|
164
|
+
let t = /* @__PURE__ */ new Uint8Array(16);
|
|
165
|
+
if (e?.getRandomValues) e.getRandomValues(t);
|
|
166
|
+
else for (let e = 0; e < 16; e++) t[e] = Math.floor(Math.random() * 256);
|
|
167
|
+
t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128;
|
|
168
|
+
let n = [];
|
|
169
|
+
for (let e = 0; e < 16; e++) n.push(t[e].toString(16).padStart(2, "0"));
|
|
170
|
+
return `${n[0]}${n[1]}${n[2]}${n[3]}-${n[4]}${n[5]}-${n[6]}${n[7]}-${n[8]}${n[9]}-${n[10]}${n[11]}${n[12]}${n[13]}${n[14]}${n[15]}`;
|
|
171
|
+
}
|
|
172
|
+
function I() {
|
|
173
|
+
let e = c(M);
|
|
174
|
+
return e || (e = F(), s(M, e)), e;
|
|
175
|
+
}
|
|
176
|
+
function ve(e) {
|
|
177
|
+
let t = ee(N);
|
|
178
|
+
if (P(t)) return {
|
|
179
|
+
id: t,
|
|
180
|
+
createdAt: e,
|
|
181
|
+
migrated: !0
|
|
182
|
+
};
|
|
183
|
+
if (t && typeof t == "object") {
|
|
184
|
+
let { id: n, createdAt: r } = t;
|
|
185
|
+
if (!P(n)) return null;
|
|
186
|
+
let i = typeof r == "number" && Number.isFinite(r), a = i ? Math.min(r, e) : e;
|
|
187
|
+
return {
|
|
188
|
+
id: n,
|
|
189
|
+
createdAt: a,
|
|
190
|
+
migrated: !i || a !== r
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
function L() {
|
|
196
|
+
if (!j()) return null;
|
|
197
|
+
let e = Date.now(), t = ve(e);
|
|
198
|
+
if (t && e - t.createdAt < 34128e6) {
|
|
199
|
+
if (t.migrated) {
|
|
200
|
+
let e = {
|
|
201
|
+
id: t.id,
|
|
202
|
+
createdAt: t.createdAt
|
|
203
|
+
};
|
|
204
|
+
l(N, e);
|
|
205
|
+
}
|
|
206
|
+
return t.id;
|
|
207
|
+
}
|
|
208
|
+
let n = F();
|
|
209
|
+
return l(N, {
|
|
210
|
+
id: n,
|
|
211
|
+
createdAt: e
|
|
212
|
+
}), n;
|
|
213
|
+
}
|
|
214
|
+
//#endregion
|
|
215
|
+
//#region src/lib/tracking/attribution-store.ts
|
|
216
|
+
var R = "micdrop_attribution";
|
|
217
|
+
function ye(e, t) {
|
|
218
|
+
if (!e || !t) return !1;
|
|
219
|
+
try {
|
|
220
|
+
let n = new URL(e).host, r = new URL(t).host;
|
|
221
|
+
return !!n && !!r && n !== r;
|
|
222
|
+
} catch {
|
|
223
|
+
return !1;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
function be(e) {
|
|
227
|
+
return y(e.utm) || ye(e.referrer, e.pageUrl);
|
|
228
|
+
}
|
|
229
|
+
function z() {
|
|
230
|
+
let e = c(R);
|
|
231
|
+
return !e || !e.utm || typeof e.utm.utmSource != "string" ? null : e;
|
|
232
|
+
}
|
|
233
|
+
function xe(e = C()) {
|
|
234
|
+
let t = be(e), n = z();
|
|
235
|
+
!t && n || s(R, {
|
|
236
|
+
utm: e.utm,
|
|
237
|
+
referrer: e.referrer,
|
|
238
|
+
marketing: t
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
function B() {
|
|
242
|
+
let e = z() ?? C();
|
|
243
|
+
return {
|
|
244
|
+
sessionId: I(),
|
|
245
|
+
visitorId: L(),
|
|
246
|
+
utmSource: e.utm.utmSource,
|
|
247
|
+
utmMedium: e.utm.utmMedium,
|
|
248
|
+
utmCampaign: e.utm.utmCampaign,
|
|
249
|
+
utmContent: e.utm.utmContent,
|
|
250
|
+
utmTerm: e.utm.utmTerm,
|
|
251
|
+
referrer: e.referrer || ""
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/lib/tracking/beacon.ts
|
|
256
|
+
var Se = e("tracking"), Ce = /* @__PURE__ */ new Set([
|
|
257
|
+
"chunk_load_error",
|
|
258
|
+
"type_error",
|
|
259
|
+
"reference_error",
|
|
260
|
+
"syntax_error",
|
|
261
|
+
"range_error",
|
|
262
|
+
"security_error",
|
|
263
|
+
"network_error",
|
|
264
|
+
"abort_error",
|
|
265
|
+
"not_supported_error",
|
|
266
|
+
"error"
|
|
267
|
+
]), V = "other";
|
|
268
|
+
function we(e) {
|
|
269
|
+
try {
|
|
270
|
+
let t = e instanceof Error || e && typeof e == "object" && "name" in e ? String(e.name ?? "") : "", n = e && typeof e == "object" && "message" in e ? String(e.message ?? "") : "";
|
|
271
|
+
if (t === "ChunkLoadError" || /dynamically imported module/i.test(n)) return "chunk_load_error";
|
|
272
|
+
let r = t.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9_]/g, "");
|
|
273
|
+
return Ce.has(r) ? r : V;
|
|
274
|
+
} catch {
|
|
275
|
+
return V;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
var Te = /* @__PURE__ */ new Set(["add_to_cart", "purchase"]), H = "micdrop_tracked_beacons", Ee = 300;
|
|
279
|
+
function U(e, t, n, r, i, a, o, s = "") {
|
|
280
|
+
let c = n || `url:${o}`, l = [
|
|
281
|
+
e,
|
|
282
|
+
t ?? "",
|
|
283
|
+
c,
|
|
284
|
+
r,
|
|
285
|
+
i,
|
|
286
|
+
a
|
|
287
|
+
];
|
|
288
|
+
return s && l.push(s), l.join(":");
|
|
289
|
+
}
|
|
290
|
+
function W(e) {
|
|
291
|
+
if (e == null || e === "") return null;
|
|
292
|
+
let t = Number(e);
|
|
293
|
+
return Number.isFinite(t) ? t : null;
|
|
294
|
+
}
|
|
295
|
+
function De(e) {
|
|
296
|
+
let t = c(H, []) ?? [];
|
|
297
|
+
if (t.includes(e)) return !0;
|
|
298
|
+
let n = [...t, e];
|
|
299
|
+
return s(H, n.length > Ee ? n.slice(-300) : n), !1;
|
|
300
|
+
}
|
|
301
|
+
async function G(e, { eventId: t = null, widgetId: n, venueId: r, error: i, cartId: a } = {}) {
|
|
302
|
+
if (typeof window > "u" || O()) return;
|
|
303
|
+
let o = C();
|
|
304
|
+
if (xe(o), e === "link_click" && !y(o.utm)) return;
|
|
305
|
+
let s = I(), c = n === void 0 ? se() : n;
|
|
306
|
+
if (!(Te.has(e) || e === "checkout_started" && !a) && De(U(e, t, c, o.utm.utmSource, o.utm.utmCampaign, s, o.pageUrl, i ? `${i.stage}:${i.errName}` : a ? `cart:${a}` : ""))) return;
|
|
307
|
+
let l = r === void 0 ? ce() : r, u = j(), d = {
|
|
308
|
+
eventType: e,
|
|
309
|
+
eventId: W(t),
|
|
310
|
+
venueId: W(l),
|
|
311
|
+
widgetId: c,
|
|
312
|
+
utmSource: o.utm.utmSource,
|
|
313
|
+
utmMedium: o.utm.utmMedium,
|
|
314
|
+
utmCampaign: o.utm.utmCampaign,
|
|
315
|
+
utmContent: o.utm.utmContent,
|
|
316
|
+
utmTerm: o.utm.utmTerm,
|
|
317
|
+
sessionId: s,
|
|
318
|
+
visitorId: L(),
|
|
319
|
+
deviceType: ue(),
|
|
320
|
+
referrer: u ? o.referrer : "",
|
|
321
|
+
pageUrl: u ? o.pageUrl : "",
|
|
322
|
+
...i ? {
|
|
323
|
+
errName: i.errName,
|
|
324
|
+
stage: i.stage
|
|
325
|
+
} : {}
|
|
326
|
+
};
|
|
327
|
+
try {
|
|
328
|
+
await fetch(`${p()}/track/pageview`, {
|
|
329
|
+
method: "POST",
|
|
330
|
+
headers: { "Content-Type": "application/json" },
|
|
331
|
+
body: JSON.stringify(d),
|
|
332
|
+
keepalive: !0
|
|
333
|
+
});
|
|
334
|
+
} catch (t) {
|
|
335
|
+
Se.error(`Beacon '${e}' failed:`, t);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
var Oe = (e, t) => G("link_click", {
|
|
339
|
+
widgetId: e,
|
|
340
|
+
venueId: t
|
|
341
|
+
}), ke = (e, t) => G("widget_load", {
|
|
342
|
+
widgetId: e,
|
|
343
|
+
venueId: t
|
|
344
|
+
}), Ae = (e, t) => G("list_view", {
|
|
345
|
+
widgetId: e,
|
|
346
|
+
venueId: t
|
|
347
|
+
}), je = (e, t, n) => G("event_view", {
|
|
348
|
+
eventId: e,
|
|
349
|
+
widgetId: t,
|
|
350
|
+
venueId: n
|
|
351
|
+
}), Me = (e, t, n) => G("add_to_cart", {
|
|
352
|
+
eventId: e,
|
|
353
|
+
widgetId: t,
|
|
354
|
+
venueId: n
|
|
355
|
+
}), Ne = (e, t, n, r) => G("checkout_started", {
|
|
356
|
+
eventId: e,
|
|
357
|
+
widgetId: t,
|
|
358
|
+
venueId: n,
|
|
359
|
+
cartId: r
|
|
360
|
+
}), Pe = (e, t, n) => G("price_unavailable", {
|
|
361
|
+
eventId: e,
|
|
362
|
+
widgetId: t,
|
|
363
|
+
venueId: n
|
|
364
|
+
}), Fe = (e, t, n) => G("purchase", {
|
|
365
|
+
eventId: e,
|
|
366
|
+
widgetId: t,
|
|
367
|
+
venueId: n
|
|
368
|
+
});
|
|
369
|
+
function Ie(e, t, n, r) {
|
|
370
|
+
try {
|
|
371
|
+
G("widget_error", {
|
|
372
|
+
widgetId: n,
|
|
373
|
+
venueId: r,
|
|
374
|
+
error: {
|
|
375
|
+
errName: we(e),
|
|
376
|
+
stage: t
|
|
377
|
+
}
|
|
378
|
+
}).catch(() => {});
|
|
379
|
+
} catch {}
|
|
380
|
+
}
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region src/lib/api/transformers/cart.ts
|
|
383
|
+
function Le(e) {
|
|
384
|
+
let t = e ?? {};
|
|
385
|
+
return {
|
|
386
|
+
ticketID: Number(t.TicketID ?? t.ticketID ?? 0),
|
|
387
|
+
quantity: Number(t.Quantity ?? t.quantity ?? 0),
|
|
388
|
+
priceAtReservation: Number(t.PriceAtReservation ?? t.priceAtReservation ?? 0),
|
|
389
|
+
status: String(t.Status ?? t.status ?? "")
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
function Re(e) {
|
|
393
|
+
let t = e ?? {}, i = t.Amount ?? t.amount, a = Number(i);
|
|
394
|
+
return {
|
|
395
|
+
giftCardId: Number(t.GiftCardID ?? t.giftCardId ?? 0),
|
|
396
|
+
maskedCode: String(t.MaskedCode ?? t.maskedCode ?? ""),
|
|
397
|
+
amount: i == null || !Number.isFinite(a) ? null : n(r(a))
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
function ze(e) {
|
|
401
|
+
let t = e ?? {};
|
|
402
|
+
return {
|
|
403
|
+
uuid: t.UUID ?? t.uuid ?? "",
|
|
404
|
+
eventID: Number(t.EventID ?? t.eventID ?? 0),
|
|
405
|
+
status: t.Status ?? t.status ?? "",
|
|
406
|
+
expiresAt: t.ExpiresAt ?? t.expiresAt ?? "",
|
|
407
|
+
reservations: (t.Reservations ?? t.reservations ?? []).map(Le),
|
|
408
|
+
giftCards: (t.GiftCards ?? t.giftCards ?? []).map(Re)
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
//#endregion
|
|
412
|
+
//#region src/lib/i18n/localeLoader.svelte.js
|
|
413
|
+
var K = m.state(0);
|
|
414
|
+
function Be() {
|
|
415
|
+
return m.get(K);
|
|
416
|
+
}
|
|
417
|
+
function Ve() {
|
|
418
|
+
m.set(K, m.get(K) + 1);
|
|
419
|
+
}
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/lib/i18n/createI18n.js
|
|
422
|
+
function q() {
|
|
423
|
+
return typeof navigator > "u" ? null : navigator.language || navigator.userLanguage || null;
|
|
424
|
+
}
|
|
425
|
+
function He({ defaults: e, locales: n = {}, loaders: r = {} }) {
|
|
426
|
+
let i = n.en ?? e, a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
427
|
+
function s(e) {
|
|
428
|
+
return n[e] ? n[e] : a.has(e) ? a.get(e) : null;
|
|
429
|
+
}
|
|
430
|
+
function c(e) {
|
|
431
|
+
let t = s(e);
|
|
432
|
+
if (t) return Promise.resolve(t);
|
|
433
|
+
if (o.has(e)) return o.get(e);
|
|
434
|
+
let n = r[e];
|
|
435
|
+
if (!n) return Promise.resolve(null);
|
|
436
|
+
let i = Promise.resolve().then(n).then((t) => (a.set(e, t), Ve(), t));
|
|
437
|
+
return i.catch(() => o.delete(e)), o.set(e, i), i;
|
|
438
|
+
}
|
|
439
|
+
function l(e) {
|
|
440
|
+
if (Be(), !e || typeof e != "string") return {
|
|
441
|
+
labels: i,
|
|
442
|
+
locale: "en"
|
|
443
|
+
};
|
|
444
|
+
let t = e.toLowerCase(), n = s(t);
|
|
445
|
+
if (n) return {
|
|
446
|
+
labels: n,
|
|
447
|
+
locale: t
|
|
448
|
+
};
|
|
449
|
+
if (r[t]) return c(t), {
|
|
450
|
+
labels: i,
|
|
451
|
+
locale: "en"
|
|
452
|
+
};
|
|
453
|
+
let a = t.split("-")[0], o = s(a);
|
|
454
|
+
return o ? {
|
|
455
|
+
labels: o,
|
|
456
|
+
locale: a
|
|
457
|
+
} : (r[a] && c(a), {
|
|
458
|
+
labels: i,
|
|
459
|
+
locale: "en"
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
function u(n = void 0, r = {}) {
|
|
463
|
+
let { labels: i } = l(n || q() || "en");
|
|
464
|
+
return t(t(e, i), r);
|
|
465
|
+
}
|
|
466
|
+
function d(e) {
|
|
467
|
+
if (!e || typeof e != "string") return Promise.resolve(i);
|
|
468
|
+
let t = e.toLowerCase();
|
|
469
|
+
if (s(t) || r[t]) return c(t);
|
|
470
|
+
let n = t.split("-")[0];
|
|
471
|
+
return s(n) || r[n] ? c(n) : Promise.resolve(null);
|
|
472
|
+
}
|
|
473
|
+
function f() {
|
|
474
|
+
return Array.from(/* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)]));
|
|
475
|
+
}
|
|
476
|
+
return {
|
|
477
|
+
resolveLocale: l,
|
|
478
|
+
getLabelsForLocale: u,
|
|
479
|
+
listLocales: f,
|
|
480
|
+
loadLocale: d
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
//#endregion
|
|
484
|
+
//#region src/lib/i18n/localeSpec.js
|
|
485
|
+
var J = [
|
|
486
|
+
[
|
|
487
|
+
"es",
|
|
488
|
+
"es",
|
|
489
|
+
"es"
|
|
490
|
+
],
|
|
491
|
+
[
|
|
492
|
+
"fr",
|
|
493
|
+
"fr",
|
|
494
|
+
"fr"
|
|
495
|
+
],
|
|
496
|
+
[
|
|
497
|
+
"pt-br",
|
|
498
|
+
"pt-br",
|
|
499
|
+
"pt_br"
|
|
500
|
+
],
|
|
501
|
+
[
|
|
502
|
+
"pt",
|
|
503
|
+
"pt-br",
|
|
504
|
+
"pt_br"
|
|
505
|
+
],
|
|
506
|
+
[
|
|
507
|
+
"de",
|
|
508
|
+
"de",
|
|
509
|
+
"de"
|
|
510
|
+
],
|
|
511
|
+
[
|
|
512
|
+
"ja",
|
|
513
|
+
"ja",
|
|
514
|
+
"ja"
|
|
515
|
+
],
|
|
516
|
+
[
|
|
517
|
+
"zh",
|
|
518
|
+
"zh",
|
|
519
|
+
"zh"
|
|
520
|
+
],
|
|
521
|
+
[
|
|
522
|
+
"ko",
|
|
523
|
+
"ko",
|
|
524
|
+
"ko"
|
|
525
|
+
],
|
|
526
|
+
[
|
|
527
|
+
"it",
|
|
528
|
+
"it",
|
|
529
|
+
"it"
|
|
530
|
+
],
|
|
531
|
+
[
|
|
532
|
+
"nl",
|
|
533
|
+
"nl",
|
|
534
|
+
"nl"
|
|
535
|
+
],
|
|
536
|
+
[
|
|
537
|
+
"tr",
|
|
538
|
+
"tr",
|
|
539
|
+
"tr"
|
|
540
|
+
],
|
|
541
|
+
[
|
|
542
|
+
"id",
|
|
543
|
+
"id",
|
|
544
|
+
"id"
|
|
545
|
+
],
|
|
546
|
+
[
|
|
547
|
+
"pl",
|
|
548
|
+
"pl",
|
|
549
|
+
"pl"
|
|
550
|
+
]
|
|
551
|
+
];
|
|
552
|
+
Array.from(new Set(J.map(([, e]) => e)));
|
|
553
|
+
//#endregion
|
|
554
|
+
//#region src/lib/i18n/buyerLocale.ts
|
|
555
|
+
var Y = new Map([["en", "en"], ...J.map(([e]) => [e, e === "pt" || e === "pt-br" ? "pt-BR" : e])]);
|
|
556
|
+
function X(e) {
|
|
557
|
+
let t = e || q();
|
|
558
|
+
if (!t || typeof t != "string") return;
|
|
559
|
+
let n = t.toLowerCase();
|
|
560
|
+
return Y.get(n) ?? Y.get(n.split("-")[0]);
|
|
561
|
+
}
|
|
562
|
+
//#endregion
|
|
563
|
+
//#region src/lib/api/orders.ts
|
|
564
|
+
var Z = e("VC");
|
|
565
|
+
async function Q(e, t, n, r, i, a) {
|
|
566
|
+
let o = X(i);
|
|
567
|
+
return f(`${d()}/cart/${e}/payment-intent`, {
|
|
568
|
+
productQuantities: t,
|
|
569
|
+
...n && Object.keys(n).length > 0 ? { donationAmounts: n } : {},
|
|
570
|
+
...r ? {
|
|
571
|
+
firstName: r.firstName,
|
|
572
|
+
lastName: r.lastName,
|
|
573
|
+
email: r.email,
|
|
574
|
+
phone: r.phone ?? "",
|
|
575
|
+
questionAnswer: r.questionAnswer ?? "",
|
|
576
|
+
mailingList: r.mailingList ?? !1
|
|
577
|
+
} : {},
|
|
578
|
+
attribution: B(),
|
|
579
|
+
...o ? { locale: o } : {}
|
|
580
|
+
}, { widgetKey: a?.widgetKey });
|
|
581
|
+
}
|
|
582
|
+
async function Ue(e, t, n, r, i, a) {
|
|
583
|
+
try {
|
|
584
|
+
let o = await Q(e, t, n, r, i, a);
|
|
585
|
+
if (!o.success) throw Z.error("Payment intent creation failed:", o.error), new h(o.error || "Failed to create payment intent", o.statusCode ?? 0, {
|
|
586
|
+
endpoint: `${d()}/cart/${e}/payment-intent`,
|
|
587
|
+
method: "POST"
|
|
588
|
+
});
|
|
589
|
+
return Z.debug("Payment intent created:", o.data), o.data;
|
|
590
|
+
} catch (e) {
|
|
591
|
+
return Z.error("createPaymentIntent error:", e), null;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
var We = "VALIDATION_FAILED";
|
|
595
|
+
async function Ge(e, t, n, r, i, a) {
|
|
596
|
+
let o;
|
|
597
|
+
try {
|
|
598
|
+
o = await Q(e, t, n, r, i, a);
|
|
599
|
+
} catch (e) {
|
|
600
|
+
return Z.error("submitCheckoutAnswers error:", e), { refusal: null };
|
|
601
|
+
}
|
|
602
|
+
return o.success ? {
|
|
603
|
+
refusal: null,
|
|
604
|
+
clientSecret: o.data?.client_secret
|
|
605
|
+
} : o.errorCode === We && o.error ? (Z.debug("Checkout answers refused:", o.error), { refusal: o.error }) : (Z.error("Checkout answers call failed:", o.error), { refusal: null });
|
|
606
|
+
}
|
|
607
|
+
async function Ke(e, t, n) {
|
|
608
|
+
if (!e) return null;
|
|
609
|
+
try {
|
|
610
|
+
let r = await u(`${d()}/cart/${e}`, { widgetKey: n?.widgetKey });
|
|
611
|
+
if (!r.success) return null;
|
|
612
|
+
let { uuid: i, eventID: a, status: o, expiresAt: s, reservations: c, giftCards: l } = ze(r.data);
|
|
613
|
+
return o !== "reserved" && o !== "active" || t !== void 0 && a !== Number(t) ? null : {
|
|
614
|
+
uuid: i,
|
|
615
|
+
eventID: a,
|
|
616
|
+
status: o,
|
|
617
|
+
expiresAt: s,
|
|
618
|
+
reservations: c,
|
|
619
|
+
giftCards: l
|
|
620
|
+
};
|
|
621
|
+
} catch (e) {
|
|
622
|
+
return Z.error("getCartByUUID error:", e), null;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
async function qe(e, t, n) {
|
|
626
|
+
try {
|
|
627
|
+
let r = {};
|
|
628
|
+
for (let [e, n] of Object.entries(t)) {
|
|
629
|
+
let t = typeof e == "number" ? e : parseInt(e, 10);
|
|
630
|
+
!Number.isNaN(t) && n > 0 && (r[t] = n);
|
|
631
|
+
}
|
|
632
|
+
let i = {};
|
|
633
|
+
if (n) for (let [e, t] of Object.entries(n)) {
|
|
634
|
+
let n = typeof e == "number" ? e : parseInt(e, 10);
|
|
635
|
+
!Number.isNaN(n) && t > 0 && (i[n] = t);
|
|
636
|
+
}
|
|
637
|
+
let a = await fetch(`${d()}/cart/${e}`, {
|
|
638
|
+
method: "PUT",
|
|
639
|
+
headers: { "Content-Type": "application/json" },
|
|
640
|
+
body: JSON.stringify({
|
|
641
|
+
quantities: r,
|
|
642
|
+
...Object.keys(i).length > 0 ? { donationAmounts: i } : {}
|
|
643
|
+
})
|
|
644
|
+
});
|
|
645
|
+
if (!a.ok) {
|
|
646
|
+
let e = await a.json().catch(() => ({}));
|
|
647
|
+
return Z.error("Cart update failed:", e), !1;
|
|
648
|
+
}
|
|
649
|
+
return !0;
|
|
650
|
+
} catch (e) {
|
|
651
|
+
return Z.error("updateCartQuantities error:", e), !1;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
async function Je(e, t = "", n) {
|
|
655
|
+
try {
|
|
656
|
+
let r = await f(`${p()}/orders/${e}/refund`, { message: t }, { widgetKey: n?.widgetKey });
|
|
657
|
+
return r.success ? { success: !0 } : (Z.error("Refund request failed:", r.error), {
|
|
658
|
+
success: !1,
|
|
659
|
+
error: r.error || "Failed to submit refund request"
|
|
660
|
+
});
|
|
661
|
+
} catch (e) {
|
|
662
|
+
return Z.error("requestOrderRefund error:", e), {
|
|
663
|
+
success: !1,
|
|
664
|
+
error: "Network error submitting refund request"
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
async function Ye(e, t, n, r) {
|
|
669
|
+
let i = X(n);
|
|
670
|
+
try {
|
|
671
|
+
let n = await f(`${d()}/validatePaymentIntent/${e}`, {
|
|
672
|
+
...t,
|
|
673
|
+
attribution: B(),
|
|
674
|
+
...i ? { locale: i } : {}
|
|
675
|
+
}, { widgetKey: r?.widgetKey });
|
|
676
|
+
if (!n.success) return Z.error("Payment validation failed:", n.error), {
|
|
677
|
+
success: !1,
|
|
678
|
+
status: "failed",
|
|
679
|
+
error: n.error || "Payment validation failed"
|
|
680
|
+
};
|
|
681
|
+
let a = n.data;
|
|
682
|
+
return a.eventCanceled || a.eventPostponed ? {
|
|
683
|
+
success: !1,
|
|
684
|
+
status: "failed",
|
|
685
|
+
eventCanceled: a.eventCanceled,
|
|
686
|
+
eventPostponed: a.eventPostponed
|
|
687
|
+
} : {
|
|
688
|
+
success: !0,
|
|
689
|
+
status: a.status || "Payment succeeded",
|
|
690
|
+
orderUUID: a.orderUUID || a.uuid
|
|
691
|
+
};
|
|
692
|
+
} catch (e) {
|
|
693
|
+
return Z.error("validatePaymentIntent error:", e), null;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
async function Xe(e, t) {
|
|
697
|
+
try {
|
|
698
|
+
let n = await f(`${p()}/orders/extend-session`, { orderUuid: e }, { widgetKey: t?.widgetKey });
|
|
699
|
+
if (!n.success) return {
|
|
700
|
+
success: !1,
|
|
701
|
+
error: n.error || "Failed to extend session",
|
|
702
|
+
statusCode: n.statusCode
|
|
703
|
+
};
|
|
704
|
+
let r = n.data;
|
|
705
|
+
return {
|
|
706
|
+
success: !0,
|
|
707
|
+
newExpiryTime: r.newExpiryTime,
|
|
708
|
+
remainingExtensions: r.remainingExtensions
|
|
709
|
+
};
|
|
710
|
+
} catch (e) {
|
|
711
|
+
return Z.error("Error extending checkout session:", e), {
|
|
712
|
+
success: !1,
|
|
713
|
+
error: "Network error extending session"
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
async function Ze(e, t) {
|
|
718
|
+
try {
|
|
719
|
+
let n = await u(`${p()}/orders/session/${e}`, { widgetKey: t?.widgetKey });
|
|
720
|
+
if (!n.success) return {
|
|
721
|
+
error: n.error || "No active session found",
|
|
722
|
+
notFound: n.statusCode === 404
|
|
723
|
+
};
|
|
724
|
+
let r = n.data;
|
|
725
|
+
return {
|
|
726
|
+
expiresAt: r.expiresAt,
|
|
727
|
+
extensionCount: r.extensionCount,
|
|
728
|
+
remainingExtensions: r.remainingExtensions,
|
|
729
|
+
canExtend: r.canExtend,
|
|
730
|
+
reservationCount: r.reservationCount,
|
|
731
|
+
eventStatus: r.eventStatus
|
|
732
|
+
};
|
|
733
|
+
} catch (e) {
|
|
734
|
+
return Z.error("Error getting session status:", e), { error: "Network error getting session status" };
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
//#endregion
|
|
738
|
+
//#region src/lib/widget-key-context.ts
|
|
739
|
+
var $ = Symbol("micdrop-widget-key");
|
|
740
|
+
function Qe() {
|
|
741
|
+
return te($) || void 0;
|
|
742
|
+
}
|
|
743
|
+
//#endregion
|
|
744
|
+
export { ge as A, B as C, fe as D, O as E, h as F, ae as M, _ as N, de as O, v as P, ke as S, he as T, Oe as _, Ke as a, Fe as b, Ge as c, X as d, He as f, je as g, Ne as h, Xe as i, oe as j, pe as k, qe as l, Me as m, Qe as n, Ze as o, q as p, Ue as r, Je as s, $ as t, Ye as u, Ae as v, L as w, Ie as x, Pe as y };
|