@getmicdrop/venue-calendar 4.3.24 → 4.3.25
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-I5Ui2MMv.js → ArrowLeftIcon-BEoyQzGt.js} +1 -1
- package/dist/{BlockPlaceholder-CwJDSlRr.js → BlockPlaceholder-BEiQTRGx.js} +1 -1
- package/dist/{Calendar-BDxdp1v2.js → Calendar-iTWNcPZK.js} +236 -230
- package/dist/{CalendarFoundryView-ylxXSy0Q.js → CalendarFoundryView-CdpyX54O.js} +37 -33
- package/dist/{CalendarIcon-iKBZIhcT.js → CalendarIcon-DxOagkl5.js} +1 -1
- package/dist/CartView-DSSU-0-_.js +2245 -0
- package/dist/{Checkout-BDKHhmry.js → Checkout-7yLVA4hl.js} +247 -247
- package/dist/Checkout-CSLSP9pn.js +1845 -0
- package/dist/{CheckoutTimer-Bq2I13Ae.js → CheckoutTimer-Dxct5HmQ.js} +5 -5
- package/dist/{ChevronDownIcon-BfAxe9v2.js → ChevronDownIcon-DIQAmQyH.js} +1 -1
- package/dist/{ClockIcon-nFiAeDJe.js → ClockIcon-CVPj8q7F.js} +1 -1
- package/dist/{CloseIcon-DvKvCZWt.js → CloseIcon-BQm8Xs1P.js} +1 -1
- package/dist/{CollectionView-Bec8fJQA.js → CollectionView-Ts2WvCFr.js} +6 -6
- package/dist/{Event-K1P6JhKj.js → Event-DX0I8oGA.js} +658 -617
- package/dist/{EventPage-Yvui8CAC.js → EventPage-DR1G4PGV.js} +295 -262
- package/dist/{Input-CwFaXbO6.js → Input-Bpq_mV4s.js} +1 -1
- package/dist/{MailIcon-BRBkliz8.js → MailIcon-Wrsqe_uW.js} +1 -1
- package/dist/{PasswordInput-DsnCCqzu.js → PasswordInput-eMxkf9IC.js} +1 -1
- package/dist/{RecommendationsRail-D_JcJEX0.js → RecommendationsRail-Bxj7iK68.js} +119 -117
- package/dist/{ScarcityBadge-Bik8VKze.js → ScarcityBadge-D1IzCyTk.js} +3 -3
- package/dist/{SeriesPage-BAqPdsgR.js → SeriesPage-DCTxtpMx.js} +3 -3
- package/dist/{Success-CSZ6OYWj.js → Success-Di5qC4Op.js} +17 -17
- package/dist/{TagIcon-BlkIiP6A.js → TagIcon-DAHUalS9.js} +1 -1
- package/dist/{ViewTicketsEmbed-D1JmKNf1.js → ViewTicketsEmbed-B0agtnsM.js} +33 -33
- package/dist/{WarningCircleIcon-mcDExvi6.js → WarningCircleIcon-u-Y8M0N1.js} +1 -1
- package/dist/{WarningTriIcon-KJ6AJZhg.js → WarningTriIcon-DroD8KGE.js} +1 -1
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +283 -280
- package/dist/api/cta.d.ts +4 -0
- package/dist/api/types.d.ts +3 -1
- package/dist/{api-Bv-5UTvm.js → api-DxEN4thz.js} +79 -79
- package/dist/{constants-Dkkkks8H.js → constants-DuFw4kZc.js} +2 -1
- package/dist/{copyToClipboard-DGHxXO-R.js → copyToClipboard-CX0-qsMi.js} +1 -1
- package/dist/{de-CzupmMIa.js → de-BnjqU4K3.js} +1 -0
- package/dist/{defaultLabels-DP7tY9Pg.js → defaultLabels-BgBbv_Mu.js} +243 -234
- package/dist/{es-B-vQxM9Z.js → es-BJSttnC2.js} +1 -0
- package/dist/{event-transform-CQxO_ACI.js → event-transform-y9eZBvZJ.js} +9 -9
- package/dist/{eventStatusStream-CJodQtGK.js → eventStatusStream-uZrfQOCm.js} +1 -1
- package/dist/{fr-B2g-kG7i.js → fr-DqfagdtN.js} +1 -0
- package/dist/{href-B0sNxICB.js → href-EZSiOTvJ.js} +2 -2
- package/dist/{i18n-D6loEmFz.js → i18n-BZAWUSFx.js} +2 -2
- package/dist/i18n-CK8CaXLk.js +560 -0
- package/dist/{id-Dgu5-FC6.js → id-B1c1JsNl.js} +1 -0
- package/dist/{it-C580sMYp.js → it-DiFjoVSe.js} +1 -0
- package/dist/{ja-DLki4zXU.js → ja-CfeBSXBd.js} +1 -0
- package/dist/{ko-BUcfb1Gi.js → ko-DIjhPkQ7.js} +1 -0
- package/dist/locales/4.3.25/flow/de.js +1 -0
- package/dist/locales/4.3.25/flow/es.js +1 -0
- package/dist/locales/4.3.25/flow/fr.js +1 -0
- package/dist/locales/4.3.25/flow/id.js +1 -0
- package/dist/locales/4.3.25/flow/it.js +1 -0
- package/dist/locales/4.3.25/flow/ja.js +1 -0
- package/dist/locales/4.3.25/flow/ko.js +1 -0
- package/dist/locales/4.3.25/flow/nl.js +1 -0
- package/dist/locales/{4.3.24 → 4.3.25}/flow/pl.js +1 -1
- package/dist/locales/4.3.25/flow/pt-br.js +1 -0
- package/dist/locales/{4.3.24 → 4.3.25}/flow/tr.js +1 -1
- package/dist/locales/4.3.25/flow/zh.js +1 -0
- package/dist/{navigation-CJ403ByO.js → navigation-Dh-hGmN9.js} +2 -2
- package/dist/{nl-CivAQA0D.js → nl-DH8ATeT-.js} +1 -0
- package/dist/{order-totals-sQNKjXcZ.js → order-totals-CfYOfTyw.js} +4 -4
- package/dist/{orders-D1dybiYD.js → orders-BQRru8sl.js} +3 -3
- package/dist/{phoneUtils-B_9g7GJj.js → phoneUtils-DK8ry3Ji.js} +1 -1
- package/dist/{pixels-BMkfBngV.js → pixels-CAgpvPd8.js} +2 -2
- package/dist/{pl-C5VwFH2B.js → pl-DHSf0Tay.js} +1 -0
- package/dist/{promo-lMaGYLo-.js → promo-aAygcEn7.js} +3 -3
- package/dist/{pt-br-B0w9dhVB.js → pt-br-bUE81YH0.js} +1 -0
- package/dist/{scarcity-CZEPC-UR.js → scarcity-Dgvp7aCF.js} +67 -67
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.mjs +50 -43
- package/dist/{serverTotals-BWRzJsle.js → serverTotals-96Luutwl.js} +8 -8
- package/dist/{showcase-state-options-CEKhIK66.js → showcase-state-options-DcNFRj34.js} +1 -1
- package/dist/{to-event-card-props-DUWp0etY.js → to-event-card-props-CgUk4zJ7.js} +31 -29
- package/dist/{tr-LGkP5gpA.js → tr--NLWW7qi.js} +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/{utils-CuLU8uyA.js → utils-CiFOOjQd.js} +72 -69
- package/dist/venue-calendar.es.js +1228 -1164
- package/dist/venue-calendar.iife.js +52 -52
- package/dist/venue-calendar.umd.js +49 -49
- package/dist/{zh-D2ZAdq3T.js → zh-ZYCR67Kf.js} +1 -0
- package/package.json +2 -2
- package/dist/CartView-9PGGgyk_.js +0 -2245
- package/dist/Checkout-BP3JTPsO.js +0 -1845
- package/dist/i18n-CMpXpjPv.js +0 -544
- package/dist/locales/4.3.24/flow/de.js +0 -1
- package/dist/locales/4.3.24/flow/es.js +0 -1
- package/dist/locales/4.3.24/flow/fr.js +0 -1
- package/dist/locales/4.3.24/flow/id.js +0 -1
- package/dist/locales/4.3.24/flow/it.js +0 -1
- package/dist/locales/4.3.24/flow/ja.js +0 -1
- package/dist/locales/4.3.24/flow/ko.js +0 -1
- package/dist/locales/4.3.24/flow/nl.js +0 -1
- package/dist/locales/4.3.24/flow/pt-br.js +0 -1
- package/dist/locales/4.3.24/flow/zh.js +0 -1
- /package/dist/locales/{4.3.24 → 4.3.25}/main/de.js +0 -0
- /package/dist/locales/{4.3.24 → 4.3.25}/main/es.js +0 -0
- /package/dist/locales/{4.3.24 → 4.3.25}/main/fr.js +0 -0
- /package/dist/locales/{4.3.24 → 4.3.25}/main/id.js +0 -0
- /package/dist/locales/{4.3.24 → 4.3.25}/main/it.js +0 -0
- /package/dist/locales/{4.3.24 → 4.3.25}/main/ja.js +0 -0
- /package/dist/locales/{4.3.24 → 4.3.25}/main/ko.js +0 -0
- /package/dist/locales/{4.3.24 → 4.3.25}/main/nl.js +0 -0
- /package/dist/locales/{4.3.24 → 4.3.25}/main/pl.js +0 -0
- /package/dist/locales/{4.3.24 → 4.3.25}/main/pt-br.js +0 -0
- /package/dist/locales/{4.3.24 → 4.3.25}/main/tr.js +0 -0
- /package/dist/locales/{4.3.24 → 4.3.25}/main/zh.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as e, B as t, D as n, E as r, T as i, g as a, h as o, k as s, m as c, r as l, t as u, x as d } from "./defaultLabels-BgBbv_Mu.js";
|
|
2
2
|
import { getContext as f, setContext as p } from "svelte";
|
|
3
3
|
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/iconWeight.js
|
|
4
4
|
var m = Symbol("mds-icon-weight");
|
|
@@ -29,65 +29,65 @@ function b(e, t, n) {
|
|
|
29
29
|
function x(e) {
|
|
30
30
|
return Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
|
|
31
31
|
}
|
|
32
|
-
function S(
|
|
33
|
-
if (typeof
|
|
32
|
+
function S(e, t) {
|
|
33
|
+
if (typeof e != "number" || !Number.isInteger(e)) throw new r(`${t} must be an integer, got ${JSON.stringify(e)}`, n.INVALID_DATE, { value: e });
|
|
34
34
|
}
|
|
35
35
|
function C(e) {
|
|
36
|
-
return
|
|
36
|
+
return o(e, "toLocalDay(date)"), b(e.getFullYear(), e.getMonth(), e.getDate());
|
|
37
37
|
}
|
|
38
|
-
function w(
|
|
39
|
-
if (S(
|
|
40
|
-
year:
|
|
41
|
-
monthIndex:
|
|
42
|
-
day:
|
|
38
|
+
function w(e, t, i) {
|
|
39
|
+
if (S(e, "localDayFromParts(year)"), S(t, "localDayFromParts(monthIndex)"), S(i, "localDayFromParts(day)"), t < 0 || t > 11) throw new r(`localDayFromParts(monthIndex) must be 0-11 (0 = January), got ${t}`, n.INVALID_DATE, {
|
|
40
|
+
year: e,
|
|
41
|
+
monthIndex: t,
|
|
42
|
+
day: i
|
|
43
43
|
});
|
|
44
|
-
let
|
|
45
|
-
if (
|
|
46
|
-
year:
|
|
47
|
-
monthIndex:
|
|
48
|
-
day:
|
|
44
|
+
let a = b(e, t, i);
|
|
45
|
+
if (a.getFullYear() !== e || a.getMonth() !== t || a.getDate() !== i || Number.isNaN(a.getTime())) throw new r(`localDayFromParts: ${e}-${t + 1}-${i} is not a real calendar date`, n.INVALID_DATE, {
|
|
46
|
+
year: e,
|
|
47
|
+
monthIndex: t,
|
|
48
|
+
day: i
|
|
49
49
|
});
|
|
50
|
-
return
|
|
50
|
+
return a;
|
|
51
51
|
}
|
|
52
|
-
function T(
|
|
53
|
-
if (typeof
|
|
54
|
-
let [
|
|
55
|
-
return w(
|
|
52
|
+
function T(e) {
|
|
53
|
+
if (typeof e != "string" || !/^\d{4}-\d{2}-\d{2}$/.test(e)) throw new r(`localDayFromYMD expects a YYYY-MM-DD date, got ${JSON.stringify(e)}`, n.INVALID_DATE, { value: e });
|
|
54
|
+
let [t, i, a] = e.split("-").map(Number);
|
|
55
|
+
return w(t, i - 1, a);
|
|
56
56
|
}
|
|
57
57
|
function E() {
|
|
58
|
-
return C(
|
|
58
|
+
return C(e());
|
|
59
59
|
}
|
|
60
60
|
function D(e) {
|
|
61
|
-
return
|
|
61
|
+
return o(e, "localDayYMD(day)"), t(v(e));
|
|
62
62
|
}
|
|
63
63
|
function O(e) {
|
|
64
|
-
return
|
|
64
|
+
return o(e, "localWeekday(day)"), e.getDay();
|
|
65
65
|
}
|
|
66
66
|
function k(e, t) {
|
|
67
67
|
return w(e, t, 1), b(e, t + 1, 0).getDate();
|
|
68
68
|
}
|
|
69
69
|
function A(e, t) {
|
|
70
|
-
return
|
|
70
|
+
return o(e, "addLocalDays(day)"), S(t, "addLocalDays(n)"), b(e.getFullYear(), e.getMonth(), e.getDate() + t);
|
|
71
71
|
}
|
|
72
72
|
function ee(e, t) {
|
|
73
|
-
|
|
73
|
+
o(e, "addLocalMonths(day)"), S(t, "addLocalMonths(n)");
|
|
74
74
|
let n = b(e.getFullYear(), e.getMonth() + t, 1), r = n.getFullYear(), i = n.getMonth(), a = b(r, i + 1, 0).getDate();
|
|
75
75
|
return b(r, i, Math.min(e.getDate(), a));
|
|
76
76
|
}
|
|
77
77
|
function te(e) {
|
|
78
|
-
return
|
|
78
|
+
return o(e, "startOfLocalMonth(day)"), b(e.getFullYear(), e.getMonth(), 1);
|
|
79
79
|
}
|
|
80
80
|
function ne(e, t) {
|
|
81
|
-
return
|
|
81
|
+
return o(e, "wholeDaysBetween(a)"), o(t, "wholeDaysBetween(b)"), (x(t) - x(e)) / 864e5;
|
|
82
82
|
}
|
|
83
83
|
function j(e, t) {
|
|
84
|
-
return
|
|
84
|
+
return o(e, "isSameLocalDay(a)"), o(t, "isSameLocalDay(b)"), x(e) === x(t);
|
|
85
85
|
}
|
|
86
86
|
function M(e, t) {
|
|
87
|
-
return
|
|
87
|
+
return a(e, t) < 0;
|
|
88
88
|
}
|
|
89
89
|
function N(e, t) {
|
|
90
|
-
return
|
|
90
|
+
return a(e, t) > 0;
|
|
91
91
|
}
|
|
92
92
|
function re(e) {
|
|
93
93
|
return M(e, E());
|
|
@@ -116,7 +116,7 @@ function ae(e, t = {}) {
|
|
|
116
116
|
return Array.from({ length: 7 }, (e, t) => A(r, t));
|
|
117
117
|
}
|
|
118
118
|
function oe(e, t = {}) {
|
|
119
|
-
|
|
119
|
+
o(e, "isLocalDayDisabled(day)");
|
|
120
120
|
let { min: n, max: r, disablePast: i = !1, allowedWeekdays: a } = t;
|
|
121
121
|
return !!(i && re(e) || n && M(e, n) || r && N(e, r) || a && !a.includes(O(e)));
|
|
122
122
|
}
|
|
@@ -154,7 +154,7 @@ function I(e) {
|
|
|
154
154
|
return Number.isFinite(t) ? (t / 100).toFixed(2) : "";
|
|
155
155
|
}
|
|
156
156
|
function L(e) {
|
|
157
|
-
return e == null ? null : e instanceof Date ? isNaN(e.getTime()) ? null : e :
|
|
157
|
+
return e == null ? null : e instanceof Date ? isNaN(e.getTime()) ? null : e : d(e);
|
|
158
158
|
}
|
|
159
159
|
function R(e, t) {
|
|
160
160
|
return new Intl.DateTimeFormat("en-US", {
|
|
@@ -163,43 +163,43 @@ function R(e, t) {
|
|
|
163
163
|
timeZone: t
|
|
164
164
|
}).format(e);
|
|
165
165
|
}
|
|
166
|
-
function z(
|
|
167
|
-
let
|
|
168
|
-
if (
|
|
169
|
-
let
|
|
170
|
-
if (!
|
|
171
|
-
let
|
|
172
|
-
if (
|
|
173
|
-
let e = Math.max(1,
|
|
174
|
-
return (e === 1 ?
|
|
166
|
+
function z(t, a = {}) {
|
|
167
|
+
let o = a.timeZone;
|
|
168
|
+
if (o !== void 0 && !i(o)) throw new r(`Invalid timezone: ${o}`, n.INVALID_TIMEZONE, { timezone: o });
|
|
169
|
+
let s = L(t);
|
|
170
|
+
if (!s) return "";
|
|
171
|
+
let l = e(), u = s.getTime() - l.getTime(), d = Math.round(u / 6e4), f = u / 36e5, p = a.locale || "en-US";
|
|
172
|
+
if (d > 0 && d < 60) {
|
|
173
|
+
let e = Math.max(1, d);
|
|
174
|
+
return (e === 1 ? a.inNMinute || "in {n} minute" : a.inNMinutes || "in {n} minutes").replace("{n}", String(e));
|
|
175
175
|
}
|
|
176
176
|
if (f > 0 && f < 24) {
|
|
177
177
|
let e = Math.max(1, Math.round(f));
|
|
178
|
-
return (e === 1 ?
|
|
178
|
+
return (e === 1 ? a.inNHour || "in {n} hour" : a.inNHours || "in {n} hours").replace("{n}", String(e));
|
|
179
179
|
}
|
|
180
180
|
let m = (e) => {
|
|
181
|
-
if (
|
|
182
|
-
let t = c(e.toISOString(),
|
|
181
|
+
if (o === void 0) return C(e);
|
|
182
|
+
let t = c(e.toISOString(), o);
|
|
183
183
|
return t === null ? null : T(t);
|
|
184
|
-
}, h = m(
|
|
184
|
+
}, h = m(s), g = m(l);
|
|
185
185
|
if (h && g && j(h, A(g, 1))) {
|
|
186
|
-
let e = R(
|
|
187
|
-
return (
|
|
186
|
+
let e = R(s, o);
|
|
187
|
+
return (a.tomorrowAtTime || "tomorrow at {time}").replace("{time}", e);
|
|
188
188
|
}
|
|
189
|
-
let _ =
|
|
189
|
+
let _ = u / 864e5;
|
|
190
190
|
if (_ > 0 && _ <= 7) {
|
|
191
191
|
let e = new Intl.DateTimeFormat(p, {
|
|
192
192
|
weekday: "long",
|
|
193
|
-
timeZone:
|
|
194
|
-
}).format(
|
|
195
|
-
return (
|
|
193
|
+
timeZone: o
|
|
194
|
+
}).format(s), t = R(s, o);
|
|
195
|
+
return (a.onDayAtTime || "on {day} at {time}").replace("{day}", e).replace("{time}", t);
|
|
196
196
|
}
|
|
197
197
|
let v = new Intl.DateTimeFormat(p, {
|
|
198
198
|
month: "short",
|
|
199
199
|
day: "numeric",
|
|
200
|
-
timeZone:
|
|
201
|
-
}).format(
|
|
202
|
-
return (
|
|
200
|
+
timeZone: o
|
|
201
|
+
}).format(s);
|
|
202
|
+
return (a.onDate || "on {date}").replace("{date}", v);
|
|
203
203
|
}
|
|
204
204
|
function B(e, t, n = "en-US") {
|
|
205
205
|
if (e == null) return "";
|
|
@@ -262,14 +262,14 @@ function J(e) {
|
|
|
262
262
|
let t = new Date(e);
|
|
263
263
|
return isNaN(t.getTime()) ? null : t;
|
|
264
264
|
}
|
|
265
|
-
function Y(e, t,
|
|
266
|
-
let
|
|
267
|
-
if (!
|
|
268
|
-
let
|
|
269
|
-
return ue(
|
|
270
|
-
...
|
|
271
|
-
timeZone:
|
|
272
|
-
}).format(
|
|
265
|
+
function Y(e, t, n, r) {
|
|
266
|
+
let i = J(e);
|
|
267
|
+
if (!i) return "";
|
|
268
|
+
let a = l(t) ? t : s;
|
|
269
|
+
return ue(r || "en-US", {
|
|
270
|
+
...n,
|
|
271
|
+
timeZone: a
|
|
272
|
+
}).format(i);
|
|
273
273
|
}
|
|
274
274
|
function pe(e, t) {
|
|
275
275
|
return Y(e, t, {
|
|
@@ -291,19 +291,19 @@ function me(e, t, n, r) {
|
|
|
291
291
|
let a = X(t, n, r);
|
|
292
292
|
return i && a ? `${i} - ${a}` : i;
|
|
293
293
|
}
|
|
294
|
-
function he(e, t,
|
|
294
|
+
function he(e, t, n) {
|
|
295
295
|
if (!J(e)) return {
|
|
296
296
|
day: "",
|
|
297
297
|
month: "",
|
|
298
298
|
date: 0,
|
|
299
299
|
year: 0
|
|
300
300
|
};
|
|
301
|
-
let
|
|
301
|
+
let r = l(t) ? t : s;
|
|
302
302
|
return {
|
|
303
|
-
day: Y(e,
|
|
304
|
-
month: Y(e,
|
|
305
|
-
date: parseInt(Y(e,
|
|
306
|
-
year: parseInt(Y(e,
|
|
303
|
+
day: Y(e, r, { weekday: "short" }, n),
|
|
304
|
+
month: Y(e, r, { month: "short" }, n),
|
|
305
|
+
date: parseInt(Y(e, r, { day: "numeric" }, "en-US"), 10),
|
|
306
|
+
year: parseInt(Y(e, r, { year: "numeric" }, "en-US"), 10)
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
309
|
function Z(e, t, n) {
|
package/dist/seo/seo.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(){return`America/Los_Angeles`}var t=/<\/(?:p|div|h[1-6]|li|ul|ol|blockquote|tr)>/gi,n=/<br\s*\/?>/gi,r=/<[^>]*>/g,i={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`,"'":`'`," ":` `};function a(e){return e.replace(/&#x([0-9a-f]+);/gi,(e,t)=>o(parseInt(t,16))).replace(/&#(\d+);/g,(e,t)=>o(Number(t))).replace(/&[a-z0-9]+;/gi,e=>i[e.toLowerCase()]??e)}function o(e){return Number.isFinite(e)&&e>0&&e<=1114111?String.fromCodePoint(e):``}function s(e,i){if(!e)return``;let o=String(e).replace(n,` `).replace(t,` `).replace(r,``);if(o=a(o).replace(/\s+/g,` `).trim(),i&&i>0&&o.length>i){let e=o.slice(0,i),t=e.lastIndexOf(` `);o=(t>40?e.slice(0,t):e).trimEnd()+`…`}return o}function c(){return new Date}var l=class extends Error{constructor(e,t,n={}){super(e),this.name=`AppError`,this.code=t,this.status=n.status??500,this.details=n.details,this.timestamp=c(),this.recoverable=n.recoverable??!0,this.cause=n.cause,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toJSON(){return{name:this.name,code:this.code,message:this.message,status:this.status,details:this.details,timestamp:this.timestamp.toISOString(),recoverable:this.recoverable,stack:this.stack,cause:this.cause?.message}}getUserMessage(e){return this.message}isRetryable(){return this.recoverable}},u=class extends l{constructor(e,t,n={}){super(e,t,{status:422,recoverable:!1,...n}),this.name=`ValueGuardError`}},d=class extends u{constructor(e,t,n){super(e,t,{details:n}),this.name=`DateTimeError`}},f;(function(e){e.INVALID_TIMEZONE=`INVALID_TIMEZONE`,e.INVALID_ISO_STRING=`INVALID_ISO_STRING`,e.INVALID_DATE=`INVALID_DATE`,e.INVALID_TIME=`INVALID_TIME`,e.MISSING_TIMEZONE=`MISSING_TIMEZONE`,e.PARSE_ERROR=`PARSE_ERROR`})(f||={});function p(e,t,n,r=0,i=0,a=0){let o=new Date(Date.UTC(e,t-1,n,r,i,a));return e>=0&&e<=99&&o.setUTCFullYear(e),o}var m=/^(\d{4})-(\d{2})-(\d{2})(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:\d{2}))?$/,h=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?$/;function g(e,t,n){let r=p(e,t,n);return r.getUTCFullYear()===e&&r.getUTCMonth()===t-1&&r.getUTCDate()===n}var _=/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,9}))? ?([+-])(\d{2}):?(\d{2})(?: [A-Za-z][A-Za-z0-9_/+-]*)?(?: m=[+-][\d.]+)?$/,v=p(1,1,1).getTime();function y(e){let t=m.exec(e);if(t){let[,n,r,i]=t;return{iso:e,year:+n,month:+r,day:+i}}let n=_.exec(e);if(n){let[,e,t,r,i,a,o,s,c,l,u]=n;return{iso:`${e}-${t}-${r}T${i}:${a}:${o}${s?`.${s.slice(0,3).padEnd(3,`0`)}`:``}${c}${l}:${u}`,year:+e,month:+t,day:+r}}return null}function b(e){if(typeof e==`number`){if(!Number.isFinite(e))return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}if(typeof e!=`string`)return null;let t=y(e.trim());if(!t||!g(t.year,t.month,t.day))return null;let n=new Date(t.iso);return Number.isNaN(n.getTime())?null:n}function x(e){let t=b(e);return t!==null&&t.getTime()===v}function S(e,t){if(e.getTime()===v)throw new d(`toInstant: ${JSON.stringify(t)} is the backend's UNSET marker (Go's zero time.Time), not a moment — the field was never filled in. toInstant is the REQUIRED-timestamp door, so an unset value here is a bug: returning the year-1 instant it names would sort this row ahead of every real date and answer "yes" to "has this started?". If the field is allowed to be unset, read it with toInstantOrNull (null), ask isAbsentTimestamp why it is missing, and order it with compareWireInstants.`,f.INVALID_ISO_STRING,{value:t})}function C(e,t){if(!(e instanceof Date)||Number.isNaN(e.getTime()))throw new d(`${t} must be a valid Date`,f.INVALID_DATE,{value:e})}function w(e,t){return C(e,`compareInstants(a)`),C(t,`compareInstants(b)`),e.getTime()-t.getTime()}function T(e){if(typeof e==`number`){if(!Number.isFinite(e))throw new d(`toInstant: epoch milliseconds must be a finite number, got ${e}`,f.INVALID_DATE,{value:e});let t=new Date(e);return C(t,`toInstant(value)`),S(t,e),t}if(typeof e!=`string`||e.trim()===``)throw new d(`toInstant: a UTC ISO timestamp or epoch ms is required, got ${JSON.stringify(e)}`,typeof e==`string`?f.INVALID_ISO_STRING:f.INVALID_DATE,{value:e});let t=y(e);if(!t)throw h.test(e)?new d(`toInstant: ${JSON.stringify(e)} carries a time but no timezone, so it is not an instant — it would resolve on the viewer's clock and land on a different calendar day for a viewer in Los Angeles than one in London. Send a UTC wire timestamp (2026-06-09T20:00:00Z) or an explicit offset (2026-06-09T13:00:00-07:00). If this is a local wall-clock value, it belongs in datetime/local or parseLocalToUTC(value, timezone), not here.`,f.MISSING_TIMEZONE,{value:e}):new d(`toInstant: not an ISO-8601 timestamp: ${JSON.stringify(e)}`,f.INVALID_ISO_STRING,{value:e});let{year:n,month:r,day:i}=t;if(!g(n,r,i))throw new d(`toInstant: ${n}-${r}-${i} is not a real calendar date: ${JSON.stringify(e)}`,f.INVALID_ISO_STRING,{value:e});let a=new Date(t.iso);if(Number.isNaN(a.getTime()))throw new d(`toInstant: ISO-8601 shaped but not a real instant: ${JSON.stringify(e)}`,f.INVALID_ISO_STRING,{value:e});return S(a,e),a}function E(e){if(e==null||typeof e==`string`&&e.trim()===``||x(e))return null;try{return T(e)}catch{return null}}function D(e){return Math.round((e+2**-52)*100)/100}function O(e){if(e==null)return null;let t=Number(e);return Number.isFinite(t)?t:null}function k(e){let t=O(e?.price);return t===null?null:t===0?0:D(t+(O(e?.fee)??0))}function A(e){return e.replace(/</g,`\\u003c`).replace(/>/g,`\\u003e`).replace(/&/g,`\\u0026`)}function j(t,n){if(!t)return null;let r=new Date(t);if(isNaN(r.getTime()))return null;let i={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1,timeZoneName:`shortOffset`},a;try{a=new Intl.DateTimeFormat(`en-US`,{...i,timeZone:n})}catch{a=new Intl.DateTimeFormat(`en-US`,{...i,timeZone:e()})}let o=a.formatToParts(r),s=e=>o.find(t=>t.type===e)?.value||``,c=s(`year`),l=s(`month`),u=s(`day`),d=s(`hour`),f=s(`minute`),p=s(`second`),m=s(`timeZoneName`),h=`+00:00`;if(m){let e=m.match(/GMT([+-])(\d+)(?::(\d+))?/);e&&(h=`${e[1]}${e[2].padStart(2,`0`)}:${e[3]||`00`}`)}return`${c}-${l}-${u}T${d}:${f}:${p}${h}`}function M(e){if(!e)return null;let t=e.split(`,`).map(e=>e.trim());if(t.length<2)return{"@type":`PostalAddress`,streetAddress:e,addressCountry:`US`};let n=t[t.length-1].match(/^([A-Z]{2})\s+(\d{5}(?:-\d{4})?)$/);return n&&t.length>=3?{"@type":`PostalAddress`,streetAddress:t.slice(0,-2).join(`, `),addressLocality:t[t.length-2],addressRegion:n[1],postalCode:n[2],addressCountry:`US`}:{"@type":`PostalAddress`,streetAddress:t[0],addressLocality:t.slice(1).join(`, `),addressCountry:`US`}}function N(e,t){if(e&&(e.city||e.state||e.postalCode)){let t={"@type":`PostalAddress`};return e.address&&(t.streetAddress=e.address),e.city&&(t.addressLocality=e.city),e.state&&(t.addressRegion=e.state),e.postalCode&&(t.postalCode=e.postalCode),t.addressCountry=e.country||`US`,t}return M(e&&e.address||t||null)}function P(e){if(!e)return`https://schema.org/EventScheduled`;let t=e.toLowerCase();return t===`cancelled`||t===`canceled`?`https://schema.org/EventCancelled`:t===`postponed`?`https://schema.org/EventPostponed`:t===`rescheduled`?`https://schema.org/EventRescheduled`:`https://schema.org/EventScheduled`}function F(e){if((e.remainingCapacity??e.quantityRemaining??e.quantity)===0||e.soldOut)return`https://schema.org/SoldOut`;let t=c(),n=E(e.salesBegin||e.salesStart||e.saleBegin||e.onSaleStart),r=E(e.salesEnd||e.saleEnd||e.onSaleEnd);return n&&w(n,t)>0?`https://schema.org/PreOrder`:r&&w(r,t)<0?`https://schema.org/SoldOut`:`https://schema.org/InStock`}function I(e,t,n,r={}){return e===t?{"@type":`Offer`,price:e,priceCurrency:`USD`,availability:n,...r}:{"@type":`AggregateOffer`,lowPrice:e,highPrice:t,priceCurrency:`USD`,availability:n,...r}}function L(e,t){if(!e||e.length===0)return null;let n=e.filter(e=>{let t=e.visibility??0,n=t===0||t===1,r=e.salesChannel!==2;return n&&r});if(n.length===0)return null;let r=n.map(e=>k({price:e.price,fee:e.fee})).filter(e=>e!=null);if(r.length===0)return null;let i=Math.min(...r),a=Math.max(...r),o=n[0];return I(i,a,F(o),{url:t||void 0,validFrom:o?.salesBegin||o?.salesStart||void 0})}function R(e){if(!e||e.length===0)return null;let t=e.filter(e=>{let t=e.acceptedState===2,n=!e.shouldBeHidden,r=e.RosterPerformer?.User?.performerProfile,i=r?.firstName||r?.lastName||r?.displayName;return t&&n&&i});return t.length===0?null:t.map(e=>{let t=e.RosterPerformer?.User?.performerProfile;return{"@type":`PerformingGroup`,name:t?.displayName||[t?.firstName,t?.lastName].filter(Boolean).join(` `)}})}function z(t){let{event:n,venue:r,venueTimeZone:i=e(),eventUrl:a,organizer:o}=t;if(!n)return null;let c=j(n.startDateTime,i);if(!n.name||!c||!r?.name)return null;let l=N(r,r?.googleLocationNameCache),u={"@type":`Place`,name:r.name};l&&(u.address=l);let d={"@context":`https://schema.org`,"@type":`Event`,name:n.name,startDate:c,eventStatus:P(n.status),eventAttendanceMode:`https://schema.org/OfflineEventAttendanceMode`,location:u},f=j(n.endDateTime,i);f&&(d.endDate=f);let p=s(n.description)||n.eventSummary;p&&(d.description=p);let m=n.image||n.coverImage||n.ShowImage;m&&(d.image=[m]);let h=L(n.availableTickets,a);h&&(d.offers=h);let g=R(n.performers);if(g&&g.length>0&&(d.performer=g),o?.name){let e={"@type":`Organization`,name:o.name};o.url&&(e.url=o.url),d.organizer=e}return a&&(d.url=a),d}function B(e){switch(e){case`available`:return`https://schema.org/InStock`;case`sold_out`:return`https://schema.org/SoldOut`;case`coming_soon`:return`https://schema.org/PreOrder`;case`ended`:return`https://schema.org/SoldOut`;default:return`https://schema.org/InStock`}}function V(e,t){if(!e||e.length===0)return null;let n=e.filter(e=>e.status!==`sold_out`&&e.status!==`ended`);if(n.length===0){let t=e.map(e=>e.price).filter(e=>!isNaN(e));return t.length===0?null:I(Math.min(...t),Math.max(...t),`https://schema.org/SoldOut`)}let r=n.map(e=>e.price).filter(e=>!isNaN(e));return r.length===0?null:I(Math.min(...r),Math.max(...r),B(n[0].status))}function H(e){let{series:t,baseEventUrl:n}=e;if(!t.title||!t.occurrences||t.occurrences.length===0||!t.venue?.name)return null;let r=N(t.venue,t.venue.googleLocationNameCache),i={"@type":`Place`,name:t.venue.name};r&&(i.address=r);let a={"@context":`https://schema.org`,"@type":`EventSeries`,name:t.title,location:i},o=s(t.description)||t.eventSummary;o&&(a.description=o),t.image&&(a.image=[t.image]);let c=t.performers?.filter(e=>e.displayName);c&&c.length>0&&(a.performer=c.map(e=>({"@type":`PerformingGroup`,name:e.displayName})));let l=[];for(let e of t.occurrences){let r=j(e.startDateTime,t.timeZone);if(!r)continue;let a={"@type":`Event`,name:e.title,startDate:r,eventStatus:P(e.status),location:i};n&&(a[`@id`]=`${n}/${e.id}-${e.slug}`);let o=j(e.endDateTime,t.timeZone);o&&(a.endDate=o);let s=V(e.tickets,e.status);s&&(a.offers=s),l.push(a)}return l.length===0?null:(a.subEvent=l,a)}function U(e){let{collection:t,baseEventUrl:n}=e;if(!t.collectionTitle||!t.events||t.events.length===0)return null;let r=[];for(let e of t.events){if(!e.title)continue;let t={"@type":`ListItem`,position:r.length+1,name:e.title};n&&(t.url=e.slug?`${n}/${e.id}-${e.slug}`:`${n}/${e.id}`),r.push(t)}if(r.length===0)return null;let i={"@context":`https://schema.org`,"@type":`CollectionPage`,name:t.collectionTitle},a=s(t.description)||t.summary;return a&&(i.description=a),t.coverImage&&(i.image=[t.coverImage]),i.mainEntity={"@type":`ItemList`,numberOfItems:r.length,itemListElement:r},i}var W=70;function G(e){return e.normalize(`NFKD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,W).replace(/-+$/g,``)}var K=class t{static _activeInstance=null;static shared(e){let n=t._activeInstance;return n?(n._holders+=1,n):new t(e)}_state=`idle`;_holders=1;_venueName;_venueAddress;_venueTimeZone;_baseUrl;_originals=null;_originalsSaved=!1;_events=[];constructor(n){typeof document>`u`||(t._activeInstance&&t._activeInstance!==this&&t._activeInstance._teardown(),this._venueName=n.venueName,this._venueAddress=n.venueAddress,this._venueTimeZone=n.venueTimeZone||e(),this._baseUrl=n.baseUrl||window.location.origin+window.location.pathname,this._saveOriginals(),t._activeInstance=this)}_saveOriginals(){if(this._originalsSaved)return;let e=document.querySelector(`link[rel="canonical"]`),t=document.querySelector(`meta[property="og:title"]`),n=document.querySelector(`meta[property="og:description"]`),r=document.querySelector(`meta[property="og:image"]`),i=document.querySelector(`meta[property="og:url"]`),a=document.querySelector(`meta[property="og:type"]`),o=document.querySelector(`meta[name="description"]`);this._originals={title:document.title,canonicalHref:e?.getAttribute(`href`)??null,ogTitle:t?.getAttribute(`content`)??null,ogDescription:n?.getAttribute(`content`)??null,ogImage:r?.getAttribute(`content`)??null,ogUrl:i?.getAttribute(`content`)??null,ogType:a?.getAttribute(`content`)??null,metaDescription:o?.getAttribute(`content`)??null},this._originalsSaved=!0}_injectJsonLd(e){if(typeof document>`u`)return;document.querySelectorAll(`script[data-micdrop="jsonld"]`).forEach(e=>e.remove());let t=document.createElement(`script`);t.setAttribute(`type`,`application/ld+json`),t.setAttribute(`data-micdrop`,`jsonld`),t.textContent=JSON.stringify(e),document.head.appendChild(t)}_setMeta(e,t){if(!(typeof document>`u`)){if(e.startsWith(`og:`)){let n=document.querySelector(`meta[property="${e}"]`);n?n.setAttribute(`content`,t):(n=document.createElement(`meta`),n.setAttribute(`property`,e),n.setAttribute(`content`,t),n.setAttribute(`data-micdrop`,`og`),document.head.appendChild(n))}else{let n=document.querySelector(`meta[name="${e}"]`);n?n.setAttribute(`content`,t):(n=document.createElement(`meta`),n.setAttribute(`name`,e),n.setAttribute(`content`,t),n.setAttribute(`data-micdrop`,`meta`),document.head.appendChild(n))}}}_setCanonical(e){if(typeof document>`u`)return;let t=document.querySelector(`link[rel="canonical"]`);t?t.setAttribute(`href`,e):(t=document.createElement(`link`),t.setAttribute(`rel`,`canonical`),t.setAttribute(`href`,e),t.setAttribute(`data-micdrop`,`canonical`),document.head.appendChild(t))}_removeAllInjected(){typeof document>`u`||document.querySelectorAll(`[data-micdrop]`).forEach(e=>e.remove())}_restoreOriginals(){if(!(typeof document>`u`||!this._originals)){if(document.title=this._originals.title,this._originals.canonicalHref!==null){let e=document.querySelector(`link[rel="canonical"]`);e&&e.setAttribute(`href`,this._originals.canonicalHref)}this._restoreMetaProperty(`og:title`,this._originals.ogTitle),this._restoreMetaProperty(`og:description`,this._originals.ogDescription),this._restoreMetaProperty(`og:image`,this._originals.ogImage),this._restoreMetaProperty(`og:url`,this._originals.ogUrl),this._restoreMetaProperty(`og:type`,this._originals.ogType),this._restoreMetaName(`description`,this._originals.metaDescription),this._originalsSaved=!1}}_restoreMetaProperty(e,t){let n=document.querySelector(`meta[property="${e}"]`);t!==null&&n?n.setAttribute(`content`,t):t===null&&n?.hasAttribute(`data-micdrop`)&&n.remove()}_restoreMetaName(e,t){let n=document.querySelector(`meta[name="${e}"]`);t!==null&&n?n.setAttribute(`content`,t):t===null&&n?.hasAttribute(`data-micdrop`)&&n.remove()}_buildItemList(e){return{"@context":`https://schema.org`,"@type":`ItemList`,itemListElement:e.map((e,t)=>{let n=e.slug||G(e.name||``);return{"@type":`ListItem`,position:t+1,url:`${this._baseUrl}?e=${e.id}-${n}`}})}}_buildEntityUrl(e,t,n){let r=e===`event`?`e`:e===`series`?`s`:`c`;return`${this._baseUrl}?${r}=${t}-${n}`}onEventsLoaded(e,t){if(typeof document>`u`||this._state===`destroyed`)return;if(t){this._venueName=t.name||this._venueName,this._venueAddress=t.address||t.googleLocationNameCache||this._venueAddress;let e=t.timeZone||t.timezone;e&&(this._venueTimeZone=e)}this._events=e;let n=this._buildItemList(e);this._injectJsonLd(n),this._state=`listing`}onEntitySelected(e,t,n){if(typeof document>`u`||this._state===`destroyed`)return;if(this._saveOriginals(),n){this._venueName=n.name||this._venueName,this._venueAddress=n.address||n.googleLocationNameCache||this._venueAddress;let e=n.timeZone||n.timezone;e&&(this._venueTimeZone=e)}let r=null,i=``,a=``,o=``,c=``,l=``;if(e===`event`){let e=t.slug||G(t.name||``);l=this._buildEntityUrl(`event`,t.id||t.eventID||``,e),r=z({event:t,venue:{name:this._venueName,googleLocationNameCache:this._venueAddress},venueTimeZone:this._venueTimeZone,eventUrl:l}),i=t.name||``,a=t.description||``,o=t.eventSummary||``,c=t.image||t.coverImage||t.ShowImage||``}else if(e===`series`){let e=t.slug||G(t.title||``);l=this._buildEntityUrl(`series`,t.id||``,e),r=H({series:{...t,venue:{name:this._venueName,googleLocationNameCache:this._venueAddress},timeZone:this._venueTimeZone},baseEventUrl:l}),i=t.title||``,a=t.description||``,o=t.eventSummary||``,c=t.image||``}else if(e===`collection`){let e=t.slug||G(t.collectionTitle||``);l=this._buildEntityUrl(`collection`,t.id||``,e),r=U({collection:t,baseEventUrl:l,defaultTimeZone:this._venueTimeZone}),i=t.collectionTitle||``,a=t.description||``,o=t.summary||``,c=t.coverImage||``}r&&this._injectJsonLd(r),l&&this._setCanonical(l),i&&this._setMeta(`og:title`,i);let u=s(a,160)||s(o,160);u?this._setMeta(`og:description`,u):this._restoreMetaProperty(`og:description`,this._originals?.ogDescription??null),c&&this._setMeta(`og:image`,c),l&&this._setMeta(`og:url`,l),this._setMeta(`og:type`,`website`),this._setMeta(`twitter:card`,`summary_large_image`),u?this._setMeta(`description`,u):this._restoreMetaName(`description`,this._originals?.metaDescription??null),i&&(document.title=`${i} | ${this._venueName}`),this._state=`entity`}onBackToListing(){if(!(typeof document>`u`)&&this._state!==`destroyed`){if(this._restoreOriginals(),this._removeAllInjected(),this._events.length>0){let e=this._buildItemList(this._events);this._injectJsonLd(e)}this._saveOriginals(),this._state=`listing`}}destroy(){if(this._holders>1){--this._holders;return}this._teardown()}_teardown(){typeof document>`u`||this._state!==`destroyed`&&(this._removeAllInjected(),this._restoreOriginals(),t._activeInstance===this&&(t._activeInstance=null),this._state=`destroyed`)}};exports.HostSeoController=K,exports.buildCollectionJsonLd=U,exports.buildEventJsonLd=z,exports.buildOffers=L,exports.buildPerformers=R,exports.buildPostalAddress=N,exports.buildSeriesJsonLd=H,exports.escapeJsonLdForScript=A,exports.formatDateTimeWithOffset=j,exports.getEventStatus=P,exports.getTicketAvailability=F,exports.parseAddressToPostal=M;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(){return`America/Los_Angeles`}var t=/<\/(?:p|div|h[1-6]|li|ul|ol|blockquote|tr)>/gi,n=/<br\s*\/?>/gi,r=/<[^>]*>/g,i={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`,"'":`'`," ":` `};function a(e){return e.replace(/&#x([0-9a-f]+);/gi,(e,t)=>o(parseInt(t,16))).replace(/&#(\d+);/g,(e,t)=>o(Number(t))).replace(/&[a-z0-9]+;/gi,e=>i[e.toLowerCase()]??e)}function o(e){return Number.isFinite(e)&&e>0&&e<=1114111?String.fromCodePoint(e):``}function s(e,i){if(!e)return``;let o=String(e).replace(n,` `).replace(t,` `).replace(r,``);if(o=a(o).replace(/\s+/g,` `).trim(),i&&i>0&&o.length>i){let e=o.slice(0,i),t=e.lastIndexOf(` `);o=(t>40?e.slice(0,t):e).trimEnd()+`…`}return o}function c(){return new Date}var l=class extends Error{constructor(e,t,n={}){super(e),this.name=`AppError`,this.code=t,this.status=n.status??500,this.details=n.details,this.timestamp=c(),this.recoverable=n.recoverable??!0,this.cause=n.cause,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toJSON(){return{name:this.name,code:this.code,message:this.message,status:this.status,details:this.details,timestamp:this.timestamp.toISOString(),recoverable:this.recoverable,stack:this.stack,cause:this.cause?.message}}getUserMessage(e){return this.message}isRetryable(){return this.recoverable}},u=class extends l{constructor(e,t,n={}){super(e,t,{status:422,recoverable:!1,...n}),this.name=`ValueGuardError`}},d=class extends u{constructor(e,t,n){super(e,t,{details:n}),this.name=`DateTimeError`}},f;(function(e){e.INVALID_TIMEZONE=`INVALID_TIMEZONE`,e.INVALID_ISO_STRING=`INVALID_ISO_STRING`,e.INVALID_DATE=`INVALID_DATE`,e.INVALID_TIME=`INVALID_TIME`,e.MISSING_TIMEZONE=`MISSING_TIMEZONE`,e.PARSE_ERROR=`PARSE_ERROR`})(f||={});function p(e,t,n,r=0,i=0,a=0){let o=new Date(Date.UTC(e,t-1,n,r,i,a));return e>=0&&e<=99&&o.setUTCFullYear(e),o}var m=/^(\d{4})-(\d{2})-(\d{2})(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:\d{2}))?$/,h=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?$/;function g(e,t,n){let r=p(e,t,n);return r.getUTCFullYear()===e&&r.getUTCMonth()===t-1&&r.getUTCDate()===n}var _=/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,9}))? ?([+-])(\d{2}):?(\d{2})(?: [A-Za-z][A-Za-z0-9_/+-]*)?(?: m=[+-][\d.]+)?$/,v=p(1,1,1).getTime();function y(e){let t=m.exec(e);if(t){let[,n,r,i]=t;return{iso:e,year:+n,month:+r,day:+i}}let n=_.exec(e);if(n){let[,e,t,r,i,a,o,s,c,l,u]=n;return{iso:`${e}-${t}-${r}T${i}:${a}:${o}${s?`.${s.slice(0,3).padEnd(3,`0`)}`:``}${c}${l}:${u}`,year:+e,month:+t,day:+r}}return null}function b(e){if(typeof e==`number`){if(!Number.isFinite(e))return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}if(typeof e!=`string`)return null;let t=y(e.trim());if(!t||!g(t.year,t.month,t.day))return null;let n=new Date(t.iso);return Number.isNaN(n.getTime())?null:n}function x(e){let t=b(e);return t!==null&&t.getTime()===v}function S(e,t){if(e.getTime()===v)throw new d(`toInstant: ${JSON.stringify(t)} is the backend's UNSET marker (Go's zero time.Time), not a moment — the field was never filled in. toInstant is the REQUIRED-timestamp door, so an unset value here is a bug: returning the year-1 instant it names would sort this row ahead of every real date and answer "yes" to "has this started?". If the field is allowed to be unset, read it with toInstantOrNull (null), ask isAbsentTimestamp why it is missing, and order it with compareWireInstants.`,f.INVALID_ISO_STRING,{value:t})}function C(e,t){if(!(e instanceof Date)||Number.isNaN(e.getTime()))throw new d(`${t} must be a valid Date`,f.INVALID_DATE,{value:e})}function w(e,t){return C(e,`compareInstants(a)`),C(t,`compareInstants(b)`),e.getTime()-t.getTime()}function T(e){if(typeof e==`number`){if(!Number.isFinite(e))throw new d(`toInstant: epoch milliseconds must be a finite number, got ${e}`,f.INVALID_DATE,{value:e});let t=new Date(e);return C(t,`toInstant(value)`),S(t,e),t}if(typeof e!=`string`||e.trim()===``)throw new d(`toInstant: a UTC ISO timestamp or epoch ms is required, got ${JSON.stringify(e)}`,typeof e==`string`?f.INVALID_ISO_STRING:f.INVALID_DATE,{value:e});let t=y(e);if(!t)throw h.test(e)?new d(`toInstant: ${JSON.stringify(e)} carries a time but no timezone, so it is not an instant — it would resolve on the viewer's clock and land on a different calendar day for a viewer in Los Angeles than one in London. Send a UTC wire timestamp (2026-06-09T20:00:00Z) or an explicit offset (2026-06-09T13:00:00-07:00). If this is a local wall-clock value, it belongs in datetime/local or parseLocalToUTC(value, timezone), not here.`,f.MISSING_TIMEZONE,{value:e}):new d(`toInstant: not an ISO-8601 timestamp: ${JSON.stringify(e)}`,f.INVALID_ISO_STRING,{value:e});let{year:n,month:r,day:i}=t;if(!g(n,r,i))throw new d(`toInstant: ${n}-${r}-${i} is not a real calendar date: ${JSON.stringify(e)}`,f.INVALID_ISO_STRING,{value:e});let a=new Date(t.iso);if(Number.isNaN(a.getTime()))throw new d(`toInstant: ISO-8601 shaped but not a real instant: ${JSON.stringify(e)}`,f.INVALID_ISO_STRING,{value:e});return S(a,e),a}function E(e){if(e==null||typeof e==`string`&&e.trim()===``||x(e))return null;try{return T(e)}catch{return null}}function D(e){return Math.round((e+2**-52)*100)/100}function O(e){if(e==null)return null;let t=Number(e);return Number.isFinite(t)?t:null}function k(e){let t=O(e?.price);return t===null?null:t===0?0:D(t+(O(e?.fee)??0))}var A={VISIBLE:0,HIDDEN:1,PROMO_ONLY:2};function j(e){return e.replace(/</g,`\\u003c`).replace(/>/g,`\\u003e`).replace(/&/g,`\\u0026`)}function M(t,n){if(!t)return null;let r=new Date(t);if(isNaN(r.getTime()))return null;let i={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1,timeZoneName:`shortOffset`},a;try{a=new Intl.DateTimeFormat(`en-US`,{...i,timeZone:n})}catch{a=new Intl.DateTimeFormat(`en-US`,{...i,timeZone:e()})}let o=a.formatToParts(r),s=e=>o.find(t=>t.type===e)?.value||``,c=s(`year`),l=s(`month`),u=s(`day`),d=s(`hour`),f=s(`minute`),p=s(`second`),m=s(`timeZoneName`),h=`+00:00`;if(m){let e=m.match(/GMT([+-])(\d+)(?::(\d+))?/);e&&(h=`${e[1]}${e[2].padStart(2,`0`)}:${e[3]||`00`}`)}return`${c}-${l}-${u}T${d}:${f}:${p}${h}`}function N(e){if(!e)return null;let t=e.split(`,`).map(e=>e.trim());if(t.length<2)return{"@type":`PostalAddress`,streetAddress:e,addressCountry:`US`};let n=t[t.length-1].match(/^([A-Z]{2})\s+(\d{5}(?:-\d{4})?)$/);return n&&t.length>=3?{"@type":`PostalAddress`,streetAddress:t.slice(0,-2).join(`, `),addressLocality:t[t.length-2],addressRegion:n[1],postalCode:n[2],addressCountry:`US`}:{"@type":`PostalAddress`,streetAddress:t[0],addressLocality:t.slice(1).join(`, `),addressCountry:`US`}}function P(e,t){if(e&&(e.city||e.state||e.postalCode)){let t={"@type":`PostalAddress`};return e.address&&(t.streetAddress=e.address),e.city&&(t.addressLocality=e.city),e.state&&(t.addressRegion=e.state),e.postalCode&&(t.postalCode=e.postalCode),t.addressCountry=e.country||`US`,t}return N(e&&e.address||t||null)}function F(e){if(!e)return`https://schema.org/EventScheduled`;let t=e.toLowerCase();return t===`cancelled`||t===`canceled`?`https://schema.org/EventCancelled`:t===`postponed`?`https://schema.org/EventPostponed`:t===`rescheduled`?`https://schema.org/EventRescheduled`:`https://schema.org/EventScheduled`}function I(e){if((e.remainingCapacity??e.quantityRemaining??e.quantity)===0||e.soldOut)return`https://schema.org/SoldOut`;let t=c(),n=E(e.salesBegin||e.salesStart||e.saleBegin||e.onSaleStart),r=E(e.salesEnd||e.saleEnd||e.onSaleEnd);return n&&w(n,t)>0?`https://schema.org/PreOrder`:r&&w(r,t)<0?`https://schema.org/SoldOut`:`https://schema.org/InStock`}function L(e,t,n,r={}){return e===t?{"@type":`Offer`,price:e,priceCurrency:`USD`,availability:n,...r}:{"@type":`AggregateOffer`,lowPrice:e,highPrice:t,priceCurrency:`USD`,availability:n,...r}}function R(e,t){if(!e||e.length===0)return null;let n=e.filter(e=>{let t=(e.visibility??0)<A.HIDDEN,n=e.salesChannel!==2;return t&&n});if(n.length===0)return null;let r=n.map(e=>k({price:e.price,fee:e.fee})).filter(e=>e!=null);if(r.length===0)return null;let i=Math.min(...r),a=Math.max(...r),o=n[0];return L(i,a,I(o),{url:t||void 0,validFrom:o?.salesBegin||o?.salesStart||void 0})}function z(e){if(!e||e.length===0)return null;let t=e.filter(e=>{let t=e.acceptedState===2,n=!e.shouldBeHidden,r=e.RosterPerformer?.User?.performerProfile,i=r?.firstName||r?.lastName||r?.displayName;return t&&n&&i});return t.length===0?null:t.map(e=>{let t=e.RosterPerformer?.User?.performerProfile;return{"@type":`PerformingGroup`,name:t?.displayName||[t?.firstName,t?.lastName].filter(Boolean).join(` `)}})}function B(t){let{event:n,venue:r,venueTimeZone:i=e(),eventUrl:a,organizer:o}=t;if(!n)return null;let c=M(n.startDateTime,i);if(!n.name||!c||!r?.name)return null;let l=P(r,r?.googleLocationNameCache),u={"@type":`Place`,name:r.name};l&&(u.address=l);let d={"@context":`https://schema.org`,"@type":`Event`,name:n.name,startDate:c,eventStatus:F(n.status),eventAttendanceMode:`https://schema.org/OfflineEventAttendanceMode`,location:u},f=M(n.endDateTime,i);f&&(d.endDate=f);let p=s(n.description)||n.eventSummary;p&&(d.description=p);let m=n.image||n.coverImage||n.ShowImage;m&&(d.image=[m]);let h=R(n.availableTickets,a);h&&(d.offers=h);let g=z(n.performers);if(g&&g.length>0&&(d.performer=g),o?.name){let e={"@type":`Organization`,name:o.name};o.url&&(e.url=o.url),d.organizer=e}return a&&(d.url=a),d}function V(e){switch(e){case`available`:return`https://schema.org/InStock`;case`sold_out`:return`https://schema.org/SoldOut`;case`coming_soon`:return`https://schema.org/PreOrder`;case`ended`:return`https://schema.org/SoldOut`;default:return`https://schema.org/InStock`}}function H(e,t){if(!e||e.length===0)return null;let n=e.filter(e=>e.status!==`sold_out`&&e.status!==`ended`);if(n.length===0){let t=e.map(e=>e.price).filter(e=>!isNaN(e));return t.length===0?null:L(Math.min(...t),Math.max(...t),`https://schema.org/SoldOut`)}let r=n.map(e=>e.price).filter(e=>!isNaN(e));return r.length===0?null:L(Math.min(...r),Math.max(...r),V(n[0].status))}function U(e){let{series:t,baseEventUrl:n}=e;if(!t.title||!t.occurrences||t.occurrences.length===0||!t.venue?.name)return null;let r=P(t.venue,t.venue.googleLocationNameCache),i={"@type":`Place`,name:t.venue.name};r&&(i.address=r);let a={"@context":`https://schema.org`,"@type":`EventSeries`,name:t.title,location:i},o=s(t.description)||t.eventSummary;o&&(a.description=o),t.image&&(a.image=[t.image]);let c=t.performers?.filter(e=>e.displayName);c&&c.length>0&&(a.performer=c.map(e=>({"@type":`PerformingGroup`,name:e.displayName})));let l=[];for(let e of t.occurrences){let r=M(e.startDateTime,t.timeZone);if(!r)continue;let a={"@type":`Event`,name:e.title,startDate:r,eventStatus:F(e.status),location:i};n&&(a[`@id`]=`${n}/${e.id}-${e.slug}`);let o=M(e.endDateTime,t.timeZone);o&&(a.endDate=o);let s=H(e.tickets,e.status);s&&(a.offers=s),l.push(a)}return l.length===0?null:(a.subEvent=l,a)}function W(e){let{collection:t,baseEventUrl:n}=e;if(!t.collectionTitle||!t.events||t.events.length===0)return null;let r=[];for(let e of t.events){if(!e.title)continue;let t={"@type":`ListItem`,position:r.length+1,name:e.title};n&&(t.url=e.slug?`${n}/${e.id}-${e.slug}`:`${n}/${e.id}`),r.push(t)}if(r.length===0)return null;let i={"@context":`https://schema.org`,"@type":`CollectionPage`,name:t.collectionTitle},a=s(t.description)||t.summary;return a&&(i.description=a),t.coverImage&&(i.image=[t.coverImage]),i.mainEntity={"@type":`ItemList`,numberOfItems:r.length,itemListElement:r},i}var G=70;function K(e){return e.normalize(`NFKD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,G).replace(/-+$/g,``)}var q=class t{static _activeInstance=null;static shared(e){let n=t._activeInstance;return n?(n._holders+=1,n):new t(e)}_state=`idle`;_holders=1;_venueName;_venueAddress;_venueTimeZone;_baseUrl;_originals=null;_originalsSaved=!1;_events=[];constructor(n){typeof document>`u`||(t._activeInstance&&t._activeInstance!==this&&t._activeInstance._teardown(),this._venueName=n.venueName,this._venueAddress=n.venueAddress,this._venueTimeZone=n.venueTimeZone||e(),this._baseUrl=n.baseUrl||window.location.origin+window.location.pathname,this._saveOriginals(),t._activeInstance=this)}_saveOriginals(){if(this._originalsSaved)return;let e=document.querySelector(`link[rel="canonical"]`),t=document.querySelector(`meta[property="og:title"]`),n=document.querySelector(`meta[property="og:description"]`),r=document.querySelector(`meta[property="og:image"]`),i=document.querySelector(`meta[property="og:url"]`),a=document.querySelector(`meta[property="og:type"]`),o=document.querySelector(`meta[name="description"]`);this._originals={title:document.title,canonicalHref:e?.getAttribute(`href`)??null,ogTitle:t?.getAttribute(`content`)??null,ogDescription:n?.getAttribute(`content`)??null,ogImage:r?.getAttribute(`content`)??null,ogUrl:i?.getAttribute(`content`)??null,ogType:a?.getAttribute(`content`)??null,metaDescription:o?.getAttribute(`content`)??null},this._originalsSaved=!0}_injectJsonLd(e){if(typeof document>`u`)return;document.querySelectorAll(`script[data-micdrop="jsonld"]`).forEach(e=>e.remove());let t=document.createElement(`script`);t.setAttribute(`type`,`application/ld+json`),t.setAttribute(`data-micdrop`,`jsonld`),t.textContent=JSON.stringify(e),document.head.appendChild(t)}_setMeta(e,t){if(!(typeof document>`u`)){if(e.startsWith(`og:`)){let n=document.querySelector(`meta[property="${e}"]`);n?n.setAttribute(`content`,t):(n=document.createElement(`meta`),n.setAttribute(`property`,e),n.setAttribute(`content`,t),n.setAttribute(`data-micdrop`,`og`),document.head.appendChild(n))}else{let n=document.querySelector(`meta[name="${e}"]`);n?n.setAttribute(`content`,t):(n=document.createElement(`meta`),n.setAttribute(`name`,e),n.setAttribute(`content`,t),n.setAttribute(`data-micdrop`,`meta`),document.head.appendChild(n))}}}_setCanonical(e){if(typeof document>`u`)return;let t=document.querySelector(`link[rel="canonical"]`);t?t.setAttribute(`href`,e):(t=document.createElement(`link`),t.setAttribute(`rel`,`canonical`),t.setAttribute(`href`,e),t.setAttribute(`data-micdrop`,`canonical`),document.head.appendChild(t))}_removeAllInjected(){typeof document>`u`||document.querySelectorAll(`[data-micdrop]`).forEach(e=>e.remove())}_restoreOriginals(){if(!(typeof document>`u`||!this._originals)){if(document.title=this._originals.title,this._originals.canonicalHref!==null){let e=document.querySelector(`link[rel="canonical"]`);e&&e.setAttribute(`href`,this._originals.canonicalHref)}this._restoreMetaProperty(`og:title`,this._originals.ogTitle),this._restoreMetaProperty(`og:description`,this._originals.ogDescription),this._restoreMetaProperty(`og:image`,this._originals.ogImage),this._restoreMetaProperty(`og:url`,this._originals.ogUrl),this._restoreMetaProperty(`og:type`,this._originals.ogType),this._restoreMetaName(`description`,this._originals.metaDescription),this._originalsSaved=!1}}_restoreMetaProperty(e,t){let n=document.querySelector(`meta[property="${e}"]`);t!==null&&n?n.setAttribute(`content`,t):t===null&&n?.hasAttribute(`data-micdrop`)&&n.remove()}_restoreMetaName(e,t){let n=document.querySelector(`meta[name="${e}"]`);t!==null&&n?n.setAttribute(`content`,t):t===null&&n?.hasAttribute(`data-micdrop`)&&n.remove()}_buildItemList(e){return{"@context":`https://schema.org`,"@type":`ItemList`,itemListElement:e.map((e,t)=>{let n=e.slug||K(e.name||``);return{"@type":`ListItem`,position:t+1,url:`${this._baseUrl}?e=${e.id}-${n}`}})}}_buildEntityUrl(e,t,n){let r=e===`event`?`e`:e===`series`?`s`:`c`;return`${this._baseUrl}?${r}=${t}-${n}`}onEventsLoaded(e,t){if(typeof document>`u`||this._state===`destroyed`)return;if(t){this._venueName=t.name||this._venueName,this._venueAddress=t.address||t.googleLocationNameCache||this._venueAddress;let e=t.timeZone||t.timezone;e&&(this._venueTimeZone=e)}this._events=e;let n=this._buildItemList(e);this._injectJsonLd(n),this._state=`listing`}onEntitySelected(e,t,n){if(typeof document>`u`||this._state===`destroyed`)return;if(this._saveOriginals(),n){this._venueName=n.name||this._venueName,this._venueAddress=n.address||n.googleLocationNameCache||this._venueAddress;let e=n.timeZone||n.timezone;e&&(this._venueTimeZone=e)}let r=null,i=``,a=``,o=``,c=``,l=``;if(e===`event`){let e=t.slug||K(t.name||``);l=this._buildEntityUrl(`event`,t.id||t.eventID||``,e),r=B({event:t,venue:{name:this._venueName,googleLocationNameCache:this._venueAddress},venueTimeZone:this._venueTimeZone,eventUrl:l}),i=t.name||``,a=t.description||``,o=t.eventSummary||``,c=t.image||t.coverImage||t.ShowImage||``}else if(e===`series`){let e=t.slug||K(t.title||``);l=this._buildEntityUrl(`series`,t.id||``,e),r=U({series:{...t,venue:{name:this._venueName,googleLocationNameCache:this._venueAddress},timeZone:this._venueTimeZone},baseEventUrl:l}),i=t.title||``,a=t.description||``,o=t.eventSummary||``,c=t.image||``}else if(e===`collection`){let e=t.slug||K(t.collectionTitle||``);l=this._buildEntityUrl(`collection`,t.id||``,e),r=W({collection:t,baseEventUrl:l,defaultTimeZone:this._venueTimeZone}),i=t.collectionTitle||``,a=t.description||``,o=t.summary||``,c=t.coverImage||``}r&&this._injectJsonLd(r),l&&this._setCanonical(l),i&&this._setMeta(`og:title`,i);let u=s(a,160)||s(o,160);u?this._setMeta(`og:description`,u):this._restoreMetaProperty(`og:description`,this._originals?.ogDescription??null),c&&this._setMeta(`og:image`,c),l&&this._setMeta(`og:url`,l),this._setMeta(`og:type`,`website`),this._setMeta(`twitter:card`,`summary_large_image`),u?this._setMeta(`description`,u):this._restoreMetaName(`description`,this._originals?.metaDescription??null),i&&(document.title=`${i} | ${this._venueName}`),this._state=`entity`}onBackToListing(){if(!(typeof document>`u`)&&this._state!==`destroyed`){if(this._restoreOriginals(),this._removeAllInjected(),this._events.length>0){let e=this._buildItemList(this._events);this._injectJsonLd(e)}this._saveOriginals(),this._state=`listing`}}destroy(){if(this._holders>1){--this._holders;return}this._teardown()}_teardown(){typeof document>`u`||this._state!==`destroyed`&&(this._removeAllInjected(),this._restoreOriginals(),t._activeInstance===this&&(t._activeInstance=null),this._state=`destroyed`)}};exports.HostSeoController=q,exports.buildCollectionJsonLd=W,exports.buildEventJsonLd=B,exports.buildOffers=R,exports.buildPerformers=z,exports.buildPostalAddress=P,exports.buildSeriesJsonLd=U,exports.escapeJsonLdForScript=j,exports.formatDateTimeWithOffset=M,exports.getEventStatus=F,exports.getTicketAvailability=I,exports.parseAddressToPostal=N;
|
package/dist/seo/seo.mjs
CHANGED
|
@@ -176,11 +176,18 @@ function k(e) {
|
|
|
176
176
|
return t === null ? null : t === 0 ? 0 : D(t + (O(e?.fee) ?? 0));
|
|
177
177
|
}
|
|
178
178
|
//#endregion
|
|
179
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/transforms/ticket.js
|
|
180
|
+
var A = {
|
|
181
|
+
VISIBLE: 0,
|
|
182
|
+
HIDDEN: 1,
|
|
183
|
+
PROMO_ONLY: 2
|
|
184
|
+
};
|
|
185
|
+
//#endregion
|
|
179
186
|
//#region src/lib/seo/helpers.ts
|
|
180
|
-
function
|
|
187
|
+
function j(e) {
|
|
181
188
|
return e.replace(/</g, "\\u003c").replace(/>/g, "\\u003e").replace(/&/g, "\\u0026");
|
|
182
189
|
}
|
|
183
|
-
function
|
|
190
|
+
function M(t, n) {
|
|
184
191
|
if (!t) return null;
|
|
185
192
|
let r = new Date(t);
|
|
186
193
|
if (isNaN(r.getTime())) return null;
|
|
@@ -212,7 +219,7 @@ function j(t, n) {
|
|
|
212
219
|
}
|
|
213
220
|
return `${c}-${l}-${u}T${d}:${f}:${p}${h}`;
|
|
214
221
|
}
|
|
215
|
-
function
|
|
222
|
+
function N(e) {
|
|
216
223
|
if (!e) return null;
|
|
217
224
|
let t = e.split(",").map((e) => e.trim());
|
|
218
225
|
if (t.length < 2) return {
|
|
@@ -235,24 +242,24 @@ function M(e) {
|
|
|
235
242
|
addressCountry: "US"
|
|
236
243
|
};
|
|
237
244
|
}
|
|
238
|
-
function
|
|
245
|
+
function P(e, t) {
|
|
239
246
|
if (e && (e.city || e.state || e.postalCode)) {
|
|
240
247
|
let t = { "@type": "PostalAddress" };
|
|
241
248
|
return e.address && (t.streetAddress = e.address), e.city && (t.addressLocality = e.city), e.state && (t.addressRegion = e.state), e.postalCode && (t.postalCode = e.postalCode), t.addressCountry = e.country || "US", t;
|
|
242
249
|
}
|
|
243
|
-
return
|
|
250
|
+
return N(e && e.address || t || null);
|
|
244
251
|
}
|
|
245
|
-
function
|
|
252
|
+
function F(e) {
|
|
246
253
|
if (!e) return "https://schema.org/EventScheduled";
|
|
247
254
|
let t = e.toLowerCase();
|
|
248
255
|
return t === "cancelled" || t === "canceled" ? "https://schema.org/EventCancelled" : t === "postponed" ? "https://schema.org/EventPostponed" : t === "rescheduled" ? "https://schema.org/EventRescheduled" : "https://schema.org/EventScheduled";
|
|
249
256
|
}
|
|
250
|
-
function
|
|
257
|
+
function I(e) {
|
|
251
258
|
if ((e.remainingCapacity ?? e.quantityRemaining ?? e.quantity) === 0 || e.soldOut) return "https://schema.org/SoldOut";
|
|
252
259
|
let t = c(), n = E(e.salesBegin || e.salesStart || e.saleBegin || e.onSaleStart), r = E(e.salesEnd || e.saleEnd || e.onSaleEnd);
|
|
253
260
|
return n && w(n, t) > 0 ? "https://schema.org/PreOrder" : r && w(r, t) < 0 ? "https://schema.org/SoldOut" : "https://schema.org/InStock";
|
|
254
261
|
}
|
|
255
|
-
function
|
|
262
|
+
function L(e, t, n, r = {}) {
|
|
256
263
|
return e === t ? {
|
|
257
264
|
"@type": "Offer",
|
|
258
265
|
price: e,
|
|
@@ -268,11 +275,11 @@ function I(e, t, n, r = {}) {
|
|
|
268
275
|
...r
|
|
269
276
|
};
|
|
270
277
|
}
|
|
271
|
-
function
|
|
278
|
+
function R(e, t) {
|
|
272
279
|
if (!e || e.length === 0) return null;
|
|
273
280
|
let n = e.filter((e) => {
|
|
274
|
-
let t = e.visibility ?? 0
|
|
275
|
-
return
|
|
281
|
+
let t = (e.visibility ?? 0) < A.HIDDEN, n = e.salesChannel !== 2;
|
|
282
|
+
return t && n;
|
|
276
283
|
});
|
|
277
284
|
if (n.length === 0) return null;
|
|
278
285
|
let r = n.map((e) => k({
|
|
@@ -281,12 +288,12 @@ function L(e, t) {
|
|
|
281
288
|
})).filter((e) => e != null);
|
|
282
289
|
if (r.length === 0) return null;
|
|
283
290
|
let i = Math.min(...r), a = Math.max(...r), o = n[0];
|
|
284
|
-
return
|
|
291
|
+
return L(i, a, I(o), {
|
|
285
292
|
url: t || void 0,
|
|
286
293
|
validFrom: o?.salesBegin || o?.salesStart || void 0
|
|
287
294
|
});
|
|
288
295
|
}
|
|
289
|
-
function
|
|
296
|
+
function z(e) {
|
|
290
297
|
if (!e || e.length === 0) return null;
|
|
291
298
|
let t = e.filter((e) => {
|
|
292
299
|
let t = e.acceptedState === 2, n = !e.shouldBeHidden, r = e.RosterPerformer?.User?.performerProfile, i = r?.firstName || r?.lastName || r?.displayName;
|
|
@@ -302,12 +309,12 @@ function R(e) {
|
|
|
302
309
|
}
|
|
303
310
|
//#endregion
|
|
304
311
|
//#region src/lib/seo/buildEventJsonLd.ts
|
|
305
|
-
function
|
|
312
|
+
function B(t) {
|
|
306
313
|
let { event: n, venue: r, venueTimeZone: i = e(), eventUrl: a, organizer: o } = t;
|
|
307
314
|
if (!n) return null;
|
|
308
|
-
let c =
|
|
315
|
+
let c = M(n.startDateTime, i);
|
|
309
316
|
if (!n.name || !c || !r?.name) return null;
|
|
310
|
-
let l =
|
|
317
|
+
let l = P(r, r?.googleLocationNameCache), u = {
|
|
311
318
|
"@type": "Place",
|
|
312
319
|
name: r.name
|
|
313
320
|
};
|
|
@@ -317,18 +324,18 @@ function z(t) {
|
|
|
317
324
|
"@type": "Event",
|
|
318
325
|
name: n.name,
|
|
319
326
|
startDate: c,
|
|
320
|
-
eventStatus:
|
|
327
|
+
eventStatus: F(n.status),
|
|
321
328
|
eventAttendanceMode: "https://schema.org/OfflineEventAttendanceMode",
|
|
322
329
|
location: u
|
|
323
|
-
}, f =
|
|
330
|
+
}, f = M(n.endDateTime, i);
|
|
324
331
|
f && (d.endDate = f);
|
|
325
332
|
let p = s(n.description) || n.eventSummary;
|
|
326
333
|
p && (d.description = p);
|
|
327
334
|
let m = n.image || n.coverImage || n.ShowImage;
|
|
328
335
|
m && (d.image = [m]);
|
|
329
|
-
let h =
|
|
336
|
+
let h = R(n.availableTickets, a);
|
|
330
337
|
h && (d.offers = h);
|
|
331
|
-
let g =
|
|
338
|
+
let g = z(n.performers);
|
|
332
339
|
if (g && g.length > 0 && (d.performer = g), o?.name) {
|
|
333
340
|
let e = {
|
|
334
341
|
"@type": "Organization",
|
|
@@ -340,7 +347,7 @@ function z(t) {
|
|
|
340
347
|
}
|
|
341
348
|
//#endregion
|
|
342
349
|
//#region src/lib/seo/buildSeriesJsonLd.ts
|
|
343
|
-
function
|
|
350
|
+
function V(e) {
|
|
344
351
|
switch (e) {
|
|
345
352
|
case "available": return "https://schema.org/InStock";
|
|
346
353
|
case "sold_out": return "https://schema.org/SoldOut";
|
|
@@ -349,20 +356,20 @@ function B(e) {
|
|
|
349
356
|
default: return "https://schema.org/InStock";
|
|
350
357
|
}
|
|
351
358
|
}
|
|
352
|
-
function
|
|
359
|
+
function H(e, t) {
|
|
353
360
|
if (!e || e.length === 0) return null;
|
|
354
361
|
let n = e.filter((e) => e.status !== "sold_out" && e.status !== "ended");
|
|
355
362
|
if (n.length === 0) {
|
|
356
363
|
let t = e.map((e) => e.price).filter((e) => !isNaN(e));
|
|
357
|
-
return t.length === 0 ? null :
|
|
364
|
+
return t.length === 0 ? null : L(Math.min(...t), Math.max(...t), "https://schema.org/SoldOut");
|
|
358
365
|
}
|
|
359
366
|
let r = n.map((e) => e.price).filter((e) => !isNaN(e));
|
|
360
|
-
return r.length === 0 ? null :
|
|
367
|
+
return r.length === 0 ? null : L(Math.min(...r), Math.max(...r), V(n[0].status));
|
|
361
368
|
}
|
|
362
|
-
function
|
|
369
|
+
function U(e) {
|
|
363
370
|
let { series: t, baseEventUrl: n } = e;
|
|
364
371
|
if (!t.title || !t.occurrences || t.occurrences.length === 0 || !t.venue?.name) return null;
|
|
365
|
-
let r =
|
|
372
|
+
let r = P(t.venue, t.venue.googleLocationNameCache), i = {
|
|
366
373
|
"@type": "Place",
|
|
367
374
|
name: t.venue.name
|
|
368
375
|
};
|
|
@@ -381,26 +388,26 @@ function H(e) {
|
|
|
381
388
|
})));
|
|
382
389
|
let l = [];
|
|
383
390
|
for (let e of t.occurrences) {
|
|
384
|
-
let r =
|
|
391
|
+
let r = M(e.startDateTime, t.timeZone);
|
|
385
392
|
if (!r) continue;
|
|
386
393
|
let a = {
|
|
387
394
|
"@type": "Event",
|
|
388
395
|
name: e.title,
|
|
389
396
|
startDate: r,
|
|
390
|
-
eventStatus:
|
|
397
|
+
eventStatus: F(e.status),
|
|
391
398
|
location: i
|
|
392
399
|
};
|
|
393
400
|
n && (a["@id"] = `${n}/${e.id}-${e.slug}`);
|
|
394
|
-
let o =
|
|
401
|
+
let o = M(e.endDateTime, t.timeZone);
|
|
395
402
|
o && (a.endDate = o);
|
|
396
|
-
let s =
|
|
403
|
+
let s = H(e.tickets, e.status);
|
|
397
404
|
s && (a.offers = s), l.push(a);
|
|
398
405
|
}
|
|
399
406
|
return l.length === 0 ? null : (a.subEvent = l, a);
|
|
400
407
|
}
|
|
401
408
|
//#endregion
|
|
402
409
|
//#region src/lib/seo/buildCollectionJsonLd.ts
|
|
403
|
-
function
|
|
410
|
+
function W(e) {
|
|
404
411
|
let { collection: t, baseEventUrl: n } = e;
|
|
405
412
|
if (!t.collectionTitle || !t.events || t.events.length === 0) return null;
|
|
406
413
|
let r = [];
|
|
@@ -427,13 +434,13 @@ function U(e) {
|
|
|
427
434
|
}
|
|
428
435
|
//#endregion
|
|
429
436
|
//#region node_modules/@getmicdrop/svelte-components/dist/routing/slug.js
|
|
430
|
-
var
|
|
431
|
-
function
|
|
432
|
-
return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "").slice(0,
|
|
437
|
+
var G = 70;
|
|
438
|
+
function K(e) {
|
|
439
|
+
return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, G).replace(/-+$/g, "");
|
|
433
440
|
}
|
|
434
441
|
//#endregion
|
|
435
442
|
//#region src/lib/seo/HostSeoController.ts
|
|
436
|
-
var
|
|
443
|
+
var q = class t {
|
|
437
444
|
static _activeInstance = null;
|
|
438
445
|
static shared(e) {
|
|
439
446
|
let n = t._activeInstance;
|
|
@@ -512,7 +519,7 @@ var K = class t {
|
|
|
512
519
|
"@context": "https://schema.org",
|
|
513
520
|
"@type": "ItemList",
|
|
514
521
|
itemListElement: e.map((e, t) => {
|
|
515
|
-
let n = e.slug ||
|
|
522
|
+
let n = e.slug || K(e.name || "");
|
|
516
523
|
return {
|
|
517
524
|
"@type": "ListItem",
|
|
518
525
|
position: t + 1,
|
|
@@ -545,8 +552,8 @@ var K = class t {
|
|
|
545
552
|
}
|
|
546
553
|
let r = null, i = "", a = "", o = "", c = "", l = "";
|
|
547
554
|
if (e === "event") {
|
|
548
|
-
let e = t.slug ||
|
|
549
|
-
l = this._buildEntityUrl("event", t.id || t.eventID || "", e), r =
|
|
555
|
+
let e = t.slug || K(t.name || "");
|
|
556
|
+
l = this._buildEntityUrl("event", t.id || t.eventID || "", e), r = B({
|
|
550
557
|
event: t,
|
|
551
558
|
venue: {
|
|
552
559
|
name: this._venueName,
|
|
@@ -556,8 +563,8 @@ var K = class t {
|
|
|
556
563
|
eventUrl: l
|
|
557
564
|
}), i = t.name || "", a = t.description || "", o = t.eventSummary || "", c = t.image || t.coverImage || t.ShowImage || "";
|
|
558
565
|
} else if (e === "series") {
|
|
559
|
-
let e = t.slug ||
|
|
560
|
-
l = this._buildEntityUrl("series", t.id || "", e), r =
|
|
566
|
+
let e = t.slug || K(t.title || "");
|
|
567
|
+
l = this._buildEntityUrl("series", t.id || "", e), r = U({
|
|
561
568
|
series: {
|
|
562
569
|
...t,
|
|
563
570
|
venue: {
|
|
@@ -569,8 +576,8 @@ var K = class t {
|
|
|
569
576
|
baseEventUrl: l
|
|
570
577
|
}), i = t.title || "", a = t.description || "", o = t.eventSummary || "", c = t.image || "";
|
|
571
578
|
} else if (e === "collection") {
|
|
572
|
-
let e = t.slug ||
|
|
573
|
-
l = this._buildEntityUrl("collection", t.id || "", e), r =
|
|
579
|
+
let e = t.slug || K(t.collectionTitle || "");
|
|
580
|
+
l = this._buildEntityUrl("collection", t.id || "", e), r = W({
|
|
574
581
|
collection: t,
|
|
575
582
|
baseEventUrl: l,
|
|
576
583
|
defaultTimeZone: this._venueTimeZone
|
|
@@ -601,4 +608,4 @@ var K = class t {
|
|
|
601
608
|
}
|
|
602
609
|
};
|
|
603
610
|
//#endregion
|
|
604
|
-
export {
|
|
611
|
+
export { q as HostSeoController, W as buildCollectionJsonLd, B as buildEventJsonLd, R as buildOffers, z as buildPerformers, P as buildPostalAddress, U as buildSeriesJsonLd, j as escapeJsonLdForScript, M as formatDateTimeWithOffset, F as getEventStatus, I as getTicketAvailability, N as parseAddressToPostal };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as e, z as t } from "./defaultLabels-BgBbv_Mu.js";
|
|
2
2
|
//#region node_modules/zod/v4/core/core.js
|
|
3
3
|
var n;
|
|
4
4
|
function r(e, t, n) {
|
|
@@ -2988,15 +2988,15 @@ var $ = Q().int().nullish().transform((e) => e ?? 0), Da = Q().int().nullish(),
|
|
|
2988
2988
|
function ka(n) {
|
|
2989
2989
|
let r = Oa.safeParse(n);
|
|
2990
2990
|
if (!r.success) return null;
|
|
2991
|
-
let i = r.data, a = i.stripe_amount ?? i.amount_total, o = t(
|
|
2991
|
+
let i = r.data, a = i.stripe_amount ?? i.amount_total, o = e(t(a));
|
|
2992
2992
|
return {
|
|
2993
|
-
subtotal: t(
|
|
2994
|
-
fees: t(
|
|
2995
|
-
cardProcessing: t(
|
|
2996
|
-
taxes: t(
|
|
2993
|
+
subtotal: e(t(i.subtotal + i.discount)),
|
|
2994
|
+
fees: e(t(i.service_fee + i.card_processing + i.venue_kickback)),
|
|
2995
|
+
cardProcessing: e(t(i.card_processing)),
|
|
2996
|
+
taxes: e(t(i.tax_amount_exclusive ?? i.tax)),
|
|
2997
2997
|
total: o,
|
|
2998
|
-
promoDiscount: t(
|
|
2999
|
-
giftCardAmount: t(
|
|
2998
|
+
promoDiscount: e(t(i.discount)),
|
|
2999
|
+
giftCardAmount: e(t(i.gift_card_amount)),
|
|
3000
3000
|
stripeAmount: o,
|
|
3001
3001
|
currency: i.currency ? String(i.currency).toUpperCase() : "USD"
|
|
3002
3002
|
};
|