@getmicdrop/venue-calendar 4.3.122 → 4.3.124

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/{AddOnCard-BkEFPzAX.js → AddOnCard-BCakRkN0.js} +18 -18
  2. package/dist/{ArrowLeftIcon-t-CY0sbi.js → ArrowLeftIcon-B6vERrBh.js} +1 -1
  3. package/dist/{BlockPlaceholder-BmEZ68_q.js → BlockPlaceholder-CInLJaAM.js} +1 -1
  4. package/dist/{Calendar-hxcQBkTF.js → Calendar-DV_SrEdT.js} +131 -150
  5. package/dist/{CalendarFoundryView-CSAKDe-F.js → CalendarFoundryView-Cx60F-de.js} +968 -966
  6. package/dist/{CalendarIcon-B5JWs0gm.js → CalendarIcon-BA9OTu6n.js} +1 -1
  7. package/dist/{CartView-CQZw_kwm.js → CartView-DXL2fN6s.js} +279 -276
  8. package/dist/{CheckIcon-BSwoGox7.js → CheckIcon-CsHdBvm7.js} +1 -1
  9. package/dist/{Checkout-Bsx9d4qD.js → Checkout-BDogQG64.js} +378 -376
  10. package/dist/Checkout-puHwDIls.js +1934 -0
  11. package/dist/{CheckoutTimer-Bpt5gPyA.js → CheckoutTimer-KkahlL47.js} +5 -5
  12. package/dist/{ChevronDownIcon-CVZ0usBx.js → ChevronDownIcon-CfmGVqjm.js} +1 -1
  13. package/dist/ChevronRightOutline-CiG8UHni.js +23 -0
  14. package/dist/{CloseIcon-DUnvWXUY.js → CloseIcon-0KKo8fB2.js} +1 -1
  15. package/dist/{CollectionView-DXkBRGeQ.js → CollectionView-COd_e_aK.js} +6 -6
  16. package/dist/{Event-CmD84Ni8.js → Event-BYhY0nEy.js} +604 -518
  17. package/dist/EventCard-am-bIial.js +175 -0
  18. package/dist/{EventPage-4ToDFEaL.js → EventPage-DOiyzTGz.js} +289 -265
  19. package/dist/{Input-BXZmvQ0p.js → Input-CUn5WW7v.js} +1 -1
  20. package/dist/{LocationIcon-E-7CQh4E.js → LocationIcon-MUNzCw0b.js} +1 -1
  21. package/dist/{PasswordInput-DzXNIwRc.js → PasswordInput-uLRaGMSt.js} +1 -1
  22. package/dist/{PhoneInput-DnmN_L03.js → PhoneInput-5l-M5ykF.js} +1 -1
  23. package/dist/{RecommendationsRail-CrBSsbBD.js → RecommendationsRail-ShRQ7JzA.js} +69 -66
  24. package/dist/{ScarcityBadge-BL4shc2w.js → ScarcityBadge-BvLoTIiM.js} +6 -6
  25. package/dist/{SeriesPage-Dt-T6mco.js → SeriesPage-DMYXn2vA.js} +2 -2
  26. package/dist/{Spinner-B2rdbspc.js → Spinner-CwCn-yPI.js} +1 -1
  27. package/dist/{Success-BTm0jRAO.js → Success-BP76tviw.js} +175 -172
  28. package/dist/{TagIcon-BY8tK_qA.js → TagIcon-CUfTUPrP.js} +1 -1
  29. package/dist/{ViewTicketsEmbed-BjqniKb9.js → ViewTicketsEmbed-DnMqRwJI.js} +17 -16
  30. package/dist/{WarningCircleIcon-C5Lc7qkF.js → WarningCircleIcon-BVUWnzFt.js} +1 -1
  31. package/dist/{WarningTriIcon-BM8qc9xx.js → WarningTriIcon-CBHdMLyJ.js} +1 -1
  32. package/dist/adapter-BaqXgSqI.js +164 -0
  33. package/dist/api-BUAptAYH.js +489 -0
  34. package/dist/checkoutState-DKdzYK3y.js +198 -0
  35. package/dist/client-BxgiVv8K.js +262 -0
  36. package/dist/{constants-C6MZgb2S.js → constants-lKAMwRvZ.js} +5 -1
  37. package/dist/{copyToClipboard-F-akSgaF.js → copyToClipboard-BaAhnhZ9.js} +1 -1
  38. package/dist/{createErrorGate.svelte-CEGaIQeI.js → createErrorGate.svelte-BCjQmoDN.js} +1 -1
  39. package/dist/cta-BE_N5pBc.js +116 -0
  40. package/dist/{datetime-BnKG6Hjm.js → datetime-BetkhP3Y.js} +47 -47
  41. package/dist/{de-BHcAXwnM.js → de-C3szl-Vf.js} +10 -4
  42. package/dist/{de-BPmqZ6ao.js → de-CX7o2WAr.js} +5 -1
  43. package/dist/{defaultLabels-BbNEEsF7.js → defaultLabels-D7c3DLP3.js} +378 -401
  44. package/dist/{defaults-CcPpWiyw.js → defaults-QFkzo2Vg.js} +6 -6
  45. package/dist/{es-BV3Sgeg-.js → es-DS1-fjU8.js} +5 -1
  46. package/dist/{es-DZ3yceh-.js → es-QnJXFKEx.js} +10 -4
  47. package/dist/{event-DfqUhl5j.js → event-DFyH3dNo.js} +1 -1
  48. package/dist/{event-transform-DJYPMj8I.js → event-transform-za8lXql7.js} +18 -18
  49. package/dist/{eventStatusStream-DXyc5Eng.js → eventStatusStream-CaDLn9GX.js} +1 -1
  50. package/dist/{fr-Dyi163Vk.js → fr-BVgQDC6c.js} +10 -4
  51. package/dist/{fr-BJ0VQGEj.js → fr-CN3PiNzU.js} +5 -1
  52. package/dist/{href-CfWGAmkP.js → href--Xjr4Dsb.js} +3 -3
  53. package/dist/i18n-Bd9CN9cj.js +497 -0
  54. package/dist/i18n-Cwq8IQ_c.js +28 -0
  55. package/dist/{id-CVXaHHqU.js → id-CPG4tPVY.js} +5 -1
  56. package/dist/{id-DvFRZVAm.js → id-DCcXxLEY.js} +10 -4
  57. package/dist/{it-C0lzsHje.js → it-CjwnCYFF.js} +5 -1
  58. package/dist/{it-Bh05tcLv.js → it-CufAwhe3.js} +10 -4
  59. package/dist/{ja-Dl2r6tQ6.js → ja-C2uiNCJX.js} +5 -1
  60. package/dist/{ja-CU4PQS4j.js → ja-CMa_nsLY.js} +10 -4
  61. package/dist/{ko-DINqFSE1.js → ko-Bh97byDf.js} +5 -1
  62. package/dist/{ko-DDk6EdWm.js → ko-BwJHUjqS.js} +10 -4
  63. package/dist/locales/{4.3.122 → 4.3.124}/flow/de.js +1 -1
  64. package/dist/locales/{4.3.122 → 4.3.124}/flow/es.js +1 -1
  65. package/dist/locales/{4.3.122 → 4.3.124}/flow/fr.js +1 -1
  66. package/dist/locales/{4.3.122 → 4.3.124}/flow/id.js +1 -1
  67. package/dist/locales/{4.3.122 → 4.3.124}/flow/it.js +1 -1
  68. package/dist/locales/{4.3.122 → 4.3.124}/flow/ja.js +1 -1
  69. package/dist/locales/{4.3.122 → 4.3.124}/flow/ko.js +1 -1
  70. package/dist/locales/{4.3.122 → 4.3.124}/flow/nl.js +1 -1
  71. package/dist/locales/{4.3.122 → 4.3.124}/flow/pl.js +1 -1
  72. package/dist/locales/{4.3.122 → 4.3.124}/flow/pt-br.js +1 -1
  73. package/dist/locales/{4.3.122 → 4.3.124}/flow/tr.js +1 -1
  74. package/dist/locales/{4.3.122 → 4.3.124}/flow/zh.js +1 -1
  75. package/dist/locales/4.3.124/main/de.js +1 -0
  76. package/dist/locales/4.3.124/main/es.js +1 -0
  77. package/dist/locales/4.3.124/main/fr.js +1 -0
  78. package/dist/locales/4.3.124/main/id.js +1 -0
  79. package/dist/locales/4.3.124/main/it.js +1 -0
  80. package/dist/locales/4.3.124/main/ja.js +1 -0
  81. package/dist/locales/4.3.124/main/ko.js +1 -0
  82. package/dist/locales/4.3.124/main/nl.js +1 -0
  83. package/dist/locales/4.3.124/main/pl.js +1 -0
  84. package/dist/locales/4.3.124/main/pt-br.js +1 -0
  85. package/dist/locales/4.3.124/main/tr.js +1 -0
  86. package/dist/locales/4.3.124/main/zh.js +1 -0
  87. package/dist/look-island.svelte-QW0yvxsq.js +1278 -0
  88. package/dist/looks/4.3.124/looks.js +242 -0
  89. package/dist/looks/4.3.124/micdrop-wordmark-BYMG6vLR.svg +1 -0
  90. package/dist/looks/4.3.124/microphone-Ccv4r-kd.webp +0 -0
  91. package/dist/looks/4.3.124/superuser-CZF6a5gO.webp +0 -0
  92. package/dist/looks/4.3.124/treasury-DUE7lZzT.webp +0 -0
  93. package/dist/looks/4.3.124/user-image-yuS4errP.svg +9 -0
  94. package/dist/navigation-BYEhsDX4.js +176 -0
  95. package/dist/{nl-DOSKYHSx.js → nl-BQALrtyB.js} +10 -4
  96. package/dist/{nl-D92n5tHa.js → nl-ve_OaXOQ.js} +5 -1
  97. package/dist/normalizers-CqGXhPZo.js +44 -0
  98. package/dist/{phoneUtils-CS66SHie.js → phoneUtils-CL8tIxoM.js} +4 -0
  99. package/dist/{pixels-CFwOgA2N.js → pixels-CV8Zw_Kn.js} +1 -1
  100. package/dist/{pl-BlZHcnlS.js → pl-BHBBOz2I.js} +5 -1
  101. package/dist/{pl-CkLEymA2.js → pl-DaPcPjBE.js} +10 -4
  102. package/dist/{pt-br-BHuCQSM-.js → pt-br-BxdP86Vr.js} +10 -4
  103. package/dist/{pt-br-BrxthY0b.js → pt-br-D30dkLzU.js} +5 -1
  104. package/dist/{serverTotals-B8SJCzxE.js → serverTotals-DGQ7a35U.js} +1 -1
  105. package/dist/{showcase-state-options-KO_TYk3I.js → showcase-state-options-DTl2gdkG.js} +3 -3
  106. package/dist/to-event-card-props-CklRkTpt.js +205 -0
  107. package/dist/{tr-BnAdi4HO.js → tr-CFVBCuqV.js} +5 -1
  108. package/dist/{tr-Bvc34ODh.js → tr-CSfagpI3.js} +10 -4
  109. package/dist/types/index.d.ts +21 -4
  110. package/dist/utils-CowZZZtC.js +219 -0
  111. package/dist/venue-calendar.css +1 -1
  112. package/dist/venue-calendar.es.js +1550 -1836
  113. package/dist/venue-calendar.iife.js +35 -35
  114. package/dist/venue-calendar.umd.js +183 -54
  115. package/dist/widget-key-context-DX9WCLIM.js +744 -0
  116. package/dist/{zh-K0hOzZ3G.js → zh-DWMcKVLH.js} +10 -4
  117. package/dist/{zh-Tg1OTvWs.js → zh-DeEOoOFR.js} +5 -1
  118. package/package.json +4 -4
  119. package/dist/Checkout-CN1o3v9L.js +0 -1933
  120. package/dist/api-0hNBT78w.js +0 -654
  121. package/dist/i18n-CIpUYDU6.js +0 -28
  122. package/dist/i18n-DyjdmQSR.js +0 -608
  123. package/dist/locales/4.3.122/main/de.js +0 -1
  124. package/dist/locales/4.3.122/main/es.js +0 -1
  125. package/dist/locales/4.3.122/main/fr.js +0 -1
  126. package/dist/locales/4.3.122/main/id.js +0 -1
  127. package/dist/locales/4.3.122/main/it.js +0 -1
  128. package/dist/locales/4.3.122/main/ja.js +0 -1
  129. package/dist/locales/4.3.122/main/ko.js +0 -1
  130. package/dist/locales/4.3.122/main/nl.js +0 -1
  131. package/dist/locales/4.3.122/main/pl.js +0 -1
  132. package/dist/locales/4.3.122/main/pt-br.js +0 -1
  133. package/dist/locales/4.3.122/main/tr.js +0 -1
  134. package/dist/locales/4.3.122/main/zh.js +0 -1
  135. package/dist/to-event-card-props-DYIfPN8e.js +0 -379
  136. package/dist/utils-BzgFQSTg.js +0 -412
  137. package/dist/widget-key-context-CmI7Qdtf.js +0 -991
@@ -1,991 +0,0 @@
1
- import { _ as e, g as t, v as n } from "./sizing-B7ixYndz.js";
2
- import { A as r, L as i, a, o } from "./defaultLabels-BbNEEsF7.js";
3
- import { n as s } from "./Button-VUB2WJ88.js";
4
- import * as c from "svelte/internal/client";
5
- import { getContext as l } from "svelte";
6
- //#region node_modules/@getmicdrop/svelte-components/dist/errors/classes/ApiError.js
7
- var u = class e extends s {
8
- constructor(e, t, n = {}) {
9
- super(e, `API_${t}`, {
10
- status: t,
11
- details: n.details,
12
- recoverable: t < 500,
13
- cause: n.cause
14
- }), this.name = "ApiError", this.endpoint = n.endpoint, this.method = n.method, this.requestId = n.requestId;
15
- }
16
- getUserMessage(e) {
17
- return o(this.status, this.message, e);
18
- }
19
- isRetryable() {
20
- return this.status >= 500 || this.status === 429;
21
- }
22
- static async fromResponse(t, n, r) {
23
- let i = `Request failed with status ${t.status}`, o;
24
- try {
25
- let e = await t.json();
26
- i = a(e, i), o = e.details || e;
27
- } catch {}
28
- return new e(i, t.status, {
29
- endpoint: n,
30
- method: r,
31
- details: o,
32
- requestId: t.headers.get("x-request-id") || void 0
33
- });
34
- }
35
- };
36
- //#endregion
37
- //#region node_modules/@getmicdrop/svelte-components/dist/utils/storage/storage.js
38
- function d(e) {
39
- if (typeof window > "u") return null;
40
- try {
41
- return e === "local" ? window.localStorage : window.sessionStorage;
42
- } catch {
43
- return null;
44
- }
45
- }
46
- function f(e, t) {
47
- if (e == null || e === "") return t;
48
- try {
49
- return JSON.parse(e);
50
- } catch {
51
- return t;
52
- }
53
- }
54
- function ee(e, t, n) {
55
- if (!e) return n;
56
- let r;
57
- try {
58
- r = e.getItem(t);
59
- } catch {
60
- return n;
61
- }
62
- return f(r, n);
63
- }
64
- function te(t, n, r) {
65
- if (!t) return !1;
66
- try {
67
- return t.setItem(n, JSON.stringify(r)), !0;
68
- } catch (t) {
69
- return e.warn(`storage: failed to write "${n}"`, t), !1;
70
- }
71
- }
72
- function ne(e, t) {
73
- if (e) try {
74
- e.removeItem(t);
75
- } catch {}
76
- }
77
- function p(e, t, n) {
78
- return ee(d(e), t, n);
79
- }
80
- function re(e, t, n) {
81
- return te(d(e), t, n);
82
- }
83
- function m(e, t) {
84
- ne(d(e), t);
85
- }
86
- function ie(e, t = null) {
87
- return p("local", e, t);
88
- }
89
- function h(e, t) {
90
- return re("local", e, t);
91
- }
92
- function ae(e) {
93
- m("local", e);
94
- }
95
- function g(e, t = null) {
96
- return p("session", e, t);
97
- }
98
- function _(e, t) {
99
- return re("session", e, t);
100
- }
101
- function oe(e) {
102
- m("session", e);
103
- }
104
- //#endregion
105
- //#region src/lib/config.js
106
- var se = t("VC:config", { enabled: !0 }), v = null;
107
- function ce(e) {
108
- let t = e || null;
109
- v && t && t !== v && se.warn("[VC] setWidgetKey called again with a DIFFERENT key. The widget key is module-global, so every calendar on this page will now use the last one set — any element configured with the previous key will get 403s on its public reads and render empty. Give each element its own widget-key attribute (threaded per-instance) rather than calling setWidgetKey() more than once."), v = t;
110
- }
111
- function y() {
112
- if (v) return v;
113
- }
114
- var b = null;
115
- function le(e) {
116
- b = typeof e == "string" && e.trim() ? e.trim() : null;
117
- }
118
- function ue() {
119
- return (b || be().baseUrl || (typeof window > "u" ? "" : window.location.origin) || "").replace(/\/+$/, "");
120
- }
121
- function de(e) {}
122
- var x = {
123
- postMessageOnSuccess: !1,
124
- postMessageTargetOrigin: null
125
- };
126
- function fe(e = {}) {
127
- x = {
128
- ...x,
129
- ...e
130
- };
131
- }
132
- function pe() {
133
- return { ...x };
134
- }
135
- //#endregion
136
- //#region src/lib/api/client.ts
137
- var S = t("VC"), C = /* @__PURE__ */ new Set();
138
- function me(e) {
139
- return C.add(e), () => {
140
- C.delete(e);
141
- };
142
- }
143
- function he(e) {
144
- if (e) for (let t of C) try {
145
- t(e);
146
- } catch {}
147
- }
148
- var ge = "ABORTED";
149
- function w(e, t) {
150
- let n = t || y();
151
- return n ? {
152
- ...e,
153
- "X-Widget-Key": n
154
- } : e;
155
- }
156
- function _e(e, t) {
157
- let n = `HTTP ${t}`;
158
- if (!e || typeof e != "object") return { message: n };
159
- let r = e, i = r.error && typeof r.error == "object" ? r.error : null, a = typeof r.code == "string" ? r.code : typeof i?.code == "string" ? i.code : void 0;
160
- return {
161
- message: typeof r.error == "string" ? r.error : typeof i?.message == "string" ? i.message : typeof r.message == "string" ? r.message : n,
162
- code: a
163
- };
164
- }
165
- var ve = class extends Error {
166
- code;
167
- statusCode;
168
- constructor(e, t, n) {
169
- super(e), this.name = "ApiRequestError", this.code = t, this.statusCode = n;
170
- }
171
- }, T = {
172
- baseUrl: "https://get-micdrop.com",
173
- timeout: 3e4,
174
- retries: 2,
175
- retryDelay: 500,
176
- onError: (e) => S.error("API Error:", e)
177
- };
178
- function ye(e) {
179
- T = {
180
- ...T,
181
- ...e
182
- };
183
- }
184
- function be() {
185
- return { ...T };
186
- }
187
- function E() {
188
- return `${T.baseUrl}/api/v2/public`;
189
- }
190
- function D() {
191
- return `${T.baseUrl}/api/orders/v2/public`;
192
- }
193
- var xe = (e) => new Promise((t) => setTimeout(t, e));
194
- async function O(e, t, n) {
195
- let r = (t.method || "GET").toUpperCase(), i = r === "GET" || r === "HEAD" ? n.retries + 1 : 1, a;
196
- for (let r = 1; r <= i; r++) {
197
- let o = new AbortController(), s = setTimeout(() => o.abort(), n.timeout), c = t.signal, l;
198
- c && (c.aborted ? o.abort() : (l = () => o.abort(), c.addEventListener("abort", l, { once: !0 })));
199
- try {
200
- let n = await fetch(e, {
201
- ...t,
202
- signal: o.signal
203
- });
204
- if (n.status >= 500 && r < i) a = /* @__PURE__ */ Error(`HTTP ${n.status}`);
205
- else return n;
206
- } catch (e) {
207
- if (a = e, c?.aborted) throw e;
208
- } finally {
209
- clearTimeout(s), c && l && c.removeEventListener("abort", l);
210
- }
211
- r < i && await xe(n.retryDelay * 2 ** (r - 1));
212
- }
213
- throw a;
214
- }
215
- async function k(e, t) {
216
- return j("GET", e, void 0, t);
217
- }
218
- async function A(e, t, n) {
219
- return j("POST", e, t, n);
220
- }
221
- async function Se(e, t) {
222
- return j("DELETE", e, void 0, t);
223
- }
224
- async function j(e, t, n, r) {
225
- let i = t.startsWith("http") || t.startsWith("/api/") ? t : `${E()}${t}`, { widgetKey: a, suppressOnError: o, headers: s, ...c } = r ?? {}, l = (e) => {
226
- o || T.onError(e);
227
- };
228
- try {
229
- let t = await O(i, {
230
- method: e,
231
- headers: w({
232
- "Content-Type": "application/json",
233
- ...s
234
- }, a),
235
- body: n === void 0 ? void 0 : JSON.stringify(n),
236
- ...c
237
- }, T);
238
- if (!t.ok) {
239
- let { message: e, code: n } = _e(await t.json().catch(() => ({})), t.status);
240
- return l(new ve(e, n, t.status)), he(n), {
241
- success: !1,
242
- error: e,
243
- errorCode: n,
244
- statusCode: t.status
245
- };
246
- }
247
- return {
248
- success: !0,
249
- data: await t.json(),
250
- statusCode: t.status
251
- };
252
- } catch (e) {
253
- if (r?.signal?.aborted) return {
254
- success: !1,
255
- error: "Request aborted",
256
- errorCode: ge,
257
- aborted: !0
258
- };
259
- let t = e instanceof Error ? e.name === "AbortError" ? "Request timed out" : e.message : "Unknown error";
260
- return l(e instanceof Error ? e : Error(t)), {
261
- success: !1,
262
- error: t
263
- };
264
- }
265
- }
266
- async function Ce(e, t) {
267
- return A(`${E()}/tax-preview`, e, {
268
- signal: t?.signal,
269
- suppressOnError: t?.suppressOnError ?? !0,
270
- widgetKey: t?.widgetKey
271
- });
272
- }
273
- async function we(e, t) {
274
- try {
275
- let n = e.startsWith(T.baseUrl), { widgetKey: r, ...i } = t ?? {}, a = await O(e, {
276
- ...i,
277
- ...n ? { headers: w(i.headers, r) } : {}
278
- }, T);
279
- if (!a.ok) {
280
- let e = await a.json().catch(() => ({}));
281
- return S.error(`API request failed: ${a.status}`, e), null;
282
- }
283
- return a.json();
284
- } catch (e) {
285
- return S.error("API request error:", e), null;
286
- }
287
- }
288
- //#endregion
289
- //#region src/lib/tracking/normalize.ts
290
- var Te = [
291
- "utmSource",
292
- "utmMedium",
293
- "utmCampaign",
294
- "utmContent",
295
- "utmTerm"
296
- ], Ee = {
297
- utmSource: "utm_source",
298
- utmMedium: "utm_medium",
299
- utmCampaign: "utm_campaign",
300
- utmContent: "utm_content",
301
- utmTerm: "utm_term"
302
- }, De = "direct";
303
- function Oe(e) {
304
- return e ? e.trim().toLowerCase().replace(/\s+/g, "_") : "";
305
- }
306
- function ke(e) {
307
- let t = {};
308
- for (let n of Te) t[n] = Oe(e[n]);
309
- return t.utmSource ||= De, t;
310
- }
311
- function Ae(e) {
312
- let t = {};
313
- for (let n of Te) t[n] = e.get(Ee[n]);
314
- return ke(t);
315
- }
316
- function je(e) {
317
- return !!e.utmSource && e.utmSource !== "direct";
318
- }
319
- //#endregion
320
- //#region src/lib/tracking/context.ts
321
- var Me = null, Ne = null, M = {
322
- search: null,
323
- referrer: null,
324
- pageUrl: null
325
- };
326
- function Pe(e) {
327
- e.widgetId !== void 0 && (Me = e.widgetId || null), e.venueId !== void 0 && (Ne = e.venueId ?? null);
328
- }
329
- function Fe(e) {
330
- e.search !== void 0 && (M.search = e.search === null ? null : e.search instanceof URLSearchParams ? e.search.toString() : e.search), e.referrer !== void 0 && (M.referrer = e.referrer), e.pageUrl !== void 0 && (M.pageUrl = e.pageUrl);
331
- }
332
- function Ie() {
333
- return Me;
334
- }
335
- function Le() {
336
- return Ne;
337
- }
338
- function Re() {
339
- if (typeof window > "u") return !0;
340
- try {
341
- return window.self === window.top;
342
- } catch {
343
- return !1;
344
- }
345
- }
346
- function N() {
347
- let e = typeof window < "u", t = Re(), n = M.search ?? (e ? window.location.search : ""), r = M.referrer ?? (typeof document < "u" ? document.referrer : "") ?? "", i = M.pageUrl ?? (e && t ? window.location.href : "");
348
- return {
349
- utm: Ae(new URLSearchParams(n)),
350
- referrer: r || "",
351
- pageUrl: i || ""
352
- };
353
- }
354
- function ze() {
355
- if (typeof navigator > "u") return "desktop";
356
- let e = navigator.userAgent.toLowerCase();
357
- return /ipad|tablet|playbook|silk/.test(e) ? "tablet" : /mobile|iphone|ipod|android.*mobile|windows phone|blackberry/.test(e) ? "mobile" : /android/.test(e) ? "tablet" : "desktop";
358
- }
359
- //#endregion
360
- //#region src/lib/tracking/consent.ts
361
- var P = null, F = !1, I = !1, L = !1;
362
- function Be(e) {
363
- P = e;
364
- }
365
- function Ve(e) {
366
- F = e;
367
- }
368
- function He(e) {
369
- L = e;
370
- }
371
- function R() {
372
- return L;
373
- }
374
- function z() {
375
- return typeof window < "u" && typeof window.__tcfapi == "function";
376
- }
377
- function B() {
378
- return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
379
- }
380
- function Ue() {
381
- return L ? !0 : P === null ? z() || B() : P;
382
- }
383
- function V() {
384
- return L ? !1 : !Ue() || F;
385
- }
386
- function We() {
387
- return L ? !1 : F ? !0 : P === !1 && !B();
388
- }
389
- function Ge() {
390
- if (I || !z()) return;
391
- I = !0;
392
- let e = window.__tcfapi;
393
- try {
394
- e("addEventListener", 2, (e, t) => {
395
- if (!(!t || !e)) {
396
- if (e.gdprApplies === !1) {
397
- B() || (F = !0);
398
- return;
399
- }
400
- if (e.eventStatus === "tcloaded" || e.eventStatus === "useractioncomplete") {
401
- let t = e.purpose?.consents;
402
- F = !!t && Object.values(t).some(Boolean);
403
- }
404
- }
405
- });
406
- } catch {}
407
- }
408
- //#endregion
409
- //#region src/lib/tracking/identity.ts
410
- var H = "micdrop_session_id", U = "micdrop_visitor_id", Ke = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
411
- function W(e) {
412
- return typeof e == "string" && Ke.test(e);
413
- }
414
- function G() {
415
- let e = typeof crypto < "u" ? crypto : void 0;
416
- if (e?.randomUUID) return e.randomUUID();
417
- let t = /* @__PURE__ */ new Uint8Array(16);
418
- if (e?.getRandomValues) e.getRandomValues(t);
419
- else for (let e = 0; e < 16; e++) t[e] = Math.floor(Math.random() * 256);
420
- t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128;
421
- let n = [];
422
- for (let e = 0; e < 16; e++) n.push(t[e].toString(16).padStart(2, "0"));
423
- 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]}`;
424
- }
425
- function qe() {
426
- let e = g(H);
427
- return e || (e = G(), _(H, e)), e;
428
- }
429
- function Je(e) {
430
- let t = ie(U);
431
- if (W(t)) return {
432
- id: t,
433
- createdAt: e,
434
- migrated: !0
435
- };
436
- if (t && typeof t == "object") {
437
- let { id: n, createdAt: r } = t;
438
- if (!W(n)) return null;
439
- let i = typeof r == "number" && Number.isFinite(r), a = i ? Math.min(r, e) : e;
440
- return {
441
- id: n,
442
- createdAt: a,
443
- migrated: !i || a !== r
444
- };
445
- }
446
- return null;
447
- }
448
- function K() {
449
- if (!V()) return null;
450
- let e = Date.now(), t = Je(e);
451
- if (t && e - t.createdAt < 34128e6) return t.migrated && h(U, {
452
- id: t.id,
453
- createdAt: t.createdAt
454
- }), t.id;
455
- let n = G();
456
- return h(U, {
457
- id: n,
458
- createdAt: e
459
- }), n;
460
- }
461
- //#endregion
462
- //#region src/lib/tracking/attribution-store.ts
463
- var Ye = "micdrop_attribution";
464
- function Xe(e, t) {
465
- if (!e || !t) return !1;
466
- try {
467
- let n = new URL(e).host, r = new URL(t).host;
468
- return !!n && !!r && n !== r;
469
- } catch {
470
- return !1;
471
- }
472
- }
473
- function Ze(e) {
474
- return je(e.utm) || Xe(e.referrer, e.pageUrl);
475
- }
476
- function Qe() {
477
- let e = g(Ye);
478
- return !e || !e.utm || typeof e.utm.utmSource != "string" ? null : e;
479
- }
480
- function $e(e = N()) {
481
- let t = Ze(e), n = Qe();
482
- !t && n || _(Ye, {
483
- utm: e.utm,
484
- referrer: e.referrer,
485
- marketing: t
486
- });
487
- }
488
- function q() {
489
- let e = Qe() ?? N();
490
- return {
491
- sessionId: qe(),
492
- visitorId: K(),
493
- utmSource: e.utm.utmSource,
494
- utmMedium: e.utm.utmMedium,
495
- utmCampaign: e.utm.utmCampaign,
496
- utmContent: e.utm.utmContent,
497
- utmTerm: e.utm.utmTerm,
498
- referrer: e.referrer || ""
499
- };
500
- }
501
- //#endregion
502
- //#region src/lib/tracking/beacon.ts
503
- var et = t("tracking"), tt = /* @__PURE__ */ new Set([
504
- "chunk_load_error",
505
- "type_error",
506
- "reference_error",
507
- "syntax_error",
508
- "range_error",
509
- "security_error",
510
- "network_error",
511
- "abort_error",
512
- "not_supported_error",
513
- "error"
514
- ]), nt = "other";
515
- function rt(e) {
516
- try {
517
- 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 ?? "") : "";
518
- if (t === "ChunkLoadError" || /dynamically imported module/i.test(n)) return "chunk_load_error";
519
- let r = t.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9_]/g, "");
520
- return tt.has(r) ? r : nt;
521
- } catch {
522
- return nt;
523
- }
524
- }
525
- var it = /* @__PURE__ */ new Set(["add_to_cart", "purchase"]), at = "micdrop_tracked_beacons", ot = 300;
526
- function st(e, t, n, r, i, a, o, s = "") {
527
- let c = n || `url:${o}`, l = [
528
- e,
529
- t ?? "",
530
- c,
531
- r,
532
- i,
533
- a
534
- ];
535
- return s && l.push(s), l.join(":");
536
- }
537
- function ct(e) {
538
- if (e == null || e === "") return null;
539
- let t = Number(e);
540
- return Number.isFinite(t) ? t : null;
541
- }
542
- function lt(e) {
543
- let t = g(at, []) ?? [];
544
- if (t.includes(e)) return !0;
545
- let n = [...t, e];
546
- return _(at, n.length > ot ? n.slice(-300) : n), !1;
547
- }
548
- async function J(e, { eventId: t = null, widgetId: n, venueId: r, error: i, cartId: a } = {}) {
549
- if (typeof window > "u" || R()) return;
550
- let o = N();
551
- if ($e(o), e === "link_click" && !je(o.utm)) return;
552
- let s = qe(), c = n === void 0 ? Ie() : n;
553
- if (!(it.has(e) || e === "checkout_started" && !a) && lt(st(e, t, c, o.utm.utmSource, o.utm.utmCampaign, s, o.pageUrl, i ? `${i.stage}:${i.errName}` : a ? `cart:${a}` : ""))) return;
554
- let l = r === void 0 ? Le() : r, u = V(), d = {
555
- eventType: e,
556
- eventId: ct(t),
557
- venueId: ct(l),
558
- widgetId: c,
559
- utmSource: o.utm.utmSource,
560
- utmMedium: o.utm.utmMedium,
561
- utmCampaign: o.utm.utmCampaign,
562
- utmContent: o.utm.utmContent,
563
- utmTerm: o.utm.utmTerm,
564
- sessionId: s,
565
- visitorId: K(),
566
- deviceType: ze(),
567
- referrer: u ? o.referrer : "",
568
- pageUrl: u ? o.pageUrl : "",
569
- ...i ? {
570
- errName: i.errName,
571
- stage: i.stage
572
- } : {}
573
- };
574
- try {
575
- await fetch(`${E()}/track/pageview`, {
576
- method: "POST",
577
- headers: { "Content-Type": "application/json" },
578
- body: JSON.stringify(d),
579
- keepalive: !0
580
- });
581
- } catch (t) {
582
- et.error(`Beacon '${e}' failed:`, t);
583
- }
584
- }
585
- var ut = (e, t) => J("link_click", {
586
- widgetId: e,
587
- venueId: t
588
- }), dt = (e, t) => J("widget_load", {
589
- widgetId: e,
590
- venueId: t
591
- }), ft = (e, t) => J("list_view", {
592
- widgetId: e,
593
- venueId: t
594
- }), pt = (e, t, n) => J("event_view", {
595
- eventId: e,
596
- widgetId: t,
597
- venueId: n
598
- }), mt = (e, t, n) => J("add_to_cart", {
599
- eventId: e,
600
- widgetId: t,
601
- venueId: n
602
- }), ht = (e, t, n, r) => J("checkout_started", {
603
- eventId: e,
604
- widgetId: t,
605
- venueId: n,
606
- cartId: r
607
- }), gt = (e, t, n) => J("price_unavailable", {
608
- eventId: e,
609
- widgetId: t,
610
- venueId: n
611
- }), _t = (e, t, n) => J("purchase", {
612
- eventId: e,
613
- widgetId: t,
614
- venueId: n
615
- });
616
- function vt(e, t, n, r) {
617
- try {
618
- J("widget_error", {
619
- widgetId: n,
620
- venueId: r,
621
- error: {
622
- errName: rt(e),
623
- stage: t
624
- }
625
- }).catch(() => {});
626
- } catch {}
627
- }
628
- //#endregion
629
- //#region src/lib/api/transformers/cart.ts
630
- function yt(e) {
631
- let t = e ?? {};
632
- return {
633
- ticketID: Number(t.TicketID ?? t.ticketID ?? 0),
634
- quantity: Number(t.Quantity ?? t.quantity ?? 0),
635
- priceAtReservation: Number(t.PriceAtReservation ?? t.priceAtReservation ?? 0),
636
- status: String(t.Status ?? t.status ?? "")
637
- };
638
- }
639
- function bt(e) {
640
- let t = e ?? {}, n = t.Amount ?? t.amount, a = Number(n);
641
- return {
642
- giftCardId: Number(t.GiftCardID ?? t.giftCardId ?? 0),
643
- maskedCode: String(t.MaskedCode ?? t.maskedCode ?? ""),
644
- amount: n == null || !Number.isFinite(a) ? null : r(i(a))
645
- };
646
- }
647
- function xt(e) {
648
- let t = e ?? {};
649
- return {
650
- uuid: t.UUID ?? t.uuid ?? "",
651
- eventID: Number(t.EventID ?? t.eventID ?? 0),
652
- status: t.Status ?? t.status ?? "",
653
- expiresAt: t.ExpiresAt ?? t.expiresAt ?? "",
654
- reservations: (t.Reservations ?? t.reservations ?? []).map(yt),
655
- giftCards: (t.GiftCards ?? t.giftCards ?? []).map(bt)
656
- };
657
- }
658
- //#endregion
659
- //#region src/lib/i18n/localeLoader.svelte.js
660
- var Y = c.state(0);
661
- function St() {
662
- return c.get(Y);
663
- }
664
- function Ct() {
665
- c.set(Y, c.get(Y) + 1);
666
- }
667
- //#endregion
668
- //#region src/lib/i18n/createI18n.js
669
- function X() {
670
- return typeof navigator > "u" ? null : navigator.language || navigator.userLanguage || null;
671
- }
672
- function wt({ defaults: e, locales: t = {}, loaders: r = {} }) {
673
- let i = t.en ?? e, a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
674
- function s(e) {
675
- return t[e] ? t[e] : a.has(e) ? a.get(e) : null;
676
- }
677
- function c(e) {
678
- let t = s(e);
679
- if (t) return Promise.resolve(t);
680
- if (o.has(e)) return o.get(e);
681
- let n = r[e];
682
- if (!n) return Promise.resolve(null);
683
- let i = Promise.resolve().then(n).then((t) => (a.set(e, t), Ct(), t));
684
- return i.catch(() => o.delete(e)), o.set(e, i), i;
685
- }
686
- function l(e) {
687
- if (St(), !e || typeof e != "string") return {
688
- labels: i,
689
- locale: "en"
690
- };
691
- let t = e.toLowerCase(), n = s(t);
692
- if (n) return {
693
- labels: n,
694
- locale: t
695
- };
696
- if (r[t]) return c(t), {
697
- labels: i,
698
- locale: "en"
699
- };
700
- let a = t.split("-")[0], o = s(a);
701
- return o ? {
702
- labels: o,
703
- locale: a
704
- } : (r[a] && c(a), {
705
- labels: i,
706
- locale: "en"
707
- });
708
- }
709
- function u(t = void 0, r = {}) {
710
- let { labels: i } = l(t || X() || "en");
711
- return n(n(e, i), r);
712
- }
713
- function d(e) {
714
- if (!e || typeof e != "string") return Promise.resolve(i);
715
- let t = e.toLowerCase();
716
- if (s(t) || r[t]) return c(t);
717
- let n = t.split("-")[0];
718
- return s(n) || r[n] ? c(n) : Promise.resolve(null);
719
- }
720
- function f() {
721
- return Array.from(/* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(r)]));
722
- }
723
- return {
724
- resolveLocale: l,
725
- getLabelsForLocale: u,
726
- listLocales: f,
727
- loadLocale: d
728
- };
729
- }
730
- //#endregion
731
- //#region src/lib/i18n/localeSpec.js
732
- var Z = [
733
- [
734
- "es",
735
- "es",
736
- "es"
737
- ],
738
- [
739
- "fr",
740
- "fr",
741
- "fr"
742
- ],
743
- [
744
- "pt-br",
745
- "pt-br",
746
- "pt_br"
747
- ],
748
- [
749
- "pt",
750
- "pt-br",
751
- "pt_br"
752
- ],
753
- [
754
- "de",
755
- "de",
756
- "de"
757
- ],
758
- [
759
- "ja",
760
- "ja",
761
- "ja"
762
- ],
763
- [
764
- "zh",
765
- "zh",
766
- "zh"
767
- ],
768
- [
769
- "ko",
770
- "ko",
771
- "ko"
772
- ],
773
- [
774
- "it",
775
- "it",
776
- "it"
777
- ],
778
- [
779
- "nl",
780
- "nl",
781
- "nl"
782
- ],
783
- [
784
- "tr",
785
- "tr",
786
- "tr"
787
- ],
788
- [
789
- "id",
790
- "id",
791
- "id"
792
- ],
793
- [
794
- "pl",
795
- "pl",
796
- "pl"
797
- ]
798
- ];
799
- Array.from(new Set(Z.map(([, e]) => e)));
800
- //#endregion
801
- //#region src/lib/i18n/buyerLocale.ts
802
- var Tt = new Map([["en", "en"], ...Z.map(([e]) => [e, e === "pt" || e === "pt-br" ? "pt-BR" : e])]);
803
- function Q(e) {
804
- let t = e || X();
805
- if (!t || typeof t != "string") return;
806
- let n = t.toLowerCase();
807
- return Tt.get(n) ?? Tt.get(n.split("-")[0]);
808
- }
809
- //#endregion
810
- //#region src/lib/api/orders.ts
811
- var $ = t("VC");
812
- async function Et(e, t, n, r, i, a) {
813
- let o = Q(i);
814
- return A(`${D()}/cart/${e}/payment-intent`, {
815
- productQuantities: t,
816
- ...n && Object.keys(n).length > 0 ? { donationAmounts: n } : {},
817
- ...r ? {
818
- firstName: r.firstName,
819
- lastName: r.lastName,
820
- email: r.email,
821
- phone: r.phone ?? "",
822
- questionAnswer: r.questionAnswer ?? "",
823
- mailingList: r.mailingList ?? !1
824
- } : {},
825
- attribution: q(),
826
- ...o ? { locale: o } : {}
827
- }, { widgetKey: a?.widgetKey });
828
- }
829
- async function Dt(e, t, n, r, i, a) {
830
- try {
831
- let o = await Et(e, t, n, r, i, a);
832
- if (!o.success) throw $.error("Payment intent creation failed:", o.error), new u(o.error || "Failed to create payment intent", o.statusCode ?? 0, {
833
- endpoint: `${D()}/cart/${e}/payment-intent`,
834
- method: "POST"
835
- });
836
- return $.debug("Payment intent created:", o.data), o.data;
837
- } catch (e) {
838
- return $.error("createPaymentIntent error:", e), null;
839
- }
840
- }
841
- var Ot = "VALIDATION_FAILED";
842
- async function kt(e, t, n, r, i, a) {
843
- let o;
844
- try {
845
- o = await Et(e, t, n, r, i, a);
846
- } catch (e) {
847
- return $.error("submitCheckoutAnswers error:", e), { refusal: null };
848
- }
849
- return o.success ? {
850
- refusal: null,
851
- clientSecret: o.data?.client_secret
852
- } : o.errorCode === Ot && o.error ? ($.debug("Checkout answers refused:", o.error), { refusal: o.error }) : ($.error("Checkout answers call failed:", o.error), { refusal: null });
853
- }
854
- async function At(e, t, n) {
855
- if (!e) return null;
856
- try {
857
- let r = await k(`${D()}/cart/${e}`, { widgetKey: n?.widgetKey });
858
- if (!r.success) return null;
859
- let { uuid: i, eventID: a, status: o, expiresAt: s, reservations: c, giftCards: l } = xt(r.data);
860
- return o !== "reserved" && o !== "active" || t !== void 0 && a !== Number(t) ? null : {
861
- uuid: i,
862
- eventID: a,
863
- status: o,
864
- expiresAt: s,
865
- reservations: c,
866
- giftCards: l
867
- };
868
- } catch (e) {
869
- return $.error("getCartByUUID error:", e), null;
870
- }
871
- }
872
- async function jt(e, t, n) {
873
- try {
874
- let r = {};
875
- for (let [e, n] of Object.entries(t)) {
876
- let t = typeof e == "number" ? e : parseInt(e, 10);
877
- !Number.isNaN(t) && n > 0 && (r[t] = n);
878
- }
879
- let i = {};
880
- if (n) for (let [e, t] of Object.entries(n)) {
881
- let n = typeof e == "number" ? e : parseInt(e, 10);
882
- !Number.isNaN(n) && t > 0 && (i[n] = t);
883
- }
884
- let a = await fetch(`${D()}/cart/${e}`, {
885
- method: "PUT",
886
- headers: { "Content-Type": "application/json" },
887
- body: JSON.stringify({
888
- quantities: r,
889
- ...Object.keys(i).length > 0 ? { donationAmounts: i } : {}
890
- })
891
- });
892
- if (!a.ok) {
893
- let e = await a.json().catch(() => ({}));
894
- return $.error("Cart update failed:", e), !1;
895
- }
896
- return !0;
897
- } catch (e) {
898
- return $.error("updateCartQuantities error:", e), !1;
899
- }
900
- }
901
- async function Mt(e, t = "", n) {
902
- try {
903
- let r = await A(`${E()}/orders/${e}/refund`, { message: t }, { widgetKey: n?.widgetKey });
904
- return r.success ? { success: !0 } : ($.error("Refund request failed:", r.error), {
905
- success: !1,
906
- error: r.error || "Failed to submit refund request"
907
- });
908
- } catch (e) {
909
- return $.error("requestOrderRefund error:", e), {
910
- success: !1,
911
- error: "Network error submitting refund request"
912
- };
913
- }
914
- }
915
- async function Nt(e, t, n, r) {
916
- let i = Q(n);
917
- try {
918
- let n = await A(`${D()}/validatePaymentIntent/${e}`, {
919
- ...t,
920
- attribution: q(),
921
- ...i ? { locale: i } : {}
922
- }, { widgetKey: r?.widgetKey });
923
- if (!n.success) return $.error("Payment validation failed:", n.error), {
924
- success: !1,
925
- status: "failed",
926
- error: n.error || "Payment validation failed"
927
- };
928
- let a = n.data;
929
- return a.eventCanceled || a.eventPostponed ? {
930
- success: !1,
931
- status: "failed",
932
- eventCanceled: a.eventCanceled,
933
- eventPostponed: a.eventPostponed
934
- } : {
935
- success: !0,
936
- status: a.status || "Payment succeeded",
937
- orderUUID: a.orderUUID || a.uuid
938
- };
939
- } catch (e) {
940
- return $.error("validatePaymentIntent error:", e), null;
941
- }
942
- }
943
- async function Pt(e, t) {
944
- try {
945
- let n = await A(`${E()}/orders/extend-session`, { orderUuid: e }, { widgetKey: t?.widgetKey });
946
- if (!n.success) return {
947
- success: !1,
948
- error: n.error || "Failed to extend session",
949
- statusCode: n.statusCode
950
- };
951
- let r = n.data;
952
- return {
953
- success: !0,
954
- newExpiryTime: r.newExpiryTime,
955
- remainingExtensions: r.remainingExtensions
956
- };
957
- } catch (e) {
958
- return $.error("Error extending checkout session:", e), {
959
- success: !1,
960
- error: "Network error extending session"
961
- };
962
- }
963
- }
964
- async function Ft(e, t) {
965
- try {
966
- let n = await k(`${E()}/orders/session/${e}`, { widgetKey: t?.widgetKey });
967
- if (!n.success) return {
968
- error: n.error || "No active session found",
969
- notFound: n.statusCode === 404
970
- };
971
- let r = n.data;
972
- return {
973
- expiresAt: r.expiresAt,
974
- extensionCount: r.extensionCount,
975
- remainingExtensions: r.remainingExtensions,
976
- canExtend: r.canExtend,
977
- reservationCount: r.reservationCount,
978
- eventStatus: r.eventStatus
979
- };
980
- } catch (e) {
981
- return $.error("Error getting session status:", e), { error: "Network error getting session status" };
982
- }
983
- }
984
- //#endregion
985
- //#region src/lib/widget-key-context.ts
986
- var It = Symbol("micdrop-widget-key");
987
- function Lt() {
988
- return l(It) || void 0;
989
- }
990
- //#endregion
991
- export { ie as $, Ge as A, D as B, q as C, Ve as D, R as E, Se as F, w as G, me as H, k as I, y as J, pe as K, A as L, Pe as M, De as N, Be as O, Oe as P, ce as Q, ye as R, dt as S, We as T, we as U, E as V, Ce as W, le as X, fe as Y, de as Z, ut as _, At as a, u as at, _t as b, kt as c, Q as d, g as et, wt as f, pt as g, ht as h, Pt as i, _ as it, Fe as j, He as k, jt as l, mt as m, Lt as n, oe as nt, Ft as o, X as p, ue as q, Dt as r, h as rt, Mt as s, It as t, ae as tt, Nt as u, ft as v, K as w, vt as x, gt as y, be as z };