@museumwnf/viewer-layout 2.12.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,1174 @@
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, getCurrentInstance as c, mergeProps as l, normalizeClass as u, onBeforeUnmount as d, openBlock as f, ref as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, useId as y, useSlots as b, vModelText as x, watch as S, withCtx as C, withDirectives as w, withKeys as T, withModifiers as E } from "vue";
2
+ import { useI18n as D } from "@museumwnf/viewer-core/i18n";
3
+ import { mdInline as O, sourceUrl as ee } from "@museumwnf/viewer-core";
4
+ import { useRoute as te } from "vue-router";
5
+ //#region src/content/SmartLink.vue
6
+ var ne = [
7
+ "href",
8
+ "target",
9
+ "rel"
10
+ ], k = {
11
+ __name: "SmartLink",
12
+ props: {
13
+ to: {
14
+ type: [String, Object],
15
+ default: null
16
+ },
17
+ href: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ external: {
22
+ type: Boolean,
23
+ default: !1
24
+ }
25
+ },
26
+ setup(e) {
27
+ let r = e, a = c()?.appContext.components.RouterLink ?? null, o = t(() => !!(r.to && a)), s = t(() => r.href || (typeof r.to == "string" ? r.to : ""));
28
+ return (t, r) => o.value ? (f(), n(g(v(a)), l({
29
+ key: 0,
30
+ to: e.to
31
+ }, t.$attrs), {
32
+ default: C(() => [h(t.$slots, "default")]),
33
+ _: 3
34
+ }, 16, ["to"])) : (f(), i("a", l({
35
+ key: 1,
36
+ href: s.value || void 0,
37
+ target: e.external ? "_blank" : void 0,
38
+ rel: e.external ? "noopener" : void 0
39
+ }, t.$attrs), [h(t.$slots, "default")], 16, ne));
40
+ }
41
+ }, re = ["innerHTML"], A = ["innerHTML"], j = {
42
+ key: 1,
43
+ class: "mwnf-cards__action"
44
+ }, M = {
45
+ key: 0,
46
+ class: "mwnf-cards__image-container"
47
+ }, N = ["src", "alt"], P = { class: "mwnf-cards__content" }, F = {
48
+ key: 0,
49
+ class: "mwnf-cards__number"
50
+ }, I = ["innerHTML"], L = ["innerHTML"], R = {
51
+ key: 0,
52
+ class: "mwnf-cards__image-container"
53
+ }, z = ["src", "alt"], B = {
54
+ key: 1,
55
+ class: "mwnf-cards__number"
56
+ }, V = ["innerHTML"], H = {
57
+ key: 3,
58
+ class: "mwnf-cards__details"
59
+ }, U = { class: "mwnf-cards__summary" }, W = {
60
+ key: 0,
61
+ class: "mwnf-cards__number"
62
+ }, G = ["innerHTML"], K = {
63
+ key: 0,
64
+ class: "mwnf-cards__children"
65
+ }, q = {
66
+ __name: "SectionCards",
67
+ props: {
68
+ cards: {
69
+ type: Array,
70
+ default: () => []
71
+ },
72
+ variant: {
73
+ type: String,
74
+ default: "cards",
75
+ validate: (e) => [
76
+ "cards",
77
+ "rows",
78
+ "covers",
79
+ "accordion"
80
+ ].includes(e)
81
+ }
82
+ },
83
+ setup(t) {
84
+ return (c, l) => t.cards.length ? (f(), i("ul", {
85
+ key: 0,
86
+ class: u(["mwnf-cards", `mwnf-cards--${t.variant}`])
87
+ }, [(f(!0), i(e, null, m(t.cards, (c) => (f(), i("li", {
88
+ key: c.href ?? c.title,
89
+ class: u(["mwnf-cards__card"])
90
+ }, [t.variant === "cards" ? (f(), n(k, {
91
+ key: 0,
92
+ class: "mwnf-cards__link",
93
+ to: c.to,
94
+ href: c.href
95
+ }, {
96
+ default: C(() => [
97
+ a("span", {
98
+ class: "mwnf-cards__title",
99
+ innerHTML: v(O)(c.title)
100
+ }, null, 8, re),
101
+ c.description ? (f(), i("span", {
102
+ key: 0,
103
+ class: "mwnf-cards__text",
104
+ innerHTML: v(O)(c.description)
105
+ }, null, 8, A)) : r("", !0),
106
+ c.action ? (f(), i("span", j, _(c.action) + " →", 1)) : r("", !0)
107
+ ]),
108
+ _: 2
109
+ }, 1032, ["to", "href"])) : t.variant === "rows" ? (f(), n(k, {
110
+ key: 1,
111
+ class: "mwnf-cards__link",
112
+ to: c.to,
113
+ href: c.href
114
+ }, {
115
+ default: C(() => [c.image ? (f(), i("div", M, [a("img", {
116
+ class: "mwnf-cards__image",
117
+ src: c.image,
118
+ alt: c.alt || ""
119
+ }, null, 8, N)])) : r("", !0), a("div", P, [
120
+ c.number ? (f(), i("span", F, _(c.number), 1)) : r("", !0),
121
+ a("span", {
122
+ class: "mwnf-cards__title",
123
+ innerHTML: v(O)(c.title)
124
+ }, null, 8, I),
125
+ c.description ? (f(), i("span", {
126
+ key: 1,
127
+ class: "mwnf-cards__text",
128
+ innerHTML: v(O)(c.description)
129
+ }, null, 8, L)) : r("", !0)
130
+ ])]),
131
+ _: 2
132
+ }, 1032, ["to", "href"])) : t.variant === "covers" ? (f(), n(k, {
133
+ key: 2,
134
+ class: "mwnf-cards__link",
135
+ to: c.to,
136
+ href: c.href
137
+ }, {
138
+ default: C(() => [
139
+ c.image ? (f(), i("div", R, [a("img", {
140
+ class: "mwnf-cards__image",
141
+ src: c.image,
142
+ alt: c.alt || ""
143
+ }, null, 8, z)])) : r("", !0),
144
+ c.number ? (f(), i("span", B, _(c.number), 1)) : r("", !0),
145
+ a("span", {
146
+ class: "mwnf-cards__title",
147
+ innerHTML: v(O)(c.title)
148
+ }, null, 8, V)
149
+ ]),
150
+ _: 2
151
+ }, 1032, ["to", "href"])) : t.variant === "accordion" ? (f(), i("details", H, [a("summary", U, [c.number ? (f(), i("span", W, _(c.number), 1)) : r("", !0), a("span", {
152
+ class: "mwnf-cards__title",
153
+ innerHTML: v(O)(c.title)
154
+ }, null, 8, G)]), c.children?.length ? (f(), i("ul", K, [(f(!0), i(e, null, m(c.children, (e) => (f(), i("li", {
155
+ key: e.href ?? e.title,
156
+ class: "mwnf-cards__child"
157
+ }, [s(k, {
158
+ class: "mwnf-cards__child-link",
159
+ to: e.to,
160
+ href: e.href
161
+ }, {
162
+ default: C(() => [o(_(e.title), 1)]),
163
+ _: 2
164
+ }, 1032, ["to", "href"])]))), 128))])) : r("", !0)])) : r("", !0)]))), 128))], 2)) : r("", !0);
165
+ }
166
+ }, J = {
167
+ key: 0,
168
+ class: "mwnf-featured"
169
+ }, Y = {
170
+ key: 0,
171
+ class: "mwnf-featured__heading"
172
+ }, X = {
173
+ key: 0,
174
+ class: "mwnf-featured__media"
175
+ }, ie = ["src", "alt"], ae = { class: "mwnf-featured__body" }, oe = {
176
+ key: 0,
177
+ class: "mwnf-featured__eyebrow"
178
+ }, se = ["innerHTML"], ce = {
179
+ key: 1,
180
+ class: "mwnf-featured__action"
181
+ }, le = {
182
+ __name: "FeaturedRecord",
183
+ props: {
184
+ image: {
185
+ type: String,
186
+ default: ""
187
+ },
188
+ imageAlt: {
189
+ type: String,
190
+ default: ""
191
+ },
192
+ eyebrow: {
193
+ type: String,
194
+ default: ""
195
+ },
196
+ name: {
197
+ type: String,
198
+ default: ""
199
+ },
200
+ meta: {
201
+ type: Array,
202
+ default: () => []
203
+ },
204
+ action: {
205
+ type: String,
206
+ default: ""
207
+ },
208
+ to: {
209
+ type: [String, Object],
210
+ default: null
211
+ },
212
+ href: {
213
+ type: String,
214
+ default: ""
215
+ },
216
+ heading: {
217
+ type: String,
218
+ default: ""
219
+ }
220
+ },
221
+ setup(n) {
222
+ let o = n, c = b(), l = t(() => !!(o.name || o.image || c.default));
223
+ return (t, o) => l.value ? (f(), i("section", J, [n.heading ? (f(), i("h2", Y, _(n.heading), 1)) : r("", !0), h(t.$slots, "default", {}, () => [s(k, {
224
+ class: "mwnf-featured__link",
225
+ to: n.to,
226
+ href: n.href
227
+ }, {
228
+ default: C(() => [n.image ? (f(), i("span", X, [a("img", {
229
+ class: "mwnf-featured__image",
230
+ src: n.image,
231
+ alt: n.imageAlt,
232
+ loading: "eager"
233
+ }, null, 8, ie)])) : r("", !0), a("span", ae, [
234
+ n.eyebrow ? (f(), i("span", oe, _(n.eyebrow), 1)) : r("", !0),
235
+ a("span", {
236
+ class: "mwnf-featured__name",
237
+ innerHTML: n.name
238
+ }, null, 8, se),
239
+ (f(!0), i(e, null, m(n.meta, (e, t) => (f(), i("span", {
240
+ key: t,
241
+ class: "mwnf-featured__meta"
242
+ }, _(e), 1))), 128)),
243
+ n.action ? (f(), i("span", ce, _(n.action) + " →", 1)) : r("", !0)
244
+ ])]),
245
+ _: 1
246
+ }, 8, ["to", "href"])])])) : r("", !0);
247
+ }
248
+ }, ue = ["aria-busy"], de = {
249
+ key: 0,
250
+ class: "mwnf-list__status"
251
+ }, fe = {
252
+ key: 1,
253
+ class: "mwnf-list__rows"
254
+ }, pe = { class: "mwnf-list__thumb" }, me = ["src", "alt"], he = { class: "mwnf-list__body" }, ge = ["innerHTML"], _e = {
255
+ key: 0,
256
+ class: "mwnf-list__meta"
257
+ }, ve = {
258
+ key: 0,
259
+ class: "mwnf-list__badge"
260
+ }, ye = {
261
+ key: 2,
262
+ class: "mwnf-list__empty"
263
+ }, Z = {
264
+ __name: "RecordList",
265
+ props: {
266
+ records: {
267
+ type: Array,
268
+ default: () => []
269
+ },
270
+ loading: {
271
+ type: Boolean,
272
+ default: !1
273
+ },
274
+ loadingText: {
275
+ type: String,
276
+ default: ""
277
+ }
278
+ },
279
+ setup(t) {
280
+ let n = !!b().empty;
281
+ return (o, c) => (f(), i("div", {
282
+ class: u(["mwnf-list", { "mwnf-list--loading": t.loading }]),
283
+ "aria-busy": t.loading ? "true" : void 0
284
+ }, [t.loading && t.loadingText ? (f(), i("p", de, _(t.loadingText), 1)) : t.records.length ? (f(), i("ul", fe, [(f(!0), i(e, null, m(t.records, (t) => (f(), i("li", {
285
+ key: t.id,
286
+ class: "mwnf-list__row"
287
+ }, [s(k, {
288
+ class: "mwnf-list__link",
289
+ to: t.to,
290
+ href: t.href
291
+ }, {
292
+ default: C(() => [a("span", pe, [t.image ? (f(), i("img", {
293
+ key: 0,
294
+ src: t.image,
295
+ alt: t.imageAlt ?? "",
296
+ loading: "lazy"
297
+ }, null, 8, me)) : r("", !0)]), a("span", he, [a("span", {
298
+ class: "mwnf-list__name",
299
+ innerHTML: t.name
300
+ }, null, 8, ge), t.meta?.length || t.badge ? (f(), i("span", _e, [(f(!0), i(e, null, m(t.meta ?? [], (e, t) => (f(), i("span", {
301
+ key: t,
302
+ class: "mwnf-list__meta-item"
303
+ }, _(e), 1))), 128)), t.badge ? (f(), i("span", ve, _(t.badge), 1)) : r("", !0)])) : r("", !0)])]),
304
+ _: 2
305
+ }, 1032, ["to", "href"])]))), 128))])) : v(n) ? (f(), i("div", ye, [h(o.$slots, "empty")])) : r("", !0)], 10, ue));
306
+ }
307
+ }, be = ["aria-busy"], xe = {
308
+ key: 0,
309
+ class: "mwnf-grid__status"
310
+ }, Se = {
311
+ key: 1,
312
+ class: "mwnf-grid__tiles"
313
+ }, Ce = ["onMouseenter", "onFocusin"], we = { class: "mwnf-grid__media" }, Te = ["src", "alt"], Ee = {
314
+ key: 1,
315
+ class: "mwnf-grid__image mwnf-grid__image--empty",
316
+ "aria-hidden": "true"
317
+ }, De = { class: "mwnf-grid__card" }, Oe = ["src"], ke = { class: "mwnf-grid__card-body" }, Ae = ["innerHTML"], je = {
318
+ key: 0,
319
+ class: "mwnf-grid__badge"
320
+ }, Me = {
321
+ key: 2,
322
+ class: "mwnf-grid__empty"
323
+ }, Q = {
324
+ __name: "RecordGrid",
325
+ props: {
326
+ records: {
327
+ type: Array,
328
+ default: () => []
329
+ },
330
+ loading: {
331
+ type: Boolean,
332
+ default: !1
333
+ },
334
+ loadingText: {
335
+ type: String,
336
+ default: ""
337
+ },
338
+ actionLabel: {
339
+ type: String,
340
+ default: ""
341
+ },
342
+ dateCutoff: {
343
+ type: Number,
344
+ default: 80
345
+ }
346
+ },
347
+ setup(t) {
348
+ let n = t, c = !!b().empty, l = p(null);
349
+ function d(e) {
350
+ let t = String(e ?? "");
351
+ return t.length > n.dateCutoff ? `${t.slice(0, n.dateCutoff - 1)}[...]` : t;
352
+ }
353
+ return (n, p) => (f(), i("div", {
354
+ class: u(["mwnf-grid", { "mwnf-grid--loading": t.loading }]),
355
+ "aria-busy": t.loading ? "true" : void 0
356
+ }, [t.loading && t.loadingText ? (f(), i("p", xe, _(t.loadingText), 1)) : t.records.length ? (f(), i("ul", Se, [(f(!0), i(e, null, m(t.records, (n) => (f(), i("li", {
357
+ key: n.id,
358
+ class: u(["mwnf-grid__tile", { "mwnf-grid__tile--hover": l.value === n.id }]),
359
+ onMouseenter: (e) => l.value = n.id,
360
+ onMouseleave: p[0] ||= (e) => l.value = null,
361
+ onFocusin: (e) => l.value = n.id,
362
+ onFocusout: p[1] ||= (e) => l.value = null
363
+ }, [a("span", we, [n.image ? (f(), i("img", {
364
+ key: 0,
365
+ class: "mwnf-grid__image",
366
+ src: n.image,
367
+ alt: n.imageAlt ?? "",
368
+ loading: "lazy"
369
+ }, null, 8, Te)) : (f(), i("span", Ee))]), a("div", De, [s(k, {
370
+ class: "mwnf-grid__card-media",
371
+ to: n.to,
372
+ href: n.href,
373
+ tabindex: "-1",
374
+ "aria-hidden": "true"
375
+ }, {
376
+ default: C(() => [n.image ? (f(), i("img", {
377
+ key: 0,
378
+ src: n.image,
379
+ alt: ""
380
+ }, null, 8, Oe)) : r("", !0)]),
381
+ _: 2
382
+ }, 1032, ["to", "href"]), a("div", ke, [
383
+ a("p", {
384
+ class: "mwnf-grid__name",
385
+ innerHTML: n.name
386
+ }, null, 8, Ae),
387
+ (f(!0), i(e, null, m(n.meta ?? [], (e, t) => (f(), i("p", {
388
+ key: t,
389
+ class: "mwnf-grid__meta"
390
+ }, _(d(e)), 1))), 128)),
391
+ n.badge ? (f(), i("p", je, _(n.badge), 1)) : r("", !0),
392
+ s(k, {
393
+ class: "mwnf-grid__action",
394
+ to: n.to,
395
+ href: n.href
396
+ }, {
397
+ default: C(() => [o(_(t.actionLabel || n.name.replace(/<[^>]+>/g, "")) + " › ", 1)]),
398
+ _: 2
399
+ }, 1032, ["to", "href"])
400
+ ])])], 42, Ce))), 128))])) : v(c) ? (f(), i("div", Me, [h(n.$slots, "empty")])) : r("", !0)], 10, be));
401
+ }
402
+ }, Ne = ["aria-label"], Pe = ["disabled"], Fe = ["disabled"], Ie = ["aria-current", "onClick"], Le = ["disabled"], Re = ["disabled"], ze = { class: "mwnf-pagination__position" }, Be = { class: "mwnf-pagination__jump" }, Ve = ["max"], He = {
403
+ __name: "Pagination",
404
+ props: {
405
+ pageInfo: {
406
+ type: Object,
407
+ required: !0
408
+ },
409
+ window: {
410
+ type: Number,
411
+ default: 5
412
+ },
413
+ jump: {
414
+ type: Boolean,
415
+ default: !1
416
+ },
417
+ ends: {
418
+ type: Boolean,
419
+ default: !0
420
+ }
421
+ },
422
+ emits: ["navigate"],
423
+ setup(n, { emit: s }) {
424
+ let c = n, l = s, { t: d } = D(), h = t(() => c.pageInfo?.currentPage ?? 1), g = t(() => c.pageInfo?.lastPage ?? 1), y = t(() => {
425
+ let e = Math.max(1, c.window), t = Math.max(1, h.value - Math.floor(e / 2)), n = Math.min(g.value, t + e - 1);
426
+ t = Math.max(1, n - e + 1);
427
+ let r = [];
428
+ for (let e = t; e <= n; e++) r.push(e);
429
+ return r;
430
+ }), b = p(String(h.value));
431
+ S(h, (e) => {
432
+ b.value = String(e);
433
+ });
434
+ function C(e) {
435
+ let t = Math.min(Math.max(1, Number.parseInt(e, 10) || 1), g.value);
436
+ t !== h.value && l("navigate", t);
437
+ }
438
+ return (t, s) => g.value > 1 ? (f(), i("nav", {
439
+ key: 0,
440
+ class: "mwnf-pagination",
441
+ "aria-label": v(d)("catalogue.pagination.page")
442
+ }, [
443
+ n.ends ? (f(), i("button", {
444
+ key: 0,
445
+ type: "button",
446
+ class: "mwnf-pagination__button",
447
+ disabled: h.value === 1,
448
+ onClick: s[0] ||= (e) => C(1)
449
+ }, " « " + _(v(d)("catalogue.pagination.first")), 9, Pe)) : r("", !0),
450
+ a("button", {
451
+ type: "button",
452
+ class: "mwnf-pagination__button",
453
+ disabled: h.value === 1,
454
+ onClick: s[1] ||= (e) => C(h.value - 1)
455
+ }, " ‹ " + _(v(d)("core.pagination.previous")), 9, Fe),
456
+ (f(!0), i(e, null, m(y.value, (e) => (f(), i("button", {
457
+ key: e,
458
+ type: "button",
459
+ class: u(["mwnf-pagination__button mwnf-pagination__number", { "mwnf-pagination__button--active": e === h.value }]),
460
+ "aria-current": e === h.value ? "page" : void 0,
461
+ onClick: (t) => C(e)
462
+ }, _(e), 11, Ie))), 128)),
463
+ a("button", {
464
+ type: "button",
465
+ class: "mwnf-pagination__button",
466
+ disabled: h.value === g.value,
467
+ onClick: s[2] ||= (e) => C(h.value + 1)
468
+ }, _(v(d)("core.pagination.next")) + " › ", 9, Le),
469
+ n.ends ? (f(), i("button", {
470
+ key: 1,
471
+ type: "button",
472
+ class: "mwnf-pagination__button",
473
+ disabled: h.value === g.value,
474
+ onClick: s[3] ||= (e) => C(g.value)
475
+ }, _(v(d)("catalogue.pagination.last")) + " » ", 9, Re)) : r("", !0),
476
+ a("span", ze, [n.jump ? (f(), i(e, { key: 0 }, [
477
+ a("label", Be, [a("span", null, _(v(d)("catalogue.pagination.page")), 1), w(a("input", {
478
+ "onUpdate:modelValue": s[4] ||= (e) => b.value = e,
479
+ class: "mwnf-pagination__jump-field",
480
+ type: "number",
481
+ min: "1",
482
+ max: g.value,
483
+ onKeyup: s[5] ||= T((e) => C(b.value), ["enter"])
484
+ }, null, 40, Ve), [[x, b.value]])]),
485
+ a("span", null, "/ " + _(g.value), 1),
486
+ a("button", {
487
+ type: "button",
488
+ class: "mwnf-pagination__button",
489
+ onClick: s[6] ||= (e) => C(b.value)
490
+ }, _(v(d)("catalogue.pagination.go")), 1)
491
+ ], 64)) : (f(), i(e, { key: 1 }, [o(_(h.value) + " / " + _(g.value), 1)], 64))])
492
+ ], 8, Ne)) : r("", !0);
493
+ }
494
+ }, Ue = ["for"], We = {
495
+ key: 0,
496
+ class: "mwnf-facet__label"
497
+ }, Ge = [
498
+ "id",
499
+ "value",
500
+ "disabled"
501
+ ], Ke = {
502
+ key: 0,
503
+ value: "",
504
+ disabled: ""
505
+ }, qe = {
506
+ key: 1,
507
+ value: ""
508
+ }, Je = ["value"], Ye = {
509
+ __name: "FacetSelect",
510
+ props: {
511
+ label: {
512
+ type: String,
513
+ default: ""
514
+ },
515
+ options: {
516
+ type: Array,
517
+ default: () => []
518
+ },
519
+ modelValue: {
520
+ type: [String, Number],
521
+ default: ""
522
+ },
523
+ placeholder: {
524
+ type: String,
525
+ default: ""
526
+ },
527
+ anyLabel: {
528
+ type: String,
529
+ default: ""
530
+ },
531
+ disabled: {
532
+ type: Boolean,
533
+ default: !1
534
+ },
535
+ hideEmpty: {
536
+ type: Boolean,
537
+ default: !1
538
+ }
539
+ },
540
+ emits: ["update:modelValue"],
541
+ setup(n, { emit: o }) {
542
+ let s = n, c = o, l = y(), u = t(() => !s.hideEmpty || s.options.length > 0);
543
+ return (t, o) => u.value ? (f(), i("label", {
544
+ key: 0,
545
+ class: "mwnf-facet",
546
+ for: v(l)
547
+ }, [n.label ? (f(), i("span", We, _(n.label), 1)) : r("", !0), a("select", {
548
+ id: v(l),
549
+ class: "mwnf-facet__select",
550
+ value: String(n.modelValue ?? ""),
551
+ disabled: n.disabled,
552
+ onChange: o[0] ||= (e) => c("update:modelValue", e.target.value)
553
+ }, [
554
+ n.placeholder ? (f(), i("option", Ke, _(n.placeholder), 1)) : r("", !0),
555
+ n.anyLabel ? (f(), i("option", qe, _(n.anyLabel), 1)) : r("", !0),
556
+ (f(!0), i(e, null, m(n.options, (e) => (f(), i("option", {
557
+ key: e.value,
558
+ value: String(e.value)
559
+ }, _(e.label), 9, Je))), 128))
560
+ ], 40, Ge)], 8, Ue)) : r("", !0);
561
+ }
562
+ }, Xe = {
563
+ key: 0,
564
+ class: "mwnf-filter__title"
565
+ }, Ze = ["disabled"], Qe = { class: "mwnf-filter__actions" }, $e = {
566
+ key: 0,
567
+ type: "submit",
568
+ class: "mwnf-filter__button mwnf-filter__button--apply"
569
+ }, et = {
570
+ __name: "FilterPanel",
571
+ props: {
572
+ title: {
573
+ type: String,
574
+ default: ""
575
+ },
576
+ mode: {
577
+ type: String,
578
+ default: "apply"
579
+ },
580
+ applyLabel: {
581
+ type: String,
582
+ default: ""
583
+ },
584
+ resetLabel: {
585
+ type: String,
586
+ default: ""
587
+ },
588
+ disabled: {
589
+ type: Boolean,
590
+ default: !1
591
+ }
592
+ },
593
+ emits: ["apply", "reset"],
594
+ setup(e, { emit: t }) {
595
+ let n = t, { t: o } = D();
596
+ return (t, s) => (f(), i("form", {
597
+ class: u(["mwnf-filter", `mwnf-filter--${e.mode}`]),
598
+ onSubmit: s[1] ||= E((e) => n("apply"), ["prevent"])
599
+ }, [
600
+ e.title ? (f(), i("p", Xe, _(e.title), 1)) : r("", !0),
601
+ a("fieldset", {
602
+ class: "mwnf-filter__controls",
603
+ disabled: e.disabled
604
+ }, [h(t.$slots, "default")], 8, Ze),
605
+ a("div", Qe, [e.mode === "apply" ? (f(), i("button", $e, _(e.applyLabel || v(o)("core.action.apply")), 1)) : r("", !0), a("button", {
606
+ type: "button",
607
+ class: "mwnf-filter__button mwnf-filter__button--reset",
608
+ onClick: s[0] ||= (e) => n("reset")
609
+ }, _(e.resetLabel || v(o)("core.action.reset")), 1)])
610
+ ], 34));
611
+ }
612
+ }, tt = {
613
+ key: 0,
614
+ class: "mwnf-summary"
615
+ }, nt = {
616
+ key: 0,
617
+ class: "mwnf-summary__parts"
618
+ }, rt = {
619
+ key: 0,
620
+ class: "mwnf-summary__label"
621
+ }, it = {
622
+ key: 1,
623
+ class: "mwnf-summary__count"
624
+ }, at = {
625
+ key: 2,
626
+ class: "mwnf-summary__value"
627
+ }, ot = {
628
+ key: 1,
629
+ class: "mwnf-summary__actions"
630
+ }, st = {
631
+ __name: "ResultsSummary",
632
+ props: { parts: {
633
+ type: Array,
634
+ default: () => []
635
+ } },
636
+ setup(t) {
637
+ let n = !!b().actions;
638
+ return (a, s) => t.parts.length || a.$slots.default || v(n) ? (f(), i("div", tt, [
639
+ t.parts.length ? (f(), i("p", nt, [(f(!0), i(e, null, m(t.parts, (e, t) => (f(), i("span", {
640
+ key: t,
641
+ class: "mwnf-summary__part"
642
+ }, [
643
+ e.label ? (f(), i("span", rt, _(e.label), 1)) : r("", !0),
644
+ s[0] ||= o(_(" "), -1),
645
+ e.count == null ? r("", !0) : (f(), i("span", it, _(e.count), 1)),
646
+ s[1] ||= o(_(" "), -1),
647
+ e.value ? (f(), i("span", at, _(e.value), 1)) : r("", !0)
648
+ ]))), 128))])) : r("", !0),
649
+ h(a.$slots, "default"),
650
+ v(n) ? (f(), i("div", ot, [h(a.$slots, "actions")])) : r("", !0)
651
+ ])) : r("", !0);
652
+ }
653
+ }, ct = ["aria-label"], lt = [
654
+ "aria-pressed",
655
+ "lang",
656
+ "onClick"
657
+ ], ut = {
658
+ __name: "RecordLanguages",
659
+ props: {
660
+ languages: {
661
+ type: Array,
662
+ default: () => []
663
+ },
664
+ language: {
665
+ type: String,
666
+ default: ""
667
+ }
668
+ },
669
+ emits: ["select"],
670
+ setup(n, { emit: a }) {
671
+ let o = n, s = a, { t: c } = D(), l = t(() => o.languages.map((e) => typeof e == "string" ? {
672
+ code: e,
673
+ label: e.toUpperCase()
674
+ } : e));
675
+ return (t, a) => l.value.length > 1 ? (f(), i("div", {
676
+ key: 0,
677
+ class: "mwnf-languages",
678
+ role: "group",
679
+ "aria-label": v(c)("record.sheet.languages")
680
+ }, [(f(!0), i(e, null, m(l.value, (e) => (f(), i("button", {
681
+ key: e.code,
682
+ type: "button",
683
+ class: u(["mwnf-languages__button", { "mwnf-languages__button--active": e.code === n.language }]),
684
+ "aria-pressed": e.code === n.language ? "true" : "false",
685
+ lang: e.code,
686
+ onClick: (t) => s("select", e.code)
687
+ }, _(e.label), 11, lt))), 128))], 8, ct)) : r("", !0);
688
+ }
689
+ }, dt = ["dir"], ft = { key: 0 }, pt = {
690
+ class: "mwnf-sheet__label",
691
+ scope: "row"
692
+ }, mt = { class: "mwnf-sheet__value" }, ht = ["href"], gt = ["innerHTML"], _t = {
693
+ key: 0,
694
+ class: "mwnf-sheet__row mwnf-sheet__row--short"
695
+ }, vt = {
696
+ class: "mwnf-sheet__label",
697
+ scope: "row"
698
+ }, yt = ["aria-expanded"], bt = { class: "mwnf-sheet__value" }, xt = ["innerHTML"], St = { class: "mwnf-sheet__value" }, Ct = ["href"], wt = ["innerHTML"], Tt = { class: "mwnf-sheet__label mwnf-sheet__label--short" }, Et = ["aria-expanded"], Dt = { class: "mwnf-sheet__value" }, Ot = ["innerHTML"], kt = {
699
+ __name: "RecordSheet",
700
+ props: {
701
+ rows: {
702
+ type: Array,
703
+ default: () => []
704
+ },
705
+ layout: {
706
+ type: String,
707
+ default: "table"
708
+ },
709
+ dir: {
710
+ type: String,
711
+ default: ""
712
+ },
713
+ shortDescription: {
714
+ type: Object,
715
+ default: null
716
+ },
717
+ shortDescriptionAfter: {
718
+ type: String,
719
+ default: "description"
720
+ },
721
+ shortDescriptionOpen: {
722
+ type: Boolean,
723
+ default: !1
724
+ }
725
+ },
726
+ setup(t) {
727
+ let o = t, { t: s } = D(), c = p(o.shortDescriptionOpen);
728
+ S(() => o.shortDescription, () => {
729
+ c.value = o.shortDescriptionOpen;
730
+ });
731
+ let l = (e) => e.render === "custom" || e.render === "link";
732
+ return (o, d) => (f(), i("div", {
733
+ class: u(["mwnf-sheet", `mwnf-sheet--${t.layout}`]),
734
+ dir: t.dir || void 0
735
+ }, [(f(), n(g(t.layout === "list" ? "dl" : "table"), { class: "mwnf-sheet__rows" }, {
736
+ default: C(() => [t.layout === "list" ? (f(!0), i(e, { key: 1 }, m(t.rows, (n) => (f(), i(e, { key: n.key }, [
737
+ a("dt", { class: u(["mwnf-sheet__label", `mwnf-sheet__label--${n.key}`]) }, _(n.label), 3),
738
+ a("dd", St, [l(n) ? h(o.$slots, n.key, { row: n }, () => [n.render === "link" ? (f(), i("a", {
739
+ key: 0,
740
+ href: n.value,
741
+ target: "_blank",
742
+ rel: "noopener"
743
+ }, _(n.value), 9, Ct)) : r("", !0)], void 0, 0) : (f(), i("span", {
744
+ key: 1,
745
+ class: u(`mwnf-sheet__${n.render}`),
746
+ innerHTML: n.html
747
+ }, null, 10, wt))]),
748
+ t.shortDescription && n.key === t.shortDescriptionAfter ? (f(), i(e, { key: 0 }, [a("dt", Tt, [a("button", {
749
+ type: "button",
750
+ class: "mwnf-sheet__toggle",
751
+ "aria-expanded": c.value ? "true" : "false",
752
+ onClick: d[1] ||= (e) => c.value = !c.value
753
+ }, _(c.value ? v(s)("record.action.hideShortDescription") : v(s)("record.action.viewShortDescription")), 9, Et)]), a("dd", Dt, [c.value ? (f(), i("div", {
754
+ key: 0,
755
+ class: "mwnf-sheet__block",
756
+ innerHTML: t.shortDescription.html
757
+ }, null, 8, Ot)) : r("", !0)])], 64)) : r("", !0)
758
+ ], 64))), 128)) : (f(), i("tbody", ft, [(f(!0), i(e, null, m(t.rows, (n) => (f(), i(e, { key: n.key }, [a("tr", { class: u(["mwnf-sheet__row", `mwnf-sheet__row--${n.key}`]) }, [a("th", pt, _(n.label), 1), a("td", mt, [l(n) ? h(o.$slots, n.key, { row: n }, () => [n.render === "link" ? (f(), i("a", {
759
+ key: 0,
760
+ href: n.value,
761
+ target: "_blank",
762
+ rel: "noopener"
763
+ }, _(n.value), 9, ht)) : r("", !0)], void 0, 0) : (f(), i("span", {
764
+ key: 1,
765
+ class: u(`mwnf-sheet__${n.render}`),
766
+ innerHTML: n.html
767
+ }, null, 10, gt))])], 2), t.shortDescription && n.key === t.shortDescriptionAfter ? (f(), i("tr", _t, [a("th", vt, [a("button", {
768
+ type: "button",
769
+ class: "mwnf-sheet__toggle",
770
+ "aria-expanded": c.value ? "true" : "false",
771
+ onClick: d[0] ||= (e) => c.value = !c.value
772
+ }, _(c.value ? v(s)("record.action.hideShortDescription") : v(s)("record.action.viewShortDescription")), 9, yt)]), a("td", bt, [c.value ? (f(), i("div", {
773
+ key: 0,
774
+ class: "mwnf-sheet__block",
775
+ innerHTML: t.shortDescription.html
776
+ }, null, 8, xt)) : r("", !0)])])) : r("", !0)], 64))), 128))]))]),
777
+ _: 3
778
+ }))], 10, dt));
779
+ }
780
+ }, At = ["dir"], jt = {
781
+ key: 0,
782
+ class: "mwnf-sheet-section__heading"
783
+ }, Mt = ["innerHTML"], Nt = {
784
+ __name: "SheetSection",
785
+ props: {
786
+ heading: {
787
+ type: String,
788
+ default: ""
789
+ },
790
+ html: {
791
+ type: String,
792
+ default: ""
793
+ },
794
+ dir: {
795
+ type: String,
796
+ default: ""
797
+ }
798
+ },
799
+ setup(e) {
800
+ return (t, n) => (f(), i("section", {
801
+ class: "mwnf-sheet-section",
802
+ dir: e.dir || void 0
803
+ }, [
804
+ e.heading ? (f(), i("h2", jt, _(e.heading), 1)) : r("", !0),
805
+ e.html ? (f(), i("div", {
806
+ key: 1,
807
+ class: "mwnf-sheet-section__body mwnf-sheet__block",
808
+ innerHTML: e.html
809
+ }, null, 8, Mt)) : r("", !0),
810
+ h(t.$slots, "default")
811
+ ], 8, At));
812
+ }
813
+ }, Pt = {
814
+ key: 0,
815
+ class: "mwnf-credits"
816
+ }, Ft = {
817
+ key: 0,
818
+ class: "mwnf-credits__heading"
819
+ }, It = {
820
+ key: 1,
821
+ class: "mwnf-credits__list"
822
+ }, Lt = { class: "mwnf-credits__label" }, Rt = { class: "mwnf-credits__value" }, zt = {
823
+ key: 2,
824
+ class: "mwnf-credits__number"
825
+ }, Bt = {
826
+ key: 0,
827
+ class: "mwnf-credits__label"
828
+ }, Vt = { class: "mwnf-credits__heading" }, Ht = { class: "mwnf-credits__citation" }, Ut = {
829
+ __name: "RecordCredits",
830
+ props: {
831
+ credits: {
832
+ type: Array,
833
+ default: () => []
834
+ },
835
+ workingNumber: {
836
+ type: String,
837
+ default: ""
838
+ },
839
+ workingNumberLabel: {
840
+ type: String,
841
+ default: ""
842
+ },
843
+ citation: {
844
+ type: String,
845
+ default: ""
846
+ },
847
+ heading: {
848
+ type: String,
849
+ default: ""
850
+ },
851
+ citationHeading: {
852
+ type: String,
853
+ default: ""
854
+ }
855
+ },
856
+ setup(n) {
857
+ let o = n, { t: s } = D(), c = t(() => o.credits.length > 0 || o.workingNumber || o.citation);
858
+ return (t, o) => c.value ? (f(), i("section", Pt, [
859
+ n.credits.length || n.workingNumber ? (f(), i("h2", Ft, _(n.heading || v(s)("record.sheet.credits")), 1)) : r("", !0),
860
+ n.credits.length ? (f(), i("dl", It, [(f(!0), i(e, null, m(n.credits, (t) => (f(), i(e, { key: t.label }, [a("dt", Lt, _(t.label), 1), a("dd", Rt, _(t.value), 1)], 64))), 128))])) : r("", !0),
861
+ n.workingNumber ? (f(), i("p", zt, [n.workingNumberLabel ? (f(), i("span", Bt, _(n.workingNumberLabel), 1)) : r("", !0), a("strong", null, _(n.workingNumber), 1)])) : r("", !0),
862
+ n.citation ? (f(), i(e, { key: 3 }, [a("h2", Vt, _(n.citationHeading || v(s)("record.citation.heading")), 1), a("p", Ht, _(n.citation), 1)], 64)) : r("", !0)
863
+ ])) : r("", !0);
864
+ }
865
+ }, Wt = {
866
+ key: 0,
867
+ class: "mwnf-source-credit"
868
+ }, Gt = { class: "mwnf-source-credit__label" }, Kt = ["href"], qt = {
869
+ __name: "SourceCredit",
870
+ props: {
871
+ route: {
872
+ type: [Object, String],
873
+ default: null
874
+ },
875
+ labelEntry: {
876
+ type: String,
877
+ default: "record.source.label"
878
+ }
879
+ },
880
+ setup(e) {
881
+ let n = e, { t: s } = D(), c = te(), l = t(() => ee(n.route ?? c));
882
+ return (t, n) => l.value ? (f(), i("p", Wt, [
883
+ a("span", Gt, _(v(s)(e.labelEntry)), 1),
884
+ n[0] ||= o(),
885
+ a("a", { href: l.value }, _(l.value), 9, Kt)
886
+ ])) : r("", !0);
887
+ }
888
+ }, Jt = {
889
+ key: 0,
890
+ class: "mwnf-related"
891
+ }, Yt = {
892
+ key: 0,
893
+ class: "mwnf-related__heading"
894
+ }, Xt = {
895
+ __name: "RelatedRecords",
896
+ props: {
897
+ heading: {
898
+ type: String,
899
+ default: ""
900
+ },
901
+ records: {
902
+ type: Array,
903
+ default: () => []
904
+ },
905
+ variant: {
906
+ type: String,
907
+ default: "list"
908
+ },
909
+ actionLabel: {
910
+ type: String,
911
+ default: ""
912
+ }
913
+ },
914
+ setup(e) {
915
+ return (t, a) => e.records.length || t.$slots.default ? (f(), i("section", Jt, [
916
+ e.heading ? (f(), i("h2", Yt, _(e.heading), 1)) : r("", !0),
917
+ e.variant === "grid" ? (f(), n(Q, {
918
+ key: 1,
919
+ records: e.records,
920
+ "action-label": e.actionLabel
921
+ }, null, 8, ["records", "action-label"])) : (f(), n(Z, {
922
+ key: 2,
923
+ records: e.records
924
+ }, null, 8, ["records"])),
925
+ h(t.$slots, "default")
926
+ ])) : r("", !0);
927
+ }
928
+ }, Zt = ["src", "alt"], Qt = {
929
+ key: 0,
930
+ class: "mwnf-media__caption"
931
+ }, $t = { key: 0 }, en = {
932
+ key: 1,
933
+ class: "mwnf-media__credit"
934
+ }, tn = {
935
+ key: 2,
936
+ class: "mwnf-media__credit"
937
+ }, nn = ["src", "alt"], rn = {
938
+ key: 0,
939
+ class: "mwnf-media__thumbs"
940
+ }, an = [
941
+ "aria-pressed",
942
+ "title",
943
+ "onClick"
944
+ ], on = ["src", "alt"], sn = {
945
+ key: 1,
946
+ class: "mwnf-media__caption"
947
+ }, cn = { key: 0 }, ln = {
948
+ key: 1,
949
+ class: "mwnf-media__credit"
950
+ }, un = ["aria-label"], dn = ["aria-label"], fn = ["src", "alt"], pn = ["aria-label"], mn = {
951
+ __name: "MediaGallery",
952
+ props: {
953
+ images: {
954
+ type: Array,
955
+ default: () => []
956
+ },
957
+ start: {
958
+ type: Number,
959
+ default: 0
960
+ },
961
+ variant: {
962
+ type: String,
963
+ default: ""
964
+ }
965
+ },
966
+ setup(n) {
967
+ let o = n, { t: s } = D(), c = p(Math.min(o.start, Math.max(0, o.images.length - 1)));
968
+ S(() => o.images, () => {
969
+ c.value = 0;
970
+ });
971
+ let l = t(() => o.images[c.value] ?? null), h = t(() => {
972
+ let e = [];
973
+ return l.value?.photographer && e.push(`${s("record.media.photograph")}: ${l.value.photographer}`), l.value?.copyright && e.push(`© ${l.value.copyright}`), e.join(" — ");
974
+ }), g = p(!1), y = null, b = p(null);
975
+ function x(e) {
976
+ c.value = (e + o.images.length) % o.images.length;
977
+ }
978
+ function C() {
979
+ l.value && (y = document.activeElement, g.value = !0, document.addEventListener("keydown", T), requestAnimationFrame(() => b.value?.focus?.()));
980
+ }
981
+ function w() {
982
+ g.value = !1, document.removeEventListener("keydown", T), y?.focus?.(), y = null;
983
+ }
984
+ function T(e) {
985
+ e.key === "Escape" ? w() : e.key === "ArrowRight" ? x(c.value + 1) : e.key === "ArrowLeft" && x(c.value - 1);
986
+ }
987
+ return d(() => document.removeEventListener("keydown", T)), (t, o) => n.images.length ? (f(), i("div", {
988
+ key: 0,
989
+ class: u(["mwnf-media", n.variant ? `mwnf-media--${n.variant}` : ""])
990
+ }, [n.variant === "row" ? (f(!0), i(e, { key: 0 }, m(n.images, (e, t) => (f(), i("figure", {
991
+ key: e.url ?? t,
992
+ class: "mwnf-media__figure"
993
+ }, [a("img", {
994
+ class: "mwnf-media__image",
995
+ src: e.url,
996
+ alt: e.alt ?? "",
997
+ loading: "lazy"
998
+ }, null, 8, Zt), e.caption || e.photographer || e.copyright ? (f(), i("figcaption", Qt, [
999
+ e.caption ? (f(), i("span", $t, _(e.caption), 1)) : r("", !0),
1000
+ e.photographer ? (f(), i("span", en, _(v(s)("record.media.photograph")) + ": " + _(e.photographer), 1)) : r("", !0),
1001
+ e.copyright ? (f(), i("span", tn, "© " + _(e.copyright), 1)) : r("", !0)
1002
+ ])) : r("", !0)]))), 128)) : (f(), i(e, { key: 1 }, [
1003
+ a("button", {
1004
+ type: "button",
1005
+ class: "mwnf-media__main",
1006
+ onClick: C
1007
+ }, [a("img", {
1008
+ class: "mwnf-media__image",
1009
+ src: l.value.url,
1010
+ alt: l.value.alt ?? ""
1011
+ }, null, 8, nn)]),
1012
+ n.images.length > 1 ? (f(), i("ul", rn, [(f(!0), i(e, null, m(n.images, (e, t) => (f(), i("li", { key: e.url ?? t }, [a("button", {
1013
+ type: "button",
1014
+ class: u(["mwnf-media__thumb", { "mwnf-media__thumb--active": t === c.value }]),
1015
+ "aria-pressed": t === c.value ? "true" : "false",
1016
+ title: [e.photographer, e.copyright].filter(Boolean).join(" — ") || void 0,
1017
+ onClick: (e) => x(t)
1018
+ }, [a("img", {
1019
+ src: e.url,
1020
+ alt: e.alt ?? "",
1021
+ loading: "lazy"
1022
+ }, null, 8, on)], 10, an)]))), 128))])) : r("", !0),
1023
+ l.value.caption || h.value ? (f(), i("p", sn, [l.value.caption ? (f(), i("span", cn, _(l.value.caption), 1)) : r("", !0), h.value ? (f(), i("span", ln, _(h.value), 1)) : r("", !0)])) : r("", !0),
1024
+ g.value ? (f(), i("div", {
1025
+ key: 2,
1026
+ class: "mwnf-lightbox",
1027
+ role: "dialog",
1028
+ "aria-modal": "true",
1029
+ onClick: E(w, ["self"])
1030
+ }, [
1031
+ a("button", {
1032
+ ref_key: "closeButton",
1033
+ ref: b,
1034
+ type: "button",
1035
+ class: "mwnf-lightbox__close",
1036
+ "aria-label": v(s)("core.action.close"),
1037
+ onClick: w
1038
+ }, "✕", 8, un),
1039
+ n.images.length > 1 ? (f(), i("button", {
1040
+ key: 0,
1041
+ type: "button",
1042
+ class: "mwnf-lightbox__control mwnf-lightbox__control--previous",
1043
+ "aria-label": v(s)("core.pagination.previous"),
1044
+ onClick: o[0] ||= E((e) => x(c.value - 1), ["stop"])
1045
+ }, "‹", 8, dn)) : r("", !0),
1046
+ a("img", {
1047
+ class: "mwnf-lightbox__image",
1048
+ src: l.value.url,
1049
+ alt: l.value.alt ?? ""
1050
+ }, null, 8, fn),
1051
+ n.images.length > 1 ? (f(), i("button", {
1052
+ key: 1,
1053
+ type: "button",
1054
+ class: "mwnf-lightbox__control mwnf-lightbox__control--next",
1055
+ "aria-label": v(s)("core.pagination.next"),
1056
+ onClick: o[1] ||= E((e) => x(c.value + 1), ["stop"])
1057
+ }, "›", 8, pn)) : r("", !0)
1058
+ ])) : r("", !0)
1059
+ ], 64))], 2)) : r("", !0);
1060
+ }
1061
+ }, hn = ["aria-label", "dir"], gn = { class: "mwnf-popover__title" }, _n = ["aria-label"], vn = { class: "mwnf-popover__body" }, yn = { class: "mwnf-popover__term" }, $ = ["innerHTML"], bn = {
1062
+ key: 1,
1063
+ class: "mwnf-popover__definition"
1064
+ }, xn = {
1065
+ __name: "GlossaryPopover",
1066
+ props: {
1067
+ term: {
1068
+ type: Object,
1069
+ default: null
1070
+ },
1071
+ html: {
1072
+ type: String,
1073
+ default: ""
1074
+ },
1075
+ dir: {
1076
+ type: String,
1077
+ default: ""
1078
+ }
1079
+ },
1080
+ emits: ["close"],
1081
+ setup(e, { emit: t }) {
1082
+ let n = e, o = t, { t: s } = D(), c = p(null), l = null;
1083
+ function u() {
1084
+ o("close");
1085
+ }
1086
+ function m(e) {
1087
+ e.key === "Escape" && u();
1088
+ }
1089
+ return S(() => n.term, (e, t) => {
1090
+ e && !t ? (l = document.activeElement, document.addEventListener("keydown", m), requestAnimationFrame(() => c.value?.focus?.())) : !e && t && (document.removeEventListener("keydown", m), l?.focus?.(), l = null);
1091
+ }, { immediate: !0 }), d(() => document.removeEventListener("keydown", m)), (t, n) => e.term ? (f(), i("aside", {
1092
+ key: 0,
1093
+ class: "mwnf-popover",
1094
+ role: "dialog",
1095
+ "aria-label": v(s)("record.glossary.heading"),
1096
+ dir: e.dir || void 0
1097
+ }, [a("div", gn, [a("span", null, _(v(s)("record.glossary.heading")), 1), a("button", {
1098
+ ref_key: "closeButton",
1099
+ ref: c,
1100
+ type: "button",
1101
+ class: "mwnf-popover__close",
1102
+ "aria-label": v(s)("record.glossary.close"),
1103
+ onClick: u
1104
+ }, "✕", 8, _n)]), a("div", vn, [a("p", yn, _(e.term.spelling || e.term.word), 1), e.html ? (f(), i("div", {
1105
+ key: 0,
1106
+ class: "mwnf-popover__definition mwnf-sheet__block",
1107
+ innerHTML: e.html
1108
+ }, null, 8, $)) : e.term.definition ? (f(), i("p", bn, _(e.term.definition), 1)) : r("", !0)])], 8, hn)) : r("", !0);
1109
+ }
1110
+ }, Sn = {
1111
+ key: 0,
1112
+ class: "mwnf-timeline__rows"
1113
+ }, Cn = { class: "mwnf-timeline__date" }, wn = { class: "mwnf-timeline__body" }, Tn = {
1114
+ key: 0,
1115
+ class: "mwnf-timeline__caption"
1116
+ }, En = ["innerHTML"], Dn = ["innerHTML"], On = {
1117
+ key: 2,
1118
+ class: "mwnf-timeline__media"
1119
+ }, kn = ["src", "alt"], An = ["innerHTML"], jn = {
1120
+ key: 3,
1121
+ class: "mwnf-timeline__actions"
1122
+ }, Mn = {
1123
+ key: 1,
1124
+ class: "mwnf-timeline__empty"
1125
+ }, Nn = {
1126
+ __name: "TimelineEventList",
1127
+ props: { events: {
1128
+ type: Array,
1129
+ default: () => []
1130
+ } },
1131
+ setup(t) {
1132
+ let s = !!b().empty;
1133
+ return (c, l) => t.events.length ? (f(), i("ul", Sn, [(f(!0), i(e, null, m(t.events, (t) => (f(), i("li", {
1134
+ key: t.id,
1135
+ class: "mwnf-timeline__row"
1136
+ }, [a("div", Cn, [h(c.$slots, "date", { event: t }, () => [o(_(t.date), 1)])]), a("div", wn, [
1137
+ t.caption || c.$slots.caption ? (f(), i("div", Tn, [h(c.$slots, "caption", { event: t }, () => [a("span", { innerHTML: t.caption }, null, 8, En)])])) : r("", !0),
1138
+ t.description ? (f(), i("div", {
1139
+ key: 1,
1140
+ class: "mwnf-timeline__description mwnf-sheet__block",
1141
+ innerHTML: t.description
1142
+ }, null, 8, Dn)) : r("", !0),
1143
+ t.media?.length || c.$slots.media ? (f(), i("div", On, [h(c.$slots, "media", { event: t }, () => [(f(!0), i(e, null, m(t.media ?? [], (e, t) => (f(), n(k, {
1144
+ key: t,
1145
+ class: "mwnf-timeline__media-item",
1146
+ to: e.to,
1147
+ href: e.href
1148
+ }, {
1149
+ default: C(() => [e.image ? (f(), i("img", {
1150
+ key: 0,
1151
+ src: e.image,
1152
+ alt: e.alt ?? "",
1153
+ loading: "lazy"
1154
+ }, null, 8, kn)) : r("", !0), e.caption ? (f(), i("span", {
1155
+ key: 1,
1156
+ class: "mwnf-timeline__media-caption",
1157
+ innerHTML: e.caption
1158
+ }, null, 8, An)) : r("", !0)]),
1159
+ _: 2
1160
+ }, 1032, ["to", "href"]))), 128))])])) : r("", !0),
1161
+ t.actions?.length || c.$slots.actions ? (f(), i("div", jn, [h(c.$slots, "actions", { event: t }, () => [(f(!0), i(e, null, m(t.actions ?? [], (e, t) => (f(), n(k, {
1162
+ key: t,
1163
+ class: "mwnf-timeline__action",
1164
+ to: e.to,
1165
+ href: e.href
1166
+ }, {
1167
+ default: C(() => [o(_(e.label) + " →", 1)]),
1168
+ _: 2
1169
+ }, 1032, ["to", "href"]))), 128))])])) : r("", !0)
1170
+ ])]))), 128))])) : v(s) ? (f(), i("div", Mn, [h(c.$slots, "empty")])) : r("", !0);
1171
+ }
1172
+ };
1173
+ //#endregion
1174
+ export { q as _, qt as a, kt as c, et as d, Ye as f, le as g, Z as h, Xt as i, ut as l, Q as m, xn as n, Ut as o, He as p, mn as r, Nt as s, Nn as t, st as u, k as v };