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