@readium/shared 1.2.1 → 1.3.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/index.js CHANGED
@@ -166,7 +166,7 @@ Object.defineProperty(m.prototype, "encryption", {
166
166
  return ht.deserialize(this.otherProperties.encrypted);
167
167
  }
168
168
  });
169
- var Rt = /* @__PURE__ */ ((i) => (i.fixed = "fixed", i.reflowable = "reflowable", i))(Rt || {}), Ie = /* @__PURE__ */ ((i) => (i.auto = "auto", i.landscape = "landscape", i.portrait = "portrait", i))(Ie || {}), Te = /* @__PURE__ */ ((i) => (i.auto = "auto", i.clipped = "clipped", i.paginated = "paginated", i.scrolled = "scrolled", i))(Te || {}), H = /* @__PURE__ */ ((i) => (i.left = "left", i.right = "right", i.center = "center", i))(H || {}), ze = /* @__PURE__ */ ((i) => (i.auto = "auto", i.both = "both", i.none = "none", i.landscape = "landscape", i))(ze || {}), ve = /* @__PURE__ */ ((i) => (i.contain = "contain", i.cover = "cover", i.width = "width", i.height = "height", i))(ve || {});
169
+ var Ct = /* @__PURE__ */ ((i) => (i.fixed = "fixed", i.reflowable = "reflowable", i))(Ct || {}), Ie = /* @__PURE__ */ ((i) => (i.auto = "auto", i.landscape = "landscape", i.portrait = "portrait", i))(Ie || {}), Te = /* @__PURE__ */ ((i) => (i.auto = "auto", i.clipped = "clipped", i.paginated = "paginated", i.scrolled = "scrolled", i))(Te || {}), H = /* @__PURE__ */ ((i) => (i.left = "left", i.right = "right", i.center = "center", i))(H || {}), ze = /* @__PURE__ */ ((i) => (i.auto = "auto", i.both = "both", i.none = "none", i.landscape = "landscape", i))(ze || {}), ve = /* @__PURE__ */ ((i) => (i.contain = "contain", i.cover = "cover", i.width = "width", i.height = "height", i))(ve || {});
170
170
  class _ {
171
171
  /** Creates a [Presentation]. */
172
172
  constructor(t) {
@@ -198,7 +198,7 @@ class _ {
198
198
  }
199
199
  _.prototype.layoutOf = function(i) {
200
200
  var t;
201
- return ((t = i.properties) == null ? void 0 : t.getLayout()) || this.layout || Rt.reflowable;
201
+ return ((t = i.properties) == null ? void 0 : t.getLayout()) || this.layout || Ct.reflowable;
202
202
  };
203
203
  m.prototype.getContains = function() {
204
204
  return new Set(this.otherProperties.contains || []);
@@ -689,20 +689,20 @@ class J {
689
689
  return this.uri.replace(/\{(\??)([^}]+)\}/g, (...s) => s[1] ? r(s[2]) : e(s[2]));
690
690
  }
691
691
  }
692
- function Oe(i) {
692
+ function Ne(i) {
693
693
  return i && i instanceof Array ? i : void 0;
694
694
  }
695
- function R(i) {
696
- return i && typeof i == "string" ? [i] : Oe(i);
695
+ function C(i) {
696
+ return i && typeof i == "string" ? [i] : Ne(i);
697
697
  }
698
698
  function Y(i) {
699
699
  return typeof i == "string" ? new Date(i) : void 0;
700
700
  }
701
- function C(i) {
701
+ function R(i) {
702
702
  return isNaN(i) ? void 0 : i;
703
703
  }
704
704
  function y(i) {
705
- return C(i) !== void 0 && Math.sign(i) >= 0 ? i : void 0;
705
+ return R(i) !== void 0 && Math.sign(i) >= 0 ? i : void 0;
706
706
  }
707
707
  function ut(i) {
708
708
  const t = new Array();
@@ -721,7 +721,7 @@ class E {
721
721
  static deserialize(t) {
722
722
  if (!t)
723
723
  return;
724
- const e = C(t.progression), r = C(t.totalProgression), s = C(t.position), n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set([
724
+ const e = R(t.progression), r = R(t.totalProgression), s = R(t.position), n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set([
725
725
  "fragment",
726
726
  "fragments",
727
727
  "progression",
@@ -731,7 +731,7 @@ class E {
731
731
  return Object.entries(t).forEach(([l, c]) => {
732
732
  o.has(l) || n.set(l, c);
733
733
  }), new E({
734
- fragments: R(t.fragments || t.fragment),
734
+ fragments: C(t.fragments || t.fragment),
735
735
  progression: e !== void 0 && e >= 0 && e <= 1 ? e : void 0,
736
736
  totalProgression: r !== void 0 && r >= 0 && r <= 1 ? r : void 0,
737
737
  position: s !== void 0 && s > 0 ? s : void 0,
@@ -823,7 +823,7 @@ class S {
823
823
  * Parses a [Link] from its RWPM JSON representation.
824
824
  */
825
825
  static deserialize(t) {
826
- if (t && t.href && typeof t.href == "string")
826
+ if (!(!t || typeof t.href != "string"))
827
827
  return new S({
828
828
  href: t.href,
829
829
  templated: t.templated,
@@ -835,7 +835,7 @@ class S {
835
835
  width: y(t.width),
836
836
  duration: y(t.duration),
837
837
  bitrate: y(t.bitrate),
838
- languages: R(t.language),
838
+ languages: C(t.language),
839
839
  alternates: x.deserialize(t.alternate),
840
840
  children: x.deserialize(t.children)
841
841
  });
@@ -1025,7 +1025,7 @@ class k {
1025
1025
  audioref: t.audioref,
1026
1026
  children: k.deserializeArray(t.children),
1027
1027
  imgref: t.imgref,
1028
- role: t.role ? new Set(R(t.role)) : void 0,
1028
+ role: t.role ? new Set(C(t.role)) : void 0,
1029
1029
  text: t.text,
1030
1030
  textref: t.textref
1031
1031
  });
@@ -1082,7 +1082,7 @@ class k {
1082
1082
  return e.length === 1 ? [isNaN(e[0]) ? void 0 : e[0], void 0] : e.length > 2 ? [void 0, void 0] : [isNaN(e[0]) ? void 0 : e[0], isNaN(e[1]) ? void 0 : e[1]];
1083
1083
  }
1084
1084
  }
1085
- function Ne(i, t) {
1085
+ function Oe(i, t) {
1086
1086
  return t.length > 1 ? t.indexOf(i.slice(-1)) > -1 : i.slice(-1) === t;
1087
1087
  }
1088
1088
  function Pe(i, t) {
@@ -1090,8 +1090,8 @@ function Pe(i, t) {
1090
1090
  }
1091
1091
  const et = {
1092
1092
  endsWith: Pe,
1093
- endsWithChar: Ne
1094
- }, Ce = [
1093
+ endsWithChar: Oe
1094
+ }, Re = [
1095
1095
  "ie",
1096
1096
  "eg",
1097
1097
  "ext",
@@ -1186,11 +1186,11 @@ const et = {
1186
1186
  function Lt(i) {
1187
1187
  return /^[A-Z][a-z].*/.test(i) || st(i);
1188
1188
  }
1189
- function Re(i) {
1189
+ function Ce(i) {
1190
1190
  return Lt(i) || /``|"|'/.test(i.substring(0, 2));
1191
1191
  }
1192
1192
  function Le(i) {
1193
- return ~Ce.indexOf(i.replace(/\W+/g, ""));
1193
+ return ~Re.indexOf(i.replace(/\W+/g, ""));
1194
1194
  }
1195
1195
  function ke(i, t) {
1196
1196
  if (i === "a.m." || i === "p.m.") {
@@ -1248,7 +1248,7 @@ function We(i, t) {
1248
1248
  if (f) {
1249
1249
  if (r.length === 2 && isNaN(r.charAt(0)) && r.match(/[a-zA-Z]/) || Le(r))
1250
1250
  return p;
1251
- if (Re(f.value)) {
1251
+ if (Ce(f.value)) {
1252
1252
  if (ke(r, f.value) || st(f.value) && It(r))
1253
1253
  return p;
1254
1254
  } else if (et.endsWith(r, "..") || St(r) || It(r))
@@ -1530,9 +1530,9 @@ const _e = new RegExp("[\\p{L}\\p{N}]+", "u"), kt = (i) => {
1530
1530
  const t = i.trimEnd();
1531
1531
  return t.length === 0 || t.match(_e) === null ? null : t;
1532
1532
  };
1533
- class N {
1533
+ class O {
1534
1534
  constructor(t) {
1535
- this.fetcher = new Ae(), t.fetcher && (this.fetcher = t.fetcher), this.manifest = t.manifest, this.context = t.manifest.context, this.metadata = t.manifest.metadata, this.links = t.manifest.links, this.readingOrder = t.manifest.readingOrder, this.resources = t.manifest.resources, this.tableOfContents = t.manifest.tableOfContents, this.subcollections = t.manifest.subcollections;
1535
+ this.fetcher = new Ae(), t.fetcher && (this.fetcher = t.fetcher), this.manifest = t.manifest, this.context = t.manifest.context, this.metadata = t.manifest.metadata, this.links = t.manifest.links, this.readingOrder = t.manifest.readingOrder, this.resources = t.manifest.resources, this.toc = t.manifest.toc, this.subcollections = t.manifest.subcollections;
1536
1536
  }
1537
1537
  /** The URL where this publication is served, computed from the `Link` with `self` relation.
1538
1538
  * e.g. https://provider.com/pub1293/manifest.json gives https://provider.com/pub1293/
@@ -1607,22 +1607,22 @@ class N {
1607
1607
  return this.fetcher.get(t);
1608
1608
  }
1609
1609
  }
1610
- N.prototype.getPageList = function() {
1610
+ O.prototype.getPageList = function() {
1611
1611
  return this.linksWithRole("pageList");
1612
1612
  };
1613
- N.prototype.getLandmarks = function() {
1613
+ O.prototype.getLandmarks = function() {
1614
1614
  return this.linksWithRole("landmarks");
1615
1615
  };
1616
- N.prototype.getListOfAudioClips = function() {
1616
+ O.prototype.getListOfAudioClips = function() {
1617
1617
  return this.linksWithRole("loa");
1618
1618
  };
1619
- N.prototype.getListOfIllustrations = function() {
1619
+ O.prototype.getListOfIllustrations = function() {
1620
1620
  return this.linksWithRole("loi");
1621
1621
  };
1622
- N.prototype.getListOfTables = function() {
1622
+ O.prototype.getListOfTables = function() {
1623
1623
  return this.linksWithRole("lot");
1624
1624
  };
1625
- N.prototype.getListOfVideoClips = function() {
1625
+ O.prototype.getListOfVideoClips = function() {
1626
1626
  return this.linksWithRole("lov");
1627
1627
  };
1628
1628
  class q {
@@ -1881,7 +1881,7 @@ m.prototype.getAvailability = function() {
1881
1881
  m.prototype.getAuthenticate = function() {
1882
1882
  return S.deserialize(this.otherProperties.authenticate);
1883
1883
  };
1884
- N.prototype.getImages = function() {
1884
+ O.prototype.getImages = function() {
1885
1885
  return this.linksWithRole("images");
1886
1886
  };
1887
1887
  const bt = class P {
@@ -1933,7 +1933,7 @@ const bt = class P {
1933
1933
  };
1934
1934
  bt.UNDEFINED_LANGUAGE = "undefined";
1935
1935
  bt.LANGUAGE_EN = "en";
1936
- let O = bt;
1936
+ let N = bt;
1937
1937
  class K {
1938
1938
  /**
1939
1939
  * Creates a [Contributor] object.
@@ -1949,14 +1949,14 @@ class K {
1949
1949
  static deserialize(t) {
1950
1950
  if (t)
1951
1951
  return typeof t == "string" ? new K({
1952
- name: O.deserialize(t)
1952
+ name: N.deserialize(t)
1953
1953
  }) : t.name ? new K({
1954
- name: O.deserialize(t.name),
1954
+ name: N.deserialize(t.name),
1955
1955
  sortAs: t.sortAs,
1956
1956
  identifier: t.identifier,
1957
- roles: t.role ? new Set(R(t.role)) : void 0,
1957
+ roles: t.role ? new Set(C(t.role)) : void 0,
1958
1958
  links: x.deserialize(t.links),
1959
- position: C(t.position)
1959
+ position: R(t.position)
1960
1960
  }) : void 0;
1961
1961
  }
1962
1962
  /**
@@ -2047,9 +2047,9 @@ class Z {
2047
2047
  static deserialize(t) {
2048
2048
  if (t)
2049
2049
  return typeof t == "string" ? new Z({
2050
- name: O.deserialize(t)
2050
+ name: N.deserialize(t)
2051
2051
  }) : t.name ? new Z({
2052
- name: O.deserialize(t.name),
2052
+ name: N.deserialize(t.name),
2053
2053
  sortAs: t.sortAs,
2054
2054
  code: t.code,
2055
2055
  scheme: t.scheme,
@@ -2100,7 +2100,7 @@ const Dt = class nt {
2100
2100
  static deserialize(t) {
2101
2101
  if (!(t && t.title))
2102
2102
  return;
2103
- const e = O.deserialize(t.title), r = t["@type"], s = t.identifier, n = O.deserialize(t.subtitle), o = O.deserialize(t.sortAs), l = b.deserialize(t.artist), c = b.deserialize(t.author), h = b.deserialize(t.colorist), u = b.deserialize(t.contributor), p = b.deserialize(t.editor), f = b.deserialize(t.illustrator), d = b.deserialize(t.inker), I = b.deserialize(t.letterer), L = b.deserialize(t.narrator), le = b.deserialize(t.penciler), ce = b.deserialize(t.translator), he = R(t.language), ue = t.description, fe = b.deserialize(t.publisher), pe = b.deserialize(t.imprint), de = Y(t.published), ge = Y(t.modified), me = xt.deserialize(t.subject), Ee = B.deserialize(t.belongsTo), be = t.readingProgression, xe = y(t.duration), we = y(t.numberOfPages);
2103
+ const e = N.deserialize(t.title), r = t["@type"], s = t.identifier, n = N.deserialize(t.subtitle), o = N.deserialize(t.sortAs), l = b.deserialize(t.artist), c = b.deserialize(t.author), h = b.deserialize(t.colorist), u = b.deserialize(t.contributor), p = b.deserialize(t.editor), f = b.deserialize(t.illustrator), d = b.deserialize(t.inker), I = b.deserialize(t.letterer), L = b.deserialize(t.narrator), le = b.deserialize(t.penciler), ce = b.deserialize(t.translator), he = C(t.language), ue = t.description, fe = b.deserialize(t.publisher), pe = b.deserialize(t.imprint), de = Y(t.published), ge = Y(t.modified), me = xt.deserialize(t.subject), Ee = B.deserialize(t.belongsTo), be = t.readingProgression, xe = y(t.duration), we = y(t.numberOfPages);
2104
2104
  let G = Object.assign({}, t);
2105
2105
  return nt.mappedProperties.forEach((ye) => delete G[ye]), Object.keys(G).length === 0 && (G = void 0), new nt({
2106
2106
  title: e,
@@ -2662,7 +2662,7 @@ function rt(i, t) {
2662
2662
  const W = "[\\s\\u0085\\u00A0\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]", ci = new RegExp(`^${W}+$`, "g"), hi = new RegExp(`^${W}+|${W}+$/g`, "g"), Mt = new RegExp(`^${W}+`, "g"), $t = new RegExp(`${W}+$`, "g"), V = (i) => (
2663
2663
  // Normal spaces, \t, \n, \v, \f, \r, U+0085, U+00A0, U+2000 to U+200A, U+2028, U+2029, U+202F, U+205F, U+3000
2664
2664
  i != null && i.length ? ci.test(i) : !0
2665
- ), Gt = (i) => i.replace(hi, ""), ui = (i) => i.replace(Mt, ""), fi = (i) => i.replace($t, ""), Ot = (i, t = "") => {
2665
+ ), Gt = (i) => i.replace(hi, ""), ui = (i) => i.replace(Mt, ""), fi = (i) => i.replace($t, ""), Nt = (i, t = "") => {
2666
2666
  var e, r;
2667
2667
  return new M({
2668
2668
  before: t + (((e = Mt.exec(i)) == null ? void 0 : e[0]) ?? ""),
@@ -2737,7 +2737,7 @@ function Ht(i) {
2737
2737
  function xi(i) {
2738
2738
  return ["string", "function"].includes(typeof i) || Ht(i);
2739
2739
  }
2740
- function Nt(i) {
2740
+ function Ot(i) {
2741
2741
  return Array.isArray(i) ? i.filter(xi) : [];
2742
2742
  }
2743
2743
  function wi(i) {
@@ -2757,21 +2757,21 @@ function Vt(i, t) {
2757
2757
  const e = t.getRootNode({ composed: !1 });
2758
2758
  return Pt(e) ? (e !== document && X("shadow root inferred", "You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."), e) : t.ownerDocument.querySelector(":root");
2759
2759
  }
2760
- function Ct(i) {
2760
+ function Rt(i) {
2761
2761
  return typeof i == "number" ? i : Number.POSITIVE_INFINITY;
2762
2762
  }
2763
2763
  function yi(i, t = {}) {
2764
2764
  const e = Object.assign(Object.assign({}, Ei), t);
2765
2765
  return {
2766
2766
  selectors: bi(e.selectors),
2767
- whitelist: Nt(e.whitelist),
2768
- blacklist: Nt(e.blacklist),
2767
+ whitelist: Ot(e.whitelist),
2768
+ blacklist: Ot(e.blacklist),
2769
2769
  root: Vt(e.root, i),
2770
2770
  combineWithinSelector: !!e.combineWithinSelector,
2771
2771
  combineBetweenSelectors: !!e.combineBetweenSelectors,
2772
2772
  includeTag: !!e.includeTag,
2773
- maxCombinations: Ct(e.maxCombinations),
2774
- maxCandidates: Ct(e.maxCandidates)
2773
+ maxCombinations: Rt(e.maxCombinations),
2774
+ maxCandidates: Rt(e.maxCandidates)
2775
2775
  };
2776
2776
  }
2777
2777
  function $(i = []) {
@@ -2836,7 +2836,7 @@ const Ti = "", qt = " > ", Kt = " ", zi = {
2836
2836
  "^$",
2837
2837
  "\\s"
2838
2838
  // contains whitespace
2839
- ].join("|")), Oi = new RegExp([
2839
+ ].join("|")), Ni = new RegExp([
2840
2840
  "^$"
2841
2841
  // empty or not set
2842
2842
  ].join("|")), Xt = [
@@ -2846,7 +2846,7 @@ const Ti = "", qt = " > ", Kt = " ", zi = {
2846
2846
  g.class,
2847
2847
  g.attribute,
2848
2848
  g.nthchild
2849
- ], Ni = lt([
2849
+ ], Oi = lt([
2850
2850
  "class",
2851
2851
  "id",
2852
2852
  // Angular attributes
@@ -2855,18 +2855,18 @@ const Ti = "", qt = " > ", Kt = " ", zi = {
2855
2855
  function Pi({ nodeName: i }) {
2856
2856
  return `[${i}]`;
2857
2857
  }
2858
- function Ci({ nodeName: i, nodeValue: t }) {
2858
+ function Ri({ nodeName: i, nodeValue: t }) {
2859
2859
  return `[${i}='${tt(t)}']`;
2860
2860
  }
2861
- function Ri({ nodeName: i }, t) {
2861
+ function Ci({ nodeName: i }, t) {
2862
2862
  const e = t.tagName.toLowerCase();
2863
- return ["input", "option"].includes(e) && i === "value" ? !1 : !Ni(i);
2863
+ return ["input", "option"].includes(e) && i === "value" ? !1 : !Oi(i);
2864
2864
  }
2865
2865
  function Qt(i) {
2866
- const t = Array.from(i.attributes).filter((e) => Ri(e, i));
2866
+ const t = Array.from(i.attributes).filter((e) => Ci(e, i));
2867
2867
  return [
2868
2868
  ...t.map(Pi),
2869
- ...t.map(Ci)
2869
+ ...t.map(Ri)
2870
2870
  ];
2871
2871
  }
2872
2872
  function Li(i) {
@@ -2874,7 +2874,7 @@ function Li(i) {
2874
2874
  return $(t);
2875
2875
  }
2876
2876
  function _t(i) {
2877
- return (i.getAttribute("class") || "").trim().split(/\s+/).filter((t) => !Oi.test(t)).map((t) => `.${tt(t)}`);
2877
+ return (i.getAttribute("class") || "").trim().split(/\s+/).filter((t) => !Ni.test(t)).map((t) => `.${tt(t)}`);
2878
2878
  }
2879
2879
  function ki(i) {
2880
2880
  const t = i.map(_t);
@@ -3240,7 +3240,7 @@ class gr {
3240
3240
  href: this.baseLocator.href,
3241
3241
  type: this.baseLocator.type,
3242
3242
  title: this.baseLocator.title,
3243
- text: Ot(o.text, (c = this.wholeRawTextAcc) == null ? void 0 : c.substring(o.beforeRange[0], o.beforeRange[1])),
3243
+ text: Nt(o.text, (c = this.wholeRawTextAcc) == null ? void 0 : c.substring(o.beforeRange[0], o.beforeRange[1])),
3244
3244
  locations: new E(l ? {
3245
3245
  otherLocations: /* @__PURE__ */ new Map([
3246
3246
  ["cssSelector", l]
@@ -3256,7 +3256,7 @@ class gr {
3256
3256
  href: this.baseLocator.href,
3257
3257
  type: this.baseLocator.type,
3258
3258
  title: this.baseLocator.title,
3259
- text: Ot(s.text, n.length && ((r = n[0].locator.text) == null ? void 0 : r.before) || ""),
3259
+ text: Nt(s.text, n.length && ((r = n[0].locator.text) == null ? void 0 : r.before) || ""),
3260
3260
  locations: new E(e ? {
3261
3261
  otherLocations: /* @__PURE__ */ new Map([
3262
3262
  ["cssSelector", e]
@@ -3441,8 +3441,8 @@ class Q {
3441
3441
  return Object.entries(t).forEach(([s, n]) => {
3442
3442
  r.has(s) || e.set(s, n);
3443
3443
  }), new Q({
3444
- title: O.deserialize(t.title),
3445
- numberOfItems: C(t.numberOfItems),
3444
+ title: N.deserialize(t.title),
3445
+ numberOfItems: R(t.numberOfItems),
3446
3446
  otherMetadata: e.size === 0 ? void 0 : e
3447
3447
  });
3448
3448
  }
@@ -3557,7 +3557,7 @@ class v {
3557
3557
  }
3558
3558
  class ae {
3559
3559
  constructor(t) {
3560
- this.context = t.context, this.metadata = t.metadata, this.links = t.links, this.readingOrder = t.readingOrder, this.resources = t.resources, this.tableOfContents = t.tableOfContents, this.subcollections = t.subcollections;
3560
+ this.context = t.context, this.metadata = t.metadata, this.links = t.links, this.readingOrder = t.readingOrder, this.resources = t.resources, this.toc = t.toc, this.subcollections = t.subcollections;
3561
3561
  }
3562
3562
  /**
3563
3563
  * Parses a [Publication] from its RWPM JSON representation.
@@ -3579,12 +3579,12 @@ class ae {
3579
3579
  );
3580
3580
  if (s)
3581
3581
  return new ae({
3582
- context: R(t["@context"]),
3582
+ context: C(t["@context"]),
3583
3583
  metadata: e,
3584
3584
  links: r,
3585
3585
  readingOrder: s,
3586
3586
  resources: x.deserialize(t.resources),
3587
- tableOfContents: x.deserialize(t.toc),
3587
+ toc: x.deserialize(t.toc),
3588
3588
  subcollections: v.deserializeCollections({
3589
3589
  sub: t.sub
3590
3590
  })
@@ -3595,7 +3595,7 @@ class ae {
3595
3595
  */
3596
3596
  serialize() {
3597
3597
  const t = {};
3598
- return this.context !== void 0 && (t["@context"] = this.context), t.metadata = this.metadata.serialize(), t.links = this.links.serialize(), t.readingOrder = this.readingOrder.serialize(), this.resources && (t.resources = this.resources.serialize()), this.tableOfContents && (t.toc = this.tableOfContents.serialize()), v.serializeCollection(t, this.subcollections), t;
3598
+ return this.context !== void 0 && (t["@context"] = this.context), t.metadata = this.metadata.serialize(), t.links = this.links.serialize(), t.readingOrder = this.readingOrder.serialize(), this.resources && (t.resources = this.resources.serialize()), this.toc && (t.toc = this.toc.serialize()), v.serializeCollection(t, this.subcollections), t;
3599
3599
  }
3600
3600
  /** Finds the first link with the given relation in the manifest's links. */
3601
3601
  linkWithRel(t) {
@@ -3711,7 +3711,7 @@ export {
3711
3711
  Ze as DefaultTextContentTokenizer,
3712
3712
  pt as DomRange,
3713
3713
  q as DomRangePoint,
3714
- Rt as EPUBLayout,
3714
+ Ct as EPUBLayout,
3715
3715
  Ae as EmptyFetcher,
3716
3716
  ht as Encryption,
3717
3717
  ve as Fit,
@@ -3729,7 +3729,7 @@ export {
3729
3729
  wt as Iterator,
3730
3730
  S as Link,
3731
3731
  x as Links,
3732
- O as LocalizedString,
3732
+ N as LocalizedString,
3733
3733
  A as Locator,
3734
3734
  oe as LocatorCollection,
3735
3735
  Q as LocatorCollectionMetadata,
@@ -3748,7 +3748,7 @@ export {
3748
3748
  _ as Presentation,
3749
3749
  dt as Price,
3750
3750
  m as Properties,
3751
- N as Publication,
3751
+ O as Publication,
3752
3752
  v as PublicationCollection,
3753
3753
  Sr as PublicationContentIterator,
3754
3754
  z as ReadingProgression,
@@ -3764,11 +3764,11 @@ export {
3764
3764
  j as TextualElement,
3765
3765
  J as URITemplate,
3766
3766
  ei as VideoElement,
3767
- Oe as arrayfromJSON,
3768
- R as arrayfromJSONorString,
3767
+ Ne as arrayfromJSON,
3768
+ C as arrayfromJSONorString,
3769
3769
  Y as datefromJSON,
3770
3770
  xr as leadingPage,
3771
- C as numberfromJSON,
3771
+ R as numberfromJSON,
3772
3772
  y as positiveNumberfromJSON,
3773
3773
  ut as setToArray,
3774
3774
  kt as speakableToken