@museumwnf/viewer-layout 3.4.0 → 3.5.0

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.
@@ -0,0 +1,762 @@
1
+ import { r as e } from "./chrome-DPuPeWzV.js";
2
+ import { c as t, d as n, n as r } from "./GlossaryPopover-DcptyNWI.js";
3
+ import { t as i } from "./RecordView-C9rP8TyQ.js";
4
+ import { t as a } from "./SiteShell-4vV2jIzf.js";
5
+ import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as f, createTextVNode as p, createVNode as m, guardReactiveProps as h, normalizeClass as g, normalizeProps as _, normalizeStyle as v, openBlock as y, ref as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useSlots as T, watch as E, withCtx as D } from "vue";
6
+ import { byId as O, loadEntities as k, removeEndingPoint as A, renderBlock as j, renderInline as M, renderPlain as N, useDataPackage as P, useI18n as F, useSection as ee, useSiteConfig as I } from "@museumwnf/viewer-core";
7
+ //#region src/standalone/Banner.vue
8
+ var L = {
9
+ key: 0,
10
+ class: "mwnf-standalone-banner__title"
11
+ }, R = {
12
+ __name: "Banner",
13
+ props: {
14
+ image: {
15
+ type: String,
16
+ default: ""
17
+ },
18
+ title: {
19
+ type: String,
20
+ default: ""
21
+ }
22
+ },
23
+ setup(e) {
24
+ return (t, n) => (y(), u("div", {
25
+ class: "mwnf-standalone-banner",
26
+ style: v(e.image ? { backgroundImage: `url(${JSON.stringify(e.image)})` } : void 0)
27
+ }, [e.title ? (y(), u("h1", L, [d("span", null, C(e.title), 1)])) : l("", !0)], 4));
28
+ }
29
+ };
30
+ //#endregion
31
+ //#region src/standalone/chrome.js
32
+ function z() {
33
+ let t = I();
34
+ return (n) => e(t.chrome, n);
35
+ }
36
+ function B(e, t) {
37
+ return !e || typeof e == "string" ? e ?? "" : e[t] ?? e.en ?? Object.values(e)[0] ?? "";
38
+ }
39
+ function V(e = /* @__PURE__ */ new Date()) {
40
+ let t = new Date(e.getFullYear(), 0, 1);
41
+ return Math.round((new Date(e.getFullYear(), e.getMonth(), e.getDate()) - t) / 864e5);
42
+ }
43
+ function H(e, t = /* @__PURE__ */ new Date()) {
44
+ return e?.length ? e[V(t) % e.length] : null;
45
+ }
46
+ function U(e) {
47
+ let [t, ...n] = String(e ?? "").split("*")[0].trim().split(";");
48
+ return !t || n.length < 5 ? "" : [
49
+ "mwnf3",
50
+ `${t}s`,
51
+ ...n.slice(0, n.length - 1)
52
+ ].join(":");
53
+ }
54
+ //#endregion
55
+ //#region src/standalone/Sponsors.vue
56
+ var te = { class: "mwnf-standalone-sponsors" }, ne = {
57
+ key: 0,
58
+ class: "mwnf-standalone-sponsors__text"
59
+ }, re = ["innerHTML"], ie = { key: 1 }, ae = ["innerHTML"], W = {
60
+ key: 1,
61
+ class: "mwnf-standalone-sponsors__title"
62
+ }, G = {
63
+ key: 2,
64
+ class: "mwnf-standalone-sponsors__logos"
65
+ }, K = {
66
+ key: 0,
67
+ class: "mwnf-standalone-sponsors__note"
68
+ }, q = ["src", "alt"], J = ["innerHTML"], oe = ["href"], se = ["src", "alt"], ce = ["src", "alt"], le = {
69
+ key: 3,
70
+ class: "mwnf-standalone-sponsors__links"
71
+ }, Y = {
72
+ __name: "Sponsors",
73
+ props: { columns: {
74
+ type: Array,
75
+ default: () => []
76
+ } },
77
+ setup(e) {
78
+ let t = e, { t: r } = F(), i = z(), a = s(() => t.columns.map((e, t) => ({
79
+ key: t,
80
+ width: e.width ?? null,
81
+ lead: e.lead ? M(r(e.lead)) : "",
82
+ text: e.text ? M(r(e.text)) : "",
83
+ break: !!e.break,
84
+ title: e.title ? r(e.title) : "",
85
+ logos: (e.logos ?? []).map((e) => ({
86
+ src: i(e.src) ?? "",
87
+ alt: e.alt ? r(e.alt) : "",
88
+ href: e.href ?? "",
89
+ note: e.note ? j(r(e.note)) : ""
90
+ })),
91
+ links: (e.links ?? []).map((e) => ({
92
+ ...e,
93
+ label: r(e.label)
94
+ }))
95
+ })));
96
+ return (e, t) => (y(), u("div", te, [(y(!0), u(o, null, x(a.value, (e) => (y(), u("div", {
97
+ key: e.key,
98
+ class: "mwnf-standalone-sponsors__column",
99
+ style: v(e.width ? { flexGrow: e.width } : void 0)
100
+ }, [
101
+ e.lead || e.text ? (y(), u("p", ne, [
102
+ e.lead ? (y(), u("i", {
103
+ key: 0,
104
+ innerHTML: e.lead
105
+ }, null, 8, re)) : l("", !0),
106
+ e.lead && e.break ? (y(), u("br", ie)) : e.lead && e.text ? (y(), u(o, { key: 2 }, [p(C(" "))], 64)) : l("", !0),
107
+ e.text ? (y(), u("span", {
108
+ key: 3,
109
+ innerHTML: e.text
110
+ }, null, 8, ae)) : l("", !0)
111
+ ])) : l("", !0),
112
+ e.title ? (y(), u("p", W, C(e.title), 1)) : l("", !0),
113
+ e.logos.length ? (y(), u("ul", G, [(y(!0), u(o, null, x(e.logos, (e) => (y(), u("li", { key: e.src }, [e.note ? (y(), u("details", K, [d("summary", null, [d("img", {
114
+ src: e.src,
115
+ alt: e.alt
116
+ }, null, 8, q)]), d("div", {
117
+ class: "mwnf-standalone-sponsors__note-body",
118
+ innerHTML: e.note
119
+ }, null, 8, J)])) : e.href ? (y(), u("a", {
120
+ key: 1,
121
+ href: e.href,
122
+ target: "_blank",
123
+ rel: "noopener"
124
+ }, [d("img", {
125
+ src: e.src,
126
+ alt: e.alt
127
+ }, null, 8, se)], 8, oe)) : (y(), u("img", {
128
+ key: 2,
129
+ src: e.src,
130
+ alt: e.alt
131
+ }, null, 8, ce))]))), 128))])) : l("", !0),
132
+ e.links.length ? (y(), u("ul", le, [(y(!0), u(o, null, x(e.links, (e) => (y(), u("li", { key: e.label }, [m(n, {
133
+ to: e.to,
134
+ href: e.href,
135
+ external: !!e.external
136
+ }, {
137
+ default: D(() => [p(C(e.label), 1)]),
138
+ _: 2
139
+ }, 1032, [
140
+ "to",
141
+ "href",
142
+ "external"
143
+ ])]))), 128))])) : l("", !0)
144
+ ], 4))), 128))]));
145
+ }
146
+ }, ue = ["src"], de = {
147
+ __name: "Shell",
148
+ props: {
149
+ language: {
150
+ type: String,
151
+ default: "en"
152
+ },
153
+ languages: {
154
+ type: Array,
155
+ default: () => []
156
+ }
157
+ },
158
+ emits: ["update:language"],
159
+ setup(t, { emit: n }) {
160
+ let r = t, i = n, { t: o, locale: l } = F(), u = I(), p = ee(), h = s(() => u.standalone ?? {}), _ = s(() => u.navigation ?? {}), v = s(() => p.value === "home"), b = s(() => h.value.areas?.[p.value] ?? null), x = (t) => e(u.chrome, B(t, l.value)), C = s(() => {
161
+ let e = h.value.logo ?? {}, t = x(b.value?.logo ?? e.src);
162
+ return t ? {
163
+ logo: t,
164
+ alt: e.alt ?? ""
165
+ } : null;
166
+ }), T = s(() => x(h.value.logo?.print)), E = s(() => (h.value.headerLinks ?? []).filter((e) => !e.on || e.on === "all" || e.on === (v.value ? "home" : "inner"))), O = s(() => {
167
+ let e = {
168
+ ...h.value.banner ?? {},
169
+ ...b.value?.banner ?? {}
170
+ };
171
+ return x(v.value ? e.home : e.inner) ?? "";
172
+ }), k = s(() => {
173
+ let e = _.value.sectionTitles?.[p.value];
174
+ return e ? o(e) : "";
175
+ }), A = s(() => !v.value && !!(O.value || k.value)), j = s(() => {
176
+ let e = h.value.sponsors;
177
+ return e?.columns?.length && (e.on === "all" || v.value) ? e : null;
178
+ }), M = s(() => ({
179
+ navigation: {
180
+ ..._.value,
181
+ headerLinks: E.value,
182
+ sectionTitles: {},
183
+ ...h.value.languages === !1 ? { languages: [] } : {}
184
+ },
185
+ banner: null,
186
+ ...C.value ? { brand: C.value } : {}
187
+ })), N = (/* @__PURE__ */ new Date()).getFullYear(), P = s(() => h.value.copyright ? `${o(h.value.copyright)} ${N}` : ""), L = s(() => [
188
+ "mwnf-standalone",
189
+ v.value ? "mwnf-standalone--home" : "mwnf-standalone--inner",
190
+ b.value?.class ?? ""
191
+ ]);
192
+ return (e, t) => (y(), c(a, {
193
+ class: g(L.value),
194
+ config: M.value,
195
+ languages: h.value.languages === !1 ? [] : r.languages,
196
+ language: r.language,
197
+ "language-placement": "header",
198
+ "language-style": "select",
199
+ "header-home": h.value.logo?.href ?? "",
200
+ "header-title": v.value ? "" : h.value.heading ? w(o)(h.value.heading) : "",
201
+ "header-title-href": "#/",
202
+ "banner-image": v.value ? O.value : "",
203
+ "footer-text": P.value || void 0,
204
+ "onUpdate:language": t[0] ||= (e) => i("update:language", e)
205
+ }, f({
206
+ default: D(() => [S(e.$slots, "default")]),
207
+ _: 2
208
+ }, [
209
+ A.value ? {
210
+ name: "banner",
211
+ fn: D(() => [m(R, {
212
+ image: O.value,
213
+ title: k.value
214
+ }, null, 8, ["image", "title"])]),
215
+ key: "0"
216
+ } : void 0,
217
+ T.value ? {
218
+ name: "notice",
219
+ fn: D(() => [d("img", {
220
+ class: "mwnf-standalone__print-logo",
221
+ src: T.value,
222
+ alt: ""
223
+ }, null, 8, ue)]),
224
+ key: "1"
225
+ } : void 0,
226
+ j.value ? {
227
+ name: "sponsors",
228
+ fn: D(() => [m(Y, { columns: j.value.columns }, null, 8, ["columns"])]),
229
+ key: "2"
230
+ } : void 0
231
+ ]), 1032, [
232
+ "class",
233
+ "config",
234
+ "languages",
235
+ "language",
236
+ "header-home",
237
+ "header-title",
238
+ "banner-image",
239
+ "footer-text"
240
+ ]));
241
+ }
242
+ }, fe = {
243
+ key: 0,
244
+ class: "mwnf-standalone-highlight"
245
+ }, pe = ["src", "alt"], me = {
246
+ key: 1,
247
+ class: "mwnf-standalone-highlight__heading"
248
+ }, he = { class: "mwnf-standalone-highlight__lines" }, ge = ["innerHTML"], _e = {
249
+ key: 2,
250
+ class: "mwnf-standalone-highlight__place"
251
+ }, ve = {
252
+ key: 3,
253
+ class: "mwnf-standalone-highlight__action"
254
+ }, X = {
255
+ __name: "TodayHighlight",
256
+ props: {
257
+ record: {
258
+ type: Object,
259
+ default: null
260
+ },
261
+ text: {
262
+ type: Object,
263
+ default: () => ({})
264
+ },
265
+ country: {
266
+ type: String,
267
+ default: ""
268
+ },
269
+ to: {
270
+ type: [String, Object],
271
+ default: null
272
+ },
273
+ heading: {
274
+ type: String,
275
+ default: ""
276
+ },
277
+ alsoKnownAs: {
278
+ type: String,
279
+ default: ""
280
+ },
281
+ action: {
282
+ type: String,
283
+ default: ""
284
+ }
285
+ },
286
+ setup(e) {
287
+ let t = e, { t: r } = F(), i = (e) => A(Array.isArray(e) ? e.join("; ") : e), a = s(() => {
288
+ let e = t.text ?? {}, n = [], a = i(e.name ?? t.record?.internal_name ?? "");
289
+ a && n.push(M(a));
290
+ let o = i(e.alternate_name);
291
+ o && n.push(`${t.alsoKnownAs ? `${r(t.alsoKnownAs)} ` : ""}${M(o)}`);
292
+ let s = [i(e.dates), i(e.dynasty)].filter(Boolean).join(", ");
293
+ s && n.push(M(s));
294
+ for (let t of ["materials", "holder"]) {
295
+ let r = i(e[t]);
296
+ r && n.push(M(r));
297
+ }
298
+ return n;
299
+ }), f = s(() => [i(t.text?.location), t.country].filter(Boolean).join(", ")), h = s(() => t.record?.images?.[0]?.url ?? ""), g = s(() => N(String(t.text?.name ?? t.record?.internal_name ?? "")));
300
+ return (t, i) => e.record ? (y(), u("div", fe, [
301
+ h.value ? (y(), c(n, {
302
+ key: 0,
303
+ class: "mwnf-standalone-highlight__media",
304
+ to: e.to
305
+ }, {
306
+ default: D(() => [d("img", {
307
+ class: "mwnf-standalone-highlight__image",
308
+ src: h.value,
309
+ alt: g.value
310
+ }, null, 8, pe)]),
311
+ _: 1
312
+ }, 8, ["to"])) : l("", !0),
313
+ e.heading ? (y(), u("p", me, [d("strong", null, C(w(r)(e.heading)), 1)])) : l("", !0),
314
+ d("p", he, [(y(!0), u(o, null, x(a.value, (e, t) => (y(), u(o, { key: t }, [d("span", { innerHTML: e }, null, 8, ge), i[0] ||= d("br", null, null, -1)], 64))), 128))]),
315
+ f.value ? (y(), u("p", _e, C(w(N)(f.value)), 1)) : l("", !0),
316
+ e.action ? (y(), u("p", ve, [m(n, { to: e.to }, {
317
+ default: D(() => [p(C(w(r)(e.action)), 1)]),
318
+ _: 1
319
+ }, 8, ["to"])])) : l("", !0)
320
+ ])) : l("", !0);
321
+ }
322
+ }, ye = {
323
+ key: 0,
324
+ class: "mwnf-standalone-tiles"
325
+ }, be = {
326
+ key: 0,
327
+ class: "mwnf-standalone-tiles__caption"
328
+ }, xe = { class: "mwnf-standalone-tiles__grid" }, Se = ["src", "alt"], Ce = {
329
+ key: 0,
330
+ class: "mwnf-standalone-tiles__label"
331
+ }, Z = {
332
+ __name: "TileGrid",
333
+ props: {
334
+ caption: {
335
+ type: String,
336
+ default: ""
337
+ },
338
+ items: {
339
+ type: Array,
340
+ default: () => []
341
+ }
342
+ },
343
+ setup(e) {
344
+ let t = e, { t: r } = F(), i = z(), a = s(() => t.items.map((e) => ({
345
+ ...e,
346
+ image: i(e.image) ?? "",
347
+ label: e.label ? r(e.label) : ""
348
+ })));
349
+ return (t, i) => a.value.length ? (y(), u("section", ye, [e.caption ? (y(), u("p", be, C(w(r)(e.caption)), 1)) : l("", !0), d("ul", xe, [(y(!0), u(o, null, x(a.value, (e) => (y(), u("li", {
350
+ key: e.image,
351
+ class: "mwnf-standalone-tiles__tile"
352
+ }, [m(n, {
353
+ to: e.to,
354
+ href: e.href,
355
+ class: "mwnf-standalone-tiles__link"
356
+ }, {
357
+ default: D(() => [d("img", {
358
+ class: "mwnf-standalone-tiles__image",
359
+ src: e.image,
360
+ alt: e.label
361
+ }, null, 8, Se), e.label ? (y(), u("span", Ce, C(e.label), 1)) : l("", !0)]),
362
+ _: 2
363
+ }, 1032, ["to", "href"])]))), 128))])])) : l("", !0);
364
+ }
365
+ }, we = { class: "mwnf-standalone-home" }, Te = {
366
+ key: 0,
367
+ class: "mwnf-standalone-home__links"
368
+ }, Ee = { key: 1 }, De = {
369
+ __name: "Home",
370
+ props: { home: {
371
+ type: Object,
372
+ default: null
373
+ } },
374
+ setup(e) {
375
+ let t = e, { t: r, locale: i } = F(), a = I(), d = s(() => t.home ?? a.standalone?.home ?? {}), f = s(() => (d.value.links ?? []).map((e) => ({
376
+ ...e,
377
+ label: r(e.label),
378
+ prefix: e.prefix ? r(e.prefix) : "",
379
+ title: e.title ? r(e.title) : void 0
380
+ }))), h = s(() => d.value.highlight ?? null), _ = P();
381
+ h.value?.list?.length && (k(["items", "countries"]), E(i, (e) => {
382
+ _.loadTranslations("items", e), _.loadTranslations("countries", e);
383
+ }, { immediate: !0 }));
384
+ let v = O("items", "backward_compatibility"), b = s(() => {
385
+ let e = h.value?.list ?? [], t = e.indexOf(H(e));
386
+ for (let n = 0; t >= 0 && n < e.length; n++) {
387
+ let r = v.value.get(U(e[(t + n) % e.length]));
388
+ if (r) return r;
389
+ }
390
+ return null;
391
+ }), w = s(() => b.value ? _.tr("items", b.value.id, i.value, "en") : {}), T = s(() => {
392
+ let e = b.value?.country_id;
393
+ return e ? _.tr("countries", e, i.value, "en").name ?? "" : "";
394
+ }), A = s(() => b.value ? {
395
+ name: h.value.route ?? "item",
396
+ params: { id: b.value.id }
397
+ } : null);
398
+ return (e, t) => (y(), u("div", we, [
399
+ f.value.length ? (y(), u("ul", Te, [(y(!0), u(o, null, x(f.value, (e) => (y(), u("li", {
400
+ key: e.label,
401
+ class: g({ "mwnf-standalone-home__link--gap": e.gap })
402
+ }, [m(n, {
403
+ to: e.to,
404
+ href: e.href,
405
+ external: !!e.external,
406
+ title: e.title
407
+ }, {
408
+ default: D(() => [e.prefix ? (y(), u(o, { key: 0 }, [p(C(`${e.prefix} `), 1)], 64)) : l("", !0), e.italic ? (y(), u("i", Ee, C(e.label), 1)) : (y(), u(o, { key: 2 }, [p(C(e.label), 1)], 64))]),
409
+ _: 2
410
+ }, 1032, [
411
+ "to",
412
+ "href",
413
+ "external",
414
+ "title"
415
+ ])], 2))), 128))])) : l("", !0),
416
+ h.value ? (y(), c(X, {
417
+ key: 1,
418
+ record: b.value,
419
+ text: w.value,
420
+ country: T.value,
421
+ to: A.value,
422
+ heading: h.value.heading ?? "",
423
+ "also-known-as": h.value.alsoKnownAs ?? "",
424
+ action: h.value.action ?? ""
425
+ }, null, 8, [
426
+ "record",
427
+ "text",
428
+ "country",
429
+ "to",
430
+ "heading",
431
+ "also-known-as",
432
+ "action"
433
+ ])) : l("", !0),
434
+ d.value.tiles ? (y(), c(Z, {
435
+ key: 2,
436
+ caption: d.value.tiles.caption ?? "",
437
+ items: d.value.tiles.items ?? []
438
+ }, null, 8, ["caption", "items"])) : l("", !0),
439
+ S(e.$slots, "default")
440
+ ]));
441
+ }
442
+ }, Oe = { class: "mwnf-standalone-related" }, ke = { class: "mwnf-standalone-related__heading" }, Ae = { class: "mwnf-standalone-related__group-heading" }, je = { class: "mwnf-standalone-related__thumbs" }, Me = ["src", "alt"], Ne = ["innerHTML"], Pe = {
443
+ key: 0,
444
+ class: "mwnf-standalone-related__download"
445
+ }, Fe = { class: "mwnf-standalone-related__download-heading" }, Q = {
446
+ __name: "RelatedContent",
447
+ props: {
448
+ heading: {
449
+ type: String,
450
+ default: "record.related.title"
451
+ },
452
+ records: {
453
+ type: Array,
454
+ default: () => []
455
+ },
456
+ groups: {
457
+ type: Array,
458
+ default: () => []
459
+ },
460
+ download: {
461
+ type: Object,
462
+ default: null
463
+ }
464
+ },
465
+ setup(e) {
466
+ let t = e, { t: r } = F(), i = s(() => t.groups.map((e) => ({
467
+ heading: r(e.heading),
468
+ rows: t.records.filter((t) => !e.type || t.badge === e.type)
469
+ })).filter((e) => e.rows.length));
470
+ function a() {
471
+ window.print();
472
+ }
473
+ return (t, s) => (y(), u("aside", Oe, [
474
+ d("p", ke, [d("strong", null, C(w(r)(e.heading)), 1)]),
475
+ (y(!0), u(o, null, x(i.value, (e) => (y(), u("div", {
476
+ key: e.heading,
477
+ class: "mwnf-standalone-related__group"
478
+ }, [d("p", Ae, C(e.heading), 1), d("ul", je, [(y(!0), u(o, null, x(e.rows, (e) => (y(), u("li", { key: e.id }, [m(n, {
479
+ to: e.to,
480
+ title: e.imageAlt
481
+ }, {
482
+ default: D(() => [e.image ? (y(), u("img", {
483
+ key: 0,
484
+ src: e.image,
485
+ alt: e.imageAlt
486
+ }, null, 8, Me)) : (y(), u("span", {
487
+ key: 1,
488
+ innerHTML: e.name
489
+ }, null, 8, Ne))]),
490
+ _: 2
491
+ }, 1032, ["to", "title"])]))), 128))])]))), 128)),
492
+ S(t.$slots, "default"),
493
+ e.download ? (y(), u("div", Pe, [d("p", Fe, C(w(r)(e.download.heading)), 1), d("button", {
494
+ type: "button",
495
+ class: "mwnf-standalone-related__print",
496
+ onClick: a
497
+ }, C(w(r)(e.download.print)), 1)])) : l("", !0)
498
+ ]));
499
+ }
500
+ }, Ie = { class: "mwnf-standalone-item__top" }, Le = { class: "mwnf-standalone-item__left" }, Re = {
501
+ key: 0,
502
+ class: "mwnf-standalone-item__back"
503
+ }, ze = {
504
+ __name: "ItemSheet",
505
+ props: {
506
+ spec: {
507
+ type: Object,
508
+ required: !0
509
+ },
510
+ id: {
511
+ type: String,
512
+ required: !0
513
+ },
514
+ back: {
515
+ type: Array,
516
+ default: () => []
517
+ },
518
+ related: {
519
+ type: Object,
520
+ default: () => ({})
521
+ }
522
+ },
523
+ setup(e) {
524
+ let a = e, { t: g } = F(), v = T(), b = s(() => ({
525
+ ...a.spec,
526
+ media: () => []
527
+ }));
528
+ function w({ record: e, text: t, language: n }) {
529
+ if (a.spec.media) return a.spec.media(e, {
530
+ record: e,
531
+ text: t,
532
+ language: n
533
+ });
534
+ let r = N(String(t?.name ?? e?.internal_name ?? ""));
535
+ return (e?.images ?? []).map((e) => ({
536
+ url: e.url,
537
+ alt: e.captions?.[n] ?? r,
538
+ caption: e.captions?.[n] ?? e.captions?.en ?? "",
539
+ photographer: e.photographer ?? "",
540
+ copyright: e.copyright ?? ""
541
+ }));
542
+ }
543
+ let E = s(() => a.back.map((e) => ({
544
+ ...e,
545
+ label: g(e.label)
546
+ }))), O = /* @__PURE__ */ new Set([
547
+ "header",
548
+ "before-sheet",
549
+ "related",
550
+ "sidebar",
551
+ "aside"
552
+ ]), k = s(() => Object.keys(v).filter((e) => !O.has(e)));
553
+ function A() {
554
+ window.history.back();
555
+ }
556
+ return (a, s) => (y(), c(i, {
557
+ spec: b.value,
558
+ id: e.id,
559
+ class: "mwnf-standalone-item"
560
+ }, f({
561
+ header: D(({ languages: e, language: n, select: r }) => [d("div", Ie, [m(t, {
562
+ languages: e,
563
+ language: n,
564
+ onSelect: r
565
+ }, null, 8, [
566
+ "languages",
567
+ "language",
568
+ "onSelect"
569
+ ])])]),
570
+ "before-sheet": D((e) => [d("div", Le, [E.value.length ? (y(), u("p", Re, [(y(!0), u(o, null, x(E.value, (e) => (y(), u(o, { key: e.label }, [e.history ? (y(), u("button", {
571
+ key: 0,
572
+ type: "button",
573
+ class: "mwnf-standalone-item__back-link",
574
+ onClick: A
575
+ }, C(e.label), 1)) : (y(), c(n, {
576
+ key: 1,
577
+ class: "mwnf-standalone-item__back-link",
578
+ to: e.to,
579
+ href: e.href
580
+ }, {
581
+ default: D(() => [p(C(e.label), 1)]),
582
+ _: 2
583
+ }, 1032, ["to", "href"]))], 64))), 128))])) : l("", !0), m(r, { images: w(e) }, null, 8, ["images"])]), S(a.$slots, "before-sheet", _(h(e)))]),
584
+ related: D((t) => [m(Q, {
585
+ heading: e.related.heading ?? "record.related.title",
586
+ records: t.records,
587
+ groups: e.related.groups ?? [],
588
+ download: e.related.download ?? null
589
+ }, {
590
+ default: D(() => [S(a.$slots, "sidebar", _(h(t)))]),
591
+ _: 2
592
+ }, 1032, [
593
+ "heading",
594
+ "records",
595
+ "groups",
596
+ "download"
597
+ ])]),
598
+ _: 2
599
+ }, [x(k.value, (e) => ({
600
+ name: e,
601
+ fn: D((t) => [S(a.$slots, e, _(h(t)))])
602
+ }))]), 1032, ["spec", "id"]));
603
+ }
604
+ }, Be = ["innerHTML"], Ve = {
605
+ key: 0,
606
+ class: "mwnf-standalone-page__link"
607
+ }, $ = {
608
+ key: 1,
609
+ class: "mwnf-standalone-page__print"
610
+ }, He = {
611
+ __name: "TextPage",
612
+ props: {
613
+ body: {
614
+ type: String,
615
+ required: !0
616
+ },
617
+ link: {
618
+ type: Object,
619
+ default: null
620
+ },
621
+ print: {
622
+ type: String,
623
+ default: ""
624
+ },
625
+ dropCap: {
626
+ type: Boolean,
627
+ default: !1
628
+ }
629
+ },
630
+ setup(e) {
631
+ let t = e, { t: r } = F(), i = s(() => j(r(t.body)));
632
+ function a() {
633
+ window.print();
634
+ }
635
+ return (t, o) => (y(), u("article", { class: g(["mwnf-standalone-page", { "mwnf-standalone-page--drop-cap": e.dropCap }]) }, [
636
+ d("div", {
637
+ class: "mwnf-standalone-page__body",
638
+ innerHTML: i.value
639
+ }, null, 8, Be),
640
+ e.link ? (y(), u("p", Ve, [m(n, {
641
+ to: e.link.to,
642
+ href: e.link.href
643
+ }, {
644
+ default: D(() => [d("strong", null, C(e.link.text ?? w(r)(e.link.label)), 1)]),
645
+ _: 1
646
+ }, 8, ["to", "href"])])) : l("", !0),
647
+ e.print ? (y(), u("p", $, [d("button", {
648
+ type: "button",
649
+ class: "mwnf-standalone-page__print-button",
650
+ onClick: a
651
+ }, C(w(r)(e.print)), 1)])) : l("", !0)
652
+ ], 2));
653
+ }
654
+ }, Ue = {
655
+ key: 0,
656
+ class: "mwnf-standalone-subnav"
657
+ }, We = { class: "mwnf-standalone-subnav__tabs" }, Ge = {
658
+ __name: "SubNav",
659
+ props: {
660
+ tabs: {
661
+ type: Array,
662
+ default: () => []
663
+ },
664
+ aside: {
665
+ type: Object,
666
+ default: null
667
+ }
668
+ },
669
+ setup(e) {
670
+ let t = e, { t: r } = F(), i = s(() => t.tabs.map((e) => ({
671
+ ...e,
672
+ label: r(e.label)
673
+ })));
674
+ return (t, a) => i.value.length || e.aside ? (y(), u("nav", Ue, [d("ul", We, [(y(!0), u(o, null, x(i.value, (e) => (y(), u("li", { key: e.label }, [m(n, {
675
+ to: e.to,
676
+ href: e.href,
677
+ class: g(["mwnf-standalone-subnav__tab", { "mwnf-standalone-subnav__tab--active": e.active }]),
678
+ "aria-current": e.active ? "page" : void 0
679
+ }, {
680
+ default: D(() => [p(C(e.label), 1)]),
681
+ _: 2
682
+ }, 1032, [
683
+ "to",
684
+ "href",
685
+ "class",
686
+ "aria-current"
687
+ ])]))), 128))]), e.aside ? (y(), c(n, {
688
+ key: 0,
689
+ to: e.aside.to,
690
+ href: e.aside.href,
691
+ class: "mwnf-standalone-subnav__aside"
692
+ }, {
693
+ default: D(() => [p(C(w(r)(e.aside.label)), 1)]),
694
+ _: 1
695
+ }, 8, ["to", "href"])) : l("", !0)])) : l("", !0);
696
+ }
697
+ }, Ke = ["disabled", "aria-label"], qe = { class: "mwnf-standalone-slider__track" }, Je = ["src", "alt"], Ye = {
698
+ key: 0,
699
+ class: "mwnf-standalone-slider__label"
700
+ }, Xe = ["disabled", "aria-label"], Ze = {
701
+ __name: "Slider",
702
+ props: {
703
+ slides: {
704
+ type: Array,
705
+ default: () => []
706
+ },
707
+ visible: {
708
+ type: Number,
709
+ default: 5
710
+ },
711
+ previousLabel: {
712
+ type: String,
713
+ default: "core.pagination.previous"
714
+ },
715
+ nextLabel: {
716
+ type: String,
717
+ default: "core.pagination.next"
718
+ }
719
+ },
720
+ setup(e) {
721
+ let t = e, { t: r } = F(), i = z(), a = b(0), c = s(() => Math.max(0, t.slides.length - t.visible)), f = s(() => t.slides.slice(a.value, a.value + t.visible).map((e) => ({
722
+ ...e,
723
+ image: i(e.image) ?? "",
724
+ label: e.label ? r(e.label) : ""
725
+ })));
726
+ return (t, i) => e.slides.length ? (y(), u("div", {
727
+ key: 0,
728
+ class: "mwnf-standalone-slider",
729
+ style: v({ "--mwnf-standalone-slider-count": e.visible })
730
+ }, [
731
+ d("button", {
732
+ type: "button",
733
+ class: "mwnf-standalone-slider__button",
734
+ disabled: a.value === 0,
735
+ "aria-label": w(r)(e.previousLabel),
736
+ onClick: i[0] ||= (e) => a.value = Math.max(0, a.value - 1)
737
+ }, "‹", 8, Ke),
738
+ d("ul", qe, [(y(!0), u(o, null, x(f.value, (e) => (y(), u("li", {
739
+ key: e.image,
740
+ class: "mwnf-standalone-slider__slide"
741
+ }, [m(n, {
742
+ to: e.to,
743
+ href: e.href
744
+ }, {
745
+ default: D(() => [d("img", {
746
+ src: e.image,
747
+ alt: e.label
748
+ }, null, 8, Je), e.label ? (y(), u("span", Ye, C(e.label), 1)) : l("", !0)]),
749
+ _: 2
750
+ }, 1032, ["to", "href"])]))), 128))]),
751
+ d("button", {
752
+ type: "button",
753
+ class: "mwnf-standalone-slider__button",
754
+ disabled: a.value >= c.value,
755
+ "aria-label": w(r)(e.nextLabel),
756
+ onClick: i[1] ||= (e) => a.value = Math.min(c.value, a.value + 1)
757
+ }, "›", 8, Xe)
758
+ ], 4)) : l("", !0);
759
+ }
760
+ };
761
+ //#endregion
762
+ export { Q as RelatedContent, R as StandaloneBanner, De as StandaloneHome, ze as StandaloneItemSheet, de as StandaloneShell, Ze as StandaloneSlider, Y as StandaloneSponsors, Ge as StandaloneSubNav, He as StandaloneTextPage, Z as StandaloneTileGrid, X as TodayHighlight, B as byLanguage, V as dayOfYear, U as legacyHomeItemKey, H as pickForDay };