@getmicdrop/venue-calendar 4.3.138 → 4.3.139
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/README.md +895 -840
- package/dist/AddOnCard-Dlt_4lut.js +475 -0
- package/dist/{Button-B_gbGd63.js → Button-Ch5dRGa2.js} +1 -1
- package/dist/{Button-B1cBhdtC.js → Button-DpeQSoQ7.js} +58 -45
- package/dist/Calendar-CNWS2xiR.js +396 -0
- package/dist/CalendarFoundryView-B5puOxH5.js +16431 -0
- package/dist/{ChartBlock-DcsCXfX8.js → ChartBlock-vihMKVdW.js} +2 -2
- package/dist/Checkout-B2FvX6Af.js +1070 -0
- package/dist/Checkout-y0x-v-XH.js +1995 -0
- package/dist/{ChevronDownOutline-kFgRY2cg.js → CloseOutline-Bh9UO94v.js} +2 -2
- package/dist/{CollectionView-C0vDg5oJ.js → CollectionView-CcLlV-1f.js} +22 -24
- package/dist/{CropImage-BWYeQXXA.js → CropImage-DqLAGy5s.js} +6 -6
- package/dist/{DatePicker-v-4ijT8N.js → DatePicker-D20Te0JY.js} +222 -215
- package/dist/{Event-vlu8IAxh.js → Event-DoIU0o6C.js} +799 -796
- package/dist/{EventCard-puoh3xag.js → EventCard-B8MYLyIW.js} +1 -1
- package/dist/EventPage-DM4tjCcL.js +1298 -0
- package/dist/{FilterChipGroup-DUGvOaRI.js → FilterChipGroup-BCjc7-pE.js} +1 -1
- package/dist/{ImageUploader-CKrf5amy.js → ImageUploader-BzxKIyLN.js} +324 -375
- package/dist/{Input-BQk4itex.js → Input-Bp5EgI1F.js} +5 -3
- package/dist/Modal-C6EXgkuF.js +159 -0
- package/dist/{ModalFooter-gFaDKsfj.js → ModalFooter-C4TD3-zP.js} +1 -1
- package/dist/{ModalTitle-CS5AGwrU.js → ModalTitle-BP4Bm3sA.js} +1 -1
- package/dist/{PasswordInput-C65GqxdF.js → PasswordInput-BlzSrkPs.js} +1 -1
- package/dist/{PhoneInput-Dj1I3bEn.js → PhoneInput-_ByjRGQ0.js} +2 -2
- package/dist/{RecommendationsRail-DC5qX1ei.js → RecommendationsRail-BDNnbL-p.js} +53 -50
- package/dist/{Search-BE64QcmK.js → Search-vhGEpog6.js} +1 -1
- package/dist/SeriesPage-YE8czX1M.js +32 -0
- package/dist/{SkeletonLoader-DfW0N9R3.js → SkeletonLoader-Beh2izdy.js} +1 -1
- package/dist/Spinner-DgubkWKo.js +88 -0
- package/dist/{Success-D3CrUeka.js → Success-CN5HB8gN.js} +164 -166
- package/dist/{TimePicker-HYzPI_Dc.js → TimePicker-BDuy9Ap8.js} +1 -1
- package/dist/{ViewTicketsEmbed-DzUCgtA3.js → ViewTicketsEmbed-DvoMIiKJ.js} +9 -10
- package/dist/{address-field-BwGHcMKY.js → address-field-DOalICpt.js} +2 -2
- package/dist/{allowlist-Bt1BHhNd.js → allowlist-DinkGF2L.js} +77 -68
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +320 -297
- package/dist/api/client.d.ts +14 -53
- package/dist/api/events.d.ts +15 -1
- package/dist/api/result.d.ts +9 -0
- package/dist/{api-CRHFSJDI.js → api-CsAx0rmV.js} +150 -145
- package/dist/{avatar-picker-field-CSF5okeM.js → avatar-picker-field-CV4vRxTB.js} +14 -14
- package/dist/{checkoutState-BDNjJRMG.js → checkoutState-DSx7g3Vy.js} +12 -21
- package/dist/{client-BIN_q-of.js → client-SaDt6559.js} +18 -12
- package/dist/{constants-DrFV2oht.js → constants-sRRJh0u-.js} +1 -1
- package/dist/{date-field-3tgOYbzF.js → date-field-DylJx0y7.js} +9 -9
- package/dist/{date-range-field-D0Aq9me9.js → date-range-field-BOV1V2ab.js} +7 -7
- package/dist/{de-CUrE_4a4.js → de-CzkX3H3B.js} +1 -0
- package/dist/{defaultLabels-CybwJCNn.js → defaultLabels-DLK6rq4q.js} +1 -0
- package/dist/{defaults-B5wyre5O.js → defaults-Cbuin1WS.js} +2 -3
- package/dist/{es-B2-z2Kft.js → es-BOLzv8eD.js} +1 -0
- package/dist/{event-CEg17hts.js → event-ClsLWtR0.js} +1 -1
- package/dist/{event-transform-DqFigNQg.js → event-transform-Cs63X0hI.js} +42 -42
- package/dist/{eventStatusStream-DK5fWCTB.js → eventStatusStream-BAh5nJP2.js} +1 -1
- package/dist/{field-rules-CKFFB16Q.js → field-rules-Yb2JY1qT.js} +1 -1
- package/dist/{file-field-2mPz4Da-.js → file-field-Dwo80kDg.js} +4 -4
- package/dist/format-CehusdDg.js +1718 -0
- package/dist/{formatters-CzKNRUwz.js → formatters-DUWbI_Eg.js} +25 -35
- package/dist/{fr-CiePVIlj.js → fr-DYTIBBXo.js} +1 -0
- package/dist/{href-DpbLXQ4c.js → href-BXhNawil.js} +1 -1
- package/dist/i18n-BNF6a-QA.js +720 -0
- package/dist/i18n-F_QOaHVh.js +26 -0
- package/dist/{id-Ttw95_7t.js → id-CIyIkGhH.js} +1 -0
- package/dist/{image-field-B8x0WQ2j.js → image-field-DeLzsJlz.js} +2 -2
- package/dist/{it-CBbXcFY1.js → it-CF4Db_nK.js} +1 -0
- package/dist/{ja-B2Tag7J3.js → ja-5-7WNHD1.js} +1 -0
- package/dist/{ko-CcTn4lAi.js → ko-huIzHR3W.js} +1 -0
- package/dist/locales/4.3.139/main/de.js +1 -0
- package/dist/locales/4.3.139/main/es.js +1 -0
- package/dist/locales/4.3.139/main/fr.js +1 -0
- package/dist/locales/4.3.139/main/id.js +1 -0
- package/dist/locales/4.3.139/main/it.js +1 -0
- package/dist/locales/4.3.139/main/ja.js +1 -0
- package/dist/locales/4.3.139/main/ko.js +1 -0
- package/dist/locales/4.3.139/main/nl.js +1 -0
- package/dist/locales/4.3.139/main/pl.js +1 -0
- package/dist/locales/4.3.139/main/pt-br.js +1 -0
- package/dist/locales/4.3.139/main/tr.js +1 -0
- package/dist/locales/4.3.139/main/zh.js +1 -0
- package/dist/look-island.svelte-D87MvHNy.js +1296 -0
- package/dist/{look-names-JI6GE-Zj.js → look-names-B9MywEzX.js} +68 -58
- package/dist/looks/4.3.139/AddOnCard-CKdkGcHH.js +1 -0
- package/dist/looks/4.3.139/Checkout-D7CaFYTE.js +1 -0
- package/dist/looks/4.3.139/Checkout-DuP46PMi.js +3 -0
- package/dist/looks/4.3.139/CollectionView-CWm57JCx.js +1 -0
- package/dist/looks/4.3.139/Event-ePupb4qY.js +8 -0
- package/dist/looks/4.3.139/EventPage-CgexXhEU.js +1 -0
- package/dist/looks/4.3.139/RecommendationsRail-Bz-Mj_r4.js +2 -0
- package/dist/looks/4.3.139/SeriesPage-DI2uFF0Y.js +1 -0
- package/dist/looks/4.3.139/Success-BkMzmgmc.js +3 -0
- package/dist/looks/4.3.139/ViewTicketsEmbed-CbEJwRry.js +1 -0
- package/dist/looks/4.3.139/_vc-foundry-calendar-stub-BVbAFEK2.js +1 -0
- package/dist/looks/4.3.139/buyerEmail-CqCYa9UL.js +1 -0
- package/dist/looks/4.3.139/constants-CU_ZgyQu.js +3 -0
- package/dist/looks/4.3.139/defaults-B46SFFK4.js +2 -0
- package/dist/looks/4.3.139/dist-BWGSqtWN.js +1 -0
- package/dist/looks/4.3.139/eventStatusStream-CW5lJwsa.js +10 -0
- package/dist/looks/4.3.139/first-core-DrYq9wBy.js +151 -0
- package/dist/looks/4.3.139/first-mount.svelte-DFSLaJWm.js +1 -0
- package/dist/looks/4.3.139/first-seo-DvHuCXT6.js +1 -0
- package/dist/looks/4.3.139/first.js +1 -0
- package/dist/looks/4.3.139/full-widget-DDBk3i4U.js +2 -0
- package/dist/looks/4.3.139/gate-password-cache-D4Zls6QM.js +1 -0
- package/dist/looks/4.3.139/i18n-DRaFNYsQ.js +1 -0
- package/dist/looks/4.3.139/listing-BSaRTkxW.js +1 -0
- package/dist/looks/4.3.139/loaders.runtime-BNG8O6-A.js +1 -0
- package/dist/looks/4.3.139/looks.js +1 -0
- package/dist/looks/4.3.139/modalManager.svelte-CqQWYz9Y.js +1 -0
- package/dist/looks/4.3.139/rolldown-runtime-4tVxZq34.js +1 -0
- package/dist/looks/4.3.139/serverTotals-Bu1fAPLB.js +1 -0
- package/dist/looks/4.3.139/showcase-state-options-CpCMAKVD.js +1 -0
- package/dist/looks/4.3.139/utils-pGRhH4A-.js +1 -0
- package/dist/{media-field-HieD0ye0.js → media-field-PW8ye6EL.js} +2 -2
- package/dist/modalManager.svelte-BHE0t9q3.js +79 -0
- package/dist/{multiselect-field-CJ4lUJyS.js → multiselect-field-CmocFs5f.js} +2 -2
- package/dist/navigation-B8rkS2On.js +348 -0
- package/dist/{nl-DeIqgjIs.js → nl-B1dv1lqk.js} +1 -0
- package/dist/{number-field-D5GkkGLB.js → number-field-CUD936Ai.js} +3 -3
- package/dist/{numeric-filter-field-CRWZFu_P.js → numeric-filter-field-BmgSYhOt.js} +3 -3
- package/dist/{password-field-DdOHXEOo.js → password-field-BfvcZUi_.js} +1 -1
- package/dist/{phone-field-BaYmp56f.js → phone-field-DO0U_YZ6.js} +17 -18
- package/dist/{pixels-BXXzmoCb.js → pixels-ipedGW6i.js} +7 -7
- package/dist/{pl-Bm2FcD5y.js → pl-DLlM_IPo.js} +1 -0
- package/dist/{pt-br-XS1Lsa6z.js → pt-br-8V3mf7pu.js} +1 -0
- package/dist/repeating-field-BwtJ6VS1.js +488 -0
- package/dist/{richtext-field-KmUytgBW.js → richtext-field-DvLCxPvq.js} +2 -2
- package/dist/{datetime-BlEsN_-8.js → scarcity-DfQvyhJP.js} +74 -85
- package/dist/{searchable-select-field-DettZRav.js → searchable-select-field-zuIqfoQM.js} +17 -17
- package/dist/{select-field-Wc4gAtou.js → select-field-DNNN-a9q.js} +6 -6
- package/dist/seo/HostSeoController.d.ts +13 -0
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.mjs +18 -11
- package/dist/{serverTotals-COsx7Mc5.js → serverTotals-BprgDwOw.js} +1 -1
- package/dist/{showcase-state-options-CHGUaZtl.js → showcase-state-options-bKRf48yz.js} +2 -2
- package/dist/{time-field-CnxZcziR.js → time-field-DmPCoppV.js} +2 -2
- package/dist/{to-event-card-props-C9v9dspT.js → to-event-card-props-KVcCJ2JF.js} +34 -34
- package/dist/{tr-zKAbMfgi.js → tr-DiUEV65j.js} +1 -0
- package/dist/{tree-picker-field-aqux58EQ.js → tree-picker-field-BJwSFAqm.js} +8 -8
- package/dist/types/index.d.ts +3 -0
- package/dist/{utils-AIszIHUb.js → utils-x8YXRKvr.js} +12 -12
- package/dist/venue-BjLCg-PW.js +38 -0
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +1655 -1539
- package/dist/venue-calendar.iife.js +1 -54
- package/dist/venue-calendar.umd.js +69 -63
- package/dist/{widget-key-context-BrWW0fyM.js → widget-key-context-dHM9FiuJ.js} +8 -37
- package/dist/{zh-DHfgJplH.js → zh-Cej2EPQt.js} +1 -0
- package/package.json +2 -2
- package/src/lib/constants/scarcity.ts +1 -2
- package/dist/AddOnCard-DEAC26HA.js +0 -348
- package/dist/BlockPlaceholder-BKfoE795.js +0 -59
- package/dist/Calendar-9xskvKUf.js +0 -395
- package/dist/CalendarFoundryView-DbxZNmY7.js +0 -16356
- package/dist/CartView-DMINN6bY.js +0 -2200
- package/dist/Checkbox-sObkYRdj.js +0 -60
- package/dist/Checkout-H9RGBU9D.js +0 -1071
- package/dist/Checkout-VnochAZE.js +0 -1967
- package/dist/CheckoutTimer-mjcYR3XU.js +0 -42
- package/dist/EventPage-DycxjX5Z.js +0 -1301
- package/dist/Modal-DOpDiAwN.js +0 -102
- package/dist/ScarcityBadge-BAaV2CIY.js +0 -141
- package/dist/SeriesPage-Cx89s2B6.js +0 -34
- package/dist/Skeleton-B6qB_udJ.js +0 -31
- package/dist/Spinner-Bj4dr9kO.js +0 -19
- package/dist/Textarea-BDcuBI13.js +0 -72
- package/dist/__SKIP_NAVIGATION__-Znm_vYcG.js +0 -5
- package/dist/__SKIP_PATHS__-Bzzrca_a.js +0 -5
- package/dist/calendar-Cdu8fCIt.js +0 -111
- package/dist/cta-qbcIt5Gh.js +0 -116
- package/dist/format-CypC4vWs.js +0 -1587
- package/dist/heic-to-BoLfsr3l.js +0 -70
- package/dist/i18n-B_TWnExv.js +0 -495
- package/dist/i18n-CSaUFnlD.js +0 -26
- package/dist/instant-BkZCSGDm.js +0 -162
- package/dist/labels-D8LN8lY7.js +0 -227
- package/dist/locales/4.3.138/main/de.js +0 -1
- package/dist/locales/4.3.138/main/es.js +0 -1
- package/dist/locales/4.3.138/main/fr.js +0 -1
- package/dist/locales/4.3.138/main/id.js +0 -1
- package/dist/locales/4.3.138/main/it.js +0 -1
- package/dist/locales/4.3.138/main/ja.js +0 -1
- package/dist/locales/4.3.138/main/ko.js +0 -1
- package/dist/locales/4.3.138/main/nl.js +0 -1
- package/dist/locales/4.3.138/main/pl.js +0 -1
- package/dist/locales/4.3.138/main/pt-br.js +0 -1
- package/dist/locales/4.3.138/main/tr.js +0 -1
- package/dist/locales/4.3.138/main/zh.js +0 -1
- package/dist/look-island.svelte-B7UH_QVv.js +0 -1270
- package/dist/looks/4.3.138/looks.js +0 -248
- package/dist/modalManager.svelte-BvyrTI6p.js +0 -51
- package/dist/navigation-DpqP-ahJ.js +0 -241
- package/dist/repeating-field-B4OhsaGB.js +0 -488
- package/dist/venue-DLkL7xdj.js +0 -12
- /package/dist/checkout-libs/{4.3.138 → 4.3.139}/phone.js +0 -0
- /package/dist/checkout-libs/{4.3.138 → 4.3.139}/qrcode.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/de.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/es.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/id.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/it.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/zh.js +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/micdrop-wordmark-BYMG6vLR.svg +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/microphone-Ccv4r-kd.webp +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/superuser-CZF6a5gO.webp +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/treasury-DUE7lZzT.webp +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/user-image-yuS4errP.svg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { r, t as i } from "./defaultLabels-
|
|
1
|
+
import { R as e } from "./format-CehusdDg.js";
|
|
2
|
+
import { c as t, i as n } from "./formatters-DUWbI_Eg.js";
|
|
3
|
+
import { r, t as i } from "./defaultLabels-DLK6rq4q.js";
|
|
4
4
|
// node_modules/@getmicdrop/svelte-components/dist/routing/slug.js
|
|
5
5
|
var a = 70;
|
|
6
6
|
function o(e) {
|
|
@@ -18,159 +18,148 @@ function c(e) {
|
|
|
18
18
|
let t = e.id || e.eventID || 0, n = e.slug || o(e.name || "");
|
|
19
19
|
return `#${t}${n ? "-" + n : ""}`;
|
|
20
20
|
}
|
|
21
|
-
// src/lib/constants/scarcity.ts
|
|
22
|
-
var l = {
|
|
23
|
-
URGENT_PCT: 10,
|
|
24
|
-
LOW_PCT: 20,
|
|
25
|
-
MAX_EXACT_COUNT: 20,
|
|
26
|
-
ABSOLUTE_FLOOR: 5,
|
|
27
|
-
LOW_ABSOLUTE_FLOOR: 6,
|
|
28
|
-
ABSOLUTE_CAP: 30
|
|
29
|
-
}, u = { CLAIM_ON_UNTOUCHED_POOL: !0 };
|
|
30
|
-
function d(e, t, n) {
|
|
31
|
-
let { ABSOLUTE_CAP: r } = l, i = r / t * 100, a = n / t * 100;
|
|
32
|
-
return Math.max(Math.min(e, i), a);
|
|
33
|
-
}
|
|
34
|
-
function f(e, t, n = u) {
|
|
35
|
-
if (t <= 0) return "plenty";
|
|
36
|
-
if (e <= 0) return "sold-out";
|
|
37
|
-
if (!n.CLAIM_ON_UNTOUCHED_POOL && e >= t) return "plenty";
|
|
38
|
-
let r = e / t * 100, { URGENT_PCT: i, LOW_PCT: a, MAX_EXACT_COUNT: o, ABSOLUTE_FLOOR: s, LOW_ABSOLUTE_FLOOR: c } = l, f = d(i, t, s), p = d(a, t, c);
|
|
39
|
-
return r <= f && e <= o ? "urgent" : r <= p ? "low" : "plenty";
|
|
40
|
-
}
|
|
41
21
|
// src/lib/core/datetime.js
|
|
42
|
-
var
|
|
43
|
-
function
|
|
44
|
-
let n = `${e}|${JSON.stringify(t)}`, r =
|
|
45
|
-
return r ? (
|
|
22
|
+
var l = /* @__PURE__ */ new Map(), u = 64;
|
|
23
|
+
function d(e, t) {
|
|
24
|
+
let n = `${e}|${JSON.stringify(t)}`, r = l.get(n);
|
|
25
|
+
return r ? (l.delete(n), l.set(n, r), r) : (r = new Intl.DateTimeFormat(e, t), l.set(n, r), l.size > u && l.delete(l.keys().next().value), r);
|
|
46
26
|
}
|
|
47
|
-
function
|
|
27
|
+
function f(e) {
|
|
48
28
|
if (e == null) return null;
|
|
49
29
|
let t = Number(e);
|
|
50
30
|
return Number.isFinite(t) ? t : null;
|
|
51
31
|
}
|
|
52
|
-
function
|
|
53
|
-
let
|
|
54
|
-
return
|
|
32
|
+
function p(e) {
|
|
33
|
+
let n = f(e?.price);
|
|
34
|
+
return n === null ? null : n === 0 ? 0 : t(n + (f(e?.fee) ?? 0));
|
|
55
35
|
}
|
|
56
|
-
function
|
|
57
|
-
return
|
|
58
|
-
}
|
|
59
|
-
function y(e) {
|
|
60
|
-
return t(e, {
|
|
36
|
+
function m(e) {
|
|
37
|
+
return n(e, {
|
|
61
38
|
minimumFractionDigits: Number.isInteger(e) ? 0 : 2,
|
|
62
39
|
maximumFractionDigits: 2
|
|
63
40
|
});
|
|
64
41
|
}
|
|
65
|
-
function
|
|
66
|
-
return e == null ? "—" : e <= 0 ?
|
|
42
|
+
function h(e, t = i) {
|
|
43
|
+
return e == null ? "—" : e <= 0 ? t.free || "Free" : n(e);
|
|
67
44
|
}
|
|
68
|
-
function
|
|
45
|
+
function g(t, n = e) {
|
|
69
46
|
return t && r(t) ? t : n;
|
|
70
47
|
}
|
|
71
|
-
function
|
|
48
|
+
function _(e) {
|
|
72
49
|
if (e == null || e === "" || typeof e != "string" && typeof e != "number" && !(e instanceof Date)) return null;
|
|
73
50
|
let t = new Date(e);
|
|
74
51
|
return isNaN(t.getTime()) ? null : t;
|
|
75
52
|
}
|
|
76
|
-
function
|
|
77
|
-
let i =
|
|
53
|
+
function v(e, t, n, r) {
|
|
54
|
+
let i = _(e);
|
|
78
55
|
if (!i) return "";
|
|
79
|
-
let a =
|
|
80
|
-
return
|
|
56
|
+
let a = g(t);
|
|
57
|
+
return d(r || "en-US", {
|
|
81
58
|
...n,
|
|
82
59
|
timeZone: a
|
|
83
60
|
}).format(i);
|
|
84
61
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
62
|
+
function y(e, t) {
|
|
63
|
+
return v(e, t, {
|
|
87
64
|
year: "numeric",
|
|
88
65
|
month: "2-digit",
|
|
89
66
|
day: "2-digit"
|
|
90
67
|
}, "en-CA");
|
|
91
68
|
}
|
|
92
|
-
function
|
|
93
|
-
return
|
|
69
|
+
function b(e, t, n) {
|
|
70
|
+
return v(e, t, {
|
|
94
71
|
hour: "numeric",
|
|
95
72
|
minute: "2-digit",
|
|
96
73
|
hour12: !0
|
|
97
74
|
}, n);
|
|
98
75
|
}
|
|
99
|
-
function
|
|
100
|
-
let i =
|
|
76
|
+
function x(e, t, n, r) {
|
|
77
|
+
let i = b(e, n, r);
|
|
101
78
|
if (!t) return i;
|
|
102
|
-
let a =
|
|
79
|
+
let a = b(t, n, r);
|
|
103
80
|
return i && a ? `${i} - ${a}` : i;
|
|
104
81
|
}
|
|
105
|
-
function
|
|
106
|
-
if (!
|
|
82
|
+
function S(e, t, n) {
|
|
83
|
+
if (!_(e)) return {
|
|
107
84
|
day: "",
|
|
108
85
|
month: "",
|
|
109
86
|
date: 0,
|
|
110
87
|
year: 0
|
|
111
88
|
};
|
|
112
|
-
let r =
|
|
89
|
+
let r = g(t);
|
|
113
90
|
return {
|
|
114
|
-
day:
|
|
115
|
-
month:
|
|
116
|
-
date: parseInt(
|
|
117
|
-
year: parseInt(
|
|
91
|
+
day: v(e, r, { weekday: "short" }, n),
|
|
92
|
+
month: v(e, r, { month: "short" }, n),
|
|
93
|
+
date: parseInt(v(e, r, { day: "numeric" }, "en-US"), 10),
|
|
94
|
+
year: parseInt(v(e, r, { year: "numeric" }, "en-US"), 10)
|
|
118
95
|
};
|
|
119
96
|
}
|
|
120
|
-
function
|
|
121
|
-
return
|
|
97
|
+
function C(e, t, n) {
|
|
98
|
+
return v(e, t, {
|
|
122
99
|
weekday: "short",
|
|
123
100
|
month: "short",
|
|
124
101
|
day: "numeric"
|
|
125
102
|
}, n);
|
|
126
103
|
}
|
|
127
|
-
function
|
|
128
|
-
return
|
|
129
|
-
weekday: "long",
|
|
130
|
-
year: "numeric",
|
|
131
|
-
month: "long",
|
|
132
|
-
day: "numeric"
|
|
133
|
-
}, n);
|
|
134
|
-
}
|
|
135
|
-
function A(e, t, n) {
|
|
136
|
-
return e == null || e === "" ? "" : typeof e == "string" && /^\d{1,2}:\d{2}\s*(AM|PM)$/i.test(e) ? e : T(e, t, n) || (typeof e == "string" ? e : "");
|
|
104
|
+
function w(e, t, n) {
|
|
105
|
+
return e == null || e === "" ? "" : typeof e == "string" && /^\d{1,2}:\d{2}\s*(AM|PM)$/i.test(e) ? e : b(e, t, n) || (typeof e == "string" ? e : "");
|
|
137
106
|
}
|
|
138
|
-
function
|
|
139
|
-
let i =
|
|
107
|
+
function T(e, t, n, r) {
|
|
108
|
+
let i = _(e);
|
|
140
109
|
if (!i) return "";
|
|
141
|
-
let a =
|
|
142
|
-
if (!a || a.getTime() <= i.getTime()) return
|
|
143
|
-
if (
|
|
110
|
+
let a = _(t);
|
|
111
|
+
if (!a || a.getTime() <= i.getTime()) return b(e, n, r);
|
|
112
|
+
if (y(e, n) !== y(t, n)) return `${b(e, n, r)} – ${b(t, n, r)}`;
|
|
144
113
|
let o = {
|
|
145
114
|
hour: "numeric",
|
|
146
115
|
minute: "2-digit",
|
|
147
116
|
hour12: !0,
|
|
148
|
-
timeZone:
|
|
149
|
-
}, s =
|
|
117
|
+
timeZone: g(n)
|
|
118
|
+
}, s = d(r || "en-US", o);
|
|
150
119
|
if (s.format(i) !== s.format(a)) return s.formatRange(i, a);
|
|
151
|
-
let c =
|
|
120
|
+
let c = d(r || "en-US", {
|
|
152
121
|
...o,
|
|
153
122
|
timeZoneName: "short"
|
|
154
123
|
});
|
|
155
124
|
return `${c.format(i)} – ${c.format(a)}`;
|
|
156
125
|
}
|
|
157
|
-
function
|
|
158
|
-
let r =
|
|
159
|
-
let t = typeof e == "string" ? e : e?.startDateTime, n = typeof e == "string" ? void 0 : e?.timezone, i =
|
|
126
|
+
function E(e, t, n) {
|
|
127
|
+
let r = g(t), i = (e || []).map((e) => {
|
|
128
|
+
let t = typeof e == "string" ? e : e?.startDateTime, n = typeof e == "string" ? void 0 : e?.timezone, i = _(t);
|
|
160
129
|
return i && {
|
|
161
130
|
date: i,
|
|
162
|
-
tz:
|
|
131
|
+
tz: g(n, r)
|
|
163
132
|
};
|
|
164
133
|
}).filter(Boolean).sort((e, t) => e.date.getTime() - t.date.getTime());
|
|
165
134
|
if (i.length === 0) return "";
|
|
166
|
-
let a = i[0], o = i[i.length - 1], s = (e) =>
|
|
135
|
+
let a = i[0], o = i[i.length - 1], s = (e) => d(n || "en-US", {
|
|
167
136
|
month: "short",
|
|
168
137
|
day: "numeric",
|
|
169
138
|
timeZone: e
|
|
170
|
-
}), c = (e) =>
|
|
139
|
+
}), c = (e) => d(n || "en-US", {
|
|
171
140
|
year: "numeric",
|
|
172
141
|
timeZone: e
|
|
173
142
|
}), l = s(a.tz).format(a.date), u = s(o.tz).format(o.date);
|
|
174
143
|
return a.tz !== o.tz || c(a.tz).format(a.date) !== c(o.tz).format(o.date) ? l === u ? l : `${l} – ${u}` : s(a.tz).formatRange(a.date, o.date);
|
|
175
144
|
}
|
|
176
|
-
|
|
145
|
+
// src/lib/constants/scarcity.ts
|
|
146
|
+
var D = {
|
|
147
|
+
URGENT_PCT: 10,
|
|
148
|
+
LOW_PCT: 20,
|
|
149
|
+
MAX_EXACT_COUNT: 20,
|
|
150
|
+
ABSOLUTE_FLOOR: 5,
|
|
151
|
+
LOW_ABSOLUTE_FLOOR: 6,
|
|
152
|
+
ABSOLUTE_CAP: 30
|
|
153
|
+
}, O = { CLAIM_ON_UNTOUCHED_POOL: !0 };
|
|
154
|
+
function k(e, t, n) {
|
|
155
|
+
let { ABSOLUTE_CAP: r } = D, i = r / t * 100, a = n / t * 100;
|
|
156
|
+
return Math.max(Math.min(e, i), a);
|
|
157
|
+
}
|
|
158
|
+
function A(e, t, n = O) {
|
|
159
|
+
if (t <= 0) return "plenty";
|
|
160
|
+
if (e <= 0) return "sold-out";
|
|
161
|
+
if (!n.CLAIM_ON_UNTOUCHED_POOL && e >= t) return "plenty";
|
|
162
|
+
let r = e / t * 100, { URGENT_PCT: i, LOW_PCT: a, MAX_EXACT_COUNT: o, ABSOLUTE_FLOOR: s, LOW_ABSOLUTE_FLOOR: c } = D, l = k(i, t, s), u = k(a, t, c);
|
|
163
|
+
return r <= l && e <= o ? "urgent" : r <= u ? "low" : "plenty";
|
|
164
|
+
}
|
|
165
|
+
export { s as _, E as a, T as c, S as d, f, c as g, p as h, y as i, b as l, h as m, A as n, w as o, m as p, C as r, v as s, D as t, x as u, o as v };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as e } from "./allowlist-DinkGF2L.js";
|
|
2
|
+
import { t } from "./Search-vhGEpog6.js";
|
|
3
3
|
import { i as n } from "./typography-CKwYSv07.js";
|
|
4
|
-
import { d as r } from "./field-rules-
|
|
4
|
+
import { d as r } from "./field-rules-Yb2JY1qT.js";
|
|
5
5
|
import { t as i } from "./Badge-CmYqIClC.js";
|
|
6
6
|
import { t as a } from "./foundryRuntime-DKyfdkUY.js";
|
|
7
|
-
import {
|
|
7
|
+
import { b as o, r as s } from "./CalendarFoundryView-B5puOxH5.js";
|
|
8
8
|
import "svelte/internal/disclose-version";
|
|
9
9
|
import * as c from "svelte/internal/client";
|
|
10
10
|
// node_modules/@getmicdrop/svelte-components/dist/foundry/blocks/fields/searchable-select-field.svelte
|
|
@@ -20,13 +20,13 @@ function m(m, h) {
|
|
|
20
20
|
c.attribute_effect(w, (e) => ({
|
|
21
21
|
class: "flex flex-col gap-3",
|
|
22
22
|
...e
|
|
23
|
-
}), [() =>
|
|
23
|
+
}), [() => s(h.field, h.wiring)]);
|
|
24
24
|
var T = c.child(w);
|
|
25
25
|
{
|
|
26
|
-
let
|
|
27
|
-
|
|
26
|
+
let e = c.derived(() => h.controlId ?? h.field.key), n = c.derived(() => h.testId ?? h.controlId ?? h.field.key), r = c.derived(() => _.common_search());
|
|
27
|
+
t(T, {
|
|
28
28
|
get id() {
|
|
29
|
-
return `${c.get(
|
|
29
|
+
return `${c.get(e) ?? ""}-search`;
|
|
30
30
|
},
|
|
31
31
|
get "data-testid"() {
|
|
32
32
|
return `${c.get(n) ?? ""}-search`;
|
|
@@ -44,19 +44,19 @@ function m(m, h) {
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
var E = c.sibling(T, 2), D = c.child(E);
|
|
47
|
-
c.each(D, 19, () => c.get(C), (e, t) => `${t}:${e.value}`, (
|
|
48
|
-
var a = d(),
|
|
49
|
-
t
|
|
47
|
+
c.each(D, 19, () => c.get(C), (e, t) => `${t}:${e.value}`, (t, r) => {
|
|
48
|
+
var a = d(), s = c.child(a), f = (t) => {
|
|
49
|
+
e(t, {
|
|
50
50
|
get src() {
|
|
51
51
|
return c.get(r).image;
|
|
52
52
|
},
|
|
53
53
|
alt: "",
|
|
54
54
|
size: "sm"
|
|
55
55
|
});
|
|
56
|
-
}, p = (
|
|
56
|
+
}, p = (t) => {
|
|
57
57
|
{
|
|
58
58
|
let n = c.derived(() => c.get(r).label.slice(0, 2));
|
|
59
|
-
t
|
|
59
|
+
e(t, {
|
|
60
60
|
get initials() {
|
|
61
61
|
return c.get(n);
|
|
62
62
|
},
|
|
@@ -64,13 +64,13 @@ function m(m, h) {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
c.if(
|
|
67
|
+
c.if(s, (e) => {
|
|
68
68
|
c.get(r).image ? e(f) : e(p, -1);
|
|
69
69
|
});
|
|
70
|
-
var m = c.sibling(
|
|
70
|
+
var m = c.sibling(s, 2), g = c.child(m);
|
|
71
71
|
{
|
|
72
72
|
let e = c.derived(() => c.get(x) === c.get(r).value), t = c.derived(() => c.get(S) || c.get(r).disabled === !0);
|
|
73
|
-
|
|
73
|
+
o(g, {
|
|
74
74
|
get name() {
|
|
75
75
|
return c.get(y);
|
|
76
76
|
},
|
|
@@ -123,7 +123,7 @@ function m(m, h) {
|
|
|
123
123
|
};
|
|
124
124
|
c.if(_, (e) => {
|
|
125
125
|
c.get(r).badge && e(v);
|
|
126
|
-
}), c.reset(a), c.append(
|
|
126
|
+
}), c.reset(a), c.append(t, a);
|
|
127
127
|
});
|
|
128
128
|
var O = c.sibling(D, 2), k = (e) => {
|
|
129
129
|
var t = f(), r = c.only_child(t, !0);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as e, o as t } from "./field-rules-
|
|
1
|
+
import { d as e, o as t } from "./field-rules-Yb2JY1qT.js";
|
|
2
2
|
import { t as n } from "./foundryRuntime-DKyfdkUY.js";
|
|
3
|
-
import {
|
|
3
|
+
import { n as r, x as i } from "./CalendarFoundryView-B5puOxH5.js";
|
|
4
4
|
import "svelte/internal/disclose-version";
|
|
5
5
|
import * as a from "svelte/internal/client";
|
|
6
6
|
// node_modules/@getmicdrop/svelte-components/dist/foundry/blocks/fields/select-field.svelte
|
|
@@ -10,12 +10,12 @@ function s(s, c) {
|
|
|
10
10
|
let l = n().i18n;
|
|
11
11
|
var u = o(), d = a.first_child(u);
|
|
12
12
|
{
|
|
13
|
-
let n = a.derived(() => c.controlId ?? c.field.key),
|
|
13
|
+
let n = a.derived(() => c.controlId ?? c.field.key), r = a.derived(() => c.testId ?? c.controlId ?? c.field.key), o = a.derived(() => String(c.values[c.field.key] ?? "")), s = a.derived(() => e(c.field).map((e) => ({
|
|
14
14
|
value: e.value,
|
|
15
15
|
name: e.label,
|
|
16
16
|
lang: e.lang
|
|
17
17
|
}))), u = a.derived(() => c.disabled === !0 || t(c.field, c.values)), f = a.derived(() => c.field.select?.placeholder ?? ""), p = a.derived(() => c.field.select?.clearable === !0), m = a.derived(() => ({ clearAll: l.comp_multiselect_clear_all() }));
|
|
18
|
-
|
|
18
|
+
i(d, {
|
|
19
19
|
get id() {
|
|
20
20
|
return a.get(n);
|
|
21
21
|
},
|
|
@@ -23,7 +23,7 @@ function s(s, c) {
|
|
|
23
23
|
return c.wiring;
|
|
24
24
|
},
|
|
25
25
|
get "data-testid"() {
|
|
26
|
-
return a.get(
|
|
26
|
+
return a.get(r);
|
|
27
27
|
},
|
|
28
28
|
get value() {
|
|
29
29
|
return a.get(o);
|
|
@@ -52,7 +52,7 @@ function s(s, c) {
|
|
|
52
52
|
var f = a.sibling(d, 2);
|
|
53
53
|
{
|
|
54
54
|
let e = a.derived(() => c.disabled === !0 || t(c.field, c.values));
|
|
55
|
-
|
|
55
|
+
r(f, {
|
|
56
56
|
get field() {
|
|
57
57
|
return c.field;
|
|
58
58
|
},
|
|
@@ -38,7 +38,12 @@ interface ShowVenue {
|
|
|
38
38
|
}
|
|
39
39
|
interface VenueData {
|
|
40
40
|
name: string;
|
|
41
|
+
/** Street line. */
|
|
41
42
|
address?: string;
|
|
43
|
+
city?: string;
|
|
44
|
+
state?: string;
|
|
45
|
+
postalCode?: string;
|
|
46
|
+
country?: string;
|
|
42
47
|
googleLocationNameCache?: string;
|
|
43
48
|
timeZone?: string;
|
|
44
49
|
timezone?: string;
|
|
@@ -58,6 +63,8 @@ export declare class HostSeoController {
|
|
|
58
63
|
private _holders;
|
|
59
64
|
private _venueName;
|
|
60
65
|
private _venueAddress;
|
|
66
|
+
/** The venue's street, city, state and postal code, as last handed over. */
|
|
67
|
+
private _venuePlace;
|
|
61
68
|
private _venueTimeZone;
|
|
62
69
|
private _baseUrl;
|
|
63
70
|
/**
|
|
@@ -143,6 +150,12 @@ export declare class HostSeoController {
|
|
|
143
150
|
* one, the controller-wide venue otherwise.
|
|
144
151
|
*/
|
|
145
152
|
private _venueFor;
|
|
153
|
+
/**
|
|
154
|
+
* Adopts the venue a caller hands over. A blank name, address or zone keeps
|
|
155
|
+
* the one held; the street-to-postal-code parts are replaced together, so one
|
|
156
|
+
* venue's city never sits under another venue's street.
|
|
157
|
+
*/
|
|
158
|
+
private _takeVenue;
|
|
146
159
|
/**
|
|
147
160
|
* The URL for the entity the visitor has open: the canonical Micdrop show
|
|
148
161
|
* page when one exists, so `og:url` and `<link rel="canonical">` name a page
|
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))}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;_publicSiteOrigin;_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._publicSiteOrigin=n.publicSiteOrigin||``,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))}_setEntityCanonical(){this._originals?.canonicalHref||this._setCanonical(this._baseUrl)}_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()}_showPageUrl(e,t){let n=((typeof this._publicSiteOrigin==`function`?this._publicSiteOrigin():this._publicSiteOrigin)||``).replace(/\/+$/,``);return n?t?`${n}/e/${e}-${t}`:`${n}/e/${e}`:this._entityDeepLink(e,t)}_entityDeepLink(e,t){return`${this._baseUrl}#${e}${t?`-${t}`:``}`}_buildItemList(e){return{"@context":`https://schema.org`,"@type":`ItemList`,itemListElement:e.map((e,t)=>{let n=e.slug||K(e.name||``),r=this._showPageUrl(e.id,n),i=B({event:{name:e.name,startDateTime:e.startDateTime||``,endDateTime:e.endDateTime,status:e.status,description:e.description,eventSummary:e.eventSummary,image:e.image,availableTickets:e.availableTickets},...this._venueFor(e,e.timeZone),eventUrl:r});if(!i)return{"@type":`ListItem`,position:t+1,url:r};let{"@context":a,...o}=i;return{"@type":`ListItem`,position:t+1,url:r,item:o}})}}_venueFor(e,t){let n=e.showVenue?.name?e.showVenue:void 0;return{venue:n?{name:n.name,googleLocationNameCache:n.address||void 0}:{name:this._venueName,googleLocationNameCache:this._venueAddress},venueTimeZone:t||n?.timeZone||this._venueTimeZone}}_buildEntityUrl(e,t,n){return e===`event`?this._showPageUrl(t,n):this._entityDeepLink(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=``,u=this._venueName;if(e===`event`){let e=t.slug||K(t.name||``);l=this._buildEntityUrl(`event`,t.id||t.eventID||``,e);let n=this._venueFor(t);r=B({event:t,...n,eventUrl:l}),u=n.venue.name,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),this._setEntityCanonical(),i&&this._setMeta(`og:title`,i);let d=s(a,160)||s(o,160);d?this._setMeta(`og:description`,d):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`),d?this._setMeta(`description`,d):this._restoreMetaName(`description`,this._originals?.metaDescription??null),i&&(document.title=`${i} | ${u}`),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(){this._holders>1?--this._holders: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;
|
|
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;_venuePlace={};_venueTimeZone;_baseUrl;_publicSiteOrigin;_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._publicSiteOrigin=n.publicSiteOrigin||``,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))}_setEntityCanonical(){this._originals?.canonicalHref||this._setCanonical(this._baseUrl)}_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()}_showPageUrl(e,t){let n=((typeof this._publicSiteOrigin==`function`?this._publicSiteOrigin():this._publicSiteOrigin)||``).replace(/\/+$/,``);return n?t?`${n}/e/${e}-${t}`:`${n}/e/${e}`:this._entityDeepLink(e,t)}_entityDeepLink(e,t){return`${this._baseUrl}#${e}${t?`-${t}`:``}`}_buildItemList(e){return{"@context":`https://schema.org`,"@type":`ItemList`,itemListElement:e.map((e,t)=>{let n=e.slug||K(e.name||``),r=this._showPageUrl(e.id,n),i=B({event:{name:e.name,startDateTime:e.startDateTime||``,endDateTime:e.endDateTime,status:e.status,description:e.description,eventSummary:e.eventSummary,image:e.image,availableTickets:e.availableTickets},...this._venueFor(e,e.timeZone),eventUrl:r});if(!i)return{"@type":`ListItem`,position:t+1,url:r};let{"@context":a,...o}=i;return{"@type":`ListItem`,position:t+1,url:r,item:o}})}}_venueFor(e,t){let n=e.showVenue?.name?e.showVenue:void 0;return{venue:n?{name:n.name,googleLocationNameCache:n.address||void 0}:{name:this._venueName,...this._venuePlace,googleLocationNameCache:this._venueAddress},venueTimeZone:t||n?.timeZone||this._venueTimeZone}}_takeVenue(e){this._venueName=e.name||this._venueName,this._venueAddress=e.address||e.googleLocationNameCache||this._venueAddress;let{address:t,city:n,state:r,postalCode:i,country:a}=e;(t||n||r||i||e.googleLocationNameCache)&&(this._venuePlace={address:t,city:n,state:r,postalCode:i,country:a});let o=e.timeZone||e.timezone;o&&(this._venueTimeZone=o)}_buildEntityUrl(e,t,n){return e===`event`?this._showPageUrl(t,n):this._entityDeepLink(t,n)}onEventsLoaded(e,t){if(typeof document>`u`||this._state===`destroyed`)return;t&&this._takeVenue(t),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;this._saveOriginals(),n&&this._takeVenue(n);let r=null,i=``,a=``,o=``,c=``,l=``,u=this._venueName;if(e===`event`){let e=t.slug||K(t.name||``);l=this._buildEntityUrl(`event`,t.id||t.eventID||``,e);let n=this._venueFor(t);r=B({event:t,...n,eventUrl:l}),u=n.venue.name,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,...this._venuePlace,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),this._setEntityCanonical(),i&&this._setMeta(`og:title`,i);let d=s(a,160)||s(o,160);d?this._setMeta(`og:description`,d):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`),d?this._setMeta(`description`,d):this._restoreMetaName(`description`,this._originals?.metaDescription??null),i&&(document.title=`${i} | ${u}`),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(){this._holders>1?--this._holders: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
|
@@ -436,6 +436,7 @@ var q = class t {
|
|
|
436
436
|
_holders = 1;
|
|
437
437
|
_venueName;
|
|
438
438
|
_venueAddress;
|
|
439
|
+
_venuePlace = {};
|
|
439
440
|
_venueTimeZone;
|
|
440
441
|
_baseUrl;
|
|
441
442
|
_publicSiteOrigin;
|
|
@@ -553,32 +554,37 @@ var q = class t {
|
|
|
553
554
|
googleLocationNameCache: n.address || void 0
|
|
554
555
|
} : {
|
|
555
556
|
name: this._venueName,
|
|
557
|
+
...this._venuePlace,
|
|
556
558
|
googleLocationNameCache: this._venueAddress
|
|
557
559
|
},
|
|
558
560
|
venueTimeZone: t || n?.timeZone || this._venueTimeZone
|
|
559
561
|
};
|
|
560
562
|
}
|
|
563
|
+
_takeVenue(e) {
|
|
564
|
+
this._venueName = e.name || this._venueName, this._venueAddress = e.address || e.googleLocationNameCache || this._venueAddress;
|
|
565
|
+
let { address: t, city: n, state: r, postalCode: i, country: a } = e;
|
|
566
|
+
(t || n || r || i || e.googleLocationNameCache) && (this._venuePlace = {
|
|
567
|
+
address: t,
|
|
568
|
+
city: n,
|
|
569
|
+
state: r,
|
|
570
|
+
postalCode: i,
|
|
571
|
+
country: a
|
|
572
|
+
});
|
|
573
|
+
let o = e.timeZone || e.timezone;
|
|
574
|
+
o && (this._venueTimeZone = o);
|
|
575
|
+
}
|
|
561
576
|
_buildEntityUrl(e, t, n) {
|
|
562
577
|
return e === "event" ? this._showPageUrl(t, n) : this._entityDeepLink(t, n);
|
|
563
578
|
}
|
|
564
579
|
onEventsLoaded(e, t) {
|
|
565
580
|
if (typeof document > "u" || this._state === "destroyed") return;
|
|
566
|
-
|
|
567
|
-
this._venueName = t.name || this._venueName, this._venueAddress = t.address || t.googleLocationNameCache || this._venueAddress;
|
|
568
|
-
let e = t.timeZone || t.timezone;
|
|
569
|
-
e && (this._venueTimeZone = e);
|
|
570
|
-
}
|
|
571
|
-
this._events = e;
|
|
581
|
+
t && this._takeVenue(t), this._events = e;
|
|
572
582
|
let n = this._buildItemList(e);
|
|
573
583
|
this._injectJsonLd(n), this._state = "listing";
|
|
574
584
|
}
|
|
575
585
|
onEntitySelected(e, t, n) {
|
|
576
586
|
if (typeof document > "u" || this._state === "destroyed") return;
|
|
577
|
-
|
|
578
|
-
this._venueName = n.name || this._venueName, this._venueAddress = n.address || n.googleLocationNameCache || this._venueAddress;
|
|
579
|
-
let e = n.timeZone || n.timezone;
|
|
580
|
-
e && (this._venueTimeZone = e);
|
|
581
|
-
}
|
|
587
|
+
this._saveOriginals(), n && this._takeVenue(n);
|
|
582
588
|
let r = null, i = "", a = "", o = "", c = "", l = "", u = this._venueName;
|
|
583
589
|
if (e === "event") {
|
|
584
590
|
let e = t.slug || K(t.name || "");
|
|
@@ -596,6 +602,7 @@ var q = class t {
|
|
|
596
602
|
...t,
|
|
597
603
|
venue: {
|
|
598
604
|
name: this._venueName,
|
|
605
|
+
...this._venuePlace,
|
|
599
606
|
googleLocationNameCache: this._venueAddress
|
|
600
607
|
},
|
|
601
608
|
timeZone: this._venueTimeZone
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as t } from "./defaultLabels-
|
|
1
|
+
import { R as e } from "./format-CehusdDg.js";
|
|
2
|
+
import { n as t } from "./defaultLabels-DLK6rq4q.js";
|
|
3
3
|
import * as n from "svelte/internal/client";
|
|
4
4
|
// src/lib/public-calendar-flow/mock-data.ts
|
|
5
5
|
function r(e, t, n = 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as e, j as t } from "./field-rules-
|
|
2
|
-
import { t as n } from "./TimePicker-
|
|
1
|
+
import { E as e, j as t } from "./field-rules-Yb2JY1qT.js";
|
|
2
|
+
import { t as n } from "./TimePicker-BDuy9Ap8.js";
|
|
3
3
|
import "svelte/internal/disclose-version";
|
|
4
4
|
import * as r from "svelte/internal/client";
|
|
5
5
|
// node_modules/@getmicdrop/svelte-components/dist/foundry/blocks/fields/time-field.svelte
|