@museumwnf/viewer-layout 3.23.0 → 3.24.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.
@@ -1,4 +1,4 @@
1
- import { d as e } from "./PartnerMap-9FSjyPPa.js";
1
+ import { d as e } from "./PartnerMap-CXbA_EFo.js";
2
2
  import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, openBlock as s, renderList as c, renderSlot as l, toDisplayString as u, useSlots as d, withCtx as f } from "vue";
3
3
  //#region src/content/FeaturedRecord.vue
4
4
  var p = {
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./chrome-DNsZQXrL.js";
2
- import { r as t } from "./PartnerMap-9FSjyPPa.js";
3
- import { n } from "./TimelineEventList-B5_OflLs.js";
4
- import { i as r, n as i, o as a, r as o, t as s } from "./OnDisplayIn-D6oHJJnl.js";
5
- import { t as c } from "./RecordView-DWREsdNX.js";
2
+ import { r as t } from "./PartnerMap-CXbA_EFo.js";
3
+ import { n } from "./TimelineEventList-hN-ewFEl.js";
4
+ import { i as r, n as i, o as a, r as o, t as s } from "./OnDisplayIn-CNcO6eW1.js";
5
+ import { t as c } from "./RecordView-CF_bGx8F.js";
6
6
  import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as ee, createTextVNode as h, createVNode as g, guardReactiveProps as _, normalizeClass as v, normalizeProps as y, normalizeStyle as te, openBlock as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useSlots as ne, withCtx as T } from "vue";
7
7
  import { NotFoundView as re, byId as E, loadEntities as ie, mdInline as D, mdStrip as ae, mwnfLinks as O, partnerView as oe, useDataPackage as se, useI18n as ce, useProjects as le, useSiteConfig as ue } from "@museumwnf/viewer-core";
8
8
  //#region src/dxa/ItemDetailView.vue
@@ -1,4 +1,4 @@
1
- import { d as e, o as t } from "./PartnerMap-9FSjyPPa.js";
1
+ import { d as e, o as t } from "./PartnerMap-CXbA_EFo.js";
2
2
  import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, mergeProps as u, normalizeClass as d, openBlock as f, ref as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, vModelSelect as y, vModelText as b, watch as x, withCtx as S, withDirectives as C, withKeys as w } from "vue";
3
3
  import { useI18n as T } from "@museumwnf/viewer-core/i18n";
4
4
  import { md as E, mdInline as D, searchGlossary as ee } from "@museumwnf/viewer-core";
@@ -361,13 +361,26 @@ var E = [
361
361
  }, Oe = {
362
362
  key: 1,
363
363
  class: "mwnf-credits__list"
364
- }, ke = { class: "mwnf-credits__label" }, Ae = { class: "mwnf-credits__value" }, je = {
364
+ }, ke = { class: "mwnf-credits__label" }, Ae = {
365
+ key: 0,
366
+ class: "mwnf-credits__value"
367
+ }, je = {
368
+ key: 1,
369
+ class: "mwnf-credits__person",
370
+ tabindex: "0"
371
+ }, Me = {
372
+ class: "mwnf-credits__biography",
373
+ role: "tooltip"
374
+ }, Ne = {
375
+ key: 1,
376
+ class: "mwnf-credits__value"
377
+ }, Pe = {
365
378
  key: 2,
366
379
  class: "mwnf-credits__number"
367
- }, Me = { class: "mwnf-credits__label" }, Ne = { class: "mwnf-credits__heading mwnf-credits__heading--citation" }, Pe = ["innerHTML"], Fe = {
380
+ }, Fe = { class: "mwnf-credits__label" }, Ie = { class: "mwnf-credits__heading mwnf-credits__heading--citation" }, Le = ["innerHTML"], Re = {
368
381
  key: 1,
369
382
  class: "mwnf-credits__citation"
370
- }, Ie = {
383
+ }, ze = {
371
384
  __name: "RecordCredits",
372
385
  props: {
373
386
  credits: {
@@ -403,19 +416,24 @@ var E = [
403
416
  let s = n, { t: c } = C(), l = t(() => s.credits.length > 0 || s.workingNumber || s.citation || s.citationHtml);
404
417
  return (t, s) => l.value ? (f(), i("section", Ee, [
405
418
  n.credits.length || n.workingNumber ? (f(), i("h2", De, _(n.heading || v(c)("record.sheet.credits")), 1)) : r("", !0),
406
- n.credits.length ? (f(), i("dl", Oe, [(f(!0), i(e, null, m(n.credits, (t) => (f(), i(e, { key: t.label }, [a("dt", ke, _(t.label), 1), a("dd", Ae, _(t.value), 1)], 64))), 128))])) : r("", !0),
407
- n.workingNumber ? (f(), i("p", je, [n.workingNumberLabel ? (f(), i(e, { key: 0 }, [a("span", Me, _(n.workingNumberLabel), 1), s[0] ||= o(_(" "), -1)], 64)) : r("", !0), a("strong", null, _(n.workingNumber), 1)])) : r("", !0),
408
- n.citation || n.citationHtml ? (f(), i(e, { key: 3 }, [a("h2", Ne, _(n.citationHeading || v(c)("record.citation.heading")), 1), n.citationHtml ? (f(), i("p", {
419
+ n.credits.length ? (f(), i("dl", Oe, [(f(!0), i(e, null, m(n.credits, (t) => (f(), i(e, { key: t.label }, [a("dt", ke, _(t.label), 1), t.people ? (f(), i("dd", Ae, [(f(!0), i(e, null, m(t.people, (t, n) => (f(), i(e, { key: n }, [n ? (f(), i(e, { key: 0 }, [o(", ")], 64)) : r("", !0), t.biography ? (f(), i("span", je, [o(_(t.name), 1), a("span", Me, [
420
+ a("b", null, _(t.heading), 1),
421
+ s[0] ||= a("br", null, null, -1),
422
+ s[1] ||= a("br", null, null, -1),
423
+ o(_(t.biography), 1)
424
+ ])])) : (f(), i(e, { key: 2 }, [o(_(t.name), 1)], 64))], 64))), 128))])) : (f(), i("dd", Ne, _(t.value), 1))], 64))), 128))])) : r("", !0),
425
+ n.workingNumber ? (f(), i("p", Pe, [n.workingNumberLabel ? (f(), i(e, { key: 0 }, [a("span", Fe, _(n.workingNumberLabel), 1), s[2] ||= o(_(" "), -1)], 64)) : r("", !0), a("strong", null, _(n.workingNumber), 1)])) : r("", !0),
426
+ n.citation || n.citationHtml ? (f(), i(e, { key: 3 }, [a("h2", Ie, _(n.citationHeading || v(c)("record.citation.heading")), 1), n.citationHtml ? (f(), i("p", {
409
427
  key: 0,
410
428
  class: "mwnf-credits__citation",
411
429
  innerHTML: n.citationHtml
412
- }, null, 8, Pe)) : (f(), i("p", Fe, _(n.citation), 1))], 64)) : r("", !0)
430
+ }, null, 8, Le)) : (f(), i("p", Re, _(n.citation), 1))], 64)) : r("", !0)
413
431
  ])) : r("", !0);
414
432
  }
415
- }, Le = {
433
+ }, Be = {
416
434
  key: 0,
417
435
  class: "mwnf-source-credit"
418
- }, Re = { class: "mwnf-source-credit__label" }, ze = ["href"], Be = {
436
+ }, Ve = { class: "mwnf-source-credit__label" }, He = ["href"], Ue = {
419
437
  __name: "SourceCredit",
420
438
  props: {
421
439
  route: {
@@ -429,19 +447,19 @@ var E = [
429
447
  },
430
448
  setup(e) {
431
449
  let n = e, { t: s } = C(), c = T(), l = t(() => w(n.route ?? c));
432
- return (t, n) => l.value ? (f(), i("p", Le, [
433
- a("span", Re, _(v(s)(e.labelEntry)), 1),
450
+ return (t, n) => l.value ? (f(), i("p", Be, [
451
+ a("span", Ve, _(v(s)(e.labelEntry)), 1),
434
452
  n[0] ||= o(),
435
- a("a", { href: l.value }, _(l.value), 9, ze)
453
+ a("a", { href: l.value }, _(l.value), 9, He)
436
454
  ])) : r("", !0);
437
455
  }
438
- }, Ve = {
456
+ }, We = {
439
457
  key: 0,
440
458
  class: "mwnf-related"
441
- }, He = {
459
+ }, Ge = {
442
460
  key: 0,
443
461
  class: "mwnf-related__heading"
444
- }, Ue = {
462
+ }, Ke = {
445
463
  __name: "RelatedRecords",
446
464
  props: {
447
465
  heading: {
@@ -462,8 +480,8 @@ var E = [
462
480
  }
463
481
  },
464
482
  setup(e) {
465
- return (t, a) => e.records.length || t.$slots.default ? (f(), i("section", Ve, [
466
- e.heading ? (f(), i("h2", He, _(e.heading), 1)) : r("", !0),
483
+ return (t, a) => e.records.length || t.$slots.default ? (f(), i("section", We, [
484
+ e.heading ? (f(), i("h2", Ge, _(e.heading), 1)) : r("", !0),
467
485
  e.variant === "grid" ? (f(), n(X, {
468
486
  key: 1,
469
487
  records: e.records,
@@ -475,29 +493,29 @@ var E = [
475
493
  h(t.$slots, "default")
476
494
  ])) : r("", !0);
477
495
  }
478
- }, We = ["src", "alt"], Ge = {
496
+ }, qe = ["src", "alt"], Je = {
479
497
  key: 0,
480
498
  class: "mwnf-media__caption"
481
- }, Ke = { key: 0 }, qe = {
499
+ }, Ye = { key: 0 }, Xe = {
482
500
  key: 1,
483
501
  class: "mwnf-media__credit"
484
- }, Je = {
502
+ }, Ze = {
485
503
  key: 2,
486
504
  class: "mwnf-media__credit"
487
- }, $ = ["src", "alt"], Ye = {
505
+ }, Qe = ["src", "alt"], $e = {
488
506
  key: 0,
489
507
  class: "mwnf-media__thumbs"
490
- }, Xe = [
508
+ }, et = [
491
509
  "aria-pressed",
492
510
  "title",
493
511
  "onClick"
494
- ], Ze = ["src", "alt"], Qe = {
512
+ ], tt = ["src", "alt"], $ = {
495
513
  key: 1,
496
514
  class: "mwnf-media__caption"
497
- }, $e = { key: 0 }, et = {
515
+ }, nt = { key: 0 }, rt = {
498
516
  key: 1,
499
517
  class: "mwnf-media__credit"
500
- }, tt = ["aria-label"], nt = ["aria-label"], rt = ["src", "alt"], it = ["aria-label"], at = {
518
+ }, it = ["aria-label"], at = ["aria-label"], ot = ["src", "alt"], st = ["aria-label"], ct = {
501
519
  __name: "MediaGallery",
502
520
  props: {
503
521
  images: {
@@ -545,10 +563,10 @@ var E = [
545
563
  src: e.url,
546
564
  alt: e.alt ?? "",
547
565
  loading: "lazy"
548
- }, null, 8, We), e.caption || e.photographer || e.copyright ? (f(), i("figcaption", Ge, [
549
- e.caption ? (f(), i("span", Ke, _(e.caption), 1)) : r("", !0),
550
- e.photographer ? (f(), i("span", qe, _(v(s)("record.media.photograph")) + ": " + _(e.photographer), 1)) : r("", !0),
551
- e.copyright ? (f(), i("span", Je, "© " + _(e.copyright), 1)) : r("", !0)
566
+ }, null, 8, qe), e.caption || e.photographer || e.copyright ? (f(), i("figcaption", Je, [
567
+ e.caption ? (f(), i("span", Ye, _(e.caption), 1)) : r("", !0),
568
+ e.photographer ? (f(), i("span", Xe, _(v(s)("record.media.photograph")) + ": " + _(e.photographer), 1)) : r("", !0),
569
+ e.copyright ? (f(), i("span", Ze, "© " + _(e.copyright), 1)) : r("", !0)
552
570
  ])) : r("", !0)]))), 128)) : (f(), i(e, { key: 1 }, [
553
571
  a("button", {
554
572
  type: "button",
@@ -558,8 +576,8 @@ var E = [
558
576
  class: "mwnf-media__image",
559
577
  src: l.value.url,
560
578
  alt: l.value.alt ?? ""
561
- }, null, 8, $)]),
562
- n.images.length > 1 ? (f(), i("ul", Ye, [(f(!0), i(e, null, m(n.images, (e, t) => (f(), i("li", { key: e.url ?? t }, [a("button", {
579
+ }, null, 8, Qe)]),
580
+ n.images.length > 1 ? (f(), i("ul", $e, [(f(!0), i(e, null, m(n.images, (e, t) => (f(), i("li", { key: e.url ?? t }, [a("button", {
563
581
  type: "button",
564
582
  class: u(["mwnf-media__thumb", { "mwnf-media__thumb--active": t === c.value }]),
565
583
  "aria-pressed": t === c.value ? "true" : "false",
@@ -569,8 +587,8 @@ var E = [
569
587
  src: e.url,
570
588
  alt: e.alt ?? "",
571
589
  loading: "lazy"
572
- }, null, 8, Ze)], 10, Xe)]))), 128))])) : r("", !0),
573
- l.value.caption || h.value ? (f(), i("p", Qe, [l.value.caption ? (f(), i("span", $e, _(l.value.caption), 1)) : r("", !0), h.value ? (f(), i("span", et, _(h.value), 1)) : r("", !0)])) : r("", !0),
590
+ }, null, 8, tt)], 10, et)]))), 128))])) : r("", !0),
591
+ l.value.caption || h.value ? (f(), i("p", $, [l.value.caption ? (f(), i("span", nt, _(l.value.caption), 1)) : r("", !0), h.value ? (f(), i("span", rt, _(h.value), 1)) : r("", !0)])) : r("", !0),
574
592
  g.value ? (f(), i("div", {
575
593
  key: 2,
576
594
  class: "mwnf-lightbox",
@@ -585,36 +603,36 @@ var E = [
585
603
  class: "mwnf-lightbox__close",
586
604
  "aria-label": v(s)("core.action.close"),
587
605
  onClick: E
588
- }, "✕", 8, tt),
606
+ }, "✕", 8, it),
589
607
  n.images.length > 1 ? (f(), i("button", {
590
608
  key: 0,
591
609
  type: "button",
592
610
  class: "mwnf-lightbox__control mwnf-lightbox__control--previous",
593
611
  "aria-label": v(s)("core.pagination.previous"),
594
612
  onClick: o[0] ||= S((e) => w(c.value - 1), ["stop"])
595
- }, "‹", 8, nt)) : r("", !0),
613
+ }, "‹", 8, at)) : r("", !0),
596
614
  a("img", {
597
615
  class: "mwnf-lightbox__image",
598
616
  src: l.value.url,
599
617
  alt: l.value.alt ?? ""
600
- }, null, 8, rt),
618
+ }, null, 8, ot),
601
619
  n.images.length > 1 ? (f(), i("button", {
602
620
  key: 1,
603
621
  type: "button",
604
622
  class: "mwnf-lightbox__control mwnf-lightbox__control--next",
605
623
  "aria-label": v(s)("core.pagination.next"),
606
624
  onClick: o[1] ||= S((e) => w(c.value + 1), ["stop"])
607
- }, "›", 8, it)) : r("", !0)
625
+ }, "›", 8, st)) : r("", !0)
608
626
  ])) : r("", !0)
609
627
  ], 64))], 2)) : r("", !0);
610
628
  }
611
- }, ot = {
629
+ }, lt = {
612
630
  key: 0,
613
631
  class: "mwnf-partner-map__title"
614
- }, st = ["src", "title"], ct = {
632
+ }, ut = ["src", "title"], dt = {
615
633
  key: 1,
616
634
  class: "mwnf-partner-map__link"
617
- }, lt = ["href"], ut = {
635
+ }, ft = ["href"], pt = {
618
636
  __name: "PartnerMap",
619
637
  props: {
620
638
  latitude: {
@@ -668,21 +686,21 @@ var E = [
668
686
  key: 0,
669
687
  class: u(["mwnf-partner-map", { "mwnf-partner-map--google": l.value }])
670
688
  }, [
671
- l.value ? r("", !0) : (f(), i("p", ot, _(t.$t(e.mapTitleEntry)), 1)),
689
+ l.value ? r("", !0) : (f(), i("p", lt, _(t.$t(e.mapTitleEntry)), 1)),
672
690
  a("iframe", {
673
691
  src: d.value,
674
692
  title: p.value,
675
693
  loading: "lazy",
676
694
  referrerpolicy: "no-referrer",
677
695
  class: "mwnf-partner-map__embed"
678
- }, null, 8, st),
679
- l.value ? r("", !0) : (f(), i("p", ct, [a("a", {
696
+ }, null, 8, ut),
697
+ l.value ? r("", !0) : (f(), i("p", dt, [a("a", {
680
698
  href: m.value,
681
699
  target: "_blank",
682
700
  rel: "noopener"
683
- }, "↗ " + _(t.$t(e.openMapLinkEntry)), 9, lt)]))
701
+ }, "↗ " + _(t.$t(e.openMapLinkEntry)), 9, ft)]))
684
702
  ], 2)) : r("", !0);
685
703
  }
686
704
  };
687
705
  //#endregion
688
- export { Ie as a, ne as c, D as d, Be as i, X as l, at as n, Te as o, Ue as r, xe as s, ut as t, I as u };
706
+ export { ze as a, ne as c, D as d, Ue as i, X as l, ct as n, Te as o, Ke as r, xe as s, pt as t, I as u };
@@ -1,11 +1,11 @@
1
- import { a as e, c as t, d as n, i as r, n as i, o as ee, r as te, s as ne } from "./PartnerMap-9FSjyPPa.js";
1
+ import { a as e, c as t, d as n, i as r, n as i, o as ee, r as te, s as ne } from "./PartnerMap-CXbA_EFo.js";
2
2
  import { t as re } from "./GlossaryPopover-B7E6BsjS.js";
3
3
  import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as ie, createTextVNode as ae, createVNode as d, guardReactiveProps as f, normalizeClass as oe, normalizeProps as p, openBlock as m, ref as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, useSlots as se, watch as b, withCtx as x } from "vue";
4
4
  import { useI18n as S } from "@museumwnf/viewer-core/i18n";
5
- import { NotFoundView as ce, byId as le, citation as ue, creditLine as de, entityRef as fe, languageLabels as pe, pictureCredits as me, picturesInLanguage as he, renderBlock as ge, renderInline as C, renderPlain as w, sheetRows as T, sourceUrl as _e, useDataPackage as ve, useGlossaryPopup as ye, useI18n as be, useProjects as xe, useRecordSheet as Se, useRelatedRecords as Ce } from "@museumwnf/viewer-core";
6
- import { useRoute as we } from "vue-router";
5
+ import { NotFoundView as ce, byId as le, citation as ue, creditLine as de, entityRef as fe, languageLabels as pe, loadEntities as me, pictureCredits as he, picturesInLanguage as ge, renderBlock as _e, renderInline as C, renderPlain as w, sheetRows as T, sourceUrl as ve, useDataPackage as ye, useGlossaryPopup as be, useI18n as xe, useProjects as Se, useRecordSheet as Ce, useRelatedRecords as we } from "@museumwnf/viewer-core";
6
+ import { useRoute as Te } from "vue-router";
7
7
  //#region src/content/ShortDescription.vue
8
- var Te = ["dir"], E = ["aria-expanded"], D = ["innerHTML"], Ee = {
8
+ var Ee = ["dir"], E = ["aria-expanded"], D = ["innerHTML"], De = {
9
9
  __name: "ShortDescription",
10
10
  props: {
11
11
  html: {
@@ -33,7 +33,7 @@ var Te = ["dir"], E = ["aria-expanded"], D = ["innerHTML"], Ee = {
33
33
  key: 0,
34
34
  class: "mwnf-sheet__block",
35
35
  innerHTML: e.html
36
- }, null, 8, D)) : c("", !0)], 8, Te));
36
+ }, null, 8, D)) : c("", !0)], 8, Ee));
37
37
  }
38
38
  };
39
39
  //#endregion
@@ -44,13 +44,13 @@ function O(e, t, n) {
44
44
  }
45
45
  //#endregion
46
46
  //#region src/views/RecordView.vue
47
- var De = ["dir", "innerHTML"], Oe = { class: "mwnf-record__body" }, ke = { class: "mwnf-record__main" }, Ae = {
47
+ var Oe = ["dir", "innerHTML"], ke = { class: "mwnf-record__body" }, Ae = { class: "mwnf-record__main" }, je = {
48
48
  key: 1,
49
49
  class: "mwnf-record__status"
50
- }, je = {
50
+ }, Me = {
51
51
  key: 0,
52
52
  class: "mwnf-record__aside"
53
- }, Me = {
53
+ }, Ne = {
54
54
  key: 2,
55
55
  class: "mwnf-record__status"
56
56
  }, k = {
@@ -70,56 +70,58 @@ var De = ["dir", "innerHTML"], Oe = { class: "mwnf-record__body" }, ke = { class
70
70
  }
71
71
  },
72
72
  setup(h) {
73
- let b = h, { t: S, locale: Te } = be(), E = ve(), D = xe(), k = se(), Ne = we(), A = b.spec.entity ?? b.entity, j = o(() => b.spec), Pe = fe(A), Fe = le(A), M = o(() => Fe.value.get(b.id) ?? null), Ie = o(() => Pe.value !== null), { language: N, languages: Le, dir: P, select: F, text: I, ready: L, terms: Re, glossary: R, attribution: z } = Se(M, {
73
+ let b = h, { t: S, locale: Ee } = xe(), E = ye(), D = Se(), k = se(), Pe = Te(), A = b.spec.entity ?? b.entity, j = o(() => b.spec), Fe = fe(A), Ie = le(A), M = o(() => Ie.value.get(b.id) ?? null), Le = o(() => Fe.value !== null), N = b.spec.creditPeople ? b.spec.creditPeople.entity ?? "authors" : null;
74
+ N && me([N]).catch(() => {});
75
+ let P = N ? le(N) : null, { language: F, languages: Re, dir: I, select: L, text: R, ready: z, terms: ze, glossary: B, attribution: V } = Ce(M, {
74
76
  entity: A,
75
- translations: b.spec.translations ?? [],
77
+ translations: [...b.spec.translations ?? [], ...N ? [N] : []],
76
78
  attribution: b.spec.attribution ?? []
77
- }), B = o(() => pe(Le.value)), { active: V, onClick: H, close: ze } = ye(Re), Be = o(() => V.value ? ge(V.value.definition, { breaks: !0 }) : ""), U = (e, t) => E.tr(e, t, N.value, "en"), Ve = (e) => E.translations(e, N.value), W = o(() => ({
79
+ }), H = o(() => pe(Re.value)), { active: U, onClick: W, close: Be } = be(ze), Ve = o(() => U.value ? _e(U.value.definition, { breaks: !0 }) : ""), G = (e, t) => E.tr(e, t, F.value, "en"), K = (e) => E.translations(e, F.value), q = o(() => ({
78
80
  record: M.value,
79
- text: I.value,
80
- language: N.value,
81
- languages: B.value,
82
- select: F,
83
- dir: P.value,
84
- glossary: R.value,
85
- ready: L.value,
86
- attribution: z.value,
81
+ text: R.value,
82
+ language: F.value,
83
+ languages: H.value,
84
+ select: L,
85
+ dir: I.value,
86
+ glossary: B.value,
87
+ ready: z.value,
88
+ attribution: V.value,
87
89
  t: S,
88
- tr: U,
89
- translations: Ve
90
+ tr: G,
91
+ translations: K
90
92
  }));
91
- function G(e) {
92
- return ((typeof e == "function" ? e(W.value) : e) ?? []).map((e) => ({
93
+ function He(e) {
94
+ return ((typeof e == "function" ? e(q.value) : e) ?? []).map((e) => ({
93
95
  ...e,
94
96
  label: e.label ? S(e.label) : ""
95
97
  }));
96
98
  }
97
- let K = o(() => M.value ? T(G(j.value.fields), W.value) : []), q = o(() => M.value ? T(G(j.value.sections).map((e) => ({
99
+ let Ue = o(() => M.value ? T(He(j.value.fields), q.value) : []), We = o(() => M.value ? T(He(j.value.sections).map((e) => ({
98
100
  render: "block",
99
101
  ...e
100
- })), W.value) : []), J = o(() => j.value.shortDescriptionAfter ?? "description"), He = o(() => !K.value.some((e) => e.key === J.value) && q.value.some((e) => e.key === J.value)), Ue = o(() => j.value.shortDescription === !1 ? "" : j.value.shortDescription ?? "short_description"), Y = o(() => {
101
- let e = Ue.value ? I.value[Ue.value] : "";
102
- return e ? { html: ge(String(e), {
102
+ })), q.value) : []), J = o(() => j.value.shortDescriptionAfter ?? "description"), Ge = o(() => !Ue.value.some((e) => e.key === J.value) && We.value.some((e) => e.key === J.value)), Ke = o(() => j.value.shortDescription === !1 ? "" : j.value.shortDescription ?? "short_description"), Y = o(() => {
103
+ let e = Ke.value ? R.value[Ke.value] : "";
104
+ return e ? { html: _e(String(e), {
103
105
  breaks: !0,
104
- glossary: R.value
106
+ glossary: B.value
105
107
  }) } : null;
106
- }), We = o(() => {
108
+ }), qe = o(() => {
107
109
  if (!M.value) return "";
108
- if (j.value.title) return j.value.title(W.value);
109
- let e = I.value.name ?? M.value.internal_name ?? M.value.id;
110
- return C(String(e), { glossary: R.value });
111
- }), Ge = o(() => M.value ? O(Ke(), j.value.pictureLimit, W.value) : []);
112
- function Ke() {
113
- if (j.value.media) return j.value.media(M.value, W.value);
114
- let e = w(String(I.value.name ?? M.value.internal_name ?? ""));
115
- return he(M.value.images, N.value).map((t) => ({
110
+ if (j.value.title) return j.value.title(q.value);
111
+ let e = R.value.name ?? M.value.internal_name ?? M.value.id;
112
+ return C(String(e), { glossary: B.value });
113
+ }), Je = o(() => M.value ? O(Ye(), j.value.pictureLimit, q.value) : []);
114
+ function Ye() {
115
+ if (j.value.media) return j.value.media(M.value, q.value);
116
+ let e = w(String(R.value.name ?? M.value.internal_name ?? ""));
117
+ return ge(M.value.images, F.value).map((t) => ({
116
118
  url: t.url,
117
- alt: t.captions?.[N.value] ?? e,
118
- caption: t.captions?.[N.value] ?? "",
119
- ...me(t, N.value)
119
+ alt: t.captions?.[F.value] ?? e,
120
+ caption: t.captions?.[F.value] ?? "",
121
+ ...he(t, F.value)
120
122
  }));
121
123
  }
122
- let qe = [
124
+ let Xe = [
123
125
  {
124
126
  field: "author",
125
127
  label: "sheet.field.preparedBy"
@@ -137,44 +139,60 @@ var De = ["dir", "innerHTML"], Oe = { class: "mwnf-record__body" }, ke = { class
137
139
  label: "sheet.field.translationCopyeditedBy"
138
140
  }
139
141
  ];
140
- function Je(e) {
141
- let t = j.value.creditNames ? I.value.credit_names?.[e] : null;
142
- return t?.length ? de(t) : I.value[e] ?? z.value[e] ?? "";
142
+ function Ze(e) {
143
+ let t = j.value.creditNames ? R.value.credit_names?.[e] : null;
144
+ return t?.length ? de(t) : R.value[e] ?? V.value[e] ?? "";
145
+ }
146
+ function Qe(e) {
147
+ let t = P ? R.value.credit_ids?.[e] : null;
148
+ if (!t?.length) return null;
149
+ let n = K(N), r = t.map((e) => {
150
+ let t = P.value.get(e);
151
+ if (!t) return null;
152
+ let r = t.name ?? "";
153
+ return {
154
+ name: F.value === "ar" && t.originalname ? t.originalname : r,
155
+ heading: [t.firstname, t.lastname].filter(Boolean).join(" ") || r,
156
+ biography: n?.[e]?.curriculum ?? ""
157
+ };
158
+ });
159
+ return r.every(Boolean) ? r : null;
143
160
  }
144
- let Ye = o(() => (j.value.credits ?? qe).map(({ field: e, label: t }) => ({
161
+ let $e = o(() => (j.value.credits ?? Xe).map(({ field: e, label: t }) => ({
145
162
  label: S(t),
146
- value: Je(e)
147
- })).filter((e) => e.value)), Xe = o(() => String(M.value?.[j.value.workingNumber ?? "mwnf_reference"] ?? ""));
163
+ value: Ze(e),
164
+ people: Qe(e)
165
+ })).filter((e) => e.value)), et = o(() => String(M.value?.[j.value.workingNumber ?? "mwnf_reference"] ?? ""));
148
166
  function X(e) {
149
- if (e?.permalink !== !1) return typeof e?.permalink == "string" ? e.permalink : _e(Ne) ?? void 0;
167
+ if (e?.permalink !== !1) return typeof e?.permalink == "string" ? e.permalink : ve(Pe) ?? void 0;
150
168
  }
151
- let Ze = o(() => {
169
+ let tt = o(() => {
152
170
  let e = j.value.citation;
153
- return !M.value || typeof e?.format != "function" ? "" : e.format(W.value, {
171
+ return !M.value || typeof e?.format != "function" ? "" : e.format(q.value, {
154
172
  permalink: X(e),
155
173
  year: (/* @__PURE__ */ new Date()).getFullYear()
156
174
  });
157
- }), Qe = o(() => {
175
+ }), nt = o(() => {
158
176
  let e = j.value.citation;
159
177
  if (!M.value || e === !1 || typeof e?.format == "function") return "";
160
- let t = typeof e?.project == "function" ? null : e?.project ?? M.value.project_id, n = typeof e?.project == "function" ? e.project(M.value, W.value) : D.label(t);
178
+ let t = typeof e?.project == "function" ? null : e?.project ?? M.value.project_id, n = typeof e?.project == "function" ? e.project(M.value, q.value) : D.label(t);
161
179
  return ue({
162
- author: Je("author") || void 0,
163
- name: I.value.name ?? M.value.internal_name ?? "",
180
+ author: Ze("author") || void 0,
181
+ name: R.value.name ?? M.value.internal_name ?? "",
164
182
  project: n,
165
183
  permalink: X(e),
166
184
  inWord: S("record.citation.in")
167
185
  });
168
- }), Z = Ce(M, {
186
+ }), Z = we(M, {
169
187
  entity: A,
170
- language: N
188
+ language: F
171
189
  }), Q = o(() => j.value.related === !1 ? null : j.value.related ?? {}), $ = o(() => {
172
190
  if (!Q.value) return [];
173
- let e = Q.value.record ?? $e;
174
- return Z.value.inPackage.map((t) => e(t, W.value));
191
+ let e = Q.value.record ?? rt;
192
+ return Z.value.inPackage.map((t) => e(t, q.value));
175
193
  });
176
- function $e({ record: e, justification: t }) {
177
- let n = U(A, e.id).name ?? e.internal_name ?? e.id;
194
+ function rt({ record: e, justification: t }) {
195
+ let n = G(A, e.id).name ?? e.internal_name ?? e.id;
178
196
  return {
179
197
  id: e.id,
180
198
  image: e.images?.[0]?.url ?? "",
@@ -188,7 +206,7 @@ var De = ["dir", "innerHTML"], Oe = { class: "mwnf-record__body" }, ke = { class
188
206
  }
189
207
  };
190
208
  }
191
- let et = /* @__PURE__ */ new Set([
209
+ let it = /* @__PURE__ */ new Set([
192
210
  "header",
193
211
  "before-sheet",
194
212
  "after-sheet",
@@ -197,13 +215,13 @@ var De = ["dir", "innerHTML"], Oe = { class: "mwnf-record__body" }, ke = { class
197
215
  "related",
198
216
  "after",
199
217
  "default"
200
- ]), tt = o(() => Object.keys(k).filter((e) => !et.has(e)));
201
- return (o, h) => Ie.value && !M.value ? (m(), s(y(ce), { key: 0 })) : M.value ? (m(), l("article", {
218
+ ]), at = o(() => Object.keys(k).filter((e) => !it.has(e)));
219
+ return (o, h) => Le.value && !M.value ? (m(), s(y(ce), { key: 0 })) : M.value ? (m(), l("article", {
202
220
  key: 1,
203
221
  class: oe(["mwnf-record", { "mwnf-record--spaced": j.value.spaced }]),
204
- onClick: h[0] ||= (...e) => y(H) && y(H)(...e)
222
+ onClick: h[0] ||= (...e) => y(W) && y(W)(...e)
205
223
  }, [
206
- _(o.$slots, "header", p(f(W.value)), () => [
224
+ _(o.$slots, "header", p(f(q.value)), () => [
207
225
  j.value.back ? (m(), s(n, {
208
226
  key: 0,
209
227
  class: "mwnf-record__back",
@@ -214,9 +232,9 @@ var De = ["dir", "innerHTML"], Oe = { class: "mwnf-record__body" }, ke = { class
214
232
  _: 1
215
233
  }, 8, ["to", "href"])) : c("", !0),
216
234
  d(t, {
217
- languages: B.value,
218
- language: y(N),
219
- onSelect: y(F)
235
+ languages: H.value,
236
+ language: y(F),
237
+ onSelect: y(L)
220
238
  }, null, 8, [
221
239
  "languages",
222
240
  "language",
@@ -224,29 +242,29 @@ var De = ["dir", "innerHTML"], Oe = { class: "mwnf-record__body" }, ke = { class
224
242
  ]),
225
243
  u("h1", {
226
244
  class: "mwnf-record__title",
227
- dir: y(P) || void 0,
228
- innerHTML: We.value
229
- }, null, 8, De)
245
+ dir: y(I) || void 0,
246
+ innerHTML: qe.value
247
+ }, null, 8, Oe)
230
248
  ]),
231
- u("div", Oe, [u("div", ke, [
232
- Ge.value.length ? (m(), s(i, {
249
+ u("div", ke, [u("div", Ae, [
250
+ Je.value.length ? (m(), s(i, {
233
251
  key: 0,
234
- images: Ge.value,
252
+ images: Je.value,
235
253
  variant: j.value.mediaVariant ?? ""
236
254
  }, null, 8, ["images", "variant"])) : c("", !0),
237
- y(L) ? c("", !0) : (m(), l("p", Ae, v(y(S)("core.status.loading")), 1)),
238
- _(o.$slots, "before-sheet", p(f(W.value))),
255
+ y(z) ? c("", !0) : (m(), l("p", je, v(y(S)("core.status.loading")), 1)),
256
+ _(o.$slots, "before-sheet", p(f(q.value))),
239
257
  d(ne, {
240
- rows: K.value,
258
+ rows: Ue.value,
241
259
  layout: j.value.layout ?? "table",
242
- dir: y(P),
260
+ dir: y(I),
243
261
  "short-description": Y.value,
244
262
  "short-description-after": J.value
245
- }, ie({ _: 2 }, [g(tt.value, (e) => ({
263
+ }, ie({ _: 2 }, [g(at.value, (e) => ({
246
264
  name: e,
247
265
  fn: x((t) => [_(o.$slots, e, p(f({
248
266
  ...t,
249
- ...W.value
267
+ ...q.value
250
268
  })))])
251
269
  }))]), 1032, [
252
270
  "rows",
@@ -255,26 +273,26 @@ var De = ["dir", "innerHTML"], Oe = { class: "mwnf-record__body" }, ke = { class
255
273
  "short-description",
256
274
  "short-description-after"
257
275
  ]),
258
- (m(!0), l(a, null, g(q.value, (e) => (m(), l(a, { key: e.key }, [d(ee, {
276
+ (m(!0), l(a, null, g(We.value, (e) => (m(), l(a, { key: e.key }, [d(ee, {
259
277
  heading: e.label,
260
278
  html: e.html,
261
- dir: y(P)
279
+ dir: y(I)
262
280
  }, null, 8, [
263
281
  "heading",
264
282
  "html",
265
283
  "dir"
266
- ]), Y.value && He.value && e.key === J.value ? (m(), s(Ee, {
284
+ ]), Y.value && Ge.value && e.key === J.value ? (m(), s(De, {
267
285
  key: 0,
268
286
  html: Y.value.html,
269
- dir: y(P)
287
+ dir: y(I)
270
288
  }, null, 8, ["html", "dir"])) : c("", !0)], 64))), 128)),
271
- _(o.$slots, "after-sheet", p(f(W.value))),
289
+ _(o.$slots, "after-sheet", p(f(q.value))),
272
290
  d(e, {
273
- credits: Ye.value,
274
- "working-number": Xe.value,
291
+ credits: $e.value,
292
+ "working-number": et.value,
275
293
  "working-number-label": y(S)(j.value.workingNumberLabel ?? "sheet.field.workingNumber"),
276
- citation: Qe.value,
277
- "citation-html": Ze.value,
294
+ citation: nt.value,
295
+ "citation-html": tt.value,
278
296
  "citation-heading": j.value.citation?.heading ? y(S)(j.value.citation.heading) : ""
279
297
  }, null, 8, [
280
298
  "credits",
@@ -284,9 +302,9 @@ var De = ["dir", "innerHTML"], Oe = { class: "mwnf-record__body" }, ke = { class
284
302
  "citation-html",
285
303
  "citation-heading"
286
304
  ]),
287
- _(o.$slots, "source", p(f(W.value)), () => [d(r)]),
305
+ _(o.$slots, "source", p(f(q.value)), () => [d(r)]),
288
306
  _(o.$slots, "related", p(f({
289
- ...W.value,
307
+ ...q.value,
290
308
  records: $.value,
291
309
  outside: y(Z).outside
292
310
  })), () => [Q.value ? (m(), s(te, {
@@ -301,24 +319,24 @@ var De = ["dir", "innerHTML"], Oe = { class: "mwnf-record__body" }, ke = { class
301
319
  "variant",
302
320
  "action-label"
303
321
  ])) : c("", !0)])
304
- ]), o.$slots.aside ? (m(), l("aside", je, [_(o.$slots, "aside", p(f({
305
- ...W.value,
322
+ ]), o.$slots.aside ? (m(), l("aside", Me, [_(o.$slots, "aside", p(f({
323
+ ...q.value,
306
324
  records: $.value,
307
325
  outside: y(Z).outside
308
326
  })))])) : c("", !0)]),
309
- _(o.$slots, "after", p(f(W.value))),
327
+ _(o.$slots, "after", p(f(q.value))),
310
328
  d(re, {
311
- term: y(V),
312
- html: Be.value,
313
- dir: y(P),
314
- onClose: y(ze)
329
+ term: y(U),
330
+ html: Ve.value,
331
+ dir: y(I),
332
+ onClose: y(Be)
315
333
  }, null, 8, [
316
334
  "term",
317
335
  "html",
318
336
  "dir",
319
337
  "onClose"
320
338
  ])
321
- ], 2)) : (m(), l("p", Me, v(y(S)("core.status.loading")), 1));
339
+ ], 2)) : (m(), l("p", Ne, v(y(S)("core.status.loading")), 1));
322
340
  }
323
341
  };
324
342
  //#endregion