@museumwnf/viewer-layout 2.18.0 → 3.1.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.
- package/README.md +18 -18
- package/dist/{FeaturedRecord-mRyLN7Mt.js → FeaturedRecord-Dw6uf3ax.js} +1 -1
- package/dist/ItemDetailView-CoXM_-tG.js +284 -0
- package/dist/OnDisplayIn-eSG5r48j.js +407 -0
- package/dist/Theme-wq0QzOGt.js +319 -0
- package/dist/{OnDisplayIn-D6r_KvpI.js → TimelineEventList-BhkWyY5-.js} +315 -647
- package/dist/TimelineResultsView-DQsyJmPp.js +1636 -0
- package/dist/{content-CHXh6D_q.js → content-BxaDJIvY.js} +2 -2
- package/dist/content.js +5 -5
- package/dist/dxa.js +593 -432
- package/dist/index.js +5 -5
- package/dist/{themeSpecs-Bgn-K6R6.js → themeSpecs-C_uGarTs.js} +3 -1
- package/dist/views.js +30 -30
- package/package.json +1 -1
- package/src/tokens.reference.css +1 -1
- package/dist/PictureNarrative-B_GPQvYP.js +0 -444
- package/dist/Theme-Caz0E8w1.js +0 -140
- package/dist/TimelineResultsView-CMqrkr9z.js +0 -1911
|
@@ -1,1911 +0,0 @@
|
|
|
1
|
-
import { C as e, S as t, T as n, _ as r, a as i, b as a, c as o, d as s, f as c, g as l, h as u, i as d, m as f, n as p, p as m, r as h, s as g, t as _, u as ee, v, x as y, y as b } from "./OnDisplayIn-D6r_KvpI.js";
|
|
2
|
-
import { Fragment as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createSlots as D, createTextVNode as O, createVNode as k, guardReactiveProps as A, isRef as j, mergeProps as M, normalizeClass as N, normalizeProps as P, openBlock as F, reactive as I, ref as L, renderList as R, renderSlot as z, resolveDynamicComponent as B, toDisplayString as V, unref as H, useSlots as te, vModelCheckbox as ne, vModelRadio as re, vModelSelect as U, vModelText as W, watch as ie, withCtx as G, withDirectives as K } from "vue";
|
|
3
|
-
import { I18nText as ae, NotFoundView as oe, byId as q, centuryPresets as J, citation as Y, dateRange as X, entityRef as se, eventDateLabel as Z, glossaryEntries as Q, glossaryTermsForText as ce, groupByCountry as le, languageLabels as ue, loadEntities as de, md as fe, mdInline as pe, mdStrip as me, mwnfLinks as he, partnerHierarchy as ge, partnerView as _e, renderBlock as ve, renderInline as ye, renderPlain as be, sheetRows as xe, sortChronological as Se, sourceUrl as Ce, useCollectionTree as we, useDataPackage as Te, useFacets as Ee, useGlossaryPopup as De, useI18n as Oe, useListQuery as $, useLocale as ke, usePagination as Ae, useProjects as je, useRecordLanguage as Me, useRecordSheet as Ne, useRelatedRecords as Pe, useSearchLanguage as Fe, useTimelineEvents as Ie, yearBuckets as Le } from "@museumwnf/viewer-core";
|
|
4
|
-
import { useRoute as Re, useRouter as ze } from "vue-router";
|
|
5
|
-
//#region src/views/CatalogueResultsView.vue
|
|
6
|
-
var Be = { class: "mwnf-catalogue" }, Ve = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "mwnf-catalogue__title"
|
|
9
|
-
}, He = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "mwnf-facet"
|
|
12
|
-
}, Ue = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "mwnf-facet__label"
|
|
15
|
-
}, We = [
|
|
16
|
-
"value",
|
|
17
|
-
"placeholder",
|
|
18
|
-
"onInput"
|
|
19
|
-
], Ge = {
|
|
20
|
-
key: 1,
|
|
21
|
-
class: "mwnf-facet"
|
|
22
|
-
}, Ke = {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "mwnf-facet__label"
|
|
25
|
-
}, qe = [
|
|
26
|
-
"value",
|
|
27
|
-
"placeholder",
|
|
28
|
-
"onInput"
|
|
29
|
-
], Je = {
|
|
30
|
-
key: 2,
|
|
31
|
-
class: "mwnf-facet mwnf-facet--checkbox"
|
|
32
|
-
}, Ye = ["checked", "onChange"], Xe = {
|
|
33
|
-
key: 0,
|
|
34
|
-
class: "mwnf-facet__label"
|
|
35
|
-
}, Ze = { class: "mwnf-catalogue__body" }, Qe = { class: "mwnf-catalogue__results" }, $e = {
|
|
36
|
-
key: 0,
|
|
37
|
-
class: "mwnf-catalogue__aside"
|
|
38
|
-
}, et = {
|
|
39
|
-
__name: "CatalogueResultsView",
|
|
40
|
-
props: {
|
|
41
|
-
spec: {
|
|
42
|
-
type: Object,
|
|
43
|
-
required: !0
|
|
44
|
-
},
|
|
45
|
-
entity: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: ""
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
setup(n) {
|
|
51
|
-
let r = n, { t: i, locale: o } = Oe(), s = Te(), c = r.spec.entity ?? r.entity, l = S(() => r.spec), u = se(c);
|
|
52
|
-
c && s.loadTranslations(c, "en");
|
|
53
|
-
let d = S(() => l.value.keys ?? [...Object.keys(l.value.facets ?? {}), ...f()]);
|
|
54
|
-
function f() {
|
|
55
|
-
let e = l.value.dates;
|
|
56
|
-
return e ? [e.begin ?? "begin", e.end ?? "end"] : [];
|
|
57
|
-
}
|
|
58
|
-
let { filters: p, page: m, active: h, apply: g, reset: _, goToPage: ee } = $({ keys: d.value }), j = {
|
|
59
|
-
t: i,
|
|
60
|
-
locale: o,
|
|
61
|
-
tr: (e, t) => s.tr(e, t, o.value, "en"),
|
|
62
|
-
renderInline: ye,
|
|
63
|
-
renderPlain: be
|
|
64
|
-
};
|
|
65
|
-
function M(e, t) {
|
|
66
|
-
if (typeof t.values == "function") return [t.values(e)].flat();
|
|
67
|
-
let n = e?.[t.field];
|
|
68
|
-
return Array.isArray(n) ? n : [n];
|
|
69
|
-
}
|
|
70
|
-
let N = S(() => {
|
|
71
|
-
let e = l.value, t = u.value ?? [];
|
|
72
|
-
e.scope && (t = t.filter((t) => e.scope(t, p, j)));
|
|
73
|
-
for (let [n, r] of Object.entries(e.facets ?? {})) {
|
|
74
|
-
let e = p[n];
|
|
75
|
-
e && (t = t.filter((t) => M(t, r).map(String).includes(String(e))));
|
|
76
|
-
}
|
|
77
|
-
e.match && (t = t.filter((t) => e.match(t, p, j))), e.narrow && (t = e.narrow(t, p, j)), e.dates && (t = X(t, {
|
|
78
|
-
begin: p[e.dates.begin ?? "begin"],
|
|
79
|
-
end: p[e.dates.end ?? "end"],
|
|
80
|
-
mode: e.dates.mode ?? "overlap",
|
|
81
|
-
fields: e.dates.fields
|
|
82
|
-
}));
|
|
83
|
-
let n = e.sort ?? "chronological";
|
|
84
|
-
return typeof n == "function" ? n(t) : n === "chronological" ? Se(t) : n && typeof n == "object" ? Se(t, n) : t;
|
|
85
|
-
}), I = S(() => l.value.facetScope === "matching" ? N.value : u.value ?? []), L = Ee(I, () => l.value.facets ?? {}), te = Ae(N, {
|
|
86
|
-
page: m,
|
|
87
|
-
size: () => l.value.pageSize ?? 20
|
|
88
|
-
}), ne = S(() => l.value.recordRoute ?? (r.entity ? `${r.entity}-detail` : "item"));
|
|
89
|
-
function re(e) {
|
|
90
|
-
let t = j.tr(c, e.id).name ?? e.internal_name ?? e.id;
|
|
91
|
-
return {
|
|
92
|
-
id: e.id,
|
|
93
|
-
image: e.images?.[0]?.url ?? "",
|
|
94
|
-
imageAlt: be(String(t)),
|
|
95
|
-
name: ye(String(t)),
|
|
96
|
-
meta: [],
|
|
97
|
-
badge: e.type ?? "",
|
|
98
|
-
to: {
|
|
99
|
-
name: ne.value,
|
|
100
|
-
params: { id: e.id }
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
let U = S(() => te.value.rows.map((e) => (l.value.record ?? re)(e, j))), W = S(() => ({
|
|
105
|
-
filters: p,
|
|
106
|
-
active: h.value,
|
|
107
|
-
apply: g,
|
|
108
|
-
reset: _,
|
|
109
|
-
goToPage: ee,
|
|
110
|
-
matching: N.value,
|
|
111
|
-
pageInfo: te.value,
|
|
112
|
-
options: L.value
|
|
113
|
-
})), ie = S(() => {
|
|
114
|
-
let e = l.value;
|
|
115
|
-
return e.summary ? e.summary({
|
|
116
|
-
...W.value,
|
|
117
|
-
t: i,
|
|
118
|
-
total: (u.value ?? []).length
|
|
119
|
-
}) : [{
|
|
120
|
-
label: i(e.summaryLabel ?? "catalogue.results.itemsFound"),
|
|
121
|
-
count: te.value.total
|
|
122
|
-
}];
|
|
123
|
-
}), K = S(() => l.value.filterMode ?? "apply"), ae = S(() => l.value.controls ?? []), oe = S(() => ae.value.length > 0 || !!l.value.panel);
|
|
124
|
-
function q(e, t) {
|
|
125
|
-
K.value === "immediate" ? g({ [e]: t }) : p[e] = t;
|
|
126
|
-
}
|
|
127
|
-
let J = S(() => i(l.value.empty ?? "catalogue.results.noResultsFilter")), Y = S(() => l.value.variant === "grid"), Z = S(() => ({
|
|
128
|
-
window: 5,
|
|
129
|
-
jump: !1,
|
|
130
|
-
ends: !0,
|
|
131
|
-
...l.value.pagination ?? {}
|
|
132
|
-
}));
|
|
133
|
-
return (n, r) => (F(), T("section", Be, [
|
|
134
|
-
z(n.$slots, "before", P(A(W.value))),
|
|
135
|
-
l.value.title ? (F(), T("h1", Ve, V(H(i)(l.value.title)), 1)) : w("", !0),
|
|
136
|
-
oe.value || n.$slots.filters ? (F(), C(b, {
|
|
137
|
-
key: 1,
|
|
138
|
-
class: "mwnf-catalogue__filters",
|
|
139
|
-
mode: K.value,
|
|
140
|
-
title: l.value.filterTitle ? H(i)(l.value.filterTitle) : "",
|
|
141
|
-
"reset-label": l.value.resetLabel ? H(i)(l.value.resetLabel) : "",
|
|
142
|
-
onApply: r[2] ||= (e) => H(g)(),
|
|
143
|
-
onReset: r[3] ||= (e) => H(_)()
|
|
144
|
-
}, {
|
|
145
|
-
default: G(() => [(F(!0), T(x, null, R(ae.value, (e) => (F(), T(x, { key: e.key }, [e.type === "year" ? (F(), T("label", He, [e.label ? (F(), T("span", Ue, V(H(i)(e.label)), 1)) : w("", !0), E("input", {
|
|
146
|
-
type: "number",
|
|
147
|
-
class: "mwnf-facet__select",
|
|
148
|
-
value: H(p)[e.key],
|
|
149
|
-
placeholder: e.placeholder ? H(i)(e.placeholder) : "",
|
|
150
|
-
onInput: (t) => H(p)[e.key] = t.target.value,
|
|
151
|
-
onChange: r[0] ||= (e) => K.value === "immediate" ? H(g)() : null
|
|
152
|
-
}, null, 40, We)])) : e.type === "query" ? (F(), T("label", Ge, [e.label ? (F(), T("span", Ke, V(H(i)(e.label)), 1)) : w("", !0), E("input", {
|
|
153
|
-
type: "text",
|
|
154
|
-
class: "mwnf-facet__select",
|
|
155
|
-
value: H(p)[e.key],
|
|
156
|
-
placeholder: e.placeholder ? H(i)(e.placeholder) : "",
|
|
157
|
-
onInput: (t) => H(p)[e.key] = t.target.value,
|
|
158
|
-
onChange: r[1] ||= (e) => K.value === "immediate" ? H(g)() : null
|
|
159
|
-
}, null, 40, qe)])) : e.type === "checkbox" ? (F(), T("label", Je, [E("input", {
|
|
160
|
-
type: "checkbox",
|
|
161
|
-
class: "mwnf-facet__checkbox",
|
|
162
|
-
checked: H(p)[e.key] === "1",
|
|
163
|
-
onChange: (t) => q(e.key, t.target.checked ? "1" : "")
|
|
164
|
-
}, null, 40, Ye), e.label ? (F(), T("span", Xe, V(H(i)(e.label)), 1)) : w("", !0)])) : (F(), C(a, {
|
|
165
|
-
key: 3,
|
|
166
|
-
"model-value": H(p)[e.key],
|
|
167
|
-
label: e.label ? H(i)(e.label) : "",
|
|
168
|
-
options: H(L)[e.key] ?? [],
|
|
169
|
-
placeholder: e.placeholder ? H(i)(e.placeholder) : "",
|
|
170
|
-
"any-label": e.anyLabel ? H(i)(e.anyLabel) : "",
|
|
171
|
-
"hide-empty": !!e.hideEmpty,
|
|
172
|
-
"onUpdate:modelValue": (t) => q(e.key, t)
|
|
173
|
-
}, null, 8, [
|
|
174
|
-
"model-value",
|
|
175
|
-
"label",
|
|
176
|
-
"options",
|
|
177
|
-
"placeholder",
|
|
178
|
-
"any-label",
|
|
179
|
-
"hide-empty",
|
|
180
|
-
"onUpdate:modelValue"
|
|
181
|
-
]))], 64))), 128)), z(n.$slots, "filters", P(A(W.value)))]),
|
|
182
|
-
_: 3
|
|
183
|
-
}, 8, [
|
|
184
|
-
"mode",
|
|
185
|
-
"title",
|
|
186
|
-
"reset-label"
|
|
187
|
-
])) : w("", !0),
|
|
188
|
-
k(v, { parts: ie.value }, D({ _: 2 }, [n.$slots.actions ? {
|
|
189
|
-
name: "actions",
|
|
190
|
-
fn: G(() => [z(n.$slots, "actions", P(A(W.value)))]),
|
|
191
|
-
key: "0"
|
|
192
|
-
} : void 0]), 1032, ["parts"]),
|
|
193
|
-
E("div", Ze, [E("div", Qe, [(F(), C(B(Y.value ? t : e), {
|
|
194
|
-
records: U.value,
|
|
195
|
-
"action-label": l.value.actionLabel ? H(i)(l.value.actionLabel) : ""
|
|
196
|
-
}, {
|
|
197
|
-
empty: G(() => [z(n.$slots, "empty", P(A(W.value)), () => [O(V(J.value), 1)])]),
|
|
198
|
-
_: 3
|
|
199
|
-
}, 8, ["records", "action-label"])), k(y, {
|
|
200
|
-
"page-info": H(te),
|
|
201
|
-
window: Z.value.window,
|
|
202
|
-
jump: Z.value.jump,
|
|
203
|
-
ends: Z.value.ends,
|
|
204
|
-
onNavigate: H(ee)
|
|
205
|
-
}, null, 8, [
|
|
206
|
-
"page-info",
|
|
207
|
-
"window",
|
|
208
|
-
"jump",
|
|
209
|
-
"ends",
|
|
210
|
-
"onNavigate"
|
|
211
|
-
])]), n.$slots.aside ? (F(), T("aside", $e, [z(n.$slots, "aside", P(A(W.value)))])) : w("", !0)]),
|
|
212
|
-
z(n.$slots, "after", P(A(W.value)))
|
|
213
|
-
]));
|
|
214
|
-
}
|
|
215
|
-
}, tt = ["dir", "innerHTML"], nt = { class: "mwnf-record__body" }, rt = { class: "mwnf-record__main" }, it = {
|
|
216
|
-
key: 1,
|
|
217
|
-
class: "mwnf-record__status"
|
|
218
|
-
}, at = {
|
|
219
|
-
key: 0,
|
|
220
|
-
class: "mwnf-record__aside"
|
|
221
|
-
}, ot = {
|
|
222
|
-
key: 2,
|
|
223
|
-
class: "mwnf-record__status"
|
|
224
|
-
}, st = {
|
|
225
|
-
__name: "RecordView",
|
|
226
|
-
props: {
|
|
227
|
-
spec: {
|
|
228
|
-
type: Object,
|
|
229
|
-
required: !0
|
|
230
|
-
},
|
|
231
|
-
id: {
|
|
232
|
-
type: String,
|
|
233
|
-
required: !0
|
|
234
|
-
},
|
|
235
|
-
entity: {
|
|
236
|
-
type: String,
|
|
237
|
-
default: ""
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
setup(e) {
|
|
241
|
-
let t = e, { t: i, locale: a } = Oe(), o = Te(), d = je(), p = te(), h = Re(), g = t.spec.entity ?? t.entity, _ = S(() => t.spec), v = se(g), y = q(g), b = S(() => y.value.get(t.id) ?? null), j = S(() => v.value !== null), { language: M, languages: N, dir: I, select: L, text: B, ready: ne, terms: re, glossary: U, attribution: W } = Ne(b, {
|
|
242
|
-
entity: g,
|
|
243
|
-
translations: t.spec.translations ?? [],
|
|
244
|
-
attribution: t.spec.attribution ?? []
|
|
245
|
-
}), ie = S(() => ue(N.value)), { active: K, onClick: ae, close: J } = De(re), X = S(() => K.value ? ve(K.value.definition, { breaks: !0 }) : ""), Z = (e, t) => o.tr(e, t, M.value, "en"), Q = S(() => ({
|
|
246
|
-
record: b.value,
|
|
247
|
-
text: B.value,
|
|
248
|
-
language: M.value,
|
|
249
|
-
languages: ie.value,
|
|
250
|
-
select: L,
|
|
251
|
-
dir: I.value,
|
|
252
|
-
glossary: U.value,
|
|
253
|
-
ready: ne.value,
|
|
254
|
-
attribution: W.value,
|
|
255
|
-
t: i,
|
|
256
|
-
tr: Z
|
|
257
|
-
}));
|
|
258
|
-
function ce(e) {
|
|
259
|
-
return ((typeof e == "function" ? e(Q.value) : e) ?? []).map((e) => ({
|
|
260
|
-
...e,
|
|
261
|
-
label: e.label ? i(e.label) : ""
|
|
262
|
-
}));
|
|
263
|
-
}
|
|
264
|
-
let le = S(() => b.value ? xe(ce(_.value.fields), Q.value) : []), de = S(() => b.value ? xe(ce(_.value.sections).map((e) => ({
|
|
265
|
-
render: "block",
|
|
266
|
-
...e
|
|
267
|
-
})), Q.value) : []), fe = S(() => _.value.shortDescription === !1 ? "" : _.value.shortDescription ?? "short_description"), pe = S(() => {
|
|
268
|
-
let e = fe.value ? B.value[fe.value] : "";
|
|
269
|
-
return e ? { html: ve(String(e), {
|
|
270
|
-
breaks: !0,
|
|
271
|
-
glossary: U.value
|
|
272
|
-
}) } : null;
|
|
273
|
-
}), me = S(() => {
|
|
274
|
-
if (!b.value) return "";
|
|
275
|
-
if (_.value.title) return _.value.title(Q.value);
|
|
276
|
-
let e = B.value.name ?? b.value.internal_name ?? b.value.id;
|
|
277
|
-
return ye(String(e), { glossary: U.value });
|
|
278
|
-
}), he = S(() => {
|
|
279
|
-
if (!b.value) return [];
|
|
280
|
-
if (_.value.media) return _.value.media(b.value, Q.value);
|
|
281
|
-
let e = be(String(B.value.name ?? b.value.internal_name ?? ""));
|
|
282
|
-
return (b.value.images ?? []).map((t) => ({
|
|
283
|
-
url: t.url,
|
|
284
|
-
alt: t.captions?.[M.value] ?? e,
|
|
285
|
-
caption: t.captions?.[M.value] ?? t.captions?.en ?? "",
|
|
286
|
-
photographer: t.photographer ?? "",
|
|
287
|
-
copyright: t.copyright ?? ""
|
|
288
|
-
}));
|
|
289
|
-
}), ge = [
|
|
290
|
-
{
|
|
291
|
-
field: "author",
|
|
292
|
-
label: "sheet.field.preparedBy"
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
field: "copy_editor",
|
|
296
|
-
label: "sheet.field.copyeditedBy"
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
field: "translator",
|
|
300
|
-
label: "sheet.field.translationBy"
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
field: "translation_copy_editor",
|
|
304
|
-
label: "sheet.field.translationCopyeditedBy"
|
|
305
|
-
}
|
|
306
|
-
], _e = S(() => (_.value.credits ?? ge).map(({ field: e, label: t }) => ({
|
|
307
|
-
label: i(t),
|
|
308
|
-
value: B.value[e] ?? W.value[e] ?? ""
|
|
309
|
-
})).filter((e) => e.value)), Se = S(() => String(b.value?.[_.value.workingNumber ?? "mwnf_reference"] ?? "")), we = S(() => {
|
|
310
|
-
let e = _.value.citation;
|
|
311
|
-
if (!b.value || e === !1) return "";
|
|
312
|
-
let t = typeof e?.project == "function" ? null : e?.project ?? b.value.project_id, n = typeof e?.project == "function" ? e.project(b.value, Q.value) : d.label(t), r = e?.permalink === !1 ? void 0 : typeof e?.permalink == "string" ? e.permalink : Ce(h) ?? void 0;
|
|
313
|
-
return Y({
|
|
314
|
-
author: B.value.author ?? W.value.author,
|
|
315
|
-
name: B.value.name ?? b.value.internal_name ?? "",
|
|
316
|
-
project: n,
|
|
317
|
-
permalink: r,
|
|
318
|
-
inWord: i("record.citation.in")
|
|
319
|
-
});
|
|
320
|
-
}), Ee = Pe(b, {
|
|
321
|
-
entity: g,
|
|
322
|
-
language: M
|
|
323
|
-
}), $ = S(() => _.value.related === !1 ? null : _.value.related ?? {}), ke = S(() => {
|
|
324
|
-
if (!$.value) return [];
|
|
325
|
-
let e = $.value.record ?? Ae;
|
|
326
|
-
return Ee.value.inPackage.map((t) => e(t, Q.value));
|
|
327
|
-
});
|
|
328
|
-
function Ae({ record: e, justification: n }) {
|
|
329
|
-
let r = Z(g, e.id).name ?? e.internal_name ?? e.id;
|
|
330
|
-
return {
|
|
331
|
-
id: e.id,
|
|
332
|
-
image: e.images?.[0]?.url ?? "",
|
|
333
|
-
imageAlt: be(String(r)),
|
|
334
|
-
name: ye(String(r)),
|
|
335
|
-
meta: n ? [n] : [],
|
|
336
|
-
badge: e.type ?? "",
|
|
337
|
-
to: {
|
|
338
|
-
name: _.value.route ?? (t.entity ? `${t.entity}-detail` : "item"),
|
|
339
|
-
params: { id: e.id }
|
|
340
|
-
}
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
let Me = /* @__PURE__ */ new Set([
|
|
344
|
-
"header",
|
|
345
|
-
"before-sheet",
|
|
346
|
-
"after-sheet",
|
|
347
|
-
"aside",
|
|
348
|
-
"source",
|
|
349
|
-
"related",
|
|
350
|
-
"after",
|
|
351
|
-
"default"
|
|
352
|
-
]), Fe = S(() => Object.keys(p).filter((e) => !Me.has(e)));
|
|
353
|
-
return (e, t) => j.value && !b.value ? (F(), C(H(oe), { key: 0 })) : b.value ? (F(), T("article", {
|
|
354
|
-
key: 1,
|
|
355
|
-
class: "mwnf-record",
|
|
356
|
-
onClick: t[0] ||= (...e) => H(ae) && H(ae)(...e)
|
|
357
|
-
}, [
|
|
358
|
-
z(e.$slots, "header", P(A(Q.value)), () => [
|
|
359
|
-
_.value.back ? (F(), C(n, {
|
|
360
|
-
key: 0,
|
|
361
|
-
class: "mwnf-record__back",
|
|
362
|
-
to: _.value.back.to,
|
|
363
|
-
href: _.value.back.href
|
|
364
|
-
}, {
|
|
365
|
-
default: G(() => [O("← " + V(H(i)(_.value.back.label)), 1)]),
|
|
366
|
-
_: 1
|
|
367
|
-
}, 8, ["to", "href"])) : w("", !0),
|
|
368
|
-
k(r, {
|
|
369
|
-
languages: ie.value,
|
|
370
|
-
language: H(M),
|
|
371
|
-
onSelect: H(L)
|
|
372
|
-
}, null, 8, [
|
|
373
|
-
"languages",
|
|
374
|
-
"language",
|
|
375
|
-
"onSelect"
|
|
376
|
-
]),
|
|
377
|
-
E("h1", {
|
|
378
|
-
class: "mwnf-record__title",
|
|
379
|
-
dir: H(I) || void 0,
|
|
380
|
-
innerHTML: me.value
|
|
381
|
-
}, null, 8, tt)
|
|
382
|
-
]),
|
|
383
|
-
E("div", nt, [E("div", rt, [
|
|
384
|
-
he.value.length ? (F(), C(s, {
|
|
385
|
-
key: 0,
|
|
386
|
-
images: he.value,
|
|
387
|
-
variant: _.value.mediaVariant ?? ""
|
|
388
|
-
}, null, 8, ["images", "variant"])) : w("", !0),
|
|
389
|
-
H(ne) ? w("", !0) : (F(), T("p", it, V(H(i)("core.status.loading")), 1)),
|
|
390
|
-
z(e.$slots, "before-sheet", P(A(Q.value))),
|
|
391
|
-
k(l, {
|
|
392
|
-
rows: le.value,
|
|
393
|
-
layout: _.value.layout ?? "table",
|
|
394
|
-
dir: H(I),
|
|
395
|
-
"short-description": pe.value,
|
|
396
|
-
"short-description-after": _.value.shortDescriptionAfter ?? "description"
|
|
397
|
-
}, D({ _: 2 }, [R(Fe.value, (t) => ({
|
|
398
|
-
name: t,
|
|
399
|
-
fn: G((n) => [z(e.$slots, t, P(A({
|
|
400
|
-
...n,
|
|
401
|
-
...Q.value
|
|
402
|
-
})))])
|
|
403
|
-
}))]), 1032, [
|
|
404
|
-
"rows",
|
|
405
|
-
"layout",
|
|
406
|
-
"dir",
|
|
407
|
-
"short-description",
|
|
408
|
-
"short-description-after"
|
|
409
|
-
]),
|
|
410
|
-
(F(!0), T(x, null, R(de.value, (e) => (F(), C(u, {
|
|
411
|
-
key: e.key,
|
|
412
|
-
heading: e.label,
|
|
413
|
-
html: e.html,
|
|
414
|
-
dir: H(I)
|
|
415
|
-
}, null, 8, [
|
|
416
|
-
"heading",
|
|
417
|
-
"html",
|
|
418
|
-
"dir"
|
|
419
|
-
]))), 128)),
|
|
420
|
-
z(e.$slots, "after-sheet", P(A(Q.value))),
|
|
421
|
-
k(f, {
|
|
422
|
-
credits: _e.value,
|
|
423
|
-
"working-number": Se.value,
|
|
424
|
-
"working-number-label": H(i)("sheet.field.workingNumber"),
|
|
425
|
-
citation: we.value,
|
|
426
|
-
"citation-heading": _.value.citation?.heading ? H(i)(_.value.citation.heading) : ""
|
|
427
|
-
}, null, 8, [
|
|
428
|
-
"credits",
|
|
429
|
-
"working-number",
|
|
430
|
-
"working-number-label",
|
|
431
|
-
"citation",
|
|
432
|
-
"citation-heading"
|
|
433
|
-
]),
|
|
434
|
-
z(e.$slots, "source", P(A(Q.value)), () => [k(m)]),
|
|
435
|
-
z(e.$slots, "related", P(A({
|
|
436
|
-
...Q.value,
|
|
437
|
-
records: ke.value,
|
|
438
|
-
outside: H(Ee).outside
|
|
439
|
-
})), () => [$.value ? (F(), C(c, {
|
|
440
|
-
key: 0,
|
|
441
|
-
heading: H(i)($.value.heading ?? "record.related.items"),
|
|
442
|
-
records: ke.value,
|
|
443
|
-
variant: $.value.variant ?? "list",
|
|
444
|
-
"action-label": $.value.actionLabel ? H(i)($.value.actionLabel) : ""
|
|
445
|
-
}, null, 8, [
|
|
446
|
-
"heading",
|
|
447
|
-
"records",
|
|
448
|
-
"variant",
|
|
449
|
-
"action-label"
|
|
450
|
-
])) : w("", !0)])
|
|
451
|
-
]), e.$slots.aside ? (F(), T("aside", at, [z(e.$slots, "aside", P(A(Q.value)))])) : w("", !0)]),
|
|
452
|
-
z(e.$slots, "after", P(A(Q.value))),
|
|
453
|
-
k(ee, {
|
|
454
|
-
term: H(K),
|
|
455
|
-
html: X.value,
|
|
456
|
-
dir: H(I),
|
|
457
|
-
onClose: H(J)
|
|
458
|
-
}, null, 8, [
|
|
459
|
-
"term",
|
|
460
|
-
"html",
|
|
461
|
-
"dir",
|
|
462
|
-
"onClose"
|
|
463
|
-
])
|
|
464
|
-
])) : (F(), T("p", ot, V(H(i)("core.status.loading")), 1));
|
|
465
|
-
}
|
|
466
|
-
}, ct = {
|
|
467
|
-
key: 0,
|
|
468
|
-
class: "mwnf-sheet-source"
|
|
469
|
-
}, lt = {
|
|
470
|
-
key: 0,
|
|
471
|
-
class: "mwnf-sheet-source__line"
|
|
472
|
-
}, ut = {
|
|
473
|
-
key: 1,
|
|
474
|
-
class: "mwnf-sheet-source__uid"
|
|
475
|
-
}, dt = {
|
|
476
|
-
key: 2,
|
|
477
|
-
class: "mwnf-sheet-source__collection"
|
|
478
|
-
}, ft = ["href"], pt = {
|
|
479
|
-
key: 1,
|
|
480
|
-
class: "mwnf-sheet-notice"
|
|
481
|
-
}, mt = {
|
|
482
|
-
key: "museum",
|
|
483
|
-
class: "mwnf-sheet-museum"
|
|
484
|
-
}, ht = ["innerHTML"], gt = {
|
|
485
|
-
key: 0,
|
|
486
|
-
class: "mwnf-sheet-related"
|
|
487
|
-
}, _t = {
|
|
488
|
-
key: 0,
|
|
489
|
-
class: "mwnf-sheet-related__heading mwnf-sheet-related__heading--caps"
|
|
490
|
-
}, vt = {
|
|
491
|
-
key: 1,
|
|
492
|
-
class: "mwnf-sheet-related__description"
|
|
493
|
-
}, yt = {
|
|
494
|
-
key: 0,
|
|
495
|
-
class: "mwnf-sheet-related__references"
|
|
496
|
-
}, bt = { key: 2 }, xt = {
|
|
497
|
-
key: 3,
|
|
498
|
-
class: "mwnf-sheet-related__unresolved"
|
|
499
|
-
}, St = {
|
|
500
|
-
key: 2,
|
|
501
|
-
class: "mwnf-sheet-related__line"
|
|
502
|
-
}, Ct = ["href"], wt = { key: 6 }, Tt = { class: "mwnf-sheet-related__heading" }, Et = { key: 7 }, Dt = { class: "mwnf-sheet-related__heading" }, Ot = { class: "mwnf-sheet-related__line" }, kt = ["href"], At = { key: 8 }, jt = { class: "mwnf-sheet-related__heading" }, Mt = { class: "mwnf-sheet-related__line" }, Nt = ["href"], Pt = { key: 9 }, Ft = { class: "mwnf-sheet-related__heading" }, It = {
|
|
503
|
-
__name: "ItemDetailView",
|
|
504
|
-
props: {
|
|
505
|
-
spec: {
|
|
506
|
-
type: Object,
|
|
507
|
-
required: !0
|
|
508
|
-
},
|
|
509
|
-
id: {
|
|
510
|
-
type: String,
|
|
511
|
-
required: !0
|
|
512
|
-
},
|
|
513
|
-
entity: {
|
|
514
|
-
type: String,
|
|
515
|
-
default: ""
|
|
516
|
-
},
|
|
517
|
-
dataGetter: {
|
|
518
|
-
type: Function,
|
|
519
|
-
default: null
|
|
520
|
-
}
|
|
521
|
-
},
|
|
522
|
-
setup(e) {
|
|
523
|
-
let t = e, n = te(), r = /* @__PURE__ */ new Set([
|
|
524
|
-
"before-sheet",
|
|
525
|
-
"museum",
|
|
526
|
-
"related"
|
|
527
|
-
]), a = S(() => Object.keys(n).filter((e) => !r.has(e))), s = S(() => !t.dataGetter || t.dataGetter(t.id) != null), { t: l } = Oe(), u = S(() => t.spec), d = je(), f = (e, t) => (e.name ?? "").localeCompare(t.name ?? ""), m = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "gallery").sort(f), ee = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "exhibition").sort(f), v = (e) => d.links(e.project_id)?.artisticIntroductionUrl ?? null, y = (e) => d.links(e.project_id)?.relatedDatabaseUrl ?? null;
|
|
528
|
-
function b(e, t) {
|
|
529
|
-
if (!e) return null;
|
|
530
|
-
let n = u.value.sourceDatabase === !1 ? null : u.value.sourceDatabase ?? null, r = null;
|
|
531
|
-
if (n) {
|
|
532
|
-
let i = n.chipClass ? n.chipClass(e, t) : null, a = d.label(e.project_id);
|
|
533
|
-
(i || a) && (r = {
|
|
534
|
-
chipClass: i,
|
|
535
|
-
name: a,
|
|
536
|
-
label: l(n.label ?? "record.sheet.sourceDatabase")
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
let i = n && n.addToCollection !== !1 ? l(n.addToCollection?.label ?? "record.action.addToCollection") : null, a = n ? e.backward_compatibility ?? "" : "", o = u.value.notice === !1 ? null : u.value.notice ?? null, s = o && o.show(e, t) ? l(o.label) : null;
|
|
540
|
-
return {
|
|
541
|
-
source: r,
|
|
542
|
-
addToCollectionLabel: i,
|
|
543
|
-
notice: s,
|
|
544
|
-
backwardCompatibility: a
|
|
545
|
-
};
|
|
546
|
-
}
|
|
547
|
-
let j = Te(), M = q("partners"), I = q("countries");
|
|
548
|
-
de(["partners", "countries"]), j.loadTranslations("countries", "en");
|
|
549
|
-
function L(e, t) {
|
|
550
|
-
let n = j.tr("countries", e, t, "en");
|
|
551
|
-
return me(n.name ?? I.value?.get(e)?.internal_name ?? "");
|
|
552
|
-
}
|
|
553
|
-
function B(e) {
|
|
554
|
-
let t = e.text?.holder ? pe(String(e.text.holder)) : "", n = u.value.museum === !1 ? null : u.value.museum ?? null, r = n ? M.value?.get(e.record?.partner_id) : null;
|
|
555
|
-
return {
|
|
556
|
-
holder: t,
|
|
557
|
-
view: r ? _e(r, j.tr("partners", r.id, e.language, "en"), {
|
|
558
|
-
countryLabel: (t) => L(t, e.language),
|
|
559
|
-
route: (t) => n.route ? n.route(t.id, e) : null
|
|
560
|
-
}) : null
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
function ne(e, n) {
|
|
564
|
-
if (!e) return null;
|
|
565
|
-
let r = u.value.related ?? {}, i = n.records ?? [], a = n.outside ?? [], o = t.dataGetter ? i.filter((e) => t.dataGetter(e.id) != null) : i, s = t.dataGetter ? i.filter((e) => t.dataGetter(e.id) == null).map((t) => (e.related_items ?? []).find((e) => e.id === t.id)).filter(Boolean) : [], c = [...a, ...s].map((e) => ({
|
|
566
|
-
...e,
|
|
567
|
-
name: e.project_id ? d.label(e.project_id) : null,
|
|
568
|
-
chipClass: r.outsideChip ? r.outsideChip(e, n) : null
|
|
569
|
-
})), f = (e) => ({
|
|
570
|
-
id: e.id,
|
|
571
|
-
label: pe(e.name ?? ""),
|
|
572
|
-
href: e.legacy_host || "",
|
|
573
|
-
external: !!e.legacy_host
|
|
574
|
-
}), p = r.onDisplayIn && r.onDisplayIn !== !1 ? {
|
|
575
|
-
pendingLabel: r.onDisplayIn.linkPendingLabel ?? "",
|
|
576
|
-
groups: [{
|
|
577
|
-
heading: "record.related.exhibitions",
|
|
578
|
-
links: ee(e).map(f)
|
|
579
|
-
}, {
|
|
580
|
-
heading: "record.related.galleries",
|
|
581
|
-
links: m(e).map(f)
|
|
582
|
-
}].filter((e) => e.links.length)
|
|
583
|
-
} : null, h = r.databaseLabel && y(e) ? {
|
|
584
|
-
url: y(e),
|
|
585
|
-
label: l(r.databaseLabel),
|
|
586
|
-
name: d.label(e.project_id)
|
|
587
|
-
} : null, g = r.overallDatabase && r.overallDatabase !== !1 ? {
|
|
588
|
-
label: l(r.overallDatabase.label),
|
|
589
|
-
linkLabel: l(r.overallDatabase.linkLabel)
|
|
590
|
-
} : null;
|
|
591
|
-
return {
|
|
592
|
-
title: r.title ? l(r.title) : "",
|
|
593
|
-
description: r.description ? l(r.description) : "",
|
|
594
|
-
heading: l(r.heading ?? "record.related.items"),
|
|
595
|
-
variant: r.variant ?? "grid",
|
|
596
|
-
actionLabel: r.actionLabel ? l(r.actionLabel) : "",
|
|
597
|
-
inPackage: o,
|
|
598
|
-
references: c,
|
|
599
|
-
notInPackageLabel: r.notInPackageLabel ? l(r.notInPackageLabel) : "",
|
|
600
|
-
artisticIntroduction: r.artisticIntroductionLabel && v(e) ? {
|
|
601
|
-
url: v(e),
|
|
602
|
-
label: l(r.artisticIntroductionLabel)
|
|
603
|
-
} : null,
|
|
604
|
-
timeline: r.timeline ? r.timeline(e, n) : null,
|
|
605
|
-
glossary: r.glossary !== !1,
|
|
606
|
-
dynasties: r.dynasties ? r.dynasties(e, n.language, n) : null,
|
|
607
|
-
media: r.media === !1 ? [] : e.media ?? [],
|
|
608
|
-
onDisplayIn: p,
|
|
609
|
-
database: h,
|
|
610
|
-
overallDatabase: g,
|
|
611
|
-
download: r.download === !1 ? null : {
|
|
612
|
-
label: l("record.action.download"),
|
|
613
|
-
pdfLabel: l("record.action.downloadPdf")
|
|
614
|
-
}
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
|
-
function re() {
|
|
618
|
-
window.print();
|
|
619
|
-
}
|
|
620
|
-
return (t, n) => s.value ? (F(), C(st, {
|
|
621
|
-
key: 0,
|
|
622
|
-
spec: u.value,
|
|
623
|
-
id: e.id,
|
|
624
|
-
entity: e.entity
|
|
625
|
-
}, D({
|
|
626
|
-
"before-sheet": G((e) => [z(t.$slots, "before-sheet", P(A(e)), () => [(F(!0), T(x, null, R([b(e.record, e)], (t) => (F(), T(x, { key: "before-sheet" }, [t?.source || t?.backwardCompatibility || t?.addToCollectionLabel ? (F(), T("div", ct, [
|
|
627
|
-
t.source ? (F(), T("p", lt, [t.source.chipClass ? (F(), T("span", {
|
|
628
|
-
key: 0,
|
|
629
|
-
class: N(["mwnf-chip", t.source.chipClass]),
|
|
630
|
-
"aria-hidden": "true"
|
|
631
|
-
}, null, 2)) : w("", !0), t.source.name ? (F(), T(x, { key: 1 }, [O(V(t.source.label) + ": " + V(t.source.name), 1)], 64)) : w("", !0)])) : w("", !0),
|
|
632
|
-
t.backwardCompatibility ? (F(), T("p", ut, [E("code", null, V(t.backwardCompatibility), 1)])) : w("", !0),
|
|
633
|
-
t.addToCollectionLabel ? (F(), T("p", dt, [E("a", {
|
|
634
|
-
href: H(he).myCollection,
|
|
635
|
-
target: "_blank",
|
|
636
|
-
rel: "noopener"
|
|
637
|
-
}, "↗ " + V(t.addToCollectionLabel), 9, ft)])) : w("", !0)
|
|
638
|
-
])) : w("", !0), t?.notice ? (F(), T("div", pt, [O(V(t.notice) + " ", 1), E("strong", null, [E("em", null, V(e.languages.map((e) => e.label).join(", ")), 1)])])) : w("", !0)], 64))), 128))])]),
|
|
639
|
-
museum: G((e) => [z(t.$slots, "museum", P(A(e)), () => [(F(!0), T(x, null, R([B(e)], (t) => (F(), T("div", mt, [t.holder ? (F(), T("p", {
|
|
640
|
-
key: 0,
|
|
641
|
-
class: "mwnf-sheet-museum__holder",
|
|
642
|
-
innerHTML: t.holder
|
|
643
|
-
}, null, 8, ht)) : w("", !0), t.view ? (F(), C(o, {
|
|
644
|
-
key: 1,
|
|
645
|
-
variant: "summary",
|
|
646
|
-
partner: t.view,
|
|
647
|
-
label: "partner.info.about",
|
|
648
|
-
dir: e.dir
|
|
649
|
-
}, null, 8, ["partner", "dir"])) : w("", !0)]))), 128))])]),
|
|
650
|
-
related: G((e) => [z(t.$slots, "related", P(A(e)), () => [(F(!0), T(x, null, R([ne(e.record, e)], (t) => (F(), T(x, { key: e.record?.id ?? "related" }, [t ? (F(), T("div", gt, [
|
|
651
|
-
t.title ? (F(), T("p", _t, V(t.title), 1)) : w("", !0),
|
|
652
|
-
t.description ? (F(), T("p", vt, V(t.description), 1)) : w("", !0),
|
|
653
|
-
k(c, {
|
|
654
|
-
heading: t.heading,
|
|
655
|
-
records: t.inPackage,
|
|
656
|
-
variant: t.variant,
|
|
657
|
-
"action-label": t.actionLabel
|
|
658
|
-
}, {
|
|
659
|
-
default: G(() => [t.references.length ? (F(), T("ul", yt, [(F(!0), T(x, null, R(t.references, (e) => (F(), T("li", { key: e.id }, [
|
|
660
|
-
e.chipClass ? (F(), T("span", {
|
|
661
|
-
key: 0,
|
|
662
|
-
class: N(["mwnf-chip", e.chipClass]),
|
|
663
|
-
"aria-hidden": "true"
|
|
664
|
-
}, null, 2)) : w("", !0),
|
|
665
|
-
e.name ? (F(), T(x, { key: 1 }, [O(V(e.name), 1)], 64)) : (F(), T("code", bt, V(e.backward_compatibility), 1)),
|
|
666
|
-
t.notInPackageLabel ? (F(), T("span", xt, V(t.notInPackageLabel), 1)) : w("", !0)
|
|
667
|
-
]))), 128))])) : w("", !0)]),
|
|
668
|
-
_: 2
|
|
669
|
-
}, 1032, [
|
|
670
|
-
"heading",
|
|
671
|
-
"records",
|
|
672
|
-
"variant",
|
|
673
|
-
"action-label"
|
|
674
|
-
]),
|
|
675
|
-
t.artisticIntroduction ? (F(), T("p", St, [E("a", {
|
|
676
|
-
href: t.artisticIntroduction.url,
|
|
677
|
-
target: "_blank",
|
|
678
|
-
rel: "noopener"
|
|
679
|
-
}, "↗ " + V(t.artisticIntroduction.label), 9, Ct)])) : w("", !0),
|
|
680
|
-
t.timeline ? (F(), C(h, {
|
|
681
|
-
key: e.record.id,
|
|
682
|
-
info: t.timeline
|
|
683
|
-
}, null, 8, ["info"])) : w("", !0),
|
|
684
|
-
t.glossary ? (F(), C(g, {
|
|
685
|
-
key: 4,
|
|
686
|
-
language: e.language,
|
|
687
|
-
dir: e.dir
|
|
688
|
-
}, null, 8, ["language", "dir"])) : w("", !0),
|
|
689
|
-
t.dynasties?.records?.length ? (F(), C(i, {
|
|
690
|
-
key: 5,
|
|
691
|
-
heading: H(l)("record.dynasty.list"),
|
|
692
|
-
dynasties: t.dynasties.records,
|
|
693
|
-
tr: t.dynasties.tr,
|
|
694
|
-
dir: e.dir
|
|
695
|
-
}, null, 8, [
|
|
696
|
-
"heading",
|
|
697
|
-
"dynasties",
|
|
698
|
-
"tr",
|
|
699
|
-
"dir"
|
|
700
|
-
])) : w("", !0),
|
|
701
|
-
k(p, {
|
|
702
|
-
media: t.media,
|
|
703
|
-
descriptions: !1,
|
|
704
|
-
dir: e.dir
|
|
705
|
-
}, null, 8, ["media", "dir"]),
|
|
706
|
-
t.onDisplayIn?.groups.length ? (F(), T("div", wt, [E("p", Tt, V(H(l)("record.related.onDisplayIn")), 1), k(_, {
|
|
707
|
-
heading: "",
|
|
708
|
-
groups: t.onDisplayIn.groups,
|
|
709
|
-
"pending-label": t.onDisplayIn.pendingLabel,
|
|
710
|
-
dir: e.dir
|
|
711
|
-
}, null, 8, [
|
|
712
|
-
"groups",
|
|
713
|
-
"pending-label",
|
|
714
|
-
"dir"
|
|
715
|
-
])])) : w("", !0),
|
|
716
|
-
t.database ? (F(), T("div", Et, [E("p", Dt, V(t.database.label), 1), E("p", Ot, [E("a", {
|
|
717
|
-
href: t.database.url,
|
|
718
|
-
target: "_blank",
|
|
719
|
-
rel: "noopener"
|
|
720
|
-
}, "↗ " + V(t.database.name), 9, kt)])])) : w("", !0),
|
|
721
|
-
t.overallDatabase ? (F(), T("div", At, [E("p", jt, V(t.overallDatabase.label), 1), E("p", Mt, [E("a", {
|
|
722
|
-
href: H(he).overallDatabase,
|
|
723
|
-
target: "_blank",
|
|
724
|
-
rel: "noopener"
|
|
725
|
-
}, "↗ " + V(t.overallDatabase.linkLabel), 9, Nt)])])) : w("", !0),
|
|
726
|
-
t.download ? (F(), T("div", Pt, [E("p", Ft, V(t.download.label), 1), E("p", {
|
|
727
|
-
class: "mwnf-sheet-related__line mwnf-sheet-related__line--action",
|
|
728
|
-
onClick: re
|
|
729
|
-
}, "➤ " + V(t.download.pdfLabel), 1)])) : w("", !0)
|
|
730
|
-
])) : w("", !0)], 64))), 128))])]),
|
|
731
|
-
_: 2
|
|
732
|
-
}, [R(a.value, (e) => ({
|
|
733
|
-
name: e,
|
|
734
|
-
fn: G((n) => [z(t.$slots, e, P(A(n)))])
|
|
735
|
-
}))]), 1032, [
|
|
736
|
-
"spec",
|
|
737
|
-
"id",
|
|
738
|
-
"entity"
|
|
739
|
-
])) : (F(), C(H(oe), { key: 1 }));
|
|
740
|
-
}
|
|
741
|
-
}, Lt = ["dir"], Rt = {
|
|
742
|
-
key: 0,
|
|
743
|
-
class: "mwnf-essay__breadcrumb"
|
|
744
|
-
}, zt = { class: "mwnf-essay__breadcrumb-label" }, Bt = {
|
|
745
|
-
key: 1,
|
|
746
|
-
class: "mwnf-essay__breadcrumb-link"
|
|
747
|
-
}, Vt = ["aria-label"], Ht = { class: "mwnf-essay__title" }, Ut = {
|
|
748
|
-
key: 0,
|
|
749
|
-
class: "mwnf-essay__number"
|
|
750
|
-
}, Wt = ["innerHTML"], Gt = { class: "mwnf-essay__body" }, Kt = { class: "mwnf-essay__main" }, qt = {
|
|
751
|
-
key: 0,
|
|
752
|
-
class: "mwnf-essay__status"
|
|
753
|
-
}, Jt = ["innerHTML"], Yt = ["innerHTML"], Xt = {
|
|
754
|
-
key: 4,
|
|
755
|
-
class: "mwnf-essay__nav"
|
|
756
|
-
}, Zt = {
|
|
757
|
-
key: 1,
|
|
758
|
-
class: "mwnf-essay__nav-spacer"
|
|
759
|
-
}, Qt = {
|
|
760
|
-
key: 0,
|
|
761
|
-
class: "mwnf-essay__side"
|
|
762
|
-
}, $t = {
|
|
763
|
-
key: 0,
|
|
764
|
-
class: "mwnf-essay__panel"
|
|
765
|
-
}, en = {
|
|
766
|
-
key: 0,
|
|
767
|
-
class: "mwnf-essay__variants"
|
|
768
|
-
}, tn = ["aria-pressed", "onClick"], nn = ["src", "alt"], rn = ["innerHTML"], an = {
|
|
769
|
-
key: 0,
|
|
770
|
-
class: "mwnf-essay__panel-label"
|
|
771
|
-
}, on = ["innerHTML"], sn = ["innerHTML"], cn = {
|
|
772
|
-
key: 0,
|
|
773
|
-
class: "mwnf-essay__thumbs"
|
|
774
|
-
}, ln = ["onClick"], un = ["src"], dn = {
|
|
775
|
-
key: 2,
|
|
776
|
-
class: "mwnf-essay__status"
|
|
777
|
-
}, fn = {
|
|
778
|
-
__name: "EssayView",
|
|
779
|
-
props: {
|
|
780
|
-
spec: {
|
|
781
|
-
type: Object,
|
|
782
|
-
required: !0
|
|
783
|
-
},
|
|
784
|
-
id: {
|
|
785
|
-
type: String,
|
|
786
|
-
required: !0
|
|
787
|
-
}
|
|
788
|
-
},
|
|
789
|
-
setup(e) {
|
|
790
|
-
let r = e, { t: i } = Oe(), a = Te(), o = te();
|
|
791
|
-
function c(e) {
|
|
792
|
-
return !!e && typeof e.walk == "function" && typeof e.children == "function";
|
|
793
|
-
}
|
|
794
|
-
function l(e) {
|
|
795
|
-
return typeof e == "string" ? e : "themes";
|
|
796
|
-
}
|
|
797
|
-
let u = r.spec.entity ?? "items", d = r.spec.tree, f = d?.entity ?? (d?.themes ? l(d.themes) : r.spec.entity ?? "collections"), p = c(d) ? d : d?.themes ? we({
|
|
798
|
-
source: "themes",
|
|
799
|
-
entity: f,
|
|
800
|
-
childType: d.childType
|
|
801
|
-
}) : we({
|
|
802
|
-
purpose: d?.purpose,
|
|
803
|
-
rootId: d?.rootId,
|
|
804
|
-
childType: d?.childType,
|
|
805
|
-
entity: f,
|
|
806
|
-
order: d?.order
|
|
807
|
-
}), h = se(f), g = S(() => h.value !== null), _ = S(() => r.spec), v = S(() => p.byId.value.get(r.id) ?? null), y = S(() => p.parents(r.id).at(-1) ?? null), b = S(() => {
|
|
808
|
-
if (y.value) return p.children(y.value.id);
|
|
809
|
-
let e = p.root.value;
|
|
810
|
-
return e ? p.children(e.id) : p.walk().filter((e) => p.parents(e.id).length === 0);
|
|
811
|
-
}), D = S(() => b.value.findIndex((e) => e.id === r.id)), j = S(() => _.value.navigation || !1), M = S(() => j.value === "siblings" ? D.value > 0 ? b.value[D.value - 1] : null : j.value === "tree" ? p.previous(r.id) : null), I = S(() => j.value === "siblings" ? D.value !== -1 && D.value < b.value.length - 1 ? b.value[D.value + 1] : null : j.value === "tree" ? p.next(r.id) : null), { language: B, dir: ne } = Me(v, { entity: f }), re = S(() => v.value ? a.tr(f, v.value.id, B.value, "en") : {}), U = L(!1);
|
|
812
|
-
ie(() => [v.value?.id, B.value], async () => {
|
|
813
|
-
if (U.value = !1, !v.value) {
|
|
814
|
-
U.value = !0;
|
|
815
|
-
return;
|
|
816
|
-
}
|
|
817
|
-
let e = B.value === "en" ? ["en"] : [B.value, "en"];
|
|
818
|
-
await Promise.all([f, u].flatMap((t) => e.map((e) => a.loadTranslations(t, e)))), U.value = !0;
|
|
819
|
-
}, { immediate: !0 });
|
|
820
|
-
function W(e) {
|
|
821
|
-
if (!e) return "";
|
|
822
|
-
let t = _.value.placeholder, n = (e) => !!e && !!t && t.test(e), r = a.tr(f, e.id, B.value, "en");
|
|
823
|
-
if (r.title && !n(r.title)) return r.title;
|
|
824
|
-
let i = a.tr(f, e.id, "en").title;
|
|
825
|
-
return i && !n(i) ? i : e.internal_name ?? e.id;
|
|
826
|
-
}
|
|
827
|
-
let K = S(() => ({
|
|
828
|
-
node: v.value,
|
|
829
|
-
text: re.value,
|
|
830
|
-
language: B.value,
|
|
831
|
-
tree: p,
|
|
832
|
-
select: Ie,
|
|
833
|
-
t: i,
|
|
834
|
-
tr: (e, t) => a.tr(e, t, B.value, "en")
|
|
835
|
-
}));
|
|
836
|
-
function ae(e, t) {
|
|
837
|
-
return t.split(".").reduce((e, t) => e?.[t], e);
|
|
838
|
-
}
|
|
839
|
-
function J(e, t) {
|
|
840
|
-
return e === !1 || e == null ? "" : typeof e == "function" ? e(t) ?? "" : ae(t.text, e) ?? "";
|
|
841
|
-
}
|
|
842
|
-
let Y = S(() => J(_.value.quote ?? "quote", K.value)), X = S(() => J(_.value.body ?? "description", K.value)), Z = S(() => {
|
|
843
|
-
if (!_.value.glossary || !v.value) return [];
|
|
844
|
-
let e = [Y.value, X.value].filter(Boolean);
|
|
845
|
-
return ce(e.join("\n\n"), B.value);
|
|
846
|
-
}), le = S(() => Q(Z.value)), { active: ue, onClick: de, close: fe } = De(Z), pe = S(() => ue.value ? ve(ue.value.definition, { breaks: !0 }) : ""), me = S(() => v.value ? _.value.heading ? _.value.heading(K.value) : ye(String(W(v.value)), { glossary: le.value }) : ""), he = S(() => Y.value ? ye(String(Y.value), { glossary: le.value }) : ""), ge = S(() => X.value ? ve(String(X.value), {
|
|
847
|
-
breaks: !0,
|
|
848
|
-
glossary: le.value
|
|
849
|
-
}) : ""), _e = S(() => v.value ? _.value.about?.(v.value) ?? !1 : !1), xe = S(() => !!_e.value);
|
|
850
|
-
function Se(e) {
|
|
851
|
-
let t = _e.value;
|
|
852
|
-
return t && typeof t == "object" ? !!t[e] : !!_.value.aboutKeeps?.includes(e);
|
|
853
|
-
}
|
|
854
|
-
let Ce = [
|
|
855
|
-
[1e3, "M"],
|
|
856
|
-
[900, "CM"],
|
|
857
|
-
[500, "D"],
|
|
858
|
-
[400, "CD"],
|
|
859
|
-
[100, "C"],
|
|
860
|
-
[90, "XC"],
|
|
861
|
-
[50, "L"],
|
|
862
|
-
[40, "XL"],
|
|
863
|
-
[10, "X"],
|
|
864
|
-
[9, "IX"],
|
|
865
|
-
[5, "V"],
|
|
866
|
-
[4, "IV"],
|
|
867
|
-
[1, "I"]
|
|
868
|
-
];
|
|
869
|
-
function Ee(e) {
|
|
870
|
-
let t = e, n = "";
|
|
871
|
-
for (let [e, r] of Ce) for (; t >= e;) n += r, t -= e;
|
|
872
|
-
return n;
|
|
873
|
-
}
|
|
874
|
-
let $ = S(() => {
|
|
875
|
-
let e = _.value.numbering;
|
|
876
|
-
if (!e || !v.value) return "";
|
|
877
|
-
let t = (b.value.length ? b.value : [v.value]).findIndex((e) => e.id === r.id), n = t >= 0 ? t + 1 : 1;
|
|
878
|
-
return e === "roman" ? Ee(n) : String(n);
|
|
879
|
-
});
|
|
880
|
-
function ke(e) {
|
|
881
|
-
return e ? Array.isArray(e.items) ? e.items.map((e) => e && typeof e == "object" ? e.id : e).filter((e) => e != null) : Array.isArray(e.item_ids) ? e.item_ids.filter((e) => e != null) : Array.isArray(e.pictures) ? e.pictures.map((e) => e?.picture_item_id).filter((e) => e != null) : [] : [];
|
|
882
|
-
}
|
|
883
|
-
let Ae = q(u), je = S(() => {
|
|
884
|
-
let e = _.value.items?.of ?? ke;
|
|
885
|
-
return v.value ? e(v.value, K.value) : [];
|
|
886
|
-
}), Ne = S(() => je.value.map((e) => Ae.value.get(e)).filter(Boolean)), Pe = L(null);
|
|
887
|
-
ie(Ne, (e) => {
|
|
888
|
-
e.some((e) => e.id === Pe.value) || (Pe.value = e[0]?.id ?? null);
|
|
889
|
-
}, { immediate: !0 });
|
|
890
|
-
let Fe = S(() => Ne.value.find((e) => e.id === Pe.value) ?? Ne.value[0] ?? null);
|
|
891
|
-
function Ie(e) {
|
|
892
|
-
Pe.value = e;
|
|
893
|
-
}
|
|
894
|
-
function Le(e) {
|
|
895
|
-
let t = _.value.items?.route;
|
|
896
|
-
return !t || !e ? null : typeof t == "function" ? t(e, K.value) : {
|
|
897
|
-
name: t,
|
|
898
|
-
params: { id: e.id }
|
|
899
|
-
};
|
|
900
|
-
}
|
|
901
|
-
function Re(e) {
|
|
902
|
-
let t = _.value.route;
|
|
903
|
-
return !t || !e ? null : typeof t == "function" ? t(e, K.value) : {
|
|
904
|
-
name: t,
|
|
905
|
-
params: { id: e.id }
|
|
906
|
-
};
|
|
907
|
-
}
|
|
908
|
-
function ze(e) {
|
|
909
|
-
if (!e) return null;
|
|
910
|
-
let t = a.tr(u, e.id, B.value, "en").name ?? e.internal_name ?? e.id;
|
|
911
|
-
return {
|
|
912
|
-
name: ye(String(t)),
|
|
913
|
-
image: e.images?.[0]?.url ?? "",
|
|
914
|
-
imageAlt: be(String(t))
|
|
915
|
-
};
|
|
916
|
-
}
|
|
917
|
-
let Be = S(() => {
|
|
918
|
-
let e = Fe.value;
|
|
919
|
-
if (!e) return null;
|
|
920
|
-
let t = ze(e), n = _.value.items?.caption?.(e, v.value, K.value);
|
|
921
|
-
return {
|
|
922
|
-
...t,
|
|
923
|
-
...n
|
|
924
|
-
};
|
|
925
|
-
}), Ve = S(() => !!_.value.panel), He = S(() => {
|
|
926
|
-
let e = Fe.value;
|
|
927
|
-
if (!e) return [];
|
|
928
|
-
let t = Be.value, n = e.images?.[0]?.url ? [{
|
|
929
|
-
id: "__primary",
|
|
930
|
-
image: e.images[0].url,
|
|
931
|
-
alt: t?.imageAlt ?? "",
|
|
932
|
-
caption: {
|
|
933
|
-
title: t?.name ?? "",
|
|
934
|
-
justification: "",
|
|
935
|
-
fields: null
|
|
936
|
-
}
|
|
937
|
-
}] : [], r = _.value.panel?.variants?.(e, K.value) ?? [];
|
|
938
|
-
return [...n, ...r.map((e, t) => ({
|
|
939
|
-
id: e.id ?? `variant-${t}`,
|
|
940
|
-
...e
|
|
941
|
-
}))];
|
|
942
|
-
}), Ue = L(null);
|
|
943
|
-
ie(He, (e) => {
|
|
944
|
-
e.some((e) => e.id === Ue.value) || (Ue.value = e[0]?.id ?? null);
|
|
945
|
-
}, { immediate: !0 });
|
|
946
|
-
let We = S(() => He.value.find((e) => e.id === Ue.value) ?? He.value[0] ?? null);
|
|
947
|
-
function Ge(e) {
|
|
948
|
-
Ue.value = e;
|
|
949
|
-
}
|
|
950
|
-
let Ke = S(() => {
|
|
951
|
-
let e = We.value;
|
|
952
|
-
return e?.image ? [{
|
|
953
|
-
url: e.image,
|
|
954
|
-
alt: e.alt ?? ""
|
|
955
|
-
}] : [];
|
|
956
|
-
}), qe = S(() => {
|
|
957
|
-
let e = Fe.value;
|
|
958
|
-
return !e || !_.value.panel?.fields ? [] : _.value.panel.fields(e, v.value, K.value) ?? [];
|
|
959
|
-
}), Je = S(() => {
|
|
960
|
-
let e = We.value?.caption?.fields;
|
|
961
|
-
return e == null ? qe.value : e.map((e) => ({
|
|
962
|
-
label: e.label ? i(e.label) : "",
|
|
963
|
-
value: e.value
|
|
964
|
-
}));
|
|
965
|
-
}), Ye = S(() => {
|
|
966
|
-
let e = We.value?.caption?.justification;
|
|
967
|
-
return e ? ye(String(e)) : "";
|
|
968
|
-
}), Xe = S(() => Ne.value.map((e) => {
|
|
969
|
-
let t = ze(e), n = _.value.items?.meta?.(e, K.value) ?? [], r = _.value.items?.badge?.(e, K.value) ?? "";
|
|
970
|
-
return {
|
|
971
|
-
id: e.id,
|
|
972
|
-
image: t.image,
|
|
973
|
-
imageAlt: t.imageAlt,
|
|
974
|
-
name: t.name,
|
|
975
|
-
meta: n,
|
|
976
|
-
badge: r,
|
|
977
|
-
to: Le(e)
|
|
978
|
-
};
|
|
979
|
-
})), Ze = S(() => _.value.breadcrumb && v.value ? p.parents(r.id) : []), Qe = S(() => {
|
|
980
|
-
let e = _.value.tabs;
|
|
981
|
-
return e ? e === "children" ? v.value ? p.children(v.value.id) : [] : b.value : [];
|
|
982
|
-
}), $e = S(() => _.value.previous ?? "exhibition.theme.previous"), et = S(() => _.value.next ?? "exhibition.theme.next"), tt = S(() => _.value.backTo ?? "record.action.backToResults"), nt = S(() => _.value.inThisTheme ?? "exhibition.theme.inThisTheme"), rt = S(() => _.value.seeAll ?? "exhibition.theme.seeAllInTheme"), it = S(() => ({
|
|
983
|
-
...K.value,
|
|
984
|
-
items: Ne.value,
|
|
985
|
-
selected: Fe.value,
|
|
986
|
-
selectedVariant: We.value,
|
|
987
|
-
selectVariant: Ge,
|
|
988
|
-
breadcrumb: Ze.value,
|
|
989
|
-
previous: M.value,
|
|
990
|
-
next: I.value
|
|
991
|
-
})), at = S(() => xe.value && !Se("panel") ? !1 : Ve.value || Ne.value.length > 0 || !!o.aside), ot = S(() => (!xe.value || Se("navigation")) && !!j.value && !!(M.value || I.value));
|
|
992
|
-
return (r, a) => g.value && !v.value ? (F(), C(H(oe), { key: 0 })) : v.value ? (F(), T("article", {
|
|
993
|
-
key: 1,
|
|
994
|
-
class: N(["mwnf-essay", { "mwnf-essay--about": xe.value }]),
|
|
995
|
-
dir: H(ne) || void 0,
|
|
996
|
-
onClick: a[0] ||= (...e) => H(de) && H(de)(...e)
|
|
997
|
-
}, [
|
|
998
|
-
z(r.$slots, "header", P(A(it.value)), () => [
|
|
999
|
-
Ze.value.length ? (F(), T("p", Rt, [E("span", zt, V(H(i)(tt.value)), 1), (F(!0), T(x, null, R(Ze.value, (e) => (F(), T(x, { key: e.id }, [Re(e) ? (F(), C(n, {
|
|
1000
|
-
key: 0,
|
|
1001
|
-
to: Re(e),
|
|
1002
|
-
class: "mwnf-essay__breadcrumb-link"
|
|
1003
|
-
}, {
|
|
1004
|
-
default: G(() => [O(V(W(e)), 1)]),
|
|
1005
|
-
_: 2
|
|
1006
|
-
}, 1032, ["to"])) : (F(), T("span", Bt, V(W(e)), 1))], 64))), 128))])) : w("", !0),
|
|
1007
|
-
Qe.value.length > 1 ? (F(), T("div", {
|
|
1008
|
-
key: 1,
|
|
1009
|
-
class: "mwnf-essay__tabs",
|
|
1010
|
-
role: "tablist",
|
|
1011
|
-
"aria-label": H(i)(nt.value)
|
|
1012
|
-
}, [(F(!0), T(x, null, R(Qe.value, (t) => (F(), C(n, {
|
|
1013
|
-
key: t.id,
|
|
1014
|
-
to: Re(t),
|
|
1015
|
-
class: N(["mwnf-essay__tab", { "mwnf-essay__tab--active": t.id === e.id }])
|
|
1016
|
-
}, {
|
|
1017
|
-
default: G(() => [O(V(W(t)), 1)]),
|
|
1018
|
-
_: 2
|
|
1019
|
-
}, 1032, ["to", "class"]))), 128))], 8, Vt)) : w("", !0),
|
|
1020
|
-
E("h1", Ht, [$.value ? (F(), T("span", Ut, V($.value), 1)) : w("", !0), E("span", { innerHTML: me.value }, null, 8, Wt)])
|
|
1021
|
-
]),
|
|
1022
|
-
E("div", Gt, [E("div", Kt, [
|
|
1023
|
-
U.value ? w("", !0) : (F(), T("p", qt, V(H(i)("core.status.loading")), 1)),
|
|
1024
|
-
he.value ? (F(), T("p", {
|
|
1025
|
-
key: 1,
|
|
1026
|
-
class: "mwnf-essay__quote",
|
|
1027
|
-
innerHTML: he.value
|
|
1028
|
-
}, null, 8, Jt)) : w("", !0),
|
|
1029
|
-
z(r.$slots, "before-body", P(A(it.value))),
|
|
1030
|
-
ge.value ? (F(), T("div", {
|
|
1031
|
-
key: 2,
|
|
1032
|
-
class: "mwnf-essay__prose mwnf-sheet__block",
|
|
1033
|
-
innerHTML: ge.value
|
|
1034
|
-
}, null, 8, Yt)) : w("", !0),
|
|
1035
|
-
z(r.$slots, "after-body", P(A(it.value))),
|
|
1036
|
-
xe.value ? w("", !0) : z(r.$slots, "justifications", P(A(it.value)), void 0, void 0, 3),
|
|
1037
|
-
ot.value ? (F(), T("div", Xt, [z(r.$slots, "navigation", P(A(it.value)), () => [M.value ? (F(), C(n, {
|
|
1038
|
-
key: 0,
|
|
1039
|
-
to: Re(M.value),
|
|
1040
|
-
class: "mwnf-essay__nav-link mwnf-essay__nav-link--previous"
|
|
1041
|
-
}, {
|
|
1042
|
-
default: G(() => [O("← " + V(H(i)($e.value)), 1)]),
|
|
1043
|
-
_: 1
|
|
1044
|
-
}, 8, ["to"])) : (F(), T("span", Zt)), I.value ? (F(), C(n, {
|
|
1045
|
-
key: 2,
|
|
1046
|
-
to: Re(I.value),
|
|
1047
|
-
class: "mwnf-essay__nav-link mwnf-essay__nav-link--next"
|
|
1048
|
-
}, {
|
|
1049
|
-
default: G(() => [O(V(H(i)(et.value)) + " →", 1)]),
|
|
1050
|
-
_: 1
|
|
1051
|
-
}, 8, ["to"])) : w("", !0)])])) : w("", !0)
|
|
1052
|
-
]), at.value ? (F(), T("div", Qt, [
|
|
1053
|
-
z(r.$slots, "panel", P(A(it.value)), () => [Ve.value && Be.value ? (F(), T("div", $t, [
|
|
1054
|
-
k(s, { images: Ke.value }, null, 8, ["images"]),
|
|
1055
|
-
He.value.length > 1 ? (F(), T("ul", en, [(F(!0), T(x, null, R(He.value, (e) => (F(), T("li", { key: e.id }, [E("button", {
|
|
1056
|
-
type: "button",
|
|
1057
|
-
class: N(["mwnf-essay__variant", { "mwnf-essay__variant--active": e.id === We.value?.id }]),
|
|
1058
|
-
"aria-pressed": e.id === We.value?.id ? "true" : "false",
|
|
1059
|
-
onClick: (t) => Ge(e.id)
|
|
1060
|
-
}, [e.image ? (F(), T("img", {
|
|
1061
|
-
key: 0,
|
|
1062
|
-
src: e.image,
|
|
1063
|
-
alt: e.alt ?? "",
|
|
1064
|
-
loading: "lazy"
|
|
1065
|
-
}, null, 8, nn)) : w("", !0)], 10, tn)]))), 128))])) : w("", !0),
|
|
1066
|
-
E("h3", {
|
|
1067
|
-
class: "mwnf-essay__panel-name",
|
|
1068
|
-
innerHTML: We.value?.caption?.title || Be.value.name
|
|
1069
|
-
}, null, 8, rn),
|
|
1070
|
-
(F(!0), T(x, null, R(Je.value, (e, t) => (F(), T("p", {
|
|
1071
|
-
key: t,
|
|
1072
|
-
class: "mwnf-essay__panel-field"
|
|
1073
|
-
}, [e.label ? (F(), T("span", an, V(e.label), 1)) : w("", !0), E("span", { innerHTML: e.value }, null, 8, on)]))), 128)),
|
|
1074
|
-
Ye.value ? (F(), T("p", {
|
|
1075
|
-
key: 1,
|
|
1076
|
-
class: "mwnf-essay__panel-justification mwnf-sheet__block",
|
|
1077
|
-
innerHTML: Ye.value
|
|
1078
|
-
}, null, 8, sn)) : w("", !0),
|
|
1079
|
-
Le(Fe.value) ? (F(), C(n, {
|
|
1080
|
-
key: 2,
|
|
1081
|
-
to: Le(Fe.value),
|
|
1082
|
-
class: "mwnf-essay__panel-link"
|
|
1083
|
-
}, {
|
|
1084
|
-
default: G(() => [O(V(H(i)(rt.value)) + " →", 1)]),
|
|
1085
|
-
_: 1
|
|
1086
|
-
}, 8, ["to"])) : w("", !0)
|
|
1087
|
-
])) : w("", !0)]),
|
|
1088
|
-
z(r.$slots, "thumbnails", P(A(it.value)), () => [Ve.value && Ne.value.length > 1 ? (F(), T("ul", cn, [(F(!0), T(x, null, R(Ne.value, (e) => (F(), T("li", { key: e.id }, [E("button", {
|
|
1089
|
-
type: "button",
|
|
1090
|
-
class: N(["mwnf-essay__thumb", { "mwnf-essay__thumb--active": e.id === Fe.value?.id }]),
|
|
1091
|
-
onClick: (t) => Ie(e.id)
|
|
1092
|
-
}, [e.images?.[0]?.url ? (F(), T("img", {
|
|
1093
|
-
key: 0,
|
|
1094
|
-
src: e.images[0].url,
|
|
1095
|
-
alt: "",
|
|
1096
|
-
loading: "lazy"
|
|
1097
|
-
}, null, 8, un)) : w("", !0)], 10, ln)]))), 128))])) : !Ve.value && Xe.value.length ? (F(), C(t, {
|
|
1098
|
-
key: 1,
|
|
1099
|
-
records: Xe.value
|
|
1100
|
-
}, null, 8, ["records"])) : w("", !0)]),
|
|
1101
|
-
z(r.$slots, "aside", P(A(it.value)))
|
|
1102
|
-
])) : w("", !0)]),
|
|
1103
|
-
z(r.$slots, "after", P(A(it.value)), () => [k(m)]),
|
|
1104
|
-
k(ee, {
|
|
1105
|
-
term: H(ue),
|
|
1106
|
-
html: pe.value,
|
|
1107
|
-
dir: H(ne),
|
|
1108
|
-
onClose: H(fe)
|
|
1109
|
-
}, null, 8, [
|
|
1110
|
-
"term",
|
|
1111
|
-
"html",
|
|
1112
|
-
"dir",
|
|
1113
|
-
"onClose"
|
|
1114
|
-
])
|
|
1115
|
-
], 10, Lt)) : (F(), T("p", dn, V(H(i)("core.status.loading")), 1));
|
|
1116
|
-
}
|
|
1117
|
-
}, pn = { class: "mwnf-link-list" }, mn = {
|
|
1118
|
-
key: 0,
|
|
1119
|
-
class: "mwnf-link-list__back"
|
|
1120
|
-
}, hn = {
|
|
1121
|
-
key: 1,
|
|
1122
|
-
class: "mwnf-link-list__title"
|
|
1123
|
-
}, gn = {
|
|
1124
|
-
key: 2,
|
|
1125
|
-
class: "mwnf-link-list__groups"
|
|
1126
|
-
}, _n = {
|
|
1127
|
-
key: 0,
|
|
1128
|
-
class: "mwnf-link-list__heading"
|
|
1129
|
-
}, vn = {
|
|
1130
|
-
key: 1,
|
|
1131
|
-
class: "mwnf-link-list__links"
|
|
1132
|
-
}, yn = ["innerHTML"], bn = ["innerHTML"], xn = {
|
|
1133
|
-
key: 3,
|
|
1134
|
-
class: "mwnf-link-list__empty"
|
|
1135
|
-
}, Sn = {
|
|
1136
|
-
__name: "LinkListView",
|
|
1137
|
-
props: { spec: {
|
|
1138
|
-
type: Object,
|
|
1139
|
-
required: !0
|
|
1140
|
-
} },
|
|
1141
|
-
setup(e) {
|
|
1142
|
-
let t = e, { t: r } = Oe(), i = S(() => ((typeof t.spec.groups == "function" ? t.spec.groups({}) : t.spec.groups ?? []) ?? []).filter((e) => e.links?.length > 0)), a = S(() => t.spec.title ? r(t.spec.title) : ""), o = S(() => t.spec.back?.label ? r(t.spec.back.label) : ""), s = S(() => r(t.spec.empty ?? "catalogue.results.noResults"));
|
|
1143
|
-
return (e, c) => (F(), T("div", pn, [
|
|
1144
|
-
t.spec.back && o.value ? (F(), T("div", mn, [k(n, {
|
|
1145
|
-
to: t.spec.back.to,
|
|
1146
|
-
href: t.spec.back.href
|
|
1147
|
-
}, {
|
|
1148
|
-
default: G(() => [O(" ← " + V(o.value), 1)]),
|
|
1149
|
-
_: 1
|
|
1150
|
-
}, 8, ["to", "href"])])) : w("", !0),
|
|
1151
|
-
a.value ? (F(), T("h1", hn, V(a.value), 1)) : w("", !0),
|
|
1152
|
-
z(e.$slots, "before"),
|
|
1153
|
-
i.value.length ? (F(), T("div", gn, [(F(!0), T(x, null, R(i.value, (t, i) => (F(), T("section", {
|
|
1154
|
-
key: i,
|
|
1155
|
-
class: "mwnf-link-list__group"
|
|
1156
|
-
}, [z(e.$slots, "group", { group: t }, () => [t.heading ? (F(), T("h2", _n, V(H(r)(t.heading)), 1)) : w("", !0), t.links?.length ? (F(), T("ul", vn, [(F(!0), T(x, null, R(t.links, (e, t) => (F(), T("li", {
|
|
1157
|
-
key: t,
|
|
1158
|
-
class: "mwnf-link-list__item"
|
|
1159
|
-
}, [k(n, {
|
|
1160
|
-
class: "mwnf-link-list__link",
|
|
1161
|
-
to: e.to,
|
|
1162
|
-
href: e.href
|
|
1163
|
-
}, {
|
|
1164
|
-
default: G(() => [E("span", { innerHTML: H(pe)(e.label) }, null, 8, yn)]),
|
|
1165
|
-
_: 2
|
|
1166
|
-
}, 1032, ["to", "href"]), e.note ? (F(), T("div", {
|
|
1167
|
-
key: 0,
|
|
1168
|
-
class: "mwnf-link-list__note",
|
|
1169
|
-
innerHTML: H(pe)(e.note)
|
|
1170
|
-
}, null, 8, bn)) : w("", !0)]))), 128))])) : w("", !0)])]))), 128))])) : (F(), T("div", xn, V(s.value), 1)),
|
|
1171
|
-
z(e.$slots, "after")
|
|
1172
|
-
]));
|
|
1173
|
-
}
|
|
1174
|
-
}, Cn = { class: "mwnf-partner-list" }, wn = {
|
|
1175
|
-
key: 0,
|
|
1176
|
-
class: "mwnf-partner-list__title"
|
|
1177
|
-
}, Tn = {
|
|
1178
|
-
key: 1,
|
|
1179
|
-
class: "mwnf-partner-list__count"
|
|
1180
|
-
}, En = {
|
|
1181
|
-
key: 2,
|
|
1182
|
-
class: "mwnf-partner-list__toggle"
|
|
1183
|
-
}, Dn = {
|
|
1184
|
-
key: 3,
|
|
1185
|
-
class: "mwnf-partner-list__groups"
|
|
1186
|
-
}, On = {
|
|
1187
|
-
key: 0,
|
|
1188
|
-
class: "mwnf-partner-list__group-title"
|
|
1189
|
-
}, kn = { class: "mwnf-partner-list__tier" }, An = { class: "mwnf-partner-list__row" }, jn = {
|
|
1190
|
-
key: 0,
|
|
1191
|
-
class: "mwnf-partner-list__children"
|
|
1192
|
-
}, Mn = {
|
|
1193
|
-
key: 0,
|
|
1194
|
-
class: "mwnf-partner-list__tier mwnf-partner-list__tier--associated"
|
|
1195
|
-
}, Nn = { class: "mwnf-partner-list__tier-label" }, Pn = {
|
|
1196
|
-
key: 4,
|
|
1197
|
-
class: "mwnf-partner-list__empty"
|
|
1198
|
-
}, Fn = {
|
|
1199
|
-
__name: "PartnerListView",
|
|
1200
|
-
props: { spec: {
|
|
1201
|
-
type: Object,
|
|
1202
|
-
required: !0
|
|
1203
|
-
} },
|
|
1204
|
-
setup(e) {
|
|
1205
|
-
let t = e, { t: n, locale: r } = Oe(), i = Te(), a = S(() => t.spec), s = S(() => a.value.entity ?? "partners"), c = se(s.value);
|
|
1206
|
-
s.value && i.loadTranslations(s.value, "en");
|
|
1207
|
-
let l = {
|
|
1208
|
-
t: n,
|
|
1209
|
-
locale: r,
|
|
1210
|
-
tr: (e) => i.tr(s.value, e, r.value, "en"),
|
|
1211
|
-
renderInline: ye,
|
|
1212
|
-
renderPlain: be
|
|
1213
|
-
}, { filters: u, apply: d } = $({
|
|
1214
|
-
keys: ["order"],
|
|
1215
|
-
page: !1
|
|
1216
|
-
}), f = S(() => u.order === "desc" ? "desc" : "asc");
|
|
1217
|
-
function p() {
|
|
1218
|
-
d({ order: f.value === "asc" ? "desc" : "asc" });
|
|
1219
|
-
}
|
|
1220
|
-
let m = S(() => {
|
|
1221
|
-
let e = a.value, t = c.value ?? [];
|
|
1222
|
-
return e.scope ? t.filter((t) => e.scope(t, l)) : t;
|
|
1223
|
-
}), h = S(() => a.value.route);
|
|
1224
|
-
function g(e) {
|
|
1225
|
-
let t = h.value;
|
|
1226
|
-
return t ? typeof t == "function" ? t(e, l) : {
|
|
1227
|
-
name: t,
|
|
1228
|
-
params: { id: e.id }
|
|
1229
|
-
} : null;
|
|
1230
|
-
}
|
|
1231
|
-
function _(e) {
|
|
1232
|
-
let t = a.value.objectsRoute;
|
|
1233
|
-
return _e(e, l.tr(e.id), {
|
|
1234
|
-
route: g,
|
|
1235
|
-
objectsRoute: t ? (e) => t(e, l) : null
|
|
1236
|
-
});
|
|
1237
|
-
}
|
|
1238
|
-
function ee(e, t) {
|
|
1239
|
-
let n = t.name ?? "";
|
|
1240
|
-
return {
|
|
1241
|
-
..._e(e, {}, {}),
|
|
1242
|
-
name: n,
|
|
1243
|
-
plainName: y(n),
|
|
1244
|
-
city: t.city ?? "",
|
|
1245
|
-
location: t.city ?? "",
|
|
1246
|
-
logos: t.logo ? [{
|
|
1247
|
-
url: t.logo,
|
|
1248
|
-
alt: y(n),
|
|
1249
|
-
type: ""
|
|
1250
|
-
}] : [],
|
|
1251
|
-
itemCount: t.count ?? 0,
|
|
1252
|
-
route: t.route ?? null
|
|
1253
|
-
};
|
|
1254
|
-
}
|
|
1255
|
-
function v(e) {
|
|
1256
|
-
if (a.value.record) {
|
|
1257
|
-
let t = a.value.record(e, l);
|
|
1258
|
-
return {
|
|
1259
|
-
partner: e,
|
|
1260
|
-
row: t,
|
|
1261
|
-
view: ee(e, t)
|
|
1262
|
-
};
|
|
1263
|
-
}
|
|
1264
|
-
let t = _(e);
|
|
1265
|
-
return {
|
|
1266
|
-
partner: e,
|
|
1267
|
-
row: {
|
|
1268
|
-
name: t.name,
|
|
1269
|
-
city: t.city,
|
|
1270
|
-
logo: t.logos[0]?.url ?? "",
|
|
1271
|
-
count: t.itemCount,
|
|
1272
|
-
route: t.route
|
|
1273
|
-
},
|
|
1274
|
-
view: t
|
|
1275
|
-
};
|
|
1276
|
-
}
|
|
1277
|
-
function y(e) {
|
|
1278
|
-
return String(e ?? "").replace(/<[^>]*>/g, "");
|
|
1279
|
-
}
|
|
1280
|
-
let b = S(() => a.value.nested ? ge(m.value) : null), D = S(() => {
|
|
1281
|
-
let e = a.value, t = e.group?.tier ?? !1, n = (e.group?.order ?? "country") === "name", r = n ? m.value.map((e) => ({
|
|
1282
|
-
...e,
|
|
1283
|
-
country_id: "\0"
|
|
1284
|
-
})) : m.value, i = le(r, {
|
|
1285
|
-
label: n ? () => "" : (t) => e.label ? e.label(t, l) : t,
|
|
1286
|
-
tier: t,
|
|
1287
|
-
order: f.value
|
|
1288
|
-
}), o = (e, t) => y(e.row.name).localeCompare(y(t.row.name));
|
|
1289
|
-
return i.map((t) => {
|
|
1290
|
-
let r = t.main.map(v).sort(o), i = t.associated.map(v).sort(o);
|
|
1291
|
-
if (n && f.value === "desc" && (r.reverse(), i.reverse()), e.nested && b.value) {
|
|
1292
|
-
let e = new Set(i.map((e) => e.partner.id));
|
|
1293
|
-
r = r.map((t) => {
|
|
1294
|
-
let n = b.value.children(t.partner.id).filter((t) => e.has(t.id));
|
|
1295
|
-
for (let t of n) e.delete(t.id);
|
|
1296
|
-
return {
|
|
1297
|
-
...t,
|
|
1298
|
-
children: n.map(v)
|
|
1299
|
-
};
|
|
1300
|
-
}), i = i.filter((t) => e.has(t.partner.id));
|
|
1301
|
-
}
|
|
1302
|
-
return {
|
|
1303
|
-
country: t.country,
|
|
1304
|
-
label: t.label,
|
|
1305
|
-
main: r,
|
|
1306
|
-
associated: i
|
|
1307
|
-
};
|
|
1308
|
-
});
|
|
1309
|
-
}), O = S(() => D.value.some((e) => e.main.length > 0 || e.associated.length > 0)), j = S(() => n(a.value.associatedLabel ?? "partner.list.associated")), N = S(() => ({
|
|
1310
|
-
objectsLabel: a.value.objectsLabel ?? "partner.item.objectsInSite",
|
|
1311
|
-
emptyLabel: a.value.emptyLabel ?? "",
|
|
1312
|
-
show: { actions: !!a.value.actions }
|
|
1313
|
-
})), I = S(() => n(a.value.foundLabel ?? "partner.list.partnersFound")), L = S(() => n(a.value.sortAscendingLabel ?? "partner.list.sortAscending")), H = S(() => n(a.value.sortDescendingLabel ?? "partner.list.sortDescending")), te = S(() => n(a.value.empty ?? "catalogue.results.noResults")), ne = S(() => a.value.title ? n(a.value.title) : ""), re = S(() => D.value.reduce((e, t) => e + t.main.length + t.associated.length, 0)), U = S(() => a.value.variant ?? "accordion"), W = S(() => ({
|
|
1314
|
-
t: n,
|
|
1315
|
-
locale: r,
|
|
1316
|
-
groups: D.value,
|
|
1317
|
-
orderDir: f.value,
|
|
1318
|
-
toggleOrder: p
|
|
1319
|
-
}));
|
|
1320
|
-
return (e, t) => (F(), T("section", Cn, [
|
|
1321
|
-
ne.value ? (F(), T("h1", wn, V(ne.value), 1)) : w("", !0),
|
|
1322
|
-
a.value.count ? (F(), T("div", Tn, V(I.value) + ": " + V(re.value), 1)) : w("", !0),
|
|
1323
|
-
z(e.$slots, "before", P(A(W.value))),
|
|
1324
|
-
a.value.orderToggle ? (F(), T("div", En, [E("button", {
|
|
1325
|
-
type: "button",
|
|
1326
|
-
class: "mwnf-partner-list__toggle-button",
|
|
1327
|
-
onClick: p
|
|
1328
|
-
}, V(f.value === "asc" ? H.value : L.value), 1)])) : w("", !0),
|
|
1329
|
-
O.value ? (F(), T("div", Dn, [(F(!0), T(x, null, R(D.value, (t) => (F(), C(B(U.value === "accordion" ? "details" : "section"), M({
|
|
1330
|
-
key: t.country ?? "",
|
|
1331
|
-
class: "mwnf-partner-list__group"
|
|
1332
|
-
}, { ref_for: !0 }, U.value === "accordion" ? { open: !0 } : {}), {
|
|
1333
|
-
default: G(() => [
|
|
1334
|
-
(F(), C(B(U.value === "accordion" ? "summary" : "div"), { class: "mwnf-partner-list__group-heading" }, {
|
|
1335
|
-
default: G(() => [z(e.$slots, "group-heading", M({ group: t }, { ref_for: !0 }, W.value), () => [t.label ? (F(), T("h2", On, V(t.label), 1)) : w("", !0)])]),
|
|
1336
|
-
_: 2
|
|
1337
|
-
}, 1024)),
|
|
1338
|
-
E("div", kn, [(F(!0), T(x, null, R(t.main, (n) => (F(), T("div", {
|
|
1339
|
-
key: n.partner.id,
|
|
1340
|
-
class: "mwnf-partner-list__row-block"
|
|
1341
|
-
}, [E("div", An, [z(e.$slots, "row", M({
|
|
1342
|
-
group: t,
|
|
1343
|
-
partner: n.partner,
|
|
1344
|
-
row: n.row,
|
|
1345
|
-
view: n.view
|
|
1346
|
-
}, { ref_for: !0 }, W.value), () => [k(o, M({
|
|
1347
|
-
variant: "line",
|
|
1348
|
-
partner: n.view
|
|
1349
|
-
}, { ref_for: !0 }, N.value), null, 16, ["partner"])])]), n.children?.length ? (F(), T("div", jn, [(F(!0), T(x, null, R(n.children, (n) => (F(), T("div", {
|
|
1350
|
-
key: n.partner.id,
|
|
1351
|
-
class: "mwnf-partner-list__row mwnf-partner-list__row--child"
|
|
1352
|
-
}, [z(e.$slots, "row", M({
|
|
1353
|
-
group: t,
|
|
1354
|
-
partner: n.partner,
|
|
1355
|
-
row: n.row,
|
|
1356
|
-
view: n.view
|
|
1357
|
-
}, { ref_for: !0 }, W.value), () => [k(o, M({
|
|
1358
|
-
variant: "line",
|
|
1359
|
-
partner: n.view
|
|
1360
|
-
}, { ref_for: !0 }, N.value), null, 16, ["partner"])])]))), 128))])) : w("", !0)]))), 128))]),
|
|
1361
|
-
t.associated.length ? (F(), T("div", Mn, [E("p", Nn, V(j.value), 1), (F(!0), T(x, null, R(t.associated, (n) => (F(), T("div", {
|
|
1362
|
-
key: n.partner.id,
|
|
1363
|
-
class: "mwnf-partner-list__row"
|
|
1364
|
-
}, [z(e.$slots, "row", M({
|
|
1365
|
-
group: t,
|
|
1366
|
-
partner: n.partner,
|
|
1367
|
-
row: n.row,
|
|
1368
|
-
view: n.view
|
|
1369
|
-
}, { ref_for: !0 }, W.value), () => [k(o, M({
|
|
1370
|
-
variant: "line",
|
|
1371
|
-
partner: n.view
|
|
1372
|
-
}, { ref_for: !0 }, N.value), null, 16, ["partner"])])]))), 128))])) : w("", !0)
|
|
1373
|
-
]),
|
|
1374
|
-
_: 2
|
|
1375
|
-
}, 1040))), 128))])) : (F(), T("p", Pn, V(te.value), 1)),
|
|
1376
|
-
z(e.$slots, "after", P(A(W.value)))
|
|
1377
|
-
]));
|
|
1378
|
-
}
|
|
1379
|
-
}, In = { class: "mwnf-text-page" }, Ln = {
|
|
1380
|
-
key: 0,
|
|
1381
|
-
class: "mwnf-text-page__back"
|
|
1382
|
-
}, Rn = {
|
|
1383
|
-
key: 1,
|
|
1384
|
-
class: "mwnf-text-page__heading"
|
|
1385
|
-
}, zn = { class: "mwnf-prose" }, Bn = ["innerHTML"], Vn = {
|
|
1386
|
-
__name: "TextPageView",
|
|
1387
|
-
props: { spec: {
|
|
1388
|
-
type: Object,
|
|
1389
|
-
required: !0
|
|
1390
|
-
} },
|
|
1391
|
-
setup(e) {
|
|
1392
|
-
let t = e, { t: r } = Oe(), i = Te(), a = ke(), o = S(() => t.spec.heading ? r(t.spec.heading) : ""), s = S(() => typeof t.spec.body == "string"), c = S(() => s.value ? t.spec.body : null), l = S(() => ({
|
|
1393
|
-
t: r,
|
|
1394
|
-
tr: (e, t) => i.tr(e, t, a.value, "en"),
|
|
1395
|
-
language: a.value
|
|
1396
|
-
})), u = S(() => s.value ? null : typeof t.spec.body == "function" ? fe(t.spec.body(l.value)) : null), d = S(() => t.spec.back === !1 ? null : t.spec.back === !0 ? r("core.action.back") : t.spec.back?.label ? r(t.spec.back.label) : null);
|
|
1397
|
-
return (e, r) => (F(), T("div", In, [
|
|
1398
|
-
d.value && (t.spec.back === !0 || t.spec.back?.to || t.spec.back?.href) ? (F(), T("div", Ln, [k(n, {
|
|
1399
|
-
to: t.spec.back === !0 ? {} : t.spec.back?.to,
|
|
1400
|
-
href: t.spec.back === !0 ? "#" : t.spec.back?.href
|
|
1401
|
-
}, {
|
|
1402
|
-
default: G(() => [O(" ← " + V(d.value), 1)]),
|
|
1403
|
-
_: 1
|
|
1404
|
-
}, 8, ["to", "href"])])) : w("", !0),
|
|
1405
|
-
o.value ? (F(), T("h1", Rn, V(o.value), 1)) : w("", !0),
|
|
1406
|
-
E("div", zn, [s.value ? (F(), C(H(ae), {
|
|
1407
|
-
key: 0,
|
|
1408
|
-
keypath: c.value
|
|
1409
|
-
}, null, 8, ["keypath"])) : u.value ? (F(), T("div", {
|
|
1410
|
-
key: 1,
|
|
1411
|
-
innerHTML: u.value
|
|
1412
|
-
}, null, 8, Bn)) : w("", !0)])
|
|
1413
|
-
]));
|
|
1414
|
-
}
|
|
1415
|
-
}, Hn = { class: "mwnf-search-form__row-label" }, Un = ["onUpdate:modelValue"], Wn = ["value"], Gn = ["onUpdate:modelValue"], Kn = ["value"], qn = ["onUpdate:modelValue", "placeholder"], Jn = {
|
|
1416
|
-
key: 0,
|
|
1417
|
-
class: "mwnf-search-form__dates"
|
|
1418
|
-
}, Yn = {
|
|
1419
|
-
key: 1,
|
|
1420
|
-
class: "mwnf-facet"
|
|
1421
|
-
}, Xn = { class: "mwnf-facet__label" }, Zn = { value: "" }, Qn = ["value"], $n = {
|
|
1422
|
-
key: 0,
|
|
1423
|
-
class: "mwnf-search-form__dates"
|
|
1424
|
-
}, er = { class: "mwnf-search-form__radio-choice" }, tr = ["value"], nr = ["onUpdate:modelValue", "disabled"], rr = ["onUpdate:modelValue"], ir = { class: "mwnf-facet__label" }, ar = {
|
|
1425
|
-
key: 0,
|
|
1426
|
-
class: "mwnf-search-form__how-to"
|
|
1427
|
-
}, or = {
|
|
1428
|
-
__name: "SearchFormView",
|
|
1429
|
-
props: { spec: {
|
|
1430
|
-
type: Object,
|
|
1431
|
-
required: !0
|
|
1432
|
-
} },
|
|
1433
|
-
setup(e) {
|
|
1434
|
-
let t = e, { t: r } = Oe(), i = ze(), o = S(() => t.spec), s = S(() => o.value.mode), c = S(() => o.value.entity ? se(o.value.entity).value ?? [] : []), l = S(() => o.value.dates === "buckets"), u = S(() => {
|
|
1435
|
-
let e = o.value.dates;
|
|
1436
|
-
if (!e || e === "buckets") return null;
|
|
1437
|
-
let t = e.presets;
|
|
1438
|
-
return typeof t == "function" ? t() : t ?? J();
|
|
1439
|
-
});
|
|
1440
|
-
function d(e) {
|
|
1441
|
-
return (e ?? []).map((e) => ({
|
|
1442
|
-
value: e,
|
|
1443
|
-
label: String(e)
|
|
1444
|
-
}));
|
|
1445
|
-
}
|
|
1446
|
-
let f = S(() => l.value ? Le(c.value, r) : []), p = S(() => l.value ? f.value : d(u.value?.from)), m = S(() => l.value ? f.value : d(u.value?.to)), h = S(() => !!o.value.dates), g = L(""), _ = L(""), ee = o.value.language ? Fe(o.value.language) : null, v = S(() => ee?.languages.value ?? []), y = ee?.language ?? L(""), D = S(() => Object.fromEntries((o.value.facets ?? []).filter((e) => !e.options && e.type !== "year").map((e) => [e.key, { field: e.field ?? e.key }]))), M = Ee(c, D), B = S(() => {
|
|
1447
|
-
let e = {};
|
|
1448
|
-
for (let t of o.value.facets ?? []) e[t.key] = t.options ?? M.value[t.key] ?? [];
|
|
1449
|
-
return e;
|
|
1450
|
-
}), te = [{
|
|
1451
|
-
key: "AND",
|
|
1452
|
-
label: "catalogue.search.and"
|
|
1453
|
-
}, {
|
|
1454
|
-
key: "OR",
|
|
1455
|
-
label: "catalogue.search.or"
|
|
1456
|
-
}], ie = [
|
|
1457
|
-
"catalogue.search.keywordOne",
|
|
1458
|
-
"catalogue.search.keywordTwo",
|
|
1459
|
-
"catalogue.search.keywordThree"
|
|
1460
|
-
], ae = S(() => o.value.operators ?? te), oe = L(Array.from({ length: o.value.rows ?? 3 }, () => ({
|
|
1461
|
-
keyword: "",
|
|
1462
|
-
field: o.value.fields?.[0]?.key ?? "",
|
|
1463
|
-
cond: (o.value.operators ?? te)[0].key
|
|
1464
|
-
})));
|
|
1465
|
-
function q(e) {
|
|
1466
|
-
return ie[e] ? r(ie[e]) : "";
|
|
1467
|
-
}
|
|
1468
|
-
let Y = L(o.value.facets?.[0]?.key ?? ""), X = I(Object.fromEntries((o.value.facets ?? []).map((e) => [e.key, ""]))), Z = I(Object.fromEntries((o.value.extras ?? []).map((e) => [e.key, !1])));
|
|
1469
|
-
function Q() {
|
|
1470
|
-
let e = {};
|
|
1471
|
-
for (let t of o.value.extras ?? []) Z[t.key] && (e[t.key] = "1");
|
|
1472
|
-
return e;
|
|
1473
|
-
}
|
|
1474
|
-
function ce(e) {
|
|
1475
|
-
return i.push({
|
|
1476
|
-
name: o.value.target,
|
|
1477
|
-
query: e
|
|
1478
|
-
});
|
|
1479
|
-
}
|
|
1480
|
-
function le() {
|
|
1481
|
-
let e = {};
|
|
1482
|
-
if (s.value === "rows") oe.value.forEach((t, n) => {
|
|
1483
|
-
if (t.keyword) {
|
|
1484
|
-
if (n === 0) e.q = t.keyword, t.field && (e.field = t.field);
|
|
1485
|
-
else {
|
|
1486
|
-
let r = n + 1;
|
|
1487
|
-
e[`q${r}`] = t.keyword, t.field && (e[`field${r}`] = t.field), e[`op${r}`] = t.cond;
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
}), g.value && (e.from = String(g.value)), _.value && (e.to = String(_.value)), y.value && (e.lang = y.value);
|
|
1491
|
-
else if (s.value === "radio") {
|
|
1492
|
-
let t = Y.value, n = t ? X[t] : "";
|
|
1493
|
-
n && (e[t] = String(n));
|
|
1494
|
-
}
|
|
1495
|
-
return Object.assign(e, Q()), ce(e);
|
|
1496
|
-
}
|
|
1497
|
-
function ue(e, t) {
|
|
1498
|
-
if (t !== "" && t != null) return ce({
|
|
1499
|
-
[e]: String(t),
|
|
1500
|
-
...Q()
|
|
1501
|
-
});
|
|
1502
|
-
}
|
|
1503
|
-
function de() {
|
|
1504
|
-
return ce(Q());
|
|
1505
|
-
}
|
|
1506
|
-
let fe = S(() => s.value === "facets" ? "immediate" : "apply"), pe = S(() => s.value === "radio" ? "core.action.browse" : "core.action.search"), me = S(() => r(o.value.submitLabel ?? pe.value)), he = S(() => r(o.value.showAllLabel ?? "core.action.reset")), ge = S(() => ({
|
|
1507
|
-
mode: s.value,
|
|
1508
|
-
submit: le,
|
|
1509
|
-
showAll: de
|
|
1510
|
-
}));
|
|
1511
|
-
return (e, t) => (F(), T("section", { class: N(["mwnf-search-form", `mwnf-search-form--${s.value}`]) }, [
|
|
1512
|
-
z(e.$slots, "intro", P(A(ge.value))),
|
|
1513
|
-
z(e.$slots, "before", P(A(ge.value))),
|
|
1514
|
-
k(b, {
|
|
1515
|
-
class: "mwnf-search-form__panel",
|
|
1516
|
-
mode: fe.value,
|
|
1517
|
-
"apply-label": me.value,
|
|
1518
|
-
"reset-label": he.value,
|
|
1519
|
-
onApply: le,
|
|
1520
|
-
onReset: de
|
|
1521
|
-
}, {
|
|
1522
|
-
default: G(() => [
|
|
1523
|
-
s.value === "rows" ? (F(), T(x, { key: 0 }, [
|
|
1524
|
-
(F(!0), T(x, null, R(oe.value, (e, t) => (F(), T("div", {
|
|
1525
|
-
key: t,
|
|
1526
|
-
class: "mwnf-search-form__row"
|
|
1527
|
-
}, [
|
|
1528
|
-
E("span", Hn, V(q(t)), 1),
|
|
1529
|
-
t > 0 ? K((F(), T("select", {
|
|
1530
|
-
key: 0,
|
|
1531
|
-
"onUpdate:modelValue": (t) => e.cond = t,
|
|
1532
|
-
class: "mwnf-facet__select mwnf-search-form__operator"
|
|
1533
|
-
}, [(F(!0), T(x, null, R(ae.value, (e) => (F(), T("option", {
|
|
1534
|
-
key: e.key,
|
|
1535
|
-
value: e.key
|
|
1536
|
-
}, V(H(r)(e.label)), 9, Wn))), 128))], 8, Un)), [[U, e.cond]]) : w("", !0),
|
|
1537
|
-
K(E("select", {
|
|
1538
|
-
"onUpdate:modelValue": (t) => e.field = t,
|
|
1539
|
-
class: "mwnf-facet__select mwnf-search-form__field"
|
|
1540
|
-
}, [(F(!0), T(x, null, R(o.value.fields ?? [], (e) => (F(), T("option", {
|
|
1541
|
-
key: e.key,
|
|
1542
|
-
value: e.key
|
|
1543
|
-
}, V(H(r)(e.label)), 9, Kn))), 128))], 8, Gn), [[U, e.field]]),
|
|
1544
|
-
K(E("input", {
|
|
1545
|
-
"onUpdate:modelValue": (t) => e.keyword = t,
|
|
1546
|
-
type: "text",
|
|
1547
|
-
class: "mwnf-search-form__keyword",
|
|
1548
|
-
placeholder: H(r)("catalogue.search.keywordPlaceholder")
|
|
1549
|
-
}, null, 8, qn), [[W, e.keyword]])
|
|
1550
|
-
]))), 128)),
|
|
1551
|
-
h.value ? (F(), T("div", Jn, [k(a, {
|
|
1552
|
-
modelValue: g.value,
|
|
1553
|
-
"onUpdate:modelValue": t[0] ||= (e) => g.value = e,
|
|
1554
|
-
label: H(r)("catalogue.facet.dateFrom"),
|
|
1555
|
-
options: p.value,
|
|
1556
|
-
"any-label": "—"
|
|
1557
|
-
}, null, 8, [
|
|
1558
|
-
"modelValue",
|
|
1559
|
-
"label",
|
|
1560
|
-
"options"
|
|
1561
|
-
]), k(a, {
|
|
1562
|
-
modelValue: _.value,
|
|
1563
|
-
"onUpdate:modelValue": t[1] ||= (e) => _.value = e,
|
|
1564
|
-
label: H(r)("catalogue.facet.dateTo"),
|
|
1565
|
-
options: m.value,
|
|
1566
|
-
"any-label": "—"
|
|
1567
|
-
}, null, 8, [
|
|
1568
|
-
"modelValue",
|
|
1569
|
-
"label",
|
|
1570
|
-
"options"
|
|
1571
|
-
])])) : w("", !0),
|
|
1572
|
-
o.value.language ? (F(), T("label", Yn, [E("span", Xn, V(H(r)("catalogue.search.language")), 1), K(E("select", {
|
|
1573
|
-
"onUpdate:modelValue": t[2] ||= (e) => j(y) ? y.value = e : null,
|
|
1574
|
-
class: "mwnf-facet__select mwnf-search-form__language"
|
|
1575
|
-
}, [E("option", Zn, V(H(r)("catalogue.search.anyLanguage")), 1), (F(!0), T(x, null, R(v.value, (e) => (F(), T("option", {
|
|
1576
|
-
key: e,
|
|
1577
|
-
value: e
|
|
1578
|
-
}, V(e.toUpperCase()), 9, Qn))), 128))], 512), [[U, H(y)]])])) : w("", !0)
|
|
1579
|
-
], 64)) : s.value === "facets" ? (F(), T(x, { key: 1 }, [(F(!0), T(x, null, R(o.value.facets ?? [], (e) => (F(), C(a, {
|
|
1580
|
-
key: e.key,
|
|
1581
|
-
label: e.label ? H(r)(e.label) : "",
|
|
1582
|
-
options: B.value[e.key] ?? [],
|
|
1583
|
-
"model-value": X[e.key],
|
|
1584
|
-
"onUpdate:modelValue": (t) => ue(e.key, t)
|
|
1585
|
-
}, null, 8, [
|
|
1586
|
-
"label",
|
|
1587
|
-
"options",
|
|
1588
|
-
"model-value",
|
|
1589
|
-
"onUpdate:modelValue"
|
|
1590
|
-
]))), 128)), h.value ? (F(), T("div", $n, [k(a, {
|
|
1591
|
-
"model-value": g.value,
|
|
1592
|
-
label: H(r)("catalogue.facet.startDate"),
|
|
1593
|
-
options: p.value,
|
|
1594
|
-
"onUpdate:modelValue": t[3] ||= (e) => {
|
|
1595
|
-
g.value = e, ue("from", e);
|
|
1596
|
-
}
|
|
1597
|
-
}, null, 8, [
|
|
1598
|
-
"model-value",
|
|
1599
|
-
"label",
|
|
1600
|
-
"options"
|
|
1601
|
-
]), k(a, {
|
|
1602
|
-
"model-value": _.value,
|
|
1603
|
-
label: H(r)("catalogue.facet.endDate"),
|
|
1604
|
-
options: m.value,
|
|
1605
|
-
"onUpdate:modelValue": t[4] ||= (e) => {
|
|
1606
|
-
_.value = e, ue("to", e);
|
|
1607
|
-
}
|
|
1608
|
-
}, null, 8, [
|
|
1609
|
-
"model-value",
|
|
1610
|
-
"label",
|
|
1611
|
-
"options"
|
|
1612
|
-
])])) : w("", !0)], 64)) : s.value === "radio" ? (F(!0), T(x, { key: 2 }, R(o.value.facets ?? [], (e) => (F(), T("div", {
|
|
1613
|
-
key: e.key,
|
|
1614
|
-
class: "mwnf-search-form__radio-row"
|
|
1615
|
-
}, [E("label", er, [K(E("input", {
|
|
1616
|
-
"onUpdate:modelValue": t[5] ||= (e) => Y.value = e,
|
|
1617
|
-
type: "radio",
|
|
1618
|
-
name: "mwnf-search-form-filter",
|
|
1619
|
-
value: e.key
|
|
1620
|
-
}, null, 8, tr), [[re, Y.value]]), O(" " + V(e.label ? H(r)(e.label) : ""), 1)]), e.type === "year" ? K((F(), T("input", {
|
|
1621
|
-
key: 1,
|
|
1622
|
-
"onUpdate:modelValue": (t) => X[e.key] = t,
|
|
1623
|
-
type: "number",
|
|
1624
|
-
class: "mwnf-search-form__year",
|
|
1625
|
-
disabled: Y.value !== e.key
|
|
1626
|
-
}, null, 8, nr)), [[W, X[e.key]]]) : (F(), C(a, {
|
|
1627
|
-
key: 0,
|
|
1628
|
-
modelValue: X[e.key],
|
|
1629
|
-
"onUpdate:modelValue": (t) => X[e.key] = t,
|
|
1630
|
-
options: B.value[e.key] ?? [],
|
|
1631
|
-
disabled: Y.value !== e.key
|
|
1632
|
-
}, null, 8, [
|
|
1633
|
-
"modelValue",
|
|
1634
|
-
"onUpdate:modelValue",
|
|
1635
|
-
"options",
|
|
1636
|
-
"disabled"
|
|
1637
|
-
]))]))), 128)) : w("", !0),
|
|
1638
|
-
(F(!0), T(x, null, R(o.value.extras ?? [], (e) => (F(), T("label", {
|
|
1639
|
-
key: e.key,
|
|
1640
|
-
class: "mwnf-facet mwnf-facet--checkbox"
|
|
1641
|
-
}, [K(E("input", {
|
|
1642
|
-
"onUpdate:modelValue": (t) => Z[e.key] = t,
|
|
1643
|
-
type: "checkbox",
|
|
1644
|
-
class: "mwnf-facet__checkbox"
|
|
1645
|
-
}, null, 8, rr), [[ne, Z[e.key]]]), E("span", ir, V(H(r)(e.label)), 1)]))), 128)),
|
|
1646
|
-
z(e.$slots, "extras", P(A(ge.value)))
|
|
1647
|
-
]),
|
|
1648
|
-
_: 3
|
|
1649
|
-
}, 8, [
|
|
1650
|
-
"mode",
|
|
1651
|
-
"apply-label",
|
|
1652
|
-
"reset-label"
|
|
1653
|
-
]),
|
|
1654
|
-
o.value.howTo ? (F(), T("p", ar, [k(n, { to: { name: o.value.howTo } }, {
|
|
1655
|
-
default: G(() => [O(V(H(r)("catalogue.search.howTo")), 1)]),
|
|
1656
|
-
_: 1
|
|
1657
|
-
}, 8, ["to"])])) : w("", !0),
|
|
1658
|
-
z(e.$slots, "actions", P(A(ge.value)))
|
|
1659
|
-
], 2));
|
|
1660
|
-
}
|
|
1661
|
-
}, sr = { class: "mwnf-timeline" }, cr = {
|
|
1662
|
-
key: 0,
|
|
1663
|
-
class: "mwnf-timeline__title"
|
|
1664
|
-
}, lr = {
|
|
1665
|
-
key: 3,
|
|
1666
|
-
class: "mwnf-facet"
|
|
1667
|
-
}, ur = { class: "mwnf-facet__label" }, dr = [
|
|
1668
|
-
"value",
|
|
1669
|
-
"placeholder",
|
|
1670
|
-
"onInput"
|
|
1671
|
-
], fr = {
|
|
1672
|
-
key: 1,
|
|
1673
|
-
class: "mwnf-timeline__error"
|
|
1674
|
-
}, pr = {
|
|
1675
|
-
__name: "TimelineResultsView",
|
|
1676
|
-
props: { spec: {
|
|
1677
|
-
type: Object,
|
|
1678
|
-
required: !0
|
|
1679
|
-
} },
|
|
1680
|
-
setup(e) {
|
|
1681
|
-
let t = e, { t: r } = Oe(), i = ze(), o = S(() => t.spec), s = S(() => !!o.value.entrance), c = Ie({
|
|
1682
|
-
scope: t.spec.scope ?? "country",
|
|
1683
|
-
countryLabel: t.spec.countryLabel,
|
|
1684
|
-
countryIdForCode: t.spec.countryIdForCode,
|
|
1685
|
-
tr: t.spec.tr,
|
|
1686
|
-
timelinesEntity: t.spec.timelinesEntity,
|
|
1687
|
-
eventsEntity: t.spec.eventsEntity
|
|
1688
|
-
}), l = S(() => o.value.controls ?? []), u = S(() => o.value.keys ?? l.value.map((e) => e.key)), f = (e) => l.value.some((t) => t.key === e), p = S(() => ({
|
|
1689
|
-
t: r,
|
|
1690
|
-
tr: t.spec.tr,
|
|
1691
|
-
years: {
|
|
1692
|
-
min: N.value[0],
|
|
1693
|
-
max: N.value[1]
|
|
1694
|
-
}
|
|
1695
|
-
})), m = I(Object.fromEntries(u.value.map((e) => [e, ""]))), h = L(""), g = s.value ? null : $({ keys: u.value }), _ = s.value ? m : g.filters;
|
|
1696
|
-
function ee(e) {
|
|
1697
|
-
if (f("collection") && e !== "" && e != null) return e === "pc" ? null : e;
|
|
1698
|
-
}
|
|
1699
|
-
function D() {
|
|
1700
|
-
for (let e of u.value) m[e] = "";
|
|
1701
|
-
h.value = "";
|
|
1702
|
-
}
|
|
1703
|
-
function j() {
|
|
1704
|
-
h.value = "";
|
|
1705
|
-
let e = !!_.begin && !!_.end;
|
|
1706
|
-
if (e && Number(_.begin) >= Number(_.end)) {
|
|
1707
|
-
h.value = r(o.value.errorPeriod ?? "timeline.form.errorPeriod");
|
|
1708
|
-
return;
|
|
1709
|
-
}
|
|
1710
|
-
if (!_.country && !e) {
|
|
1711
|
-
h.value = r(o.value.errorSelect ?? "timeline.form.errorSelect");
|
|
1712
|
-
return;
|
|
1713
|
-
}
|
|
1714
|
-
let t = {};
|
|
1715
|
-
for (let e of u.value) _[e] && (t[e] = _[e]);
|
|
1716
|
-
i.push({
|
|
1717
|
-
name: o.value.route,
|
|
1718
|
-
query: t
|
|
1719
|
-
});
|
|
1720
|
-
}
|
|
1721
|
-
let M = S(() => {
|
|
1722
|
-
if (s.value) return [];
|
|
1723
|
-
let e = _;
|
|
1724
|
-
return c.findEvents({
|
|
1725
|
-
country: e.country || void 0,
|
|
1726
|
-
collection: ee(e.collection),
|
|
1727
|
-
begin: e.begin,
|
|
1728
|
-
end: e.end
|
|
1729
|
-
});
|
|
1730
|
-
}), N = S(() => {
|
|
1731
|
-
let e = c.findEvents({
|
|
1732
|
-
country: void 0,
|
|
1733
|
-
collection: void 0
|
|
1734
|
-
}).map((e) => e.year_from).filter((e) => Number.isFinite(e) && e !== 0);
|
|
1735
|
-
return e.length ? [Math.min(...e), Math.max(...e)] : [null, null];
|
|
1736
|
-
}), B = Ae(M, {
|
|
1737
|
-
page: () => g ? g.page.value : 1,
|
|
1738
|
-
size: () => o.value.pageSize ?? 15
|
|
1739
|
-
});
|
|
1740
|
-
function te(e) {
|
|
1741
|
-
let t = o.value.countryLabel && e.country_id ? o.value.countryLabel(e.country_id) : "";
|
|
1742
|
-
return {
|
|
1743
|
-
id: e.id,
|
|
1744
|
-
date: Z(e, e.text, r),
|
|
1745
|
-
caption: t ? ye(String(t)) : "",
|
|
1746
|
-
description: e.text?.description ? ve(String(e.text.description), { breaks: !0 }) : ""
|
|
1747
|
-
};
|
|
1748
|
-
}
|
|
1749
|
-
let ne = S(() => B.value.rows.map((e) => (o.value.event ?? te)(e, p.value))), re = S(() => (c.countries.value ?? []).map((e) => ({
|
|
1750
|
-
value: e.value,
|
|
1751
|
-
label: e.value === "all" ? r("timeline.form.allCountries") : e.label
|
|
1752
|
-
}))), U = S(() => o.value.collections?.(p.value) ?? []), W = S(() => {
|
|
1753
|
-
let e = {};
|
|
1754
|
-
for (let t of l.value) (t.key === "begin" || t.key === "end") && t.options && (typeof t.options == "function" ? e[t.key] = t.options(p.value) : e[t.key] = t.options);
|
|
1755
|
-
return e;
|
|
1756
|
-
}), ie = S(() => ({
|
|
1757
|
-
filters: _,
|
|
1758
|
-
active: u.value.some((e) => _[e]),
|
|
1759
|
-
apply: s.value ? j : (e) => g.apply(e),
|
|
1760
|
-
reset: s.value ? D : g.reset,
|
|
1761
|
-
goToPage: s.value ? () => {} : g.goToPage,
|
|
1762
|
-
events: M.value,
|
|
1763
|
-
pageInfo: B.value,
|
|
1764
|
-
countries: re.value,
|
|
1765
|
-
collections: U.value,
|
|
1766
|
-
t: r,
|
|
1767
|
-
tr: o.value.tr
|
|
1768
|
-
})), K = S(() => {
|
|
1769
|
-
let e = o.value.gallery;
|
|
1770
|
-
return !e || s.value ? null : !e.items || e.items(ie.value);
|
|
1771
|
-
}), ae = S(() => {
|
|
1772
|
-
let e = K.value;
|
|
1773
|
-
return e == null ? !1 : Array.isArray(e) ? e.length > 0 : !!e;
|
|
1774
|
-
}), oe = S(() => {
|
|
1775
|
-
let e = K.value;
|
|
1776
|
-
return Array.isArray(e) ? e.length : typeof e == "number" ? e : null;
|
|
1777
|
-
}), q = S(() => {
|
|
1778
|
-
if (!ae.value) return null;
|
|
1779
|
-
let e = {};
|
|
1780
|
-
for (let t of u.value) _[t] && (e[t] = _[t]);
|
|
1781
|
-
return {
|
|
1782
|
-
to: {
|
|
1783
|
-
name: o.value.gallery.route,
|
|
1784
|
-
query: e
|
|
1785
|
-
},
|
|
1786
|
-
count: oe.value,
|
|
1787
|
-
label: r(o.value.gallery.label ?? "timeline.nav.seeGallery")
|
|
1788
|
-
};
|
|
1789
|
-
}), J = S(() => ({
|
|
1790
|
-
...ie.value,
|
|
1791
|
-
gallery: q.value
|
|
1792
|
-
})), Y = S(() => o.value.summary ? o.value.summary(J.value) : [{
|
|
1793
|
-
label: r(o.value.summaryLabel ?? "timeline.results.eventsFound"),
|
|
1794
|
-
count: B.value.total
|
|
1795
|
-
}]), X = S(() => r(o.value.empty ?? "timeline.results.noResults")), se = S(() => ({
|
|
1796
|
-
window: 5,
|
|
1797
|
-
jump: !1,
|
|
1798
|
-
ends: !0,
|
|
1799
|
-
...o.value.pagination ?? {}
|
|
1800
|
-
}));
|
|
1801
|
-
function Q(e, t) {
|
|
1802
|
-
return e.label ? r(e.label) : t ? r(t) : "";
|
|
1803
|
-
}
|
|
1804
|
-
return (e, t) => (F(), T("section", sr, [
|
|
1805
|
-
z(e.$slots, "before", P(A(J.value))),
|
|
1806
|
-
o.value.title ? (F(), T("h1", cr, V(H(r)(o.value.title)), 1)) : w("", !0),
|
|
1807
|
-
k(b, {
|
|
1808
|
-
class: "mwnf-timeline__filters",
|
|
1809
|
-
title: o.value.filterTitle ? H(r)(o.value.filterTitle) : "",
|
|
1810
|
-
"apply-label": s.value ? H(r)(o.value.submitLabel ?? "core.action.search") : o.value.applyLabel ? H(r)(o.value.applyLabel) : "",
|
|
1811
|
-
"reset-label": o.value.resetLabel ? H(r)(o.value.resetLabel) : "",
|
|
1812
|
-
onApply: t[2] ||= (e) => s.value ? j() : H(g).apply(),
|
|
1813
|
-
onReset: t[3] ||= (e) => s.value ? D() : H(g).reset()
|
|
1814
|
-
}, {
|
|
1815
|
-
default: G(() => [(F(!0), T(x, null, R(l.value, (e) => (F(), T(x, { key: e.key }, [e.key === "country" ? (F(), C(a, {
|
|
1816
|
-
key: 0,
|
|
1817
|
-
"model-value": H(_).country,
|
|
1818
|
-
label: Q(e, "catalogue.facet.country"),
|
|
1819
|
-
options: re.value,
|
|
1820
|
-
placeholder: e.placeholder ? H(r)(e.placeholder) : H(r)("timeline.form.selectCountry"),
|
|
1821
|
-
"any-label": e.anyLabel ? H(r)(e.anyLabel) : "",
|
|
1822
|
-
"hide-empty": !!e.hideEmpty,
|
|
1823
|
-
"onUpdate:modelValue": t[0] ||= (e) => H(_).country = e
|
|
1824
|
-
}, null, 8, [
|
|
1825
|
-
"model-value",
|
|
1826
|
-
"label",
|
|
1827
|
-
"options",
|
|
1828
|
-
"placeholder",
|
|
1829
|
-
"any-label",
|
|
1830
|
-
"hide-empty"
|
|
1831
|
-
])) : e.key === "collection" ? (F(), C(a, {
|
|
1832
|
-
key: 1,
|
|
1833
|
-
"model-value": H(_).collection,
|
|
1834
|
-
label: Q(e),
|
|
1835
|
-
options: U.value,
|
|
1836
|
-
placeholder: e.placeholder ? H(r)(e.placeholder) : "",
|
|
1837
|
-
"any-label": e.anyLabel ? H(r)(e.anyLabel) : "",
|
|
1838
|
-
"hide-empty": !!e.hideEmpty,
|
|
1839
|
-
"onUpdate:modelValue": t[1] ||= (e) => H(_).collection = e
|
|
1840
|
-
}, null, 8, [
|
|
1841
|
-
"model-value",
|
|
1842
|
-
"label",
|
|
1843
|
-
"options",
|
|
1844
|
-
"placeholder",
|
|
1845
|
-
"any-label",
|
|
1846
|
-
"hide-empty"
|
|
1847
|
-
])) : (e.key === "begin" || e.key === "end") && W.value[e.key] ? (F(), C(a, {
|
|
1848
|
-
key: 2,
|
|
1849
|
-
"model-value": H(_)[e.key],
|
|
1850
|
-
label: Q(e, e.key === "begin" ? "timeline.form.startDate" : "timeline.form.endDate"),
|
|
1851
|
-
options: W.value[e.key],
|
|
1852
|
-
placeholder: e.placeholder ? H(r)(e.placeholder) : H(r)(e.key === "begin" ? "timeline.form.fromYearHint" : "timeline.form.toYearHint"),
|
|
1853
|
-
"any-label": e.anyLabel ? H(r)(e.anyLabel) : "",
|
|
1854
|
-
"hide-empty": !!e.hideEmpty,
|
|
1855
|
-
"onUpdate:modelValue": (t) => H(_)[e.key] = t
|
|
1856
|
-
}, null, 8, [
|
|
1857
|
-
"model-value",
|
|
1858
|
-
"label",
|
|
1859
|
-
"options",
|
|
1860
|
-
"placeholder",
|
|
1861
|
-
"any-label",
|
|
1862
|
-
"hide-empty",
|
|
1863
|
-
"onUpdate:modelValue"
|
|
1864
|
-
])) : (F(), T("label", lr, [E("span", ur, V(Q(e, e.key === "begin" ? "timeline.form.startDate" : "timeline.form.endDate")), 1), E("input", {
|
|
1865
|
-
type: "number",
|
|
1866
|
-
class: "mwnf-facet__select",
|
|
1867
|
-
value: H(_)[e.key],
|
|
1868
|
-
placeholder: e.placeholder ? H(r)(e.placeholder) : H(r)(e.key === "begin" ? "timeline.form.fromYearHint" : "timeline.form.toYearHint"),
|
|
1869
|
-
onInput: (t) => H(_)[e.key] = t.target.value
|
|
1870
|
-
}, null, 40, dr)]))], 64))), 128))]),
|
|
1871
|
-
_: 1
|
|
1872
|
-
}, 8, [
|
|
1873
|
-
"title",
|
|
1874
|
-
"apply-label",
|
|
1875
|
-
"reset-label"
|
|
1876
|
-
]),
|
|
1877
|
-
s.value && h.value ? (F(), T("p", fr, V(h.value), 1)) : w("", !0),
|
|
1878
|
-
s.value ? w("", !0) : (F(), T(x, { key: 2 }, [
|
|
1879
|
-
z(e.$slots, "summary", P(A(J.value)), () => [k(v, { parts: Y.value }, null, 8, ["parts"])]),
|
|
1880
|
-
q.value ? (F(), C(n, {
|
|
1881
|
-
key: 0,
|
|
1882
|
-
class: "mwnf-timeline__gallery",
|
|
1883
|
-
to: q.value.to
|
|
1884
|
-
}, {
|
|
1885
|
-
default: G(() => [z(e.$slots, "cross-link", P(A(J.value)), () => [O(V(q.value.label), 1), q.value.count == null ? w("", !0) : (F(), T(x, { key: 0 }, [O(" (" + V(q.value.count) + ")", 1)], 64))])]),
|
|
1886
|
-
_: 3
|
|
1887
|
-
}, 8, ["to"])) : w("", !0),
|
|
1888
|
-
z(e.$slots, "event", P(A(J.value)), () => [k(d, { events: ne.value }, {
|
|
1889
|
-
empty: G(() => [z(e.$slots, "empty", P(A(J.value)), () => [O(V(X.value), 1)])]),
|
|
1890
|
-
_: 3
|
|
1891
|
-
}, 8, ["events"])]),
|
|
1892
|
-
k(y, {
|
|
1893
|
-
"page-info": H(B),
|
|
1894
|
-
window: se.value.window,
|
|
1895
|
-
jump: se.value.jump,
|
|
1896
|
-
ends: se.value.ends,
|
|
1897
|
-
onNavigate: H(g).goToPage
|
|
1898
|
-
}, null, 8, [
|
|
1899
|
-
"page-info",
|
|
1900
|
-
"window",
|
|
1901
|
-
"jump",
|
|
1902
|
-
"ends",
|
|
1903
|
-
"onNavigate"
|
|
1904
|
-
])
|
|
1905
|
-
], 64)),
|
|
1906
|
-
z(e.$slots, "after", P(A(J.value)))
|
|
1907
|
-
]));
|
|
1908
|
-
}
|
|
1909
|
-
};
|
|
1910
|
-
//#endregion
|
|
1911
|
-
export { Sn as a, st as c, Fn as i, et as l, or as n, fn as o, Vn as r, It as s, pr as t };
|