@museumwnf/viewer-layout 2.17.0 → 2.18.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,1819 @@
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, nextTick as u, normalizeClass as d, onBeforeUnmount as f, openBlock as p, ref as m, renderList as h, renderSlot as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, useId as b, useSlots as x, vModelSelect as S, vModelText as C, vShow as w, watch as T, withCtx as E, withDirectives as D, withKeys as O, withModifiers as k } from "vue";
2
+ import { useI18n as A } from "@museumwnf/viewer-core/i18n";
3
+ import { md as j, mdInline as M, searchGlossary as N, sourceUrl as P } from "@museumwnf/viewer-core";
4
+ import { useRoute as F } from "vue-router";
5
+ //#region src/content/SmartLink.vue
6
+ var I = [
7
+ "href",
8
+ "target",
9
+ "rel"
10
+ ], L = {
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 ? (p(), n(_(y(a)), l({
29
+ key: 0,
30
+ to: e.to
31
+ }, t.$attrs), {
32
+ default: E(() => [g(t.$slots, "default")]),
33
+ _: 3
34
+ }, 16, ["to"])) : (p(), 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), [g(t.$slots, "default")], 16, I));
40
+ }
41
+ }, R = ["innerHTML"], z = ["innerHTML"], B = {
42
+ key: 1,
43
+ class: "mwnf-cards__action"
44
+ }, V = {
45
+ key: 0,
46
+ class: "mwnf-cards__image-container"
47
+ }, H = ["src", "alt"], ee = { class: "mwnf-cards__content" }, te = {
48
+ key: 0,
49
+ class: "mwnf-cards__number"
50
+ }, ne = ["innerHTML"], re = ["innerHTML"], ie = {
51
+ key: 0,
52
+ class: "mwnf-cards__image-container"
53
+ }, ae = ["src", "alt"], oe = {
54
+ key: 1,
55
+ class: "mwnf-cards__number"
56
+ }, se = ["innerHTML"], U = {
57
+ key: 3,
58
+ class: "mwnf-cards__details"
59
+ }, W = { class: "mwnf-cards__summary" }, G = {
60
+ key: 0,
61
+ class: "mwnf-cards__number"
62
+ }, K = ["innerHTML"], ce = {
63
+ key: 0,
64
+ class: "mwnf-cards__children"
65
+ }, le = {
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 ? (p(), i("ul", {
85
+ key: 0,
86
+ class: d(["mwnf-cards", `mwnf-cards--${t.variant}`])
87
+ }, [(p(!0), i(e, null, h(t.cards, (c) => (p(), i("li", {
88
+ key: c.href ?? c.title,
89
+ class: d(["mwnf-cards__card"])
90
+ }, [t.variant === "cards" ? (p(), n(L, {
91
+ key: 0,
92
+ class: "mwnf-cards__link",
93
+ to: c.to,
94
+ href: c.href
95
+ }, {
96
+ default: E(() => [
97
+ a("span", {
98
+ class: "mwnf-cards__title",
99
+ innerHTML: y(M)(c.title)
100
+ }, null, 8, R),
101
+ c.description ? (p(), i("span", {
102
+ key: 0,
103
+ class: "mwnf-cards__text",
104
+ innerHTML: y(M)(c.description)
105
+ }, null, 8, z)) : r("", !0),
106
+ c.action ? (p(), i("span", B, v(c.action) + " →", 1)) : r("", !0)
107
+ ]),
108
+ _: 2
109
+ }, 1032, ["to", "href"])) : t.variant === "rows" ? (p(), n(L, {
110
+ key: 1,
111
+ class: "mwnf-cards__link",
112
+ to: c.to,
113
+ href: c.href
114
+ }, {
115
+ default: E(() => [c.image ? (p(), i("div", V, [a("img", {
116
+ class: "mwnf-cards__image",
117
+ src: c.image,
118
+ alt: c.alt || ""
119
+ }, null, 8, H)])) : r("", !0), a("div", ee, [
120
+ c.number ? (p(), i("span", te, v(c.number), 1)) : r("", !0),
121
+ a("span", {
122
+ class: "mwnf-cards__title",
123
+ innerHTML: y(M)(c.title)
124
+ }, null, 8, ne),
125
+ c.description ? (p(), i("span", {
126
+ key: 1,
127
+ class: "mwnf-cards__text",
128
+ innerHTML: y(M)(c.description)
129
+ }, null, 8, re)) : r("", !0)
130
+ ])]),
131
+ _: 2
132
+ }, 1032, ["to", "href"])) : t.variant === "covers" ? (p(), n(L, {
133
+ key: 2,
134
+ class: "mwnf-cards__link",
135
+ to: c.to,
136
+ href: c.href
137
+ }, {
138
+ default: E(() => [
139
+ c.image ? (p(), i("div", ie, [a("img", {
140
+ class: "mwnf-cards__image",
141
+ src: c.image,
142
+ alt: c.alt || ""
143
+ }, null, 8, ae)])) : r("", !0),
144
+ c.number ? (p(), i("span", oe, v(c.number), 1)) : r("", !0),
145
+ a("span", {
146
+ class: "mwnf-cards__title",
147
+ innerHTML: y(M)(c.title)
148
+ }, null, 8, se)
149
+ ]),
150
+ _: 2
151
+ }, 1032, ["to", "href"])) : t.variant === "accordion" ? (p(), i("details", U, [a("summary", W, [c.number ? (p(), i("span", G, v(c.number), 1)) : r("", !0), a("span", {
152
+ class: "mwnf-cards__title",
153
+ innerHTML: y(M)(c.title)
154
+ }, null, 8, K)]), c.children?.length ? (p(), i("ul", ce, [(p(!0), i(e, null, h(c.children, (e) => (p(), i("li", {
155
+ key: e.href ?? e.title,
156
+ class: "mwnf-cards__child"
157
+ }, [s(L, {
158
+ class: "mwnf-cards__child-link",
159
+ to: e.to,
160
+ href: e.href
161
+ }, {
162
+ default: E(() => [o(v(e.title), 1)]),
163
+ _: 2
164
+ }, 1032, ["to", "href"])]))), 128))])) : r("", !0)])) : r("", !0)]))), 128))], 2)) : r("", !0);
165
+ }
166
+ }, ue = ["aria-busy"], de = {
167
+ key: 0,
168
+ class: "mwnf-list__status"
169
+ }, fe = {
170
+ key: 1,
171
+ class: "mwnf-list__rows"
172
+ }, pe = { class: "mwnf-list__thumb" }, me = ["src", "alt"], he = { class: "mwnf-list__body" }, ge = ["innerHTML"], _e = {
173
+ key: 0,
174
+ class: "mwnf-list__meta"
175
+ }, ve = {
176
+ key: 0,
177
+ class: "mwnf-list__badge"
178
+ }, ye = {
179
+ key: 2,
180
+ class: "mwnf-list__empty"
181
+ }, q = {
182
+ __name: "RecordList",
183
+ props: {
184
+ records: {
185
+ type: Array,
186
+ default: () => []
187
+ },
188
+ loading: {
189
+ type: Boolean,
190
+ default: !1
191
+ },
192
+ loadingText: {
193
+ type: String,
194
+ default: ""
195
+ }
196
+ },
197
+ setup(t) {
198
+ let n = !!x().empty;
199
+ return (o, c) => (p(), i("div", {
200
+ class: d(["mwnf-list", { "mwnf-list--loading": t.loading }]),
201
+ "aria-busy": t.loading ? "true" : void 0
202
+ }, [t.loading && t.loadingText ? (p(), i("p", de, v(t.loadingText), 1)) : t.records.length ? (p(), i("ul", fe, [(p(!0), i(e, null, h(t.records, (t) => (p(), i("li", {
203
+ key: t.id,
204
+ class: "mwnf-list__row"
205
+ }, [s(L, {
206
+ class: "mwnf-list__link",
207
+ to: t.to,
208
+ href: t.href
209
+ }, {
210
+ default: E(() => [a("span", pe, [t.image ? (p(), i("img", {
211
+ key: 0,
212
+ src: t.image,
213
+ alt: t.imageAlt ?? "",
214
+ loading: "lazy"
215
+ }, null, 8, me)) : r("", !0)]), a("span", he, [a("span", {
216
+ class: "mwnf-list__name",
217
+ innerHTML: t.name
218
+ }, null, 8, ge), t.meta?.length || t.badge ? (p(), i("span", _e, [(p(!0), i(e, null, h(t.meta ?? [], (e, t) => (p(), i("span", {
219
+ key: t,
220
+ class: "mwnf-list__meta-item"
221
+ }, v(e), 1))), 128)), t.badge ? (p(), i("span", ve, v(t.badge), 1)) : r("", !0)])) : r("", !0)])]),
222
+ _: 2
223
+ }, 1032, ["to", "href"])]))), 128))])) : y(n) ? (p(), i("div", ye, [g(o.$slots, "empty")])) : r("", !0)], 10, ue));
224
+ }
225
+ }, be = ["aria-busy"], xe = {
226
+ key: 0,
227
+ class: "mwnf-grid__status"
228
+ }, Se = {
229
+ key: 1,
230
+ class: "mwnf-grid__tiles"
231
+ }, Ce = ["onMouseenter", "onFocusin"], we = { class: "mwnf-grid__media" }, Te = ["src", "alt"], Ee = {
232
+ key: 1,
233
+ class: "mwnf-grid__image mwnf-grid__image--empty",
234
+ "aria-hidden": "true"
235
+ }, De = { class: "mwnf-grid__card" }, Oe = ["src"], ke = { class: "mwnf-grid__card-body" }, Ae = ["innerHTML"], je = {
236
+ key: 0,
237
+ class: "mwnf-grid__badge"
238
+ }, Me = {
239
+ key: 2,
240
+ class: "mwnf-grid__empty"
241
+ }, J = {
242
+ __name: "RecordGrid",
243
+ props: {
244
+ records: {
245
+ type: Array,
246
+ default: () => []
247
+ },
248
+ loading: {
249
+ type: Boolean,
250
+ default: !1
251
+ },
252
+ loadingText: {
253
+ type: String,
254
+ default: ""
255
+ },
256
+ actionLabel: {
257
+ type: String,
258
+ default: ""
259
+ },
260
+ dateCutoff: {
261
+ type: Number,
262
+ default: 80
263
+ }
264
+ },
265
+ setup(t) {
266
+ let n = t, c = !!x().empty, l = m(null);
267
+ function u(e) {
268
+ let t = String(e ?? "");
269
+ return t.length > n.dateCutoff ? `${t.slice(0, n.dateCutoff - 1)}[...]` : t;
270
+ }
271
+ return (n, f) => (p(), i("div", {
272
+ class: d(["mwnf-grid", { "mwnf-grid--loading": t.loading }]),
273
+ "aria-busy": t.loading ? "true" : void 0
274
+ }, [t.loading && t.loadingText ? (p(), i("p", xe, v(t.loadingText), 1)) : t.records.length ? (p(), i("ul", Se, [(p(!0), i(e, null, h(t.records, (n) => (p(), i("li", {
275
+ key: n.id,
276
+ class: d(["mwnf-grid__tile", { "mwnf-grid__tile--hover": l.value === n.id }]),
277
+ onMouseenter: (e) => l.value = n.id,
278
+ onMouseleave: f[0] ||= (e) => l.value = null,
279
+ onFocusin: (e) => l.value = n.id,
280
+ onFocusout: f[1] ||= (e) => l.value = null
281
+ }, [a("span", we, [n.image ? (p(), i("img", {
282
+ key: 0,
283
+ class: "mwnf-grid__image",
284
+ src: n.image,
285
+ alt: n.imageAlt ?? "",
286
+ loading: "lazy"
287
+ }, null, 8, Te)) : (p(), i("span", Ee))]), a("div", De, [s(L, {
288
+ class: "mwnf-grid__card-media",
289
+ to: n.to,
290
+ href: n.href,
291
+ tabindex: "-1",
292
+ "aria-hidden": "true"
293
+ }, {
294
+ default: E(() => [n.image ? (p(), i("img", {
295
+ key: 0,
296
+ src: n.image,
297
+ alt: ""
298
+ }, null, 8, Oe)) : r("", !0)]),
299
+ _: 2
300
+ }, 1032, ["to", "href"]), a("div", ke, [
301
+ a("p", {
302
+ class: "mwnf-grid__name",
303
+ innerHTML: n.name
304
+ }, null, 8, Ae),
305
+ (p(!0), i(e, null, h(n.meta ?? [], (e, t) => (p(), i("p", {
306
+ key: t,
307
+ class: "mwnf-grid__meta"
308
+ }, v(u(e)), 1))), 128)),
309
+ n.badge ? (p(), i("p", je, v(n.badge), 1)) : r("", !0),
310
+ s(L, {
311
+ class: "mwnf-grid__action",
312
+ to: n.to,
313
+ href: n.href
314
+ }, {
315
+ default: E(() => [o(v(t.actionLabel || n.name.replace(/<[^>]+>/g, "")) + " › ", 1)]),
316
+ _: 2
317
+ }, 1032, ["to", "href"])
318
+ ])])], 42, Ce))), 128))])) : y(c) ? (p(), i("div", Me, [g(n.$slots, "empty")])) : r("", !0)], 10, be));
319
+ }
320
+ }, 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 = {
321
+ __name: "Pagination",
322
+ props: {
323
+ pageInfo: {
324
+ type: Object,
325
+ required: !0
326
+ },
327
+ window: {
328
+ type: Number,
329
+ default: 5
330
+ },
331
+ jump: {
332
+ type: Boolean,
333
+ default: !1
334
+ },
335
+ ends: {
336
+ type: Boolean,
337
+ default: !0
338
+ }
339
+ },
340
+ emits: ["navigate"],
341
+ setup(n, { emit: s }) {
342
+ let c = n, l = s, { t: u } = A(), f = t(() => c.pageInfo?.currentPage ?? 1), g = t(() => c.pageInfo?.lastPage ?? 1), _ = t(() => {
343
+ let e = Math.max(1, c.window), t = Math.max(1, f.value - Math.floor(e / 2)), n = Math.min(g.value, t + e - 1);
344
+ t = Math.max(1, n - e + 1);
345
+ let r = [];
346
+ for (let e = t; e <= n; e++) r.push(e);
347
+ return r;
348
+ }), b = m(String(f.value));
349
+ T(f, (e) => {
350
+ b.value = String(e);
351
+ });
352
+ function x(e) {
353
+ let t = Math.min(Math.max(1, Number.parseInt(e, 10) || 1), g.value);
354
+ t !== f.value && l("navigate", t);
355
+ }
356
+ return (t, s) => g.value > 1 ? (p(), i("nav", {
357
+ key: 0,
358
+ class: "mwnf-pagination",
359
+ "aria-label": y(u)("catalogue.pagination.page")
360
+ }, [
361
+ n.ends ? (p(), i("button", {
362
+ key: 0,
363
+ type: "button",
364
+ class: "mwnf-pagination__button",
365
+ disabled: f.value === 1,
366
+ onClick: s[0] ||= (e) => x(1)
367
+ }, " « " + v(y(u)("catalogue.pagination.first")), 9, Pe)) : r("", !0),
368
+ a("button", {
369
+ type: "button",
370
+ class: "mwnf-pagination__button",
371
+ disabled: f.value === 1,
372
+ onClick: s[1] ||= (e) => x(f.value - 1)
373
+ }, " ‹ " + v(y(u)("core.pagination.previous")), 9, Fe),
374
+ (p(!0), i(e, null, h(_.value, (e) => (p(), i("button", {
375
+ key: e,
376
+ type: "button",
377
+ class: d(["mwnf-pagination__button mwnf-pagination__number", { "mwnf-pagination__button--active": e === f.value }]),
378
+ "aria-current": e === f.value ? "page" : void 0,
379
+ onClick: (t) => x(e)
380
+ }, v(e), 11, Ie))), 128)),
381
+ a("button", {
382
+ type: "button",
383
+ class: "mwnf-pagination__button",
384
+ disabled: f.value === g.value,
385
+ onClick: s[2] ||= (e) => x(f.value + 1)
386
+ }, v(y(u)("core.pagination.next")) + " › ", 9, Le),
387
+ n.ends ? (p(), i("button", {
388
+ key: 1,
389
+ type: "button",
390
+ class: "mwnf-pagination__button",
391
+ disabled: f.value === g.value,
392
+ onClick: s[3] ||= (e) => x(g.value)
393
+ }, v(y(u)("catalogue.pagination.last")) + " » ", 9, Re)) : r("", !0),
394
+ a("span", ze, [n.jump ? (p(), i(e, { key: 0 }, [
395
+ a("label", Be, [a("span", null, v(y(u)("catalogue.pagination.page")), 1), D(a("input", {
396
+ "onUpdate:modelValue": s[4] ||= (e) => b.value = e,
397
+ class: "mwnf-pagination__jump-field",
398
+ type: "number",
399
+ min: "1",
400
+ max: g.value,
401
+ onKeyup: s[5] ||= O((e) => x(b.value), ["enter"])
402
+ }, null, 40, Ve), [[C, b.value]])]),
403
+ a("span", null, "/ " + v(g.value), 1),
404
+ a("button", {
405
+ type: "button",
406
+ class: "mwnf-pagination__button",
407
+ onClick: s[6] ||= (e) => x(b.value)
408
+ }, v(y(u)("catalogue.pagination.go")), 1)
409
+ ], 64)) : (p(), i(e, { key: 1 }, [o(v(f.value) + " / " + v(g.value), 1)], 64))])
410
+ ], 8, Ne)) : r("", !0);
411
+ }
412
+ }, Ue = ["for"], We = {
413
+ key: 0,
414
+ class: "mwnf-facet__label"
415
+ }, Ge = [
416
+ "id",
417
+ "value",
418
+ "disabled"
419
+ ], Ke = {
420
+ key: 0,
421
+ value: "",
422
+ disabled: ""
423
+ }, qe = {
424
+ key: 1,
425
+ value: ""
426
+ }, Je = ["value"], Ye = {
427
+ __name: "FacetSelect",
428
+ props: {
429
+ label: {
430
+ type: String,
431
+ default: ""
432
+ },
433
+ options: {
434
+ type: Array,
435
+ default: () => []
436
+ },
437
+ modelValue: {
438
+ type: [String, Number],
439
+ default: ""
440
+ },
441
+ placeholder: {
442
+ type: String,
443
+ default: ""
444
+ },
445
+ anyLabel: {
446
+ type: String,
447
+ default: ""
448
+ },
449
+ disabled: {
450
+ type: Boolean,
451
+ default: !1
452
+ },
453
+ hideEmpty: {
454
+ type: Boolean,
455
+ default: !1
456
+ }
457
+ },
458
+ emits: ["update:modelValue"],
459
+ setup(n, { emit: o }) {
460
+ let s = n, c = o, l = b(), u = t(() => !s.hideEmpty || s.options.length > 0);
461
+ return (t, o) => u.value ? (p(), i("label", {
462
+ key: 0,
463
+ class: "mwnf-facet",
464
+ for: y(l)
465
+ }, [n.label ? (p(), i("span", We, v(n.label), 1)) : r("", !0), a("select", {
466
+ id: y(l),
467
+ class: "mwnf-facet__select",
468
+ value: String(n.modelValue ?? ""),
469
+ disabled: n.disabled,
470
+ onChange: o[0] ||= (e) => c("update:modelValue", e.target.value)
471
+ }, [
472
+ n.placeholder ? (p(), i("option", Ke, v(n.placeholder), 1)) : r("", !0),
473
+ n.anyLabel ? (p(), i("option", qe, v(n.anyLabel), 1)) : r("", !0),
474
+ (p(!0), i(e, null, h(n.options, (e) => (p(), i("option", {
475
+ key: e.value,
476
+ value: String(e.value)
477
+ }, v(e.label), 9, Je))), 128))
478
+ ], 40, Ge)], 8, Ue)) : r("", !0);
479
+ }
480
+ }, Xe = {
481
+ key: 0,
482
+ class: "mwnf-filter__title"
483
+ }, Ze = ["disabled"], Qe = { class: "mwnf-filter__actions" }, $e = {
484
+ key: 0,
485
+ type: "submit",
486
+ class: "mwnf-filter__button mwnf-filter__button--apply"
487
+ }, et = {
488
+ __name: "FilterPanel",
489
+ props: {
490
+ title: {
491
+ type: String,
492
+ default: ""
493
+ },
494
+ mode: {
495
+ type: String,
496
+ default: "apply"
497
+ },
498
+ applyLabel: {
499
+ type: String,
500
+ default: ""
501
+ },
502
+ resetLabel: {
503
+ type: String,
504
+ default: ""
505
+ },
506
+ disabled: {
507
+ type: Boolean,
508
+ default: !1
509
+ }
510
+ },
511
+ emits: ["apply", "reset"],
512
+ setup(e, { emit: t }) {
513
+ let n = t, { t: o } = A();
514
+ return (t, s) => (p(), i("form", {
515
+ class: d(["mwnf-filter", `mwnf-filter--${e.mode}`]),
516
+ onSubmit: s[1] ||= k((e) => n("apply"), ["prevent"])
517
+ }, [
518
+ e.title ? (p(), i("p", Xe, v(e.title), 1)) : r("", !0),
519
+ a("fieldset", {
520
+ class: "mwnf-filter__controls",
521
+ disabled: e.disabled
522
+ }, [g(t.$slots, "default")], 8, Ze),
523
+ a("div", Qe, [e.mode === "apply" ? (p(), i("button", $e, v(e.applyLabel || y(o)("core.action.apply")), 1)) : r("", !0), a("button", {
524
+ type: "button",
525
+ class: "mwnf-filter__button mwnf-filter__button--reset",
526
+ onClick: s[0] ||= (e) => n("reset")
527
+ }, v(e.resetLabel || y(o)("core.action.reset")), 1)])
528
+ ], 34));
529
+ }
530
+ }, tt = {
531
+ key: 0,
532
+ class: "mwnf-summary"
533
+ }, nt = {
534
+ key: 0,
535
+ class: "mwnf-summary__parts"
536
+ }, rt = {
537
+ key: 0,
538
+ class: "mwnf-summary__label"
539
+ }, it = {
540
+ key: 1,
541
+ class: "mwnf-summary__count"
542
+ }, at = {
543
+ key: 2,
544
+ class: "mwnf-summary__value"
545
+ }, ot = {
546
+ key: 1,
547
+ class: "mwnf-summary__actions"
548
+ }, st = {
549
+ __name: "ResultsSummary",
550
+ props: { parts: {
551
+ type: Array,
552
+ default: () => []
553
+ } },
554
+ setup(t) {
555
+ let n = !!x().actions;
556
+ return (a, s) => t.parts.length || a.$slots.default || y(n) ? (p(), i("div", tt, [
557
+ t.parts.length ? (p(), i("p", nt, [(p(!0), i(e, null, h(t.parts, (e, t) => (p(), i("span", {
558
+ key: t,
559
+ class: "mwnf-summary__part"
560
+ }, [
561
+ e.label ? (p(), i("span", rt, v(e.label), 1)) : r("", !0),
562
+ s[0] ||= o(v(" "), -1),
563
+ e.count == null ? r("", !0) : (p(), i("span", it, v(e.count), 1)),
564
+ s[1] ||= o(v(" "), -1),
565
+ e.value ? (p(), i("span", at, v(e.value), 1)) : r("", !0)
566
+ ]))), 128))])) : r("", !0),
567
+ g(a.$slots, "default"),
568
+ y(n) ? (p(), i("div", ot, [g(a.$slots, "actions")])) : r("", !0)
569
+ ])) : r("", !0);
570
+ }
571
+ }, ct = ["aria-label"], lt = [
572
+ "aria-pressed",
573
+ "lang",
574
+ "onClick"
575
+ ], ut = {
576
+ __name: "RecordLanguages",
577
+ props: {
578
+ languages: {
579
+ type: Array,
580
+ default: () => []
581
+ },
582
+ language: {
583
+ type: String,
584
+ default: ""
585
+ }
586
+ },
587
+ emits: ["select"],
588
+ setup(n, { emit: a }) {
589
+ let o = n, s = a, { t: c } = A(), l = t(() => o.languages.map((e) => typeof e == "string" ? {
590
+ code: e,
591
+ label: e.toUpperCase()
592
+ } : e));
593
+ return (t, a) => l.value.length > 1 ? (p(), i("div", {
594
+ key: 0,
595
+ class: "mwnf-languages",
596
+ role: "group",
597
+ "aria-label": y(c)("record.sheet.languages")
598
+ }, [(p(!0), i(e, null, h(l.value, (e) => (p(), i("button", {
599
+ key: e.code,
600
+ type: "button",
601
+ class: d(["mwnf-languages__button", { "mwnf-languages__button--active": e.code === n.language }]),
602
+ "aria-pressed": e.code === n.language ? "true" : "false",
603
+ lang: e.code,
604
+ onClick: (t) => s("select", e.code)
605
+ }, v(e.label), 11, lt))), 128))], 8, ct)) : r("", !0);
606
+ }
607
+ }, dt = ["dir"], ft = { key: 0 }, pt = {
608
+ class: "mwnf-sheet__label",
609
+ scope: "row"
610
+ }, mt = { class: "mwnf-sheet__value" }, ht = ["href"], gt = ["innerHTML"], _t = {
611
+ key: 0,
612
+ class: "mwnf-sheet__row mwnf-sheet__row--short"
613
+ }, vt = {
614
+ class: "mwnf-sheet__label",
615
+ scope: "row"
616
+ }, 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 = {
617
+ __name: "RecordSheet",
618
+ props: {
619
+ rows: {
620
+ type: Array,
621
+ default: () => []
622
+ },
623
+ layout: {
624
+ type: String,
625
+ default: "table"
626
+ },
627
+ dir: {
628
+ type: String,
629
+ default: ""
630
+ },
631
+ shortDescription: {
632
+ type: Object,
633
+ default: null
634
+ },
635
+ shortDescriptionAfter: {
636
+ type: String,
637
+ default: "description"
638
+ },
639
+ shortDescriptionOpen: {
640
+ type: Boolean,
641
+ default: !1
642
+ }
643
+ },
644
+ setup(t) {
645
+ let o = t, { t: s } = A(), c = m(o.shortDescriptionOpen);
646
+ T(() => o.shortDescription, () => {
647
+ c.value = o.shortDescriptionOpen;
648
+ });
649
+ let l = (e) => e.render === "custom" || e.render === "link";
650
+ return (o, u) => (p(), i("div", {
651
+ class: d(["mwnf-sheet", `mwnf-sheet--${t.layout}`]),
652
+ dir: t.dir || void 0
653
+ }, [(p(), n(_(t.layout === "list" ? "dl" : "table"), { class: "mwnf-sheet__rows" }, {
654
+ default: E(() => [t.layout === "list" ? (p(!0), i(e, { key: 1 }, h(t.rows, (n) => (p(), i(e, { key: n.key }, [
655
+ a("dt", { class: d(["mwnf-sheet__label", `mwnf-sheet__label--${n.key}`]) }, v(n.label), 3),
656
+ a("dd", St, [l(n) ? g(o.$slots, n.key, { row: n }, () => [n.render === "link" ? (p(), i("a", {
657
+ key: 0,
658
+ href: n.value,
659
+ target: "_blank",
660
+ rel: "noopener"
661
+ }, v(n.value), 9, Ct)) : r("", !0)], void 0, 0) : (p(), i("span", {
662
+ key: 1,
663
+ class: d(`mwnf-sheet__${n.render}`),
664
+ innerHTML: n.html
665
+ }, null, 10, wt))]),
666
+ t.shortDescription && n.key === t.shortDescriptionAfter ? (p(), i(e, { key: 0 }, [a("dt", Tt, [a("button", {
667
+ type: "button",
668
+ class: "mwnf-sheet__toggle",
669
+ "aria-expanded": c.value ? "true" : "false",
670
+ onClick: u[1] ||= (e) => c.value = !c.value
671
+ }, v(c.value ? y(s)("record.action.hideShortDescription") : y(s)("record.action.viewShortDescription")), 9, Et)]), a("dd", Dt, [c.value ? (p(), i("div", {
672
+ key: 0,
673
+ class: "mwnf-sheet__block",
674
+ innerHTML: t.shortDescription.html
675
+ }, null, 8, Ot)) : r("", !0)])], 64)) : r("", !0)
676
+ ], 64))), 128)) : (p(), i("tbody", ft, [(p(!0), i(e, null, h(t.rows, (n) => (p(), i(e, { key: n.key }, [a("tr", { class: d(["mwnf-sheet__row", `mwnf-sheet__row--${n.key}`]) }, [a("th", pt, v(n.label), 1), a("td", mt, [l(n) ? g(o.$slots, n.key, { row: n }, () => [n.render === "link" ? (p(), i("a", {
677
+ key: 0,
678
+ href: n.value,
679
+ target: "_blank",
680
+ rel: "noopener"
681
+ }, v(n.value), 9, ht)) : r("", !0)], void 0, 0) : (p(), i("span", {
682
+ key: 1,
683
+ class: d(`mwnf-sheet__${n.render}`),
684
+ innerHTML: n.html
685
+ }, null, 10, gt))])], 2), t.shortDescription && n.key === t.shortDescriptionAfter ? (p(), i("tr", _t, [a("th", vt, [a("button", {
686
+ type: "button",
687
+ class: "mwnf-sheet__toggle",
688
+ "aria-expanded": c.value ? "true" : "false",
689
+ onClick: u[0] ||= (e) => c.value = !c.value
690
+ }, v(c.value ? y(s)("record.action.hideShortDescription") : y(s)("record.action.viewShortDescription")), 9, yt)]), a("td", bt, [c.value ? (p(), i("div", {
691
+ key: 0,
692
+ class: "mwnf-sheet__block",
693
+ innerHTML: t.shortDescription.html
694
+ }, null, 8, xt)) : r("", !0)])])) : r("", !0)], 64))), 128))]))]),
695
+ _: 3
696
+ }))], 10, dt));
697
+ }
698
+ }, At = ["dir"], jt = {
699
+ key: 0,
700
+ class: "mwnf-sheet-section__heading"
701
+ }, Mt = ["innerHTML"], Y = {
702
+ __name: "SheetSection",
703
+ props: {
704
+ heading: {
705
+ type: String,
706
+ default: ""
707
+ },
708
+ html: {
709
+ type: String,
710
+ default: ""
711
+ },
712
+ dir: {
713
+ type: String,
714
+ default: ""
715
+ }
716
+ },
717
+ setup(e) {
718
+ return (t, n) => (p(), i("section", {
719
+ class: "mwnf-sheet-section",
720
+ dir: e.dir || void 0
721
+ }, [
722
+ e.heading ? (p(), i("h2", jt, v(e.heading), 1)) : r("", !0),
723
+ e.html ? (p(), i("div", {
724
+ key: 1,
725
+ class: "mwnf-sheet-section__body mwnf-sheet__block",
726
+ innerHTML: e.html
727
+ }, null, 8, Mt)) : r("", !0),
728
+ g(t.$slots, "default")
729
+ ], 8, At));
730
+ }
731
+ }, Nt = {
732
+ key: 0,
733
+ class: "mwnf-credits"
734
+ }, Pt = {
735
+ key: 0,
736
+ class: "mwnf-credits__heading"
737
+ }, Ft = {
738
+ key: 1,
739
+ class: "mwnf-credits__list"
740
+ }, It = { class: "mwnf-credits__label" }, Lt = { class: "mwnf-credits__value" }, Rt = {
741
+ key: 2,
742
+ class: "mwnf-credits__number"
743
+ }, zt = {
744
+ key: 0,
745
+ class: "mwnf-credits__label"
746
+ }, Bt = { class: "mwnf-credits__heading" }, Vt = { class: "mwnf-credits__citation" }, Ht = {
747
+ __name: "RecordCredits",
748
+ props: {
749
+ credits: {
750
+ type: Array,
751
+ default: () => []
752
+ },
753
+ workingNumber: {
754
+ type: String,
755
+ default: ""
756
+ },
757
+ workingNumberLabel: {
758
+ type: String,
759
+ default: ""
760
+ },
761
+ citation: {
762
+ type: String,
763
+ default: ""
764
+ },
765
+ heading: {
766
+ type: String,
767
+ default: ""
768
+ },
769
+ citationHeading: {
770
+ type: String,
771
+ default: ""
772
+ }
773
+ },
774
+ setup(n) {
775
+ let o = n, { t: s } = A(), c = t(() => o.credits.length > 0 || o.workingNumber || o.citation);
776
+ return (t, o) => c.value ? (p(), i("section", Nt, [
777
+ n.credits.length || n.workingNumber ? (p(), i("h2", Pt, v(n.heading || y(s)("record.sheet.credits")), 1)) : r("", !0),
778
+ n.credits.length ? (p(), i("dl", Ft, [(p(!0), i(e, null, h(n.credits, (t) => (p(), i(e, { key: t.label }, [a("dt", It, v(t.label), 1), a("dd", Lt, v(t.value), 1)], 64))), 128))])) : r("", !0),
779
+ n.workingNumber ? (p(), i("p", Rt, [n.workingNumberLabel ? (p(), i("span", zt, v(n.workingNumberLabel), 1)) : r("", !0), a("strong", null, v(n.workingNumber), 1)])) : r("", !0),
780
+ n.citation ? (p(), i(e, { key: 3 }, [a("h2", Bt, v(n.citationHeading || y(s)("record.citation.heading")), 1), a("p", Vt, v(n.citation), 1)], 64)) : r("", !0)
781
+ ])) : r("", !0);
782
+ }
783
+ }, Ut = {
784
+ key: 0,
785
+ class: "mwnf-source-credit"
786
+ }, Wt = { class: "mwnf-source-credit__label" }, Gt = ["href"], Kt = {
787
+ __name: "SourceCredit",
788
+ props: {
789
+ route: {
790
+ type: [Object, String],
791
+ default: null
792
+ },
793
+ labelEntry: {
794
+ type: String,
795
+ default: "record.source.label"
796
+ }
797
+ },
798
+ setup(e) {
799
+ let n = e, { t: s } = A(), c = F(), l = t(() => P(n.route ?? c));
800
+ return (t, n) => l.value ? (p(), i("p", Ut, [
801
+ a("span", Wt, v(y(s)(e.labelEntry)), 1),
802
+ n[0] ||= o(),
803
+ a("a", { href: l.value }, v(l.value), 9, Gt)
804
+ ])) : r("", !0);
805
+ }
806
+ }, qt = {
807
+ key: 0,
808
+ class: "mwnf-related"
809
+ }, Jt = {
810
+ key: 0,
811
+ class: "mwnf-related__heading"
812
+ }, Yt = {
813
+ __name: "RelatedRecords",
814
+ props: {
815
+ heading: {
816
+ type: String,
817
+ default: ""
818
+ },
819
+ records: {
820
+ type: Array,
821
+ default: () => []
822
+ },
823
+ variant: {
824
+ type: String,
825
+ default: "list"
826
+ },
827
+ actionLabel: {
828
+ type: String,
829
+ default: ""
830
+ }
831
+ },
832
+ setup(e) {
833
+ return (t, a) => e.records.length || t.$slots.default ? (p(), i("section", qt, [
834
+ e.heading ? (p(), i("h2", Jt, v(e.heading), 1)) : r("", !0),
835
+ e.variant === "grid" ? (p(), n(J, {
836
+ key: 1,
837
+ records: e.records,
838
+ "action-label": e.actionLabel
839
+ }, null, 8, ["records", "action-label"])) : (p(), n(q, {
840
+ key: 2,
841
+ records: e.records
842
+ }, null, 8, ["records"])),
843
+ g(t.$slots, "default")
844
+ ])) : r("", !0);
845
+ }
846
+ }, Xt = ["src", "alt"], Zt = {
847
+ key: 0,
848
+ class: "mwnf-media__caption"
849
+ }, Qt = { key: 0 }, $t = {
850
+ key: 1,
851
+ class: "mwnf-media__credit"
852
+ }, en = {
853
+ key: 2,
854
+ class: "mwnf-media__credit"
855
+ }, tn = ["src", "alt"], nn = {
856
+ key: 0,
857
+ class: "mwnf-media__thumbs"
858
+ }, rn = [
859
+ "aria-pressed",
860
+ "title",
861
+ "onClick"
862
+ ], an = ["src", "alt"], on = {
863
+ key: 1,
864
+ class: "mwnf-media__caption"
865
+ }, sn = { key: 0 }, cn = {
866
+ key: 1,
867
+ class: "mwnf-media__credit"
868
+ }, ln = ["aria-label"], un = ["aria-label"], dn = ["src", "alt"], fn = ["aria-label"], X = {
869
+ __name: "MediaGallery",
870
+ props: {
871
+ images: {
872
+ type: Array,
873
+ default: () => []
874
+ },
875
+ start: {
876
+ type: Number,
877
+ default: 0
878
+ },
879
+ variant: {
880
+ type: String,
881
+ default: ""
882
+ }
883
+ },
884
+ setup(n) {
885
+ let o = n, { t: s } = A(), c = m(Math.min(o.start, Math.max(0, o.images.length - 1)));
886
+ T(() => o.images, () => {
887
+ c.value = 0;
888
+ });
889
+ let l = t(() => o.images[c.value] ?? null), u = t(() => {
890
+ let e = [];
891
+ return l.value?.photographer && e.push(`${s("record.media.photograph")}: ${l.value.photographer}`), l.value?.copyright && e.push(`© ${l.value.copyright}`), e.join(" — ");
892
+ }), g = m(!1), _ = null, b = m(null);
893
+ function x(e) {
894
+ c.value = (e + o.images.length) % o.images.length;
895
+ }
896
+ function S() {
897
+ l.value && (_ = document.activeElement, g.value = !0, document.addEventListener("keydown", w), requestAnimationFrame(() => b.value?.focus?.()));
898
+ }
899
+ function C() {
900
+ g.value = !1, document.removeEventListener("keydown", w), _?.focus?.(), _ = null;
901
+ }
902
+ function w(e) {
903
+ e.key === "Escape" ? C() : e.key === "ArrowRight" ? x(c.value + 1) : e.key === "ArrowLeft" && x(c.value - 1);
904
+ }
905
+ return f(() => document.removeEventListener("keydown", w)), (t, o) => n.images.length ? (p(), i("div", {
906
+ key: 0,
907
+ class: d(["mwnf-media", n.variant ? `mwnf-media--${n.variant}` : ""])
908
+ }, [n.variant === "row" ? (p(!0), i(e, { key: 0 }, h(n.images, (e, t) => (p(), i("figure", {
909
+ key: e.url ?? t,
910
+ class: "mwnf-media__figure"
911
+ }, [a("img", {
912
+ class: "mwnf-media__image",
913
+ src: e.url,
914
+ alt: e.alt ?? "",
915
+ loading: "lazy"
916
+ }, null, 8, Xt), e.caption || e.photographer || e.copyright ? (p(), i("figcaption", Zt, [
917
+ e.caption ? (p(), i("span", Qt, v(e.caption), 1)) : r("", !0),
918
+ e.photographer ? (p(), i("span", $t, v(y(s)("record.media.photograph")) + ": " + v(e.photographer), 1)) : r("", !0),
919
+ e.copyright ? (p(), i("span", en, "© " + v(e.copyright), 1)) : r("", !0)
920
+ ])) : r("", !0)]))), 128)) : (p(), i(e, { key: 1 }, [
921
+ a("button", {
922
+ type: "button",
923
+ class: "mwnf-media__main",
924
+ onClick: S
925
+ }, [a("img", {
926
+ class: "mwnf-media__image",
927
+ src: l.value.url,
928
+ alt: l.value.alt ?? ""
929
+ }, null, 8, tn)]),
930
+ n.images.length > 1 ? (p(), i("ul", nn, [(p(!0), i(e, null, h(n.images, (e, t) => (p(), i("li", { key: e.url ?? t }, [a("button", {
931
+ type: "button",
932
+ class: d(["mwnf-media__thumb", { "mwnf-media__thumb--active": t === c.value }]),
933
+ "aria-pressed": t === c.value ? "true" : "false",
934
+ title: [e.photographer, e.copyright].filter(Boolean).join(" — ") || void 0,
935
+ onClick: (e) => x(t)
936
+ }, [a("img", {
937
+ src: e.url,
938
+ alt: e.alt ?? "",
939
+ loading: "lazy"
940
+ }, null, 8, an)], 10, rn)]))), 128))])) : r("", !0),
941
+ l.value.caption || u.value ? (p(), i("p", on, [l.value.caption ? (p(), i("span", sn, v(l.value.caption), 1)) : r("", !0), u.value ? (p(), i("span", cn, v(u.value), 1)) : r("", !0)])) : r("", !0),
942
+ g.value ? (p(), i("div", {
943
+ key: 2,
944
+ class: "mwnf-lightbox",
945
+ role: "dialog",
946
+ "aria-modal": "true",
947
+ onClick: k(C, ["self"])
948
+ }, [
949
+ a("button", {
950
+ ref_key: "closeButton",
951
+ ref: b,
952
+ type: "button",
953
+ class: "mwnf-lightbox__close",
954
+ "aria-label": y(s)("core.action.close"),
955
+ onClick: C
956
+ }, "✕", 8, ln),
957
+ n.images.length > 1 ? (p(), i("button", {
958
+ key: 0,
959
+ type: "button",
960
+ class: "mwnf-lightbox__control mwnf-lightbox__control--previous",
961
+ "aria-label": y(s)("core.pagination.previous"),
962
+ onClick: o[0] ||= k((e) => x(c.value - 1), ["stop"])
963
+ }, "‹", 8, un)) : r("", !0),
964
+ a("img", {
965
+ class: "mwnf-lightbox__image",
966
+ src: l.value.url,
967
+ alt: l.value.alt ?? ""
968
+ }, null, 8, dn),
969
+ n.images.length > 1 ? (p(), i("button", {
970
+ key: 1,
971
+ type: "button",
972
+ class: "mwnf-lightbox__control mwnf-lightbox__control--next",
973
+ "aria-label": y(s)("core.pagination.next"),
974
+ onClick: o[1] ||= k((e) => x(c.value + 1), ["stop"])
975
+ }, "›", 8, fn)) : r("", !0)
976
+ ])) : r("", !0)
977
+ ], 64))], 2)) : r("", !0);
978
+ }
979
+ }, pn = ["aria-label", "dir"], mn = { class: "mwnf-popover__title" }, hn = ["aria-label"], gn = { class: "mwnf-popover__body" }, _n = { class: "mwnf-popover__term" }, vn = ["innerHTML"], yn = {
980
+ key: 1,
981
+ class: "mwnf-popover__definition"
982
+ }, bn = {
983
+ __name: "GlossaryPopover",
984
+ props: {
985
+ term: {
986
+ type: Object,
987
+ default: null
988
+ },
989
+ html: {
990
+ type: String,
991
+ default: ""
992
+ },
993
+ dir: {
994
+ type: String,
995
+ default: ""
996
+ }
997
+ },
998
+ emits: ["close"],
999
+ setup(e, { emit: t }) {
1000
+ let n = e, o = t, { t: s } = A(), c = m(null), l = null;
1001
+ function u() {
1002
+ o("close");
1003
+ }
1004
+ function d(e) {
1005
+ e.key === "Escape" && u();
1006
+ }
1007
+ return T(() => n.term, (e, t) => {
1008
+ e && !t ? (l = document.activeElement, document.addEventListener("keydown", d), requestAnimationFrame(() => c.value?.focus?.())) : !e && t && (document.removeEventListener("keydown", d), l?.focus?.(), l = null);
1009
+ }, { immediate: !0 }), f(() => document.removeEventListener("keydown", d)), (t, n) => e.term ? (p(), i("aside", {
1010
+ key: 0,
1011
+ class: "mwnf-popover",
1012
+ role: "dialog",
1013
+ "aria-label": y(s)("record.glossary.heading"),
1014
+ dir: e.dir || void 0
1015
+ }, [a("div", mn, [a("span", null, v(y(s)("record.glossary.heading")), 1), a("button", {
1016
+ ref_key: "closeButton",
1017
+ ref: c,
1018
+ type: "button",
1019
+ class: "mwnf-popover__close",
1020
+ "aria-label": y(s)("record.glossary.close"),
1021
+ onClick: u
1022
+ }, "✕", 8, hn)]), a("div", gn, [a("p", _n, v(e.term.spelling || e.term.word), 1), e.html ? (p(), i("div", {
1023
+ key: 0,
1024
+ class: "mwnf-popover__definition mwnf-sheet__block",
1025
+ innerHTML: e.html
1026
+ }, null, 8, vn)) : e.term.definition ? (p(), i("p", yn, v(e.term.definition), 1)) : r("", !0)])], 8, pn)) : r("", !0);
1027
+ }
1028
+ }, xn = {
1029
+ key: 0,
1030
+ class: "mwnf-partner-map"
1031
+ }, Sn = { class: "mwnf-partner-map__title" }, Cn = ["src", "title"], wn = { class: "mwnf-partner-map__link" }, Tn = ["href"], Z = {
1032
+ __name: "PartnerMap",
1033
+ props: {
1034
+ latitude: {
1035
+ type: Number,
1036
+ default: null
1037
+ },
1038
+ longitude: {
1039
+ type: Number,
1040
+ default: null
1041
+ },
1042
+ zoom: {
1043
+ type: Number,
1044
+ default: 15
1045
+ },
1046
+ mapTitleEntry: {
1047
+ type: String,
1048
+ default: "partner.map.map"
1049
+ },
1050
+ mapOfEntry: {
1051
+ type: String,
1052
+ default: "partner.map.mapOf"
1053
+ },
1054
+ openMapLinkEntry: {
1055
+ type: String,
1056
+ default: "partner.map.openInOpenStreetMap"
1057
+ },
1058
+ label: {
1059
+ type: String,
1060
+ default: ""
1061
+ }
1062
+ },
1063
+ setup(e) {
1064
+ let n = e, { t: o } = A(), s = t(() => Number.isFinite(n.latitude) && Number.isFinite(n.longitude)), c = t(() => {
1065
+ let e = 360 / 2 ** Math.max(1, Math.min(19, n.zoom || 15)), [t, r] = [n.latitude, n.longitude];
1066
+ return [
1067
+ r - e,
1068
+ t - e / 2,
1069
+ r + e,
1070
+ t + e / 2
1071
+ ].join("%2C");
1072
+ }), l = t(() => `https://www.openstreetmap.org/export/embed.html?bbox=${c.value}&layer=mapnik&marker=${n.latitude}%2C${n.longitude}`), u = t(() => n.label ? `${o(n.mapOfEntry)} ${n.label}` : o(n.mapTitleEntry)), d = t(() => `https://www.openstreetmap.org/?mlat=${n.latitude}&mlon=${n.longitude}#map=${n.zoom || 15}/${n.latitude}/${n.longitude}`);
1073
+ return (t, n) => s.value ? (p(), i("div", xn, [
1074
+ a("p", Sn, v(t.$t(e.mapTitleEntry)), 1),
1075
+ a("iframe", {
1076
+ src: l.value,
1077
+ title: u.value,
1078
+ loading: "lazy",
1079
+ referrerpolicy: "no-referrer",
1080
+ class: "mwnf-partner-map__embed"
1081
+ }, null, 8, Cn),
1082
+ a("p", wn, [a("a", {
1083
+ href: d.value,
1084
+ target: "_blank",
1085
+ rel: "noopener"
1086
+ }, "↗ " + v(t.$t(e.openMapLinkEntry)), 9, Tn)])
1087
+ ])) : r("", !0);
1088
+ }
1089
+ }, En = ["dir"], Dn = ["src", "alt"], On = { class: "mwnf-partner-panel__text" }, kn = ["innerHTML"], An = { key: 0 }, jn = {
1090
+ key: 0,
1091
+ class: "mwnf-partner-panel__count"
1092
+ }, Mn = {
1093
+ key: 1,
1094
+ class: "mwnf-partner-panel__count mwnf-partner-panel__count--empty"
1095
+ }, Nn = {
1096
+ key: 0,
1097
+ class: "mwnf-partner-panel__actions"
1098
+ }, Pn = ["dir"], Fn = ["src", "alt"], In = ["innerHTML"], Ln = {
1099
+ key: 0,
1100
+ class: "mwnf-partner-panel__location"
1101
+ }, Rn = {
1102
+ key: 2,
1103
+ class: "mwnf-partner-panel__line"
1104
+ }, zn = ["innerHTML"], Bn = { class: "mwnf-partner-panel__location" }, Vn = ["dir"], Hn = { class: "mwnf-partner-panel__header" }, Un = {
1105
+ key: 0,
1106
+ class: "mwnf-partner-panel__location"
1107
+ }, Wn = {
1108
+ key: 0,
1109
+ class: "mwnf-partner-panel__bar"
1110
+ }, Gn = ["aria-label"], Kn = {
1111
+ key: 0,
1112
+ class: "mwnf-partner-panel__divider",
1113
+ "aria-hidden": "true"
1114
+ }, qn = [
1115
+ "id",
1116
+ "aria-selected",
1117
+ "aria-controls",
1118
+ "tabindex",
1119
+ "onClick"
1120
+ ], Jn = ["href"], Yn = ["href"], Xn = {
1121
+ key: 2,
1122
+ class: "mwnf-partner-panel__actions"
1123
+ }, Zn = { class: "mwnf-partner-panel__body" }, Qn = { class: "mwnf-partner-panel__panels" }, $n = ["innerHTML"], er = {
1124
+ key: 2,
1125
+ class: "mwnf-partner-panel__contact"
1126
+ }, tr = { class: "mwnf-partner-panel__contact-heading" }, nr = ["innerHTML"], rr = { key: 1 }, ir = { key: 2 }, ar = { key: 3 }, or = ["href"], sr = {
1127
+ key: 4,
1128
+ class: "mwnf-partner-panel__links"
1129
+ }, cr = {
1130
+ key: 0,
1131
+ class: "mwnf-partner-panel__divider",
1132
+ "aria-hidden": "true"
1133
+ }, lr = ["href"], ur = {
1134
+ key: 0,
1135
+ class: "mwnf-partner-panel__person-title"
1136
+ }, dr = { key: 1 }, fr = { key: 2 }, pr = { key: 3 }, mr = { key: 4 }, hr = ["href"], gr = {
1137
+ key: 3,
1138
+ class: "mwnf-partner-panel__logos"
1139
+ }, _r = ["src", "alt"], vr = {
1140
+ __name: "PartnerPanel",
1141
+ props: {
1142
+ partner: {
1143
+ type: Object,
1144
+ default: null
1145
+ },
1146
+ variant: {
1147
+ type: String,
1148
+ default: "full"
1149
+ },
1150
+ layout: {
1151
+ type: String,
1152
+ default: "tabs"
1153
+ },
1154
+ show: {
1155
+ type: Object,
1156
+ default: () => ({})
1157
+ },
1158
+ heading: {
1159
+ type: Number,
1160
+ default: 0
1161
+ },
1162
+ label: {
1163
+ type: String,
1164
+ default: ""
1165
+ },
1166
+ objectsLabel: {
1167
+ type: String,
1168
+ default: "partner.item.objectsInSite"
1169
+ },
1170
+ emptyLabel: {
1171
+ type: String,
1172
+ default: ""
1173
+ },
1174
+ homepageLabel: {
1175
+ type: String,
1176
+ default: "partner.nav.homepage"
1177
+ },
1178
+ readMoreLabel: {
1179
+ type: String,
1180
+ default: "partner.action.readMore"
1181
+ },
1182
+ viewObjectsLabel: {
1183
+ type: String,
1184
+ default: "partner.action.viewObjects"
1185
+ },
1186
+ dir: {
1187
+ type: String,
1188
+ default: ""
1189
+ }
1190
+ },
1191
+ setup(c) {
1192
+ let f = c, { t: x } = A(), S = b(), C = {
1193
+ line: ["actions"],
1194
+ summary: ["logo"],
1195
+ full: []
1196
+ };
1197
+ function O(e) {
1198
+ let t = f.show?.[e];
1199
+ return t === void 0 ? !(C[f.variant] ?? []).includes(e) : !!t;
1200
+ }
1201
+ let k = t(() => f.partner), j = t(() => f.heading >= 1 && f.heading <= 6 ? `h${f.heading}` : "p"), M = t(() => f.heading >= 1 && f.heading <= 5 ? `h${f.heading + 1}` : "p"), N = t(() => k.value?.logos?.[0] ?? null), P = t(() => O("homepage") ? k.value?.contact?.website ?? null : null), F = t(() => {
1202
+ let e = k.value;
1203
+ if (!e) return [];
1204
+ let t = [];
1205
+ O("description") && t.push({
1206
+ key: "about",
1207
+ label: x("partner.info.about")
1208
+ });
1209
+ let n = O("persons") ? e.persons ?? [] : [], r = e.contact ?? {}, i = r.address || r.phone || r.fax || r.email || r.website || r.links?.length || n.length;
1210
+ return O("contact") && i && t.push({
1211
+ key: "contact",
1212
+ label: x("partner.info.contact")
1213
+ }), O("logos") && e.logos?.length && t.push({
1214
+ key: "logo",
1215
+ label: x("partner.info.logo")
1216
+ }), t;
1217
+ }), I = m("");
1218
+ T(() => [k.value?.id, F.value.map((e) => e.key).join()], () => {
1219
+ F.value.some((e) => e.key === I.value) || (I.value = F.value[0]?.key ?? "");
1220
+ }, { immediate: !0 }), T(() => k.value?.id, () => {
1221
+ I.value = F.value[0]?.key ?? "";
1222
+ });
1223
+ function R(e) {
1224
+ return `${S}-tab-${e}`;
1225
+ }
1226
+ function z(e) {
1227
+ return `${S}-panel-${e}`;
1228
+ }
1229
+ function B(e) {
1230
+ let t = F.value.map((e) => e.key), n = t.indexOf(I.value), r = {
1231
+ ArrowRight: (n + 1) % t.length,
1232
+ ArrowLeft: (n - 1 + t.length) % t.length,
1233
+ Home: 0,
1234
+ End: t.length - 1
1235
+ }[e.key];
1236
+ r === void 0 || !t.length || (e.preventDefault(), I.value = t[r], u(() => document.getElementById(R(t[r]))?.focus()));
1237
+ }
1238
+ let V = t(() => O("persons") ? k.value?.persons ?? [] : []), H = t(() => [...k.value?.contact?.website ? [k.value.contact.website] : [], ...k.value?.contact?.links ?? []]);
1239
+ return (t, u) => c.partner && c.variant === "line" ? (p(), i("div", {
1240
+ key: 0,
1241
+ class: "mwnf-partner-panel mwnf-partner-panel--line",
1242
+ dir: c.dir || void 0
1243
+ }, [
1244
+ O("logo") && N.value ? (p(), i("img", {
1245
+ key: 0,
1246
+ class: "mwnf-partner-panel__logo",
1247
+ src: N.value.url,
1248
+ alt: c.partner.plainName,
1249
+ loading: "lazy"
1250
+ }, null, 8, Dn)) : r("", !0),
1251
+ a("div", On, [
1252
+ g(t.$slots, "badge", { partner: c.partner }),
1253
+ (p(), n(_(c.partner.route ? L : "span"), {
1254
+ class: "mwnf-partner-panel__name",
1255
+ to: c.partner.route || void 0
1256
+ }, {
1257
+ default: E(() => [a("span", { innerHTML: c.partner.name }, null, 8, kn), O("location") && c.partner.city ? (p(), i("span", An, ", " + v(c.partner.city), 1)) : r("", !0)]),
1258
+ _: 1
1259
+ }, 8, ["to"])),
1260
+ g(t.$slots, "meta", { partner: c.partner }, () => [O("count") && c.partner.itemCount ? (p(), i("p", jn, v(c.partner.itemCount) + " " + v(y(x)(c.objectsLabel)), 1)) : O("count") && c.emptyLabel ? (p(), i("p", Mn, v(y(x)(c.emptyLabel)), 1)) : r("", !0)]),
1261
+ t.$slots.actions || O("actions") && c.partner.route ? (p(), i("p", Nn, [g(t.$slots, "actions", { partner: c.partner }, () => [s(L, { to: c.partner.route }, {
1262
+ default: E(() => [o(v(y(x)(c.readMoreLabel)), 1)]),
1263
+ _: 1
1264
+ }, 8, ["to"]), c.partner.objectsRoute ? (p(), i(e, { key: 0 }, [u[0] ||= a("span", {
1265
+ class: "mwnf-partner-panel__divider",
1266
+ "aria-hidden": "true"
1267
+ }, "|", -1), s(L, { to: c.partner.objectsRoute }, {
1268
+ default: E(() => [o(v(y(x)(c.viewObjectsLabel)), 1)]),
1269
+ _: 1
1270
+ }, 8, ["to"])], 64)) : r("", !0)])])) : r("", !0)
1271
+ ]),
1272
+ g(t.$slots, "after", { partner: c.partner })
1273
+ ], 8, En)) : c.partner && c.variant === "summary" ? (p(), i("div", {
1274
+ key: 1,
1275
+ class: d(["mwnf-partner-panel mwnf-partner-panel--summary", { "mwnf-partner-panel--heading": c.heading }]),
1276
+ dir: c.dir || void 0
1277
+ }, [
1278
+ O("logo") && N.value ? (p(), i("img", {
1279
+ key: 0,
1280
+ class: "mwnf-partner-panel__logo",
1281
+ src: N.value.url,
1282
+ alt: c.partner.plainName,
1283
+ loading: "lazy"
1284
+ }, null, 8, Fn)) : r("", !0),
1285
+ c.heading ? (p(), i(e, { key: 1 }, [
1286
+ g(t.$slots, "badge", { partner: c.partner }),
1287
+ (p(), n(_(j.value), { class: "mwnf-partner-panel__name" }, {
1288
+ default: E(() => [(p(), n(_(c.partner.route ? L : "span"), { to: c.partner.route || void 0 }, {
1289
+ default: E(() => [a("span", { innerHTML: c.partner.name }, null, 8, In)]),
1290
+ _: 1
1291
+ }, 8, ["to"]))]),
1292
+ _: 1
1293
+ })),
1294
+ O("location") && c.partner.location ? (p(), i("p", Ln, v(c.partner.location), 1)) : r("", !0),
1295
+ g(t.$slots, "meta", { partner: c.partner })
1296
+ ], 64)) : (p(), i("p", Rn, [
1297
+ g(t.$slots, "badge", { partner: c.partner }),
1298
+ (p(), n(_(c.partner.route ? L : "span"), {
1299
+ class: "mwnf-partner-panel__name",
1300
+ to: c.partner.route || void 0
1301
+ }, {
1302
+ default: E(() => [c.label ? (p(), i(e, { key: 0 }, [o(v(`${y(x)(c.label)} `), 1)], 64)) : r("", !0), a("span", { innerHTML: c.partner.name }, null, 8, zn)]),
1303
+ _: 1
1304
+ }, 8, ["to"])),
1305
+ O("location") && c.partner.location ? (p(), i(e, { key: 0 }, [u[1] ||= o(", ", -1), a("span", Bn, v(c.partner.location), 1)], 64)) : r("", !0),
1306
+ g(t.$slots, "meta", { partner: c.partner })
1307
+ ])),
1308
+ g(t.$slots, "actions", { partner: c.partner }),
1309
+ g(t.$slots, "after", { partner: c.partner })
1310
+ ], 10, Pn)) : c.partner ? (p(), i("div", {
1311
+ key: 2,
1312
+ class: d(["mwnf-partner-panel mwnf-partner-panel--full", `mwnf-partner-panel--${c.layout === "sections" ? "sections" : "tabs"}`]),
1313
+ dir: c.dir || void 0
1314
+ }, [
1315
+ a("div", Hn, [
1316
+ g(t.$slots, "badge", { partner: c.partner }),
1317
+ (p(), n(_(j.value), {
1318
+ class: "mwnf-partner-panel__name",
1319
+ innerHTML: c.partner.name
1320
+ }, null, 8, ["innerHTML"])),
1321
+ O("location") && c.partner.location ? (p(), i("p", Un, v(c.partner.location), 1)) : r("", !0),
1322
+ g(t.$slots, "meta", { partner: c.partner })
1323
+ ]),
1324
+ c.layout !== "sections" && F.value.length || P.value || t.$slots.actions ? (p(), i("div", Wn, [c.layout !== "sections" && F.value.length ? (p(), i("div", {
1325
+ key: 0,
1326
+ role: "tablist",
1327
+ class: "mwnf-partner-panel__tabs",
1328
+ "aria-label": c.partner.plainName,
1329
+ onKeydown: B
1330
+ }, [(p(!0), i(e, null, h(F.value, (t, n) => (p(), i(e, { key: t.key }, [n ? (p(), i("span", Kn, "|")) : r("", !0), a("button", {
1331
+ id: R(t.key),
1332
+ type: "button",
1333
+ role: "tab",
1334
+ class: d(["mwnf-partner-panel__tab", { "mwnf-partner-panel__tab--active": I.value === t.key }]),
1335
+ "aria-selected": I.value === t.key ? "true" : "false",
1336
+ "aria-controls": z(t.key),
1337
+ tabindex: I.value === t.key ? 0 : -1,
1338
+ onClick: (e) => I.value = t.key
1339
+ }, v(t.label), 11, qn)], 64))), 128)), P.value ? (p(), i(e, { key: 0 }, [u[2] ||= a("span", {
1340
+ class: "mwnf-partner-panel__divider",
1341
+ "aria-hidden": "true"
1342
+ }, "|", -1), a("a", {
1343
+ class: "mwnf-partner-panel__homepage",
1344
+ href: P.value.url,
1345
+ target: "_blank",
1346
+ rel: "noopener"
1347
+ }, "↗ " + v(y(x)(c.homepageLabel)), 9, Jn)], 64)) : r("", !0)], 40, Gn)) : P.value ? (p(), i("a", {
1348
+ key: 1,
1349
+ class: "mwnf-partner-panel__homepage",
1350
+ href: P.value.url,
1351
+ target: "_blank",
1352
+ rel: "noopener"
1353
+ }, "↗ " + v(y(x)(c.homepageLabel)), 9, Yn)) : r("", !0), t.$slots.actions ? (p(), i("div", Xn, [g(t.$slots, "actions", { partner: c.partner })])) : r("", !0)])) : r("", !0),
1354
+ a("div", Zn, [O("pictures") && c.partner.pictures?.length ? (p(), n(X, {
1355
+ key: 0,
1356
+ class: "mwnf-partner-panel__pictures",
1357
+ images: c.partner.pictures
1358
+ }, null, 8, ["images"])) : r("", !0), a("div", Qn, [(p(!0), i(e, null, h(F.value, (t) => D((p(), n(_(c.layout === "sections" ? "section" : "div"), l({
1359
+ id: z(t.key),
1360
+ key: t.key,
1361
+ class: ["mwnf-partner-panel__panel", `mwnf-partner-panel__panel--${t.key}`]
1362
+ }, { ref_for: !0 }, c.layout === "sections" ? {} : {
1363
+ role: "tabpanel",
1364
+ "aria-labelledby": R(t.key),
1365
+ tabindex: 0
1366
+ }), {
1367
+ default: E(() => [c.layout === "sections" ? (p(), n(_(M.value), {
1368
+ key: 0,
1369
+ class: "mwnf-partner-panel__section-title"
1370
+ }, {
1371
+ default: E(() => [o(v(t.label), 1)]),
1372
+ _: 2
1373
+ }, 1024)) : r("", !0), t.key === "about" ? (p(), i("div", {
1374
+ key: 1,
1375
+ class: "mwnf-prose mwnf-partner-panel__description",
1376
+ innerHTML: c.partner.description
1377
+ }, null, 8, $n)) : t.key === "contact" ? (p(), i("div", er, [
1378
+ c.partner.contact.address ? (p(), i(e, { key: 0 }, [a("p", tr, v(y(x)("partner.info.addresses")), 1), a("div", {
1379
+ class: "mwnf-prose mwnf-partner-panel__address",
1380
+ innerHTML: c.partner.contact.address
1381
+ }, null, 8, nr)], 64)) : r("", !0),
1382
+ c.partner.contact.phone ? (p(), i("p", rr, v(y(x)("partner.info.phone")) + " " + v(c.partner.contact.phone), 1)) : r("", !0),
1383
+ c.partner.contact.fax ? (p(), i("p", ir, v(y(x)("partner.info.fax")) + " " + v(c.partner.contact.fax), 1)) : r("", !0),
1384
+ c.partner.contact.email ? (p(), i("p", ar, [a("a", { href: `mailto:${c.partner.contact.email}` }, v(c.partner.contact.email), 9, or)])) : r("", !0),
1385
+ H.value.length ? (p(), i("p", sr, [(p(!0), i(e, null, h(H.value, (t, n) => (p(), i(e, { key: t.url }, [n ? (p(), i("span", cr, "|")) : r("", !0), a("a", {
1386
+ href: t.url,
1387
+ target: "_blank",
1388
+ rel: "noopener"
1389
+ }, v(t.label), 9, lr)], 64))), 128))])) : r("", !0),
1390
+ (p(!0), i(e, null, h(V.value, (e, t) => (p(), i("div", {
1391
+ key: t,
1392
+ class: "mwnf-partner-panel__person"
1393
+ }, [
1394
+ e.title ? (p(), i("p", ur, v(e.title), 1)) : r("", !0),
1395
+ e.name ? (p(), i("p", dr, v(e.name), 1)) : r("", !0),
1396
+ e.phone ? (p(), i("p", fr, v(y(x)("partner.info.phone")) + " " + v(e.phone), 1)) : r("", !0),
1397
+ e.fax ? (p(), i("p", pr, v(y(x)("partner.info.fax")) + " " + v(e.fax), 1)) : r("", !0),
1398
+ e.email ? (p(), i("p", mr, [a("a", { href: `mailto:${e.email}` }, v(e.email), 9, hr)])) : r("", !0)
1399
+ ]))), 128))
1400
+ ])) : t.key === "logo" ? (p(), i("div", gr, [(p(!0), i(e, null, h(c.partner.logos, (e) => (p(), i("img", {
1401
+ key: e.url,
1402
+ src: e.url,
1403
+ alt: e.alt
1404
+ }, null, 8, _r))), 128))])) : r("", !0)]),
1405
+ _: 2
1406
+ }, 1040, ["id", "class"])), [[w, c.layout === "sections" || I.value === t.key]])), 128))])]),
1407
+ O("map") && c.partner.map ? (p(), n(Z, {
1408
+ key: 1,
1409
+ class: "mwnf-partner-panel__map",
1410
+ latitude: c.partner.map.latitude,
1411
+ longitude: c.partner.map.longitude,
1412
+ zoom: c.partner.map.zoom,
1413
+ label: c.partner.map.label
1414
+ }, null, 8, [
1415
+ "latitude",
1416
+ "longitude",
1417
+ "zoom",
1418
+ "label"
1419
+ ])) : r("", !0),
1420
+ g(t.$slots, "after", { partner: c.partner })
1421
+ ], 10, Vn)) : r("", !0);
1422
+ }
1423
+ }, yr = ["dir"], br = { class: "mwnf-glossary-tool__toggle" }, xr = { class: "mwnf-glossary-tool__panel" }, Sr = { class: "mwnf-glossary-tool__heading" }, Cr = { class: "mwnf-glossary-tool__instructions" }, wr = ["aria-expanded", "aria-label"], Tr = {
1424
+ key: 0,
1425
+ class: "mwnf-glossary-tool__hits",
1426
+ role: "listbox"
1427
+ }, Er = [
1428
+ "aria-selected",
1429
+ "onClick",
1430
+ "onKeydown"
1431
+ ], Dr = {
1432
+ key: 1,
1433
+ class: "mwnf-glossary-tool__no-results"
1434
+ }, Or = {
1435
+ key: 2,
1436
+ class: "mwnf-glossary-tool__definition"
1437
+ }, kr = { class: "mwnf-glossary-tool__definition-label" }, Ar = ["innerHTML"], jr = {
1438
+ __name: "GlossaryTool",
1439
+ props: {
1440
+ language: {
1441
+ type: String,
1442
+ default: ""
1443
+ },
1444
+ entity: {
1445
+ type: String,
1446
+ default: "glossary"
1447
+ },
1448
+ labels: {
1449
+ type: Object,
1450
+ default: () => ({})
1451
+ },
1452
+ dir: {
1453
+ type: String,
1454
+ default: ""
1455
+ }
1456
+ },
1457
+ setup(n) {
1458
+ let o = n, s = {
1459
+ tool: "record.glossary.tool",
1460
+ heading: "record.glossary.heading",
1461
+ instructions: "record.glossary.instructions",
1462
+ definition: "record.glossary.definition",
1463
+ close: "record.glossary.close",
1464
+ ...o.labels
1465
+ }, { t: c } = A(), l = m(""), u = m(null), f = m(-1), g = t(() => l.value.trim() ? N(l.value, o.language, { entity: o.entity }) : []), _ = t(() => g.value.length > 0 && !u.value), b = t(() => u.value ? j(u.value.definition) : ""), x = t(() => s.noResults ? c(s.noResults) : ""), S = t(() => !!x.value && l.value.trim() && !u.value && g.value.length === 0);
1466
+ function w() {
1467
+ u.value = null, f.value = -1;
1468
+ }
1469
+ function T(e) {
1470
+ u.value = e, l.value = e.spelling, f.value = -1;
1471
+ }
1472
+ function E(e) {
1473
+ _.value && (e.key === "ArrowDown" ? (e.preventDefault(), f.value = (f.value + 1) % g.value.length) : e.key === "ArrowUp" ? (e.preventDefault(), f.value = (f.value - 1 + g.value.length) % g.value.length) : e.key === "Enter" && f.value >= 0 ? (e.preventDefault(), T(g.value[f.value])) : e.key === "Escape" && (f.value = -1));
1474
+ }
1475
+ return (t, o) => (p(), i("details", {
1476
+ class: "mwnf-glossary-tool",
1477
+ dir: n.dir || void 0
1478
+ }, [a("summary", br, v(y(c)(s.tool)), 1), a("div", xr, [
1479
+ a("p", Sr, v(y(c)(s.heading)), 1),
1480
+ a("p", Cr, v(y(c)(s.instructions)), 1),
1481
+ D(a("input", {
1482
+ "onUpdate:modelValue": o[0] ||= (e) => l.value = e,
1483
+ type: "text",
1484
+ class: "mwnf-glossary-tool__input",
1485
+ role: "combobox",
1486
+ "aria-autocomplete": "list",
1487
+ "aria-expanded": _.value,
1488
+ "aria-label": y(c)(s.heading),
1489
+ onInput: w,
1490
+ onKeydown: E
1491
+ }, null, 40, wr), [[C, l.value]]),
1492
+ _.value ? (p(), i("ul", Tr, [(p(!0), i(e, null, h(g.value, (e, t) => (p(), i("li", {
1493
+ key: e.id,
1494
+ role: "option",
1495
+ "aria-selected": t === f.value,
1496
+ tabindex: "0",
1497
+ class: d(["mwnf-glossary-tool__hit", { "mwnf-glossary-tool__hit--active": t === f.value }]),
1498
+ onClick: (t) => T(e),
1499
+ onKeydown: O((t) => T(e), ["enter"])
1500
+ }, v(e.spelling), 43, Er))), 128))])) : S.value ? (p(), i("p", Dr, v(x.value), 1)) : r("", !0),
1501
+ u.value ? (p(), i("div", Or, [a("p", kr, v(y(c)(s.definition)), 1), a("div", {
1502
+ class: "mwnf-sheet__block",
1503
+ innerHTML: b.value
1504
+ }, null, 8, Ar)])) : r("", !0)
1505
+ ])], 8, yr));
1506
+ }
1507
+ }, Mr = ["dir"], Nr = ["innerHTML"], Pr = { class: "mwnf-dynasty__body" }, Fr = { class: "mwnf-dynasty__eyebrow" }, Ir = {
1508
+ key: 0,
1509
+ class: "mwnf-dynasty__field"
1510
+ }, Lr = { class: "mwnf-dynasty__label" }, Rr = {
1511
+ key: 1,
1512
+ class: "mwnf-dynasty__field"
1513
+ }, zr = { class: "mwnf-dynasty__label" }, Br = {
1514
+ key: 2,
1515
+ class: "mwnf-dynasty__dates"
1516
+ }, Vr = {
1517
+ key: 3,
1518
+ class: "mwnf-dynasty__history"
1519
+ }, Hr = { class: "mwnf-dynasty__label" }, Ur = ["innerHTML"], Q = {
1520
+ __name: "DynastyPopout",
1521
+ props: {
1522
+ dynasty: {
1523
+ type: Object,
1524
+ required: !0
1525
+ },
1526
+ text: {
1527
+ type: Object,
1528
+ default: () => ({})
1529
+ },
1530
+ dir: {
1531
+ type: String,
1532
+ default: ""
1533
+ }
1534
+ },
1535
+ setup(e) {
1536
+ let n = e, { t: s } = A(), c = t(() => {
1537
+ let { from_ad: e, to_ad: t, from_ah: r, to_ah: i } = n.dynasty ?? {};
1538
+ return e == null && t == null ? "" : `${r != null || i != null ? `AH ${r ?? "?"}–${i ?? "?"} / ` : ""}AD ${e ?? "?"}–${t ?? "?"}`;
1539
+ });
1540
+ return (t, n) => (p(), i("details", {
1541
+ class: "mwnf-dynasty",
1542
+ dir: e.dir || void 0
1543
+ }, [a("summary", {
1544
+ class: "mwnf-dynasty__summary",
1545
+ innerHTML: y(M)(e.text.name || e.dynasty.id)
1546
+ }, null, 8, Nr), a("div", Pr, [
1547
+ a("p", Fr, v(y(s)("record.dynasty.heading")), 1),
1548
+ e.text.also_known_as ? (p(), i("p", Ir, [a("span", Lr, v(y(s)("sheet.field.alsoKnownAs")) + ":", 1), o(" " + v(e.text.also_known_as), 1)])) : r("", !0),
1549
+ e.text.area ? (p(), i("p", Rr, [a("span", zr, v(y(s)("sheet.field.area")) + ":", 1), o(" " + v(e.text.area), 1)])) : r("", !0),
1550
+ c.value ? (p(), i("p", Br, v(c.value), 1)) : r("", !0),
1551
+ e.text.history ? (p(), i("div", Vr, [a("p", Hr, v(y(s)("sheet.field.history")), 1), a("div", {
1552
+ class: "mwnf-sheet__block",
1553
+ innerHTML: y(j)(e.text.history)
1554
+ }, null, 8, Ur)])) : r("", !0)
1555
+ ])], 8, Mr));
1556
+ }
1557
+ }, Wr = ["dir"], Gr = {
1558
+ key: 0,
1559
+ class: "mwnf-dynasty-list__heading"
1560
+ }, Kr = {
1561
+ __name: "DynastyList",
1562
+ props: {
1563
+ heading: {
1564
+ type: String,
1565
+ default: ""
1566
+ },
1567
+ dynasties: {
1568
+ type: Array,
1569
+ default: () => []
1570
+ },
1571
+ tr: {
1572
+ type: Function,
1573
+ default: null
1574
+ },
1575
+ dir: {
1576
+ type: String,
1577
+ default: ""
1578
+ }
1579
+ },
1580
+ setup(t) {
1581
+ return (a, o) => t.dynasties.length ? (p(), i("section", {
1582
+ key: 0,
1583
+ class: "mwnf-dynasty-list",
1584
+ dir: t.dir || void 0
1585
+ }, [t.heading ? (p(), i("h2", Gr, v(t.heading), 1)) : r("", !0), (p(!0), i(e, null, h(t.dynasties, (e) => (p(), n(Q, {
1586
+ key: e.id,
1587
+ dynasty: e,
1588
+ text: t.tr ? t.tr(e) : e,
1589
+ dir: t.dir
1590
+ }, null, 8, [
1591
+ "dynasty",
1592
+ "text",
1593
+ "dir"
1594
+ ]))), 128))], 8, Wr)) : r("", !0);
1595
+ }
1596
+ }, qr = {
1597
+ key: 0,
1598
+ class: "mwnf-timeline__rows"
1599
+ }, Jr = { class: "mwnf-timeline__date" }, Yr = { class: "mwnf-timeline__body" }, Xr = {
1600
+ key: 0,
1601
+ class: "mwnf-timeline__caption"
1602
+ }, Zr = ["innerHTML"], Qr = ["innerHTML"], $r = {
1603
+ key: 2,
1604
+ class: "mwnf-timeline__media"
1605
+ }, $ = ["src", "alt"], ei = ["innerHTML"], ti = {
1606
+ key: 3,
1607
+ class: "mwnf-timeline__actions"
1608
+ }, ni = {
1609
+ key: 1,
1610
+ class: "mwnf-timeline__empty"
1611
+ }, ri = {
1612
+ __name: "TimelineEventList",
1613
+ props: { events: {
1614
+ type: Array,
1615
+ default: () => []
1616
+ } },
1617
+ setup(t) {
1618
+ let s = !!x().empty;
1619
+ return (c, l) => t.events.length ? (p(), i("ul", qr, [(p(!0), i(e, null, h(t.events, (t) => (p(), i("li", {
1620
+ key: t.id,
1621
+ class: "mwnf-timeline__row"
1622
+ }, [a("div", Jr, [g(c.$slots, "date", { event: t }, () => [o(v(t.date), 1)])]), a("div", Yr, [
1623
+ t.caption || c.$slots.caption ? (p(), i("div", Xr, [g(c.$slots, "caption", { event: t }, () => [a("span", { innerHTML: t.caption }, null, 8, Zr)])])) : r("", !0),
1624
+ t.description ? (p(), i("div", {
1625
+ key: 1,
1626
+ class: "mwnf-timeline__description mwnf-sheet__block",
1627
+ innerHTML: t.description
1628
+ }, null, 8, Qr)) : r("", !0),
1629
+ t.media?.length || c.$slots.media ? (p(), i("div", $r, [g(c.$slots, "media", { event: t }, () => [(p(!0), i(e, null, h(t.media ?? [], (e, t) => (p(), n(L, {
1630
+ key: t,
1631
+ class: "mwnf-timeline__media-item",
1632
+ to: e.to,
1633
+ href: e.href
1634
+ }, {
1635
+ default: E(() => [e.image ? (p(), i("img", {
1636
+ key: 0,
1637
+ src: e.image,
1638
+ alt: e.alt ?? "",
1639
+ loading: "lazy"
1640
+ }, null, 8, $)) : r("", !0), e.caption ? (p(), i("span", {
1641
+ key: 1,
1642
+ class: "mwnf-timeline__media-caption",
1643
+ innerHTML: e.caption
1644
+ }, null, 8, ei)) : r("", !0)]),
1645
+ _: 2
1646
+ }, 1032, ["to", "href"]))), 128))])])) : r("", !0),
1647
+ t.actions?.length || c.$slots.actions ? (p(), i("div", ti, [g(c.$slots, "actions", { event: t }, () => [(p(!0), i(e, null, h(t.actions ?? [], (e, t) => (p(), n(L, {
1648
+ key: t,
1649
+ class: "mwnf-timeline__action",
1650
+ to: e.to,
1651
+ href: e.href
1652
+ }, {
1653
+ default: E(() => [o(v(e.label) + " →", 1)]),
1654
+ _: 2
1655
+ }, 1032, ["to", "href"]))), 128))])])) : r("", !0)
1656
+ ])]))), 128))])) : y(s) ? (p(), i("div", ni, [g(c.$slots, "empty")])) : r("", !0);
1657
+ }
1658
+ }, ii = { class: "mwnf-sheet-timeline" }, ai = {
1659
+ key: 0,
1660
+ class: "mwnf-sheet-timeline__popout",
1661
+ dir: "ltr"
1662
+ }, oi = ["aria-label"], si = { class: "mwnf-sheet-timeline__title" }, ci = { class: "mwnf-sheet-timeline__option" }, li = ["value"], ui = { class: "mwnf-sheet-timeline__scroll" }, di = { class: "mwnf-sheet-timeline__subheader" }, fi = {
1663
+ key: 0,
1664
+ class: "mwnf-sheet-timeline__empty"
1665
+ }, pi = { class: "mwnf-sheet-timeline__date" }, mi = ["innerHTML"], hi = {
1666
+ __name: "TimelineLookup",
1667
+ props: { info: {
1668
+ type: Object,
1669
+ required: !0
1670
+ } },
1671
+ setup(n) {
1672
+ let c = n, { t: l } = A(), u = m(!1), d = m(c.info.defaultCountry ? c.info.defaultCountry() : "all");
1673
+ T(() => c.info, (e) => {
1674
+ d.value = e.defaultCountry ? e.defaultCountry() : "all";
1675
+ });
1676
+ let f = t(() => c.info.range ?? [null, null]), g = t(() => c.info.events(d.value)), _ = t(() => c.info.countries.find((e) => e.value === d.value)?.label ?? ""), b = (e) => c.info.era ? c.info.era(e) : String(e ?? "");
1677
+ return (t, c) => (p(), i("div", ii, [a("p", {
1678
+ class: "mwnf-sheet-timeline__trigger",
1679
+ onClick: c[0] ||= (e) => u.value = !u.value
1680
+ }, "➤ " + v(y(l)(n.info.trigger ?? "record.related.timelineForItem")), 1), u.value ? (p(), i("div", ai, [
1681
+ a("button", {
1682
+ type: "button",
1683
+ class: "mwnf-sheet-timeline__close",
1684
+ "aria-label": y(l)("core.action.close"),
1685
+ onClick: c[1] ||= (e) => u.value = !1
1686
+ }, "✕", 8, oi),
1687
+ a("p", si, v(y(l)(n.info.heading)), 1),
1688
+ a("div", ci, [D(a("select", {
1689
+ "onUpdate:modelValue": c[2] ||= (e) => d.value = e,
1690
+ class: "mwnf-sheet-timeline__select"
1691
+ }, [(p(!0), i(e, null, h(n.info.countries, (e) => (p(), i("option", {
1692
+ key: e.value,
1693
+ value: e.value
1694
+ }, v(e.label), 9, li))), 128))], 512), [[S, d.value]]), s(L, {
1695
+ class: "mwnf-sheet-timeline__link",
1696
+ to: n.info.searchTo(d.value, f.value)
1697
+ }, {
1698
+ default: E(() => [o("➤ " + v(y(l)("timeline.action.beginFullSearch")), 1)]),
1699
+ _: 1
1700
+ }, 8, ["to"])]),
1701
+ a("div", ui, [
1702
+ a("p", di, v(_.value) + ", " + v(b(f.value[0])) + " – " + v(b(f.value[1])), 1),
1703
+ g.value.length ? r("", !0) : (p(), i("p", fi, v(y(l)("timeline.results.noEvents")), 1)),
1704
+ (p(!0), i(e, null, h(g.value, (e, t) => (p(), i("div", {
1705
+ key: e.id ?? t,
1706
+ class: "mwnf-sheet-timeline__event"
1707
+ }, [a("div", pi, v(b(e.year_from)), 1), a("div", {
1708
+ class: "mwnf-sheet-timeline__description",
1709
+ innerHTML: y(j)(e.text.description)
1710
+ }, null, 8, mi)]))), 128))
1711
+ ])
1712
+ ])) : r("", !0)]));
1713
+ }
1714
+ }, gi = ["href"], _i = {
1715
+ key: 0,
1716
+ class: "mwnf-related-media__description"
1717
+ }, vi = {
1718
+ __name: "RelatedMedia",
1719
+ props: {
1720
+ media: {
1721
+ type: Array,
1722
+ default: () => []
1723
+ },
1724
+ language: {
1725
+ type: String,
1726
+ default: ""
1727
+ },
1728
+ descriptions: {
1729
+ type: Boolean,
1730
+ default: !0
1731
+ },
1732
+ heading: {
1733
+ type: String,
1734
+ default: "record.related.audioVideo"
1735
+ },
1736
+ dir: {
1737
+ type: String,
1738
+ default: ""
1739
+ }
1740
+ },
1741
+ setup(o) {
1742
+ let s = o, { t: c } = A(), l = t(() => {
1743
+ let e = s.media.filter((e) => e?.url);
1744
+ if (!s.language) return e;
1745
+ let t = e.filter((e) => e.language === s.language);
1746
+ return t.length ? t : e;
1747
+ });
1748
+ return (t, s) => l.value.length ? (p(), n(Y, {
1749
+ key: 0,
1750
+ heading: o.heading ? y(c)(o.heading) : "",
1751
+ dir: o.dir,
1752
+ class: "mwnf-related-media"
1753
+ }, {
1754
+ default: E(() => [(p(!0), i(e, null, h(l.value, (e) => (p(), i("div", {
1755
+ key: e.url,
1756
+ class: "mwnf-related-media__entry"
1757
+ }, [a("a", {
1758
+ href: e.url,
1759
+ target: "_blank",
1760
+ rel: "noopener",
1761
+ class: "mwnf-related-media__link"
1762
+ }, "↗ " + v(e.title || e.url), 9, gi), o.descriptions && e.description ? (p(), i("p", _i, v(e.description), 1)) : r("", !0)]))), 128))]),
1763
+ _: 1
1764
+ }, 8, ["heading", "dir"])) : r("", !0);
1765
+ }
1766
+ }, yi = {
1767
+ key: 0,
1768
+ class: "mwnf-on-display__subheading"
1769
+ }, bi = { class: "mwnf-on-display__list" }, xi = ["innerHTML"], Si = ["innerHTML"], Ci = { class: "mwnf-on-display__pending" }, wi = {
1770
+ __name: "OnDisplayIn",
1771
+ props: {
1772
+ groups: {
1773
+ type: Array,
1774
+ default: () => []
1775
+ },
1776
+ heading: {
1777
+ type: String,
1778
+ default: "record.related.onDisplayIn"
1779
+ },
1780
+ pendingLabel: {
1781
+ type: String,
1782
+ default: ""
1783
+ },
1784
+ dir: {
1785
+ type: String,
1786
+ default: ""
1787
+ }
1788
+ },
1789
+ setup(s) {
1790
+ let c = s, { t: u } = A(), d = t(() => c.groups.filter((e) => e.links?.length));
1791
+ return (t, c) => d.value.length ? (p(), n(_(s.heading ? Y : "div"), l({ key: 0 }, s.heading ? { heading: y(u)(s.heading) } : {}, {
1792
+ dir: s.dir || void 0,
1793
+ class: "mwnf-on-display"
1794
+ }), {
1795
+ default: E(() => [(p(!0), i(e, null, h(d.value, (t, l) => (p(), i("div", {
1796
+ key: t.heading ?? l,
1797
+ class: "mwnf-on-display__group"
1798
+ }, [t.heading ? (p(), i("p", yi, v(y(u)(t.heading)), 1)) : r("", !0), a("ul", bi, [(p(!0), i(e, null, h(t.links, (t, l) => (p(), i("li", {
1799
+ key: t.id ?? l,
1800
+ class: "mwnf-on-display__item"
1801
+ }, [t.to || t.href ? (p(), n(L, {
1802
+ key: 0,
1803
+ to: t.to,
1804
+ href: t.href,
1805
+ external: !!t.external
1806
+ }, {
1807
+ default: E(() => [t.external ? (p(), i(e, { key: 0 }, [o("↗ ")], 64)) : r("", !0), a("span", { innerHTML: t.label }, null, 8, xi)]),
1808
+ _: 2
1809
+ }, 1032, [
1810
+ "to",
1811
+ "href",
1812
+ "external"
1813
+ ])) : (p(), i(e, { key: 1 }, [a("span", { innerHTML: t.label }, null, 8, Si), s.pendingLabel ? (p(), i(e, { key: 0 }, [c[0] ||= o(v(" "), -1), a("span", Ci, v(y(u)(s.pendingLabel)), 1)], 64)) : r("", !0)], 64))]))), 128))])]))), 128))]),
1814
+ _: 1
1815
+ }, 16, ["dir"])) : r("", !0);
1816
+ }
1817
+ };
1818
+ //#endregion
1819
+ export { q as C, J as S, L as T, ut as _, Kr as a, Ye as b, vr as c, X as d, Yt as f, kt as g, Y as h, ri as i, Z as l, Ht as m, vi as n, Q as o, Kt as p, hi as r, jr as s, wi as t, bn as u, st as v, le as w, He as x, et as y };