@getmicdrop/venue-calendar 4.3.63 → 4.3.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AddOnCard-DAk2utke.js → AddOnCard-CmK4bDY6.js} +4 -4
- package/dist/{ArrowLeftIcon-B2NmxWA9.js → ArrowLeftIcon-DcG0YVCM.js} +1 -1
- package/dist/{BlockPlaceholder-IligENph.js → BlockPlaceholder-BRzS72r6.js} +1 -1
- package/dist/{Calendar-DM7xqU81.js → Calendar-BOweKeiV.js} +2 -2
- package/dist/{CalendarFoundryView-uG2d_J_1.js → CalendarFoundryView-CcOPZ_Nu.js} +90 -43
- package/dist/{CalendarIcon-3jHpw2aE.js → CalendarIcon-DuxP0sxw.js} +1 -1
- package/dist/{CartView-C3yY3Umt.js → CartView-YNf1axYi.js} +33 -33
- package/dist/{Checkout-AGHr3pGm.js → Checkout-9Qi44T1Y.js} +11 -11
- package/dist/{Checkout-D5xQo_-j.js → Checkout-ipuGLBT2.js} +10 -10
- package/dist/{CheckoutTimer-Btjo7PEg.js → CheckoutTimer-DTufmYO_.js} +1 -1
- package/dist/{ChevronDownIcon-Dp1MGPEN.js → ChevronDownIcon-ClOg3b7E.js} +1 -1
- package/dist/{CloseIcon-DKrZf_7a.js → CloseIcon-CWQWjUzZ.js} +1 -1
- package/dist/{CollectionView-CbpcbtPQ.js → CollectionView-PRegJwQb.js} +4 -4
- package/dist/{Event-Ct04hk5X.js → Event--MH8pGju.js} +63 -63
- package/dist/{EventPage-EMPylUho.js → EventPage-BGYvfkiB.js} +9 -9
- package/dist/{Input-CLSPTEMv.js → Input-BT3hf13K.js} +1 -1
- package/dist/{MailIcon-COatZ9tD.js → MailIcon-ivrn0IXt.js} +1 -1
- package/dist/{PasswordInput-BxuPPAe8.js → PasswordInput-CYZVT6fp.js} +1 -1
- package/dist/{RecommendationsRail-DGvzlf9S.js → RecommendationsRail-CPr__oRL.js} +11 -11
- package/dist/{ScarcityBadge-DU6RgcCz.js → ScarcityBadge-CDDlvbDh.js} +3 -3
- package/dist/{Select-CjELEaSF.js → Select-DWFgeD9R.js} +96 -83
- package/dist/{SeriesPage-BJf6QYfI.js → SeriesPage-DhmD95h9.js} +2 -2
- package/dist/{Success-Cbpn0t0r.js → Success-Cgrr7FqT.js} +10 -10
- package/dist/{TagIcon-CfyFlUh_.js → TagIcon-CFtOYvWM.js} +1 -1
- package/dist/{WarningCircleIcon-DsYifP07.js → WarningCircleIcon-Nmw1CPAT.js} +1 -1
- package/dist/{WarningTriIcon-C2oaxNjx.js → WarningTriIcon-flvVXH1d.js} +1 -1
- package/dist/{api-BX4Imu-R.js → api-Vyamuo2p.js} +1 -1
- package/dist/{copyToClipboard-CIu22_xq.js → copyToClipboard-BmB4QyKB.js} +1 -1
- package/dist/{createErrorGate.svelte-Z3I2WfRr.js → createErrorGate.svelte-CDXAf5Lm.js} +1 -1
- package/dist/{scarcity-ClhXuC6t.js → datetime-ClxISJBt.js} +58 -57
- package/dist/{event-transform-CG6CJlbD.js → event-transform-L2ZTddgP.js} +19 -19
- package/dist/{href-Dz1CMH4c.js → href-DKLRNO3s.js} +1 -1
- package/dist/{i18n-DLFy3vxe.js → i18n-DFlVZfRe.js} +9 -9
- package/dist/{to-event-card-props-DObG6xUq.js → to-event-card-props-CmDQ3iGb.js} +34 -35
- package/dist/types/index.d.ts +602 -597
- package/dist/{utils-C15ZjLiK.js → utils-C_wZYlA9.js} +1 -1
- package/dist/venue-calendar.es.js +31 -31
- package/dist/venue-calendar.iife.js +22 -22
- package/dist/venue-calendar.umd.js +50 -50
- package/package.json +3 -2
- package/src/lib/constants/scarcity.ts +181 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/flow/de.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/flow/es.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/flow/id.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/flow/it.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/flow/zh.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/main/de.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/main/es.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/main/fr.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/main/id.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/main/it.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/main/ja.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/main/ko.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/main/nl.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/main/pl.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/main/pt-br.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/main/tr.js +0 -0
- /package/dist/locales/{4.3.63 → 4.3.65}/main/zh.js +0 -0
|
@@ -231,69 +231,89 @@ function U(e) {
|
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
//#endregion
|
|
234
|
+
//#region src/lib/constants/scarcity.ts
|
|
235
|
+
var W = {
|
|
236
|
+
URGENT_PCT: 10,
|
|
237
|
+
LOW_PCT: 20,
|
|
238
|
+
MAX_EXACT_COUNT: 20,
|
|
239
|
+
ABSOLUTE_FLOOR: 5,
|
|
240
|
+
ABSOLUTE_CAP: 30
|
|
241
|
+
}, le = { CLAIM_ON_UNTOUCHED_POOL: !0 };
|
|
242
|
+
function G(e, t) {
|
|
243
|
+
let { ABSOLUTE_FLOOR: n, ABSOLUTE_CAP: r } = W, i = r / t * 100, a = n / t * 100;
|
|
244
|
+
return Math.max(Math.min(e, i), a);
|
|
245
|
+
}
|
|
246
|
+
function ue(e, t, n = le) {
|
|
247
|
+
if (t <= 0) return "plenty";
|
|
248
|
+
if (e <= 0) return "sold-out";
|
|
249
|
+
if (!n.CLAIM_ON_UNTOUCHED_POOL && e >= t) return "plenty";
|
|
250
|
+
let r = e / t * 100, { URGENT_PCT: i, LOW_PCT: a, MAX_EXACT_COUNT: o } = W, s = G(i, t), c = G(a, t);
|
|
251
|
+
return r <= s && e <= o ? "urgent" : r <= c ? "low" : "plenty";
|
|
252
|
+
}
|
|
253
|
+
//#endregion
|
|
234
254
|
//#region src/lib/core/datetime.js
|
|
235
|
-
var
|
|
236
|
-
function
|
|
237
|
-
let n = `${e}|${JSON.stringify(t)}`, r =
|
|
238
|
-
return r ? (
|
|
255
|
+
var K = /* @__PURE__ */ new Map(), de = 64;
|
|
256
|
+
function fe(e, t) {
|
|
257
|
+
let n = `${e}|${JSON.stringify(t)}`, r = K.get(n);
|
|
258
|
+
return r ? (K.delete(n), K.set(n, r), r) : (r = new Intl.DateTimeFormat(e, t), K.set(n, r), K.size > de && K.delete(K.keys().next().value), r);
|
|
239
259
|
}
|
|
240
|
-
function
|
|
260
|
+
function q(e) {
|
|
241
261
|
if (e == null) return null;
|
|
242
262
|
let t = Number(e);
|
|
243
263
|
return Number.isFinite(t) ? t : null;
|
|
244
264
|
}
|
|
245
|
-
function
|
|
246
|
-
let t =
|
|
247
|
-
return t === null ? null : t === 0 ? 0 : P(t + (
|
|
265
|
+
function J(e) {
|
|
266
|
+
let t = q(e?.price);
|
|
267
|
+
return t === null ? null : t === 0 ? 0 : P(t + (q(e?.fee) ?? 0));
|
|
248
268
|
}
|
|
249
|
-
function
|
|
250
|
-
return
|
|
269
|
+
function pe(e, t = l) {
|
|
270
|
+
return Y(J(e), t);
|
|
251
271
|
}
|
|
252
|
-
function
|
|
272
|
+
function me(e) {
|
|
253
273
|
return F(e, {
|
|
254
274
|
minimumFractionDigits: Number.isInteger(e) ? 0 : 2,
|
|
255
275
|
maximumFractionDigits: 2
|
|
256
276
|
});
|
|
257
277
|
}
|
|
258
|
-
function
|
|
278
|
+
function Y(e, t = l) {
|
|
259
279
|
return e == null ? "—" : e <= 0 ? t.free || "Free" : F(e);
|
|
260
280
|
}
|
|
261
|
-
function
|
|
281
|
+
function X(e) {
|
|
262
282
|
if (e == null || e === "" || typeof e != "string" && typeof e != "number" && !(e instanceof Date)) return null;
|
|
263
283
|
let t = new Date(e);
|
|
264
284
|
return isNaN(t.getTime()) ? null : t;
|
|
265
285
|
}
|
|
266
|
-
function
|
|
267
|
-
let a =
|
|
286
|
+
function Z(e, t, r, i) {
|
|
287
|
+
let a = X(e);
|
|
268
288
|
if (!a) return "";
|
|
269
289
|
let o = c(t) ? t : n;
|
|
270
|
-
return
|
|
290
|
+
return fe(i || "en-US", {
|
|
271
291
|
...r,
|
|
272
292
|
timeZone: o
|
|
273
293
|
}).format(a);
|
|
274
294
|
}
|
|
275
|
-
function
|
|
276
|
-
return
|
|
295
|
+
function Q(e, t) {
|
|
296
|
+
return Z(e, t, {
|
|
277
297
|
year: "numeric",
|
|
278
298
|
month: "2-digit",
|
|
279
299
|
day: "2-digit"
|
|
280
300
|
}, "en-CA");
|
|
281
301
|
}
|
|
282
|
-
function
|
|
283
|
-
return
|
|
302
|
+
function $(e, t, n) {
|
|
303
|
+
return Z(e, t, {
|
|
284
304
|
hour: "numeric",
|
|
285
305
|
minute: "2-digit",
|
|
286
306
|
hour12: !0
|
|
287
307
|
}, n);
|
|
288
308
|
}
|
|
289
|
-
function
|
|
290
|
-
let i =
|
|
309
|
+
function he(e, t, n, r) {
|
|
310
|
+
let i = $(e, n, r);
|
|
291
311
|
if (!t) return i;
|
|
292
|
-
let a =
|
|
312
|
+
let a = $(t, n, r);
|
|
293
313
|
return i && a ? `${i} - ${a}` : i;
|
|
294
314
|
}
|
|
295
|
-
function
|
|
296
|
-
if (!
|
|
315
|
+
function ge(e, t, r) {
|
|
316
|
+
if (!X(e)) return {
|
|
297
317
|
day: "",
|
|
298
318
|
month: "",
|
|
299
319
|
date: 0,
|
|
@@ -301,55 +321,36 @@ function he(e, t, r) {
|
|
|
301
321
|
};
|
|
302
322
|
let i = c(t) ? t : n;
|
|
303
323
|
return {
|
|
304
|
-
day:
|
|
305
|
-
month:
|
|
306
|
-
date: parseInt(
|
|
307
|
-
year: parseInt(
|
|
324
|
+
day: Z(e, i, { weekday: "short" }, r),
|
|
325
|
+
month: Z(e, i, { month: "short" }, r),
|
|
326
|
+
date: parseInt(Z(e, i, { day: "numeric" }, "en-US"), 10),
|
|
327
|
+
year: parseInt(Z(e, i, { year: "numeric" }, "en-US"), 10)
|
|
308
328
|
};
|
|
309
329
|
}
|
|
310
|
-
function
|
|
311
|
-
return
|
|
330
|
+
function _e(e, t, n) {
|
|
331
|
+
return Z(e, t, {
|
|
312
332
|
weekday: "short",
|
|
313
333
|
month: "short",
|
|
314
334
|
day: "numeric"
|
|
315
335
|
}, n);
|
|
316
336
|
}
|
|
317
|
-
function
|
|
318
|
-
return
|
|
337
|
+
function ve(e, t, n) {
|
|
338
|
+
return Z(e, t, {
|
|
319
339
|
weekday: "long",
|
|
320
340
|
year: "numeric",
|
|
321
341
|
month: "long",
|
|
322
342
|
day: "numeric"
|
|
323
343
|
}, n);
|
|
324
344
|
}
|
|
325
|
-
function
|
|
326
|
-
return
|
|
345
|
+
function ye(e, t, n) {
|
|
346
|
+
return Z(e, t, {
|
|
327
347
|
weekday: "long",
|
|
328
348
|
month: "long",
|
|
329
349
|
day: "numeric"
|
|
330
350
|
}, n);
|
|
331
351
|
}
|
|
332
|
-
function
|
|
333
|
-
return e == null || e === "" ? "" : typeof e == "string" && /^\d{1,2}:\d{2}\s*(AM|PM)$/i.test(e) ? e :
|
|
334
|
-
}
|
|
335
|
-
//#endregion
|
|
336
|
-
//#region src/lib/constants/scarcity.ts
|
|
337
|
-
var Q = {
|
|
338
|
-
URGENT_PCT: 10,
|
|
339
|
-
LOW_PCT: 20,
|
|
340
|
-
MAX_EXACT_COUNT: 20,
|
|
341
|
-
ABSOLUTE_FLOOR: 5,
|
|
342
|
-
ABSOLUTE_CAP: 30
|
|
343
|
-
};
|
|
344
|
-
function $(e, t) {
|
|
345
|
-
let { ABSOLUTE_FLOOR: n, ABSOLUTE_CAP: r } = Q, i = r / t * 100, a = n / t * 100;
|
|
346
|
-
return Math.max(Math.min(e, i), a);
|
|
347
|
-
}
|
|
348
|
-
function ye(e, t) {
|
|
349
|
-
if (t <= 0) return "plenty";
|
|
350
|
-
if (e <= 0) return "sold-out";
|
|
351
|
-
let n = e / t * 100, { URGENT_PCT: r, LOW_PCT: i, MAX_EXACT_COUNT: a } = Q, o = $(r, t), s = $(i, t);
|
|
352
|
-
return n <= o && e <= a ? "urgent" : n <= s ? "low" : "plenty";
|
|
352
|
+
function be(e, t, n) {
|
|
353
|
+
return e == null || e === "" ? "" : typeof e == "string" && /^\d{1,2}:\d{2}\s*(AM|PM)$/i.test(e) ? e : $(e, t, n) || (typeof e == "string" ? e : "");
|
|
353
354
|
}
|
|
354
355
|
//#endregion
|
|
355
|
-
export { ae as A, te as B, V as C, A as D, P as E, j as F, h as G, E as H, w as I, g as K, T as L, N as M, M as N, ee as O, oe as P, D as R, se as S, U as T, ne as U, C as V, y as W, ce as _,
|
|
356
|
+
export { ae as A, te as B, V as C, A as D, P as E, j as F, h as G, E as H, w as I, g as K, T as L, N as M, M as N, ee as O, oe as P, D as R, se as S, U as T, ne as U, C as V, y as W, ce as _, Z as a, H as b, he as c, me as d, Y as f, ue as g, W as h, ye as i, k as j, ie as k, ge as l, J as m, Q as n, $ as o, pe as p, be as r, ve as s, _e as t, q as u, I as v, z as w, F as x, B as y, O as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, c as t, l as n, n as r, o as i } from "./datetime-ClxISJBt.js";
|
|
2
2
|
import { C as a } from "./defaultLabels-DdcEwzXA.js";
|
|
3
|
-
import { I as o, L as s, N as c, R as l, z as u } from "./api-
|
|
3
|
+
import { I as o, L as s, N as c, R as l, z as u } from "./api-Vyamuo2p.js";
|
|
4
4
|
import { t as d } from "./imageUrl-Bata3II2.js";
|
|
5
5
|
import { t as f } from "./event-RAxNIB4i.js";
|
|
6
6
|
//#region src/lib/constants/colors.ts
|
|
@@ -134,29 +134,29 @@ function S(e, t, n) {
|
|
|
134
134
|
let r = new Date(e);
|
|
135
135
|
return isNaN(r.getTime()) ? "" : x("en-US", t, n).format(r);
|
|
136
136
|
}
|
|
137
|
-
function C(
|
|
138
|
-
if (!
|
|
137
|
+
function C(e, n) {
|
|
138
|
+
if (!e.startDateTime) return "";
|
|
139
139
|
try {
|
|
140
|
-
return
|
|
140
|
+
return e.endDateTime ? t(e.startDateTime, e.endDateTime, n) : i(e.startDateTime, n);
|
|
141
141
|
} catch {
|
|
142
|
-
let
|
|
142
|
+
let t = {
|
|
143
143
|
hour: "numeric",
|
|
144
144
|
minute: "2-digit",
|
|
145
145
|
hour12: !0
|
|
146
|
-
}, r = S(
|
|
147
|
-
if (!
|
|
148
|
-
let i = S(
|
|
146
|
+
}, r = S(e.startDateTime, n, t);
|
|
147
|
+
if (!e.endDateTime) return r;
|
|
148
|
+
let i = S(e.endDateTime, n, t);
|
|
149
149
|
return r && i ? `${r} - ${i}` : r;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
function w(e,
|
|
152
|
+
function w(e, t) {
|
|
153
153
|
if (!e) return {
|
|
154
154
|
day: "",
|
|
155
155
|
month: "",
|
|
156
156
|
dateOfMonth: ""
|
|
157
157
|
};
|
|
158
158
|
try {
|
|
159
|
-
let r =
|
|
159
|
+
let r = n(e, t);
|
|
160
160
|
return {
|
|
161
161
|
day: r.day,
|
|
162
162
|
month: r.month,
|
|
@@ -164,9 +164,9 @@ function w(e, n) {
|
|
|
164
164
|
};
|
|
165
165
|
} catch {
|
|
166
166
|
return {
|
|
167
|
-
day: S(e,
|
|
168
|
-
month: S(e,
|
|
169
|
-
dateOfMonth: S(e,
|
|
167
|
+
day: S(e, t, { weekday: "short" }),
|
|
168
|
+
month: S(e, t, { month: "short" }),
|
|
169
|
+
dateOfMonth: S(e, t, { day: "numeric" })
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
}
|
|
@@ -187,8 +187,8 @@ function E(e, t = { mode: T.DETAIL }) {
|
|
|
187
187
|
};
|
|
188
188
|
return n === T.BROWSE ? D(e, r, s, i) : O(e, r, s, i, o);
|
|
189
189
|
}
|
|
190
|
-
function D(e, t,
|
|
191
|
-
let a = t.startDateTime ?
|
|
190
|
+
function D(e, t, n, i) {
|
|
191
|
+
let a = t.startDateTime ? r(t.startDateTime, i) : "", s;
|
|
192
192
|
if (typeof t.ticketsRemaining == "number" && typeof t.ticketsTotal == "number") {
|
|
193
193
|
let e = t.ticketsRemaining, n = t.ticketsTotal;
|
|
194
194
|
s = {
|
|
@@ -204,7 +204,7 @@ function D(e, t, r, i) {
|
|
|
204
204
|
s = o(t);
|
|
205
205
|
}
|
|
206
206
|
return {
|
|
207
|
-
...
|
|
207
|
+
...n,
|
|
208
208
|
image: d(e, { placeholder: "" }),
|
|
209
209
|
date: a || t.date || "",
|
|
210
210
|
status: t.status || "On Sale",
|
|
@@ -278,8 +278,8 @@ function O(e, t, n, r, i) {
|
|
|
278
278
|
displayAgeRestriction: t.displayAgeRestriction ?? !1
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
|
-
function k(
|
|
282
|
-
return
|
|
281
|
+
function k(t, n) {
|
|
282
|
+
return t && e(t, n, {
|
|
283
283
|
weekday: "short",
|
|
284
284
|
month: "short",
|
|
285
285
|
day: "numeric",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as e } from "./sizing-CFDo_qh_.js";
|
|
2
|
-
import { K as t } from "./
|
|
2
|
+
import { K as t } from "./datetime-ClxISJBt.js";
|
|
3
3
|
import { V as n } from "./defaultLabels-DdcEwzXA.js";
|
|
4
4
|
import "svelte/internal/disclose-version";
|
|
5
5
|
import * as r from "svelte/internal/client";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { E as e, W as t,
|
|
1
|
+
import { E as e, W as t, d as n, f as r, g as i, h as a, m as o, x as s } from "./datetime-ClxISJBt.js";
|
|
2
2
|
import { B as c, S as l, d as u, f as d, g as f, u as p, w as m, x as h } from "./defaultLabels-DdcEwzXA.js";
|
|
3
3
|
import { r as g } from "./Button-CsbNNvbX.js";
|
|
4
4
|
import { u as _ } from "./orders-hXWbPM_g.js";
|
|
5
|
-
import { F as v, P as y } from "./api-
|
|
5
|
+
import { F as v, P as y } from "./api-Vyamuo2p.js";
|
|
6
6
|
import { t as b } from "./Text-CqjLjIF8.js";
|
|
7
7
|
import { n as x } from "./constants-CBPzJAKF.js";
|
|
8
8
|
import "svelte/internal/disclose-version";
|
|
@@ -124,7 +124,7 @@ function T(e, t) {
|
|
|
124
124
|
return n === "sold-out" ? "sold_out" : n === "plenty" ? "none" : n;
|
|
125
125
|
}
|
|
126
126
|
function E(e, t, n, r) {
|
|
127
|
-
return e === "none" ? null : e === "sold_out" ? "Sold out" : r?.isFree ? null : e === "urgent" && n !== "browse" && t <=
|
|
127
|
+
return e === "none" ? null : e === "sold_out" ? "Sold out" : r?.isFree ? null : e === "urgent" && n !== "browse" && t <= a.MAX_EXACT_COUNT ? `Only ${t} left` : e === "low" || e === "urgent" ? "Selling fast" : null;
|
|
128
128
|
}
|
|
129
129
|
var D = {
|
|
130
130
|
cancelled: (e) => e.eventCancelled,
|
|
@@ -225,12 +225,12 @@ function F(e) {
|
|
|
225
225
|
function I(e) {
|
|
226
226
|
let t = e.tickets.filter((e) => e.status === "on_sale" && !e.isHidden);
|
|
227
227
|
if (t.length === 0) return null;
|
|
228
|
-
let r = t.some((e) => e.isDonation || e.ticketType === 2), i = t.filter((e) => !e.isDonation && e.ticketType !== 2),
|
|
229
|
-
if (s.length === 0 && !
|
|
230
|
-
if (s.length === 0 &&
|
|
231
|
-
let c = Math.min(...s.map((e) =>
|
|
232
|
-
if (
|
|
233
|
-
let l =
|
|
228
|
+
let r = t.some((e) => e.isDonation || e.ticketType === 2), i = t.filter((e) => !e.isDonation && e.ticketType !== 2), a = i.some((e) => e.price === 0), s = i.filter((e) => e.price > 0);
|
|
229
|
+
if (s.length === 0 && !a && r) return "Donation";
|
|
230
|
+
if (s.length === 0 && a) return null;
|
|
231
|
+
let c = Math.min(...s.map((e) => o(e) ?? e.price));
|
|
232
|
+
if (a) return "Free";
|
|
233
|
+
let l = n(c);
|
|
234
234
|
return r ? `From ${l}` : s.length === 1 ? l : `From ${l}`;
|
|
235
235
|
}
|
|
236
236
|
function L(t, n) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as e, p as t } from "./sizing-CFDo_qh_.js";
|
|
2
|
-
import {
|
|
2
|
+
import { g as n, n as r, o as i, r as a, t as o } from "./datetime-ClxISJBt.js";
|
|
3
3
|
import { V as s, g as c, i as l, t as u, x as d, y as f } from "./defaultLabels-DdcEwzXA.js";
|
|
4
4
|
import { r as p, t as m } from "./Button-CsbNNvbX.js";
|
|
5
5
|
import "svelte/internal/disclose-version";
|
|
@@ -26,7 +26,7 @@ var g = {
|
|
|
26
26
|
function v() {
|
|
27
27
|
return _ += 1;
|
|
28
28
|
}
|
|
29
|
-
var y = h.from_html("<div class=\"event-card__poster-fallback svelte-18ndok6\" aria-hidden=\"true\"><span> </span></div>"), b = h.from_html("<div><!></div>"),
|
|
29
|
+
var y = h.from_html("<div class=\"event-card__poster-fallback svelte-18ndok6\" aria-hidden=\"true\"><span> </span></div>"), b = h.from_html("<div><!></div>"), x = h.from_html("<span class=\"event-card__badge svelte-18ndok6\"><!></span>"), ee = h.from_html("<span> </span>"), te = h.from_html("<span class=\"event-card__meta-sep svelte-18ndok6\" aria-hidden=\"true\">·</span>"), S = h.from_html("<!> <span class=\"event-card__meta-item svelte-18ndok6\"> </span>", 1), ne = h.from_html("<p class=\"event-card__meta tone-secondary m-0 svelte-18ndok6\"></p>"), C = h.from_html("<div class=\"event-card__pills flex flex-wrap gap-2 relative svelte-18ndok6\"></div>"), w = h.from_html("<p class=\"event-card__description type-body tone-secondary m-0 svelte-18ndok6\"> </p>"), re = h.from_html("<article class=\"event-card relative rounded-lg border bg-card border-border overflow-hidden svelte-18ndok6\"><!> <div class=\"event-card__content flex flex-col flex-1 min-w-0 svelte-18ndok6\"><header class=\"event-card__header\"><h3><span class=\"event-card__title-text\"><!> <a class=\"event-card__title-link svelte-18ndok6\" rel=\"external\"> </a></span></h3></header> <!> <!> <!> <!></div></article>");
|
|
30
30
|
function T(n, r) {
|
|
31
31
|
h.push(r, !0);
|
|
32
32
|
let i = h.prop(r, "layout", 3, "vertical"), a = h.prop(r, "density", 3, "standard"), o = h.prop(r, "imageUrl", 3, ""), c = h.prop(r, "placeholderImage", 3, ""), u = h.prop(r, "hidePoster", 3, !1), d = h.prop(r, "posterFit", 3, "fit"), f = h.prop(r, "posterBackdrop", 3, "blur"), p = h.prop(r, "dateLabel", 3, ""), _ = h.prop(r, "meta", 19, () => []), T = h.prop(r, "description", 3, ""), E = h.prop(r, "badge", 3, null), D = h.prop(r, "pills", 19, () => []), O = h.prop(r, "pillVariant", 3, "alternative"), k = h.prop(r, "showDescription", 3, !1), A = h.prop(r, "hideDate", 3, !1), j = h.derived(() => g[a()]), M = h.derived(() => d() === "fit" && f() === "color"), N = `event-card-title-${v()}`, P = h.derived(() => k() && !!T() && (a() === "standard" || a() === "featured")), F = h.derived(() => !A() && a() !== "micro" && !!p()), I = h.derived(() => _().filter((e) => typeof e == "string" && e.trim() !== "")), L = h.derived(() => a() !== "micro" && h.get(I).length > 0), R = h.derived(() => !o() && !c());
|
|
@@ -36,7 +36,7 @@ function T(n, r) {
|
|
|
36
36
|
function B(e) {
|
|
37
37
|
e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || r.onclick && (e.preventDefault(), r.onclick());
|
|
38
38
|
}
|
|
39
|
-
var V =
|
|
39
|
+
var V = re(), H = h.child(V), U = (n) => {
|
|
40
40
|
var i = b(), a = h.child(i), l = (n) => {
|
|
41
41
|
var i = y(), a = h.child(i), o = h.child(a, !0);
|
|
42
42
|
h.reset(a), h.reset(i), h.template_effect(() => {
|
|
@@ -82,7 +82,7 @@ function T(n, r) {
|
|
|
82
82
|
u() || e(U);
|
|
83
83
|
});
|
|
84
84
|
var W = h.sibling(H, 2), G = h.child(W), K = h.child(G), q = h.child(K), J = h.child(q), Y = (e) => {
|
|
85
|
-
var t =
|
|
85
|
+
var t = x(), n = h.child(t);
|
|
86
86
|
l(n, {
|
|
87
87
|
get variant() {
|
|
88
88
|
return E().variant;
|
|
@@ -104,7 +104,7 @@ function T(n, r) {
|
|
|
104
104
|
var X = h.sibling(J, 2), ie = h.child(X, !0);
|
|
105
105
|
h.reset(X), h.reset(q), h.reset(K), h.reset(G);
|
|
106
106
|
var Z = h.sibling(G, 2), ae = (e) => {
|
|
107
|
-
var n =
|
|
107
|
+
var n = ee(), r = h.child(n, !0);
|
|
108
108
|
h.reset(n), h.template_effect(() => {
|
|
109
109
|
h.set_class(n, 1, `event-card__date tone-secondary ${t.emphasis ?? ""}`, "svelte-18ndok6"), h.set_text(r, p());
|
|
110
110
|
}), h.append(e, n);
|
|
@@ -113,10 +113,10 @@ function T(n, r) {
|
|
|
113
113
|
h.get(F) && e(ae);
|
|
114
114
|
});
|
|
115
115
|
var Q = h.sibling(Z, 2), oe = (e) => {
|
|
116
|
-
var t =
|
|
116
|
+
var t = ne();
|
|
117
117
|
h.each(t, 21, () => h.get(I), h.index, (e, t, n) => {
|
|
118
|
-
var r =
|
|
119
|
-
var t =
|
|
118
|
+
var r = S(), i = h.first_child(r), a = (e) => {
|
|
119
|
+
var t = te();
|
|
120
120
|
h.append(e, t);
|
|
121
121
|
};
|
|
122
122
|
h.if(i, (e) => {
|
|
@@ -130,7 +130,7 @@ function T(n, r) {
|
|
|
130
130
|
h.get(L) && e(oe);
|
|
131
131
|
});
|
|
132
132
|
var $ = h.sibling(Q, 2), se = (e) => {
|
|
133
|
-
var t =
|
|
133
|
+
var t = C();
|
|
134
134
|
h.each(t, 21, D, h.index, (e, t, n) => {
|
|
135
135
|
{
|
|
136
136
|
let r = h.derived(() => O() === "primary" ? "default" : "alternative"), i = h.derived(() => h.get(t).ariaLabel ?? h.get(t).timeLabel);
|
|
@@ -162,7 +162,7 @@ function T(n, r) {
|
|
|
162
162
|
D().length > 0 && e(se);
|
|
163
163
|
});
|
|
164
164
|
var ce = h.sibling($, 2), le = (e) => {
|
|
165
|
-
var t =
|
|
165
|
+
var t = w(), n = h.child(t, !0);
|
|
166
166
|
h.reset(t), h.template_effect(() => h.set_text(n, T())), h.append(e, t);
|
|
167
167
|
};
|
|
168
168
|
h.if(ce, (e) => {
|
|
@@ -230,8 +230,8 @@ function M(e) {
|
|
|
230
230
|
return e.toLowerCase().replace(/[\s_-]+/g, "");
|
|
231
231
|
}
|
|
232
232
|
function N(e) {
|
|
233
|
-
if (M(e.status) !== "onsale" || e.ticketsRemaining == null || e.ticketsTotal == null || e.ticketsTotal === 0 || e.ticketsRemaining <= 0) return !1;
|
|
234
|
-
let t =
|
|
233
|
+
if (M(e.status ?? "") !== "onsale" || e.ticketsRemaining == null || e.ticketsTotal == null || e.ticketsTotal === 0 || e.ticketsRemaining <= 0) return !1;
|
|
234
|
+
let t = n(e.ticketsRemaining, e.ticketsTotal);
|
|
235
235
|
return t === "low" || t === "urgent";
|
|
236
236
|
}
|
|
237
237
|
function P(e, t) {
|
|
@@ -333,59 +333,58 @@ function R(e) {
|
|
|
333
333
|
let t = f();
|
|
334
334
|
return e.filter((e) => {
|
|
335
335
|
if (M(e.status ?? "") === "postponed") return !0;
|
|
336
|
-
let n =
|
|
336
|
+
let n = r(t, e.timeZone);
|
|
337
337
|
return e.date >= n;
|
|
338
338
|
}).sort((e, t) => e.date.localeCompare(t.date));
|
|
339
339
|
}
|
|
340
340
|
//#endregion
|
|
341
341
|
//#region src/lib/browse-widgets/to-event-card-props.ts
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
return !r || r <= 0 ? null : n <= 0 ? {
|
|
342
|
+
function z(e, t) {
|
|
343
|
+
let r = e.ticketsRemaining ?? 0, i = e.ticketsTotal ?? 0, a = n(r, i);
|
|
344
|
+
return a === "sold-out" ? {
|
|
346
345
|
text: t.statusSoldOut || "Sold out",
|
|
347
346
|
variant: "error"
|
|
348
|
-
} :
|
|
347
|
+
} : a === "low" || a === "urgent" ? {
|
|
349
348
|
text: t.statusSellingFast || "Selling fast",
|
|
350
349
|
variant: "warning"
|
|
351
350
|
} : null;
|
|
352
351
|
}
|
|
353
|
-
function
|
|
352
|
+
function B(e, t, n, r) {
|
|
354
353
|
let o = [];
|
|
355
354
|
if (e.stageName && o.push(e.stageName), e.displayDoorsTime === !0 && e.doorsOpenTime) {
|
|
356
|
-
let t =
|
|
357
|
-
t && o.push((
|
|
355
|
+
let t = a(e.doorsOpenTime, e.timeZone, r);
|
|
356
|
+
t && o.push((n.doorsAtTime || "Doors {time}").replace("{time}", t));
|
|
358
357
|
}
|
|
359
358
|
if (!t && e.displayStartTime !== !1 && e.startDateTime) {
|
|
360
|
-
let t =
|
|
361
|
-
t && o.push((
|
|
359
|
+
let t = i(e.startDateTime, e.timeZone, r);
|
|
360
|
+
t && o.push((n.showAtTime || "Show {time}").replace("{time}", t));
|
|
362
361
|
}
|
|
363
|
-
return e.displayAgeRestriction && o.push(e.ageRestriction && e.ageRestriction > 0 ? (
|
|
362
|
+
return e.displayAgeRestriction && o.push(e.ageRestriction && e.ageRestriction > 0 ? (n.agesPlus || "Ages {age}+").replace("{age}", String(e.ageRestriction)) : n.allAges || "All ages"), o;
|
|
364
363
|
}
|
|
365
|
-
function
|
|
364
|
+
function V(e, t = u, n, r = null, a = {}) {
|
|
366
365
|
let s = e.event, c = e.isSeries ? F(e.instances, t) : P(s, t), l = c && c.type !== "past" ? {
|
|
367
366
|
text: c.text,
|
|
368
367
|
variant: L(c.type)
|
|
369
368
|
} : null;
|
|
370
|
-
!l && !e.isSeries && (l =
|
|
371
|
-
let d = k(s), f = s.startDateTime &&
|
|
372
|
-
let
|
|
369
|
+
!l && !e.isSeries && (l = z(s, t));
|
|
370
|
+
let d = k(s), f = s.startDateTime && r?.date !== !1 ? o(s.startDateTime, s.timeZone, n) : "", p = e.isSeries ? e.instances : s.startDateTime ? [s] : [], m = p.map((e) => {
|
|
371
|
+
let r = i(e.startDateTime, e.timeZone, n), a = P(e, t)?.type === "sold_out";
|
|
373
372
|
return {
|
|
374
|
-
timeLabel:
|
|
373
|
+
timeLabel: r,
|
|
375
374
|
href: k(e),
|
|
376
|
-
ariaLabel: `${s.name} at ${
|
|
375
|
+
ariaLabel: `${s.name} at ${r}${a ? ", sold out" : ""}`
|
|
377
376
|
};
|
|
378
377
|
}), h = [s.name];
|
|
379
|
-
s.startDateTime && h.push(`on ${o(s.startDateTime, s.timeZone, n)}`), e.isSeries ? h.push(`${e.instances.length} showtimes available`) : s.startDateTime && h.push(`at ${
|
|
380
|
-
let g =
|
|
378
|
+
s.startDateTime && h.push(`on ${o(s.startDateTime, s.timeZone, n)}`), e.isSeries ? h.push(`${e.instances.length} showtimes available`) : s.startDateTime && h.push(`at ${i(s.startDateTime, s.timeZone, n)}`), c && h.push(c.text);
|
|
379
|
+
let g = B(s, e.isSeries, t, n);
|
|
381
380
|
return h.push(...g), {
|
|
382
381
|
title: s.name,
|
|
383
382
|
href: d,
|
|
384
383
|
imageUrl: s.imageUrl ?? "",
|
|
385
384
|
dateLabel: f,
|
|
386
|
-
description:
|
|
385
|
+
description: r?.description === !1 ? "" : s.description ?? "",
|
|
387
386
|
ariaLabel: h.join(", "),
|
|
388
|
-
hidePoster:
|
|
387
|
+
hidePoster: r?.poster === !1,
|
|
389
388
|
posterFit: a.posterFit ?? "fit",
|
|
390
389
|
posterBackdrop: a.posterBackdrop ?? "blur",
|
|
391
390
|
badge: l,
|
|
@@ -395,4 +394,4 @@ function H(e, t = u, n, i = null, a = {}) {
|
|
|
395
394
|
};
|
|
396
395
|
}
|
|
397
396
|
//#endregion
|
|
398
|
-
export { O as a, A as i, R as n, D as o, P as r, T as s,
|
|
397
|
+
export { O as a, A as i, R as n, D as o, P as r, T as s, V as t };
|