@museumwnf/viewer-layout 3.39.0 → 3.40.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/standalone.js +137 -66
- package/dist/viewer-layout.css +1 -1
- package/package.json +1 -1
- package/src/tokens.reference.css +4 -0
package/dist/standalone.js
CHANGED
|
@@ -3,13 +3,13 @@ import { c as t, d as n, n as r, t as i } from "./PartnerMap-BIKd-AGP.js";
|
|
|
3
3
|
import { n as a, t as o } from "./RecordView-kkpYLtL_.js";
|
|
4
4
|
import { t as s } from "./SiteShell-DPdTxtJ5.js";
|
|
5
5
|
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createTextVNode as h, createVNode as g, guardReactiveProps as _, nextTick as v, normalizeClass as y, normalizeProps as b, normalizeStyle as x, onMounted as S, openBlock as C, ref as w, renderList as T, renderSlot as E, toDisplayString as D, unref as O, useId as k, useSlots as A, vModelSelect as j, vModelText as M, vShow as N, watch as P, withCtx as F, withDirectives as I, withModifiers as L } from "vue";
|
|
6
|
-
import { byId as R, collate as z, entityRef as B, loadEntities as V, md as
|
|
7
|
-
import { useRoute as
|
|
6
|
+
import { byId as R, collate as z, entityRef as B, loadEntities as V, md as H, pictureCredits as ee, picturesInLanguage as te, removeEndingPoint as ne, renderBlock as U, renderInline as W, renderPlain as G, useDataPackage as K, useI18n as q, useSection as re, useSiteConfig as J } from "@museumwnf/viewer-core";
|
|
7
|
+
import { useRoute as ie } from "vue-router";
|
|
8
8
|
//#region src/standalone/Banner.vue
|
|
9
|
-
var
|
|
9
|
+
var ae = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "mwnf-standalone-banner__title"
|
|
12
|
-
},
|
|
12
|
+
}, Y = {
|
|
13
13
|
__name: "Banner",
|
|
14
14
|
props: {
|
|
15
15
|
image: {
|
|
@@ -25,24 +25,24 @@ var oe = {
|
|
|
25
25
|
return (t, n) => (C(), f("div", {
|
|
26
26
|
class: "mwnf-standalone-banner",
|
|
27
27
|
style: x(e.image ? { backgroundImage: `url(${JSON.stringify(e.image)})` } : void 0)
|
|
28
|
-
}, [e.title ? (C(), f("h1",
|
|
28
|
+
}, [e.title ? (C(), f("h1", ae, [p("span", null, D(e.title), 1)])) : d("", !0)], 4));
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/standalone/chrome.js
|
|
33
|
-
function
|
|
34
|
-
let t =
|
|
33
|
+
function X() {
|
|
34
|
+
let t = J();
|
|
35
35
|
return (n) => e(t.chrome, n);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Z(e, t) {
|
|
38
38
|
return !e || typeof e == "string" ? e ?? "" : e[t] ?? e.en ?? Object.values(e)[0] ?? "";
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function oe(e = /* @__PURE__ */ new Date()) {
|
|
41
41
|
let t = new Date(e.getFullYear(), 0, 1);
|
|
42
42
|
return Math.round((new Date(e.getFullYear(), e.getMonth(), e.getDate()) - t) / 864e5);
|
|
43
43
|
}
|
|
44
44
|
function Q(e, t = /* @__PURE__ */ new Date()) {
|
|
45
|
-
return e?.length ? e[
|
|
45
|
+
return e?.length ? e[oe(t) % e.length] : null;
|
|
46
46
|
}
|
|
47
47
|
function se(e) {
|
|
48
48
|
let [t, ...n] = String(e ?? "").split("*")[0].trim().split(";");
|
|
@@ -76,18 +76,18 @@ var ce = { class: "mwnf-standalone-sponsors" }, le = {
|
|
|
76
76
|
default: () => []
|
|
77
77
|
} },
|
|
78
78
|
setup(e) {
|
|
79
|
-
let t = e, { t: r } =
|
|
79
|
+
let t = e, { t: r } = q(), i = X(), a = l(() => t.columns.map((e, t) => ({
|
|
80
80
|
key: t,
|
|
81
81
|
width: e.width ?? null,
|
|
82
|
-
lead: e.lead ?
|
|
83
|
-
text: e.text ?
|
|
82
|
+
lead: e.lead ? W(r(e.lead)) : "",
|
|
83
|
+
text: e.text ? W(r(e.text)) : "",
|
|
84
84
|
break: !!e.break,
|
|
85
85
|
title: e.title ? r(e.title) : "",
|
|
86
86
|
logos: (e.logos ?? []).map((e) => ({
|
|
87
87
|
src: i(e.src) ?? "",
|
|
88
88
|
alt: e.alt ? r(e.alt) : "",
|
|
89
89
|
href: e.href ?? "",
|
|
90
|
-
note: e.note ?
|
|
90
|
+
note: e.note ? U(r(e.note)) : ""
|
|
91
91
|
})),
|
|
92
92
|
links: (e.links ?? []).map((e) => ({
|
|
93
93
|
...e,
|
|
@@ -167,7 +167,7 @@ var ce = { class: "mwnf-standalone-sponsors" }, le = {
|
|
|
167
167
|
},
|
|
168
168
|
emits: ["update:language"],
|
|
169
169
|
setup(t, { emit: n }) {
|
|
170
|
-
let r = t, i = n, { t: a, locale: o } =
|
|
170
|
+
let r = t, i = n, { t: a, locale: o } = q(), c = ie(), h = l(() => !!c.meta?.bare), _ = J(), v = re(), b = l(() => _.standalone ?? {}), x = l(() => _.navigation ?? {}), S = l(() => v.value === "home"), w = l(() => b.value.areas?.[v.value] ?? null), T = (t) => e(_.chrome, Z(t, o.value)), k = l(() => {
|
|
171
171
|
let e = b.value.logo ?? {}, t = T(w.value?.logo ?? e.src);
|
|
172
172
|
return t ? {
|
|
173
173
|
logo: t,
|
|
@@ -226,7 +226,7 @@ var ce = { class: "mwnf-standalone-sponsors" }, le = {
|
|
|
226
226
|
}, [
|
|
227
227
|
P.value ? {
|
|
228
228
|
name: "banner",
|
|
229
|
-
fn: F(() => [g(
|
|
229
|
+
fn: F(() => [g(Y, {
|
|
230
230
|
image: M.value,
|
|
231
231
|
title: N.value
|
|
232
232
|
}, null, 8, ["image", "title"])]),
|
|
@@ -329,19 +329,19 @@ var ce = { class: "mwnf-standalone-sponsors" }, le = {
|
|
|
329
329
|
}
|
|
330
330
|
},
|
|
331
331
|
setup(e) {
|
|
332
|
-
let t = e, { t: r } =
|
|
332
|
+
let t = e, { t: r } = q(), i = (e) => ne(Array.isArray(e) ? e.join("; ") : e), a = l(() => {
|
|
333
333
|
let e = t.text ?? {}, n = [], a = i(e.name ?? t.record?.internal_name ?? "");
|
|
334
|
-
a && n.push(
|
|
334
|
+
a && n.push(W(a));
|
|
335
335
|
let o = i(e.alternate_name);
|
|
336
|
-
o && n.push(`${t.alsoKnownAs ? `${r(t.alsoKnownAs)} ` : ""}${
|
|
336
|
+
o && n.push(`${t.alsoKnownAs ? `${r(t.alsoKnownAs)} ` : ""}${W(o)}`);
|
|
337
337
|
let s = [i(e.dates), i(e.dynasty)].filter(Boolean).join(", ");
|
|
338
|
-
s && n.push(
|
|
338
|
+
s && n.push(W(s));
|
|
339
339
|
for (let t of ["materials", "holder"]) {
|
|
340
340
|
let r = i(e[t]);
|
|
341
|
-
r && n.push(
|
|
341
|
+
r && n.push(W(r));
|
|
342
342
|
}
|
|
343
343
|
return n;
|
|
344
|
-
}), o = l(() => t.place ?? [i(t.text?.location), t.country].filter(Boolean).join(", ")), s = l(() => t.picture || (t.record?.images?.[0]?.url ?? "")), m = l(() =>
|
|
344
|
+
}), o = l(() => t.place ?? [i(t.text?.location), t.country].filter(Boolean).join(", ")), s = l(() => t.picture || (t.record?.images?.[0]?.url ?? "")), m = l(() => G(String(t.text?.name ?? t.record?.internal_name ?? "")));
|
|
345
345
|
return (t, i) => e.record ? (C(), f("div", je, [
|
|
346
346
|
s.value ? (C(), u(n, {
|
|
347
347
|
key: 0,
|
|
@@ -357,7 +357,7 @@ var ce = { class: "mwnf-standalone-sponsors" }, le = {
|
|
|
357
357
|
}, 8, ["to"])) : d("", !0),
|
|
358
358
|
e.heading ? (C(), f("p", Ne, [p("strong", null, D(O(r)(e.heading)), 1)])) : d("", !0),
|
|
359
359
|
p("p", Pe, [(C(!0), f(c, null, T(a.value, (e, t) => (C(), f(c, { key: t }, [p("span", { innerHTML: e }, null, 8, Fe), i[0] ||= p("br", null, null, -1)], 64))), 128))]),
|
|
360
|
-
o.value ? (C(), f("p", Ie, D(O(
|
|
360
|
+
o.value ? (C(), f("p", Ie, D(O(G)(o.value)), 1)) : d("", !0),
|
|
361
361
|
e.action ? (C(), f("p", Le, [g(n, { to: e.to }, {
|
|
362
362
|
default: F(() => [h(D(O(r)(e.action)), 1)]),
|
|
363
363
|
_: 1
|
|
@@ -386,10 +386,10 @@ var ce = { class: "mwnf-standalone-sponsors" }, le = {
|
|
|
386
386
|
}
|
|
387
387
|
},
|
|
388
388
|
setup(e) {
|
|
389
|
-
let t = e, { t: r } =
|
|
389
|
+
let t = e, { t: r } = q(), i = X(), a = l(() => t.items.map((e) => ({
|
|
390
390
|
...e,
|
|
391
391
|
image: i(e.image) ?? "",
|
|
392
|
-
label: e.text ?
|
|
392
|
+
label: e.text ? G(e.text) : e.label ? r(e.label) : ""
|
|
393
393
|
})));
|
|
394
394
|
return (t, i) => a.value.length ? (C(), f("section", ze, [e.caption ? (C(), f("p", Be, [p("span", Ve, D(O(r)(e.caption)), 1)])) : d("", !0), p("ul", He, [(C(!0), f(c, null, T(a.value, (e) => (C(), f("li", {
|
|
395
395
|
key: e.image,
|
|
@@ -417,12 +417,12 @@ var ce = { class: "mwnf-standalone-sponsors" }, le = {
|
|
|
417
417
|
default: null
|
|
418
418
|
} },
|
|
419
419
|
setup(e) {
|
|
420
|
-
let t = e, { t: r, locale: i } =
|
|
420
|
+
let t = e, { t: r, locale: i } = q(), a = J(), o = l(() => t.home ?? a.standalone?.home ?? {}), s = l(() => (o.value.links ?? []).map((e) => ({
|
|
421
421
|
...e,
|
|
422
422
|
label: r(e.label),
|
|
423
423
|
prefix: e.prefix ? r(e.prefix) : "",
|
|
424
424
|
title: e.title ? r(e.title) : void 0
|
|
425
|
-
}))), p = l(() => o.value.highlight ?? null), m =
|
|
425
|
+
}))), p = l(() => o.value.highlight ?? null), m = K();
|
|
426
426
|
p.value?.list?.length && (V(["items", "countries"]), P(i, (e) => {
|
|
427
427
|
m.loadTranslations("items", e), m.loadTranslations("countries", e);
|
|
428
428
|
}, { immediate: !0 }));
|
|
@@ -439,7 +439,7 @@ var ce = { class: "mwnf-standalone-sponsors" }, le = {
|
|
|
439
439
|
}), S = l(() => v.value && p.value?.place ? p.value.place(v.value, b.value, x.value) : null), w = l(() => v.value ? {
|
|
440
440
|
name: p.value.route ?? "item",
|
|
441
441
|
params: { id: v.value.id }
|
|
442
|
-
} : null), O =
|
|
442
|
+
} : null), O = X(), k = l(() => {
|
|
443
443
|
let e = p.value?.pictures ?? [];
|
|
444
444
|
return e.length ? O(Q(e)) ?? "" : "";
|
|
445
445
|
}), A = l(() => {
|
|
@@ -609,7 +609,7 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
609
609
|
}
|
|
610
610
|
},
|
|
611
611
|
setup(e) {
|
|
612
|
-
let t = e, { t: r } =
|
|
612
|
+
let t = e, { t: r } = q(), i = l(() => t.groups.map((e) => ({
|
|
613
613
|
heading: r(e.heading),
|
|
614
614
|
rows: t.records.filter((t) => !e.type || t.badge === e.type)
|
|
615
615
|
})).filter((e) => e.rows.length));
|
|
@@ -683,7 +683,7 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
683
683
|
}
|
|
684
684
|
},
|
|
685
685
|
setup(e) {
|
|
686
|
-
let i = e, { t: s } =
|
|
686
|
+
let i = e, { t: s } = q(), v = A(), y = l(() => ({
|
|
687
687
|
...i.spec,
|
|
688
688
|
media: () => []
|
|
689
689
|
}));
|
|
@@ -696,9 +696,9 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
696
696
|
text: t,
|
|
697
697
|
language: n
|
|
698
698
|
});
|
|
699
|
-
let r =
|
|
700
|
-
return
|
|
701
|
-
let { photographer: t, copyright: i } =
|
|
699
|
+
let r = G(String(t?.name ?? e?.internal_name ?? ""));
|
|
700
|
+
return te(e?.images, n).map((e) => {
|
|
701
|
+
let { photographer: t, copyright: i } = ee(e, n), a = [t ? `${s("record.media.photograph")}: ${t}` : "", i ? `© ${i}` : ""].filter(Boolean).join(", ");
|
|
702
702
|
return {
|
|
703
703
|
url: e.url,
|
|
704
704
|
alt: a || e.captions?.[n] || r,
|
|
@@ -850,7 +850,7 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
850
850
|
}
|
|
851
851
|
},
|
|
852
852
|
setup(e) {
|
|
853
|
-
let a = e, { t: s, locale: m } =
|
|
853
|
+
let a = e, { t: s, locale: m } = q(), _ = k(), b = {
|
|
854
854
|
entity: "partners",
|
|
855
855
|
fields: [],
|
|
856
856
|
shortDescription: !1,
|
|
@@ -1058,7 +1058,7 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1058
1058
|
}
|
|
1059
1059
|
},
|
|
1060
1060
|
setup(e) {
|
|
1061
|
-
let t = e, { t: r } =
|
|
1061
|
+
let t = e, { t: r } = q(), i = l(() => U(r(t.body)));
|
|
1062
1062
|
function a() {
|
|
1063
1063
|
window.print();
|
|
1064
1064
|
}
|
|
@@ -1097,7 +1097,7 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1097
1097
|
}
|
|
1098
1098
|
},
|
|
1099
1099
|
setup(e) {
|
|
1100
|
-
let t = e, { t: r } =
|
|
1100
|
+
let t = e, { t: r } = q(), i = l(() => t.tabs.map((e) => ({
|
|
1101
1101
|
...e,
|
|
1102
1102
|
label: r(e.label)
|
|
1103
1103
|
})));
|
|
@@ -1436,10 +1436,81 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1436
1436
|
}, 1032, ["to", "href"])]))), 128)), r.value && !t.associated.length ? (C(), f("p", Yn, D(e.noAssociated), 1)) : d("", !0)], 512), [[N, !r.value || a.value.has(s)]])], 512), [[N, r.value || a.value.has(s)]])]))), 128))
|
|
1437
1437
|
], 2));
|
|
1438
1438
|
}
|
|
1439
|
-
}, Zn = {
|
|
1439
|
+
}, Zn = { class: "mwnf-standalone-item__back mwnf-standalone-sp__back" }, Qn = {
|
|
1440
|
+
key: 0,
|
|
1441
|
+
class: "mwnf-standalone-sp__heading"
|
|
1442
|
+
}, $n = ["innerHTML"], er = { class: "mwnf-standalone-sp__text" }, tr = { key: 0 }, nr = { key: 1 }, rr = { key: 2 }, ir = ["href"], ar = ["innerHTML"], or = { class: "mwnf-standalone-sp__logo" }, sr = { key: 0 }, cr = ["src", "alt"], lr = {
|
|
1443
|
+
__name: "SponsorList",
|
|
1444
|
+
props: {
|
|
1445
|
+
heading: {
|
|
1446
|
+
type: String,
|
|
1447
|
+
default: ""
|
|
1448
|
+
},
|
|
1449
|
+
rows: {
|
|
1450
|
+
type: Array,
|
|
1451
|
+
default: () => []
|
|
1452
|
+
},
|
|
1453
|
+
back: {
|
|
1454
|
+
type: Array,
|
|
1455
|
+
default: () => []
|
|
1456
|
+
}
|
|
1457
|
+
},
|
|
1458
|
+
setup(e) {
|
|
1459
|
+
let t = e, r = l(() => t.rows.some((e) => e.label !== void 0)), i = l(() => t.rows.map((e) => ({
|
|
1460
|
+
...e,
|
|
1461
|
+
labelHtml: e.label ? H(e.label) : "",
|
|
1462
|
+
remarksHtml: e.remarks ? H(e.remarks) : ""
|
|
1463
|
+
})));
|
|
1464
|
+
return (t, a) => (C(), f("div", { class: y(["mwnf-standalone-sp", { "mwnf-standalone-sp--labels": r.value }]) }, [
|
|
1465
|
+
p("p", Zn, [(C(!0), f(c, null, T(e.back, (e) => (C(), f(c, { key: e.label }, [e.history ? (C(), f("button", {
|
|
1466
|
+
key: 0,
|
|
1467
|
+
type: "button",
|
|
1468
|
+
class: "mwnf-standalone-item__back-link",
|
|
1469
|
+
onClick: a[0] ||= (e) => t.$router.back()
|
|
1470
|
+
}, D(e.label), 1)) : (C(), u(n, {
|
|
1471
|
+
key: 1,
|
|
1472
|
+
class: "mwnf-standalone-item__back-link",
|
|
1473
|
+
to: e.to,
|
|
1474
|
+
href: e.href
|
|
1475
|
+
}, {
|
|
1476
|
+
default: F(() => [h(D(e.label), 1)]),
|
|
1477
|
+
_: 2
|
|
1478
|
+
}, 1032, ["to", "href"]))], 64))), 128))]),
|
|
1479
|
+
e.heading ? (C(), f("h3", Qn, D(e.heading), 1)) : d("", !0),
|
|
1480
|
+
(C(!0), f(c, null, T(i.value, (e, t) => (C(), f("div", {
|
|
1481
|
+
key: t,
|
|
1482
|
+
class: "mwnf-standalone-sp__row"
|
|
1483
|
+
}, [
|
|
1484
|
+
r.value ? (C(), f("div", {
|
|
1485
|
+
key: 0,
|
|
1486
|
+
class: "mwnf-standalone-sp__label",
|
|
1487
|
+
innerHTML: e.labelHtml
|
|
1488
|
+
}, null, 8, $n)) : d("", !0),
|
|
1489
|
+
p("div", er, [
|
|
1490
|
+
e.region ? (C(), f("p", tr, D(e.region), 1)) : d("", !0),
|
|
1491
|
+
e.name ? (C(), f("p", nr, D(e.name), 1)) : d("", !0),
|
|
1492
|
+
e.web ? (C(), f("p", rr, [p("a", {
|
|
1493
|
+
href: `http://${e.web}`,
|
|
1494
|
+
target: "_blank",
|
|
1495
|
+
rel: "noopener"
|
|
1496
|
+
}, D(e.web), 9, ir)])) : d("", !0),
|
|
1497
|
+
e.remarksHtml ? (C(), f("div", {
|
|
1498
|
+
key: 3,
|
|
1499
|
+
class: "mwnf-standalone-sp__remarks",
|
|
1500
|
+
innerHTML: e.remarksHtml
|
|
1501
|
+
}, null, 8, ar)) : d("", !0)
|
|
1502
|
+
]),
|
|
1503
|
+
p("div", or, [e.logo ? (C(), f("p", sr, [p("img", {
|
|
1504
|
+
src: e.logo,
|
|
1505
|
+
alt: e.name
|
|
1506
|
+
}, null, 8, cr)])) : d("", !0)])
|
|
1507
|
+
]))), 128))
|
|
1508
|
+
], 2));
|
|
1509
|
+
}
|
|
1510
|
+
}, ur = {
|
|
1440
1511
|
key: 0,
|
|
1441
1512
|
class: "mwnf-standalone-pages"
|
|
1442
|
-
},
|
|
1513
|
+
}, dr = { class: "mwnf-standalone-pages__previous" }, fr = ["aria-current", "onClick"], pr = { class: "mwnf-standalone-pages__next" }, mr = {
|
|
1443
1514
|
__name: "Pagination",
|
|
1444
1515
|
props: {
|
|
1445
1516
|
pageInfo: {
|
|
@@ -1469,8 +1540,8 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1469
1540
|
function s(e) {
|
|
1470
1541
|
e >= 1 && e <= a.value && e !== i.value && r("navigate", e);
|
|
1471
1542
|
}
|
|
1472
|
-
return (t, n) => a.value > 1 ? (C(), f("nav",
|
|
1473
|
-
p("span",
|
|
1543
|
+
return (t, n) => a.value > 1 ? (C(), f("nav", ur, [
|
|
1544
|
+
p("span", dr, [i.value > 1 ? (C(), f("a", {
|
|
1474
1545
|
key: 0,
|
|
1475
1546
|
href: "#",
|
|
1476
1547
|
onClick: n[0] ||= L((e) => s(i.value - 1), ["prevent"])
|
|
@@ -1481,18 +1552,18 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1481
1552
|
class: y(["mwnf-standalone-pages__number", { "mwnf-standalone-pages__number--active": e === i.value }]),
|
|
1482
1553
|
"aria-current": e === i.value ? "page" : void 0,
|
|
1483
1554
|
onClick: L((t) => s(e), ["prevent"])
|
|
1484
|
-
}, D(e), 11,
|
|
1485
|
-
p("span",
|
|
1555
|
+
}, D(e), 11, fr))), 128)),
|
|
1556
|
+
p("span", pr, [i.value < a.value ? (C(), f("a", {
|
|
1486
1557
|
key: 0,
|
|
1487
1558
|
href: "#",
|
|
1488
1559
|
onClick: n[1] ||= L((e) => s(i.value + 1), ["prevent"])
|
|
1489
1560
|
}, D(e.nextLabel), 1)) : (C(), f(c, { key: 1 }, [h(D(e.nextLabel), 1)], 64))])
|
|
1490
1561
|
])) : d("", !0);
|
|
1491
1562
|
}
|
|
1492
|
-
},
|
|
1563
|
+
}, hr = ["disabled", "aria-label"], gr = { class: "mwnf-standalone-slider__track" }, _r = ["src", "alt"], vr = {
|
|
1493
1564
|
key: 0,
|
|
1494
1565
|
class: "mwnf-standalone-slider__label"
|
|
1495
|
-
},
|
|
1566
|
+
}, yr = ["disabled", "aria-label"], br = {
|
|
1496
1567
|
__name: "Slider",
|
|
1497
1568
|
props: {
|
|
1498
1569
|
slides: {
|
|
@@ -1513,7 +1584,7 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1513
1584
|
}
|
|
1514
1585
|
},
|
|
1515
1586
|
setup(e) {
|
|
1516
|
-
let t = e, { t: r } =
|
|
1587
|
+
let t = e, { t: r } = q(), i = X(), a = w(0), o = l(() => Math.max(0, t.slides.length - t.visible)), s = l(() => t.slides.slice(a.value, a.value + t.visible).map((e) => ({
|
|
1517
1588
|
...e,
|
|
1518
1589
|
image: i(e.image) ?? "",
|
|
1519
1590
|
label: e.label ? r(e.label) : ""
|
|
@@ -1529,8 +1600,8 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1529
1600
|
disabled: a.value === 0,
|
|
1530
1601
|
"aria-label": O(r)(e.previousLabel),
|
|
1531
1602
|
onClick: i[0] ||= (e) => a.value = Math.max(0, a.value - 1)
|
|
1532
|
-
}, "‹", 8,
|
|
1533
|
-
p("ul",
|
|
1603
|
+
}, "‹", 8, hr),
|
|
1604
|
+
p("ul", gr, [(C(!0), f(c, null, T(s.value, (e) => (C(), f("li", {
|
|
1534
1605
|
key: e.image,
|
|
1535
1606
|
class: "mwnf-standalone-slider__slide"
|
|
1536
1607
|
}, [g(n, {
|
|
@@ -1540,7 +1611,7 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1540
1611
|
default: F(() => [p("img", {
|
|
1541
1612
|
src: e.image,
|
|
1542
1613
|
alt: e.label
|
|
1543
|
-
}, null, 8,
|
|
1614
|
+
}, null, 8, _r), e.label ? (C(), f("span", vr, D(e.label), 1)) : d("", !0)]),
|
|
1544
1615
|
_: 2
|
|
1545
1616
|
}, 1032, ["to", "href"])]))), 128))]),
|
|
1546
1617
|
p("button", {
|
|
@@ -1549,10 +1620,10 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1549
1620
|
disabled: a.value >= o.value,
|
|
1550
1621
|
"aria-label": O(r)(e.nextLabel),
|
|
1551
1622
|
onClick: i[1] ||= (e) => a.value = Math.min(o.value, a.value + 1)
|
|
1552
|
-
}, "›", 8,
|
|
1623
|
+
}, "›", 8, yr)
|
|
1553
1624
|
], 4)) : d("", !0);
|
|
1554
1625
|
}
|
|
1555
|
-
},
|
|
1626
|
+
}, xr = ["dir"], Sr = { class: "mwnf-standalone-window__box" }, Cr = { class: "mwnf-standalone-window__header" }, wr = { class: "mwnf-standalone-window__heading" }, Tr = ["aria-label"], Er = { class: "mwnf-standalone-window__article" }, Dr = {
|
|
1556
1627
|
__name: "Window",
|
|
1557
1628
|
props: {
|
|
1558
1629
|
heading: {
|
|
@@ -1575,21 +1646,21 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1575
1646
|
return (n, r) => (C(), f("div", {
|
|
1576
1647
|
class: "mwnf-standalone-window",
|
|
1577
1648
|
dir: e.dir || void 0
|
|
1578
|
-
}, [p("div",
|
|
1649
|
+
}, [p("div", Sr, [p("header", Cr, [p("h1", wr, D(e.heading), 1), p("button", {
|
|
1579
1650
|
type: "button",
|
|
1580
1651
|
class: "mwnf-standalone-window__close",
|
|
1581
1652
|
"aria-label": e.closeLabel || void 0,
|
|
1582
1653
|
onClick: t
|
|
1583
|
-
}, "×", 8,
|
|
1654
|
+
}, "×", 8, Tr)]), p("article", Er, [E(n.$slots, "default")])])], 8, xr));
|
|
1584
1655
|
}
|
|
1585
|
-
},
|
|
1656
|
+
}, Or = { class: "mwnf-standalone-glossary" }, kr = { class: "mwnf-standalone-glossary__intro" }, Ar = { class: "mwnf-standalone-glossary__body" }, jr = { class: "mwnf-standalone-glossary__field" }, Mr = ["aria-expanded", "aria-label"], Nr = {
|
|
1586
1657
|
key: 0,
|
|
1587
1658
|
class: "mwnf-standalone-glossary__suggestions",
|
|
1588
1659
|
role: "listbox"
|
|
1589
|
-
},
|
|
1660
|
+
}, Pr = ["aria-selected", "onMousedown"], Fr = {
|
|
1590
1661
|
class: "mwnf-standalone-glossary__result",
|
|
1591
1662
|
"aria-live": "polite"
|
|
1592
|
-
},
|
|
1663
|
+
}, Ir = { class: "mwnf-standalone-glossary__label" }, Lr = ["innerHTML"], Rr = { class: "mwnf-standalone-glossary__label mwnf-standalone-glossary__label--spellings" }, zr = { class: "mwnf-standalone-glossary__note" }, Br = { class: "mwnf-standalone-glossary__spellings" }, Vr = {
|
|
1593
1664
|
__name: "GlossarySpelling",
|
|
1594
1665
|
props: {
|
|
1595
1666
|
language: {
|
|
@@ -1610,7 +1681,7 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1610
1681
|
}
|
|
1611
1682
|
},
|
|
1612
1683
|
setup(e) {
|
|
1613
|
-
let t = e, n =
|
|
1684
|
+
let t = e, n = K(), r = B(t.entity), i = l(() => n.availableLanguages(t.entity).slice().sort());
|
|
1614
1685
|
S(async () => {
|
|
1615
1686
|
await V([t.entity]), await Promise.all(i.value.map((e) => n.loadTranslations(t.entity, e)));
|
|
1616
1687
|
});
|
|
@@ -1626,7 +1697,7 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1626
1697
|
spelling: e,
|
|
1627
1698
|
term: t
|
|
1628
1699
|
})).sort((e, t) => z(e.spelling) < z(t.spelling) ? -1 : +(z(e.spelling) > z(t.spelling)));
|
|
1629
|
-
}), g = l(() => o.value ?
|
|
1700
|
+
}), g = l(() => o.value ? H(m(o.value, t.language).definition ?? "") : ""), _ = l(() => {
|
|
1630
1701
|
if (!o.value) return [];
|
|
1631
1702
|
let e = /* @__PURE__ */ new Set(), t = [];
|
|
1632
1703
|
for (let n of i.value) for (let r of m(o.value, n).spellings ?? []) {
|
|
@@ -1645,12 +1716,12 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1645
1716
|
let t = h.value;
|
|
1646
1717
|
t.length && (e.key === "ArrowDown" ? (e.preventDefault(), s.value = (s.value + 1) % t.length) : e.key === "ArrowUp" ? (e.preventDefault(), s.value = (s.value - 1 + t.length) % t.length) : e.key === "Enter" && s.value >= 0 && (e.preventDefault(), v(t[s.value])));
|
|
1647
1718
|
}
|
|
1648
|
-
return (t, n) => (C(), u(
|
|
1719
|
+
return (t, n) => (C(), u(Dr, {
|
|
1649
1720
|
heading: e.labels.heading,
|
|
1650
1721
|
"close-label": e.labels.close,
|
|
1651
1722
|
dir: e.dir
|
|
1652
1723
|
}, {
|
|
1653
|
-
default: F(() => [p("div",
|
|
1724
|
+
default: F(() => [p("div", Or, [p("h2", kr, D(e.labels.intro), 1), p("div", Ar, [p("div", jr, [I(p("input", {
|
|
1654
1725
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
1655
1726
|
type: "text",
|
|
1656
1727
|
class: "mwnf-standalone-glossary__input",
|
|
@@ -1660,19 +1731,19 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1660
1731
|
"aria-label": e.labels.heading,
|
|
1661
1732
|
onInput: b,
|
|
1662
1733
|
onKeydown: x
|
|
1663
|
-
}, null, 40,
|
|
1734
|
+
}, null, 40, Mr), [[M, a.value]]), h.value.length ? (C(), f("ul", Nr, [(C(!0), f(c, null, T(h.value, (e, t) => (C(), f("li", {
|
|
1664
1735
|
key: e.spelling,
|
|
1665
1736
|
role: "option",
|
|
1666
1737
|
"aria-selected": t === s.value,
|
|
1667
1738
|
class: y(["mwnf-standalone-glossary__suggestion", { "mwnf-standalone-glossary__suggestion--active": t === s.value }]),
|
|
1668
1739
|
onMousedown: L((t) => v(e), ["prevent"])
|
|
1669
|
-
}, D(e.spelling), 43,
|
|
1740
|
+
}, D(e.spelling), 43, Pr))), 128))])) : d("", !0)]), p("div", Fr, [o.value ? (C(), f(c, { key: 0 }, [g.value ? (C(), f(c, { key: 0 }, [p("h3", Ir, D(e.labels.definition), 1), p("div", {
|
|
1670
1741
|
class: "mwnf-standalone-glossary__definition",
|
|
1671
1742
|
innerHTML: g.value
|
|
1672
|
-
}, null, 8,
|
|
1673
|
-
p("h3",
|
|
1674
|
-
p("p",
|
|
1675
|
-
p("ul",
|
|
1743
|
+
}, null, 8, Lr)], 64)) : d("", !0), _.value.length ? (C(), f(c, { key: 1 }, [
|
|
1744
|
+
p("h3", Rr, D(e.labels.spellings), 1),
|
|
1745
|
+
p("p", zr, D(e.labels.spellingsNote), 1),
|
|
1746
|
+
p("ul", Br, [(C(!0), f(c, null, T(_.value, (e) => (C(), f("li", { key: e }, D(e), 1))), 128))])
|
|
1676
1747
|
], 64)) : d("", !0)], 64)) : d("", !0)])])])]),
|
|
1677
1748
|
_: 1
|
|
1678
1749
|
}, 8, [
|
|
@@ -1683,4 +1754,4 @@ var at = { class: "mwnf-standalone-related" }, ot = { class: "mwnf-standalone-re
|
|
|
1683
1754
|
}
|
|
1684
1755
|
};
|
|
1685
1756
|
//#endregion
|
|
1686
|
-
export { pt as RelatedContent,
|
|
1757
|
+
export { pt as RelatedContent, Y as StandaloneBanner, Vr as StandaloneGlossarySpelling, Ye as StandaloneHome, _t as StandaloneItemSheet, mr as StandalonePagination, Xn as StandalonePartnerList, Kt as StandalonePartnerPage, Bn as StandaloneRefine, pn as StandaloneResultsGrid, Pn as StandaloneResultsList, Ae as StandaloneShell, br as StandaloneSlider, lr as StandaloneSponsorList, Se as StandaloneSponsors, $t as StandaloneSubNav, Xt as StandaloneTextPage, Ge as StandaloneTileGrid, Dr as StandaloneWindow, Re as TodayHighlight, Z as byLanguage, oe as dayOfYear, se as legacyHomeItemKey, Q as pickForDay };
|