@getmicdrop/venue-calendar 4.3.119 → 4.3.121
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 +818 -818
- package/dist/{AddOnCard-BGFpF6uw.js → AddOnCard-jj59e855.js} +5 -5
- package/dist/{ArrowLeftIcon-pPaJkbnp.js → ArrowLeftIcon-t-CY0sbi.js} +1 -1
- package/dist/{BlockPlaceholder-BgLtwJnm.js → BlockPlaceholder-BmEZ68_q.js} +1 -1
- package/dist/Calendar-hxcQBkTF.js +463 -0
- package/dist/{CalendarFoundryView-CZ36wO24.js → CalendarFoundryView-CSAKDe-F.js} +19 -19
- package/dist/{CalendarIcon-C_6MSRyE.js → CalendarIcon-B5JWs0gm.js} +1 -1
- package/dist/{CartView-9YSoRvTw.js → CartView-CF2y1JDa.js} +719 -716
- package/dist/{CheckIcon-sr8D0z-b.js → CheckIcon-BSwoGox7.js} +1 -1
- package/dist/{Checkout-BLkYIKoR.js → Checkout-2h2K3-bE.js} +378 -378
- package/dist/{Checkout-BS3r4Qii.js → Checkout-BFu5dTw_.js} +328 -328
- package/dist/{CheckoutTimer-DY1NKJXP.js → CheckoutTimer-Bpt5gPyA.js} +2 -2
- package/dist/{ChevronDownIcon-Co6rRQp-.js → ChevronDownIcon-CVZ0usBx.js} +1 -1
- package/dist/{CloseIcon-DpRE5O8y.js → CloseIcon-DUnvWXUY.js} +1 -1
- package/dist/CollectionView-XdNMvMtn.js +141 -0
- package/dist/{Event-DUq4tYBE.js → Event-B_9T21du.js} +684 -680
- package/dist/EventPage-BMnKpciU.js +1201 -0
- package/dist/{Input-CsHb9Z8e.js → Input-BXZmvQ0p.js} +1 -1
- package/dist/{LocationIcon-Dxk7snUC.js → LocationIcon-E-7CQh4E.js} +1 -1
- package/dist/{PasswordInput-BlL0w_yr.js → PasswordInput-DzXNIwRc.js} +1 -1
- package/dist/{RecommendationsRail-Dq9t0T02.js → RecommendationsRail-DrzM8h2r.js} +124 -124
- package/dist/{ScarcityBadge-Bj_YMxz4.js → ScarcityBadge-DjzrzvId.js} +4 -4
- package/dist/{SeriesPage-CaPTQRSo.js → SeriesPage-Ds_FEEZW.js} +2 -2
- package/dist/{Spinner-BgdjQygI.js → Spinner-B2rdbspc.js} +1 -1
- package/dist/{Success-tXgS0BXp.js → Success-Dkak0iM9.js} +201 -201
- package/dist/{TagIcon-Kq7_bapx.js → TagIcon-BY8tK_qA.js} +1 -1
- package/dist/ViewTicketsEmbed-B_fqalQh.js +660 -0
- package/dist/{WarningCircleIcon-BdbAYYi4.js → WarningCircleIcon-C5Lc7qkF.js} +1 -1
- package/dist/{WarningTriIcon-D8otatZe.js → WarningTriIcon-BM8qc9xx.js} +1 -1
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +258 -252
- package/dist/api/cart-addons.d.ts +2 -1
- package/dist/api/checkout-availability.d.ts +2 -25
- package/dist/api/client.d.ts +4 -7
- package/dist/api/events.d.ts +23 -22
- package/dist/api/gift-cards.d.ts +7 -6
- package/dist/api/orders.d.ts +13 -12
- package/dist/api/promo.d.ts +5 -4
- package/dist/api/surge-queue.d.ts +5 -34
- package/dist/api/venues.d.ts +5 -4
- package/dist/api/waitlist.d.ts +5 -9
- package/dist/{api-DG7ztpYi.js → api-BEYkGabB.js} +174 -169
- package/dist/{copyToClipboard-DSangJpP.js → copyToClipboard-F-akSgaF.js} +1 -1
- package/dist/{createErrorGate.svelte-CEBpRAmr.js → createErrorGate.svelte-CEGaIQeI.js} +1 -1
- package/dist/{datetime-YTw6PkGP.js → datetime-BnKG6Hjm.js} +1 -1
- package/dist/{de-CbwqVvg6.js → de-BHcAXwnM.js} +0 -1
- package/dist/{defaultLabels-CsRGNP7f.js → defaultLabels-BbNEEsF7.js} +0 -1
- package/dist/{defaults-UDvnrGu0.js → defaults-CgsFJvJ2.js} +2 -2
- package/dist/{es-Dxqulvec.js → es-DZ3yceh-.js} +0 -1
- package/dist/{event-CW18bU9h.js → event-DfqUhl5j.js} +1 -1
- package/dist/{event-transform-CyRMeKW_.js → event-transform-Bk1IoYh5.js} +4 -4
- package/dist/{eventStatusStream-Cf7PaLka.js → eventStatusStream-CE0PwO0c.js} +9 -9
- package/dist/{fr-0aCE52FE.js → fr-Dyi163Vk.js} +0 -1
- package/dist/{href-yqxAPbkW.js → href-CfWGAmkP.js} +3 -3
- package/dist/i18n-B705OXZp.js +28 -0
- package/dist/{i18n-MF3q-UBI.js → i18n-BoMUWcCq.js} +4 -4
- package/dist/{id-7ClY2Dwb.js → id-DvFRZVAm.js} +0 -1
- package/dist/{it-z-heX6Hy.js → it-Bh05tcLv.js} +0 -1
- package/dist/{ja-ecBzr5l9.js → ja-CU4PQS4j.js} +0 -1
- package/dist/{ko-Blnq1Wc_.js → ko-DDk6EdWm.js} +0 -1
- package/dist/locales/4.3.121/main/de.js +1 -0
- package/dist/locales/4.3.121/main/es.js +1 -0
- package/dist/locales/4.3.121/main/fr.js +1 -0
- package/dist/locales/4.3.121/main/id.js +1 -0
- package/dist/locales/4.3.121/main/it.js +1 -0
- package/dist/locales/4.3.121/main/ja.js +1 -0
- package/dist/locales/4.3.121/main/ko.js +1 -0
- package/dist/locales/4.3.121/main/nl.js +1 -0
- package/dist/locales/4.3.121/main/pl.js +1 -0
- package/dist/locales/4.3.121/main/pt-br.js +1 -0
- package/dist/locales/4.3.121/main/tr.js +1 -0
- package/dist/locales/4.3.121/main/zh.js +1 -0
- package/dist/{nl-Bm2Lee3j.js → nl-DOSKYHSx.js} +0 -1
- package/dist/{pixels-BAPQbj_Y.js → pixels-Bu5-BISs.js} +8 -8
- package/dist/{pl-DIp-gYhF.js → pl-CkLEymA2.js} +0 -1
- package/dist/{pt-br-BmcVsgbQ.js → pt-br-BHuCQSM-.js} +0 -1
- package/dist/{serverTotals-D57U4Nju.js → serverTotals-B8SJCzxE.js} +1 -1
- package/dist/{showcase-state-options-zfQoPg37.js → showcase-state-options-KO_TYk3I.js} +1 -1
- package/dist/{to-event-card-props-Dn1eDOiJ.js → to-event-card-props-DYIfPN8e.js} +9 -13
- package/dist/{tr-BshxS2DN.js → tr-Bvc34ODh.js} +0 -1
- package/dist/{utils-CdNe7KGe.js → utils-NMx3aPDk.js} +82 -78
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +1445 -1445
- package/dist/venue-calendar.iife.js +31 -31
- package/dist/venue-calendar.umd.js +52 -52
- package/dist/{orders-BWVwv3P0.js → widget-key-context-D2zj4sp5.js} +221 -213
- package/dist/{zh-B06ZsUNX.js → zh-K0hOzZ3G.js} +0 -1
- package/package.json +1 -1
- package/src/lib/theme.js +222 -222
- package/dist/Calendar-S2Es6EKK.js +0 -486
- package/dist/CollectionView-DyFDlCmo.js +0 -138
- package/dist/EventPage-m5SlifRu.js +0 -1200
- package/dist/ViewTicketsEmbed-BnuypZ1H.js +0 -660
- package/dist/i18n-B-AwhAMH.js +0 -28
- package/dist/locales/4.3.119/main/de.js +0 -1
- package/dist/locales/4.3.119/main/es.js +0 -1
- package/dist/locales/4.3.119/main/fr.js +0 -1
- package/dist/locales/4.3.119/main/id.js +0 -1
- package/dist/locales/4.3.119/main/it.js +0 -1
- package/dist/locales/4.3.119/main/ja.js +0 -1
- package/dist/locales/4.3.119/main/ko.js +0 -1
- package/dist/locales/4.3.119/main/nl.js +0 -1
- package/dist/locales/4.3.119/main/pl.js +0 -1
- package/dist/locales/4.3.119/main/pt-br.js +0 -1
- package/dist/locales/4.3.119/main/tr.js +0 -1
- package/dist/locales/4.3.119/main/zh.js +0 -1
- /package/dist/locales/{4.3.119 → 4.3.121}/flow/de.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.121}/flow/es.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.121}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.121}/flow/id.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.121}/flow/it.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.121}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.121}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.121}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.121}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.121}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.121}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.121}/flow/zh.js +0 -0
|
@@ -1,486 +0,0 @@
|
|
|
1
|
-
import { i as e } from "./Button-B58iYo_t.js";
|
|
2
|
-
import { r as t, s as n } from "./keyboard-DhCcdIyh.js";
|
|
3
|
-
import { d as r, m as i, p as a } from "./sizing-B7ixYndz.js";
|
|
4
|
-
import { B as o, H as s, J as c, K as l, M as u, N as d, P as ee, X as f } from "./datetime-YTw6PkGP.js";
|
|
5
|
-
import { c as te, h as ne } from "./portalContainment-CeAVqIb-.js";
|
|
6
|
-
import { t as re } from "./defaultLabels-CsRGNP7f.js";
|
|
7
|
-
import { t as ie } from "./portal-D-oaEWsY.js";
|
|
8
|
-
import { n as p, t as m } from "./floatingPosition-XIv5DYuP.js";
|
|
9
|
-
import { t as ae } from "./Grid-kuP6V0GW.js";
|
|
10
|
-
import { t as h } from "./EmptyState-CMFePII9.js";
|
|
11
|
-
import { a as g, o as _, r as oe, t as v } from "./to-event-card-props-Dn1eDOiJ.js";
|
|
12
|
-
import "svelte/internal/disclose-version";
|
|
13
|
-
import * as y from "svelte/internal/client";
|
|
14
|
-
import { SvelteMap as se } from "svelte/reactivity";
|
|
15
|
-
import { onDestroy as b, onMount as x } from "svelte";
|
|
16
|
-
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/ChevronLeftOutline.svelte
|
|
17
|
-
var S = y.from_svg("<svg aria-hidden=\"true\" fill=\"none\" stroke-width=\"2\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15.75 19.5L8.25 12l7.5-7.5\"></path></svg>");
|
|
18
|
-
function C(e, t) {
|
|
19
|
-
let n = y.prop(t, "size", 3, "24"), r = y.prop(t, "color", 3, "currentColor"), i = y.prop(t, "class", 3, "");
|
|
20
|
-
var a = S();
|
|
21
|
-
y.template_effect(() => {
|
|
22
|
-
y.set_class(a, 0, y.clsx(i())), y.set_attribute(a, "width", n()), y.set_attribute(a, "height", n()), y.set_attribute(a, "stroke", r());
|
|
23
|
-
}), y.append(e, a);
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/ChevronRightOutline.svelte
|
|
27
|
-
var ce = y.from_svg("<svg aria-hidden=\"true\" fill=\"none\" stroke-width=\"2\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"></path></svg>");
|
|
28
|
-
function le(e, t) {
|
|
29
|
-
let n = y.prop(t, "size", 3, "24"), r = y.prop(t, "color", 3, "currentColor"), i = y.prop(t, "class", 3, "");
|
|
30
|
-
var a = ce();
|
|
31
|
-
y.template_effect(() => {
|
|
32
|
-
y.set_class(a, 0, y.clsx(i())), y.set_attribute(a, "width", n()), y.set_attribute(a, "height", n()), y.set_attribute(a, "stroke", r());
|
|
33
|
-
}), y.append(e, a);
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/SearchIcon.svelte
|
|
37
|
-
var w = y.from_svg("<path d=\"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z\"></path>"), T = y.from_svg("<circle cx=\"112\" cy=\"112\" r=\"80\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"></circle><line x1=\"168.57\" y1=\"168.57\" x2=\"224\" y2=\"224\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"></line>", 1), ue = y.from_svg("<svg aria-hidden=\"true\" viewBox=\"0 0 256 256\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><!></svg>");
|
|
38
|
-
function de(e, t) {
|
|
39
|
-
y.push(t, !0);
|
|
40
|
-
let n = y.prop(t, "size", 3, "24"), r = y.prop(t, "color", 3, "currentColor"), i = y.prop(t, "class", 3, ""), a = f(), o = y.derived(() => t.weight ?? a?.weight ?? "regular");
|
|
41
|
-
var s = ue();
|
|
42
|
-
let c;
|
|
43
|
-
var l = y.child(s), u = (e) => {
|
|
44
|
-
var t = w();
|
|
45
|
-
y.append(e, t);
|
|
46
|
-
}, d = (e) => {
|
|
47
|
-
var t = T();
|
|
48
|
-
y.next(), y.append(e, t);
|
|
49
|
-
};
|
|
50
|
-
y.if(l, (e) => {
|
|
51
|
-
y.get(o) === "fill" ? e(u) : e(d, -1);
|
|
52
|
-
}), y.reset(s), y.template_effect(() => {
|
|
53
|
-
y.set_class(s, 0, y.clsx(i())), y.set_attribute(s, "width", n()), y.set_attribute(s, "height", n()), c = y.set_style(s, "", c, { color: r() === "currentColor" ? void 0 : r() });
|
|
54
|
-
}), y.append(e, s), y.pop();
|
|
55
|
-
}
|
|
56
|
-
//#endregion
|
|
57
|
-
//#region node_modules/@getmicdrop/svelte-components/dist/utils/clickOutside.js
|
|
58
|
-
function E(e, t) {
|
|
59
|
-
let n = (t) => {
|
|
60
|
-
if (e.contains(t)) return !0;
|
|
61
|
-
let n = /* @__PURE__ */ new Set();
|
|
62
|
-
for (let r = t; r;) {
|
|
63
|
-
let t = p(r);
|
|
64
|
-
if (t && !n.has(t)) {
|
|
65
|
-
if (e.contains(t)) return !0;
|
|
66
|
-
n.add(t), r = t;
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
r = r.parentElement;
|
|
70
|
-
}
|
|
71
|
-
return !1;
|
|
72
|
-
}, r = (e) => {
|
|
73
|
-
n(e.target) || t();
|
|
74
|
-
};
|
|
75
|
-
return document.addEventListener("mousedown", r, !0), { destroy() {
|
|
76
|
-
document.removeEventListener("mousedown", r, !0);
|
|
77
|
-
} };
|
|
78
|
-
}
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Popover/Popover.svelte
|
|
81
|
-
var D = y.from_html("<div role=\"dialog\" data-popover-panel=\"\"><!></div>"), O = y.from_html("<div class=\"relative inline-block\"><!> <!></div>");
|
|
82
|
-
function k(e, t) {
|
|
83
|
-
y.push(t, !0);
|
|
84
|
-
let r = y.prop(t, "open", 15, !1), i = y.prop(t, "placement", 3, "bottom-end"), a = y.prop(t, "class", 3, ""), o = y.state(void 0), s = y.state(void 0), c = y.derived(() => /(?:^|[\s:!])-?z-/.test(a())), l = y.derived(() => y.get(c) ? void 0 : te.modalContent);
|
|
85
|
-
function u() {
|
|
86
|
-
y.get(c) && y.get(s) && (y.get(s).style.zIndex = "");
|
|
87
|
-
}
|
|
88
|
-
let d = {
|
|
89
|
-
bottom: "top",
|
|
90
|
-
top: "bottom",
|
|
91
|
-
left: "right",
|
|
92
|
-
right: "left"
|
|
93
|
-
}, ee = {
|
|
94
|
-
start: "left",
|
|
95
|
-
end: "right"
|
|
96
|
-
}, f = y.state(void 0), re = y.derived(() => {
|
|
97
|
-
let [e, t = "start"] = (y.get(f) ?? i()).split("-"), n = d[e] ?? "top";
|
|
98
|
-
return e === "top" || e === "bottom" ? `${n} ${ee[t] ?? "left"}` : `${n} ${t === "end" ? "bottom" : "top"}`;
|
|
99
|
-
});
|
|
100
|
-
function p() {
|
|
101
|
-
r() && (r(!1), t.onclose?.());
|
|
102
|
-
}
|
|
103
|
-
function ae() {
|
|
104
|
-
r(!r()), r() || t.onclose?.();
|
|
105
|
-
}
|
|
106
|
-
function h(e) {
|
|
107
|
-
!r() || e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), p());
|
|
108
|
-
}
|
|
109
|
-
x(() => {
|
|
110
|
-
document.addEventListener("keydown", h);
|
|
111
|
-
}), b(() => {
|
|
112
|
-
typeof document < "u" && document.removeEventListener("keydown", h);
|
|
113
|
-
});
|
|
114
|
-
var g = O(), _ = y.child(g);
|
|
115
|
-
y.snippet(_, () => t.trigger, () => ({
|
|
116
|
-
toggle: ae,
|
|
117
|
-
open: r()
|
|
118
|
-
}));
|
|
119
|
-
var oe = y.sibling(_, 2), v = (e) => {
|
|
120
|
-
var r = D();
|
|
121
|
-
let c;
|
|
122
|
-
var d = y.child(r);
|
|
123
|
-
y.snippet(d, () => t.children), y.reset(r), y.bind_this(r, (e) => y.set(s, e), () => y.get(s)), y.action(r, (e, t) => m?.(e, t), () => ({
|
|
124
|
-
reference: y.get(o),
|
|
125
|
-
placement: i(),
|
|
126
|
-
offset: 4,
|
|
127
|
-
layer: "modalContent",
|
|
128
|
-
onComputed: ({ placement: e }) => {
|
|
129
|
-
y.set(f, e, !0), u();
|
|
130
|
-
}
|
|
131
|
-
})), y.action(r, (e) => ie?.(e)), y.template_effect((e) => {
|
|
132
|
-
y.set_class(r, 1, e), y.set_attribute(r, "aria-label", t.ariaLabel), c = y.set_style(r, "", c, { "z-index": y.get(l) });
|
|
133
|
-
}, [() => y.clsx(n("rounded-lg border border-border bg-popover text-popover-foreground shadow-lg", a()))]), y.transition(3, r, () => ne, () => ({ origin: y.get(re) })), y.append(e, r);
|
|
134
|
-
};
|
|
135
|
-
y.if(oe, (e) => {
|
|
136
|
-
r() && e(v);
|
|
137
|
-
}), y.reset(g), y.bind_this(g, (e) => y.set(o, e), () => y.get(o)), y.action(g, (e, t) => E?.(e, t), () => p), y.append(e, g), y.pop();
|
|
138
|
-
}
|
|
139
|
-
//#endregion
|
|
140
|
-
//#region src/components/Calendar/Calendar.svelte
|
|
141
|
-
var fe = y.from_html("<div role=\"row\"><span role=\"gridcell\"> </span></div>"), pe = y.from_html("<div style=\"display:contents\" data-testid=\"calendar-event\"><!></div>"), me = y.from_html("<div role=\"gridcell\"><div> </div> <!></div>"), he = y.from_html("<div class=\"month-grid svelte-1twddf5\" role=\"grid\"></div>"), ge = y.from_html("<div> </div>"), _e = y.from_html("<button type=\"button\" data-testid=\"calendar-day\"><span> </span></button>"), ve = y.from_html("<div class=\"mini-grid svelte-1twddf5\" role=\"grid\"></div>"), ye = y.from_html("<li class=\"list-none\"><!></li>"), be = y.from_html("<div class=\"hidden lg:block calendar-swipe-host svelte-1twddf5\"><div class=\"dow-row svelte-1twddf5\" aria-hidden=\"true\"></div> <div class=\"swipe-viewport svelte-1twddf5\"><div><!> <!> <!></div></div></div> <div class=\"lg:hidden calendar-swipe-host svelte-1twddf5\"><div class=\"dow-row svelte-1twddf5\" aria-hidden=\"true\"></div> <div class=\"swipe-viewport svelte-1twddf5\"><div><!> <!> <!></div></div> <div class=\"mt-4\" data-testid=\"calendar-month-list\"><!></div></div>", 1);
|
|
142
|
-
function A(n, f) {
|
|
143
|
-
y.push(f, !0), y.prop(f, "isScheduledBtn", 3, !1), y.prop(f, "eventCalendar", 3, !1), y.prop(f, "embedCalendar", 3, !1);
|
|
144
|
-
let te = y.prop(f, "currentYear", 19, () => l().getFullYear()), ne = y.prop(f, "currentMonth", 19, () => l().getMonth()), ie = y.prop(f, "currentevents", 19, () => []);
|
|
145
|
-
y.prop(f, "showPartialPreview", 3, !0);
|
|
146
|
-
let p = y.prop(f, "labels", 3, re), m = y.prop(f, "locale", 3, "en-US"), b = y.prop(f, "eventDetails", 3, null), x = y.prop(f, "size", 3, "M"), S = y.prop(f, "posterFit", 3, "fit"), C = y.prop(f, "posterBackdrop", 3, "blur"), ce = y.derived(te), le = y.derived(ne), w = s(l()), T = y.derived(() => o(y.get(ce), y.get(le), 1)), ue = y.derived(() => c(y.get(T), {
|
|
147
|
-
month: "long",
|
|
148
|
-
year: "numeric"
|
|
149
|
-
}, m())), de = y.derived(() => {
|
|
150
|
-
let e = new Intl.DateTimeFormat(m(), { weekday: "short" }), t = new Intl.DateTimeFormat(m(), { weekday: "narrow" });
|
|
151
|
-
return ee(l()).map((n) => ({
|
|
152
|
-
short: e.format(n),
|
|
153
|
-
narrow: t.format(n)
|
|
154
|
-
}));
|
|
155
|
-
});
|
|
156
|
-
function E(e, t) {
|
|
157
|
-
return d(e.getFullYear(), e.getMonth()).map(({ day: e, inMonth: n, isToday: r }) => {
|
|
158
|
-
let i = s(e);
|
|
159
|
-
return {
|
|
160
|
-
localDay: e,
|
|
161
|
-
day: e.getDate(),
|
|
162
|
-
date: i,
|
|
163
|
-
groupedEvents: n ? g(t.get(i) ?? []) : [],
|
|
164
|
-
isOutsideMonth: !n,
|
|
165
|
-
isToday: n && r
|
|
166
|
-
};
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
function D(e) {
|
|
170
|
-
let t = [];
|
|
171
|
-
for (let n = 0; n < e.length; n += 7) {
|
|
172
|
-
let r = e.slice(n, n + 7), i = r.every((e) => e.date < w && e.groupedEvents.length === 0);
|
|
173
|
-
t.push({
|
|
174
|
-
week: r,
|
|
175
|
-
folded: i
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
let n = [];
|
|
179
|
-
for (let e = 0; e < t.length; e++) {
|
|
180
|
-
if (!t[e].folded) {
|
|
181
|
-
for (let r of t[e].week) n.push({ cell: r });
|
|
182
|
-
continue;
|
|
183
|
-
}
|
|
184
|
-
let r = t[e].week[0];
|
|
185
|
-
for (; t[e + 1]?.folded;) e++;
|
|
186
|
-
let i = t[e].week[6], a = (e) => c(e, {
|
|
187
|
-
month: "short",
|
|
188
|
-
day: "numeric"
|
|
189
|
-
}, m());
|
|
190
|
-
n.push({ strip: {
|
|
191
|
-
key: `strip|${r.date}`,
|
|
192
|
-
label: `${a(r.localDay)} – ${a(i.localDay)}`
|
|
193
|
-
} });
|
|
194
|
-
}
|
|
195
|
-
return n;
|
|
196
|
-
}
|
|
197
|
-
let O = y.derived(() => {
|
|
198
|
-
let e = new se();
|
|
199
|
-
for (let t of ie()) oe(t)?.type !== "cancelled" && (e.has(t.date) || e.set(t.date, []), e.get(t.date).push(t));
|
|
200
|
-
return e;
|
|
201
|
-
}), k = y.derived(() => E(y.get(T), y.get(O))), A = y.derived(() => E(u(y.get(T), -1), y.get(O))), xe = y.derived(() => E(u(y.get(T), 1), y.get(O))), j = y.state(0), Se = y.state(0), Ce = y.derived(() => D(y.get(k))), we = y.derived(() => D(y.get(A))), Te = y.derived(() => D(y.get(xe))), M = 0, Ee = 0, N = 0, P = 0, F = 0, I = y.state(!1), L = y.state(0), R = y.state(!1), z = y.state(!1), B = null, V = y.state(!1), H = y.state(null), U = y.state(null);
|
|
202
|
-
function De() {
|
|
203
|
-
return y.get(H)?.offsetWidth || y.get(U)?.offsetWidth || 320;
|
|
204
|
-
}
|
|
205
|
-
y.user_effect(() => {
|
|
206
|
-
if (typeof window > "u") return;
|
|
207
|
-
let e = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
208
|
-
y.set(V, e.matches, !0);
|
|
209
|
-
let t = (e) => y.set(V, e.matches, !0);
|
|
210
|
-
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
211
|
-
});
|
|
212
|
-
function Oe(e, t, n) {
|
|
213
|
-
if (y.get(z)) {
|
|
214
|
-
t?.();
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
if (y.get(V)) {
|
|
218
|
-
t?.();
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
y.set(z, !0);
|
|
222
|
-
let r = n || De();
|
|
223
|
-
y.set(L, e === 1 ? -r : r, !0), B = window.setTimeout(() => {
|
|
224
|
-
B = null, y.set(R, !0), requestAnimationFrame(() => {
|
|
225
|
-
t?.(), y.set(L, 0), y.set(z, !1), requestAnimationFrame(() => {
|
|
226
|
-
y.set(R, !1);
|
|
227
|
-
});
|
|
228
|
-
});
|
|
229
|
-
}, 320);
|
|
230
|
-
}
|
|
231
|
-
async function ke(e, t) {
|
|
232
|
-
Oe(e, t);
|
|
233
|
-
}
|
|
234
|
-
function Ae(e) {
|
|
235
|
-
y.get(z) && (B !== null && (clearTimeout(B), B = null), y.set(z, !1), y.set(R, !1)), M = e.touches[0].clientX, Ee = e.touches[0].clientY, N = M, P = e.timeStamp, F = 0, y.set(I, !1), y.set(L, 0);
|
|
236
|
-
}
|
|
237
|
-
function je(e) {
|
|
238
|
-
if (!M || y.get(z)) return;
|
|
239
|
-
let t = e.touches[0].clientX, n = e.touches[0].clientY, r = M - t, i = Ee - n, a = e.timeStamp;
|
|
240
|
-
if (!y.get(I) && Math.abs(r) > 10) {
|
|
241
|
-
if (Math.abs(r) > Math.abs(i)) y.set(I, !0);
|
|
242
|
-
else {
|
|
243
|
-
M = 0;
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
if (y.get(I)) {
|
|
248
|
-
e.preventDefault();
|
|
249
|
-
let n = a - P;
|
|
250
|
-
n > 0 && (F = (N - t) / n), N = t, P = a, y.set(L, -r * .95);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
function W(t) {
|
|
254
|
-
if (!M || !y.get(I) || y.get(z)) {
|
|
255
|
-
M = 0, y.set(I, !1);
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
let n = t.currentTarget?.offsetWidth || De(), r = Math.abs(y.get(L)) / n > .08, i = Math.abs(F) > .2, a = y.get(L) > 0 ? -1 : 1;
|
|
259
|
-
r || i ? (e("medium"), Oe(a, () => a === 1 ? f.onswipeNext?.() : f.onswipePrev?.(), n)) : y.set(L, 0), M = 0, y.set(I, !1), F = 0;
|
|
260
|
-
}
|
|
261
|
-
let G = y.state(""), K = y.state("");
|
|
262
|
-
function Me(e) {
|
|
263
|
-
let n = [
|
|
264
|
-
"ArrowLeft",
|
|
265
|
-
"ArrowRight",
|
|
266
|
-
"ArrowUp",
|
|
267
|
-
"ArrowDown"
|
|
268
|
-
].includes(e.key), r = t(e);
|
|
269
|
-
if (!n && !r || !y.get(K)) return;
|
|
270
|
-
let i = y.get(k).findIndex((e) => e.date === y.get(K));
|
|
271
|
-
if (i === -1) return;
|
|
272
|
-
if (r) {
|
|
273
|
-
e.preventDefault();
|
|
274
|
-
let t = y.get(k)[i];
|
|
275
|
-
t.groupedEvents.length > 0 && (y.set(G, t.date, !0), f.ondaySelect?.({
|
|
276
|
-
date: t.date,
|
|
277
|
-
events: t.groupedEvents
|
|
278
|
-
}));
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
let a = i;
|
|
282
|
-
e.key === "ArrowLeft" ? a = i - 1 : e.key === "ArrowRight" ? a = i + 1 : e.key === "ArrowUp" ? a = i - 7 : e.key === "ArrowDown" && (a = i + 7), !(a < 0 || a >= y.get(k).length) && (e.preventDefault(), y.set(K, y.get(k)[a].date, !0), queueMicrotask(() => {
|
|
283
|
-
document.querySelector(`[data-current-page] [data-cell-date="${y.get(k)[a].date}"]`)?.focus();
|
|
284
|
-
}));
|
|
285
|
-
}
|
|
286
|
-
y.user_effect(() => {
|
|
287
|
-
if (y.get(K) && y.get(k).some((e) => e.date === y.get(K))) return;
|
|
288
|
-
if (y.get(q) && y.get(k).some((e) => e.date === y.get(q))) {
|
|
289
|
-
y.set(K, y.get(q), !0);
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
let e = y.get(k).find((e) => e.isToday);
|
|
293
|
-
if (e) {
|
|
294
|
-
y.set(K, e.date, !0);
|
|
295
|
-
return;
|
|
296
|
-
}
|
|
297
|
-
let t = y.get(k).find((e) => !e.isOutsideMonth && e.groupedEvents.length > 0);
|
|
298
|
-
if (t) {
|
|
299
|
-
y.set(K, t.date, !0);
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
let n = y.get(k).find((e) => !e.isOutsideMonth);
|
|
303
|
-
n && y.set(K, n.date, !0);
|
|
304
|
-
});
|
|
305
|
-
function Ne(e) {
|
|
306
|
-
return !!e && y.get(k).some((t) => t.date === e && !t.isOutsideMonth);
|
|
307
|
-
}
|
|
308
|
-
let q = y.derived(() => Ne(y.get(G)) ? y.get(G) : Ne(w) ? w : ""), J = y.derived(() => !!y.get(G) && y.get(q) === y.get(G)), Pe = y.derived(() => y.get(J) ? g(y.get(O).get(y.get(G)) ?? []) : y.get(k).filter((e) => !e.isOutsideMonth && e.date >= w).flatMap((e) => e.groupedEvents));
|
|
309
|
-
var Fe = { animateMonthTransition: ke }, Ie = be(), Y = y.first_child(Ie);
|
|
310
|
-
{
|
|
311
|
-
let e = (e, t = y.noop, n = y.noop, r = y.noop) => {
|
|
312
|
-
var a = he();
|
|
313
|
-
y.each(a, 21, t, ({ cell: e, strip: t }) => t ? t.key : `${e.date}|${e.isOutsideMonth ? "O" : "I"}`, (e, t) => {
|
|
314
|
-
let n = () => y.get(t).cell, r = () => y.get(t).strip;
|
|
315
|
-
var a = y.comment(), o = y.first_child(a), s = (e) => {
|
|
316
|
-
var t = fe(), n = y.child(t), a = y.child(n, !0);
|
|
317
|
-
y.reset(n), y.reset(t), y.template_effect(() => {
|
|
318
|
-
y.set_class(t, 1, `past-strip ${i.caption ?? ""}`, "svelte-1twddf5"), y.set_text(a, r().label);
|
|
319
|
-
}), y.append(e, t);
|
|
320
|
-
}, c = (e) => {
|
|
321
|
-
var t = me();
|
|
322
|
-
let r;
|
|
323
|
-
var a = y.child(t), o = y.child(a, !0);
|
|
324
|
-
y.reset(a);
|
|
325
|
-
var s = y.sibling(a, 2);
|
|
326
|
-
y.each(s, 17, () => n().groupedEvents, (e) => e.event.eventID, (e, t) => {
|
|
327
|
-
let n = y.derived(() => {
|
|
328
|
-
let { pillEvents: e, ...n } = v(y.get(t), p(), m(), b(), {
|
|
329
|
-
posterFit: S(),
|
|
330
|
-
posterBackdrop: C()
|
|
331
|
-
});
|
|
332
|
-
return {
|
|
333
|
-
pillEvents: e,
|
|
334
|
-
card: n
|
|
335
|
-
};
|
|
336
|
-
});
|
|
337
|
-
var r = pe(), i = y.child(r);
|
|
338
|
-
_(i, y.spread_props({ pillVariant: "primary" }, () => y.get(n).card, {
|
|
339
|
-
layout: "micro",
|
|
340
|
-
density: "micro",
|
|
341
|
-
hideDate: !0,
|
|
342
|
-
onclick: () => f.oneventClick?.(y.get(t).event),
|
|
343
|
-
onpillclick: (e) => f.oneventClick?.(y.get(n).pillEvents[e] ?? y.get(t).event)
|
|
344
|
-
})), y.reset(r), y.append(e, r);
|
|
345
|
-
}), y.reset(t), y.template_effect(() => {
|
|
346
|
-
r = y.set_class(t, 1, "day-cell svelte-1twddf5", null, r, {
|
|
347
|
-
"day-cell--outside": n().isOutsideMonth,
|
|
348
|
-
"day-cell--today": n().isToday
|
|
349
|
-
}), y.set_class(a, 1, `day-num ${i.eyebrow ?? ""}`, "svelte-1twddf5"), y.set_text(o, n().day);
|
|
350
|
-
}), y.append(e, t);
|
|
351
|
-
};
|
|
352
|
-
y.if(o, (e) => {
|
|
353
|
-
r() ? e(s) : e(c, -1);
|
|
354
|
-
}), y.append(e, a);
|
|
355
|
-
}), y.reset(a), y.template_effect(() => y.set_attribute(a, "aria-label", n())), y.bind_element_size(a, "offsetHeight", (e) => {
|
|
356
|
-
r() && y.set(j, e, !0);
|
|
357
|
-
}), y.append(e, a);
|
|
358
|
-
};
|
|
359
|
-
var Le = y.child(Y);
|
|
360
|
-
y.each(Le, 21, () => y.get(de), y.index, (e, t) => {
|
|
361
|
-
var n = ge(), r = y.child(n, !0);
|
|
362
|
-
y.reset(n), y.template_effect(() => {
|
|
363
|
-
y.set_class(n, 1, `dow-cell ${i.eyebrow ?? ""}`, "svelte-1twddf5"), y.set_text(r, y.get(t).short);
|
|
364
|
-
}), y.append(e, n);
|
|
365
|
-
}), y.reset(Le);
|
|
366
|
-
var Re = y.sibling(Le, 2);
|
|
367
|
-
let t;
|
|
368
|
-
var X = y.child(Re);
|
|
369
|
-
let n, r;
|
|
370
|
-
var ze = y.child(X);
|
|
371
|
-
e(ze, () => y.get(we), () => "prev", () => !1);
|
|
372
|
-
var Be = y.sibling(ze, 2);
|
|
373
|
-
e(Be, () => y.get(Ce), () => y.get(ue), () => !0), e(y.sibling(Be, 2), () => y.get(Te), () => "next", () => !1), y.reset(X), y.reset(Re), y.reset(Y), y.bind_this(Y, (e) => y.set(H, e), () => y.get(H)), y.template_effect(() => {
|
|
374
|
-
t = y.set_style(Re, "", t, { height: y.get(j) ? `${y.get(j)}px` : void 0 }), n = y.set_class(X, 1, "swipe-track svelte-1twddf5", null, n, {
|
|
375
|
-
"swipe-track--swiping": y.get(I),
|
|
376
|
-
"swipe-track--snapping": y.get(R)
|
|
377
|
-
}), r = y.set_style(X, "", r, { transform: `translate3d(calc(-100% / 3 + ${y.get(L) ?? ""}px), 0, 0)` });
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
var Z = y.sibling(Y, 2);
|
|
381
|
-
{
|
|
382
|
-
let e = (e, t = y.noop, n = y.noop, o = y.noop) => {
|
|
383
|
-
var s = ve();
|
|
384
|
-
y.each(s, 21, t, (e) => `${e.date}|${e.isOutsideMonth ? "O" : "I"}`, (e, t) => {
|
|
385
|
-
let n = y.derived(() => y.get(t).groupedEvents.length > 0), s = y.derived(() => y.get(t).date === y.get(q));
|
|
386
|
-
var c = _e();
|
|
387
|
-
let l;
|
|
388
|
-
var u = y.child(c), d = y.child(u, !0);
|
|
389
|
-
y.reset(u), y.reset(c), y.template_effect(() => {
|
|
390
|
-
l = y.set_class(c, 1, `mini-cell ${i.label ?? ""} ${(y.get(s) ? a.heavy : y.get(n) ? a.strong : "") ?? ""}`, "svelte-1twddf5", l, {
|
|
391
|
-
"mini-cell--outside": y.get(t).isOutsideMonth,
|
|
392
|
-
"mini-cell--today": y.get(t).isToday,
|
|
393
|
-
"mini-cell--selected": y.get(s) && y.get(J),
|
|
394
|
-
"mini-cell--has-events": y.get(n)
|
|
395
|
-
}), y.set_attribute(c, "aria-disabled", !y.get(n)), y.set_attribute(c, "tabindex", o() && y.get(K) === y.get(t).date ? 0 : -1), y.set_attribute(c, "data-cell-date", y.get(t).date), y.set_attribute(c, "aria-label", `${y.get(t).day ?? ""} ${y.get(n) ? `· ${y.get(t).groupedEvents.length} event${y.get(t).groupedEvents.length === 1 ? "" : "s"}` : ""}`), y.set_attribute(c, "aria-pressed", y.get(s)), y.set_class(u, 1, `mini-day ${r.none ?? ""}`, "svelte-1twddf5"), y.set_text(d, y.get(t).day);
|
|
396
|
-
}), y.delegated("click", c, function(...e) {
|
|
397
|
-
(y.get(n) ? () => {
|
|
398
|
-
y.set(G, y.get(t).date, !0), y.set(K, y.get(t).date, !0), f.ondaySelect?.({
|
|
399
|
-
date: y.get(t).date,
|
|
400
|
-
events: y.get(t).groupedEvents
|
|
401
|
-
});
|
|
402
|
-
} : void 0)?.apply(this, e);
|
|
403
|
-
}), y.append(e, c);
|
|
404
|
-
}), y.reset(s), y.template_effect(() => {
|
|
405
|
-
y.set_attribute(s, "aria-label", n()), y.set_attribute(s, "data-current-page", o() ? "" : void 0);
|
|
406
|
-
}), y.bind_element_size(s, "offsetHeight", (e) => {
|
|
407
|
-
o() && y.set(Se, e, !0);
|
|
408
|
-
}), y.append(e, s);
|
|
409
|
-
};
|
|
410
|
-
var Ve = y.child(Z);
|
|
411
|
-
y.each(Ve, 21, () => y.get(de), y.index, (e, t) => {
|
|
412
|
-
var n = ge(), r = y.child(n, !0);
|
|
413
|
-
y.reset(n), y.template_effect(() => {
|
|
414
|
-
y.set_class(n, 1, `dow-cell ${i.eyebrow ?? ""}`, "svelte-1twddf5"), y.set_text(r, y.get(t).narrow);
|
|
415
|
-
}), y.append(e, n);
|
|
416
|
-
}), y.reset(Ve);
|
|
417
|
-
var Q = y.sibling(Ve, 2);
|
|
418
|
-
let t;
|
|
419
|
-
var $ = y.child(Q);
|
|
420
|
-
let n, o;
|
|
421
|
-
var He = y.child($);
|
|
422
|
-
e(He, () => y.get(A), () => "prev", () => !1);
|
|
423
|
-
var Ue = y.sibling(He, 2);
|
|
424
|
-
e(Ue, () => y.get(k), () => y.get(ue), () => !0), e(y.sibling(Ue, 2), () => y.get(xe), () => "next", () => !1), y.reset($), y.reset(Q);
|
|
425
|
-
var We = y.sibling(Q, 2), Ge = y.child(We), Ke = (e) => {
|
|
426
|
-
ae(e, {
|
|
427
|
-
cols: "1",
|
|
428
|
-
gap: "2",
|
|
429
|
-
as: "ul",
|
|
430
|
-
children: (e, t) => {
|
|
431
|
-
var n = y.comment(), r = y.first_child(n);
|
|
432
|
-
y.each(r, 17, () => y.get(Pe), (e) => e.event.eventID, (e, t) => {
|
|
433
|
-
let n = y.derived(() => {
|
|
434
|
-
let { pillEvents: e, ...n } = v(y.get(t), p(), m(), b(), {
|
|
435
|
-
posterFit: S(),
|
|
436
|
-
posterBackdrop: C()
|
|
437
|
-
});
|
|
438
|
-
return {
|
|
439
|
-
pillEvents: e,
|
|
440
|
-
card: n
|
|
441
|
-
};
|
|
442
|
-
});
|
|
443
|
-
var r = ye(), i = y.child(r);
|
|
444
|
-
_(i, y.spread_props({ pillVariant: "primary" }, () => y.get(n).card, {
|
|
445
|
-
layout: "horizontal",
|
|
446
|
-
density: "compact",
|
|
447
|
-
get hideDate() {
|
|
448
|
-
return y.get(J);
|
|
449
|
-
},
|
|
450
|
-
onclick: () => f.oneventClick?.(y.get(t).event),
|
|
451
|
-
onpillclick: (e) => f.oneventClick?.(y.get(n).pillEvents[e] ?? y.get(t).event)
|
|
452
|
-
})), y.reset(r), y.append(e, r);
|
|
453
|
-
}), y.append(e, n);
|
|
454
|
-
},
|
|
455
|
-
$$slots: { default: !0 }
|
|
456
|
-
});
|
|
457
|
-
}, qe = (e) => {
|
|
458
|
-
{
|
|
459
|
-
let t = y.derived(() => p().noUpcomingEvents || "No upcoming events");
|
|
460
|
-
h(e, { get message() {
|
|
461
|
-
return y.get(t);
|
|
462
|
-
} });
|
|
463
|
-
}
|
|
464
|
-
};
|
|
465
|
-
y.if(Ge, (e) => {
|
|
466
|
-
y.get(Pe).length > 0 ? e(Ke) : e(qe, -1);
|
|
467
|
-
}), y.reset(We), y.reset(Z), y.bind_this(Z, (e) => y.set(U, e), () => y.get(U)), y.template_effect(() => {
|
|
468
|
-
t = y.set_style(Q, "", t, { height: y.get(Se) ? `${y.get(Se)}px` : void 0 }), n = y.set_class($, 1, "swipe-track svelte-1twddf5", null, n, {
|
|
469
|
-
"swipe-track--swiping": y.get(I),
|
|
470
|
-
"swipe-track--snapping": y.get(R)
|
|
471
|
-
}), o = y.set_style($, "", o, { transform: `translate3d(calc(-100% / 3 + ${y.get(L) ?? ""}px), 0, 0)` });
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
return y.template_effect(() => {
|
|
475
|
-
y.set_attribute(Y, "data-size", x()), y.set_attribute(Z, "data-size", x());
|
|
476
|
-
}), y.delegated("touchstart", Y, Ae, void 0, !0), y.delegated("touchmove", Y, je, void 0, !0), y.delegated("touchend", Y, W), y.event("touchcancel", Y, W), y.delegated("touchstart", Z, Ae, void 0, !0), y.delegated("touchmove", Z, je, void 0, !0), y.delegated("touchend", Z, W), y.event("touchcancel", Z, W), y.delegated("keydown", Z, Me), y.append(n, Ie), y.pop(Fe);
|
|
477
|
-
}
|
|
478
|
-
y.delegate([
|
|
479
|
-
"touchstart",
|
|
480
|
-
"touchmove",
|
|
481
|
-
"touchend",
|
|
482
|
-
"keydown",
|
|
483
|
-
"click"
|
|
484
|
-
]);
|
|
485
|
-
//#endregion
|
|
486
|
-
export { le as a, de as i, k as n, C as o, E as r, A as t };
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./Event-DUq4tYBE.js";
|
|
2
|
-
import { g as t } from "./sizing-B7ixYndz.js";
|
|
3
|
-
import { o as n } from "./RecommendationsRail-Dq9t0T02.js";
|
|
4
|
-
import { t as r } from "./defaultLabels-CsRGNP7f.js";
|
|
5
|
-
import { t as i } from "./Button-VUB2WJ88.js";
|
|
6
|
-
import { E as a } from "./api-DG7ztpYi.js";
|
|
7
|
-
import { t as o } from "./PasswordInput-BlL0w_yr.js";
|
|
8
|
-
import { t as s } from "./__SKIP_NAVIGATION__-AOx8SI54.js";
|
|
9
|
-
import { t as c } from "./__SKIP_PATHS__-C0ixDSSm.js";
|
|
10
|
-
import { i as l, n as u, t as d } from "./gate-password-cache-oOcDm9Ki.js";
|
|
11
|
-
import "svelte/internal/disclose-version";
|
|
12
|
-
import * as f from "svelte/internal/client";
|
|
13
|
-
import { onDestroy as p, onMount as m } from "svelte";
|
|
14
|
-
//#region src/components/Views/CollectionView.svelte
|
|
15
|
-
var h = f.from_html("<div class=\"flex items-center justify-center py-12 text-center loading-container svelte-q4dz4y\"><p> </p></div>"), g = f.from_html("<div class=\"flex flex-col items-center justify-center min-h-[50vh] text-center\"><div class=\"password-card rounded-lg p-8 max-w-sm w-full svelte-q4dz4y\"><h2 class=\"password-title type-heading mb-2 svelte-q4dz4y\"> </h2> <p class=\"password-description type-body mb-6 svelte-q4dz4y\"> </p> <form class=\"flex flex-col gap-3\"><!> <!></form></div></div>"), _ = f.from_html("<div class=\"flex flex-col items-center justify-center min-h-[50vh] text-center\"><p class=\"error-text svelte-q4dz4y\"> </p></div>");
|
|
16
|
-
function v(v, y) {
|
|
17
|
-
f.push(y, !0), t("CollectionView"), f.prop(y, "organizationId", 3, "");
|
|
18
|
-
let b = f.prop(y, "onNavigateToEvent", 3, void 0), x = f.prop(y, "password", 3, void 0);
|
|
19
|
-
f.prop(y, "displayMode", 3, "gallery"), f.prop(y, "showViewSwitcher", 3, !0);
|
|
20
|
-
let S = f.prop(y, "labels", 3, r), C = f.prop(y, "locale", 3, void 0), w = f.prop(y, "initialCollection", 3, null), T = f.state(null), E = f.state(!0), D = f.state(null), O = f.state(!1), k = f.state(!1), A = f.state(""), j = f.state(!1), M = f.derived(() => f.get(T) ? n(f.get(T)) : null), N = 0;
|
|
21
|
-
async function P(e, t = !1) {
|
|
22
|
-
if (!f.get(O)) return;
|
|
23
|
-
let n = ++N;
|
|
24
|
-
if (!y.collectionId) {
|
|
25
|
-
f.set(D, S().noCollectionIdProvided || "No collection ID provided", !0), f.set(E, !1);
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
f.set(E, !0), f.set(D, null), f.set(j, !1);
|
|
29
|
-
try {
|
|
30
|
-
let r = await a(y.collectionId, e);
|
|
31
|
-
if (!f.get(O) || n !== N) return;
|
|
32
|
-
if (r) {
|
|
33
|
-
if (r.passwordRequired || r.error?.code === "PASSWORD_REQUIRED") {
|
|
34
|
-
f.set(k, !0), t && d("collection", y.collectionId), f.set(E, !1);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
f.set(T, r, !0), f.set(k, !1), l("collection", y.collectionId, e);
|
|
38
|
-
} else {
|
|
39
|
-
if (e) {
|
|
40
|
-
f.set(k, !0), t ? d("collection", y.collectionId) : f.set(j, !0), f.set(E, !1);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
f.set(D, S().failedToLoadCollection || "Failed to load collection", !0);
|
|
44
|
-
}
|
|
45
|
-
} catch (e) {
|
|
46
|
-
if (f.get(O) && n === N) {
|
|
47
|
-
let n = e.message || "";
|
|
48
|
-
n.includes("401") || n.includes("403") || n.includes("password") ? (f.set(k, !0), t && d("collection", y.collectionId)) : f.set(D, n || S().failedToLoadCollection || "Failed to load collection", !0);
|
|
49
|
-
}
|
|
50
|
-
} finally {
|
|
51
|
-
f.get(O) && n === N && f.set(E, !1);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function F(e) {
|
|
55
|
-
return !!(e && String(e.id) === String(y.collectionId) && e.visibility === "public" && Array.isArray(e.events) && !e.passwordRequired && !e.error);
|
|
56
|
-
}
|
|
57
|
-
function I(e) {
|
|
58
|
-
e.preventDefault(), f.get(A).trim() && P(f.get(A));
|
|
59
|
-
}
|
|
60
|
-
function L(e) {
|
|
61
|
-
b() && e.id ? b()(Number(e.id), e.slug) : s(c("/[id]/[slug]", {
|
|
62
|
-
id: String(e.id),
|
|
63
|
-
slug: String(e.slug)
|
|
64
|
-
}));
|
|
65
|
-
}
|
|
66
|
-
m(() => {
|
|
67
|
-
f.set(O, !0);
|
|
68
|
-
let e = x() ? void 0 : u("collection", y.collectionId);
|
|
69
|
-
if (!x() && !e && F(w())) {
|
|
70
|
-
f.set(T, w()), f.set(E, !1);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
P(x() ?? e, !!e);
|
|
74
|
-
}), p(() => {
|
|
75
|
-
f.set(O, !1);
|
|
76
|
-
});
|
|
77
|
-
var R = f.comment(), z = f.first_child(R), B = (e) => {
|
|
78
|
-
var t = h(), n = f.child(t), r = f.child(n, !0);
|
|
79
|
-
f.reset(n), f.reset(t), f.template_effect(() => f.set_text(r, S().loadingCollection || "Loading collection...")), f.append(e, t);
|
|
80
|
-
}, V = (e) => {
|
|
81
|
-
var t = g(), n = f.child(t), r = f.child(n), a = f.child(r, !0);
|
|
82
|
-
f.reset(r);
|
|
83
|
-
var s = f.sibling(r, 2), c = f.child(s, !0);
|
|
84
|
-
f.reset(s);
|
|
85
|
-
var l = f.sibling(s, 2), u = f.child(l);
|
|
86
|
-
{
|
|
87
|
-
let e = f.derived(() => S().enterPassword || "Enter password"), t = f.derived(() => f.get(j) ? S().incorrectPassword || "Incorrect password. Please try again" : "");
|
|
88
|
-
o(u, {
|
|
89
|
-
get placeholder() {
|
|
90
|
-
return f.get(e);
|
|
91
|
-
},
|
|
92
|
-
get error() {
|
|
93
|
-
return f.get(t);
|
|
94
|
-
},
|
|
95
|
-
get value() {
|
|
96
|
-
return f.get(A);
|
|
97
|
-
},
|
|
98
|
-
set value(e) {
|
|
99
|
-
f.set(A, e, !0);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
var d = f.sibling(u, 2);
|
|
104
|
-
i(d, {
|
|
105
|
-
variant: "default",
|
|
106
|
-
type: "submit",
|
|
107
|
-
children: (e, t) => {
|
|
108
|
-
f.next();
|
|
109
|
-
var n = f.text();
|
|
110
|
-
f.template_effect(() => f.set_text(n, S().viewCollection || "View collection")), f.append(e, n);
|
|
111
|
-
},
|
|
112
|
-
$$slots: { default: !0 }
|
|
113
|
-
}), f.reset(l), f.reset(n), f.reset(t), f.template_effect(() => {
|
|
114
|
-
f.set_text(a, S().collectionPrivateTitle || "This collection is private"), f.set_text(c, S().collectionPrivateDescription || "Please enter the password to view this collection");
|
|
115
|
-
}), f.event("submit", l, I), f.append(e, t);
|
|
116
|
-
}, H = (e) => {
|
|
117
|
-
var t = _(), n = f.child(t), r = f.child(n);
|
|
118
|
-
f.reset(n), f.reset(t), f.template_effect(() => f.set_text(r, `${(S().errorPrefix || "Error:") ?? ""} ${f.get(D) ?? ""}`)), f.append(e, t);
|
|
119
|
-
}, U = (t) => {
|
|
120
|
-
e(t, {
|
|
121
|
-
get event() {
|
|
122
|
-
return f.get(M);
|
|
123
|
-
},
|
|
124
|
-
onCollectionEventClick: L,
|
|
125
|
-
get labels() {
|
|
126
|
-
return S();
|
|
127
|
-
},
|
|
128
|
-
get locale() {
|
|
129
|
-
return C();
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
f.if(z, (e) => {
|
|
134
|
-
f.get(E) ? e(B) : f.get(k) ? e(V, 1) : f.get(D) ? e(H, 2) : f.get(M) && e(U, 3);
|
|
135
|
-
}), f.append(v, R), f.pop();
|
|
136
|
-
}
|
|
137
|
-
//#endregion
|
|
138
|
-
export { v as default };
|