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