@fedify/vocab 2.3.9-dev.2048 → 2.3.9

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/mod.js CHANGED
@@ -9,7 +9,7 @@ import { isTemporalDuration, isTemporalInstant } from "@fedify/vocab-runtime/tem
9
9
  import { delay } from "es-toolkit";
10
10
  //#region deno.json
11
11
  var name = "@fedify/vocab";
12
- var version = "2.3.9-dev.2048+c88fcc8c";
12
+ var version = "2.3.9";
13
13
  //#endregion
14
14
  //#region src/type.ts
15
15
  function getTypeId(object) {
@@ -50,6 +50,12 @@ const normalizeLinkToImage = async (value, context) => {
50
50
  };
51
51
  //#endregion
52
52
  //#region src/vocab.ts
53
+ function canDecodeIri(iri) {
54
+ return URL.canParse(iri) || iri.startsWith("at://");
55
+ }
56
+ function decodeIri(iri) {
57
+ return !URL.canParse(iri) && iri.startsWith("at://") ? new URL("at://" + encodeURIComponent(iri.substring(5))) : new URL(iri);
58
+ }
53
59
  function isValidLanguageTag(language) {
54
60
  try {
55
61
  new Intl.Locale(language);
@@ -861,10 +867,20 @@ var Object$1 = class Object$1 {
861
867
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "attachment" in this._cachedJsonLd) {
862
868
  const prop = this._cachedJsonLd["attachment"];
863
869
  const obj = Array.isArray(prop) ? prop[i] : prop;
864
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#attachment_fromJsonLd(obj, {
865
- ...options,
866
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
867
- });
870
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
871
+ v = await this.#attachment_fromJsonLd(obj, {
872
+ ...options,
873
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
874
+ });
875
+ } catch (error) {
876
+ if (!options.suppressError) throw error;
877
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
878
+ property: "https://www.w3.org/ns/activitystreams#attachment",
879
+ index: i,
880
+ error
881
+ });
882
+ continue;
883
+ }
868
884
  }
869
885
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_49BipA5dq9eoH8LX8xdsVumveTca_attachment.has(0)) {
870
886
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -1033,10 +1049,19 @@ var Object$1 = class Object$1 {
1033
1049
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "attributedTo" in this._cachedJsonLd) {
1034
1050
  const prop = this._cachedJsonLd["attributedTo"];
1035
1051
  const doc = Array.isArray(prop) ? prop[0] : prop;
1036
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#attribution_fromJsonLd(doc, {
1037
- ...options,
1038
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1039
- });
1052
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
1053
+ v = await this.#attribution_fromJsonLd(doc, {
1054
+ ...options,
1055
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1056
+ });
1057
+ } catch (error) {
1058
+ if (!options.suppressError) throw error;
1059
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
1060
+ property: "https://www.w3.org/ns/activitystreams#attributedTo",
1061
+ error
1062
+ });
1063
+ return null;
1064
+ }
1040
1065
  }
1041
1066
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py_attributedTo.has(0)) {
1042
1067
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -1079,10 +1104,20 @@ var Object$1 = class Object$1 {
1079
1104
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "attributedTo" in this._cachedJsonLd) {
1080
1105
  const prop = this._cachedJsonLd["attributedTo"];
1081
1106
  const obj = Array.isArray(prop) ? prop[i] : prop;
1082
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#attribution_fromJsonLd(obj, {
1083
- ...options,
1084
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1085
- });
1107
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
1108
+ v = await this.#attribution_fromJsonLd(obj, {
1109
+ ...options,
1110
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1111
+ });
1112
+ } catch (error) {
1113
+ if (!options.suppressError) throw error;
1114
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
1115
+ property: "https://www.w3.org/ns/activitystreams#attributedTo",
1116
+ index: i,
1117
+ error
1118
+ });
1119
+ continue;
1120
+ }
1086
1121
  }
1087
1122
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py_attributedTo.has(0)) {
1088
1123
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -1204,10 +1239,19 @@ var Object$1 = class Object$1 {
1204
1239
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "audience" in this._cachedJsonLd) {
1205
1240
  const prop = this._cachedJsonLd["audience"];
1206
1241
  const doc = Array.isArray(prop) ? prop[0] : prop;
1207
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#audience_fromJsonLd(doc, {
1208
- ...options,
1209
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1210
- });
1242
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
1243
+ v = await this.#audience_fromJsonLd(doc, {
1244
+ ...options,
1245
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1246
+ });
1247
+ } catch (error) {
1248
+ if (!options.suppressError) throw error;
1249
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
1250
+ property: "https://www.w3.org/ns/activitystreams#audience",
1251
+ error
1252
+ });
1253
+ return null;
1254
+ }
1211
1255
  }
1212
1256
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3ocC3VVi88cEd5sPWL8djkZsvTN6_audience.has(0)) {
1213
1257
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -1249,10 +1293,20 @@ var Object$1 = class Object$1 {
1249
1293
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "audience" in this._cachedJsonLd) {
1250
1294
  const prop = this._cachedJsonLd["audience"];
1251
1295
  const obj = Array.isArray(prop) ? prop[i] : prop;
1252
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#audience_fromJsonLd(obj, {
1253
- ...options,
1254
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1255
- });
1296
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
1297
+ v = await this.#audience_fromJsonLd(obj, {
1298
+ ...options,
1299
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1300
+ });
1301
+ } catch (error) {
1302
+ if (!options.suppressError) throw error;
1303
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
1304
+ property: "https://www.w3.org/ns/activitystreams#audience",
1305
+ index: i,
1306
+ error
1307
+ });
1308
+ continue;
1309
+ }
1256
1310
  }
1257
1311
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3ocC3VVi88cEd5sPWL8djkZsvTN6_audience.has(0)) {
1258
1312
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -1408,10 +1462,20 @@ var Object$1 = class Object$1 {
1408
1462
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "context" in this._cachedJsonLd) {
1409
1463
  const prop = this._cachedJsonLd["context"];
1410
1464
  const obj = Array.isArray(prop) ? prop[i] : prop;
1411
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#context_fromJsonLd(obj, {
1412
- ...options,
1413
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1414
- });
1465
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
1466
+ v = await this.#context_fromJsonLd(obj, {
1467
+ ...options,
1468
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1469
+ });
1470
+ } catch (error) {
1471
+ if (!options.suppressError) throw error;
1472
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
1473
+ property: "https://www.w3.org/ns/activitystreams#context",
1474
+ index: i,
1475
+ error
1476
+ });
1477
+ continue;
1478
+ }
1415
1479
  }
1416
1480
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3mhZzGXSpQ431mBSz2kvych22v4e_context.has(0)) {
1417
1481
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -1567,10 +1631,20 @@ var Object$1 = class Object$1 {
1567
1631
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "generator" in this._cachedJsonLd) {
1568
1632
  const prop = this._cachedJsonLd["generator"];
1569
1633
  const obj = Array.isArray(prop) ? prop[i] : prop;
1570
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#generator_fromJsonLd(obj, {
1571
- ...options,
1572
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1573
- });
1634
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
1635
+ v = await this.#generator_fromJsonLd(obj, {
1636
+ ...options,
1637
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1638
+ });
1639
+ } catch (error) {
1640
+ if (!options.suppressError) throw error;
1641
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
1642
+ property: "https://www.w3.org/ns/activitystreams#generator",
1643
+ index: i,
1644
+ error
1645
+ });
1646
+ continue;
1647
+ }
1574
1648
  }
1575
1649
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_86xFhmgBapoMvYqjbjRuDPayTrS_generator.has(0)) {
1576
1650
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -1709,10 +1783,19 @@ var Object$1 = class Object$1 {
1709
1783
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "icon" in this._cachedJsonLd) {
1710
1784
  const prop = this._cachedJsonLd["icon"];
1711
1785
  const doc = Array.isArray(prop) ? prop[0] : prop;
1712
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#icon_fromJsonLd(doc, {
1713
- ...options,
1714
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1715
- });
1786
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
1787
+ v = await this.#icon_fromJsonLd(doc, {
1788
+ ...options,
1789
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1790
+ });
1791
+ } catch (error) {
1792
+ if (!options.suppressError) throw error;
1793
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
1794
+ property: "https://www.w3.org/ns/activitystreams#icon",
1795
+ error
1796
+ });
1797
+ return null;
1798
+ }
1716
1799
  }
1717
1800
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_33CjRLy5ujtsUrwRSCrsggvGdKuR_icon.has(0)) {
1718
1801
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -1755,10 +1838,20 @@ var Object$1 = class Object$1 {
1755
1838
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "icon" in this._cachedJsonLd) {
1756
1839
  const prop = this._cachedJsonLd["icon"];
1757
1840
  const obj = Array.isArray(prop) ? prop[i] : prop;
1758
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#icon_fromJsonLd(obj, {
1759
- ...options,
1760
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1761
- });
1841
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
1842
+ v = await this.#icon_fromJsonLd(obj, {
1843
+ ...options,
1844
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1845
+ });
1846
+ } catch (error) {
1847
+ if (!options.suppressError) throw error;
1848
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
1849
+ property: "https://www.w3.org/ns/activitystreams#icon",
1850
+ index: i,
1851
+ error
1852
+ });
1853
+ continue;
1854
+ }
1762
1855
  }
1763
1856
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_33CjRLy5ujtsUrwRSCrsggvGdKuR_icon.has(0)) {
1764
1857
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -1897,10 +1990,19 @@ var Object$1 = class Object$1 {
1897
1990
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "image" in this._cachedJsonLd) {
1898
1991
  const prop = this._cachedJsonLd["image"];
1899
1992
  const doc = Array.isArray(prop) ? prop[0] : prop;
1900
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#image_fromJsonLd(doc, {
1901
- ...options,
1902
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1903
- });
1993
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
1994
+ v = await this.#image_fromJsonLd(doc, {
1995
+ ...options,
1996
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1997
+ });
1998
+ } catch (error) {
1999
+ if (!options.suppressError) throw error;
2000
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
2001
+ property: "https://www.w3.org/ns/activitystreams#image",
2002
+ error
2003
+ });
2004
+ return null;
2005
+ }
1904
2006
  }
1905
2007
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3dXrUdkARxwyJLtJcYi1AJ92H41U_image.has(0)) {
1906
2008
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -1943,10 +2045,20 @@ var Object$1 = class Object$1 {
1943
2045
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "image" in this._cachedJsonLd) {
1944
2046
  const prop = this._cachedJsonLd["image"];
1945
2047
  const obj = Array.isArray(prop) ? prop[i] : prop;
1946
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#image_fromJsonLd(obj, {
1947
- ...options,
1948
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
1949
- });
2048
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
2049
+ v = await this.#image_fromJsonLd(obj, {
2050
+ ...options,
2051
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2052
+ });
2053
+ } catch (error) {
2054
+ if (!options.suppressError) throw error;
2055
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
2056
+ property: "https://www.w3.org/ns/activitystreams#image",
2057
+ index: i,
2058
+ error
2059
+ });
2060
+ continue;
2061
+ }
1950
2062
  }
1951
2063
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3dXrUdkARxwyJLtJcYi1AJ92H41U_image.has(0)) {
1952
2064
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -2078,10 +2190,19 @@ var Object$1 = class Object$1 {
2078
2190
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "inReplyTo" in this._cachedJsonLd) {
2079
2191
  const prop = this._cachedJsonLd["inReplyTo"];
2080
2192
  const doc = Array.isArray(prop) ? prop[0] : prop;
2081
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#replyTarget_fromJsonLd(doc, {
2082
- ...options,
2083
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2084
- });
2193
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
2194
+ v = await this.#replyTarget_fromJsonLd(doc, {
2195
+ ...options,
2196
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2197
+ });
2198
+ } catch (error) {
2199
+ if (!options.suppressError) throw error;
2200
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
2201
+ property: "https://www.w3.org/ns/activitystreams#inReplyTo",
2202
+ error
2203
+ });
2204
+ return null;
2205
+ }
2085
2206
  }
2086
2207
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3fpbDrvZgf3Kq1a5V9aByFn8kx3s_inReplyTo.has(0)) {
2087
2208
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -2123,10 +2244,20 @@ var Object$1 = class Object$1 {
2123
2244
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "inReplyTo" in this._cachedJsonLd) {
2124
2245
  const prop = this._cachedJsonLd["inReplyTo"];
2125
2246
  const obj = Array.isArray(prop) ? prop[i] : prop;
2126
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#replyTarget_fromJsonLd(obj, {
2127
- ...options,
2128
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2129
- });
2247
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
2248
+ v = await this.#replyTarget_fromJsonLd(obj, {
2249
+ ...options,
2250
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2251
+ });
2252
+ } catch (error) {
2253
+ if (!options.suppressError) throw error;
2254
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
2255
+ property: "https://www.w3.org/ns/activitystreams#inReplyTo",
2256
+ index: i,
2257
+ error
2258
+ });
2259
+ continue;
2260
+ }
2130
2261
  }
2131
2262
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3fpbDrvZgf3Kq1a5V9aByFn8kx3s_inReplyTo.has(0)) {
2132
2263
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -2258,10 +2389,19 @@ var Object$1 = class Object$1 {
2258
2389
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "location" in this._cachedJsonLd) {
2259
2390
  const prop = this._cachedJsonLd["location"];
2260
2391
  const doc = Array.isArray(prop) ? prop[0] : prop;
2261
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#location_fromJsonLd(doc, {
2262
- ...options,
2263
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2264
- });
2392
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
2393
+ v = await this.#location_fromJsonLd(doc, {
2394
+ ...options,
2395
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2396
+ });
2397
+ } catch (error) {
2398
+ if (!options.suppressError) throw error;
2399
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
2400
+ property: "https://www.w3.org/ns/activitystreams#location",
2401
+ error
2402
+ });
2403
+ return null;
2404
+ }
2265
2405
  }
2266
2406
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_31k5MUZJsnsPNg8dQQJieWaXTFnR_location.has(0)) {
2267
2407
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -2303,10 +2443,20 @@ var Object$1 = class Object$1 {
2303
2443
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "location" in this._cachedJsonLd) {
2304
2444
  const prop = this._cachedJsonLd["location"];
2305
2445
  const obj = Array.isArray(prop) ? prop[i] : prop;
2306
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#location_fromJsonLd(obj, {
2307
- ...options,
2308
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2309
- });
2446
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
2447
+ v = await this.#location_fromJsonLd(obj, {
2448
+ ...options,
2449
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2450
+ });
2451
+ } catch (error) {
2452
+ if (!options.suppressError) throw error;
2453
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
2454
+ property: "https://www.w3.org/ns/activitystreams#location",
2455
+ index: i,
2456
+ error
2457
+ });
2458
+ continue;
2459
+ }
2310
2460
  }
2311
2461
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_31k5MUZJsnsPNg8dQQJieWaXTFnR_location.has(0)) {
2312
2462
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -2437,10 +2587,19 @@ var Object$1 = class Object$1 {
2437
2587
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "preview" in this._cachedJsonLd) {
2438
2588
  const prop = this._cachedJsonLd["preview"];
2439
2589
  const doc = Array.isArray(prop) ? prop[0] : prop;
2440
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#preview_fromJsonLd(doc, {
2441
- ...options,
2442
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2443
- });
2590
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
2591
+ v = await this.#preview_fromJsonLd(doc, {
2592
+ ...options,
2593
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2594
+ });
2595
+ } catch (error) {
2596
+ if (!options.suppressError) throw error;
2597
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
2598
+ property: "https://www.w3.org/ns/activitystreams#preview",
2599
+ error
2600
+ });
2601
+ return null;
2602
+ }
2444
2603
  }
2445
2604
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_gCVTegXxWWCw6wWRxa1QF65zusg_preview.has(0)) {
2446
2605
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -2481,10 +2640,20 @@ var Object$1 = class Object$1 {
2481
2640
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "preview" in this._cachedJsonLd) {
2482
2641
  const prop = this._cachedJsonLd["preview"];
2483
2642
  const obj = Array.isArray(prop) ? prop[i] : prop;
2484
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#preview_fromJsonLd(obj, {
2485
- ...options,
2486
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2487
- });
2643
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
2644
+ v = await this.#preview_fromJsonLd(obj, {
2645
+ ...options,
2646
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2647
+ });
2648
+ } catch (error) {
2649
+ if (!options.suppressError) throw error;
2650
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
2651
+ property: "https://www.w3.org/ns/activitystreams#preview",
2652
+ index: i,
2653
+ error
2654
+ });
2655
+ continue;
2656
+ }
2488
2657
  }
2489
2658
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_gCVTegXxWWCw6wWRxa1QF65zusg_preview.has(0)) {
2490
2659
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -2613,10 +2782,19 @@ var Object$1 = class Object$1 {
2613
2782
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "replies" in this._cachedJsonLd) {
2614
2783
  const prop = this._cachedJsonLd["replies"];
2615
2784
  const doc = Array.isArray(prop) ? prop[0] : prop;
2616
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#replies_fromJsonLd(doc, {
2617
- ...options,
2618
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2619
- });
2785
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
2786
+ v = await this.#replies_fromJsonLd(doc, {
2787
+ ...options,
2788
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2789
+ });
2790
+ } catch (error) {
2791
+ if (!options.suppressError) throw error;
2792
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
2793
+ property: "https://www.w3.org/ns/activitystreams#replies",
2794
+ error
2795
+ });
2796
+ return null;
2797
+ }
2620
2798
  }
2621
2799
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_7UpwM3JWcXhADcscukEehBorf6k_replies.has(0)) {
2622
2800
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -2743,10 +2921,19 @@ var Object$1 = class Object$1 {
2743
2921
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "shares" in this._cachedJsonLd) {
2744
2922
  const prop = this._cachedJsonLd["shares"];
2745
2923
  const doc = Array.isArray(prop) ? prop[0] : prop;
2746
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#shares_fromJsonLd(doc, {
2747
- ...options,
2748
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2749
- });
2924
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
2925
+ v = await this.#shares_fromJsonLd(doc, {
2926
+ ...options,
2927
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2928
+ });
2929
+ } catch (error) {
2930
+ if (!options.suppressError) throw error;
2931
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
2932
+ property: "https://www.w3.org/ns/activitystreams#shares",
2933
+ error
2934
+ });
2935
+ return null;
2936
+ }
2750
2937
  }
2751
2938
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3kAfck9PcEYt2L7xug5y99YPbANs_shares.has(0)) {
2752
2939
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -2873,10 +3060,19 @@ var Object$1 = class Object$1 {
2873
3060
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "likes" in this._cachedJsonLd) {
2874
3061
  const prop = this._cachedJsonLd["likes"];
2875
3062
  const doc = Array.isArray(prop) ? prop[0] : prop;
2876
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#likes_fromJsonLd(doc, {
2877
- ...options,
2878
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
2879
- });
3063
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
3064
+ v = await this.#likes_fromJsonLd(doc, {
3065
+ ...options,
3066
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3067
+ });
3068
+ } catch (error) {
3069
+ if (!options.suppressError) throw error;
3070
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
3071
+ property: "https://www.w3.org/ns/activitystreams#likes",
3072
+ error
3073
+ });
3074
+ return null;
3075
+ }
2880
3076
  }
2881
3077
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_S3ceDnpMdzoTRCccB9FkJWrEzYW_likes.has(0)) {
2882
3078
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -2997,10 +3193,19 @@ var Object$1 = class Object$1 {
2997
3193
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "emojiReactions" in this._cachedJsonLd) {
2998
3194
  const prop = this._cachedJsonLd["emojiReactions"];
2999
3195
  const doc = Array.isArray(prop) ? prop[0] : prop;
3000
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#emojiReactions_fromJsonLd(doc, {
3001
- ...options,
3002
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3003
- });
3196
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
3197
+ v = await this.#emojiReactions_fromJsonLd(doc, {
3198
+ ...options,
3199
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3200
+ });
3201
+ } catch (error) {
3202
+ if (!options.suppressError) throw error;
3203
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
3204
+ property: "http://fedibird.com/ns#emojiReactions",
3205
+ error
3206
+ });
3207
+ return null;
3208
+ }
3004
3209
  }
3005
3210
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_kMatyyNAuxoTD8GQMBfA5ogThMR_emojiReactions.has(0)) {
3006
3211
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -3156,10 +3361,20 @@ var Object$1 = class Object$1 {
3156
3361
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "tag" in this._cachedJsonLd) {
3157
3362
  const prop = this._cachedJsonLd["tag"];
3158
3363
  const obj = Array.isArray(prop) ? prop[i] : prop;
3159
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#tag_fromJsonLd(obj, {
3160
- ...options,
3161
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3162
- });
3364
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
3365
+ v = await this.#tag_fromJsonLd(obj, {
3366
+ ...options,
3367
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3368
+ });
3369
+ } catch (error) {
3370
+ if (!options.suppressError) throw error;
3371
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
3372
+ property: "https://www.w3.org/ns/activitystreams#tag",
3373
+ index: i,
3374
+ error
3375
+ });
3376
+ continue;
3377
+ }
3163
3378
  }
3164
3379
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_5chuqj6s95p5gg2sk1HntGfarRf_tag.has(0)) {
3165
3380
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -3300,10 +3515,19 @@ var Object$1 = class Object$1 {
3300
3515
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "to" in this._cachedJsonLd) {
3301
3516
  const prop = this._cachedJsonLd["to"];
3302
3517
  const doc = Array.isArray(prop) ? prop[0] : prop;
3303
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#to_fromJsonLd(doc, {
3304
- ...options,
3305
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3306
- });
3518
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
3519
+ v = await this.#to_fromJsonLd(doc, {
3520
+ ...options,
3521
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3522
+ });
3523
+ } catch (error) {
3524
+ if (!options.suppressError) throw error;
3525
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
3526
+ property: "https://www.w3.org/ns/activitystreams#to",
3527
+ error
3528
+ });
3529
+ return null;
3530
+ }
3307
3531
  }
3308
3532
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3hFbw7DTpHhq3cvVhkY8njhcsXbd_to.has(0)) {
3309
3533
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -3345,10 +3569,20 @@ var Object$1 = class Object$1 {
3345
3569
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "to" in this._cachedJsonLd) {
3346
3570
  const prop = this._cachedJsonLd["to"];
3347
3571
  const obj = Array.isArray(prop) ? prop[i] : prop;
3348
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#to_fromJsonLd(obj, {
3349
- ...options,
3350
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3351
- });
3572
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
3573
+ v = await this.#to_fromJsonLd(obj, {
3574
+ ...options,
3575
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3576
+ });
3577
+ } catch (error) {
3578
+ if (!options.suppressError) throw error;
3579
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
3580
+ property: "https://www.w3.org/ns/activitystreams#to",
3581
+ index: i,
3582
+ error
3583
+ });
3584
+ continue;
3585
+ }
3352
3586
  }
3353
3587
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3hFbw7DTpHhq3cvVhkY8njhcsXbd_to.has(0)) {
3354
3588
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -3470,10 +3704,19 @@ var Object$1 = class Object$1 {
3470
3704
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "bto" in this._cachedJsonLd) {
3471
3705
  const prop = this._cachedJsonLd["bto"];
3472
3706
  const doc = Array.isArray(prop) ? prop[0] : prop;
3473
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#bto_fromJsonLd(doc, {
3474
- ...options,
3475
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3476
- });
3707
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
3708
+ v = await this.#bto_fromJsonLd(doc, {
3709
+ ...options,
3710
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3711
+ });
3712
+ } catch (error) {
3713
+ if (!options.suppressError) throw error;
3714
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
3715
+ property: "https://www.w3.org/ns/activitystreams#bto",
3716
+ error
3717
+ });
3718
+ return null;
3719
+ }
3477
3720
  }
3478
3721
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_aLZupjwL8XB7tzdLgCMXdjZ6qej_bto.has(0)) {
3479
3722
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -3515,10 +3758,20 @@ var Object$1 = class Object$1 {
3515
3758
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "bto" in this._cachedJsonLd) {
3516
3759
  const prop = this._cachedJsonLd["bto"];
3517
3760
  const obj = Array.isArray(prop) ? prop[i] : prop;
3518
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#bto_fromJsonLd(obj, {
3519
- ...options,
3520
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3521
- });
3761
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
3762
+ v = await this.#bto_fromJsonLd(obj, {
3763
+ ...options,
3764
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3765
+ });
3766
+ } catch (error) {
3767
+ if (!options.suppressError) throw error;
3768
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
3769
+ property: "https://www.w3.org/ns/activitystreams#bto",
3770
+ index: i,
3771
+ error
3772
+ });
3773
+ continue;
3774
+ }
3522
3775
  }
3523
3776
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_aLZupjwL8XB7tzdLgCMXdjZ6qej_bto.has(0)) {
3524
3777
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -3640,10 +3893,19 @@ var Object$1 = class Object$1 {
3640
3893
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "cc" in this._cachedJsonLd) {
3641
3894
  const prop = this._cachedJsonLd["cc"];
3642
3895
  const doc = Array.isArray(prop) ? prop[0] : prop;
3643
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#cc_fromJsonLd(doc, {
3644
- ...options,
3645
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3646
- });
3896
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
3897
+ v = await this.#cc_fromJsonLd(doc, {
3898
+ ...options,
3899
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3900
+ });
3901
+ } catch (error) {
3902
+ if (!options.suppressError) throw error;
3903
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
3904
+ property: "https://www.w3.org/ns/activitystreams#cc",
3905
+ error
3906
+ });
3907
+ return null;
3908
+ }
3647
3909
  }
3648
3910
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_42a1SvBs24QSLzKcfjCyNTjW5a1g_cc.has(0)) {
3649
3911
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -3685,10 +3947,20 @@ var Object$1 = class Object$1 {
3685
3947
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "cc" in this._cachedJsonLd) {
3686
3948
  const prop = this._cachedJsonLd["cc"];
3687
3949
  const obj = Array.isArray(prop) ? prop[i] : prop;
3688
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#cc_fromJsonLd(obj, {
3689
- ...options,
3690
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3691
- });
3950
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
3951
+ v = await this.#cc_fromJsonLd(obj, {
3952
+ ...options,
3953
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3954
+ });
3955
+ } catch (error) {
3956
+ if (!options.suppressError) throw error;
3957
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
3958
+ property: "https://www.w3.org/ns/activitystreams#cc",
3959
+ index: i,
3960
+ error
3961
+ });
3962
+ continue;
3963
+ }
3692
3964
  }
3693
3965
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_42a1SvBs24QSLzKcfjCyNTjW5a1g_cc.has(0)) {
3694
3966
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -3810,10 +4082,19 @@ var Object$1 = class Object$1 {
3810
4082
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "bcc" in this._cachedJsonLd) {
3811
4083
  const prop = this._cachedJsonLd["bcc"];
3812
4084
  const doc = Array.isArray(prop) ? prop[0] : prop;
3813
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#bcc_fromJsonLd(doc, {
3814
- ...options,
3815
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3816
- });
4085
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
4086
+ v = await this.#bcc_fromJsonLd(doc, {
4087
+ ...options,
4088
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
4089
+ });
4090
+ } catch (error) {
4091
+ if (!options.suppressError) throw error;
4092
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
4093
+ property: "https://www.w3.org/ns/activitystreams#bcc",
4094
+ error
4095
+ });
4096
+ return null;
4097
+ }
3817
4098
  }
3818
4099
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc.has(0)) {
3819
4100
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -3855,10 +4136,20 @@ var Object$1 = class Object$1 {
3855
4136
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "bcc" in this._cachedJsonLd) {
3856
4137
  const prop = this._cachedJsonLd["bcc"];
3857
4138
  const obj = Array.isArray(prop) ? prop[i] : prop;
3858
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#bcc_fromJsonLd(obj, {
3859
- ...options,
3860
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
3861
- });
4139
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
4140
+ v = await this.#bcc_fromJsonLd(obj, {
4141
+ ...options,
4142
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
4143
+ });
4144
+ } catch (error) {
4145
+ if (!options.suppressError) throw error;
4146
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
4147
+ property: "https://www.w3.org/ns/activitystreams#bcc",
4148
+ index: i,
4149
+ error
4150
+ });
4151
+ continue;
4152
+ }
3862
4153
  }
3863
4154
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc.has(0)) {
3864
4155
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -4016,10 +4307,19 @@ var Object$1 = class Object$1 {
4016
4307
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "proof" in this._cachedJsonLd) {
4017
4308
  const prop = this._cachedJsonLd["proof"];
4018
4309
  const doc = Array.isArray(prop) ? prop[0] : prop;
4019
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#proof_fromJsonLd(doc, {
4020
- ...options,
4021
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
4022
- });
4310
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
4311
+ v = await this.#proof_fromJsonLd(doc, {
4312
+ ...options,
4313
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
4314
+ });
4315
+ } catch (error) {
4316
+ if (!options.suppressError) throw error;
4317
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
4318
+ property: "https://w3id.org/security#proof",
4319
+ error
4320
+ });
4321
+ return null;
4322
+ }
4023
4323
  }
4024
4324
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.has(0)) {
4025
4325
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -4060,10 +4360,20 @@ var Object$1 = class Object$1 {
4060
4360
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "proof" in this._cachedJsonLd) {
4061
4361
  const prop = this._cachedJsonLd["proof"];
4062
4362
  const obj = Array.isArray(prop) ? prop[i] : prop;
4063
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#proof_fromJsonLd(obj, {
4064
- ...options,
4065
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
4066
- });
4363
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
4364
+ v = await this.#proof_fromJsonLd(obj, {
4365
+ ...options,
4366
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
4367
+ });
4368
+ } catch (error) {
4369
+ if (!options.suppressError) throw error;
4370
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
4371
+ property: "https://w3id.org/security#proof",
4372
+ index: i,
4373
+ error
4374
+ });
4375
+ continue;
4376
+ }
4067
4377
  }
4068
4378
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.has(0)) {
4069
4379
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -4210,10 +4520,19 @@ var Object$1 = class Object$1 {
4210
4520
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "likeAuthorization" in this._cachedJsonLd) {
4211
4521
  const prop = this._cachedJsonLd["likeAuthorization"];
4212
4522
  const doc = Array.isArray(prop) ? prop[0] : prop;
4213
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#likeAuthorization_fromJsonLd(doc, {
4214
- ...options,
4215
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
4216
- });
4523
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
4524
+ v = await this.#likeAuthorization_fromJsonLd(doc, {
4525
+ ...options,
4526
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
4527
+ });
4528
+ } catch (error) {
4529
+ if (!options.suppressError) throw error;
4530
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
4531
+ property: "https://gotosocial.org/ns#likeAuthorization",
4532
+ error
4533
+ });
4534
+ return null;
4535
+ }
4217
4536
  }
4218
4537
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3fCeb5aXaDDd4fvkQ96BLWifBUBa_likeAuthorization.has(0)) {
4219
4538
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -4334,10 +4653,19 @@ var Object$1 = class Object$1 {
4334
4653
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "replyAuthorization" in this._cachedJsonLd) {
4335
4654
  const prop = this._cachedJsonLd["replyAuthorization"];
4336
4655
  const doc = Array.isArray(prop) ? prop[0] : prop;
4337
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#replyAuthorization_fromJsonLd(doc, {
4338
- ...options,
4339
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
4340
- });
4656
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
4657
+ v = await this.#replyAuthorization_fromJsonLd(doc, {
4658
+ ...options,
4659
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
4660
+ });
4661
+ } catch (error) {
4662
+ if (!options.suppressError) throw error;
4663
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
4664
+ property: "https://gotosocial.org/ns#replyAuthorization",
4665
+ error
4666
+ });
4667
+ return null;
4668
+ }
4341
4669
  }
4342
4670
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_YA4wdUW7rYztAQ6SjhMnJCmcmtP_replyAuthorization.has(0)) {
4343
4671
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -4458,10 +4786,19 @@ var Object$1 = class Object$1 {
4458
4786
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "announceAuthorization" in this._cachedJsonLd) {
4459
4787
  const prop = this._cachedJsonLd["announceAuthorization"];
4460
4788
  const doc = Array.isArray(prop) ? prop[0] : prop;
4461
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#announceAuthorization_fromJsonLd(doc, {
4462
- ...options,
4463
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
4464
- });
4789
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
4790
+ v = await this.#announceAuthorization_fromJsonLd(doc, {
4791
+ ...options,
4792
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
4793
+ });
4794
+ } catch (error) {
4795
+ if (!options.suppressError) throw error;
4796
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
4797
+ property: "https://gotosocial.org/ns#announceAuthorization",
4798
+ error
4799
+ });
4800
+ return null;
4801
+ }
4465
4802
  }
4466
4803
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_446xEaDBs3Fz6MyzP3PSBaLupkbJ_announceAuthorization.has(0)) {
4467
4804
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -7092,10 +7429,19 @@ var ChatMessage = class ChatMessage extends Object$1 {
7092
7429
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "quote" in this._cachedJsonLd) {
7093
7430
  const prop = this._cachedJsonLd["quote"];
7094
7431
  const doc = Array.isArray(prop) ? prop[0] : prop;
7095
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#quote_fromJsonLd(doc, {
7096
- ...options,
7097
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
7098
- });
7432
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
7433
+ v = await this.#quote_fromJsonLd(doc, {
7434
+ ...options,
7435
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
7436
+ });
7437
+ } catch (error) {
7438
+ if (!options.suppressError) throw error;
7439
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
7440
+ property: "https://w3id.org/fep/044f#quote",
7441
+ error
7442
+ });
7443
+ return null;
7444
+ }
7099
7445
  }
7100
7446
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3obhVLFML2Fh2Qsbg3BM2dec8S9e_quote.has(0)) {
7101
7447
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -7232,10 +7578,19 @@ var ChatMessage = class ChatMessage extends Object$1 {
7232
7578
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "quoteAuthorization" in this._cachedJsonLd) {
7233
7579
  const prop = this._cachedJsonLd["quoteAuthorization"];
7234
7580
  const doc = Array.isArray(prop) ? prop[0] : prop;
7235
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#quoteAuthorization_fromJsonLd(doc, {
7236
- ...options,
7237
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
7238
- });
7581
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
7582
+ v = await this.#quoteAuthorization_fromJsonLd(doc, {
7583
+ ...options,
7584
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
7585
+ });
7586
+ } catch (error) {
7587
+ if (!options.suppressError) throw error;
7588
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
7589
+ property: "https://w3id.org/fep/044f#quoteAuthorization",
7590
+ error
7591
+ });
7592
+ return null;
7593
+ }
7239
7594
  }
7240
7595
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_ZKAEiJeuEvjeYkC4pG58D5vAJ4m_quoteAuthorization.has(0)) {
7241
7596
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -7488,7 +7843,7 @@ var ChatMessage = class ChatMessage extends Object$1 {
7488
7843
  if (_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null || _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length < 1) _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["http://fedibird.com/ns#quoteUri"];
7489
7844
  for (const v of _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null ? [] : _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length === 1 && "@list" in _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array[0] ? _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array[0]["@list"] : _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array) {
7490
7845
  if (v == null) continue;
7491
- const decoded = new URL(v["@value"]);
7846
+ const decoded = typeof v === "object" && (typeof v["@id"] === "string" && canDecodeIri(v["@id"]) || typeof v["@value"] === "string" && canDecodeIri(v["@value"])) ? decodeIri(typeof v["@id"] === "string" ? v["@id"] : v["@value"]) : void 0;
7492
7847
  if (typeof decoded === "undefined") {
7493
7848
  shouldCacheJsonLd = false;
7494
7849
  continue;
@@ -7908,10 +8263,19 @@ var Activity = class Activity extends Object$1 {
7908
8263
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "actor" in this._cachedJsonLd) {
7909
8264
  const prop = this._cachedJsonLd["actor"];
7910
8265
  const doc = Array.isArray(prop) ? prop[0] : prop;
7911
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#actor_fromJsonLd(doc, {
7912
- ...options,
7913
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
7914
- });
8266
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
8267
+ v = await this.#actor_fromJsonLd(doc, {
8268
+ ...options,
8269
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8270
+ });
8271
+ } catch (error) {
8272
+ if (!options.suppressError) throw error;
8273
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
8274
+ property: "https://www.w3.org/ns/activitystreams#actor",
8275
+ error
8276
+ });
8277
+ return null;
8278
+ }
7915
8279
  }
7916
8280
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor.has(0)) {
7917
8281
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -7954,10 +8318,20 @@ var Activity = class Activity extends Object$1 {
7954
8318
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "actor" in this._cachedJsonLd) {
7955
8319
  const prop = this._cachedJsonLd["actor"];
7956
8320
  const obj = Array.isArray(prop) ? prop[i] : prop;
7957
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#actor_fromJsonLd(obj, {
7958
- ...options,
7959
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
7960
- });
8321
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
8322
+ v = await this.#actor_fromJsonLd(obj, {
8323
+ ...options,
8324
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8325
+ });
8326
+ } catch (error) {
8327
+ if (!options.suppressError) throw error;
8328
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
8329
+ property: "https://www.w3.org/ns/activitystreams#actor",
8330
+ index: i,
8331
+ error
8332
+ });
8333
+ continue;
8334
+ }
7961
8335
  }
7962
8336
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor.has(0)) {
7963
8337
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -8080,10 +8454,19 @@ var Activity = class Activity extends Object$1 {
8080
8454
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "object" in this._cachedJsonLd) {
8081
8455
  const prop = this._cachedJsonLd["object"];
8082
8456
  const doc = Array.isArray(prop) ? prop[0] : prop;
8083
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#object_fromJsonLd(doc, {
8084
- ...options,
8085
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8086
- });
8457
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
8458
+ v = await this.#object_fromJsonLd(doc, {
8459
+ ...options,
8460
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8461
+ });
8462
+ } catch (error) {
8463
+ if (!options.suppressError) throw error;
8464
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
8465
+ property: "https://www.w3.org/ns/activitystreams#object",
8466
+ error
8467
+ });
8468
+ return null;
8469
+ }
8087
8470
  }
8088
8471
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.has(0)) {
8089
8472
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -8126,10 +8509,20 @@ var Activity = class Activity extends Object$1 {
8126
8509
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "object" in this._cachedJsonLd) {
8127
8510
  const prop = this._cachedJsonLd["object"];
8128
8511
  const obj = Array.isArray(prop) ? prop[i] : prop;
8129
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#object_fromJsonLd(obj, {
8130
- ...options,
8131
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8132
- });
8512
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
8513
+ v = await this.#object_fromJsonLd(obj, {
8514
+ ...options,
8515
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8516
+ });
8517
+ } catch (error) {
8518
+ if (!options.suppressError) throw error;
8519
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
8520
+ property: "https://www.w3.org/ns/activitystreams#object",
8521
+ index: i,
8522
+ error
8523
+ });
8524
+ continue;
8525
+ }
8133
8526
  }
8134
8527
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.has(0)) {
8135
8528
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -8255,10 +8648,19 @@ var Activity = class Activity extends Object$1 {
8255
8648
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "target" in this._cachedJsonLd) {
8256
8649
  const prop = this._cachedJsonLd["target"];
8257
8650
  const doc = Array.isArray(prop) ? prop[0] : prop;
8258
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#target_fromJsonLd(doc, {
8259
- ...options,
8260
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8261
- });
8651
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
8652
+ v = await this.#target_fromJsonLd(doc, {
8653
+ ...options,
8654
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8655
+ });
8656
+ } catch (error) {
8657
+ if (!options.suppressError) throw error;
8658
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
8659
+ property: "https://www.w3.org/ns/activitystreams#target",
8660
+ error
8661
+ });
8662
+ return null;
8663
+ }
8262
8664
  }
8263
8665
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target.has(0)) {
8264
8666
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -8304,10 +8706,20 @@ var Activity = class Activity extends Object$1 {
8304
8706
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "target" in this._cachedJsonLd) {
8305
8707
  const prop = this._cachedJsonLd["target"];
8306
8708
  const obj = Array.isArray(prop) ? prop[i] : prop;
8307
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#target_fromJsonLd(obj, {
8308
- ...options,
8309
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8310
- });
8709
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
8710
+ v = await this.#target_fromJsonLd(obj, {
8711
+ ...options,
8712
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8713
+ });
8714
+ } catch (error) {
8715
+ if (!options.suppressError) throw error;
8716
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
8717
+ property: "https://www.w3.org/ns/activitystreams#target",
8718
+ index: i,
8719
+ error
8720
+ });
8721
+ continue;
8722
+ }
8311
8723
  }
8312
8724
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target.has(0)) {
8313
8725
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -8430,10 +8842,19 @@ var Activity = class Activity extends Object$1 {
8430
8842
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "result" in this._cachedJsonLd) {
8431
8843
  const prop = this._cachedJsonLd["result"];
8432
8844
  const doc = Array.isArray(prop) ? prop[0] : prop;
8433
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#result_fromJsonLd(doc, {
8434
- ...options,
8435
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8436
- });
8845
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
8846
+ v = await this.#result_fromJsonLd(doc, {
8847
+ ...options,
8848
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8849
+ });
8850
+ } catch (error) {
8851
+ if (!options.suppressError) throw error;
8852
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
8853
+ property: "https://www.w3.org/ns/activitystreams#result",
8854
+ error
8855
+ });
8856
+ return null;
8857
+ }
8437
8858
  }
8438
8859
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_u4QGFbRFcYmPEKGbPv1hpBR9r5G_result.has(0)) {
8439
8860
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -8476,10 +8897,20 @@ var Activity = class Activity extends Object$1 {
8476
8897
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "result" in this._cachedJsonLd) {
8477
8898
  const prop = this._cachedJsonLd["result"];
8478
8899
  const obj = Array.isArray(prop) ? prop[i] : prop;
8479
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#result_fromJsonLd(obj, {
8480
- ...options,
8481
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8482
- });
8900
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
8901
+ v = await this.#result_fromJsonLd(obj, {
8902
+ ...options,
8903
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8904
+ });
8905
+ } catch (error) {
8906
+ if (!options.suppressError) throw error;
8907
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
8908
+ property: "https://www.w3.org/ns/activitystreams#result",
8909
+ index: i,
8910
+ error
8911
+ });
8912
+ continue;
8913
+ }
8483
8914
  }
8484
8915
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_u4QGFbRFcYmPEKGbPv1hpBR9r5G_result.has(0)) {
8485
8916
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -8603,10 +9034,19 @@ var Activity = class Activity extends Object$1 {
8603
9034
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "origin" in this._cachedJsonLd) {
8604
9035
  const prop = this._cachedJsonLd["origin"];
8605
9036
  const doc = Array.isArray(prop) ? prop[0] : prop;
8606
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#origin_fromJsonLd(doc, {
8607
- ...options,
8608
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8609
- });
9037
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
9038
+ v = await this.#origin_fromJsonLd(doc, {
9039
+ ...options,
9040
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
9041
+ });
9042
+ } catch (error) {
9043
+ if (!options.suppressError) throw error;
9044
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
9045
+ property: "https://www.w3.org/ns/activitystreams#origin",
9046
+ error
9047
+ });
9048
+ return null;
9049
+ }
8610
9050
  }
8611
9051
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_25zu2s3VxVujgEKqrDycjE284XQR_origin.has(0)) {
8612
9052
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -8650,10 +9090,20 @@ var Activity = class Activity extends Object$1 {
8650
9090
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "origin" in this._cachedJsonLd) {
8651
9091
  const prop = this._cachedJsonLd["origin"];
8652
9092
  const obj = Array.isArray(prop) ? prop[i] : prop;
8653
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#origin_fromJsonLd(obj, {
8654
- ...options,
8655
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8656
- });
9093
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
9094
+ v = await this.#origin_fromJsonLd(obj, {
9095
+ ...options,
9096
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
9097
+ });
9098
+ } catch (error) {
9099
+ if (!options.suppressError) throw error;
9100
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
9101
+ property: "https://www.w3.org/ns/activitystreams#origin",
9102
+ index: i,
9103
+ error
9104
+ });
9105
+ continue;
9106
+ }
8657
9107
  }
8658
9108
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_25zu2s3VxVujgEKqrDycjE284XQR_origin.has(0)) {
8659
9109
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -8775,10 +9225,19 @@ var Activity = class Activity extends Object$1 {
8775
9225
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "instrument" in this._cachedJsonLd) {
8776
9226
  const prop = this._cachedJsonLd["instrument"];
8777
9227
  const doc = Array.isArray(prop) ? prop[0] : prop;
8778
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#instrument_fromJsonLd(doc, {
8779
- ...options,
8780
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8781
- });
9228
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
9229
+ v = await this.#instrument_fromJsonLd(doc, {
9230
+ ...options,
9231
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
9232
+ });
9233
+ } catch (error) {
9234
+ if (!options.suppressError) throw error;
9235
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
9236
+ property: "https://www.w3.org/ns/activitystreams#instrument",
9237
+ error
9238
+ });
9239
+ return null;
9240
+ }
8782
9241
  }
8783
9242
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument.has(0)) {
8784
9243
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -8820,10 +9279,20 @@ var Activity = class Activity extends Object$1 {
8820
9279
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "instrument" in this._cachedJsonLd) {
8821
9280
  const prop = this._cachedJsonLd["instrument"];
8822
9281
  const obj = Array.isArray(prop) ? prop[i] : prop;
8823
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#instrument_fromJsonLd(obj, {
8824
- ...options,
8825
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
8826
- });
9282
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
9283
+ v = await this.#instrument_fromJsonLd(obj, {
9284
+ ...options,
9285
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
9286
+ });
9287
+ } catch (error) {
9288
+ if (!options.suppressError) throw error;
9289
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
9290
+ property: "https://www.w3.org/ns/activitystreams#instrument",
9291
+ index: i,
9292
+ error
9293
+ });
9294
+ continue;
9295
+ }
8827
9296
  }
8828
9297
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument.has(0)) {
8829
9298
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -10130,10 +10599,19 @@ var AnnounceAuthorization = class AnnounceAuthorization extends Object$1 {
10130
10599
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "interactingObject" in this._cachedJsonLd) {
10131
10600
  const prop = this._cachedJsonLd["interactingObject"];
10132
10601
  const doc = Array.isArray(prop) ? prop[0] : prop;
10133
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#interactingObject_fromJsonLd(doc, {
10134
- ...options,
10135
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
10136
- });
10602
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
10603
+ v = await this.#interactingObject_fromJsonLd(doc, {
10604
+ ...options,
10605
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
10606
+ });
10607
+ } catch (error) {
10608
+ if (!options.suppressError) throw error;
10609
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
10610
+ property: "https://gotosocial.org/ns#interactingObject",
10611
+ error
10612
+ });
10613
+ return null;
10614
+ }
10137
10615
  }
10138
10616
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2114kRKbujWhxEUghdkRYYKbXTGi_interactingObject.has(0)) {
10139
10617
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -10253,10 +10731,19 @@ var AnnounceAuthorization = class AnnounceAuthorization extends Object$1 {
10253
10731
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "interactionTarget" in this._cachedJsonLd) {
10254
10732
  const prop = this._cachedJsonLd["interactionTarget"];
10255
10733
  const doc = Array.isArray(prop) ? prop[0] : prop;
10256
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#interactionTarget_fromJsonLd(doc, {
10257
- ...options,
10258
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
10259
- });
10734
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
10735
+ v = await this.#interactionTarget_fromJsonLd(doc, {
10736
+ ...options,
10737
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
10738
+ });
10739
+ } catch (error) {
10740
+ if (!options.suppressError) throw error;
10741
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
10742
+ property: "https://gotosocial.org/ns#interactionTarget",
10743
+ error
10744
+ });
10745
+ return null;
10746
+ }
10260
10747
  }
10261
10748
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2wHyG75YnN15CDMaFk3VNjByu4aL_interactionTarget.has(0)) {
10262
10749
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -11506,10 +11993,19 @@ var LikeAuthorization = class LikeAuthorization extends Object$1 {
11506
11993
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "interactingObject" in this._cachedJsonLd) {
11507
11994
  const prop = this._cachedJsonLd["interactingObject"];
11508
11995
  const doc = Array.isArray(prop) ? prop[0] : prop;
11509
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#interactingObject_fromJsonLd(doc, {
11510
- ...options,
11511
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
11512
- });
11996
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
11997
+ v = await this.#interactingObject_fromJsonLd(doc, {
11998
+ ...options,
11999
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
12000
+ });
12001
+ } catch (error) {
12002
+ if (!options.suppressError) throw error;
12003
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
12004
+ property: "https://gotosocial.org/ns#interactingObject",
12005
+ error
12006
+ });
12007
+ return null;
12008
+ }
11513
12009
  }
11514
12010
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2114kRKbujWhxEUghdkRYYKbXTGi_interactingObject.has(0)) {
11515
12011
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -11629,10 +12125,19 @@ var LikeAuthorization = class LikeAuthorization extends Object$1 {
11629
12125
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "interactionTarget" in this._cachedJsonLd) {
11630
12126
  const prop = this._cachedJsonLd["interactionTarget"];
11631
12127
  const doc = Array.isArray(prop) ? prop[0] : prop;
11632
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#interactionTarget_fromJsonLd(doc, {
11633
- ...options,
11634
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
11635
- });
12128
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
12129
+ v = await this.#interactionTarget_fromJsonLd(doc, {
12130
+ ...options,
12131
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
12132
+ });
12133
+ } catch (error) {
12134
+ if (!options.suppressError) throw error;
12135
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
12136
+ property: "https://gotosocial.org/ns#interactionTarget",
12137
+ error
12138
+ });
12139
+ return null;
12140
+ }
11636
12141
  }
11637
12142
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2wHyG75YnN15CDMaFk3VNjByu4aL_interactionTarget.has(0)) {
11638
12143
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -12196,10 +12701,19 @@ var ReplyAuthorization = class ReplyAuthorization extends Object$1 {
12196
12701
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "interactingObject" in this._cachedJsonLd) {
12197
12702
  const prop = this._cachedJsonLd["interactingObject"];
12198
12703
  const doc = Array.isArray(prop) ? prop[0] : prop;
12199
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#interactingObject_fromJsonLd(doc, {
12200
- ...options,
12201
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
12202
- });
12704
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
12705
+ v = await this.#interactingObject_fromJsonLd(doc, {
12706
+ ...options,
12707
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
12708
+ });
12709
+ } catch (error) {
12710
+ if (!options.suppressError) throw error;
12711
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
12712
+ property: "https://gotosocial.org/ns#interactingObject",
12713
+ error
12714
+ });
12715
+ return null;
12716
+ }
12203
12717
  }
12204
12718
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2114kRKbujWhxEUghdkRYYKbXTGi_interactingObject.has(0)) {
12205
12719
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -12319,10 +12833,19 @@ var ReplyAuthorization = class ReplyAuthorization extends Object$1 {
12319
12833
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "interactionTarget" in this._cachedJsonLd) {
12320
12834
  const prop = this._cachedJsonLd["interactionTarget"];
12321
12835
  const doc = Array.isArray(prop) ? prop[0] : prop;
12322
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#interactionTarget_fromJsonLd(doc, {
12323
- ...options,
12324
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
12325
- });
12836
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
12837
+ v = await this.#interactionTarget_fromJsonLd(doc, {
12838
+ ...options,
12839
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
12840
+ });
12841
+ } catch (error) {
12842
+ if (!options.suppressError) throw error;
12843
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
12844
+ property: "https://gotosocial.org/ns#interactionTarget",
12845
+ error
12846
+ });
12847
+ return null;
12848
+ }
12326
12849
  }
12327
12850
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2wHyG75YnN15CDMaFk3VNjByu4aL_interactionTarget.has(0)) {
12328
12851
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -12885,10 +13408,19 @@ var QuoteAuthorization = class QuoteAuthorization extends Object$1 {
12885
13408
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "interactingObject" in this._cachedJsonLd) {
12886
13409
  const prop = this._cachedJsonLd["interactingObject"];
12887
13410
  const doc = Array.isArray(prop) ? prop[0] : prop;
12888
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#interactingObject_fromJsonLd(doc, {
12889
- ...options,
12890
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
12891
- });
13411
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
13412
+ v = await this.#interactingObject_fromJsonLd(doc, {
13413
+ ...options,
13414
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
13415
+ });
13416
+ } catch (error) {
13417
+ if (!options.suppressError) throw error;
13418
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
13419
+ property: "https://gotosocial.org/ns#interactingObject",
13420
+ error
13421
+ });
13422
+ return null;
13423
+ }
12892
13424
  }
12893
13425
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2114kRKbujWhxEUghdkRYYKbXTGi_interactingObject.has(0)) {
12894
13426
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -13008,10 +13540,19 @@ var QuoteAuthorization = class QuoteAuthorization extends Object$1 {
13008
13540
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "interactionTarget" in this._cachedJsonLd) {
13009
13541
  const prop = this._cachedJsonLd["interactionTarget"];
13010
13542
  const doc = Array.isArray(prop) ? prop[0] : prop;
13011
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#interactionTarget_fromJsonLd(doc, {
13012
- ...options,
13013
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
13014
- });
13543
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
13544
+ v = await this.#interactionTarget_fromJsonLd(doc, {
13545
+ ...options,
13546
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
13547
+ });
13548
+ } catch (error) {
13549
+ if (!options.suppressError) throw error;
13550
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
13551
+ property: "https://gotosocial.org/ns#interactionTarget",
13552
+ error
13553
+ });
13554
+ return null;
13555
+ }
13015
13556
  }
13016
13557
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2wHyG75YnN15CDMaFk3VNjByu4aL_interactionTarget.has(0)) {
13017
13558
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -14587,10 +15128,19 @@ var CryptographicKey = class {
14587
15128
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "owner" in this._cachedJsonLd) {
14588
15129
  const prop = this._cachedJsonLd["owner"];
14589
15130
  const doc = Array.isArray(prop) ? prop[0] : prop;
14590
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#owner_fromJsonLd(doc, {
14591
- ...options,
14592
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
14593
- });
15131
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
15132
+ v = await this.#owner_fromJsonLd(doc, {
15133
+ ...options,
15134
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
15135
+ });
15136
+ } catch (error) {
15137
+ if (!options.suppressError) throw error;
15138
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
15139
+ property: "https://w3id.org/security#owner",
15140
+ error
15141
+ });
15142
+ return null;
15143
+ }
14594
15144
  }
14595
15145
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner.has(0)) {
14596
15146
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -15079,10 +15629,19 @@ var Multikey = class {
15079
15629
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "controller" in this._cachedJsonLd) {
15080
15630
  const prop = this._cachedJsonLd["controller"];
15081
15631
  const doc = Array.isArray(prop) ? prop[0] : prop;
15082
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#controller_fromJsonLd(doc, {
15083
- ...options,
15084
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
15085
- });
15632
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
15633
+ v = await this.#controller_fromJsonLd(doc, {
15634
+ ...options,
15635
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
15636
+ });
15637
+ } catch (error) {
15638
+ if (!options.suppressError) throw error;
15639
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
15640
+ property: "https://w3id.org/security#controller",
15641
+ error
15642
+ });
15643
+ return null;
15644
+ }
15086
15645
  }
15087
15646
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller.has(0)) {
15088
15647
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -17773,10 +18332,19 @@ var Application = class Application extends Object$1 {
17773
18332
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "publicKey" in this._cachedJsonLd) {
17774
18333
  const prop = this._cachedJsonLd["publicKey"];
17775
18334
  const doc = Array.isArray(prop) ? prop[0] : prop;
17776
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#publicKey_fromJsonLd(doc, {
17777
- ...options,
17778
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
17779
- });
18335
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
18336
+ v = await this.#publicKey_fromJsonLd(doc, {
18337
+ ...options,
18338
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
18339
+ });
18340
+ } catch (error) {
18341
+ if (!options.suppressError) throw error;
18342
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
18343
+ property: "https://w3id.org/security#publicKey",
18344
+ error
18345
+ });
18346
+ return null;
18347
+ }
17780
18348
  }
17781
18349
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey.has(0)) {
17782
18350
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -17817,10 +18385,20 @@ var Application = class Application extends Object$1 {
17817
18385
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "publicKey" in this._cachedJsonLd) {
17818
18386
  const prop = this._cachedJsonLd["publicKey"];
17819
18387
  const obj = Array.isArray(prop) ? prop[i] : prop;
17820
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#publicKey_fromJsonLd(obj, {
17821
- ...options,
17822
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
17823
- });
18388
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
18389
+ v = await this.#publicKey_fromJsonLd(obj, {
18390
+ ...options,
18391
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
18392
+ });
18393
+ } catch (error) {
18394
+ if (!options.suppressError) throw error;
18395
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
18396
+ property: "https://w3id.org/security#publicKey",
18397
+ index: i,
18398
+ error
18399
+ });
18400
+ continue;
18401
+ }
17824
18402
  }
17825
18403
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey.has(0)) {
17826
18404
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -17944,10 +18522,19 @@ var Application = class Application extends Object$1 {
17944
18522
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "assertionMethod" in this._cachedJsonLd) {
17945
18523
  const prop = this._cachedJsonLd["assertionMethod"];
17946
18524
  const doc = Array.isArray(prop) ? prop[0] : prop;
17947
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#assertionMethod_fromJsonLd(doc, {
17948
- ...options,
17949
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
17950
- });
18525
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
18526
+ v = await this.#assertionMethod_fromJsonLd(doc, {
18527
+ ...options,
18528
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
18529
+ });
18530
+ } catch (error) {
18531
+ if (!options.suppressError) throw error;
18532
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
18533
+ property: "https://w3id.org/security#assertionMethod",
18534
+ error
18535
+ });
18536
+ return null;
18537
+ }
17951
18538
  }
17952
18539
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.has(0)) {
17953
18540
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -17991,10 +18578,20 @@ var Application = class Application extends Object$1 {
17991
18578
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "assertionMethod" in this._cachedJsonLd) {
17992
18579
  const prop = this._cachedJsonLd["assertionMethod"];
17993
18580
  const obj = Array.isArray(prop) ? prop[i] : prop;
17994
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#assertionMethod_fromJsonLd(obj, {
17995
- ...options,
17996
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
17997
- });
18581
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
18582
+ v = await this.#assertionMethod_fromJsonLd(obj, {
18583
+ ...options,
18584
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
18585
+ });
18586
+ } catch (error) {
18587
+ if (!options.suppressError) throw error;
18588
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
18589
+ property: "https://w3id.org/security#assertionMethod",
18590
+ index: i,
18591
+ error
18592
+ });
18593
+ continue;
18594
+ }
17998
18595
  }
17999
18596
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.has(0)) {
18000
18597
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -18149,10 +18746,19 @@ var Application = class Application extends Object$1 {
18149
18746
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "inbox" in this._cachedJsonLd) {
18150
18747
  const prop = this._cachedJsonLd["inbox"];
18151
18748
  const doc = Array.isArray(prop) ? prop[0] : prop;
18152
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#inbox_fromJsonLd(doc, {
18153
- ...options,
18154
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
18155
- });
18749
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
18750
+ v = await this.#inbox_fromJsonLd(doc, {
18751
+ ...options,
18752
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
18753
+ });
18754
+ } catch (error) {
18755
+ if (!options.suppressError) throw error;
18756
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
18757
+ property: "http://www.w3.org/ns/ldp#inbox",
18758
+ error
18759
+ });
18760
+ return null;
18761
+ }
18156
18762
  }
18157
18763
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.has(0)) {
18158
18764
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -18291,10 +18897,19 @@ var Application = class Application extends Object$1 {
18291
18897
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "outbox" in this._cachedJsonLd) {
18292
18898
  const prop = this._cachedJsonLd["outbox"];
18293
18899
  const doc = Array.isArray(prop) ? prop[0] : prop;
18294
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#outbox_fromJsonLd(doc, {
18295
- ...options,
18296
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
18297
- });
18900
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
18901
+ v = await this.#outbox_fromJsonLd(doc, {
18902
+ ...options,
18903
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
18904
+ });
18905
+ } catch (error) {
18906
+ if (!options.suppressError) throw error;
18907
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
18908
+ property: "https://www.w3.org/ns/activitystreams#outbox",
18909
+ error
18910
+ });
18911
+ return null;
18912
+ }
18298
18913
  }
18299
18914
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_41QwhqJouoLg3h8dRPKat21brynC_outbox.has(0)) {
18300
18915
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -18418,10 +19033,19 @@ var Application = class Application extends Object$1 {
18418
19033
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "following" in this._cachedJsonLd) {
18419
19034
  const prop = this._cachedJsonLd["following"];
18420
19035
  const doc = Array.isArray(prop) ? prop[0] : prop;
18421
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#following_fromJsonLd(doc, {
18422
- ...options,
18423
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
18424
- });
19036
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
19037
+ v = await this.#following_fromJsonLd(doc, {
19038
+ ...options,
19039
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
19040
+ });
19041
+ } catch (error) {
19042
+ if (!options.suppressError) throw error;
19043
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
19044
+ property: "https://www.w3.org/ns/activitystreams#following",
19045
+ error
19046
+ });
19047
+ return null;
19048
+ }
18425
19049
  }
18426
19050
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.has(0)) {
18427
19051
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -18548,10 +19172,19 @@ var Application = class Application extends Object$1 {
18548
19172
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "followers" in this._cachedJsonLd) {
18549
19173
  const prop = this._cachedJsonLd["followers"];
18550
19174
  const doc = Array.isArray(prop) ? prop[0] : prop;
18551
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#followers_fromJsonLd(doc, {
18552
- ...options,
18553
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
18554
- });
19175
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
19176
+ v = await this.#followers_fromJsonLd(doc, {
19177
+ ...options,
19178
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
19179
+ });
19180
+ } catch (error) {
19181
+ if (!options.suppressError) throw error;
19182
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
19183
+ property: "https://www.w3.org/ns/activitystreams#followers",
19184
+ error
19185
+ });
19186
+ return null;
19187
+ }
18555
19188
  }
18556
19189
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.has(0)) {
18557
19190
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -18676,10 +19309,19 @@ var Application = class Application extends Object$1 {
18676
19309
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "liked" in this._cachedJsonLd) {
18677
19310
  const prop = this._cachedJsonLd["liked"];
18678
19311
  const doc = Array.isArray(prop) ? prop[0] : prop;
18679
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#liked_fromJsonLd(doc, {
18680
- ...options,
18681
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
18682
- });
19312
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
19313
+ v = await this.#liked_fromJsonLd(doc, {
19314
+ ...options,
19315
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
19316
+ });
19317
+ } catch (error) {
19318
+ if (!options.suppressError) throw error;
19319
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
19320
+ property: "https://www.w3.org/ns/activitystreams#liked",
19321
+ error
19322
+ });
19323
+ return null;
19324
+ }
18683
19325
  }
18684
19326
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.has(0)) {
18685
19327
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -18802,10 +19444,19 @@ var Application = class Application extends Object$1 {
18802
19444
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "featured" in this._cachedJsonLd) {
18803
19445
  const prop = this._cachedJsonLd["featured"];
18804
19446
  const doc = Array.isArray(prop) ? prop[0] : prop;
18805
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#featured_fromJsonLd(doc, {
18806
- ...options,
18807
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
18808
- });
19447
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
19448
+ v = await this.#featured_fromJsonLd(doc, {
19449
+ ...options,
19450
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
19451
+ });
19452
+ } catch (error) {
19453
+ if (!options.suppressError) throw error;
19454
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
19455
+ property: "http://joinmastodon.org/ns#featured",
19456
+ error
19457
+ });
19458
+ return null;
19459
+ }
18809
19460
  }
18810
19461
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4N1vBJzXDf8NbBumeECQMFvKetja_featured.has(0)) {
18811
19462
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -18928,10 +19579,19 @@ var Application = class Application extends Object$1 {
18928
19579
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "featuredTags" in this._cachedJsonLd) {
18929
19580
  const prop = this._cachedJsonLd["featuredTags"];
18930
19581
  const doc = Array.isArray(prop) ? prop[0] : prop;
18931
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#featuredTags_fromJsonLd(doc, {
18932
- ...options,
18933
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
18934
- });
19582
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
19583
+ v = await this.#featuredTags_fromJsonLd(doc, {
19584
+ ...options,
19585
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
19586
+ });
19587
+ } catch (error) {
19588
+ if (!options.suppressError) throw error;
19589
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
19590
+ property: "http://joinmastodon.org/ns#featuredTags",
19591
+ error
19592
+ });
19593
+ return null;
19594
+ }
18935
19595
  }
18936
19596
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.has(0)) {
18937
19597
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -19050,10 +19710,20 @@ var Application = class Application extends Object$1 {
19050
19710
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "streams" in this._cachedJsonLd) {
19051
19711
  const prop = this._cachedJsonLd["streams"];
19052
19712
  const obj = Array.isArray(prop) ? prop[i] : prop;
19053
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#stream_fromJsonLd(obj, {
19054
- ...options,
19055
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
19056
- });
19713
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
19714
+ v = await this.#stream_fromJsonLd(obj, {
19715
+ ...options,
19716
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
19717
+ });
19718
+ } catch (error) {
19719
+ if (!options.suppressError) throw error;
19720
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
19721
+ property: "https://www.w3.org/ns/activitystreams#streams",
19722
+ index: i,
19723
+ error
19724
+ });
19725
+ continue;
19726
+ }
19057
19727
  }
19058
19728
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.has(0)) {
19059
19729
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -19262,10 +19932,19 @@ var Application = class Application extends Object$1 {
19262
19932
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "movedTo" in this._cachedJsonLd) {
19263
19933
  const prop = this._cachedJsonLd["movedTo"];
19264
19934
  const doc = Array.isArray(prop) ? prop[0] : prop;
19265
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#successor_fromJsonLd(doc, {
19266
- ...options,
19267
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
19268
- });
19935
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
19936
+ v = await this.#successor_fromJsonLd(doc, {
19937
+ ...options,
19938
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
19939
+ });
19940
+ } catch (error) {
19941
+ if (!options.suppressError) throw error;
19942
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
19943
+ property: "https://www.w3.org/ns/activitystreams#movedTo",
19944
+ error
19945
+ });
19946
+ return null;
19947
+ }
19269
19948
  }
19270
19949
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.has(0)) {
19271
19950
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -19434,10 +20113,19 @@ var Application = class Application extends Object$1 {
19434
20113
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "alsoKnownAs" in this._cachedJsonLd) {
19435
20114
  const prop = this._cachedJsonLd["alsoKnownAs"];
19436
20115
  const doc = Array.isArray(prop) ? prop[0] : prop;
19437
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#alias_fromJsonLd(doc, {
19438
- ...options,
19439
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
19440
- });
20116
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
20117
+ v = await this.#alias_fromJsonLd(doc, {
20118
+ ...options,
20119
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
20120
+ });
20121
+ } catch (error) {
20122
+ if (!options.suppressError) throw error;
20123
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
20124
+ property: "https://www.w3.org/ns/activitystreams#alsoKnownAs",
20125
+ error
20126
+ });
20127
+ return null;
20128
+ }
19441
20129
  }
19442
20130
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.has(0)) {
19443
20131
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -19481,10 +20169,20 @@ var Application = class Application extends Object$1 {
19481
20169
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "alsoKnownAs" in this._cachedJsonLd) {
19482
20170
  const prop = this._cachedJsonLd["alsoKnownAs"];
19483
20171
  const obj = Array.isArray(prop) ? prop[i] : prop;
19484
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#alias_fromJsonLd(obj, {
19485
- ...options,
19486
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
19487
- });
20172
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
20173
+ v = await this.#alias_fromJsonLd(obj, {
20174
+ ...options,
20175
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
20176
+ });
20177
+ } catch (error) {
20178
+ if (!options.suppressError) throw error;
20179
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
20180
+ property: "https://www.w3.org/ns/activitystreams#alsoKnownAs",
20181
+ index: i,
20182
+ error
20183
+ });
20184
+ continue;
20185
+ }
19488
20186
  }
19489
20187
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.has(0)) {
19490
20188
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -19608,10 +20306,19 @@ var Application = class Application extends Object$1 {
19608
20306
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "service" in this._cachedJsonLd) {
19609
20307
  const prop = this._cachedJsonLd["service"];
19610
20308
  const doc = Array.isArray(prop) ? prop[0] : prop;
19611
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#service_fromJsonLd(doc, {
19612
- ...options,
19613
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
19614
- });
20309
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
20310
+ v = await this.#service_fromJsonLd(doc, {
20311
+ ...options,
20312
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
20313
+ });
20314
+ } catch (error) {
20315
+ if (!options.suppressError) throw error;
20316
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
20317
+ property: "https://www.w3.org/ns/did#service",
20318
+ error
20319
+ });
20320
+ return null;
20321
+ }
19615
20322
  }
19616
20323
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.has(0)) {
19617
20324
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -19655,10 +20362,20 @@ var Application = class Application extends Object$1 {
19655
20362
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "service" in this._cachedJsonLd) {
19656
20363
  const prop = this._cachedJsonLd["service"];
19657
20364
  const obj = Array.isArray(prop) ? prop[i] : prop;
19658
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#service_fromJsonLd(obj, {
19659
- ...options,
19660
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
19661
- });
20365
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
20366
+ v = await this.#service_fromJsonLd(obj, {
20367
+ ...options,
20368
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
20369
+ });
20370
+ } catch (error) {
20371
+ if (!options.suppressError) throw error;
20372
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
20373
+ property: "https://www.w3.org/ns/did#service",
20374
+ index: i,
20375
+ error
20376
+ });
20377
+ continue;
20378
+ }
19662
20379
  }
19663
20380
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.has(0)) {
19664
20381
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -21279,10 +21996,19 @@ var Article = class Article extends Object$1 {
21279
21996
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "quote" in this._cachedJsonLd) {
21280
21997
  const prop = this._cachedJsonLd["quote"];
21281
21998
  const doc = Array.isArray(prop) ? prop[0] : prop;
21282
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#quote_fromJsonLd(doc, {
21283
- ...options,
21284
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
21285
- });
21999
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
22000
+ v = await this.#quote_fromJsonLd(doc, {
22001
+ ...options,
22002
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
22003
+ });
22004
+ } catch (error) {
22005
+ if (!options.suppressError) throw error;
22006
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
22007
+ property: "https://w3id.org/fep/044f#quote",
22008
+ error
22009
+ });
22010
+ return null;
22011
+ }
21286
22012
  }
21287
22013
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3obhVLFML2Fh2Qsbg3BM2dec8S9e_quote.has(0)) {
21288
22014
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -21419,10 +22145,19 @@ var Article = class Article extends Object$1 {
21419
22145
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "quoteAuthorization" in this._cachedJsonLd) {
21420
22146
  const prop = this._cachedJsonLd["quoteAuthorization"];
21421
22147
  const doc = Array.isArray(prop) ? prop[0] : prop;
21422
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#quoteAuthorization_fromJsonLd(doc, {
21423
- ...options,
21424
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
21425
- });
22148
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
22149
+ v = await this.#quoteAuthorization_fromJsonLd(doc, {
22150
+ ...options,
22151
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
22152
+ });
22153
+ } catch (error) {
22154
+ if (!options.suppressError) throw error;
22155
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
22156
+ property: "https://w3id.org/fep/044f#quoteAuthorization",
22157
+ error
22158
+ });
22159
+ return null;
22160
+ }
21426
22161
  }
21427
22162
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_ZKAEiJeuEvjeYkC4pG58D5vAJ4m_quoteAuthorization.has(0)) {
21428
22163
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -21677,7 +22412,7 @@ var Article = class Article extends Object$1 {
21677
22412
  if (_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null || _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length < 1) _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["http://fedibird.com/ns#quoteUri"];
21678
22413
  for (const v of _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null ? [] : _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length === 1 && "@list" in _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array[0] ? _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array[0]["@list"] : _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array) {
21679
22414
  if (v == null) continue;
21680
- const decoded = new URL(v["@value"]);
22415
+ const decoded = typeof v === "object" && (typeof v["@id"] === "string" && canDecodeIri(v["@id"]) || typeof v["@value"] === "string" && canDecodeIri(v["@value"])) ? decodeIri(typeof v["@id"] === "string" ? v["@id"] : v["@value"]) : void 0;
21681
22416
  if (typeof decoded === "undefined") {
21682
22417
  shouldCacheJsonLd = false;
21683
22418
  continue;
@@ -22786,10 +23521,19 @@ var Collection = class Collection extends Object$1 {
22786
23521
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "current" in this._cachedJsonLd) {
22787
23522
  const prop = this._cachedJsonLd["current"];
22788
23523
  const doc = Array.isArray(prop) ? prop[0] : prop;
22789
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#current_fromJsonLd(doc, {
22790
- ...options,
22791
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
22792
- });
23524
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
23525
+ v = await this.#current_fromJsonLd(doc, {
23526
+ ...options,
23527
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
23528
+ });
23529
+ } catch (error) {
23530
+ if (!options.suppressError) throw error;
23531
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
23532
+ property: "https://www.w3.org/ns/activitystreams#current",
23533
+ error
23534
+ });
23535
+ return null;
23536
+ }
22793
23537
  }
22794
23538
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3UyUdxnyn6cDn53QKrh4MBiearma_current.has(0)) {
22795
23539
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -22910,10 +23654,19 @@ var Collection = class Collection extends Object$1 {
22910
23654
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "first" in this._cachedJsonLd) {
22911
23655
  const prop = this._cachedJsonLd["first"];
22912
23656
  const doc = Array.isArray(prop) ? prop[0] : prop;
22913
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#first_fromJsonLd(doc, {
22914
- ...options,
22915
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
22916
- });
23657
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
23658
+ v = await this.#first_fromJsonLd(doc, {
23659
+ ...options,
23660
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
23661
+ });
23662
+ } catch (error) {
23663
+ if (!options.suppressError) throw error;
23664
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
23665
+ property: "https://www.w3.org/ns/activitystreams#first",
23666
+ error
23667
+ });
23668
+ return null;
23669
+ }
22917
23670
  }
22918
23671
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_J52RqweMe6hhv7RnLJMC8BExTE5_first.has(0)) {
22919
23672
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -23034,10 +23787,19 @@ var Collection = class Collection extends Object$1 {
23034
23787
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "last" in this._cachedJsonLd) {
23035
23788
  const prop = this._cachedJsonLd["last"];
23036
23789
  const doc = Array.isArray(prop) ? prop[0] : prop;
23037
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#last_fromJsonLd(doc, {
23038
- ...options,
23039
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
23040
- });
23790
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
23791
+ v = await this.#last_fromJsonLd(doc, {
23792
+ ...options,
23793
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
23794
+ });
23795
+ } catch (error) {
23796
+ if (!options.suppressError) throw error;
23797
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
23798
+ property: "https://www.w3.org/ns/activitystreams#last",
23799
+ error
23800
+ });
23801
+ return null;
23802
+ }
23041
23803
  }
23042
23804
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_gyJJnyEFnuNVi1HFZKfAn3Hfn26_last.has(0)) {
23043
23805
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -23167,10 +23929,20 @@ var Collection = class Collection extends Object$1 {
23167
23929
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "items" in this._cachedJsonLd) {
23168
23930
  const prop = this._cachedJsonLd["items"];
23169
23931
  const obj = Array.isArray(prop) ? prop[i] : prop;
23170
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#item_fromJsonLd(obj, {
23171
- ...options,
23172
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
23173
- });
23932
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
23933
+ v = await this.#item_fromJsonLd(obj, {
23934
+ ...options,
23935
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
23936
+ });
23937
+ } catch (error) {
23938
+ if (!options.suppressError) throw error;
23939
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
23940
+ property: "https://www.w3.org/ns/activitystreams#items",
23941
+ index: i,
23942
+ error
23943
+ });
23944
+ continue;
23945
+ }
23174
23946
  }
23175
23947
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.has(0)) {
23176
23948
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -23291,10 +24063,19 @@ var Collection = class Collection extends Object$1 {
23291
24063
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "likesOf" in this._cachedJsonLd) {
23292
24064
  const prop = this._cachedJsonLd["likesOf"];
23293
24065
  const doc = Array.isArray(prop) ? prop[0] : prop;
23294
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#likesOf_fromJsonLd(doc, {
23295
- ...options,
23296
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
23297
- });
24066
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
24067
+ v = await this.#likesOf_fromJsonLd(doc, {
24068
+ ...options,
24069
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
24070
+ });
24071
+ } catch (error) {
24072
+ if (!options.suppressError) throw error;
24073
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
24074
+ property: "https://w3id.org/fep/5711#likesOf",
24075
+ error
24076
+ });
24077
+ return null;
24078
+ }
23298
24079
  }
23299
24080
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4TB9Qd9ddtcZEpMfzbHhzafE6jaJ_likesOf.has(0)) {
23300
24081
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -23414,10 +24195,19 @@ var Collection = class Collection extends Object$1 {
23414
24195
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "sharesOf" in this._cachedJsonLd) {
23415
24196
  const prop = this._cachedJsonLd["sharesOf"];
23416
24197
  const doc = Array.isArray(prop) ? prop[0] : prop;
23417
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#sharesOf_fromJsonLd(doc, {
23418
- ...options,
23419
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
23420
- });
24198
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
24199
+ v = await this.#sharesOf_fromJsonLd(doc, {
24200
+ ...options,
24201
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
24202
+ });
24203
+ } catch (error) {
24204
+ if (!options.suppressError) throw error;
24205
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
24206
+ property: "https://w3id.org/fep/5711#sharesOf",
24207
+ error
24208
+ });
24209
+ return null;
24210
+ }
23421
24211
  }
23422
24212
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3manzgeKiPsugpztKGiaUUwJ3ito_sharesOf.has(0)) {
23423
24213
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -23537,10 +24327,19 @@ var Collection = class Collection extends Object$1 {
23537
24327
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "repliesOf" in this._cachedJsonLd) {
23538
24328
  const prop = this._cachedJsonLd["repliesOf"];
23539
24329
  const doc = Array.isArray(prop) ? prop[0] : prop;
23540
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#repliesOf_fromJsonLd(doc, {
23541
- ...options,
23542
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
23543
- });
24330
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
24331
+ v = await this.#repliesOf_fromJsonLd(doc, {
24332
+ ...options,
24333
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
24334
+ });
24335
+ } catch (error) {
24336
+ if (!options.suppressError) throw error;
24337
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
24338
+ property: "https://w3id.org/fep/5711#repliesOf",
24339
+ error
24340
+ });
24341
+ return null;
24342
+ }
23544
24343
  }
23545
24344
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3T3oGm3twpcQUcrnMisXQtmDZ32X_repliesOf.has(0)) {
23546
24345
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -23660,10 +24459,19 @@ var Collection = class Collection extends Object$1 {
23660
24459
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "inboxOf" in this._cachedJsonLd) {
23661
24460
  const prop = this._cachedJsonLd["inboxOf"];
23662
24461
  const doc = Array.isArray(prop) ? prop[0] : prop;
23663
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#inboxOf_fromJsonLd(doc, {
23664
- ...options,
23665
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
23666
- });
24462
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
24463
+ v = await this.#inboxOf_fromJsonLd(doc, {
24464
+ ...options,
24465
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
24466
+ });
24467
+ } catch (error) {
24468
+ if (!options.suppressError) throw error;
24469
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
24470
+ property: "https://w3id.org/fep/5711#inboxOf",
24471
+ error
24472
+ });
24473
+ return null;
24474
+ }
23667
24475
  }
23668
24476
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2bvRkAFZjMfVD8jiUWZJr5YokSeN_inboxOf.has(0)) {
23669
24477
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -23783,10 +24591,19 @@ var Collection = class Collection extends Object$1 {
23783
24591
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "outboxOf" in this._cachedJsonLd) {
23784
24592
  const prop = this._cachedJsonLd["outboxOf"];
23785
24593
  const doc = Array.isArray(prop) ? prop[0] : prop;
23786
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#outboxOf_fromJsonLd(doc, {
23787
- ...options,
23788
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
23789
- });
24594
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
24595
+ v = await this.#outboxOf_fromJsonLd(doc, {
24596
+ ...options,
24597
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
24598
+ });
24599
+ } catch (error) {
24600
+ if (!options.suppressError) throw error;
24601
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
24602
+ property: "https://w3id.org/fep/5711#outboxOf",
24603
+ error
24604
+ });
24605
+ return null;
24606
+ }
23790
24607
  }
23791
24608
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4AHzVZDxHjK6uEWa9UiKHGK34yYm_outboxOf.has(0)) {
23792
24609
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -23906,10 +24723,19 @@ var Collection = class Collection extends Object$1 {
23906
24723
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "followersOf" in this._cachedJsonLd) {
23907
24724
  const prop = this._cachedJsonLd["followersOf"];
23908
24725
  const doc = Array.isArray(prop) ? prop[0] : prop;
23909
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#followersOf_fromJsonLd(doc, {
23910
- ...options,
23911
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
23912
- });
24726
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
24727
+ v = await this.#followersOf_fromJsonLd(doc, {
24728
+ ...options,
24729
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
24730
+ });
24731
+ } catch (error) {
24732
+ if (!options.suppressError) throw error;
24733
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
24734
+ property: "https://w3id.org/fep/5711#followersOf",
24735
+ error
24736
+ });
24737
+ return null;
24738
+ }
23913
24739
  }
23914
24740
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_41aoZ5M6yRUHy3Zx8q6iuZQxtopb_followersOf.has(0)) {
23915
24741
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -24029,10 +24855,19 @@ var Collection = class Collection extends Object$1 {
24029
24855
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "followingOf" in this._cachedJsonLd) {
24030
24856
  const prop = this._cachedJsonLd["followingOf"];
24031
24857
  const doc = Array.isArray(prop) ? prop[0] : prop;
24032
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#followingOf_fromJsonLd(doc, {
24033
- ...options,
24034
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
24035
- });
24858
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
24859
+ v = await this.#followingOf_fromJsonLd(doc, {
24860
+ ...options,
24861
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
24862
+ });
24863
+ } catch (error) {
24864
+ if (!options.suppressError) throw error;
24865
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
24866
+ property: "https://w3id.org/fep/5711#followingOf",
24867
+ error
24868
+ });
24869
+ return null;
24870
+ }
24036
24871
  }
24037
24872
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2nXT2Ah42UjEEQF5oJQ39CbKB1xj_followingOf.has(0)) {
24038
24873
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -24152,10 +24987,19 @@ var Collection = class Collection extends Object$1 {
24152
24987
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "likedOf" in this._cachedJsonLd) {
24153
24988
  const prop = this._cachedJsonLd["likedOf"];
24154
24989
  const doc = Array.isArray(prop) ? prop[0] : prop;
24155
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#likedOf_fromJsonLd(doc, {
24156
- ...options,
24157
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
24158
- });
24990
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
24991
+ v = await this.#likedOf_fromJsonLd(doc, {
24992
+ ...options,
24993
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
24994
+ });
24995
+ } catch (error) {
24996
+ if (!options.suppressError) throw error;
24997
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
24998
+ property: "https://w3id.org/fep/5711#likedOf",
24999
+ error
25000
+ });
25001
+ return null;
25002
+ }
24159
25003
  }
24160
25004
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2bsySzmT3qEZcrnoe3tZ5xBjXSju_likedOf.has(0)) {
24161
25005
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -25153,10 +25997,19 @@ var CollectionPage = class CollectionPage extends Collection {
25153
25997
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "partOf" in this._cachedJsonLd) {
25154
25998
  const prop = this._cachedJsonLd["partOf"];
25155
25999
  const doc = Array.isArray(prop) ? prop[0] : prop;
25156
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#partOf_fromJsonLd(doc, {
25157
- ...options,
25158
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
25159
- });
26000
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
26001
+ v = await this.#partOf_fromJsonLd(doc, {
26002
+ ...options,
26003
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
26004
+ });
26005
+ } catch (error) {
26006
+ if (!options.suppressError) throw error;
26007
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
26008
+ property: "https://www.w3.org/ns/activitystreams#partOf",
26009
+ error
26010
+ });
26011
+ return null;
26012
+ }
25160
26013
  }
25161
26014
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf.has(0)) {
25162
26015
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -25276,10 +26129,19 @@ var CollectionPage = class CollectionPage extends Collection {
25276
26129
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "next" in this._cachedJsonLd) {
25277
26130
  const prop = this._cachedJsonLd["next"];
25278
26131
  const doc = Array.isArray(prop) ? prop[0] : prop;
25279
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#next_fromJsonLd(doc, {
25280
- ...options,
25281
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
25282
- });
26132
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
26133
+ v = await this.#next_fromJsonLd(doc, {
26134
+ ...options,
26135
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
26136
+ });
26137
+ } catch (error) {
26138
+ if (!options.suppressError) throw error;
26139
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
26140
+ property: "https://www.w3.org/ns/activitystreams#next",
26141
+ error
26142
+ });
26143
+ return null;
26144
+ }
25283
26145
  }
25284
26146
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3BT4kQLcXhHx7TAWaNDKh8nFn9eY_next.has(0)) {
25285
26147
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -25399,10 +26261,19 @@ var CollectionPage = class CollectionPage extends Collection {
25399
26261
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "prev" in this._cachedJsonLd) {
25400
26262
  const prop = this._cachedJsonLd["prev"];
25401
26263
  const doc = Array.isArray(prop) ? prop[0] : prop;
25402
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#prev_fromJsonLd(doc, {
25403
- ...options,
25404
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
25405
- });
26264
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
26265
+ v = await this.#prev_fromJsonLd(doc, {
26266
+ ...options,
26267
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
26268
+ });
26269
+ } catch (error) {
26270
+ if (!options.suppressError) throw error;
26271
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
26272
+ property: "https://www.w3.org/ns/activitystreams#prev",
26273
+ error
26274
+ });
26275
+ return null;
26276
+ }
25406
26277
  }
25407
26278
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3b8yG8tDNzQFFEnWhCc13G8eHooA_prev.has(0)) {
25408
26279
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -27629,10 +28500,19 @@ var Group = class Group extends Object$1 {
27629
28500
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "publicKey" in this._cachedJsonLd) {
27630
28501
  const prop = this._cachedJsonLd["publicKey"];
27631
28502
  const doc = Array.isArray(prop) ? prop[0] : prop;
27632
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#publicKey_fromJsonLd(doc, {
27633
- ...options,
27634
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
27635
- });
28503
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
28504
+ v = await this.#publicKey_fromJsonLd(doc, {
28505
+ ...options,
28506
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
28507
+ });
28508
+ } catch (error) {
28509
+ if (!options.suppressError) throw error;
28510
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
28511
+ property: "https://w3id.org/security#publicKey",
28512
+ error
28513
+ });
28514
+ return null;
28515
+ }
27636
28516
  }
27637
28517
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey.has(0)) {
27638
28518
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -27673,10 +28553,20 @@ var Group = class Group extends Object$1 {
27673
28553
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "publicKey" in this._cachedJsonLd) {
27674
28554
  const prop = this._cachedJsonLd["publicKey"];
27675
28555
  const obj = Array.isArray(prop) ? prop[i] : prop;
27676
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#publicKey_fromJsonLd(obj, {
27677
- ...options,
27678
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
27679
- });
28556
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
28557
+ v = await this.#publicKey_fromJsonLd(obj, {
28558
+ ...options,
28559
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
28560
+ });
28561
+ } catch (error) {
28562
+ if (!options.suppressError) throw error;
28563
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
28564
+ property: "https://w3id.org/security#publicKey",
28565
+ index: i,
28566
+ error
28567
+ });
28568
+ continue;
28569
+ }
27680
28570
  }
27681
28571
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey.has(0)) {
27682
28572
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -27800,10 +28690,19 @@ var Group = class Group extends Object$1 {
27800
28690
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "assertionMethod" in this._cachedJsonLd) {
27801
28691
  const prop = this._cachedJsonLd["assertionMethod"];
27802
28692
  const doc = Array.isArray(prop) ? prop[0] : prop;
27803
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#assertionMethod_fromJsonLd(doc, {
27804
- ...options,
27805
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
27806
- });
28693
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
28694
+ v = await this.#assertionMethod_fromJsonLd(doc, {
28695
+ ...options,
28696
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
28697
+ });
28698
+ } catch (error) {
28699
+ if (!options.suppressError) throw error;
28700
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
28701
+ property: "https://w3id.org/security#assertionMethod",
28702
+ error
28703
+ });
28704
+ return null;
28705
+ }
27807
28706
  }
27808
28707
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.has(0)) {
27809
28708
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -27847,10 +28746,20 @@ var Group = class Group extends Object$1 {
27847
28746
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "assertionMethod" in this._cachedJsonLd) {
27848
28747
  const prop = this._cachedJsonLd["assertionMethod"];
27849
28748
  const obj = Array.isArray(prop) ? prop[i] : prop;
27850
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#assertionMethod_fromJsonLd(obj, {
27851
- ...options,
27852
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
27853
- });
28749
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
28750
+ v = await this.#assertionMethod_fromJsonLd(obj, {
28751
+ ...options,
28752
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
28753
+ });
28754
+ } catch (error) {
28755
+ if (!options.suppressError) throw error;
28756
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
28757
+ property: "https://w3id.org/security#assertionMethod",
28758
+ index: i,
28759
+ error
28760
+ });
28761
+ continue;
28762
+ }
27854
28763
  }
27855
28764
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.has(0)) {
27856
28765
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -28005,10 +28914,19 @@ var Group = class Group extends Object$1 {
28005
28914
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "inbox" in this._cachedJsonLd) {
28006
28915
  const prop = this._cachedJsonLd["inbox"];
28007
28916
  const doc = Array.isArray(prop) ? prop[0] : prop;
28008
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#inbox_fromJsonLd(doc, {
28009
- ...options,
28010
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
28011
- });
28917
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
28918
+ v = await this.#inbox_fromJsonLd(doc, {
28919
+ ...options,
28920
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
28921
+ });
28922
+ } catch (error) {
28923
+ if (!options.suppressError) throw error;
28924
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
28925
+ property: "http://www.w3.org/ns/ldp#inbox",
28926
+ error
28927
+ });
28928
+ return null;
28929
+ }
28012
28930
  }
28013
28931
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.has(0)) {
28014
28932
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -28147,10 +29065,19 @@ var Group = class Group extends Object$1 {
28147
29065
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "outbox" in this._cachedJsonLd) {
28148
29066
  const prop = this._cachedJsonLd["outbox"];
28149
29067
  const doc = Array.isArray(prop) ? prop[0] : prop;
28150
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#outbox_fromJsonLd(doc, {
28151
- ...options,
28152
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
28153
- });
29068
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
29069
+ v = await this.#outbox_fromJsonLd(doc, {
29070
+ ...options,
29071
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
29072
+ });
29073
+ } catch (error) {
29074
+ if (!options.suppressError) throw error;
29075
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
29076
+ property: "https://www.w3.org/ns/activitystreams#outbox",
29077
+ error
29078
+ });
29079
+ return null;
29080
+ }
28154
29081
  }
28155
29082
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_41QwhqJouoLg3h8dRPKat21brynC_outbox.has(0)) {
28156
29083
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -28274,10 +29201,19 @@ var Group = class Group extends Object$1 {
28274
29201
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "following" in this._cachedJsonLd) {
28275
29202
  const prop = this._cachedJsonLd["following"];
28276
29203
  const doc = Array.isArray(prop) ? prop[0] : prop;
28277
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#following_fromJsonLd(doc, {
28278
- ...options,
28279
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
28280
- });
29204
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
29205
+ v = await this.#following_fromJsonLd(doc, {
29206
+ ...options,
29207
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
29208
+ });
29209
+ } catch (error) {
29210
+ if (!options.suppressError) throw error;
29211
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
29212
+ property: "https://www.w3.org/ns/activitystreams#following",
29213
+ error
29214
+ });
29215
+ return null;
29216
+ }
28281
29217
  }
28282
29218
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.has(0)) {
28283
29219
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -28404,10 +29340,19 @@ var Group = class Group extends Object$1 {
28404
29340
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "followers" in this._cachedJsonLd) {
28405
29341
  const prop = this._cachedJsonLd["followers"];
28406
29342
  const doc = Array.isArray(prop) ? prop[0] : prop;
28407
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#followers_fromJsonLd(doc, {
28408
- ...options,
28409
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
28410
- });
29343
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
29344
+ v = await this.#followers_fromJsonLd(doc, {
29345
+ ...options,
29346
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
29347
+ });
29348
+ } catch (error) {
29349
+ if (!options.suppressError) throw error;
29350
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
29351
+ property: "https://www.w3.org/ns/activitystreams#followers",
29352
+ error
29353
+ });
29354
+ return null;
29355
+ }
28411
29356
  }
28412
29357
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.has(0)) {
28413
29358
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -28532,10 +29477,19 @@ var Group = class Group extends Object$1 {
28532
29477
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "liked" in this._cachedJsonLd) {
28533
29478
  const prop = this._cachedJsonLd["liked"];
28534
29479
  const doc = Array.isArray(prop) ? prop[0] : prop;
28535
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#liked_fromJsonLd(doc, {
28536
- ...options,
28537
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
28538
- });
29480
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
29481
+ v = await this.#liked_fromJsonLd(doc, {
29482
+ ...options,
29483
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
29484
+ });
29485
+ } catch (error) {
29486
+ if (!options.suppressError) throw error;
29487
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
29488
+ property: "https://www.w3.org/ns/activitystreams#liked",
29489
+ error
29490
+ });
29491
+ return null;
29492
+ }
28539
29493
  }
28540
29494
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.has(0)) {
28541
29495
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -28658,10 +29612,19 @@ var Group = class Group extends Object$1 {
28658
29612
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "featured" in this._cachedJsonLd) {
28659
29613
  const prop = this._cachedJsonLd["featured"];
28660
29614
  const doc = Array.isArray(prop) ? prop[0] : prop;
28661
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#featured_fromJsonLd(doc, {
28662
- ...options,
28663
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
28664
- });
29615
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
29616
+ v = await this.#featured_fromJsonLd(doc, {
29617
+ ...options,
29618
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
29619
+ });
29620
+ } catch (error) {
29621
+ if (!options.suppressError) throw error;
29622
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
29623
+ property: "http://joinmastodon.org/ns#featured",
29624
+ error
29625
+ });
29626
+ return null;
29627
+ }
28665
29628
  }
28666
29629
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4N1vBJzXDf8NbBumeECQMFvKetja_featured.has(0)) {
28667
29630
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -28784,10 +29747,19 @@ var Group = class Group extends Object$1 {
28784
29747
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "featuredTags" in this._cachedJsonLd) {
28785
29748
  const prop = this._cachedJsonLd["featuredTags"];
28786
29749
  const doc = Array.isArray(prop) ? prop[0] : prop;
28787
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#featuredTags_fromJsonLd(doc, {
28788
- ...options,
28789
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
28790
- });
29750
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
29751
+ v = await this.#featuredTags_fromJsonLd(doc, {
29752
+ ...options,
29753
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
29754
+ });
29755
+ } catch (error) {
29756
+ if (!options.suppressError) throw error;
29757
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
29758
+ property: "http://joinmastodon.org/ns#featuredTags",
29759
+ error
29760
+ });
29761
+ return null;
29762
+ }
28791
29763
  }
28792
29764
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.has(0)) {
28793
29765
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -28906,10 +29878,20 @@ var Group = class Group extends Object$1 {
28906
29878
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "streams" in this._cachedJsonLd) {
28907
29879
  const prop = this._cachedJsonLd["streams"];
28908
29880
  const obj = Array.isArray(prop) ? prop[i] : prop;
28909
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#stream_fromJsonLd(obj, {
28910
- ...options,
28911
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
28912
- });
29881
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
29882
+ v = await this.#stream_fromJsonLd(obj, {
29883
+ ...options,
29884
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
29885
+ });
29886
+ } catch (error) {
29887
+ if (!options.suppressError) throw error;
29888
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
29889
+ property: "https://www.w3.org/ns/activitystreams#streams",
29890
+ index: i,
29891
+ error
29892
+ });
29893
+ continue;
29894
+ }
28913
29895
  }
28914
29896
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.has(0)) {
28915
29897
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -29118,10 +30100,19 @@ var Group = class Group extends Object$1 {
29118
30100
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "movedTo" in this._cachedJsonLd) {
29119
30101
  const prop = this._cachedJsonLd["movedTo"];
29120
30102
  const doc = Array.isArray(prop) ? prop[0] : prop;
29121
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#successor_fromJsonLd(doc, {
29122
- ...options,
29123
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
29124
- });
30103
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
30104
+ v = await this.#successor_fromJsonLd(doc, {
30105
+ ...options,
30106
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
30107
+ });
30108
+ } catch (error) {
30109
+ if (!options.suppressError) throw error;
30110
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
30111
+ property: "https://www.w3.org/ns/activitystreams#movedTo",
30112
+ error
30113
+ });
30114
+ return null;
30115
+ }
29125
30116
  }
29126
30117
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.has(0)) {
29127
30118
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -29290,10 +30281,19 @@ var Group = class Group extends Object$1 {
29290
30281
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "alsoKnownAs" in this._cachedJsonLd) {
29291
30282
  const prop = this._cachedJsonLd["alsoKnownAs"];
29292
30283
  const doc = Array.isArray(prop) ? prop[0] : prop;
29293
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#alias_fromJsonLd(doc, {
29294
- ...options,
29295
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
29296
- });
30284
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
30285
+ v = await this.#alias_fromJsonLd(doc, {
30286
+ ...options,
30287
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
30288
+ });
30289
+ } catch (error) {
30290
+ if (!options.suppressError) throw error;
30291
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
30292
+ property: "https://www.w3.org/ns/activitystreams#alsoKnownAs",
30293
+ error
30294
+ });
30295
+ return null;
30296
+ }
29297
30297
  }
29298
30298
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.has(0)) {
29299
30299
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -29337,10 +30337,20 @@ var Group = class Group extends Object$1 {
29337
30337
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "alsoKnownAs" in this._cachedJsonLd) {
29338
30338
  const prop = this._cachedJsonLd["alsoKnownAs"];
29339
30339
  const obj = Array.isArray(prop) ? prop[i] : prop;
29340
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#alias_fromJsonLd(obj, {
29341
- ...options,
29342
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
29343
- });
30340
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
30341
+ v = await this.#alias_fromJsonLd(obj, {
30342
+ ...options,
30343
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
30344
+ });
30345
+ } catch (error) {
30346
+ if (!options.suppressError) throw error;
30347
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
30348
+ property: "https://www.w3.org/ns/activitystreams#alsoKnownAs",
30349
+ index: i,
30350
+ error
30351
+ });
30352
+ continue;
30353
+ }
29344
30354
  }
29345
30355
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.has(0)) {
29346
30356
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -29464,10 +30474,19 @@ var Group = class Group extends Object$1 {
29464
30474
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "service" in this._cachedJsonLd) {
29465
30475
  const prop = this._cachedJsonLd["service"];
29466
30476
  const doc = Array.isArray(prop) ? prop[0] : prop;
29467
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#service_fromJsonLd(doc, {
29468
- ...options,
29469
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
29470
- });
30477
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
30478
+ v = await this.#service_fromJsonLd(doc, {
30479
+ ...options,
30480
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
30481
+ });
30482
+ } catch (error) {
30483
+ if (!options.suppressError) throw error;
30484
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
30485
+ property: "https://www.w3.org/ns/did#service",
30486
+ error
30487
+ });
30488
+ return null;
30489
+ }
29471
30490
  }
29472
30491
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.has(0)) {
29473
30492
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -29511,10 +30530,20 @@ var Group = class Group extends Object$1 {
29511
30530
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "service" in this._cachedJsonLd) {
29512
30531
  const prop = this._cachedJsonLd["service"];
29513
30532
  const obj = Array.isArray(prop) ? prop[i] : prop;
29514
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#service_fromJsonLd(obj, {
29515
- ...options,
29516
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
29517
- });
30533
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
30534
+ v = await this.#service_fromJsonLd(obj, {
30535
+ ...options,
30536
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
30537
+ });
30538
+ } catch (error) {
30539
+ if (!options.suppressError) throw error;
30540
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
30541
+ property: "https://www.w3.org/ns/did#service",
30542
+ index: i,
30543
+ error
30544
+ });
30545
+ continue;
30546
+ }
29518
30547
  }
29519
30548
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.has(0)) {
29520
30549
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -31009,10 +32038,20 @@ var Link = class Link {
31009
32038
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "preview" in this._cachedJsonLd) {
31010
32039
  const prop = this._cachedJsonLd["preview"];
31011
32040
  const obj = Array.isArray(prop) ? prop[i] : prop;
31012
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#preview_fromJsonLd(obj, {
31013
- ...options,
31014
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
31015
- });
32041
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
32042
+ v = await this.#preview_fromJsonLd(obj, {
32043
+ ...options,
32044
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
32045
+ });
32046
+ } catch (error) {
32047
+ if (!options.suppressError) throw error;
32048
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
32049
+ property: "https://www.w3.org/ns/activitystreams#preview",
32050
+ index: i,
32051
+ error
32052
+ });
32053
+ continue;
32054
+ }
31016
32055
  }
31017
32056
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_gCVTegXxWWCw6wWRxa1QF65zusg_preview.has(0)) {
31018
32057
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -33205,10 +34244,19 @@ var Note = class Note extends Object$1 {
33205
34244
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "quote" in this._cachedJsonLd) {
33206
34245
  const prop = this._cachedJsonLd["quote"];
33207
34246
  const doc = Array.isArray(prop) ? prop[0] : prop;
33208
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#quote_fromJsonLd(doc, {
33209
- ...options,
33210
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
33211
- });
34247
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
34248
+ v = await this.#quote_fromJsonLd(doc, {
34249
+ ...options,
34250
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
34251
+ });
34252
+ } catch (error) {
34253
+ if (!options.suppressError) throw error;
34254
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
34255
+ property: "https://w3id.org/fep/044f#quote",
34256
+ error
34257
+ });
34258
+ return null;
34259
+ }
33212
34260
  }
33213
34261
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3obhVLFML2Fh2Qsbg3BM2dec8S9e_quote.has(0)) {
33214
34262
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -33345,10 +34393,19 @@ var Note = class Note extends Object$1 {
33345
34393
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "quoteAuthorization" in this._cachedJsonLd) {
33346
34394
  const prop = this._cachedJsonLd["quoteAuthorization"];
33347
34395
  const doc = Array.isArray(prop) ? prop[0] : prop;
33348
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#quoteAuthorization_fromJsonLd(doc, {
33349
- ...options,
33350
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
33351
- });
34396
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
34397
+ v = await this.#quoteAuthorization_fromJsonLd(doc, {
34398
+ ...options,
34399
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
34400
+ });
34401
+ } catch (error) {
34402
+ if (!options.suppressError) throw error;
34403
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
34404
+ property: "https://w3id.org/fep/044f#quoteAuthorization",
34405
+ error
34406
+ });
34407
+ return null;
34408
+ }
33352
34409
  }
33353
34410
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_ZKAEiJeuEvjeYkC4pG58D5vAJ4m_quoteAuthorization.has(0)) {
33354
34411
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -33603,7 +34660,7 @@ var Note = class Note extends Object$1 {
33603
34660
  if (_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null || _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length < 1) _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["http://fedibird.com/ns#quoteUri"];
33604
34661
  for (const v of _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null ? [] : _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length === 1 && "@list" in _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array[0] ? _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array[0]["@list"] : _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array) {
33605
34662
  if (v == null) continue;
33606
- const decoded = new URL(v["@value"]);
34663
+ const decoded = typeof v === "object" && (typeof v["@id"] === "string" && canDecodeIri(v["@id"]) || typeof v["@value"] === "string" && canDecodeIri(v["@value"])) ? decodeIri(typeof v["@id"] === "string" ? v["@id"] : v["@value"]) : void 0;
33607
34664
  if (typeof decoded === "undefined") {
33608
34665
  shouldCacheJsonLd = false;
33609
34666
  continue;
@@ -33833,10 +34890,20 @@ var OrderedCollection = class OrderedCollection extends Collection {
33833
34890
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "orderedItems" in this._cachedJsonLd) {
33834
34891
  const prop = this._cachedJsonLd["orderedItems"];
33835
34892
  const obj = Array.isArray(prop) ? prop[i] : prop;
33836
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#item_fromJsonLd(obj, {
33837
- ...options,
33838
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
33839
- });
34893
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
34894
+ v = await this.#item_fromJsonLd(obj, {
34895
+ ...options,
34896
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
34897
+ });
34898
+ } catch (error) {
34899
+ if (!options.suppressError) throw error;
34900
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
34901
+ property: "https://www.w3.org/ns/activitystreams#items",
34902
+ index: i,
34903
+ error
34904
+ });
34905
+ continue;
34906
+ }
33840
34907
  }
33841
34908
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.has(0)) {
33842
34909
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -34330,10 +35397,20 @@ var OrderedCollectionPage = class OrderedCollectionPage extends CollectionPage {
34330
35397
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "orderedItems" in this._cachedJsonLd) {
34331
35398
  const prop = this._cachedJsonLd["orderedItems"];
34332
35399
  const obj = Array.isArray(prop) ? prop[i] : prop;
34333
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#item_fromJsonLd(obj, {
34334
- ...options,
34335
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
34336
- });
35400
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
35401
+ v = await this.#item_fromJsonLd(obj, {
35402
+ ...options,
35403
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
35404
+ });
35405
+ } catch (error) {
35406
+ if (!options.suppressError) throw error;
35407
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
35408
+ property: "https://www.w3.org/ns/activitystreams#items",
35409
+ index: i,
35410
+ error
35411
+ });
35412
+ continue;
35413
+ }
34337
35414
  }
34338
35415
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.has(0)) {
34339
35416
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -35132,10 +36209,19 @@ var Organization = class Organization extends Object$1 {
35132
36209
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "publicKey" in this._cachedJsonLd) {
35133
36210
  const prop = this._cachedJsonLd["publicKey"];
35134
36211
  const doc = Array.isArray(prop) ? prop[0] : prop;
35135
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#publicKey_fromJsonLd(doc, {
35136
- ...options,
35137
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
35138
- });
36212
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
36213
+ v = await this.#publicKey_fromJsonLd(doc, {
36214
+ ...options,
36215
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36216
+ });
36217
+ } catch (error) {
36218
+ if (!options.suppressError) throw error;
36219
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
36220
+ property: "https://w3id.org/security#publicKey",
36221
+ error
36222
+ });
36223
+ return null;
36224
+ }
35139
36225
  }
35140
36226
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey.has(0)) {
35141
36227
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -35176,10 +36262,20 @@ var Organization = class Organization extends Object$1 {
35176
36262
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "publicKey" in this._cachedJsonLd) {
35177
36263
  const prop = this._cachedJsonLd["publicKey"];
35178
36264
  const obj = Array.isArray(prop) ? prop[i] : prop;
35179
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#publicKey_fromJsonLd(obj, {
35180
- ...options,
35181
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
35182
- });
36265
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
36266
+ v = await this.#publicKey_fromJsonLd(obj, {
36267
+ ...options,
36268
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36269
+ });
36270
+ } catch (error) {
36271
+ if (!options.suppressError) throw error;
36272
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
36273
+ property: "https://w3id.org/security#publicKey",
36274
+ index: i,
36275
+ error
36276
+ });
36277
+ continue;
36278
+ }
35183
36279
  }
35184
36280
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey.has(0)) {
35185
36281
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -35303,10 +36399,19 @@ var Organization = class Organization extends Object$1 {
35303
36399
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "assertionMethod" in this._cachedJsonLd) {
35304
36400
  const prop = this._cachedJsonLd["assertionMethod"];
35305
36401
  const doc = Array.isArray(prop) ? prop[0] : prop;
35306
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#assertionMethod_fromJsonLd(doc, {
35307
- ...options,
35308
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
35309
- });
36402
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
36403
+ v = await this.#assertionMethod_fromJsonLd(doc, {
36404
+ ...options,
36405
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36406
+ });
36407
+ } catch (error) {
36408
+ if (!options.suppressError) throw error;
36409
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
36410
+ property: "https://w3id.org/security#assertionMethod",
36411
+ error
36412
+ });
36413
+ return null;
36414
+ }
35310
36415
  }
35311
36416
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.has(0)) {
35312
36417
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -35350,10 +36455,20 @@ var Organization = class Organization extends Object$1 {
35350
36455
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "assertionMethod" in this._cachedJsonLd) {
35351
36456
  const prop = this._cachedJsonLd["assertionMethod"];
35352
36457
  const obj = Array.isArray(prop) ? prop[i] : prop;
35353
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#assertionMethod_fromJsonLd(obj, {
35354
- ...options,
35355
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
35356
- });
36458
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
36459
+ v = await this.#assertionMethod_fromJsonLd(obj, {
36460
+ ...options,
36461
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36462
+ });
36463
+ } catch (error) {
36464
+ if (!options.suppressError) throw error;
36465
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
36466
+ property: "https://w3id.org/security#assertionMethod",
36467
+ index: i,
36468
+ error
36469
+ });
36470
+ continue;
36471
+ }
35357
36472
  }
35358
36473
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.has(0)) {
35359
36474
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -35508,10 +36623,19 @@ var Organization = class Organization extends Object$1 {
35508
36623
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "inbox" in this._cachedJsonLd) {
35509
36624
  const prop = this._cachedJsonLd["inbox"];
35510
36625
  const doc = Array.isArray(prop) ? prop[0] : prop;
35511
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#inbox_fromJsonLd(doc, {
35512
- ...options,
35513
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
35514
- });
36626
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
36627
+ v = await this.#inbox_fromJsonLd(doc, {
36628
+ ...options,
36629
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36630
+ });
36631
+ } catch (error) {
36632
+ if (!options.suppressError) throw error;
36633
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
36634
+ property: "http://www.w3.org/ns/ldp#inbox",
36635
+ error
36636
+ });
36637
+ return null;
36638
+ }
35515
36639
  }
35516
36640
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.has(0)) {
35517
36641
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -35650,10 +36774,19 @@ var Organization = class Organization extends Object$1 {
35650
36774
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "outbox" in this._cachedJsonLd) {
35651
36775
  const prop = this._cachedJsonLd["outbox"];
35652
36776
  const doc = Array.isArray(prop) ? prop[0] : prop;
35653
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#outbox_fromJsonLd(doc, {
35654
- ...options,
35655
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
35656
- });
36777
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
36778
+ v = await this.#outbox_fromJsonLd(doc, {
36779
+ ...options,
36780
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36781
+ });
36782
+ } catch (error) {
36783
+ if (!options.suppressError) throw error;
36784
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
36785
+ property: "https://www.w3.org/ns/activitystreams#outbox",
36786
+ error
36787
+ });
36788
+ return null;
36789
+ }
35657
36790
  }
35658
36791
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_41QwhqJouoLg3h8dRPKat21brynC_outbox.has(0)) {
35659
36792
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -35777,10 +36910,19 @@ var Organization = class Organization extends Object$1 {
35777
36910
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "following" in this._cachedJsonLd) {
35778
36911
  const prop = this._cachedJsonLd["following"];
35779
36912
  const doc = Array.isArray(prop) ? prop[0] : prop;
35780
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#following_fromJsonLd(doc, {
35781
- ...options,
35782
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
35783
- });
36913
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
36914
+ v = await this.#following_fromJsonLd(doc, {
36915
+ ...options,
36916
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36917
+ });
36918
+ } catch (error) {
36919
+ if (!options.suppressError) throw error;
36920
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
36921
+ property: "https://www.w3.org/ns/activitystreams#following",
36922
+ error
36923
+ });
36924
+ return null;
36925
+ }
35784
36926
  }
35785
36927
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.has(0)) {
35786
36928
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -35907,10 +37049,19 @@ var Organization = class Organization extends Object$1 {
35907
37049
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "followers" in this._cachedJsonLd) {
35908
37050
  const prop = this._cachedJsonLd["followers"];
35909
37051
  const doc = Array.isArray(prop) ? prop[0] : prop;
35910
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#followers_fromJsonLd(doc, {
35911
- ...options,
35912
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
35913
- });
37052
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
37053
+ v = await this.#followers_fromJsonLd(doc, {
37054
+ ...options,
37055
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
37056
+ });
37057
+ } catch (error) {
37058
+ if (!options.suppressError) throw error;
37059
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
37060
+ property: "https://www.w3.org/ns/activitystreams#followers",
37061
+ error
37062
+ });
37063
+ return null;
37064
+ }
35914
37065
  }
35915
37066
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.has(0)) {
35916
37067
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -36035,10 +37186,19 @@ var Organization = class Organization extends Object$1 {
36035
37186
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "liked" in this._cachedJsonLd) {
36036
37187
  const prop = this._cachedJsonLd["liked"];
36037
37188
  const doc = Array.isArray(prop) ? prop[0] : prop;
36038
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#liked_fromJsonLd(doc, {
36039
- ...options,
36040
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36041
- });
37189
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
37190
+ v = await this.#liked_fromJsonLd(doc, {
37191
+ ...options,
37192
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
37193
+ });
37194
+ } catch (error) {
37195
+ if (!options.suppressError) throw error;
37196
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
37197
+ property: "https://www.w3.org/ns/activitystreams#liked",
37198
+ error
37199
+ });
37200
+ return null;
37201
+ }
36042
37202
  }
36043
37203
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.has(0)) {
36044
37204
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -36161,10 +37321,19 @@ var Organization = class Organization extends Object$1 {
36161
37321
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "featured" in this._cachedJsonLd) {
36162
37322
  const prop = this._cachedJsonLd["featured"];
36163
37323
  const doc = Array.isArray(prop) ? prop[0] : prop;
36164
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#featured_fromJsonLd(doc, {
36165
- ...options,
36166
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36167
- });
37324
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
37325
+ v = await this.#featured_fromJsonLd(doc, {
37326
+ ...options,
37327
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
37328
+ });
37329
+ } catch (error) {
37330
+ if (!options.suppressError) throw error;
37331
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
37332
+ property: "http://joinmastodon.org/ns#featured",
37333
+ error
37334
+ });
37335
+ return null;
37336
+ }
36168
37337
  }
36169
37338
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4N1vBJzXDf8NbBumeECQMFvKetja_featured.has(0)) {
36170
37339
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -36287,10 +37456,19 @@ var Organization = class Organization extends Object$1 {
36287
37456
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "featuredTags" in this._cachedJsonLd) {
36288
37457
  const prop = this._cachedJsonLd["featuredTags"];
36289
37458
  const doc = Array.isArray(prop) ? prop[0] : prop;
36290
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#featuredTags_fromJsonLd(doc, {
36291
- ...options,
36292
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36293
- });
37459
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
37460
+ v = await this.#featuredTags_fromJsonLd(doc, {
37461
+ ...options,
37462
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
37463
+ });
37464
+ } catch (error) {
37465
+ if (!options.suppressError) throw error;
37466
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
37467
+ property: "http://joinmastodon.org/ns#featuredTags",
37468
+ error
37469
+ });
37470
+ return null;
37471
+ }
36294
37472
  }
36295
37473
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.has(0)) {
36296
37474
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -36409,10 +37587,20 @@ var Organization = class Organization extends Object$1 {
36409
37587
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "streams" in this._cachedJsonLd) {
36410
37588
  const prop = this._cachedJsonLd["streams"];
36411
37589
  const obj = Array.isArray(prop) ? prop[i] : prop;
36412
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#stream_fromJsonLd(obj, {
36413
- ...options,
36414
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36415
- });
37590
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
37591
+ v = await this.#stream_fromJsonLd(obj, {
37592
+ ...options,
37593
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
37594
+ });
37595
+ } catch (error) {
37596
+ if (!options.suppressError) throw error;
37597
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
37598
+ property: "https://www.w3.org/ns/activitystreams#streams",
37599
+ index: i,
37600
+ error
37601
+ });
37602
+ continue;
37603
+ }
36416
37604
  }
36417
37605
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.has(0)) {
36418
37606
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -36621,10 +37809,19 @@ var Organization = class Organization extends Object$1 {
36621
37809
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "movedTo" in this._cachedJsonLd) {
36622
37810
  const prop = this._cachedJsonLd["movedTo"];
36623
37811
  const doc = Array.isArray(prop) ? prop[0] : prop;
36624
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#successor_fromJsonLd(doc, {
36625
- ...options,
36626
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36627
- });
37812
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
37813
+ v = await this.#successor_fromJsonLd(doc, {
37814
+ ...options,
37815
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
37816
+ });
37817
+ } catch (error) {
37818
+ if (!options.suppressError) throw error;
37819
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
37820
+ property: "https://www.w3.org/ns/activitystreams#movedTo",
37821
+ error
37822
+ });
37823
+ return null;
37824
+ }
36628
37825
  }
36629
37826
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.has(0)) {
36630
37827
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -36793,10 +37990,19 @@ var Organization = class Organization extends Object$1 {
36793
37990
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "alsoKnownAs" in this._cachedJsonLd) {
36794
37991
  const prop = this._cachedJsonLd["alsoKnownAs"];
36795
37992
  const doc = Array.isArray(prop) ? prop[0] : prop;
36796
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#alias_fromJsonLd(doc, {
36797
- ...options,
36798
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36799
- });
37993
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
37994
+ v = await this.#alias_fromJsonLd(doc, {
37995
+ ...options,
37996
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
37997
+ });
37998
+ } catch (error) {
37999
+ if (!options.suppressError) throw error;
38000
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
38001
+ property: "https://www.w3.org/ns/activitystreams#alsoKnownAs",
38002
+ error
38003
+ });
38004
+ return null;
38005
+ }
36800
38006
  }
36801
38007
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.has(0)) {
36802
38008
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -36840,10 +38046,20 @@ var Organization = class Organization extends Object$1 {
36840
38046
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "alsoKnownAs" in this._cachedJsonLd) {
36841
38047
  const prop = this._cachedJsonLd["alsoKnownAs"];
36842
38048
  const obj = Array.isArray(prop) ? prop[i] : prop;
36843
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#alias_fromJsonLd(obj, {
36844
- ...options,
36845
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36846
- });
38049
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
38050
+ v = await this.#alias_fromJsonLd(obj, {
38051
+ ...options,
38052
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
38053
+ });
38054
+ } catch (error) {
38055
+ if (!options.suppressError) throw error;
38056
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
38057
+ property: "https://www.w3.org/ns/activitystreams#alsoKnownAs",
38058
+ index: i,
38059
+ error
38060
+ });
38061
+ continue;
38062
+ }
36847
38063
  }
36848
38064
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.has(0)) {
36849
38065
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -36967,10 +38183,19 @@ var Organization = class Organization extends Object$1 {
36967
38183
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "service" in this._cachedJsonLd) {
36968
38184
  const prop = this._cachedJsonLd["service"];
36969
38185
  const doc = Array.isArray(prop) ? prop[0] : prop;
36970
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#service_fromJsonLd(doc, {
36971
- ...options,
36972
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
36973
- });
38186
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
38187
+ v = await this.#service_fromJsonLd(doc, {
38188
+ ...options,
38189
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
38190
+ });
38191
+ } catch (error) {
38192
+ if (!options.suppressError) throw error;
38193
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
38194
+ property: "https://www.w3.org/ns/did#service",
38195
+ error
38196
+ });
38197
+ return null;
38198
+ }
36974
38199
  }
36975
38200
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.has(0)) {
36976
38201
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -37014,10 +38239,20 @@ var Organization = class Organization extends Object$1 {
37014
38239
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "service" in this._cachedJsonLd) {
37015
38240
  const prop = this._cachedJsonLd["service"];
37016
38241
  const obj = Array.isArray(prop) ? prop[i] : prop;
37017
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#service_fromJsonLd(obj, {
37018
- ...options,
37019
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
37020
- });
38242
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
38243
+ v = await this.#service_fromJsonLd(obj, {
38244
+ ...options,
38245
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
38246
+ });
38247
+ } catch (error) {
38248
+ if (!options.suppressError) throw error;
38249
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
38250
+ property: "https://www.w3.org/ns/did#service",
38251
+ index: i,
38252
+ error
38253
+ });
38254
+ continue;
38255
+ }
37021
38256
  }
37022
38257
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.has(0)) {
37023
38258
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -38757,10 +39992,19 @@ var Person = class Person extends Object$1 {
38757
39992
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "publicKey" in this._cachedJsonLd) {
38758
39993
  const prop = this._cachedJsonLd["publicKey"];
38759
39994
  const doc = Array.isArray(prop) ? prop[0] : prop;
38760
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#publicKey_fromJsonLd(doc, {
38761
- ...options,
38762
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
38763
- });
39995
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
39996
+ v = await this.#publicKey_fromJsonLd(doc, {
39997
+ ...options,
39998
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
39999
+ });
40000
+ } catch (error) {
40001
+ if (!options.suppressError) throw error;
40002
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
40003
+ property: "https://w3id.org/security#publicKey",
40004
+ error
40005
+ });
40006
+ return null;
40007
+ }
38764
40008
  }
38765
40009
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey.has(0)) {
38766
40010
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -38801,10 +40045,20 @@ var Person = class Person extends Object$1 {
38801
40045
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "publicKey" in this._cachedJsonLd) {
38802
40046
  const prop = this._cachedJsonLd["publicKey"];
38803
40047
  const obj = Array.isArray(prop) ? prop[i] : prop;
38804
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#publicKey_fromJsonLd(obj, {
38805
- ...options,
38806
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
38807
- });
40048
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
40049
+ v = await this.#publicKey_fromJsonLd(obj, {
40050
+ ...options,
40051
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40052
+ });
40053
+ } catch (error) {
40054
+ if (!options.suppressError) throw error;
40055
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
40056
+ property: "https://w3id.org/security#publicKey",
40057
+ index: i,
40058
+ error
40059
+ });
40060
+ continue;
40061
+ }
38808
40062
  }
38809
40063
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey.has(0)) {
38810
40064
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -38928,10 +40182,19 @@ var Person = class Person extends Object$1 {
38928
40182
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "assertionMethod" in this._cachedJsonLd) {
38929
40183
  const prop = this._cachedJsonLd["assertionMethod"];
38930
40184
  const doc = Array.isArray(prop) ? prop[0] : prop;
38931
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#assertionMethod_fromJsonLd(doc, {
38932
- ...options,
38933
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
38934
- });
40185
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
40186
+ v = await this.#assertionMethod_fromJsonLd(doc, {
40187
+ ...options,
40188
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40189
+ });
40190
+ } catch (error) {
40191
+ if (!options.suppressError) throw error;
40192
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
40193
+ property: "https://w3id.org/security#assertionMethod",
40194
+ error
40195
+ });
40196
+ return null;
40197
+ }
38935
40198
  }
38936
40199
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.has(0)) {
38937
40200
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -38975,10 +40238,20 @@ var Person = class Person extends Object$1 {
38975
40238
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "assertionMethod" in this._cachedJsonLd) {
38976
40239
  const prop = this._cachedJsonLd["assertionMethod"];
38977
40240
  const obj = Array.isArray(prop) ? prop[i] : prop;
38978
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#assertionMethod_fromJsonLd(obj, {
38979
- ...options,
38980
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
38981
- });
40241
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
40242
+ v = await this.#assertionMethod_fromJsonLd(obj, {
40243
+ ...options,
40244
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40245
+ });
40246
+ } catch (error) {
40247
+ if (!options.suppressError) throw error;
40248
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
40249
+ property: "https://w3id.org/security#assertionMethod",
40250
+ index: i,
40251
+ error
40252
+ });
40253
+ continue;
40254
+ }
38982
40255
  }
38983
40256
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.has(0)) {
38984
40257
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -39133,10 +40406,19 @@ var Person = class Person extends Object$1 {
39133
40406
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "inbox" in this._cachedJsonLd) {
39134
40407
  const prop = this._cachedJsonLd["inbox"];
39135
40408
  const doc = Array.isArray(prop) ? prop[0] : prop;
39136
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#inbox_fromJsonLd(doc, {
39137
- ...options,
39138
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
39139
- });
40409
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
40410
+ v = await this.#inbox_fromJsonLd(doc, {
40411
+ ...options,
40412
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40413
+ });
40414
+ } catch (error) {
40415
+ if (!options.suppressError) throw error;
40416
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
40417
+ property: "http://www.w3.org/ns/ldp#inbox",
40418
+ error
40419
+ });
40420
+ return null;
40421
+ }
39140
40422
  }
39141
40423
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.has(0)) {
39142
40424
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -39275,10 +40557,19 @@ var Person = class Person extends Object$1 {
39275
40557
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "outbox" in this._cachedJsonLd) {
39276
40558
  const prop = this._cachedJsonLd["outbox"];
39277
40559
  const doc = Array.isArray(prop) ? prop[0] : prop;
39278
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#outbox_fromJsonLd(doc, {
39279
- ...options,
39280
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
39281
- });
40560
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
40561
+ v = await this.#outbox_fromJsonLd(doc, {
40562
+ ...options,
40563
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40564
+ });
40565
+ } catch (error) {
40566
+ if (!options.suppressError) throw error;
40567
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
40568
+ property: "https://www.w3.org/ns/activitystreams#outbox",
40569
+ error
40570
+ });
40571
+ return null;
40572
+ }
39282
40573
  }
39283
40574
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_41QwhqJouoLg3h8dRPKat21brynC_outbox.has(0)) {
39284
40575
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -39402,10 +40693,19 @@ var Person = class Person extends Object$1 {
39402
40693
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "following" in this._cachedJsonLd) {
39403
40694
  const prop = this._cachedJsonLd["following"];
39404
40695
  const doc = Array.isArray(prop) ? prop[0] : prop;
39405
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#following_fromJsonLd(doc, {
39406
- ...options,
39407
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
39408
- });
40696
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
40697
+ v = await this.#following_fromJsonLd(doc, {
40698
+ ...options,
40699
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40700
+ });
40701
+ } catch (error) {
40702
+ if (!options.suppressError) throw error;
40703
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
40704
+ property: "https://www.w3.org/ns/activitystreams#following",
40705
+ error
40706
+ });
40707
+ return null;
40708
+ }
39409
40709
  }
39410
40710
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.has(0)) {
39411
40711
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -39532,10 +40832,19 @@ var Person = class Person extends Object$1 {
39532
40832
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "followers" in this._cachedJsonLd) {
39533
40833
  const prop = this._cachedJsonLd["followers"];
39534
40834
  const doc = Array.isArray(prop) ? prop[0] : prop;
39535
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#followers_fromJsonLd(doc, {
39536
- ...options,
39537
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
39538
- });
40835
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
40836
+ v = await this.#followers_fromJsonLd(doc, {
40837
+ ...options,
40838
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40839
+ });
40840
+ } catch (error) {
40841
+ if (!options.suppressError) throw error;
40842
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
40843
+ property: "https://www.w3.org/ns/activitystreams#followers",
40844
+ error
40845
+ });
40846
+ return null;
40847
+ }
39539
40848
  }
39540
40849
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.has(0)) {
39541
40850
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -39660,10 +40969,19 @@ var Person = class Person extends Object$1 {
39660
40969
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "liked" in this._cachedJsonLd) {
39661
40970
  const prop = this._cachedJsonLd["liked"];
39662
40971
  const doc = Array.isArray(prop) ? prop[0] : prop;
39663
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#liked_fromJsonLd(doc, {
39664
- ...options,
39665
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
39666
- });
40972
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
40973
+ v = await this.#liked_fromJsonLd(doc, {
40974
+ ...options,
40975
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40976
+ });
40977
+ } catch (error) {
40978
+ if (!options.suppressError) throw error;
40979
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
40980
+ property: "https://www.w3.org/ns/activitystreams#liked",
40981
+ error
40982
+ });
40983
+ return null;
40984
+ }
39667
40985
  }
39668
40986
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.has(0)) {
39669
40987
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -39786,10 +41104,19 @@ var Person = class Person extends Object$1 {
39786
41104
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "featured" in this._cachedJsonLd) {
39787
41105
  const prop = this._cachedJsonLd["featured"];
39788
41106
  const doc = Array.isArray(prop) ? prop[0] : prop;
39789
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#featured_fromJsonLd(doc, {
39790
- ...options,
39791
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
39792
- });
41107
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
41108
+ v = await this.#featured_fromJsonLd(doc, {
41109
+ ...options,
41110
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
41111
+ });
41112
+ } catch (error) {
41113
+ if (!options.suppressError) throw error;
41114
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
41115
+ property: "http://joinmastodon.org/ns#featured",
41116
+ error
41117
+ });
41118
+ return null;
41119
+ }
39793
41120
  }
39794
41121
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4N1vBJzXDf8NbBumeECQMFvKetja_featured.has(0)) {
39795
41122
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -39912,10 +41239,19 @@ var Person = class Person extends Object$1 {
39912
41239
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "featuredTags" in this._cachedJsonLd) {
39913
41240
  const prop = this._cachedJsonLd["featuredTags"];
39914
41241
  const doc = Array.isArray(prop) ? prop[0] : prop;
39915
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#featuredTags_fromJsonLd(doc, {
39916
- ...options,
39917
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
39918
- });
41242
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
41243
+ v = await this.#featuredTags_fromJsonLd(doc, {
41244
+ ...options,
41245
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
41246
+ });
41247
+ } catch (error) {
41248
+ if (!options.suppressError) throw error;
41249
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
41250
+ property: "http://joinmastodon.org/ns#featuredTags",
41251
+ error
41252
+ });
41253
+ return null;
41254
+ }
39919
41255
  }
39920
41256
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.has(0)) {
39921
41257
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -40034,10 +41370,20 @@ var Person = class Person extends Object$1 {
40034
41370
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "streams" in this._cachedJsonLd) {
40035
41371
  const prop = this._cachedJsonLd["streams"];
40036
41372
  const obj = Array.isArray(prop) ? prop[i] : prop;
40037
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#stream_fromJsonLd(obj, {
40038
- ...options,
40039
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40040
- });
41373
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
41374
+ v = await this.#stream_fromJsonLd(obj, {
41375
+ ...options,
41376
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
41377
+ });
41378
+ } catch (error) {
41379
+ if (!options.suppressError) throw error;
41380
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
41381
+ property: "https://www.w3.org/ns/activitystreams#streams",
41382
+ index: i,
41383
+ error
41384
+ });
41385
+ continue;
41386
+ }
40041
41387
  }
40042
41388
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.has(0)) {
40043
41389
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -40246,10 +41592,19 @@ var Person = class Person extends Object$1 {
40246
41592
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "movedTo" in this._cachedJsonLd) {
40247
41593
  const prop = this._cachedJsonLd["movedTo"];
40248
41594
  const doc = Array.isArray(prop) ? prop[0] : prop;
40249
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#successor_fromJsonLd(doc, {
40250
- ...options,
40251
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40252
- });
41595
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
41596
+ v = await this.#successor_fromJsonLd(doc, {
41597
+ ...options,
41598
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
41599
+ });
41600
+ } catch (error) {
41601
+ if (!options.suppressError) throw error;
41602
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
41603
+ property: "https://www.w3.org/ns/activitystreams#movedTo",
41604
+ error
41605
+ });
41606
+ return null;
41607
+ }
40253
41608
  }
40254
41609
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.has(0)) {
40255
41610
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -40418,10 +41773,19 @@ var Person = class Person extends Object$1 {
40418
41773
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "alsoKnownAs" in this._cachedJsonLd) {
40419
41774
  const prop = this._cachedJsonLd["alsoKnownAs"];
40420
41775
  const doc = Array.isArray(prop) ? prop[0] : prop;
40421
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#alias_fromJsonLd(doc, {
40422
- ...options,
40423
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40424
- });
41776
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
41777
+ v = await this.#alias_fromJsonLd(doc, {
41778
+ ...options,
41779
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
41780
+ });
41781
+ } catch (error) {
41782
+ if (!options.suppressError) throw error;
41783
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
41784
+ property: "https://www.w3.org/ns/activitystreams#alsoKnownAs",
41785
+ error
41786
+ });
41787
+ return null;
41788
+ }
40425
41789
  }
40426
41790
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.has(0)) {
40427
41791
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -40465,10 +41829,20 @@ var Person = class Person extends Object$1 {
40465
41829
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "alsoKnownAs" in this._cachedJsonLd) {
40466
41830
  const prop = this._cachedJsonLd["alsoKnownAs"];
40467
41831
  const obj = Array.isArray(prop) ? prop[i] : prop;
40468
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#alias_fromJsonLd(obj, {
40469
- ...options,
40470
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40471
- });
41832
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
41833
+ v = await this.#alias_fromJsonLd(obj, {
41834
+ ...options,
41835
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
41836
+ });
41837
+ } catch (error) {
41838
+ if (!options.suppressError) throw error;
41839
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
41840
+ property: "https://www.w3.org/ns/activitystreams#alsoKnownAs",
41841
+ index: i,
41842
+ error
41843
+ });
41844
+ continue;
41845
+ }
40472
41846
  }
40473
41847
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.has(0)) {
40474
41848
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -40592,10 +41966,19 @@ var Person = class Person extends Object$1 {
40592
41966
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "service" in this._cachedJsonLd) {
40593
41967
  const prop = this._cachedJsonLd["service"];
40594
41968
  const doc = Array.isArray(prop) ? prop[0] : prop;
40595
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#service_fromJsonLd(doc, {
40596
- ...options,
40597
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40598
- });
41969
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
41970
+ v = await this.#service_fromJsonLd(doc, {
41971
+ ...options,
41972
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
41973
+ });
41974
+ } catch (error) {
41975
+ if (!options.suppressError) throw error;
41976
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
41977
+ property: "https://www.w3.org/ns/did#service",
41978
+ error
41979
+ });
41980
+ return null;
41981
+ }
40599
41982
  }
40600
41983
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.has(0)) {
40601
41984
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -40639,10 +42022,20 @@ var Person = class Person extends Object$1 {
40639
42022
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "service" in this._cachedJsonLd) {
40640
42023
  const prop = this._cachedJsonLd["service"];
40641
42024
  const obj = Array.isArray(prop) ? prop[i] : prop;
40642
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#service_fromJsonLd(obj, {
40643
- ...options,
40644
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
40645
- });
42025
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
42026
+ v = await this.#service_fromJsonLd(obj, {
42027
+ ...options,
42028
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
42029
+ });
42030
+ } catch (error) {
42031
+ if (!options.suppressError) throw error;
42032
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
42033
+ property: "https://www.w3.org/ns/did#service",
42034
+ index: i,
42035
+ error
42036
+ });
42037
+ continue;
42038
+ }
40646
42039
  }
40647
42040
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.has(0)) {
40648
42041
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -42390,10 +43783,19 @@ var Profile = class Profile extends Object$1 {
42390
43783
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "describes" in this._cachedJsonLd) {
42391
43784
  const prop = this._cachedJsonLd["describes"];
42392
43785
  const doc = Array.isArray(prop) ? prop[0] : prop;
42393
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#describes_fromJsonLd(doc, {
42394
- ...options,
42395
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
42396
- });
43786
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
43787
+ v = await this.#describes_fromJsonLd(doc, {
43788
+ ...options,
43789
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
43790
+ });
43791
+ } catch (error) {
43792
+ if (!options.suppressError) throw error;
43793
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
43794
+ property: "https://www.w3.org/ns/activitystreams#describes",
43795
+ error
43796
+ });
43797
+ return null;
43798
+ }
42397
43799
  }
42398
43800
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes.has(0)) {
42399
43801
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -42799,10 +44201,20 @@ var Question = class Question extends IntransitiveActivity {
42799
44201
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "oneOf" in this._cachedJsonLd) {
42800
44202
  const prop = this._cachedJsonLd["oneOf"];
42801
44203
  const obj = Array.isArray(prop) ? prop[i] : prop;
42802
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#exclusiveOption_fromJsonLd(obj, {
42803
- ...options,
42804
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
42805
- });
44204
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
44205
+ v = await this.#exclusiveOption_fromJsonLd(obj, {
44206
+ ...options,
44207
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
44208
+ });
44209
+ } catch (error) {
44210
+ if (!options.suppressError) throw error;
44211
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
44212
+ property: "https://www.w3.org/ns/activitystreams#oneOf",
44213
+ index: i,
44214
+ error
44215
+ });
44216
+ continue;
44217
+ }
42806
44218
  }
42807
44219
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf.has(0)) {
42808
44220
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -42924,10 +44336,20 @@ var Question = class Question extends IntransitiveActivity {
42924
44336
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "anyOf" in this._cachedJsonLd) {
42925
44337
  const prop = this._cachedJsonLd["anyOf"];
42926
44338
  const obj = Array.isArray(prop) ? prop[i] : prop;
42927
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#inclusiveOption_fromJsonLd(obj, {
42928
- ...options,
42929
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
42930
- });
44339
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
44340
+ v = await this.#inclusiveOption_fromJsonLd(obj, {
44341
+ ...options,
44342
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
44343
+ });
44344
+ } catch (error) {
44345
+ if (!options.suppressError) throw error;
44346
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
44347
+ property: "https://www.w3.org/ns/activitystreams#anyOf",
44348
+ index: i,
44349
+ error
44350
+ });
44351
+ continue;
44352
+ }
42931
44353
  }
42932
44354
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2mV6isMTPRKbWdLCjcpiEysq5dAY_anyOf.has(0)) {
42933
44355
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -43066,10 +44488,19 @@ var Question = class Question extends IntransitiveActivity {
43066
44488
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "quote" in this._cachedJsonLd) {
43067
44489
  const prop = this._cachedJsonLd["quote"];
43068
44490
  const doc = Array.isArray(prop) ? prop[0] : prop;
43069
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#quote_fromJsonLd(doc, {
43070
- ...options,
43071
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
43072
- });
44491
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
44492
+ v = await this.#quote_fromJsonLd(doc, {
44493
+ ...options,
44494
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
44495
+ });
44496
+ } catch (error) {
44497
+ if (!options.suppressError) throw error;
44498
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
44499
+ property: "https://w3id.org/fep/044f#quote",
44500
+ error
44501
+ });
44502
+ return null;
44503
+ }
43073
44504
  }
43074
44505
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3obhVLFML2Fh2Qsbg3BM2dec8S9e_quote.has(0)) {
43075
44506
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -43206,10 +44637,19 @@ var Question = class Question extends IntransitiveActivity {
43206
44637
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "quoteAuthorization" in this._cachedJsonLd) {
43207
44638
  const prop = this._cachedJsonLd["quoteAuthorization"];
43208
44639
  const doc = Array.isArray(prop) ? prop[0] : prop;
43209
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#quoteAuthorization_fromJsonLd(doc, {
43210
- ...options,
43211
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
43212
- });
44640
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
44641
+ v = await this.#quoteAuthorization_fromJsonLd(doc, {
44642
+ ...options,
44643
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
44644
+ });
44645
+ } catch (error) {
44646
+ if (!options.suppressError) throw error;
44647
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
44648
+ property: "https://w3id.org/fep/044f#quoteAuthorization",
44649
+ error
44650
+ });
44651
+ return null;
44652
+ }
43213
44653
  }
43214
44654
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_ZKAEiJeuEvjeYkC4pG58D5vAJ4m_quoteAuthorization.has(0)) {
43215
44655
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -43498,7 +44938,7 @@ var Question = class Question extends IntransitiveActivity {
43498
44938
  if (_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null || _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length < 1) _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["http://fedibird.com/ns#quoteUri"];
43499
44939
  for (const v of _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null ? [] : _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length === 1 && "@list" in _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array[0] ? _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array[0]["@list"] : _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array) {
43500
44940
  if (v == null) continue;
43501
- const decoded = new URL(v["@value"]);
44941
+ const decoded = typeof v === "object" && (typeof v["@id"] === "string" && canDecodeIri(v["@id"]) || typeof v["@value"] === "string" && canDecodeIri(v["@value"])) ? decodeIri(typeof v["@id"] === "string" ? v["@id"] : v["@value"]) : void 0;
43502
44942
  if (typeof decoded === "undefined") {
43503
44943
  shouldCacheJsonLd = false;
43504
44944
  continue;
@@ -44103,10 +45543,19 @@ var Relationship = class Relationship extends Object$1 {
44103
45543
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "subject" in this._cachedJsonLd) {
44104
45544
  const prop = this._cachedJsonLd["subject"];
44105
45545
  const doc = Array.isArray(prop) ? prop[0] : prop;
44106
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#subject_fromJsonLd(doc, {
44107
- ...options,
44108
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
44109
- });
45546
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
45547
+ v = await this.#subject_fromJsonLd(doc, {
45548
+ ...options,
45549
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
45550
+ });
45551
+ } catch (error) {
45552
+ if (!options.suppressError) throw error;
45553
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
45554
+ property: "https://www.w3.org/ns/activitystreams#subject",
45555
+ error
45556
+ });
45557
+ return null;
45558
+ }
44110
45559
  }
44111
45560
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject.has(0)) {
44112
45561
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -44226,10 +45675,19 @@ var Relationship = class Relationship extends Object$1 {
44226
45675
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "object" in this._cachedJsonLd) {
44227
45676
  const prop = this._cachedJsonLd["object"];
44228
45677
  const doc = Array.isArray(prop) ? prop[0] : prop;
44229
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#object_fromJsonLd(doc, {
44230
- ...options,
44231
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
44232
- });
45678
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
45679
+ v = await this.#object_fromJsonLd(doc, {
45680
+ ...options,
45681
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
45682
+ });
45683
+ } catch (error) {
45684
+ if (!options.suppressError) throw error;
45685
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
45686
+ property: "https://www.w3.org/ns/activitystreams#object",
45687
+ error
45688
+ });
45689
+ return null;
45690
+ }
44233
45691
  }
44234
45692
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.has(0)) {
44235
45693
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -44270,10 +45728,20 @@ var Relationship = class Relationship extends Object$1 {
44270
45728
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "object" in this._cachedJsonLd) {
44271
45729
  const prop = this._cachedJsonLd["object"];
44272
45730
  const obj = Array.isArray(prop) ? prop[i] : prop;
44273
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#object_fromJsonLd(obj, {
44274
- ...options,
44275
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
44276
- });
45731
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
45732
+ v = await this.#object_fromJsonLd(obj, {
45733
+ ...options,
45734
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
45735
+ });
45736
+ } catch (error) {
45737
+ if (!options.suppressError) throw error;
45738
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
45739
+ property: "https://www.w3.org/ns/activitystreams#object",
45740
+ index: i,
45741
+ error
45742
+ });
45743
+ continue;
45744
+ }
44277
45745
  }
44278
45746
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.has(0)) {
44279
45747
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -44396,10 +45864,19 @@ var Relationship = class Relationship extends Object$1 {
44396
45864
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "relationship" in this._cachedJsonLd) {
44397
45865
  const prop = this._cachedJsonLd["relationship"];
44398
45866
  const doc = Array.isArray(prop) ? prop[0] : prop;
44399
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#relationship_fromJsonLd(doc, {
44400
- ...options,
44401
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
44402
- });
45867
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
45868
+ v = await this.#relationship_fromJsonLd(doc, {
45869
+ ...options,
45870
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
45871
+ });
45872
+ } catch (error) {
45873
+ if (!options.suppressError) throw error;
45874
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
45875
+ property: "https://www.w3.org/ns/activitystreams#relationship",
45876
+ error
45877
+ });
45878
+ return null;
45879
+ }
44403
45880
  }
44404
45881
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship.has(0)) {
44405
45882
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -44442,10 +45919,20 @@ var Relationship = class Relationship extends Object$1 {
44442
45919
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "relationship" in this._cachedJsonLd) {
44443
45920
  const prop = this._cachedJsonLd["relationship"];
44444
45921
  const obj = Array.isArray(prop) ? prop[i] : prop;
44445
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#relationship_fromJsonLd(obj, {
44446
- ...options,
44447
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
44448
- });
45922
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
45923
+ v = await this.#relationship_fromJsonLd(obj, {
45924
+ ...options,
45925
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
45926
+ });
45927
+ } catch (error) {
45928
+ if (!options.suppressError) throw error;
45929
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
45930
+ property: "https://www.w3.org/ns/activitystreams#relationship",
45931
+ index: i,
45932
+ error
45933
+ });
45934
+ continue;
45935
+ }
44449
45936
  }
44450
45937
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship.has(0)) {
44451
45938
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -45309,10 +46796,19 @@ var Service = class Service extends Object$1 {
45309
46796
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "publicKey" in this._cachedJsonLd) {
45310
46797
  const prop = this._cachedJsonLd["publicKey"];
45311
46798
  const doc = Array.isArray(prop) ? prop[0] : prop;
45312
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#publicKey_fromJsonLd(doc, {
45313
- ...options,
45314
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
45315
- });
46799
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
46800
+ v = await this.#publicKey_fromJsonLd(doc, {
46801
+ ...options,
46802
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
46803
+ });
46804
+ } catch (error) {
46805
+ if (!options.suppressError) throw error;
46806
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
46807
+ property: "https://w3id.org/security#publicKey",
46808
+ error
46809
+ });
46810
+ return null;
46811
+ }
45316
46812
  }
45317
46813
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey.has(0)) {
45318
46814
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -45353,10 +46849,20 @@ var Service = class Service extends Object$1 {
45353
46849
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "publicKey" in this._cachedJsonLd) {
45354
46850
  const prop = this._cachedJsonLd["publicKey"];
45355
46851
  const obj = Array.isArray(prop) ? prop[i] : prop;
45356
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#publicKey_fromJsonLd(obj, {
45357
- ...options,
45358
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
45359
- });
46852
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
46853
+ v = await this.#publicKey_fromJsonLd(obj, {
46854
+ ...options,
46855
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
46856
+ });
46857
+ } catch (error) {
46858
+ if (!options.suppressError) throw error;
46859
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
46860
+ property: "https://w3id.org/security#publicKey",
46861
+ index: i,
46862
+ error
46863
+ });
46864
+ continue;
46865
+ }
45360
46866
  }
45361
46867
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey.has(0)) {
45362
46868
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -45480,10 +46986,19 @@ var Service = class Service extends Object$1 {
45480
46986
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "assertionMethod" in this._cachedJsonLd) {
45481
46987
  const prop = this._cachedJsonLd["assertionMethod"];
45482
46988
  const doc = Array.isArray(prop) ? prop[0] : prop;
45483
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#assertionMethod_fromJsonLd(doc, {
45484
- ...options,
45485
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
45486
- });
46989
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
46990
+ v = await this.#assertionMethod_fromJsonLd(doc, {
46991
+ ...options,
46992
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
46993
+ });
46994
+ } catch (error) {
46995
+ if (!options.suppressError) throw error;
46996
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
46997
+ property: "https://w3id.org/security#assertionMethod",
46998
+ error
46999
+ });
47000
+ return null;
47001
+ }
45487
47002
  }
45488
47003
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.has(0)) {
45489
47004
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -45527,10 +47042,20 @@ var Service = class Service extends Object$1 {
45527
47042
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "assertionMethod" in this._cachedJsonLd) {
45528
47043
  const prop = this._cachedJsonLd["assertionMethod"];
45529
47044
  const obj = Array.isArray(prop) ? prop[i] : prop;
45530
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#assertionMethod_fromJsonLd(obj, {
45531
- ...options,
45532
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
45533
- });
47045
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
47046
+ v = await this.#assertionMethod_fromJsonLd(obj, {
47047
+ ...options,
47048
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
47049
+ });
47050
+ } catch (error) {
47051
+ if (!options.suppressError) throw error;
47052
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
47053
+ property: "https://w3id.org/security#assertionMethod",
47054
+ index: i,
47055
+ error
47056
+ });
47057
+ continue;
47058
+ }
45534
47059
  }
45535
47060
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.has(0)) {
45536
47061
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -45685,10 +47210,19 @@ var Service = class Service extends Object$1 {
45685
47210
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "inbox" in this._cachedJsonLd) {
45686
47211
  const prop = this._cachedJsonLd["inbox"];
45687
47212
  const doc = Array.isArray(prop) ? prop[0] : prop;
45688
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#inbox_fromJsonLd(doc, {
45689
- ...options,
45690
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
45691
- });
47213
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
47214
+ v = await this.#inbox_fromJsonLd(doc, {
47215
+ ...options,
47216
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
47217
+ });
47218
+ } catch (error) {
47219
+ if (!options.suppressError) throw error;
47220
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
47221
+ property: "http://www.w3.org/ns/ldp#inbox",
47222
+ error
47223
+ });
47224
+ return null;
47225
+ }
45692
47226
  }
45693
47227
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.has(0)) {
45694
47228
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -45827,10 +47361,19 @@ var Service = class Service extends Object$1 {
45827
47361
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "outbox" in this._cachedJsonLd) {
45828
47362
  const prop = this._cachedJsonLd["outbox"];
45829
47363
  const doc = Array.isArray(prop) ? prop[0] : prop;
45830
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#outbox_fromJsonLd(doc, {
45831
- ...options,
45832
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
45833
- });
47364
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
47365
+ v = await this.#outbox_fromJsonLd(doc, {
47366
+ ...options,
47367
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
47368
+ });
47369
+ } catch (error) {
47370
+ if (!options.suppressError) throw error;
47371
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
47372
+ property: "https://www.w3.org/ns/activitystreams#outbox",
47373
+ error
47374
+ });
47375
+ return null;
47376
+ }
45834
47377
  }
45835
47378
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_41QwhqJouoLg3h8dRPKat21brynC_outbox.has(0)) {
45836
47379
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -45954,10 +47497,19 @@ var Service = class Service extends Object$1 {
45954
47497
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "following" in this._cachedJsonLd) {
45955
47498
  const prop = this._cachedJsonLd["following"];
45956
47499
  const doc = Array.isArray(prop) ? prop[0] : prop;
45957
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#following_fromJsonLd(doc, {
45958
- ...options,
45959
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
45960
- });
47500
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
47501
+ v = await this.#following_fromJsonLd(doc, {
47502
+ ...options,
47503
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
47504
+ });
47505
+ } catch (error) {
47506
+ if (!options.suppressError) throw error;
47507
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
47508
+ property: "https://www.w3.org/ns/activitystreams#following",
47509
+ error
47510
+ });
47511
+ return null;
47512
+ }
45961
47513
  }
45962
47514
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.has(0)) {
45963
47515
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -46084,10 +47636,19 @@ var Service = class Service extends Object$1 {
46084
47636
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "followers" in this._cachedJsonLd) {
46085
47637
  const prop = this._cachedJsonLd["followers"];
46086
47638
  const doc = Array.isArray(prop) ? prop[0] : prop;
46087
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#followers_fromJsonLd(doc, {
46088
- ...options,
46089
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
46090
- });
47639
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
47640
+ v = await this.#followers_fromJsonLd(doc, {
47641
+ ...options,
47642
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
47643
+ });
47644
+ } catch (error) {
47645
+ if (!options.suppressError) throw error;
47646
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
47647
+ property: "https://www.w3.org/ns/activitystreams#followers",
47648
+ error
47649
+ });
47650
+ return null;
47651
+ }
46091
47652
  }
46092
47653
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.has(0)) {
46093
47654
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -46212,10 +47773,19 @@ var Service = class Service extends Object$1 {
46212
47773
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "liked" in this._cachedJsonLd) {
46213
47774
  const prop = this._cachedJsonLd["liked"];
46214
47775
  const doc = Array.isArray(prop) ? prop[0] : prop;
46215
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#liked_fromJsonLd(doc, {
46216
- ...options,
46217
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
46218
- });
47776
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
47777
+ v = await this.#liked_fromJsonLd(doc, {
47778
+ ...options,
47779
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
47780
+ });
47781
+ } catch (error) {
47782
+ if (!options.suppressError) throw error;
47783
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
47784
+ property: "https://www.w3.org/ns/activitystreams#liked",
47785
+ error
47786
+ });
47787
+ return null;
47788
+ }
46219
47789
  }
46220
47790
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.has(0)) {
46221
47791
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -46338,10 +47908,19 @@ var Service = class Service extends Object$1 {
46338
47908
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "featured" in this._cachedJsonLd) {
46339
47909
  const prop = this._cachedJsonLd["featured"];
46340
47910
  const doc = Array.isArray(prop) ? prop[0] : prop;
46341
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#featured_fromJsonLd(doc, {
46342
- ...options,
46343
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
46344
- });
47911
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
47912
+ v = await this.#featured_fromJsonLd(doc, {
47913
+ ...options,
47914
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
47915
+ });
47916
+ } catch (error) {
47917
+ if (!options.suppressError) throw error;
47918
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
47919
+ property: "http://joinmastodon.org/ns#featured",
47920
+ error
47921
+ });
47922
+ return null;
47923
+ }
46345
47924
  }
46346
47925
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4N1vBJzXDf8NbBumeECQMFvKetja_featured.has(0)) {
46347
47926
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -46464,10 +48043,19 @@ var Service = class Service extends Object$1 {
46464
48043
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "featuredTags" in this._cachedJsonLd) {
46465
48044
  const prop = this._cachedJsonLd["featuredTags"];
46466
48045
  const doc = Array.isArray(prop) ? prop[0] : prop;
46467
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#featuredTags_fromJsonLd(doc, {
46468
- ...options,
46469
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
46470
- });
48046
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
48047
+ v = await this.#featuredTags_fromJsonLd(doc, {
48048
+ ...options,
48049
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
48050
+ });
48051
+ } catch (error) {
48052
+ if (!options.suppressError) throw error;
48053
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
48054
+ property: "http://joinmastodon.org/ns#featuredTags",
48055
+ error
48056
+ });
48057
+ return null;
48058
+ }
46471
48059
  }
46472
48060
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.has(0)) {
46473
48061
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -46586,10 +48174,20 @@ var Service = class Service extends Object$1 {
46586
48174
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "streams" in this._cachedJsonLd) {
46587
48175
  const prop = this._cachedJsonLd["streams"];
46588
48176
  const obj = Array.isArray(prop) ? prop[i] : prop;
46589
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#stream_fromJsonLd(obj, {
46590
- ...options,
46591
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
46592
- });
48177
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
48178
+ v = await this.#stream_fromJsonLd(obj, {
48179
+ ...options,
48180
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
48181
+ });
48182
+ } catch (error) {
48183
+ if (!options.suppressError) throw error;
48184
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
48185
+ property: "https://www.w3.org/ns/activitystreams#streams",
48186
+ index: i,
48187
+ error
48188
+ });
48189
+ continue;
48190
+ }
46593
48191
  }
46594
48192
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.has(0)) {
46595
48193
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -46798,10 +48396,19 @@ var Service = class Service extends Object$1 {
46798
48396
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "movedTo" in this._cachedJsonLd) {
46799
48397
  const prop = this._cachedJsonLd["movedTo"];
46800
48398
  const doc = Array.isArray(prop) ? prop[0] : prop;
46801
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#successor_fromJsonLd(doc, {
46802
- ...options,
46803
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
46804
- });
48399
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
48400
+ v = await this.#successor_fromJsonLd(doc, {
48401
+ ...options,
48402
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
48403
+ });
48404
+ } catch (error) {
48405
+ if (!options.suppressError) throw error;
48406
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
48407
+ property: "https://www.w3.org/ns/activitystreams#movedTo",
48408
+ error
48409
+ });
48410
+ return null;
48411
+ }
46805
48412
  }
46806
48413
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.has(0)) {
46807
48414
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -46970,10 +48577,19 @@ var Service = class Service extends Object$1 {
46970
48577
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "alsoKnownAs" in this._cachedJsonLd) {
46971
48578
  const prop = this._cachedJsonLd["alsoKnownAs"];
46972
48579
  const doc = Array.isArray(prop) ? prop[0] : prop;
46973
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#alias_fromJsonLd(doc, {
46974
- ...options,
46975
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
46976
- });
48580
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
48581
+ v = await this.#alias_fromJsonLd(doc, {
48582
+ ...options,
48583
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
48584
+ });
48585
+ } catch (error) {
48586
+ if (!options.suppressError) throw error;
48587
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
48588
+ property: "https://www.w3.org/ns/activitystreams#alsoKnownAs",
48589
+ error
48590
+ });
48591
+ return null;
48592
+ }
46977
48593
  }
46978
48594
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.has(0)) {
46979
48595
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -47017,10 +48633,20 @@ var Service = class Service extends Object$1 {
47017
48633
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "alsoKnownAs" in this._cachedJsonLd) {
47018
48634
  const prop = this._cachedJsonLd["alsoKnownAs"];
47019
48635
  const obj = Array.isArray(prop) ? prop[i] : prop;
47020
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#alias_fromJsonLd(obj, {
47021
- ...options,
47022
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
47023
- });
48636
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
48637
+ v = await this.#alias_fromJsonLd(obj, {
48638
+ ...options,
48639
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
48640
+ });
48641
+ } catch (error) {
48642
+ if (!options.suppressError) throw error;
48643
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
48644
+ property: "https://www.w3.org/ns/activitystreams#alsoKnownAs",
48645
+ index: i,
48646
+ error
48647
+ });
48648
+ continue;
48649
+ }
47024
48650
  }
47025
48651
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.has(0)) {
47026
48652
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -47144,10 +48770,19 @@ var Service = class Service extends Object$1 {
47144
48770
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "service" in this._cachedJsonLd) {
47145
48771
  const prop = this._cachedJsonLd["service"];
47146
48772
  const doc = Array.isArray(prop) ? prop[0] : prop;
47147
- if (doc != null && typeof doc === "object" && "@context" in doc) v = await this.#service_fromJsonLd(doc, {
47148
- ...options,
47149
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
47150
- });
48773
+ if (doc != null && typeof doc === "object" && "@context" in doc) try {
48774
+ v = await this.#service_fromJsonLd(doc, {
48775
+ ...options,
48776
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
48777
+ });
48778
+ } catch (error) {
48779
+ if (!options.suppressError) throw error;
48780
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property}: {error}", {
48781
+ property: "https://www.w3.org/ns/did#service",
48782
+ error
48783
+ });
48784
+ return null;
48785
+ }
47151
48786
  }
47152
48787
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.has(0)) {
47153
48788
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");
@@ -47191,10 +48826,20 @@ var Service = class Service extends Object$1 {
47191
48826
  if (this._cachedJsonLd != null && typeof this._cachedJsonLd === "object" && "@context" in this._cachedJsonLd && "service" in this._cachedJsonLd) {
47192
48827
  const prop = this._cachedJsonLd["service"];
47193
48828
  const obj = Array.isArray(prop) ? prop[i] : prop;
47194
- if (obj != null && typeof obj === "object" && "@context" in obj) v = await this.#service_fromJsonLd(obj, {
47195
- ...options,
47196
- baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
47197
- });
48829
+ if (obj != null && typeof obj === "object" && "@context" in obj) try {
48830
+ v = await this.#service_fromJsonLd(obj, {
48831
+ ...options,
48832
+ baseUrl: options.baseUrl ?? this._baseUrl ?? (this.id != null && (this.id.protocol === "http:" || this.id.protocol === "https:") ? this.id : void 0)
48833
+ });
48834
+ } catch (error) {
48835
+ if (!options.suppressError) throw error;
48836
+ getLogger(["fedify", "vocab"]).debug("Failed to parse embedded value of {property} at index {index}: {error}", {
48837
+ property: "https://www.w3.org/ns/did#service",
48838
+ index: i,
48839
+ error
48840
+ });
48841
+ continue;
48842
+ }
47198
48843
  }
47199
48844
  if (options.crossOrigin !== "trust" && v?.id != null && this.id != null && v.id.origin !== this.id.origin && !this.#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.has(0)) {
47200
48845
  if (options.crossOrigin === "throw") throw new Error("The property object's @id (" + v.id.href + ") has a different origin than the property owner's @id (" + this.id.href + "); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".");