@getmicdrop/venue-calendar 4.2.2 → 4.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/{ArrowLeftIcon-DQ-h5PcH.js → ArrowLeftIcon-BGd-X_Qm.js} +1 -1
  2. package/dist/{Badge-M6qZyfTF.js → Badge-Bv_MT-Vt.js} +10 -9
  3. package/dist/BlockPlaceholder-Wl39H9Z7.js +52 -0
  4. package/dist/Button-C4uFgl7L.js +2141 -0
  5. package/dist/{Calendar-BX22svpz.js → Calendar-DafPX3k_.js} +292 -290
  6. package/dist/CalendarFoundryView-COkX5oQx.js +22292 -0
  7. package/dist/{CalendarIcon-DR197Ioz.js → CalendarIcon-CeQ1_FWq.js} +1 -1
  8. package/dist/{CartView-B2VtVvZM.js → CartView-nvVA8vWk.js} +651 -644
  9. package/dist/Checkout-BphC7gak.js +1807 -0
  10. package/dist/{Checkout-BTqfjvDp.js → Checkout-Ow2x8cNL.js} +92 -91
  11. package/dist/{CheckoutTimer-Cng5tcGO.js → CheckoutTimer-DJlt5M2b.js} +5 -5
  12. package/dist/{ChevronDownIcon-C_RiK-BW.js → ChevronDownIcon-y7oNyepp.js} +1 -1
  13. package/dist/{ClockIcon-BOJENuPq.js → ClockIcon-BGTz8dak.js} +1 -1
  14. package/dist/{CloseIcon-Rc7tpX2a.js → CloseIcon-C9SHeORJ.js} +1 -1
  15. package/dist/CloseOutline-qpVa62mu.js +13 -0
  16. package/dist/{CollectionView-A1zP8yz5.js → CollectionView-BAIlcuqO.js} +13 -12
  17. package/dist/CropImage-B0tj2_uN.js +404 -0
  18. package/dist/Event-CTaXLze_.js +3034 -0
  19. package/dist/{EventPage-hxrPKPhm.js → EventPage-LuA-aEYZ.js} +168 -167
  20. package/dist/{Heading-B7VYbbfJ.js → Heading-Dfo3bjyn.js} +4 -3
  21. package/dist/Image-B3cEndLZ.js +87 -0
  22. package/dist/Input-iXqece97.js +487 -0
  23. package/dist/{MailIcon-rxvK4Wga.js → MailIcon-xtNog-7h.js} +1 -1
  24. package/dist/{Modal-BVD2O8hd.js → Modal-CqzRblrN.js} +2 -2
  25. package/dist/{ModalFooter-CfboEe1M.js → ModalFooter-DHhBLDbO.js} +59 -57
  26. package/dist/{PasswordInput-BAlq2j97.js → PasswordInput-Czm5Pe_p.js} +4 -4
  27. package/dist/{ScarcityBadge-h7ygRD_C.js → ScarcityBadge-CdgQmt1D.js} +4 -4
  28. package/dist/{SeriesPage-D-cwUNZM.js → SeriesPage-DfCyV1ka.js} +5 -5
  29. package/dist/{Spinner-ChTN7t75.js → Spinner-BwiDys7C.js} +3 -3
  30. package/dist/{Success-CIAX5zmz.js → Success-CsYxRkLE.js} +81 -80
  31. package/dist/{TagIcon-V0qMu9wS.js → TagIcon-DJSTnymB.js} +1 -1
  32. package/dist/{ViewTicketsEmbed-By-IcUJZ.js → ViewTicketsEmbed-CKucKt-W.js} +67 -66
  33. package/dist/{WarningCircleIcon-D32h6VDr.js → WarningCircleIcon-BKSQbu7p.js} +1 -1
  34. package/dist/{WarningTriIcon-BPDrCiKU.js → WarningTriIcon-DgwTwlxe.js} +1 -1
  35. package/dist/{__SKIP_PATHS__-DirqE5Xe.js → __SKIP_PATHS__-BTbGfN80.js} +1 -1
  36. package/dist/api/api.cjs +1 -1
  37. package/dist/api/api.mjs +187 -181
  38. package/dist/api/client.d.ts +16 -0
  39. package/dist/api/types.d.ts +528 -528
  40. package/dist/{browser-25hnscei.js → browser-Um8Y6K99.js} +7 -7
  41. package/dist/{colors-5ifWyP6H.js → colors-DeJAzg_q.js} +60 -59
  42. package/dist/{constants-Dcj3kgZE.js → constants-OTS1wmXZ.js} +76 -73
  43. package/dist/{copyToClipboard-CNxFW3ni.js → copyToClipboard-CRDdh3r8.js} +1 -1
  44. package/dist/{createI18n-08XGDh1_.js → createI18n-DBUVdZra.js} +1 -1
  45. package/dist/{event-Cp5D4ctZ.js → event-BrptLro8.js} +1 -1
  46. package/dist/{event-transform-DSuEpMxr.js → event-transform-BaJ7M1DL.js} +4 -4
  47. package/dist/{eventStatusStream-CIZVH5Lp.js → eventStatusStream-sq6uPnMe.js} +6 -6
  48. package/dist/{allowlist-BiUmz2AF.js → href-DJeJpcO9.js} +21 -4
  49. package/dist/{i18n-CEeBd5Hi.js → i18n-GzfxX0Ad.js} +11 -11
  50. package/dist/imageOptimizer-CB3wKJU8.js +47 -0
  51. package/dist/{labels-CtyfffZI.js → labels-CqodQmuY.js} +1 -1
  52. package/dist/{modalManager.svelte-BH-QJm9M.js → modalManager.svelte-OSPs3dSW.js} +2 -2
  53. package/dist/{order-totals-hcdvbJvw.js → order-totals-BAKL9cOB.js} +15 -13
  54. package/dist/{orders-tzTe2hNM.js → orders-NZP81zYT.js} +210 -198
  55. package/dist/{Input-W-QE9nWi.js → phoneUtils-BJeAIGYo.js} +694 -1132
  56. package/dist/{pixels-7kl8Fcjl.js → pixels-BBruZizp.js} +8 -7
  57. package/dist/{promo-BrMcoTYh.js → promo-DtLZRskK.js} +3 -3
  58. package/dist/{serverTotals-CpRaEe9K.js → serverTotals-BO126TTd.js} +1 -1
  59. package/dist/{shareCopyFeedback.svelte-DsyhrfiP.js → shareCopyFeedback.svelte-BRInK1hH.js} +25 -25
  60. package/dist/{showcase-state-options-B2XfybZq.js → showcase-state-options-BoJxiEsg.js} +1 -1
  61. package/dist/sortable.esm--ZtTTTPp.js +1451 -0
  62. package/dist/timezones-C5l0SSHK.js +2030 -0
  63. package/dist/{to-event-card-props-VPne8W4I.js → to-event-card-props-CO3aPBdH.js} +24 -23
  64. package/dist/{utils-DJVlBMbw.js → utils-C8GgxJMv.js} +30 -30
  65. package/dist/venue-calendar.css +1 -1
  66. package/dist/venue-calendar.es.js +1291 -1151
  67. package/dist/venue-calendar.iife.js +63 -62
  68. package/dist/venue-calendar.umd.js +60 -59
  69. package/dist/z-index-B0Vk_Mp1.js +27 -0
  70. package/package.json +220 -220
  71. package/dist/BlockPlaceholder-IOcqxTx2.js +0 -62
  72. package/dist/CalendarFoundryView-Ct39xn0Q.js +0 -23561
  73. package/dist/Checkout-CXcjQfbc.js +0 -1805
  74. package/dist/Event-C_0lUZvV.js +0 -3040
  75. package/dist/Image-DBJAfLYe.js +0 -81
  76. package/dist/cancel-Cq2Q8qW7.js +0 -59
  77. package/dist/timezones-Cq1mLtfM.js +0 -4170
  78. /package/dist/locales/{4.2.2 → 4.2.4}/flow/de.js +0 -0
  79. /package/dist/locales/{4.2.2 → 4.2.4}/flow/es.js +0 -0
  80. /package/dist/locales/{4.2.2 → 4.2.4}/flow/fr.js +0 -0
  81. /package/dist/locales/{4.2.2 → 4.2.4}/flow/id.js +0 -0
  82. /package/dist/locales/{4.2.2 → 4.2.4}/flow/it.js +0 -0
  83. /package/dist/locales/{4.2.2 → 4.2.4}/flow/ja.js +0 -0
  84. /package/dist/locales/{4.2.2 → 4.2.4}/flow/ko.js +0 -0
  85. /package/dist/locales/{4.2.2 → 4.2.4}/flow/nl.js +0 -0
  86. /package/dist/locales/{4.2.2 → 4.2.4}/flow/pl.js +0 -0
  87. /package/dist/locales/{4.2.2 → 4.2.4}/flow/pt-br.js +0 -0
  88. /package/dist/locales/{4.2.2 → 4.2.4}/flow/tr.js +0 -0
  89. /package/dist/locales/{4.2.2 → 4.2.4}/flow/zh.js +0 -0
  90. /package/dist/locales/{4.2.2 → 4.2.4}/main/de.js +0 -0
  91. /package/dist/locales/{4.2.2 → 4.2.4}/main/es.js +0 -0
  92. /package/dist/locales/{4.2.2 → 4.2.4}/main/fr.js +0 -0
  93. /package/dist/locales/{4.2.2 → 4.2.4}/main/id.js +0 -0
  94. /package/dist/locales/{4.2.2 → 4.2.4}/main/it.js +0 -0
  95. /package/dist/locales/{4.2.2 → 4.2.4}/main/ja.js +0 -0
  96. /package/dist/locales/{4.2.2 → 4.2.4}/main/ko.js +0 -0
  97. /package/dist/locales/{4.2.2 → 4.2.4}/main/nl.js +0 -0
  98. /package/dist/locales/{4.2.2 → 4.2.4}/main/pl.js +0 -0
  99. /package/dist/locales/{4.2.2 → 4.2.4}/main/pt-br.js +0 -0
  100. /package/dist/locales/{4.2.2 → 4.2.4}/main/tr.js +0 -0
  101. /package/dist/locales/{4.2.2 → 4.2.4}/main/zh.js +0 -0
@@ -1,6 +1,7 @@
1
- import { P as e, h as t, m as n, nt as r, tt as i } from "./timezones-Cq1mLtfM.js";
1
+ import { S as e, x as t } from "./Button-C4uFgl7L.js";
2
+ import { a as n, i as r, w as i } from "./timezones-C5l0SSHK.js";
2
3
  //#region node_modules/@getmicdrop/svelte-components/dist/errors/classes/ApiError.js
3
- var a = class r extends e {
4
+ var a = class e extends i {
4
5
  constructor(e, t, n = {}) {
5
6
  super(e, `API_${t}`, {
6
7
  status: t,
@@ -10,22 +11,22 @@ var a = class r extends e {
10
11
  }), this.name = "ApiError", this.endpoint = n.endpoint, this.method = n.method, this.requestId = n.requestId;
11
12
  }
12
13
  getUserMessage(e) {
13
- return t(this.status, this.message, e);
14
+ return n(this.status, this.message, e);
14
15
  }
15
16
  isRetryable() {
16
17
  return this.status >= 500 || this.status === 429;
17
18
  }
18
- static async fromResponse(e, t, i) {
19
- let a = `Request failed with status ${e.status}`, o;
19
+ static async fromResponse(t, n, i) {
20
+ let a = `Request failed with status ${t.status}`, o;
20
21
  try {
21
- let t = await e.json();
22
- a = n(t, a), o = t.details || t;
22
+ let e = await t.json();
23
+ a = r(e, a), o = e.details || e;
23
24
  } catch {}
24
- return new r(a, e.status, {
25
- endpoint: t,
25
+ return new e(a, t.status, {
26
+ endpoint: n,
26
27
  method: i,
27
28
  details: o,
28
- requestId: e.headers.get("x-request-id") || void 0
29
+ requestId: t.headers.get("x-request-id") || void 0
29
30
  });
30
31
  }
31
32
  };
@@ -57,12 +58,12 @@ function c(e, t, n) {
57
58
  }
58
59
  return s(r, n);
59
60
  }
60
- function l(e, t, n) {
61
- if (!e) return !1;
61
+ function l(t, n, r) {
62
+ if (!t) return !1;
62
63
  try {
63
- return e.setItem(t, JSON.stringify(n)), !0;
64
- } catch (e) {
65
- return r.warn(`storage: failed to write "${t}"`, e), !1;
64
+ return t.setItem(n, JSON.stringify(r)), !0;
65
+ } catch (t) {
66
+ return e.warn(`storage: failed to write "${n}"`, t), !1;
66
67
  }
67
68
  }
68
69
  function u(e, t) {
@@ -76,63 +77,74 @@ function d(e, t, n) {
76
77
  function f(e, t, n) {
77
78
  return l(o(e), t, n);
78
79
  }
79
- function ee(e, t) {
80
+ function p(e, t) {
80
81
  u(o(e), t);
81
82
  }
82
- function te(e, t = null) {
83
+ function m(e, t = null) {
83
84
  return d("local", e, t);
84
85
  }
85
- function p(e, t) {
86
+ function h(e, t) {
86
87
  return f("local", e, t);
87
88
  }
88
- function ne(e) {
89
- ee("local", e);
89
+ function ee(e) {
90
+ p("local", e);
90
91
  }
91
- function m(e, t = null) {
92
+ function g(e, t = null) {
92
93
  return d("session", e, t);
93
94
  }
94
- function h(e, t) {
95
+ function _(e, t) {
95
96
  return f("session", e, t);
96
97
  }
97
- function re(e) {
98
- ee("session", e);
98
+ function te(e) {
99
+ p("session", e);
99
100
  }
100
101
  //#endregion
101
102
  //#region src/lib/config.js
102
- var ie = i("VC:config", { enabled: !0 }), g = null;
103
- function ae(e) {
103
+ var ne = t("VC:config", { enabled: !0 }), v = null;
104
+ function re(e) {
104
105
  let t = e || null;
105
- g && t && t !== g && ie.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."), g = t;
106
+ v && t && t !== v && ne.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;
106
107
  }
107
- function _() {
108
- if (g) return g;
108
+ function y() {
109
+ if (v) return v;
109
110
  }
110
- var v = null;
111
- function oe(e) {
112
- v = typeof e == "string" && e.trim() ? e.trim() : null;
111
+ var b = null;
112
+ function ie(e) {
113
+ b = typeof e == "string" && e.trim() ? e.trim() : null;
113
114
  }
114
- function se() {
115
- return (v || he().baseUrl || "").replace(/\/+$/, "");
115
+ function ae() {
116
+ return (b || E().baseUrl || "").replace(/\/+$/, "");
116
117
  }
117
- function ce(e) {}
118
- var y = {
118
+ function oe(e) {}
119
+ var x = {
119
120
  postMessageOnSuccess: !1,
120
121
  postMessageTargetOrigin: null
121
122
  };
122
- function le(e = {}) {
123
- y = {
124
- ...y,
123
+ function se(e = {}) {
124
+ x = {
125
+ ...x,
125
126
  ...e
126
127
  };
127
128
  }
128
- function ue() {
129
- return { ...y };
129
+ function ce() {
130
+ return { ...x };
130
131
  }
131
132
  //#endregion
132
133
  //#region src/lib/api/client.ts
133
- var b = i("VC"), de = "ABORTED";
134
- function x(e, t) {
135
- let n = t || _();
134
+ var S = t("VC"), C = /* @__PURE__ */ new Set();
135
+ function le(e) {
136
+ return C.add(e), () => {
137
+ C.delete(e);
138
+ };
139
+ }
140
+ function ue(e) {
141
+ if (e) for (let t of C) try {
142
+ t(e);
143
+ } catch {}
144
+ }
145
+ var de = "ABORTED";
146
+ function w(e, t) {
147
+ let n = t || y();
136
148
  return n ? {
137
149
  ...e,
138
150
  "X-Widget-Key": n
@@ -153,30 +165,30 @@ var pe = class extends Error {
153
165
  constructor(e, t, n) {
154
166
  super(e), this.name = "ApiRequestError", this.code = t, this.statusCode = n;
155
167
  }
156
- }, S = {
168
+ }, T = {
157
169
  baseUrl: "https://get-micdrop.com",
158
170
  timeout: 3e4,
159
171
  retries: 2,
160
172
  retryDelay: 500,
161
- onError: (e) => b.error("API Error:", e)
173
+ onError: (e) => S.error("API Error:", e)
162
174
  };
163
175
  function me(e) {
164
- S = {
165
- ...S,
176
+ T = {
177
+ ...T,
166
178
  ...e
167
179
  };
168
180
  }
169
- function he() {
170
- return { ...S };
181
+ function E() {
182
+ return { ...T };
171
183
  }
172
- function C() {
173
- return `${S.baseUrl}/api/v2/public`;
184
+ function D() {
185
+ return `${T.baseUrl}/api/v2/public`;
174
186
  }
175
- function w() {
176
- return `${S.baseUrl}/api/orders/v2/public`;
187
+ function O() {
188
+ return `${T.baseUrl}/api/orders/v2/public`;
177
189
  }
178
- var ge = (e) => new Promise((t) => setTimeout(t, e));
179
- async function T(e, t, n) {
190
+ var he = (e) => new Promise((t) => setTimeout(t, e));
191
+ async function k(e, t, n) {
180
192
  let r = (t.method || "GET").toUpperCase(), i = r === "GET" || r === "HEAD" ? n.retries + 1 : 1, a;
181
193
  for (let r = 1; r <= i; r++) {
182
194
  let o = new AbortController(), s = setTimeout(() => o.abort(), n.timeout), c = t.signal, l;
@@ -193,36 +205,36 @@ async function T(e, t, n) {
193
205
  } finally {
194
206
  clearTimeout(s), c && l && c.removeEventListener("abort", l);
195
207
  }
196
- r < i && await ge(n.retryDelay * 2 ** (r - 1));
208
+ r < i && await he(n.retryDelay * 2 ** (r - 1));
197
209
  }
198
210
  throw a;
199
211
  }
200
- async function E(e, t) {
201
- return O("GET", e, void 0, t);
212
+ async function A(e, t) {
213
+ return M("GET", e, void 0, t);
202
214
  }
203
- async function D(e, t, n) {
204
- return O("POST", e, t, n);
215
+ async function j(e, t, n) {
216
+ return M("POST", e, t, n);
205
217
  }
206
- async function _e(e, t) {
207
- return O("DELETE", e, void 0, t);
218
+ async function ge(e, t) {
219
+ return M("DELETE", e, void 0, t);
208
220
  }
209
- async function O(e, t, n, r) {
210
- let i = t.startsWith("http") || t.startsWith("/api/") ? t : `${C()}${t}`, { widgetKey: a, suppressOnError: o, headers: s, ...c } = r ?? {}, l = (e) => {
211
- o || S.onError(e);
221
+ async function M(e, t, n, r) {
222
+ let i = t.startsWith("http") || t.startsWith("/api/") ? t : `${D()}${t}`, { widgetKey: a, suppressOnError: o, headers: s, ...c } = r ?? {}, l = (e) => {
223
+ o || T.onError(e);
212
224
  };
213
225
  try {
214
- let t = await T(i, {
226
+ let t = await k(i, {
215
227
  method: e,
216
- headers: x({
228
+ headers: w({
217
229
  "Content-Type": "application/json",
218
230
  ...s
219
231
  }, a),
220
232
  body: n === void 0 ? void 0 : JSON.stringify(n),
221
233
  ...c
222
- }, S);
234
+ }, T);
223
235
  if (!t.ok) {
224
236
  let { message: e, code: n } = fe(await t.json().catch(() => ({})), t.status);
225
- return l(new pe(e, n, t.status)), {
237
+ return l(new pe(e, n, t.status)), ue(n), {
226
238
  success: !1,
227
239
  error: e,
228
240
  errorCode: n,
@@ -248,78 +260,78 @@ async function O(e, t, n, r) {
248
260
  };
249
261
  }
250
262
  }
251
- async function ve(e, t) {
252
- return D(`${C()}/tax-preview`, e, {
263
+ async function _e(e, t) {
264
+ return j(`${D()}/tax-preview`, e, {
253
265
  signal: t?.signal,
254
266
  suppressOnError: t?.suppressOnError ?? !0
255
267
  });
256
268
  }
257
- async function ye(e, t) {
269
+ async function ve(e, t) {
258
270
  try {
259
- let n = e.startsWith(S.baseUrl), { widgetKey: r, ...i } = t ?? {}, a = await T(e, {
271
+ let n = e.startsWith(T.baseUrl), { widgetKey: r, ...i } = t ?? {}, a = await k(e, {
260
272
  ...i,
261
- ...n ? { headers: x(i.headers, r) } : {}
262
- }, S);
273
+ ...n ? { headers: w(i.headers, r) } : {}
274
+ }, T);
263
275
  if (!a.ok) {
264
276
  let e = await a.json().catch(() => ({}));
265
- return b.error(`API request failed: ${a.status}`, e), null;
277
+ return S.error(`API request failed: ${a.status}`, e), null;
266
278
  }
267
279
  return a.json();
268
280
  } catch (e) {
269
- return b.error("API request error:", e), null;
281
+ return S.error("API request error:", e), null;
270
282
  }
271
283
  }
272
284
  //#endregion
273
285
  //#region src/lib/tracking/normalize.ts
274
- var k = [
286
+ var N = [
275
287
  "utmSource",
276
288
  "utmMedium",
277
289
  "utmCampaign",
278
290
  "utmContent",
279
291
  "utmTerm"
280
- ], be = {
292
+ ], ye = {
281
293
  utmSource: "utm_source",
282
294
  utmMedium: "utm_medium",
283
295
  utmCampaign: "utm_campaign",
284
296
  utmContent: "utm_content",
285
297
  utmTerm: "utm_term"
286
- }, xe = "direct";
287
- function A(e) {
298
+ }, P = "direct";
299
+ function F(e) {
288
300
  return e ? e.trim().toLowerCase().replace(/\s+/g, "_") : "";
289
301
  }
290
- function Se(e) {
302
+ function be(e) {
291
303
  let t = {};
292
- for (let n of k) t[n] = A(e[n]);
293
- return t.utmSource ||= xe, t;
304
+ for (let n of N) t[n] = F(e[n]);
305
+ return t.utmSource ||= P, t;
294
306
  }
295
- function Ce(e) {
307
+ function xe(e) {
296
308
  let t = {};
297
- for (let n of k) t[n] = e.get(be[n]);
298
- return Se(t);
309
+ for (let n of N) t[n] = e.get(ye[n]);
310
+ return be(t);
299
311
  }
300
- function j(e) {
312
+ function I(e) {
301
313
  return !!e.utmSource && e.utmSource !== "direct";
302
314
  }
303
315
  //#endregion
304
316
  //#region src/lib/tracking/context.ts
305
- var M = null, N = null, P = {
317
+ var L = null, R = null, z = {
306
318
  search: null,
307
319
  referrer: null,
308
320
  pageUrl: null
309
321
  };
310
- function we(e) {
311
- e.widgetId !== void 0 && (M = e.widgetId || null), e.venueId !== void 0 && (N = e.venueId ?? null);
322
+ function Se(e) {
323
+ e.widgetId !== void 0 && (L = e.widgetId || null), e.venueId !== void 0 && (R = e.venueId ?? null);
312
324
  }
313
- function Te(e) {
314
- e.search !== void 0 && (P.search = e.search === null ? null : e.search instanceof URLSearchParams ? e.search.toString() : e.search), e.referrer !== void 0 && (P.referrer = e.referrer), e.pageUrl !== void 0 && (P.pageUrl = e.pageUrl);
325
+ function Ce(e) {
326
+ e.search !== void 0 && (z.search = e.search === null ? null : e.search instanceof URLSearchParams ? e.search.toString() : e.search), e.referrer !== void 0 && (z.referrer = e.referrer), e.pageUrl !== void 0 && (z.pageUrl = e.pageUrl);
315
327
  }
316
- function Ee() {
317
- return M;
328
+ function we() {
329
+ return L;
318
330
  }
319
- function De() {
320
- return N;
331
+ function Te() {
332
+ return R;
321
333
  }
322
- function Oe() {
334
+ function Ee() {
323
335
  if (typeof window > "u") return !0;
324
336
  try {
325
337
  return window.self === window.top;
@@ -327,57 +339,57 @@ function Oe() {
327
339
  return !1;
328
340
  }
329
341
  }
330
- function F() {
331
- let e = typeof window < "u", t = Oe(), n = P.search ?? (e ? window.location.search : ""), r = P.referrer ?? (typeof document < "u" ? document.referrer : "") ?? "", i = P.pageUrl ?? (e && t ? window.location.href : "");
342
+ function B() {
343
+ let e = typeof window < "u", t = Ee(), n = z.search ?? (e ? window.location.search : ""), r = z.referrer ?? (typeof document < "u" ? document.referrer : "") ?? "", i = z.pageUrl ?? (e && t ? window.location.href : "");
332
344
  return {
333
- utm: Ce(new URLSearchParams(n)),
345
+ utm: xe(new URLSearchParams(n)),
334
346
  referrer: r || "",
335
347
  pageUrl: i || ""
336
348
  };
337
349
  }
338
- function ke() {
350
+ function De() {
339
351
  if (typeof navigator > "u") return "desktop";
340
352
  let e = navigator.userAgent.toLowerCase();
341
353
  return /ipad|tablet|playbook|silk/.test(e) ? "tablet" : /mobile|iphone|ipod|android.*mobile|windows phone|blackberry/.test(e) ? "mobile" : /android/.test(e) ? "tablet" : "desktop";
342
354
  }
343
355
  //#endregion
344
356
  //#region src/lib/tracking/consent.ts
345
- var I = null, L = !1, R = !1, Ae = !1;
346
- function je(e) {
347
- I = e;
357
+ var V = null, H = !1, U = !1, Oe = !1;
358
+ function ke(e) {
359
+ V = e;
348
360
  }
349
- function Me(e) {
350
- L = e;
361
+ function Ae(e) {
362
+ H = e;
351
363
  }
352
- function z() {
353
- return Ae;
364
+ function W() {
365
+ return Oe;
354
366
  }
355
- function B() {
367
+ function G() {
356
368
  return typeof window < "u" && typeof window.__tcfapi == "function";
357
369
  }
358
- function V() {
370
+ function K() {
359
371
  return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
360
372
  }
361
- function Ne() {
362
- return I === null ? B() || V() : I;
373
+ function je() {
374
+ return V === null ? G() || K() : V;
363
375
  }
364
- function H() {
365
- return !Ne() || L;
376
+ function q() {
377
+ return !je() || H;
366
378
  }
367
- function Pe() {
368
- if (R || !B()) return;
369
- R = !0;
379
+ function Me() {
380
+ if (U || !G()) return;
381
+ U = !0;
370
382
  let e = window.__tcfapi;
371
383
  try {
372
384
  e("addEventListener", 2, (e, t) => {
373
385
  if (!(!t || !e)) {
374
386
  if (e.gdprApplies === !1) {
375
- V() || (L = !0);
387
+ K() || (H = !0);
376
388
  return;
377
389
  }
378
390
  if (e.eventStatus === "tcloaded" || e.eventStatus === "useractioncomplete") {
379
391
  let t = e.purpose?.consents;
380
- L = !!t && Object.values(t).some(Boolean);
392
+ H = !!t && Object.values(t).some(Boolean);
381
393
  }
382
394
  }
383
395
  });
@@ -385,11 +397,11 @@ function Pe() {
385
397
  }
386
398
  //#endregion
387
399
  //#region src/lib/tracking/identity.ts
388
- var U = "micdrop_session_id", W = "micdrop_visitor_id", Fe = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
389
- function G(e) {
390
- return typeof e == "string" && Fe.test(e);
400
+ var J = "micdrop_session_id", Y = "micdrop_visitor_id", Ne = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
401
+ function Pe(e) {
402
+ return typeof e == "string" && Ne.test(e);
391
403
  }
392
- function K() {
404
+ function Fe() {
393
405
  let e = typeof crypto < "u" ? crypto : void 0;
394
406
  if (e?.randomUUID) return e.randomUUID();
395
407
  let t = /* @__PURE__ */ new Uint8Array(16);
@@ -400,20 +412,20 @@ function K() {
400
412
  for (let e = 0; e < 16; e++) n.push(t[e].toString(16).padStart(2, "0"));
401
413
  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]}`;
402
414
  }
403
- function q() {
404
- let e = m(U);
405
- return e || (e = K(), h(U, e)), e;
415
+ function Ie() {
416
+ let e = g(J);
417
+ return e || (e = Fe(), _(J, e)), e;
406
418
  }
407
- function Ie(e) {
408
- let t = te(W);
409
- if (G(t)) return {
419
+ function Le(e) {
420
+ let t = m(Y);
421
+ if (Pe(t)) return {
410
422
  id: t,
411
423
  createdAt: e,
412
424
  migrated: !0
413
425
  };
414
426
  if (t && typeof t == "object") {
415
427
  let { id: n, createdAt: r } = t;
416
- if (!G(n)) return null;
428
+ if (!Pe(n)) return null;
417
429
  let i = typeof r == "number" && Number.isFinite(r), a = i ? Math.min(r, e) : e;
418
430
  return {
419
431
  id: n,
@@ -423,23 +435,23 @@ function Ie(e) {
423
435
  }
424
436
  return null;
425
437
  }
426
- function J() {
427
- if (!H()) return null;
428
- let e = Date.now(), t = Ie(e);
429
- if (t && e - t.createdAt < 34128e6) return t.migrated && p(W, {
438
+ function X() {
439
+ if (!q()) return null;
440
+ let e = Date.now(), t = Le(e);
441
+ if (t && e - t.createdAt < 34128e6) return t.migrated && h(Y, {
430
442
  id: t.id,
431
443
  createdAt: t.createdAt
432
444
  }), t.id;
433
- let n = K();
434
- return p(W, {
445
+ let n = Fe();
446
+ return h(Y, {
435
447
  id: n,
436
448
  createdAt: e
437
449
  }), n;
438
450
  }
439
451
  //#endregion
440
452
  //#region src/lib/tracking/attribution-store.ts
441
- var Y = "micdrop_attribution";
442
- function Le(e, t) {
453
+ var Re = "micdrop_attribution";
454
+ function ze(e, t) {
443
455
  if (!e || !t) return !1;
444
456
  try {
445
457
  let n = new URL(e).host, r = new URL(t).host;
@@ -448,26 +460,26 @@ function Le(e, t) {
448
460
  return !1;
449
461
  }
450
462
  }
451
- function Re(e) {
452
- return j(e.utm) || Le(e.referrer, e.pageUrl);
463
+ function Be(e) {
464
+ return I(e.utm) || ze(e.referrer, e.pageUrl);
453
465
  }
454
- function X() {
455
- let e = m(Y);
466
+ function Ve() {
467
+ let e = g(Re);
456
468
  return !e || !e.utm || typeof e.utm.utmSource != "string" ? null : e;
457
469
  }
458
- function ze(e = F()) {
459
- let t = Re(e), n = X();
460
- !t && n || h(Y, {
470
+ function He(e = B()) {
471
+ let t = Be(e), n = Ve();
472
+ !t && n || _(Re, {
461
473
  utm: e.utm,
462
474
  referrer: e.referrer,
463
475
  marketing: t
464
476
  });
465
477
  }
466
478
  function Z() {
467
- let e = X() ?? F();
479
+ let e = Ve() ?? B();
468
480
  return {
469
- sessionId: q(),
470
- visitorId: J(),
481
+ sessionId: Ie(),
482
+ visitorId: X(),
471
483
  utmSource: e.utm.utmSource,
472
484
  utmMedium: e.utm.utmMedium,
473
485
  utmCampaign: e.utm.utmCampaign,
@@ -478,7 +490,7 @@ function Z() {
478
490
  }
479
491
  //#endregion
480
492
  //#region src/lib/tracking/beacon.ts
481
- var Be = i("tracking"), Ve = /* @__PURE__ */ new Set([
493
+ var Ue = t("tracking"), We = /* @__PURE__ */ new Set([
482
494
  "chunk_load_error",
483
495
  "type_error",
484
496
  "reference_error",
@@ -489,23 +501,23 @@ var Be = i("tracking"), Ve = /* @__PURE__ */ new Set([
489
501
  "abort_error",
490
502
  "not_supported_error",
491
503
  "error"
492
- ]), He = "other";
493
- function Ue(e) {
504
+ ]), Ge = "other";
505
+ function Ke(e) {
494
506
  try {
495
507
  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 ?? "") : "";
496
508
  if (t === "ChunkLoadError" || /dynamically imported module/i.test(n)) return "chunk_load_error";
497
509
  let r = t.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9_]/g, "");
498
- return Ve.has(r) ? r : He;
510
+ return We.has(r) ? r : Ge;
499
511
  } catch {
500
- return He;
512
+ return Ge;
501
513
  }
502
514
  }
503
- var We = /* @__PURE__ */ new Set([
515
+ var qe = /* @__PURE__ */ new Set([
504
516
  "add_to_cart",
505
517
  "checkout_started",
506
518
  "purchase"
507
- ]), Ge = "micdrop_tracked_beacons", Ke = 300;
508
- function qe(e, t, n, r, i, a, o, s = "") {
519
+ ]), Je = "micdrop_tracked_beacons", Ye = 300;
520
+ function Xe(e, t, n, r, i, a, o, s = "") {
509
521
  let c = n || `url:${o}`, l = [
510
522
  e,
511
523
  t ?? "",
@@ -516,27 +528,27 @@ function qe(e, t, n, r, i, a, o, s = "") {
516
528
  ];
517
529
  return s && l.push(s), l.join(":");
518
530
  }
519
- function Je(e) {
531
+ function Ze(e) {
520
532
  if (e == null || e === "") return null;
521
533
  let t = Number(e);
522
534
  return Number.isFinite(t) ? t : null;
523
535
  }
524
- function Ye(e) {
525
- let t = m(Ge, []) ?? [];
536
+ function Qe(e) {
537
+ let t = g(Je, []) ?? [];
526
538
  if (t.includes(e)) return !0;
527
539
  let n = [...t, e];
528
- return h(Ge, n.length > Ke ? n.slice(-300) : n), !1;
540
+ return _(Je, n.length > Ye ? n.slice(-300) : n), !1;
529
541
  }
530
542
  async function Q(e, { eventId: t = null, widgetId: n, venueId: r, error: i } = {}) {
531
- if (typeof window > "u" || z()) return;
532
- let a = F();
533
- if (ze(a), e === "link_click" && !j(a.utm)) return;
534
- let o = q(), s = n === void 0 ? Ee() : n;
535
- if (!We.has(e) && Ye(qe(e, t, s, a.utm.utmSource, a.utm.utmCampaign, o, a.pageUrl, i ? `${i.stage}:${i.errName}` : ""))) return;
536
- let c = r === void 0 ? De() : r, l = H(), u = {
543
+ if (typeof window > "u" || W()) return;
544
+ let a = B();
545
+ if (He(a), e === "link_click" && !I(a.utm)) return;
546
+ let o = Ie(), s = n === void 0 ? we() : n;
547
+ if (!qe.has(e) && Qe(Xe(e, t, s, a.utm.utmSource, a.utm.utmCampaign, o, a.pageUrl, i ? `${i.stage}:${i.errName}` : ""))) return;
548
+ let c = r === void 0 ? Te() : r, l = q(), u = {
537
549
  eventType: e,
538
- eventId: Je(t),
539
- venueId: Je(c),
550
+ eventId: Ze(t),
551
+ venueId: Ze(c),
540
552
  widgetId: s,
541
553
  utmSource: a.utm.utmSource,
542
554
  utmMedium: a.utm.utmMedium,
@@ -544,8 +556,8 @@ async function Q(e, { eventId: t = null, widgetId: n, venueId: r, error: i } = {
544
556
  utmContent: a.utm.utmContent,
545
557
  utmTerm: a.utm.utmTerm,
546
558
  sessionId: o,
547
- visitorId: J(),
548
- deviceType: ke(),
559
+ visitorId: X(),
560
+ deviceType: De(),
549
561
  referrer: l ? a.referrer : "",
550
562
  pageUrl: l ? a.pageUrl : "",
551
563
  ...i ? {
@@ -554,49 +566,49 @@ async function Q(e, { eventId: t = null, widgetId: n, venueId: r, error: i } = {
554
566
  } : {}
555
567
  };
556
568
  try {
557
- await fetch(`${C()}/track/pageview`, {
569
+ await fetch(`${D()}/track/pageview`, {
558
570
  method: "POST",
559
571
  headers: { "Content-Type": "application/json" },
560
572
  body: JSON.stringify(u),
561
573
  keepalive: !0
562
574
  });
563
575
  } catch (t) {
564
- Be.error(`Beacon '${e}' failed:`, t);
576
+ Ue.error(`Beacon '${e}' failed:`, t);
565
577
  }
566
578
  }
567
- var Xe = (e, t) => Q("link_click", {
579
+ var $e = (e, t) => Q("link_click", {
568
580
  widgetId: e,
569
581
  venueId: t
570
- }), Ze = (e, t) => Q("widget_load", {
582
+ }), et = (e, t) => Q("widget_load", {
571
583
  widgetId: e,
572
584
  venueId: t
573
- }), Qe = (e, t) => Q("list_view", {
585
+ }), tt = (e, t) => Q("list_view", {
574
586
  widgetId: e,
575
587
  venueId: t
576
- }), $e = (e, t, n) => Q("event_view", {
588
+ }), nt = (e, t, n) => Q("event_view", {
577
589
  eventId: e,
578
590
  widgetId: t,
579
591
  venueId: n
580
- }), et = (e, t, n) => Q("add_to_cart", {
592
+ }), rt = (e, t, n) => Q("add_to_cart", {
581
593
  eventId: e,
582
594
  widgetId: t,
583
595
  venueId: n
584
- }), tt = (e, t, n) => Q("checkout_started", {
596
+ }), it = (e, t, n) => Q("checkout_started", {
585
597
  eventId: e,
586
598
  widgetId: t,
587
599
  venueId: n
588
- }), nt = (e, t, n) => Q("purchase", {
600
+ }), at = (e, t, n) => Q("purchase", {
589
601
  eventId: e,
590
602
  widgetId: t,
591
603
  venueId: n
592
604
  });
593
- function rt(e, t, n, r) {
605
+ function ot(e, t, n, r) {
594
606
  try {
595
607
  Q("widget_error", {
596
608
  widgetId: n,
597
609
  venueId: r,
598
610
  error: {
599
- errName: Ue(e),
611
+ errName: Ke(e),
600
612
  stage: t
601
613
  }
602
614
  }).catch(() => {});
@@ -604,10 +616,10 @@ function rt(e, t, n, r) {
604
616
  }
605
617
  //#endregion
606
618
  //#region src/lib/api/orders.ts
607
- var $ = i("VC");
608
- async function it(e, t, n, r) {
619
+ var $ = t("VC");
620
+ async function st(e, t, n, r) {
609
621
  try {
610
- let i = await D(`${w()}/cart/${e}/payment-intent`, {
622
+ let i = await j(`${O()}/cart/${e}/payment-intent`, {
611
623
  productQuantities: t,
612
624
  ...n && Object.keys(n).length > 0 ? { donationAmounts: n } : {},
613
625
  ...r ? {
@@ -619,7 +631,7 @@ async function it(e, t, n, r) {
619
631
  attribution: Z()
620
632
  });
621
633
  if (!i.success) throw $.error("Payment intent creation failed:", i.error), new a(i.error || "Failed to create payment intent", i.statusCode ?? 0, {
622
- endpoint: `${w()}/cart/${e}/payment-intent`,
634
+ endpoint: `${O()}/cart/${e}/payment-intent`,
623
635
  method: "POST"
624
636
  });
625
637
  return $.debug("Payment intent created:", i.data), i.data;
@@ -627,7 +639,7 @@ async function it(e, t, n, r) {
627
639
  return $.error("createPaymentIntent error:", e), null;
628
640
  }
629
641
  }
630
- async function at(e, t, n) {
642
+ async function ct(e, t, n) {
631
643
  try {
632
644
  let r = {};
633
645
  for (let [e, n] of Object.entries(t)) {
@@ -639,7 +651,7 @@ async function at(e, t, n) {
639
651
  let n = typeof e == "number" ? e : parseInt(e, 10);
640
652
  !Number.isNaN(n) && t > 0 && (i[n] = t);
641
653
  }
642
- let a = await fetch(`${w()}/cart/${e}`, {
654
+ let a = await fetch(`${O()}/cart/${e}`, {
643
655
  method: "PUT",
644
656
  headers: { "Content-Type": "application/json" },
645
657
  body: JSON.stringify({
@@ -656,9 +668,9 @@ async function at(e, t, n) {
656
668
  return $.error("updateCartQuantities error:", e), !1;
657
669
  }
658
670
  }
659
- async function ot(e, t = "") {
671
+ async function lt(e, t = "") {
660
672
  try {
661
- let n = await D(`${C()}/orders/${e}/refund`, { message: t });
673
+ let n = await j(`${D()}/orders/${e}/refund`, { message: t });
662
674
  return n.success ? { success: !0 } : ($.error("Refund request failed:", n.error), {
663
675
  success: !1,
664
676
  error: n.error || "Failed to submit refund request"
@@ -670,9 +682,9 @@ async function ot(e, t = "") {
670
682
  };
671
683
  }
672
684
  }
673
- async function st(e, t) {
685
+ async function ut(e, t) {
674
686
  try {
675
- let n = await D(`${w()}/validatePaymentIntent/${e}`, {
687
+ let n = await j(`${O()}/validatePaymentIntent/${e}`, {
676
688
  ...t,
677
689
  attribution: Z()
678
690
  });
@@ -696,9 +708,9 @@ async function st(e, t) {
696
708
  return $.error("validatePaymentIntent error:", e), null;
697
709
  }
698
710
  }
699
- async function ct(e) {
711
+ async function dt(e) {
700
712
  try {
701
- let t = await D(`${C()}/orders/extend-session`, { orderUuid: e });
713
+ let t = await j(`${D()}/orders/extend-session`, { orderUuid: e });
702
714
  if (!t.success) return {
703
715
  success: !1,
704
716
  error: t.error || "Failed to extend session",
@@ -717,9 +729,9 @@ async function ct(e) {
717
729
  };
718
730
  }
719
731
  }
720
- async function lt(e) {
732
+ async function ft(e) {
721
733
  try {
722
- let t = await E(`${C()}/orders/session/${e}`);
734
+ let t = await A(`${D()}/orders/session/${e}`);
723
735
  if (!t.success) return {
724
736
  error: t.error || "No active session found",
725
737
  notFound: t.statusCode === 404
@@ -738,4 +750,4 @@ async function lt(e) {
738
750
  }
739
751
  }
740
752
  //#endregion
741
- export { w as A, ae as B, we as C, E as D, _e as E, se as F, p as G, m as H, _ as I, h as K, le as L, ye as M, ve as N, D as O, ue as P, oe as R, Te as S, A as T, ne as U, te as V, re as W, H as _, at as a, je as b, tt as c, Qe as d, nt as f, J as g, Z as h, ot as i, C as j, me as k, $e as l, Ze as m, ct as n, st as o, rt as p, a as q, lt as r, et as s, it as t, Xe as u, z as v, xe as w, Pe as x, Me as y, ce as z };
753
+ export { E as A, ie as B, Se as C, A as D, ge as E, _e as F, ee as G, re as H, ce as I, _ as J, te as K, ae as L, D as M, le as N, j as O, ve as P, y as R, Ce as S, F as T, m as U, oe as V, g as W, a as Y, q as _, ct as a, ke as b, it as c, tt as d, at as f, X as g, Z as h, lt as i, O as j, me as k, nt as l, et as m, dt as n, ut as o, ot as p, h as q, ft as r, rt as s, st as t, $e as u, W as v, P as w, Me as x, Ae as y, se as z };