@getmicdrop/venue-calendar 4.2.3 → 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.
- package/dist/{ArrowLeftIcon-CxZXP_IT.js → ArrowLeftIcon-BGd-X_Qm.js} +1 -1
- package/dist/{BlockPlaceholder-HZ6Coko5.js → BlockPlaceholder-Wl39H9Z7.js} +1 -1
- package/dist/{Calendar-BKefLfIt.js → Calendar-DafPX3k_.js} +4 -4
- package/dist/{CalendarFoundryView-tDmFCrJ3.js → CalendarFoundryView-COkX5oQx.js} +21 -21
- package/dist/{CalendarIcon-CLGR_zlO.js → CalendarIcon-CeQ1_FWq.js} +1 -1
- package/dist/{CartView-CHFlfWS9.js → CartView-nvVA8vWk.js} +15 -15
- package/dist/{Checkout-CRX7dcRr.js → Checkout-BphC7gak.js} +20 -20
- package/dist/{Checkout-C-A4t1eE.js → Checkout-Ow2x8cNL.js} +12 -12
- package/dist/{CheckoutTimer-d3KUbevy.js → CheckoutTimer-DJlt5M2b.js} +2 -2
- package/dist/{ChevronDownIcon-YtBeSqjf.js → ChevronDownIcon-y7oNyepp.js} +1 -1
- package/dist/{ClockIcon-a9tJQ5El.js → ClockIcon-BGTz8dak.js} +1 -1
- package/dist/{CloseIcon-DSURK5co.js → CloseIcon-C9SHeORJ.js} +1 -1
- package/dist/{CollectionView-BiBMllyw.js → CollectionView-BAIlcuqO.js} +7 -7
- package/dist/{Event-1ZJVzqFN.js → Event-CTaXLze_.js} +17 -17
- package/dist/{EventPage-C7K2yA4v.js → EventPage-LuA-aEYZ.js} +14 -14
- package/dist/{Input-DkYIFK4J.js → Input-iXqece97.js} +1 -1
- package/dist/{MailIcon-DIrQpcGo.js → MailIcon-xtNog-7h.js} +1 -1
- package/dist/{Modal-DrA1swbF.js → Modal-CqzRblrN.js} +2 -2
- package/dist/{ModalFooter-r1NQNG9P.js → ModalFooter-DHhBLDbO.js} +1 -1
- package/dist/{PasswordInput-DB4qa7kS.js → PasswordInput-Czm5Pe_p.js} +1 -1
- package/dist/{ScarcityBadge-BJOm7_Ho.js → ScarcityBadge-CdgQmt1D.js} +3 -3
- package/dist/{SeriesPage-JVmqUSax.js → SeriesPage-DfCyV1ka.js} +4 -4
- package/dist/{Success-DAE6gPZM.js → Success-CsYxRkLE.js} +20 -20
- package/dist/{TagIcon-CrTNd8qE.js → TagIcon-DJSTnymB.js} +1 -1
- package/dist/{ViewTicketsEmbed-Zx-mvP2p.js → ViewTicketsEmbed-CKucKt-W.js} +10 -10
- package/dist/{WarningCircleIcon-C5-op3Cy.js → WarningCircleIcon-BKSQbu7p.js} +1 -1
- package/dist/{WarningTriIcon-BxIQn7c2.js → WarningTriIcon-DgwTwlxe.js} +1 -1
- package/dist/{__SKIP_PATHS__-DyyiXBgB.js → __SKIP_PATHS__-BTbGfN80.js} +1 -1
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +187 -181
- package/dist/api/client.d.ts +16 -0
- package/dist/{colors-MuuDk6KF.js → colors-DeJAzg_q.js} +35 -35
- package/dist/{constants-CqrJv6nM.js → constants-OTS1wmXZ.js} +3 -0
- package/dist/{copyToClipboard-CTS9Wtmo.js → copyToClipboard-CRDdh3r8.js} +1 -1
- package/dist/{event-transform-jFmHl0Qp.js → event-transform-BaJ7M1DL.js} +2 -2
- package/dist/{eventStatusStream-D04pcbuu.js → eventStatusStream-sq6uPnMe.js} +5 -5
- package/dist/{href-C8WGnROy.js → href-DJeJpcO9.js} +1 -1
- package/dist/{i18n-CcJmTGJP.js → i18n-GzfxX0Ad.js} +3 -3
- package/dist/{labels-Q4CaHsVM.js → labels-CqodQmuY.js} +1 -1
- package/dist/{modalManager.svelte-qcVxl7C5.js → modalManager.svelte-OSPs3dSW.js} +1 -1
- package/dist/{order-totals-BImtvmoh.js → order-totals-BAKL9cOB.js} +1 -1
- package/dist/{orders-C8kt6c-E.js → orders-NZP81zYT.js} +193 -182
- package/dist/{phoneUtils-FnBDCqO0.js → phoneUtils-BJeAIGYo.js} +1 -1
- package/dist/{pixels-MEc7WYiV.js → pixels-BBruZizp.js} +1 -1
- package/dist/{shareCopyFeedback.svelte-Dko8NIbm.js → shareCopyFeedback.svelte-BRInK1hH.js} +2 -2
- package/dist/{to-event-card-props-BAHzloEA.js → to-event-card-props-CO3aPBdH.js} +1 -1
- package/dist/{utils-Ts4-U13Y.js → utils-C8GgxJMv.js} +29 -29
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +1210 -1071
- package/dist/venue-calendar.iife.js +58 -58
- package/dist/venue-calendar.umd.js +56 -56
- package/package.json +1 -1
- /package/dist/locales/{4.2.3 → 4.2.4}/flow/de.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/flow/es.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/flow/fr.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/flow/id.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/flow/it.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/flow/ja.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/flow/ko.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/flow/nl.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/flow/pl.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/flow/tr.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/flow/zh.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/main/de.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/main/es.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/main/fr.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/main/id.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/main/it.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/main/ja.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/main/ko.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/main/nl.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/main/pl.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/main/pt-br.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/main/tr.js +0 -0
- /package/dist/locales/{4.2.3 → 4.2.4}/main/zh.js +0 -0
|
@@ -77,63 +77,74 @@ function d(e, t, n) {
|
|
|
77
77
|
function f(e, t, n) {
|
|
78
78
|
return l(o(e), t, n);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function p(e, t) {
|
|
81
81
|
u(o(e), t);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function m(e, t = null) {
|
|
84
84
|
return d("local", e, t);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function h(e, t) {
|
|
87
87
|
return f("local", e, t);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
89
|
+
function ee(e) {
|
|
90
|
+
p("local", e);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function g(e, t = null) {
|
|
93
93
|
return d("session", e, t);
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function _(e, t) {
|
|
96
96
|
return f("session", e, t);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
98
|
+
function te(e) {
|
|
99
|
+
p("session", e);
|
|
100
100
|
}
|
|
101
101
|
//#endregion
|
|
102
102
|
//#region src/lib/config.js
|
|
103
|
-
var
|
|
104
|
-
function
|
|
103
|
+
var ne = t("VC:config", { enabled: !0 }), v = null;
|
|
104
|
+
function re(e) {
|
|
105
105
|
let t = e || null;
|
|
106
|
-
|
|
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;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
if (
|
|
108
|
+
function y() {
|
|
109
|
+
if (v) return v;
|
|
110
110
|
}
|
|
111
|
-
var
|
|
112
|
-
function
|
|
113
|
-
|
|
111
|
+
var b = null;
|
|
112
|
+
function ie(e) {
|
|
113
|
+
b = typeof e == "string" && e.trim() ? e.trim() : null;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
return (
|
|
115
|
+
function ae() {
|
|
116
|
+
return (b || E().baseUrl || "").replace(/\/+$/, "");
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
var
|
|
118
|
+
function oe(e) {}
|
|
119
|
+
var x = {
|
|
120
120
|
postMessageOnSuccess: !1,
|
|
121
121
|
postMessageTargetOrigin: null
|
|
122
122
|
};
|
|
123
|
-
function
|
|
124
|
-
|
|
125
|
-
...
|
|
123
|
+
function se(e = {}) {
|
|
124
|
+
x = {
|
|
125
|
+
...x,
|
|
126
126
|
...e
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
return { ...
|
|
129
|
+
function ce() {
|
|
130
|
+
return { ...x };
|
|
131
131
|
}
|
|
132
132
|
//#endregion
|
|
133
133
|
//#region src/lib/api/client.ts
|
|
134
|
-
var
|
|
135
|
-
function
|
|
136
|
-
|
|
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();
|
|
137
148
|
return n ? {
|
|
138
149
|
...e,
|
|
139
150
|
"X-Widget-Key": n
|
|
@@ -154,30 +165,30 @@ var pe = class extends Error {
|
|
|
154
165
|
constructor(e, t, n) {
|
|
155
166
|
super(e), this.name = "ApiRequestError", this.code = t, this.statusCode = n;
|
|
156
167
|
}
|
|
157
|
-
},
|
|
168
|
+
}, T = {
|
|
158
169
|
baseUrl: "https://get-micdrop.com",
|
|
159
170
|
timeout: 3e4,
|
|
160
171
|
retries: 2,
|
|
161
172
|
retryDelay: 500,
|
|
162
|
-
onError: (e) =>
|
|
173
|
+
onError: (e) => S.error("API Error:", e)
|
|
163
174
|
};
|
|
164
175
|
function me(e) {
|
|
165
|
-
|
|
166
|
-
...
|
|
176
|
+
T = {
|
|
177
|
+
...T,
|
|
167
178
|
...e
|
|
168
179
|
};
|
|
169
180
|
}
|
|
170
|
-
function
|
|
171
|
-
return { ...
|
|
181
|
+
function E() {
|
|
182
|
+
return { ...T };
|
|
172
183
|
}
|
|
173
|
-
function
|
|
174
|
-
return `${
|
|
184
|
+
function D() {
|
|
185
|
+
return `${T.baseUrl}/api/v2/public`;
|
|
175
186
|
}
|
|
176
|
-
function
|
|
177
|
-
return `${
|
|
187
|
+
function O() {
|
|
188
|
+
return `${T.baseUrl}/api/orders/v2/public`;
|
|
178
189
|
}
|
|
179
|
-
var
|
|
180
|
-
async function
|
|
190
|
+
var he = (e) => new Promise((t) => setTimeout(t, e));
|
|
191
|
+
async function k(e, t, n) {
|
|
181
192
|
let r = (t.method || "GET").toUpperCase(), i = r === "GET" || r === "HEAD" ? n.retries + 1 : 1, a;
|
|
182
193
|
for (let r = 1; r <= i; r++) {
|
|
183
194
|
let o = new AbortController(), s = setTimeout(() => o.abort(), n.timeout), c = t.signal, l;
|
|
@@ -194,36 +205,36 @@ async function T(e, t, n) {
|
|
|
194
205
|
} finally {
|
|
195
206
|
clearTimeout(s), c && l && c.removeEventListener("abort", l);
|
|
196
207
|
}
|
|
197
|
-
r < i && await
|
|
208
|
+
r < i && await he(n.retryDelay * 2 ** (r - 1));
|
|
198
209
|
}
|
|
199
210
|
throw a;
|
|
200
211
|
}
|
|
201
|
-
async function
|
|
202
|
-
return
|
|
212
|
+
async function A(e, t) {
|
|
213
|
+
return M("GET", e, void 0, t);
|
|
203
214
|
}
|
|
204
|
-
async function
|
|
205
|
-
return
|
|
215
|
+
async function j(e, t, n) {
|
|
216
|
+
return M("POST", e, t, n);
|
|
206
217
|
}
|
|
207
|
-
async function
|
|
208
|
-
return
|
|
218
|
+
async function ge(e, t) {
|
|
219
|
+
return M("DELETE", e, void 0, t);
|
|
209
220
|
}
|
|
210
|
-
async function
|
|
211
|
-
let i = t.startsWith("http") || t.startsWith("/api/") ? t : `${
|
|
212
|
-
o ||
|
|
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);
|
|
213
224
|
};
|
|
214
225
|
try {
|
|
215
|
-
let t = await
|
|
226
|
+
let t = await k(i, {
|
|
216
227
|
method: e,
|
|
217
|
-
headers:
|
|
228
|
+
headers: w({
|
|
218
229
|
"Content-Type": "application/json",
|
|
219
230
|
...s
|
|
220
231
|
}, a),
|
|
221
232
|
body: n === void 0 ? void 0 : JSON.stringify(n),
|
|
222
233
|
...c
|
|
223
|
-
},
|
|
234
|
+
}, T);
|
|
224
235
|
if (!t.ok) {
|
|
225
236
|
let { message: e, code: n } = fe(await t.json().catch(() => ({})), t.status);
|
|
226
|
-
return l(new pe(e, n, t.status)), {
|
|
237
|
+
return l(new pe(e, n, t.status)), ue(n), {
|
|
227
238
|
success: !1,
|
|
228
239
|
error: e,
|
|
229
240
|
errorCode: n,
|
|
@@ -249,78 +260,78 @@ async function O(e, t, n, r) {
|
|
|
249
260
|
};
|
|
250
261
|
}
|
|
251
262
|
}
|
|
252
|
-
async function
|
|
253
|
-
return
|
|
263
|
+
async function _e(e, t) {
|
|
264
|
+
return j(`${D()}/tax-preview`, e, {
|
|
254
265
|
signal: t?.signal,
|
|
255
266
|
suppressOnError: t?.suppressOnError ?? !0
|
|
256
267
|
});
|
|
257
268
|
}
|
|
258
|
-
async function
|
|
269
|
+
async function ve(e, t) {
|
|
259
270
|
try {
|
|
260
|
-
let n = e.startsWith(
|
|
271
|
+
let n = e.startsWith(T.baseUrl), { widgetKey: r, ...i } = t ?? {}, a = await k(e, {
|
|
261
272
|
...i,
|
|
262
|
-
...n ? { headers:
|
|
263
|
-
},
|
|
273
|
+
...n ? { headers: w(i.headers, r) } : {}
|
|
274
|
+
}, T);
|
|
264
275
|
if (!a.ok) {
|
|
265
276
|
let e = await a.json().catch(() => ({}));
|
|
266
|
-
return
|
|
277
|
+
return S.error(`API request failed: ${a.status}`, e), null;
|
|
267
278
|
}
|
|
268
279
|
return a.json();
|
|
269
280
|
} catch (e) {
|
|
270
|
-
return
|
|
281
|
+
return S.error("API request error:", e), null;
|
|
271
282
|
}
|
|
272
283
|
}
|
|
273
284
|
//#endregion
|
|
274
285
|
//#region src/lib/tracking/normalize.ts
|
|
275
|
-
var
|
|
286
|
+
var N = [
|
|
276
287
|
"utmSource",
|
|
277
288
|
"utmMedium",
|
|
278
289
|
"utmCampaign",
|
|
279
290
|
"utmContent",
|
|
280
291
|
"utmTerm"
|
|
281
|
-
],
|
|
292
|
+
], ye = {
|
|
282
293
|
utmSource: "utm_source",
|
|
283
294
|
utmMedium: "utm_medium",
|
|
284
295
|
utmCampaign: "utm_campaign",
|
|
285
296
|
utmContent: "utm_content",
|
|
286
297
|
utmTerm: "utm_term"
|
|
287
|
-
},
|
|
288
|
-
function
|
|
298
|
+
}, P = "direct";
|
|
299
|
+
function F(e) {
|
|
289
300
|
return e ? e.trim().toLowerCase().replace(/\s+/g, "_") : "";
|
|
290
301
|
}
|
|
291
|
-
function
|
|
302
|
+
function be(e) {
|
|
292
303
|
let t = {};
|
|
293
|
-
for (let n of
|
|
294
|
-
return t.utmSource ||=
|
|
304
|
+
for (let n of N) t[n] = F(e[n]);
|
|
305
|
+
return t.utmSource ||= P, t;
|
|
295
306
|
}
|
|
296
|
-
function
|
|
307
|
+
function xe(e) {
|
|
297
308
|
let t = {};
|
|
298
|
-
for (let n of
|
|
299
|
-
return
|
|
309
|
+
for (let n of N) t[n] = e.get(ye[n]);
|
|
310
|
+
return be(t);
|
|
300
311
|
}
|
|
301
|
-
function
|
|
312
|
+
function I(e) {
|
|
302
313
|
return !!e.utmSource && e.utmSource !== "direct";
|
|
303
314
|
}
|
|
304
315
|
//#endregion
|
|
305
316
|
//#region src/lib/tracking/context.ts
|
|
306
|
-
var
|
|
317
|
+
var L = null, R = null, z = {
|
|
307
318
|
search: null,
|
|
308
319
|
referrer: null,
|
|
309
320
|
pageUrl: null
|
|
310
321
|
};
|
|
311
|
-
function
|
|
312
|
-
e.widgetId !== void 0 && (
|
|
322
|
+
function Se(e) {
|
|
323
|
+
e.widgetId !== void 0 && (L = e.widgetId || null), e.venueId !== void 0 && (R = e.venueId ?? null);
|
|
313
324
|
}
|
|
314
|
-
function
|
|
315
|
-
e.search !== void 0 && (
|
|
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);
|
|
316
327
|
}
|
|
317
|
-
function
|
|
318
|
-
return
|
|
328
|
+
function we() {
|
|
329
|
+
return L;
|
|
319
330
|
}
|
|
320
|
-
function
|
|
321
|
-
return
|
|
331
|
+
function Te() {
|
|
332
|
+
return R;
|
|
322
333
|
}
|
|
323
|
-
function
|
|
334
|
+
function Ee() {
|
|
324
335
|
if (typeof window > "u") return !0;
|
|
325
336
|
try {
|
|
326
337
|
return window.self === window.top;
|
|
@@ -328,57 +339,57 @@ function Oe() {
|
|
|
328
339
|
return !1;
|
|
329
340
|
}
|
|
330
341
|
}
|
|
331
|
-
function
|
|
332
|
-
let e = typeof window < "u", t =
|
|
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 : "");
|
|
333
344
|
return {
|
|
334
|
-
utm:
|
|
345
|
+
utm: xe(new URLSearchParams(n)),
|
|
335
346
|
referrer: r || "",
|
|
336
347
|
pageUrl: i || ""
|
|
337
348
|
};
|
|
338
349
|
}
|
|
339
|
-
function
|
|
350
|
+
function De() {
|
|
340
351
|
if (typeof navigator > "u") return "desktop";
|
|
341
352
|
let e = navigator.userAgent.toLowerCase();
|
|
342
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";
|
|
343
354
|
}
|
|
344
355
|
//#endregion
|
|
345
356
|
//#region src/lib/tracking/consent.ts
|
|
346
|
-
var
|
|
347
|
-
function
|
|
348
|
-
|
|
357
|
+
var V = null, H = !1, U = !1, Oe = !1;
|
|
358
|
+
function ke(e) {
|
|
359
|
+
V = e;
|
|
349
360
|
}
|
|
350
|
-
function
|
|
351
|
-
|
|
361
|
+
function Ae(e) {
|
|
362
|
+
H = e;
|
|
352
363
|
}
|
|
353
|
-
function
|
|
354
|
-
return
|
|
364
|
+
function W() {
|
|
365
|
+
return Oe;
|
|
355
366
|
}
|
|
356
|
-
function
|
|
367
|
+
function G() {
|
|
357
368
|
return typeof window < "u" && typeof window.__tcfapi == "function";
|
|
358
369
|
}
|
|
359
|
-
function
|
|
370
|
+
function K() {
|
|
360
371
|
return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
|
|
361
372
|
}
|
|
362
|
-
function
|
|
363
|
-
return
|
|
373
|
+
function je() {
|
|
374
|
+
return V === null ? G() || K() : V;
|
|
364
375
|
}
|
|
365
|
-
function
|
|
366
|
-
return !
|
|
376
|
+
function q() {
|
|
377
|
+
return !je() || H;
|
|
367
378
|
}
|
|
368
|
-
function
|
|
369
|
-
if (
|
|
370
|
-
|
|
379
|
+
function Me() {
|
|
380
|
+
if (U || !G()) return;
|
|
381
|
+
U = !0;
|
|
371
382
|
let e = window.__tcfapi;
|
|
372
383
|
try {
|
|
373
384
|
e("addEventListener", 2, (e, t) => {
|
|
374
385
|
if (!(!t || !e)) {
|
|
375
386
|
if (e.gdprApplies === !1) {
|
|
376
|
-
|
|
387
|
+
K() || (H = !0);
|
|
377
388
|
return;
|
|
378
389
|
}
|
|
379
390
|
if (e.eventStatus === "tcloaded" || e.eventStatus === "useractioncomplete") {
|
|
380
391
|
let t = e.purpose?.consents;
|
|
381
|
-
|
|
392
|
+
H = !!t && Object.values(t).some(Boolean);
|
|
382
393
|
}
|
|
383
394
|
}
|
|
384
395
|
});
|
|
@@ -386,11 +397,11 @@ function Pe() {
|
|
|
386
397
|
}
|
|
387
398
|
//#endregion
|
|
388
399
|
//#region src/lib/tracking/identity.ts
|
|
389
|
-
var
|
|
390
|
-
function
|
|
391
|
-
return typeof e == "string" &&
|
|
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);
|
|
392
403
|
}
|
|
393
|
-
function
|
|
404
|
+
function Fe() {
|
|
394
405
|
let e = typeof crypto < "u" ? crypto : void 0;
|
|
395
406
|
if (e?.randomUUID) return e.randomUUID();
|
|
396
407
|
let t = /* @__PURE__ */ new Uint8Array(16);
|
|
@@ -401,20 +412,20 @@ function K() {
|
|
|
401
412
|
for (let e = 0; e < 16; e++) n.push(t[e].toString(16).padStart(2, "0"));
|
|
402
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]}`;
|
|
403
414
|
}
|
|
404
|
-
function
|
|
405
|
-
let e =
|
|
406
|
-
return e || (e =
|
|
415
|
+
function Ie() {
|
|
416
|
+
let e = g(J);
|
|
417
|
+
return e || (e = Fe(), _(J, e)), e;
|
|
407
418
|
}
|
|
408
|
-
function
|
|
409
|
-
let t =
|
|
410
|
-
if (
|
|
419
|
+
function Le(e) {
|
|
420
|
+
let t = m(Y);
|
|
421
|
+
if (Pe(t)) return {
|
|
411
422
|
id: t,
|
|
412
423
|
createdAt: e,
|
|
413
424
|
migrated: !0
|
|
414
425
|
};
|
|
415
426
|
if (t && typeof t == "object") {
|
|
416
427
|
let { id: n, createdAt: r } = t;
|
|
417
|
-
if (!
|
|
428
|
+
if (!Pe(n)) return null;
|
|
418
429
|
let i = typeof r == "number" && Number.isFinite(r), a = i ? Math.min(r, e) : e;
|
|
419
430
|
return {
|
|
420
431
|
id: n,
|
|
@@ -424,23 +435,23 @@ function Ie(e) {
|
|
|
424
435
|
}
|
|
425
436
|
return null;
|
|
426
437
|
}
|
|
427
|
-
function
|
|
428
|
-
if (!
|
|
429
|
-
let e = Date.now(), t =
|
|
430
|
-
if (t && e - t.createdAt < 34128e6) return t.migrated &&
|
|
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, {
|
|
431
442
|
id: t.id,
|
|
432
443
|
createdAt: t.createdAt
|
|
433
444
|
}), t.id;
|
|
434
|
-
let n =
|
|
435
|
-
return
|
|
445
|
+
let n = Fe();
|
|
446
|
+
return h(Y, {
|
|
436
447
|
id: n,
|
|
437
448
|
createdAt: e
|
|
438
449
|
}), n;
|
|
439
450
|
}
|
|
440
451
|
//#endregion
|
|
441
452
|
//#region src/lib/tracking/attribution-store.ts
|
|
442
|
-
var
|
|
443
|
-
function
|
|
453
|
+
var Re = "micdrop_attribution";
|
|
454
|
+
function ze(e, t) {
|
|
444
455
|
if (!e || !t) return !1;
|
|
445
456
|
try {
|
|
446
457
|
let n = new URL(e).host, r = new URL(t).host;
|
|
@@ -449,26 +460,26 @@ function Le(e, t) {
|
|
|
449
460
|
return !1;
|
|
450
461
|
}
|
|
451
462
|
}
|
|
452
|
-
function
|
|
453
|
-
return
|
|
463
|
+
function Be(e) {
|
|
464
|
+
return I(e.utm) || ze(e.referrer, e.pageUrl);
|
|
454
465
|
}
|
|
455
|
-
function
|
|
456
|
-
let e =
|
|
466
|
+
function Ve() {
|
|
467
|
+
let e = g(Re);
|
|
457
468
|
return !e || !e.utm || typeof e.utm.utmSource != "string" ? null : e;
|
|
458
469
|
}
|
|
459
|
-
function
|
|
460
|
-
let t =
|
|
461
|
-
!t && n ||
|
|
470
|
+
function He(e = B()) {
|
|
471
|
+
let t = Be(e), n = Ve();
|
|
472
|
+
!t && n || _(Re, {
|
|
462
473
|
utm: e.utm,
|
|
463
474
|
referrer: e.referrer,
|
|
464
475
|
marketing: t
|
|
465
476
|
});
|
|
466
477
|
}
|
|
467
478
|
function Z() {
|
|
468
|
-
let e =
|
|
479
|
+
let e = Ve() ?? B();
|
|
469
480
|
return {
|
|
470
|
-
sessionId:
|
|
471
|
-
visitorId:
|
|
481
|
+
sessionId: Ie(),
|
|
482
|
+
visitorId: X(),
|
|
472
483
|
utmSource: e.utm.utmSource,
|
|
473
484
|
utmMedium: e.utm.utmMedium,
|
|
474
485
|
utmCampaign: e.utm.utmCampaign,
|
|
@@ -479,7 +490,7 @@ function Z() {
|
|
|
479
490
|
}
|
|
480
491
|
//#endregion
|
|
481
492
|
//#region src/lib/tracking/beacon.ts
|
|
482
|
-
var
|
|
493
|
+
var Ue = t("tracking"), We = /* @__PURE__ */ new Set([
|
|
483
494
|
"chunk_load_error",
|
|
484
495
|
"type_error",
|
|
485
496
|
"reference_error",
|
|
@@ -490,23 +501,23 @@ var Be = t("tracking"), Ve = /* @__PURE__ */ new Set([
|
|
|
490
501
|
"abort_error",
|
|
491
502
|
"not_supported_error",
|
|
492
503
|
"error"
|
|
493
|
-
]),
|
|
494
|
-
function
|
|
504
|
+
]), Ge = "other";
|
|
505
|
+
function Ke(e) {
|
|
495
506
|
try {
|
|
496
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 ?? "") : "";
|
|
497
508
|
if (t === "ChunkLoadError" || /dynamically imported module/i.test(n)) return "chunk_load_error";
|
|
498
509
|
let r = t.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9_]/g, "");
|
|
499
|
-
return
|
|
510
|
+
return We.has(r) ? r : Ge;
|
|
500
511
|
} catch {
|
|
501
|
-
return
|
|
512
|
+
return Ge;
|
|
502
513
|
}
|
|
503
514
|
}
|
|
504
|
-
var
|
|
515
|
+
var qe = /* @__PURE__ */ new Set([
|
|
505
516
|
"add_to_cart",
|
|
506
517
|
"checkout_started",
|
|
507
518
|
"purchase"
|
|
508
|
-
]),
|
|
509
|
-
function
|
|
519
|
+
]), Je = "micdrop_tracked_beacons", Ye = 300;
|
|
520
|
+
function Xe(e, t, n, r, i, a, o, s = "") {
|
|
510
521
|
let c = n || `url:${o}`, l = [
|
|
511
522
|
e,
|
|
512
523
|
t ?? "",
|
|
@@ -517,27 +528,27 @@ function qe(e, t, n, r, i, a, o, s = "") {
|
|
|
517
528
|
];
|
|
518
529
|
return s && l.push(s), l.join(":");
|
|
519
530
|
}
|
|
520
|
-
function
|
|
531
|
+
function Ze(e) {
|
|
521
532
|
if (e == null || e === "") return null;
|
|
522
533
|
let t = Number(e);
|
|
523
534
|
return Number.isFinite(t) ? t : null;
|
|
524
535
|
}
|
|
525
|
-
function
|
|
526
|
-
let t =
|
|
536
|
+
function Qe(e) {
|
|
537
|
+
let t = g(Je, []) ?? [];
|
|
527
538
|
if (t.includes(e)) return !0;
|
|
528
539
|
let n = [...t, e];
|
|
529
|
-
return
|
|
540
|
+
return _(Je, n.length > Ye ? n.slice(-300) : n), !1;
|
|
530
541
|
}
|
|
531
542
|
async function Q(e, { eventId: t = null, widgetId: n, venueId: r, error: i } = {}) {
|
|
532
|
-
if (typeof window > "u" ||
|
|
533
|
-
let a =
|
|
534
|
-
if (
|
|
535
|
-
let o =
|
|
536
|
-
if (!
|
|
537
|
-
let c = r === void 0 ?
|
|
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 = {
|
|
538
549
|
eventType: e,
|
|
539
|
-
eventId:
|
|
540
|
-
venueId:
|
|
550
|
+
eventId: Ze(t),
|
|
551
|
+
venueId: Ze(c),
|
|
541
552
|
widgetId: s,
|
|
542
553
|
utmSource: a.utm.utmSource,
|
|
543
554
|
utmMedium: a.utm.utmMedium,
|
|
@@ -545,8 +556,8 @@ async function Q(e, { eventId: t = null, widgetId: n, venueId: r, error: i } = {
|
|
|
545
556
|
utmContent: a.utm.utmContent,
|
|
546
557
|
utmTerm: a.utm.utmTerm,
|
|
547
558
|
sessionId: o,
|
|
548
|
-
visitorId:
|
|
549
|
-
deviceType:
|
|
559
|
+
visitorId: X(),
|
|
560
|
+
deviceType: De(),
|
|
550
561
|
referrer: l ? a.referrer : "",
|
|
551
562
|
pageUrl: l ? a.pageUrl : "",
|
|
552
563
|
...i ? {
|
|
@@ -555,49 +566,49 @@ async function Q(e, { eventId: t = null, widgetId: n, venueId: r, error: i } = {
|
|
|
555
566
|
} : {}
|
|
556
567
|
};
|
|
557
568
|
try {
|
|
558
|
-
await fetch(`${
|
|
569
|
+
await fetch(`${D()}/track/pageview`, {
|
|
559
570
|
method: "POST",
|
|
560
571
|
headers: { "Content-Type": "application/json" },
|
|
561
572
|
body: JSON.stringify(u),
|
|
562
573
|
keepalive: !0
|
|
563
574
|
});
|
|
564
575
|
} catch (t) {
|
|
565
|
-
|
|
576
|
+
Ue.error(`Beacon '${e}' failed:`, t);
|
|
566
577
|
}
|
|
567
578
|
}
|
|
568
|
-
var
|
|
579
|
+
var $e = (e, t) => Q("link_click", {
|
|
569
580
|
widgetId: e,
|
|
570
581
|
venueId: t
|
|
571
|
-
}),
|
|
582
|
+
}), et = (e, t) => Q("widget_load", {
|
|
572
583
|
widgetId: e,
|
|
573
584
|
venueId: t
|
|
574
|
-
}),
|
|
585
|
+
}), tt = (e, t) => Q("list_view", {
|
|
575
586
|
widgetId: e,
|
|
576
587
|
venueId: t
|
|
577
|
-
}),
|
|
588
|
+
}), nt = (e, t, n) => Q("event_view", {
|
|
578
589
|
eventId: e,
|
|
579
590
|
widgetId: t,
|
|
580
591
|
venueId: n
|
|
581
|
-
}),
|
|
592
|
+
}), rt = (e, t, n) => Q("add_to_cart", {
|
|
582
593
|
eventId: e,
|
|
583
594
|
widgetId: t,
|
|
584
595
|
venueId: n
|
|
585
|
-
}),
|
|
596
|
+
}), it = (e, t, n) => Q("checkout_started", {
|
|
586
597
|
eventId: e,
|
|
587
598
|
widgetId: t,
|
|
588
599
|
venueId: n
|
|
589
|
-
}),
|
|
600
|
+
}), at = (e, t, n) => Q("purchase", {
|
|
590
601
|
eventId: e,
|
|
591
602
|
widgetId: t,
|
|
592
603
|
venueId: n
|
|
593
604
|
});
|
|
594
|
-
function
|
|
605
|
+
function ot(e, t, n, r) {
|
|
595
606
|
try {
|
|
596
607
|
Q("widget_error", {
|
|
597
608
|
widgetId: n,
|
|
598
609
|
venueId: r,
|
|
599
610
|
error: {
|
|
600
|
-
errName:
|
|
611
|
+
errName: Ke(e),
|
|
601
612
|
stage: t
|
|
602
613
|
}
|
|
603
614
|
}).catch(() => {});
|
|
@@ -606,9 +617,9 @@ function rt(e, t, n, r) {
|
|
|
606
617
|
//#endregion
|
|
607
618
|
//#region src/lib/api/orders.ts
|
|
608
619
|
var $ = t("VC");
|
|
609
|
-
async function
|
|
620
|
+
async function st(e, t, n, r) {
|
|
610
621
|
try {
|
|
611
|
-
let i = await
|
|
622
|
+
let i = await j(`${O()}/cart/${e}/payment-intent`, {
|
|
612
623
|
productQuantities: t,
|
|
613
624
|
...n && Object.keys(n).length > 0 ? { donationAmounts: n } : {},
|
|
614
625
|
...r ? {
|
|
@@ -620,7 +631,7 @@ async function it(e, t, n, r) {
|
|
|
620
631
|
attribution: Z()
|
|
621
632
|
});
|
|
622
633
|
if (!i.success) throw $.error("Payment intent creation failed:", i.error), new a(i.error || "Failed to create payment intent", i.statusCode ?? 0, {
|
|
623
|
-
endpoint: `${
|
|
634
|
+
endpoint: `${O()}/cart/${e}/payment-intent`,
|
|
624
635
|
method: "POST"
|
|
625
636
|
});
|
|
626
637
|
return $.debug("Payment intent created:", i.data), i.data;
|
|
@@ -628,7 +639,7 @@ async function it(e, t, n, r) {
|
|
|
628
639
|
return $.error("createPaymentIntent error:", e), null;
|
|
629
640
|
}
|
|
630
641
|
}
|
|
631
|
-
async function
|
|
642
|
+
async function ct(e, t, n) {
|
|
632
643
|
try {
|
|
633
644
|
let r = {};
|
|
634
645
|
for (let [e, n] of Object.entries(t)) {
|
|
@@ -640,7 +651,7 @@ async function at(e, t, n) {
|
|
|
640
651
|
let n = typeof e == "number" ? e : parseInt(e, 10);
|
|
641
652
|
!Number.isNaN(n) && t > 0 && (i[n] = t);
|
|
642
653
|
}
|
|
643
|
-
let a = await fetch(`${
|
|
654
|
+
let a = await fetch(`${O()}/cart/${e}`, {
|
|
644
655
|
method: "PUT",
|
|
645
656
|
headers: { "Content-Type": "application/json" },
|
|
646
657
|
body: JSON.stringify({
|
|
@@ -657,9 +668,9 @@ async function at(e, t, n) {
|
|
|
657
668
|
return $.error("updateCartQuantities error:", e), !1;
|
|
658
669
|
}
|
|
659
670
|
}
|
|
660
|
-
async function
|
|
671
|
+
async function lt(e, t = "") {
|
|
661
672
|
try {
|
|
662
|
-
let n = await
|
|
673
|
+
let n = await j(`${D()}/orders/${e}/refund`, { message: t });
|
|
663
674
|
return n.success ? { success: !0 } : ($.error("Refund request failed:", n.error), {
|
|
664
675
|
success: !1,
|
|
665
676
|
error: n.error || "Failed to submit refund request"
|
|
@@ -671,9 +682,9 @@ async function ot(e, t = "") {
|
|
|
671
682
|
};
|
|
672
683
|
}
|
|
673
684
|
}
|
|
674
|
-
async function
|
|
685
|
+
async function ut(e, t) {
|
|
675
686
|
try {
|
|
676
|
-
let n = await
|
|
687
|
+
let n = await j(`${O()}/validatePaymentIntent/${e}`, {
|
|
677
688
|
...t,
|
|
678
689
|
attribution: Z()
|
|
679
690
|
});
|
|
@@ -697,9 +708,9 @@ async function st(e, t) {
|
|
|
697
708
|
return $.error("validatePaymentIntent error:", e), null;
|
|
698
709
|
}
|
|
699
710
|
}
|
|
700
|
-
async function
|
|
711
|
+
async function dt(e) {
|
|
701
712
|
try {
|
|
702
|
-
let t = await
|
|
713
|
+
let t = await j(`${D()}/orders/extend-session`, { orderUuid: e });
|
|
703
714
|
if (!t.success) return {
|
|
704
715
|
success: !1,
|
|
705
716
|
error: t.error || "Failed to extend session",
|
|
@@ -718,9 +729,9 @@ async function ct(e) {
|
|
|
718
729
|
};
|
|
719
730
|
}
|
|
720
731
|
}
|
|
721
|
-
async function
|
|
732
|
+
async function ft(e) {
|
|
722
733
|
try {
|
|
723
|
-
let t = await
|
|
734
|
+
let t = await A(`${D()}/orders/session/${e}`);
|
|
724
735
|
if (!t.success) return {
|
|
725
736
|
error: t.error || "No active session found",
|
|
726
737
|
notFound: t.statusCode === 404
|
|
@@ -739,4 +750,4 @@ async function lt(e) {
|
|
|
739
750
|
}
|
|
740
751
|
}
|
|
741
752
|
//#endregion
|
|
742
|
-
export {
|
|
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 };
|