@fedify/vocab 2.0.22-dev.1440 → 2.0.22-dev.1471

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.0.22-dev.1440+7ada752e";
12
+ var version = "2.0.22-dev.1471+cfbcd5d4";
13
13
  //#endregion
14
14
  //#region src/type.ts
15
15
  function getTypeId(object) {
@@ -18,6 +18,15 @@ function getTypeId(object) {
18
18
  }
19
19
  //#endregion
20
20
  //#region src/vocab.ts
21
+ function isValidLanguageTag(language) {
22
+ try {
23
+ new Intl.Locale(language);
24
+ return true;
25
+ } catch (error) {
26
+ if (error instanceof RangeError) return false;
27
+ throw error;
28
+ }
29
+ }
21
30
  /** Describes an object of any kind. The Object type serves as the base type for
22
31
  * most of the other kinds of objects defined in the Activity Vocabulary,
23
32
  * including other Core types such as {@link Activity},
@@ -30,6 +39,7 @@ var Object$1 = class Object$1 {
30
39
  #tracerProvider;
31
40
  #warning;
32
41
  #cachedJsonLd;
42
+ #shouldCacheJsonLd = true;
33
43
  id;
34
44
  get _documentLoader() {
35
45
  return this.#documentLoader;
@@ -49,6 +59,17 @@ var Object$1 = class Object$1 {
49
59
  set _cachedJsonLd(value) {
50
60
  this.#cachedJsonLd = value;
51
61
  }
62
+ get _shouldCacheJsonLd() {
63
+ return this.#shouldCacheJsonLd;
64
+ }
65
+ set _shouldCacheJsonLd(value) {
66
+ this.#shouldCacheJsonLd = value;
67
+ }
68
+ static _shouldCacheDecodedJsonLd(value) {
69
+ if (value == null || typeof value !== "object") return true;
70
+ if (!("_shouldCacheJsonLd" in value)) return true;
71
+ return value._shouldCacheJsonLd;
72
+ }
52
73
  /**
53
74
  * The type URI of {@link Object}: `https://www.w3.org/ns/activitystreams#Object`.
54
75
  */
@@ -4566,6 +4587,7 @@ var Object$1 = class Object$1 {
4566
4587
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Object")) throw new TypeError("Invalid type: " + values["@type"]);
4567
4588
  }
4568
4589
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : void 0 }, options);
4590
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
4569
4591
  const _49BipA5dq9eoH8LX8xdsVumveTca_attachment = [];
4570
4592
  let _49BipA5dq9eoH8LX8xdsVumveTca_attachment__array = values["https://www.w3.org/ns/activitystreams#attachment"];
4571
4593
  for (const v of _49BipA5dq9eoH8LX8xdsVumveTca_attachment__array == null ? [] : _49BipA5dq9eoH8LX8xdsVumveTca_attachment__array.length === 1 && "@list" in _49BipA5dq9eoH8LX8xdsVumveTca_attachment__array[0] ? _49BipA5dq9eoH8LX8xdsVumveTca_attachment__array[0]["@list"] : _49BipA5dq9eoH8LX8xdsVumveTca_attachment__array) {
@@ -4644,7 +4666,11 @@ var Object$1 = class Object$1 {
4644
4666
  ...options,
4645
4667
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
4646
4668
  }) : void 0;
4647
- if (typeof decoded === "undefined") continue;
4669
+ if (typeof decoded === "undefined") {
4670
+ shouldCacheJsonLd = false;
4671
+ continue;
4672
+ }
4673
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
4648
4674
  _49BipA5dq9eoH8LX8xdsVumveTca_attachment.push(decoded);
4649
4675
  }
4650
4676
  instance.#_49BipA5dq9eoH8LX8xdsVumveTca_attachment = _49BipA5dq9eoH8LX8xdsVumveTca_attachment;
@@ -4672,7 +4698,11 @@ var Object$1 = class Object$1 {
4672
4698
  ...options,
4673
4699
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
4674
4700
  }) : void 0;
4675
- if (typeof decoded === "undefined") continue;
4701
+ if (typeof decoded === "undefined") {
4702
+ shouldCacheJsonLd = false;
4703
+ continue;
4704
+ }
4705
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
4676
4706
  _42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py_attributedTo.push(decoded);
4677
4707
  }
4678
4708
  instance.#_42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py_attributedTo = _42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py_attributedTo;
@@ -4684,18 +4714,24 @@ var Object$1 = class Object$1 {
4684
4714
  _3ocC3VVi88cEd5sPWL8djkZsvTN6_audience.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
4685
4715
  continue;
4686
4716
  }
4687
- _3ocC3VVi88cEd5sPWL8djkZsvTN6_audience.push(await Object$1.fromJsonLd(v, {
4717
+ const decoded = await Object$1.fromJsonLd(v, {
4688
4718
  ...options,
4689
4719
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
4690
- }));
4720
+ });
4721
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
4722
+ _3ocC3VVi88cEd5sPWL8djkZsvTN6_audience.push(decoded);
4691
4723
  }
4692
4724
  instance.#_3ocC3VVi88cEd5sPWL8djkZsvTN6_audience = _3ocC3VVi88cEd5sPWL8djkZsvTN6_audience;
4693
4725
  const _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content = [];
4694
4726
  let _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content__array = values["https://www.w3.org/ns/activitystreams#content"];
4695
4727
  for (const v of _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content__array == null ? [] : _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content__array.length === 1 && "@list" in _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content__array[0] ? _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content__array[0]["@list"] : _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content__array) {
4696
4728
  if (v == null) continue;
4697
- const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
4698
- if (typeof decoded === "undefined") continue;
4729
+ const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" && isValidLanguageTag(v["@language"]) ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
4730
+ if (typeof decoded === "undefined") {
4731
+ shouldCacheJsonLd = false;
4732
+ continue;
4733
+ }
4734
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
4699
4735
  _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content.push(decoded);
4700
4736
  }
4701
4737
  instance.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content = _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content;
@@ -4774,7 +4810,11 @@ var Object$1 = class Object$1 {
4774
4810
  ...options,
4775
4811
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
4776
4812
  }) : void 0;
4777
- if (typeof decoded === "undefined") continue;
4813
+ if (typeof decoded === "undefined") {
4814
+ shouldCacheJsonLd = false;
4815
+ continue;
4816
+ }
4817
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
4778
4818
  _3mhZzGXSpQ431mBSz2kvych22v4e_context.push(decoded);
4779
4819
  }
4780
4820
  instance.#_3mhZzGXSpQ431mBSz2kvych22v4e_context = _3mhZzGXSpQ431mBSz2kvych22v4e_context;
@@ -4782,8 +4822,12 @@ var Object$1 = class Object$1 {
4782
4822
  let _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array = values["https://www.w3.org/ns/activitystreams#name"];
4783
4823
  for (const v of _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array == null ? [] : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array.length === 1 && "@list" in _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array[0] ? _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array[0]["@list"] : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array) {
4784
4824
  if (v == null) continue;
4785
- const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
4786
- if (typeof decoded === "undefined") continue;
4825
+ const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" && isValidLanguageTag(v["@language"]) ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
4826
+ if (typeof decoded === "undefined") {
4827
+ shouldCacheJsonLd = false;
4828
+ continue;
4829
+ }
4830
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
4787
4831
  _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.push(decoded);
4788
4832
  }
4789
4833
  instance.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name;
@@ -4791,7 +4835,9 @@ var Object$1 = class Object$1 {
4791
4835
  let _219RwDanjScTv5tYCjwGZVCM7KZ9_endTime__array = values["https://www.w3.org/ns/activitystreams#endTime"];
4792
4836
  for (const v of _219RwDanjScTv5tYCjwGZVCM7KZ9_endTime__array == null ? [] : _219RwDanjScTv5tYCjwGZVCM7KZ9_endTime__array.length === 1 && "@list" in _219RwDanjScTv5tYCjwGZVCM7KZ9_endTime__array[0] ? _219RwDanjScTv5tYCjwGZVCM7KZ9_endTime__array[0]["@list"] : _219RwDanjScTv5tYCjwGZVCM7KZ9_endTime__array) {
4793
4837
  if (v == null) continue;
4794
- _219RwDanjScTv5tYCjwGZVCM7KZ9_endTime.push(Temporal.Instant.from(v["@value"].substring(19).match(/[Z+-]/) ? v["@value"] : v["@value"] + "Z"));
4838
+ const decoded = Temporal.Instant.from(v["@value"].substring(19).match(/[Z+-]/) ? v["@value"] : v["@value"] + "Z");
4839
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
4840
+ _219RwDanjScTv5tYCjwGZVCM7KZ9_endTime.push(decoded);
4795
4841
  }
4796
4842
  instance.#_219RwDanjScTv5tYCjwGZVCM7KZ9_endTime = _219RwDanjScTv5tYCjwGZVCM7KZ9_endTime;
4797
4843
  const _86xFhmgBapoMvYqjbjRuDPayTrS_generator = [];
@@ -4869,7 +4915,11 @@ var Object$1 = class Object$1 {
4869
4915
  ...options,
4870
4916
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
4871
4917
  }) : void 0;
4872
- if (typeof decoded === "undefined") continue;
4918
+ if (typeof decoded === "undefined") {
4919
+ shouldCacheJsonLd = false;
4920
+ continue;
4921
+ }
4922
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
4873
4923
  _86xFhmgBapoMvYqjbjRuDPayTrS_generator.push(decoded);
4874
4924
  }
4875
4925
  instance.#_86xFhmgBapoMvYqjbjRuDPayTrS_generator = _86xFhmgBapoMvYqjbjRuDPayTrS_generator;
@@ -4881,10 +4931,12 @@ var Object$1 = class Object$1 {
4881
4931
  _33CjRLy5ujtsUrwRSCrsggvGdKuR_icon.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
4882
4932
  continue;
4883
4933
  }
4884
- _33CjRLy5ujtsUrwRSCrsggvGdKuR_icon.push(await Image.fromJsonLd(v, {
4934
+ const decoded = await Image.fromJsonLd(v, {
4885
4935
  ...options,
4886
4936
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
4887
- }));
4937
+ });
4938
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
4939
+ _33CjRLy5ujtsUrwRSCrsggvGdKuR_icon.push(decoded);
4888
4940
  }
4889
4941
  instance.#_33CjRLy5ujtsUrwRSCrsggvGdKuR_icon = _33CjRLy5ujtsUrwRSCrsggvGdKuR_icon;
4890
4942
  const _3dXrUdkARxwyJLtJcYi1AJ92H41U_image = [];
@@ -4895,10 +4947,12 @@ var Object$1 = class Object$1 {
4895
4947
  _3dXrUdkARxwyJLtJcYi1AJ92H41U_image.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
4896
4948
  continue;
4897
4949
  }
4898
- _3dXrUdkARxwyJLtJcYi1AJ92H41U_image.push(await Image.fromJsonLd(v, {
4950
+ const decoded = await Image.fromJsonLd(v, {
4899
4951
  ...options,
4900
4952
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
4901
- }));
4953
+ });
4954
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
4955
+ _3dXrUdkARxwyJLtJcYi1AJ92H41U_image.push(decoded);
4902
4956
  }
4903
4957
  instance.#_3dXrUdkARxwyJLtJcYi1AJ92H41U_image = _3dXrUdkARxwyJLtJcYi1AJ92H41U_image;
4904
4958
  const _3fpbDrvZgf3Kq1a5V9aByFn8kx3s_inReplyTo = [];
@@ -4976,7 +5030,11 @@ var Object$1 = class Object$1 {
4976
5030
  ...options,
4977
5031
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
4978
5032
  }) : void 0;
4979
- if (typeof decoded === "undefined") continue;
5033
+ if (typeof decoded === "undefined") {
5034
+ shouldCacheJsonLd = false;
5035
+ continue;
5036
+ }
5037
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
4980
5038
  _3fpbDrvZgf3Kq1a5V9aByFn8kx3s_inReplyTo.push(decoded);
4981
5039
  }
4982
5040
  instance.#_3fpbDrvZgf3Kq1a5V9aByFn8kx3s_inReplyTo = _3fpbDrvZgf3Kq1a5V9aByFn8kx3s_inReplyTo;
@@ -5055,7 +5113,11 @@ var Object$1 = class Object$1 {
5055
5113
  ...options,
5056
5114
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5057
5115
  }) : void 0;
5058
- if (typeof decoded === "undefined") continue;
5116
+ if (typeof decoded === "undefined") {
5117
+ shouldCacheJsonLd = false;
5118
+ continue;
5119
+ }
5120
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5059
5121
  _31k5MUZJsnsPNg8dQQJieWaXTFnR_location.push(decoded);
5060
5122
  }
5061
5123
  instance.#_31k5MUZJsnsPNg8dQQJieWaXTFnR_location = _31k5MUZJsnsPNg8dQQJieWaXTFnR_location;
@@ -5134,7 +5196,11 @@ var Object$1 = class Object$1 {
5134
5196
  ...options,
5135
5197
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5136
5198
  }) : void 0;
5137
- if (typeof decoded === "undefined") continue;
5199
+ if (typeof decoded === "undefined") {
5200
+ shouldCacheJsonLd = false;
5201
+ continue;
5202
+ }
5203
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5138
5204
  _gCVTegXxWWCw6wWRxa1QF65zusg_preview.push(decoded);
5139
5205
  }
5140
5206
  instance.#_gCVTegXxWWCw6wWRxa1QF65zusg_preview = _gCVTegXxWWCw6wWRxa1QF65zusg_preview;
@@ -5142,7 +5208,9 @@ var Object$1 = class Object$1 {
5142
5208
  let _5e258TDXtuhaFRPZiGoDfEpjdMr_published__array = values["https://www.w3.org/ns/activitystreams#published"];
5143
5209
  for (const v of _5e258TDXtuhaFRPZiGoDfEpjdMr_published__array == null ? [] : _5e258TDXtuhaFRPZiGoDfEpjdMr_published__array.length === 1 && "@list" in _5e258TDXtuhaFRPZiGoDfEpjdMr_published__array[0] ? _5e258TDXtuhaFRPZiGoDfEpjdMr_published__array[0]["@list"] : _5e258TDXtuhaFRPZiGoDfEpjdMr_published__array) {
5144
5210
  if (v == null) continue;
5145
- _5e258TDXtuhaFRPZiGoDfEpjdMr_published.push(Temporal.Instant.from(v["@value"].substring(19).match(/[Z+-]/) ? v["@value"] : v["@value"] + "Z"));
5211
+ const decoded = Temporal.Instant.from(v["@value"].substring(19).match(/[Z+-]/) ? v["@value"] : v["@value"] + "Z");
5212
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5213
+ _5e258TDXtuhaFRPZiGoDfEpjdMr_published.push(decoded);
5146
5214
  }
5147
5215
  instance.#_5e258TDXtuhaFRPZiGoDfEpjdMr_published = _5e258TDXtuhaFRPZiGoDfEpjdMr_published;
5148
5216
  const _7UpwM3JWcXhADcscukEehBorf6k_replies = [];
@@ -5153,10 +5221,12 @@ var Object$1 = class Object$1 {
5153
5221
  _7UpwM3JWcXhADcscukEehBorf6k_replies.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
5154
5222
  continue;
5155
5223
  }
5156
- _7UpwM3JWcXhADcscukEehBorf6k_replies.push(await Collection.fromJsonLd(v, {
5224
+ const decoded = await Collection.fromJsonLd(v, {
5157
5225
  ...options,
5158
5226
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5159
- }));
5227
+ });
5228
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5229
+ _7UpwM3JWcXhADcscukEehBorf6k_replies.push(decoded);
5160
5230
  }
5161
5231
  instance.#_7UpwM3JWcXhADcscukEehBorf6k_replies = _7UpwM3JWcXhADcscukEehBorf6k_replies;
5162
5232
  const _3kAfck9PcEYt2L7xug5y99YPbANs_shares = [];
@@ -5167,10 +5237,12 @@ var Object$1 = class Object$1 {
5167
5237
  _3kAfck9PcEYt2L7xug5y99YPbANs_shares.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
5168
5238
  continue;
5169
5239
  }
5170
- _3kAfck9PcEYt2L7xug5y99YPbANs_shares.push(await Collection.fromJsonLd(v, {
5240
+ const decoded = await Collection.fromJsonLd(v, {
5171
5241
  ...options,
5172
5242
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5173
- }));
5243
+ });
5244
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5245
+ _3kAfck9PcEYt2L7xug5y99YPbANs_shares.push(decoded);
5174
5246
  }
5175
5247
  instance.#_3kAfck9PcEYt2L7xug5y99YPbANs_shares = _3kAfck9PcEYt2L7xug5y99YPbANs_shares;
5176
5248
  const _S3ceDnpMdzoTRCccB9FkJWrEzYW_likes = [];
@@ -5181,10 +5253,12 @@ var Object$1 = class Object$1 {
5181
5253
  _S3ceDnpMdzoTRCccB9FkJWrEzYW_likes.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
5182
5254
  continue;
5183
5255
  }
5184
- _S3ceDnpMdzoTRCccB9FkJWrEzYW_likes.push(await Collection.fromJsonLd(v, {
5256
+ const decoded = await Collection.fromJsonLd(v, {
5185
5257
  ...options,
5186
5258
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5187
- }));
5259
+ });
5260
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5261
+ _S3ceDnpMdzoTRCccB9FkJWrEzYW_likes.push(decoded);
5188
5262
  }
5189
5263
  instance.#_S3ceDnpMdzoTRCccB9FkJWrEzYW_likes = _S3ceDnpMdzoTRCccB9FkJWrEzYW_likes;
5190
5264
  const _kMatyyNAuxoTD8GQMBfA5ogThMR_emojiReactions = [];
@@ -5195,25 +5269,33 @@ var Object$1 = class Object$1 {
5195
5269
  _kMatyyNAuxoTD8GQMBfA5ogThMR_emojiReactions.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
5196
5270
  continue;
5197
5271
  }
5198
- _kMatyyNAuxoTD8GQMBfA5ogThMR_emojiReactions.push(await Collection.fromJsonLd(v, {
5272
+ const decoded = await Collection.fromJsonLd(v, {
5199
5273
  ...options,
5200
5274
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5201
- }));
5275
+ });
5276
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5277
+ _kMatyyNAuxoTD8GQMBfA5ogThMR_emojiReactions.push(decoded);
5202
5278
  }
5203
5279
  instance.#_kMatyyNAuxoTD8GQMBfA5ogThMR_emojiReactions = _kMatyyNAuxoTD8GQMBfA5ogThMR_emojiReactions;
5204
5280
  const _2w3Jmue4up8iVDUA51WZqomEF438_startTime = [];
5205
5281
  let _2w3Jmue4up8iVDUA51WZqomEF438_startTime__array = values["https://www.w3.org/ns/activitystreams#startTime"];
5206
5282
  for (const v of _2w3Jmue4up8iVDUA51WZqomEF438_startTime__array == null ? [] : _2w3Jmue4up8iVDUA51WZqomEF438_startTime__array.length === 1 && "@list" in _2w3Jmue4up8iVDUA51WZqomEF438_startTime__array[0] ? _2w3Jmue4up8iVDUA51WZqomEF438_startTime__array[0]["@list"] : _2w3Jmue4up8iVDUA51WZqomEF438_startTime__array) {
5207
5283
  if (v == null) continue;
5208
- _2w3Jmue4up8iVDUA51WZqomEF438_startTime.push(Temporal.Instant.from(v["@value"].substring(19).match(/[Z+-]/) ? v["@value"] : v["@value"] + "Z"));
5284
+ const decoded = Temporal.Instant.from(v["@value"].substring(19).match(/[Z+-]/) ? v["@value"] : v["@value"] + "Z");
5285
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5286
+ _2w3Jmue4up8iVDUA51WZqomEF438_startTime.push(decoded);
5209
5287
  }
5210
5288
  instance.#_2w3Jmue4up8iVDUA51WZqomEF438_startTime = _2w3Jmue4up8iVDUA51WZqomEF438_startTime;
5211
5289
  const _4LqirZspQbFWWQEbFcXAxm7tTDN1_summary = [];
5212
5290
  let _4LqirZspQbFWWQEbFcXAxm7tTDN1_summary__array = values["https://www.w3.org/ns/activitystreams#summary"];
5213
5291
  for (const v of _4LqirZspQbFWWQEbFcXAxm7tTDN1_summary__array == null ? [] : _4LqirZspQbFWWQEbFcXAxm7tTDN1_summary__array.length === 1 && "@list" in _4LqirZspQbFWWQEbFcXAxm7tTDN1_summary__array[0] ? _4LqirZspQbFWWQEbFcXAxm7tTDN1_summary__array[0]["@list"] : _4LqirZspQbFWWQEbFcXAxm7tTDN1_summary__array) {
5214
5292
  if (v == null) continue;
5215
- const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
5216
- if (typeof decoded === "undefined") continue;
5293
+ const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" && isValidLanguageTag(v["@language"]) ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
5294
+ if (typeof decoded === "undefined") {
5295
+ shouldCacheJsonLd = false;
5296
+ continue;
5297
+ }
5298
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5217
5299
  _4LqirZspQbFWWQEbFcXAxm7tTDN1_summary.push(decoded);
5218
5300
  }
5219
5301
  instance.#_4LqirZspQbFWWQEbFcXAxm7tTDN1_summary = _4LqirZspQbFWWQEbFcXAxm7tTDN1_summary;
@@ -5292,7 +5374,11 @@ var Object$1 = class Object$1 {
5292
5374
  ...options,
5293
5375
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5294
5376
  }) : void 0;
5295
- if (typeof decoded === "undefined") continue;
5377
+ if (typeof decoded === "undefined") {
5378
+ shouldCacheJsonLd = false;
5379
+ continue;
5380
+ }
5381
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5296
5382
  _5chuqj6s95p5gg2sk1HntGfarRf_tag.push(decoded);
5297
5383
  }
5298
5384
  instance.#_5chuqj6s95p5gg2sk1HntGfarRf_tag = _5chuqj6s95p5gg2sk1HntGfarRf_tag;
@@ -5300,7 +5386,9 @@ var Object$1 = class Object$1 {
5300
5386
  let _385aB7ySixcf5Un6z3VsWmThgCzQ_updated__array = values["https://www.w3.org/ns/activitystreams#updated"];
5301
5387
  for (const v of _385aB7ySixcf5Un6z3VsWmThgCzQ_updated__array == null ? [] : _385aB7ySixcf5Un6z3VsWmThgCzQ_updated__array.length === 1 && "@list" in _385aB7ySixcf5Un6z3VsWmThgCzQ_updated__array[0] ? _385aB7ySixcf5Un6z3VsWmThgCzQ_updated__array[0]["@list"] : _385aB7ySixcf5Un6z3VsWmThgCzQ_updated__array) {
5302
5388
  if (v == null) continue;
5303
- _385aB7ySixcf5Un6z3VsWmThgCzQ_updated.push(Temporal.Instant.from(v["@value"].substring(19).match(/[Z+-]/) ? v["@value"] : v["@value"] + "Z"));
5389
+ const decoded = Temporal.Instant.from(v["@value"].substring(19).match(/[Z+-]/) ? v["@value"] : v["@value"] + "Z");
5390
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5391
+ _385aB7ySixcf5Un6z3VsWmThgCzQ_updated.push(decoded);
5304
5392
  }
5305
5393
  instance.#_385aB7ySixcf5Un6z3VsWmThgCzQ_updated = _385aB7ySixcf5Un6z3VsWmThgCzQ_updated;
5306
5394
  const _2oPEH9MQ3aj8JVwyYuWkqoVwV865_url = [];
@@ -5315,7 +5403,11 @@ var Object$1 = class Object$1 {
5315
5403
  ...options,
5316
5404
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5317
5405
  }) : void 0;
5318
- if (typeof decoded === "undefined") continue;
5406
+ if (typeof decoded === "undefined") {
5407
+ shouldCacheJsonLd = false;
5408
+ continue;
5409
+ }
5410
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5319
5411
  _2oPEH9MQ3aj8JVwyYuWkqoVwV865_url.push(decoded);
5320
5412
  }
5321
5413
  instance.#_2oPEH9MQ3aj8JVwyYuWkqoVwV865_url = _2oPEH9MQ3aj8JVwyYuWkqoVwV865_url;
@@ -5327,10 +5419,12 @@ var Object$1 = class Object$1 {
5327
5419
  _3hFbw7DTpHhq3cvVhkY8njhcsXbd_to.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
5328
5420
  continue;
5329
5421
  }
5330
- _3hFbw7DTpHhq3cvVhkY8njhcsXbd_to.push(await Object$1.fromJsonLd(v, {
5422
+ const decoded = await Object$1.fromJsonLd(v, {
5331
5423
  ...options,
5332
5424
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5333
- }));
5425
+ });
5426
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5427
+ _3hFbw7DTpHhq3cvVhkY8njhcsXbd_to.push(decoded);
5334
5428
  }
5335
5429
  instance.#_3hFbw7DTpHhq3cvVhkY8njhcsXbd_to = _3hFbw7DTpHhq3cvVhkY8njhcsXbd_to;
5336
5430
  const _aLZupjwL8XB7tzdLgCMXdjZ6qej_bto = [];
@@ -5341,10 +5435,12 @@ var Object$1 = class Object$1 {
5341
5435
  _aLZupjwL8XB7tzdLgCMXdjZ6qej_bto.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
5342
5436
  continue;
5343
5437
  }
5344
- _aLZupjwL8XB7tzdLgCMXdjZ6qej_bto.push(await Object$1.fromJsonLd(v, {
5438
+ const decoded = await Object$1.fromJsonLd(v, {
5345
5439
  ...options,
5346
5440
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5347
- }));
5441
+ });
5442
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5443
+ _aLZupjwL8XB7tzdLgCMXdjZ6qej_bto.push(decoded);
5348
5444
  }
5349
5445
  instance.#_aLZupjwL8XB7tzdLgCMXdjZ6qej_bto = _aLZupjwL8XB7tzdLgCMXdjZ6qej_bto;
5350
5446
  const _42a1SvBs24QSLzKcfjCyNTjW5a1g_cc = [];
@@ -5355,10 +5451,12 @@ var Object$1 = class Object$1 {
5355
5451
  _42a1SvBs24QSLzKcfjCyNTjW5a1g_cc.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
5356
5452
  continue;
5357
5453
  }
5358
- _42a1SvBs24QSLzKcfjCyNTjW5a1g_cc.push(await Object$1.fromJsonLd(v, {
5454
+ const decoded = await Object$1.fromJsonLd(v, {
5359
5455
  ...options,
5360
5456
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5361
- }));
5457
+ });
5458
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5459
+ _42a1SvBs24QSLzKcfjCyNTjW5a1g_cc.push(decoded);
5362
5460
  }
5363
5461
  instance.#_42a1SvBs24QSLzKcfjCyNTjW5a1g_cc = _42a1SvBs24QSLzKcfjCyNTjW5a1g_cc;
5364
5462
  const _3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc = [];
@@ -5369,41 +5467,51 @@ var Object$1 = class Object$1 {
5369
5467
  _3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
5370
5468
  continue;
5371
5469
  }
5372
- _3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc.push(await Object$1.fromJsonLd(v, {
5470
+ const decoded = await Object$1.fromJsonLd(v, {
5373
5471
  ...options,
5374
5472
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5375
- }));
5473
+ });
5474
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5475
+ _3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc.push(decoded);
5376
5476
  }
5377
5477
  instance.#_3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc = _3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc;
5378
5478
  const _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = [];
5379
5479
  let _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array = values["https://www.w3.org/ns/activitystreams#mediaType"];
5380
5480
  for (const v of _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array == null ? [] : _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array.length === 1 && "@list" in _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array[0] ? _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array[0]["@list"] : _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array) {
5381
5481
  if (v == null) continue;
5382
- _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.push(v["@value"]);
5482
+ const decoded = v["@value"];
5483
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5484
+ _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.push(decoded);
5383
5485
  }
5384
5486
  instance.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType;
5385
5487
  const _3bNvLMBN1bCJETiTihM3wvi1B2JX_duration = [];
5386
5488
  let _3bNvLMBN1bCJETiTihM3wvi1B2JX_duration__array = values["https://www.w3.org/ns/activitystreams#duration"];
5387
5489
  for (const v of _3bNvLMBN1bCJETiTihM3wvi1B2JX_duration__array == null ? [] : _3bNvLMBN1bCJETiTihM3wvi1B2JX_duration__array.length === 1 && "@list" in _3bNvLMBN1bCJETiTihM3wvi1B2JX_duration__array[0] ? _3bNvLMBN1bCJETiTihM3wvi1B2JX_duration__array[0]["@list"] : _3bNvLMBN1bCJETiTihM3wvi1B2JX_duration__array) {
5388
5490
  if (v == null) continue;
5389
- _3bNvLMBN1bCJETiTihM3wvi1B2JX_duration.push(Temporal.Duration.from(v["@value"]));
5491
+ const decoded = Temporal.Duration.from(v["@value"]);
5492
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5493
+ _3bNvLMBN1bCJETiTihM3wvi1B2JX_duration.push(decoded);
5390
5494
  }
5391
5495
  instance.#_3bNvLMBN1bCJETiTihM3wvi1B2JX_duration = _3bNvLMBN1bCJETiTihM3wvi1B2JX_duration;
5392
5496
  const _u8gdcDTtChQ4tbSQMXc4cYWyum7_sensitive = [];
5393
5497
  let _u8gdcDTtChQ4tbSQMXc4cYWyum7_sensitive__array = values["https://www.w3.org/ns/activitystreams#sensitive"];
5394
5498
  for (const v of _u8gdcDTtChQ4tbSQMXc4cYWyum7_sensitive__array == null ? [] : _u8gdcDTtChQ4tbSQMXc4cYWyum7_sensitive__array.length === 1 && "@list" in _u8gdcDTtChQ4tbSQMXc4cYWyum7_sensitive__array[0] ? _u8gdcDTtChQ4tbSQMXc4cYWyum7_sensitive__array[0]["@list"] : _u8gdcDTtChQ4tbSQMXc4cYWyum7_sensitive__array) {
5395
5499
  if (v == null) continue;
5396
- _u8gdcDTtChQ4tbSQMXc4cYWyum7_sensitive.push(v["@value"]);
5500
+ const decoded = v["@value"];
5501
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5502
+ _u8gdcDTtChQ4tbSQMXc4cYWyum7_sensitive.push(decoded);
5397
5503
  }
5398
5504
  instance.#_u8gdcDTtChQ4tbSQMXc4cYWyum7_sensitive = _u8gdcDTtChQ4tbSQMXc4cYWyum7_sensitive;
5399
5505
  const _2ZwCFoS787v8y8bXKjMoE6MAbrEB_source = [];
5400
5506
  let _2ZwCFoS787v8y8bXKjMoE6MAbrEB_source__array = values["https://www.w3.org/ns/activitystreams#source"];
5401
5507
  for (const v of _2ZwCFoS787v8y8bXKjMoE6MAbrEB_source__array == null ? [] : _2ZwCFoS787v8y8bXKjMoE6MAbrEB_source__array.length === 1 && "@list" in _2ZwCFoS787v8y8bXKjMoE6MAbrEB_source__array[0] ? _2ZwCFoS787v8y8bXKjMoE6MAbrEB_source__array[0]["@list"] : _2ZwCFoS787v8y8bXKjMoE6MAbrEB_source__array) {
5402
5508
  if (v == null) continue;
5403
- _2ZwCFoS787v8y8bXKjMoE6MAbrEB_source.push(await Source.fromJsonLd(v, {
5509
+ const decoded = await Source.fromJsonLd(v, {
5404
5510
  ...options,
5405
5511
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5406
- }));
5512
+ });
5513
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5514
+ _2ZwCFoS787v8y8bXKjMoE6MAbrEB_source.push(decoded);
5407
5515
  }
5408
5516
  instance.#_2ZwCFoS787v8y8bXKjMoE6MAbrEB_source = _2ZwCFoS787v8y8bXKjMoE6MAbrEB_source;
5409
5517
  const _42rPnotok1ivQ2RNCKNbeFJgx8b8_proof = [];
@@ -5414,13 +5522,16 @@ var Object$1 = class Object$1 {
5414
5522
  _42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
5415
5523
  continue;
5416
5524
  }
5417
- _42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.push(await DataIntegrityProof.fromJsonLd(v, {
5525
+ const decoded = await DataIntegrityProof.fromJsonLd(v, {
5418
5526
  ...options,
5419
5527
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
5420
- }));
5528
+ });
5529
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
5530
+ _42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.push(decoded);
5421
5531
  }
5422
5532
  instance.#_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof = _42rPnotok1ivQ2RNCKNbeFJgx8b8_proof;
5423
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
5533
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
5534
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
5424
5535
  instance._cachedJsonLd = structuredClone(json);
5425
5536
  } catch {
5426
5537
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -5761,7 +5872,9 @@ var Emoji = class Emoji extends Object$1 {
5761
5872
  _fromSubclass: true
5762
5873
  });
5763
5874
  if (!(instance instanceof Emoji)) throw new TypeError("Unexpected type: " + instance.constructor.name);
5764
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
5875
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
5876
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
5877
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
5765
5878
  instance._cachedJsonLd = structuredClone(json);
5766
5879
  } catch {
5767
5880
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -5998,16 +6111,20 @@ var ChatMessage = class ChatMessage extends Object$1 {
5998
6111
  _fromSubclass: true
5999
6112
  });
6000
6113
  if (!(instance instanceof ChatMessage)) throw new TypeError("Unexpected type: " + instance.constructor.name);
6114
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
6001
6115
  const _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl = [];
6002
6116
  let _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["https://www.w3.org/ns/activitystreams#quoteUrl"];
6003
6117
  if (_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null || _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length < 1) _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["https://misskey-hub.net/ns#_misskey_quote"];
6004
6118
  if (_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null || _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length < 1) _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["http://fedibird.com/ns#quoteUri"];
6005
6119
  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) {
6006
6120
  if (v == null) continue;
6007
- _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl.push(new URL(v["@value"]));
6121
+ const decoded = new URL(v["@value"]);
6122
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
6123
+ _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl.push(decoded);
6008
6124
  }
6009
6125
  instance.#_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl = _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl;
6010
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
6126
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
6127
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
6011
6128
  instance._cachedJsonLd = structuredClone(json);
6012
6129
  } catch {
6013
6130
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -7443,6 +7560,7 @@ var Activity = class Activity extends Object$1 {
7443
7560
  _fromSubclass: true
7444
7561
  });
7445
7562
  if (!(instance instanceof Activity)) throw new TypeError("Unexpected type: " + instance.constructor.name);
7563
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
7446
7564
  const _2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor = [];
7447
7565
  let _2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor__array = values["https://www.w3.org/ns/activitystreams#actor"];
7448
7566
  for (const v of _2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor__array == null ? [] : _2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor__array.length === 1 && "@list" in _2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor__array[0] ? _2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor__array[0]["@list"] : _2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor__array) {
@@ -7467,7 +7585,11 @@ var Activity = class Activity extends Object$1 {
7467
7585
  ...options,
7468
7586
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
7469
7587
  }) : void 0;
7470
- if (typeof decoded === "undefined") continue;
7588
+ if (typeof decoded === "undefined") {
7589
+ shouldCacheJsonLd = false;
7590
+ continue;
7591
+ }
7592
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
7471
7593
  _2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor.push(decoded);
7472
7594
  }
7473
7595
  instance.#_2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor = _2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor;
@@ -7479,10 +7601,12 @@ var Activity = class Activity extends Object$1 {
7479
7601
  _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
7480
7602
  continue;
7481
7603
  }
7482
- _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(await Object$1.fromJsonLd(v, {
7604
+ const decoded = await Object$1.fromJsonLd(v, {
7483
7605
  ...options,
7484
7606
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
7485
- }));
7607
+ });
7608
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
7609
+ _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(decoded);
7486
7610
  }
7487
7611
  instance.#_2MH19yxjn1wnHsNfa5n4JBhJzxyc_object = _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object;
7488
7612
  const _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target = [];
@@ -7493,10 +7617,12 @@ var Activity = class Activity extends Object$1 {
7493
7617
  _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
7494
7618
  continue;
7495
7619
  }
7496
- _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target.push(await Object$1.fromJsonLd(v, {
7620
+ const decoded = await Object$1.fromJsonLd(v, {
7497
7621
  ...options,
7498
7622
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
7499
- }));
7623
+ });
7624
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
7625
+ _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target.push(decoded);
7500
7626
  }
7501
7627
  instance.#_3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target = _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target;
7502
7628
  const _u4QGFbRFcYmPEKGbPv1hpBR9r5G_result = [];
@@ -7507,10 +7633,12 @@ var Activity = class Activity extends Object$1 {
7507
7633
  _u4QGFbRFcYmPEKGbPv1hpBR9r5G_result.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
7508
7634
  continue;
7509
7635
  }
7510
- _u4QGFbRFcYmPEKGbPv1hpBR9r5G_result.push(await Object$1.fromJsonLd(v, {
7636
+ const decoded = await Object$1.fromJsonLd(v, {
7511
7637
  ...options,
7512
7638
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
7513
- }));
7639
+ });
7640
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
7641
+ _u4QGFbRFcYmPEKGbPv1hpBR9r5G_result.push(decoded);
7514
7642
  }
7515
7643
  instance.#_u4QGFbRFcYmPEKGbPv1hpBR9r5G_result = _u4QGFbRFcYmPEKGbPv1hpBR9r5G_result;
7516
7644
  const _25zu2s3VxVujgEKqrDycjE284XQR_origin = [];
@@ -7521,10 +7649,12 @@ var Activity = class Activity extends Object$1 {
7521
7649
  _25zu2s3VxVujgEKqrDycjE284XQR_origin.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
7522
7650
  continue;
7523
7651
  }
7524
- _25zu2s3VxVujgEKqrDycjE284XQR_origin.push(await Object$1.fromJsonLd(v, {
7652
+ const decoded = await Object$1.fromJsonLd(v, {
7525
7653
  ...options,
7526
7654
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
7527
- }));
7655
+ });
7656
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
7657
+ _25zu2s3VxVujgEKqrDycjE284XQR_origin.push(decoded);
7528
7658
  }
7529
7659
  instance.#_25zu2s3VxVujgEKqrDycjE284XQR_origin = _25zu2s3VxVujgEKqrDycjE284XQR_origin;
7530
7660
  const _3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument = [];
@@ -7535,13 +7665,16 @@ var Activity = class Activity extends Object$1 {
7535
7665
  _3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
7536
7666
  continue;
7537
7667
  }
7538
- _3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument.push(await Object$1.fromJsonLd(v, {
7668
+ const decoded = await Object$1.fromJsonLd(v, {
7539
7669
  ...options,
7540
7670
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
7541
- }));
7671
+ });
7672
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
7673
+ _3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument.push(decoded);
7542
7674
  }
7543
7675
  instance.#_3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument = _3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument;
7544
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
7676
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
7677
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
7545
7678
  instance._cachedJsonLd = structuredClone(json);
7546
7679
  } catch {
7547
7680
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -7731,7 +7864,9 @@ var EmojiReact = class EmojiReact extends Activity {
7731
7864
  _fromSubclass: true
7732
7865
  });
7733
7866
  if (!(instance instanceof EmojiReact)) throw new TypeError("Unexpected type: " + instance.constructor.name);
7734
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
7867
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
7868
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
7869
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
7735
7870
  instance._cachedJsonLd = structuredClone(json);
7736
7871
  } catch {
7737
7872
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -7756,6 +7891,7 @@ var PropertyValue = class {
7756
7891
  #tracerProvider;
7757
7892
  #warning;
7758
7893
  #cachedJsonLd;
7894
+ #shouldCacheJsonLd = true;
7759
7895
  id;
7760
7896
  get _documentLoader() {
7761
7897
  return this.#documentLoader;
@@ -7775,6 +7911,17 @@ var PropertyValue = class {
7775
7911
  set _cachedJsonLd(value) {
7776
7912
  this.#cachedJsonLd = value;
7777
7913
  }
7914
+ get _shouldCacheJsonLd() {
7915
+ return this.#shouldCacheJsonLd;
7916
+ }
7917
+ set _shouldCacheJsonLd(value) {
7918
+ this.#shouldCacheJsonLd = value;
7919
+ }
7920
+ static _shouldCacheDecodedJsonLd(value) {
7921
+ if (value == null || typeof value !== "object") return true;
7922
+ if (!("_shouldCacheJsonLd" in value)) return true;
7923
+ return value._shouldCacheJsonLd;
7924
+ }
7778
7925
  /**
7779
7926
  * The type URI of {@link PropertyValue}: `http://schema.org#PropertyValue`.
7780
7927
  */
@@ -7972,12 +8119,17 @@ var PropertyValue = class {
7972
8119
  if (!values["@type"].includes("http://schema.org#PropertyValue")) throw new TypeError("Invalid type: " + values["@type"]);
7973
8120
  }
7974
8121
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : void 0 }, options);
8122
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
7975
8123
  const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [];
7976
8124
  let _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array = values["https://www.w3.org/ns/activitystreams#name"];
7977
8125
  for (const v of _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array == null ? [] : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array.length === 1 && "@list" in _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array[0] ? _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array[0]["@list"] : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array) {
7978
8126
  if (v == null) continue;
7979
- const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
7980
- if (typeof decoded === "undefined") continue;
8127
+ const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" && isValidLanguageTag(v["@language"]) ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
8128
+ if (typeof decoded === "undefined") {
8129
+ shouldCacheJsonLd = false;
8130
+ continue;
8131
+ }
8132
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
7981
8133
  _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.push(decoded);
7982
8134
  }
7983
8135
  instance.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name;
@@ -7985,12 +8137,17 @@ var PropertyValue = class {
7985
8137
  let _2cSy2magg4iZ7zLaG8U7DiJMoCkx_value__array = values["http://schema.org#value"];
7986
8138
  for (const v of _2cSy2magg4iZ7zLaG8U7DiJMoCkx_value__array == null ? [] : _2cSy2magg4iZ7zLaG8U7DiJMoCkx_value__array.length === 1 && "@list" in _2cSy2magg4iZ7zLaG8U7DiJMoCkx_value__array[0] ? _2cSy2magg4iZ7zLaG8U7DiJMoCkx_value__array[0]["@list"] : _2cSy2magg4iZ7zLaG8U7DiJMoCkx_value__array) {
7987
8139
  if (v == null) continue;
7988
- const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
7989
- if (typeof decoded === "undefined") continue;
8140
+ const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" && isValidLanguageTag(v["@language"]) ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
8141
+ if (typeof decoded === "undefined") {
8142
+ shouldCacheJsonLd = false;
8143
+ continue;
8144
+ }
8145
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
7990
8146
  _2cSy2magg4iZ7zLaG8U7DiJMoCkx_value.push(decoded);
7991
8147
  }
7992
8148
  instance.#_2cSy2magg4iZ7zLaG8U7DiJMoCkx_value = _2cSy2magg4iZ7zLaG8U7DiJMoCkx_value;
7993
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
8149
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
8150
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
7994
8151
  instance._cachedJsonLd = structuredClone(json);
7995
8152
  } catch {
7996
8153
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -8033,6 +8190,7 @@ var DidService = class {
8033
8190
  #tracerProvider;
8034
8191
  #warning;
8035
8192
  #cachedJsonLd;
8193
+ #shouldCacheJsonLd = true;
8036
8194
  id;
8037
8195
  get _documentLoader() {
8038
8196
  return this.#documentLoader;
@@ -8052,6 +8210,17 @@ var DidService = class {
8052
8210
  set _cachedJsonLd(value) {
8053
8211
  this.#cachedJsonLd = value;
8054
8212
  }
8213
+ get _shouldCacheJsonLd() {
8214
+ return this.#shouldCacheJsonLd;
8215
+ }
8216
+ set _shouldCacheJsonLd(value) {
8217
+ this.#shouldCacheJsonLd = value;
8218
+ }
8219
+ static _shouldCacheDecodedJsonLd(value) {
8220
+ if (value == null || typeof value !== "object") return true;
8221
+ if (!("_shouldCacheJsonLd" in value)) return true;
8222
+ return value._shouldCacheJsonLd;
8223
+ }
8055
8224
  /**
8056
8225
  * The type URI of {@link DidService}: `https://www.w3.org/ns/did#Service`.
8057
8226
  */
@@ -8207,14 +8376,18 @@ var DidService = class {
8207
8376
  if (!values["@type"].includes("https://www.w3.org/ns/did#Service")) throw new TypeError("Invalid type: " + values["@type"]);
8208
8377
  }
8209
8378
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : void 0 }, options);
8379
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
8210
8380
  const _2KM4fetG6FTJ1cphj76rzJ8Dyv7p_serviceEndpoint = [];
8211
8381
  let _2KM4fetG6FTJ1cphj76rzJ8Dyv7p_serviceEndpoint__array = values["https://www.w3.org/ns/did#serviceEndpoint"];
8212
8382
  for (const v of _2KM4fetG6FTJ1cphj76rzJ8Dyv7p_serviceEndpoint__array == null ? [] : _2KM4fetG6FTJ1cphj76rzJ8Dyv7p_serviceEndpoint__array.length === 1 && "@list" in _2KM4fetG6FTJ1cphj76rzJ8Dyv7p_serviceEndpoint__array[0] ? _2KM4fetG6FTJ1cphj76rzJ8Dyv7p_serviceEndpoint__array[0]["@list"] : _2KM4fetG6FTJ1cphj76rzJ8Dyv7p_serviceEndpoint__array) {
8213
8383
  if (v == null) continue;
8214
- _2KM4fetG6FTJ1cphj76rzJ8Dyv7p_serviceEndpoint.push(v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"])));
8384
+ const decoded = v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"]));
8385
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
8386
+ _2KM4fetG6FTJ1cphj76rzJ8Dyv7p_serviceEndpoint.push(decoded);
8215
8387
  }
8216
8388
  instance.#_2KM4fetG6FTJ1cphj76rzJ8Dyv7p_serviceEndpoint = _2KM4fetG6FTJ1cphj76rzJ8Dyv7p_serviceEndpoint;
8217
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
8389
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
8390
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
8218
8391
  instance._cachedJsonLd = structuredClone(json);
8219
8392
  } catch {
8220
8393
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -8365,7 +8538,9 @@ var Export = class Export extends DidService {
8365
8538
  _fromSubclass: true
8366
8539
  });
8367
8540
  if (!(instance instanceof Export)) throw new TypeError("Unexpected type: " + instance.constructor.name);
8368
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
8541
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
8542
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
8543
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
8369
8544
  instance._cachedJsonLd = structuredClone(json);
8370
8545
  } catch {
8371
8546
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -8391,6 +8566,7 @@ var DataIntegrityProof = class {
8391
8566
  #tracerProvider;
8392
8567
  #warning;
8393
8568
  #cachedJsonLd;
8569
+ #shouldCacheJsonLd = true;
8394
8570
  id;
8395
8571
  get _documentLoader() {
8396
8572
  return this.#documentLoader;
@@ -8410,6 +8586,17 @@ var DataIntegrityProof = class {
8410
8586
  set _cachedJsonLd(value) {
8411
8587
  this.#cachedJsonLd = value;
8412
8588
  }
8589
+ get _shouldCacheJsonLd() {
8590
+ return this.#shouldCacheJsonLd;
8591
+ }
8592
+ set _shouldCacheJsonLd(value) {
8593
+ this.#shouldCacheJsonLd = value;
8594
+ }
8595
+ static _shouldCacheDecodedJsonLd(value) {
8596
+ if (value == null || typeof value !== "object") return true;
8597
+ if (!("_shouldCacheJsonLd" in value)) return true;
8598
+ return value._shouldCacheJsonLd;
8599
+ }
8413
8600
  /**
8414
8601
  * The type URI of {@link DataIntegrityProof}: `https://w3id.org/security#DataIntegrityProof`.
8415
8602
  */
@@ -8752,11 +8939,14 @@ var DataIntegrityProof = class {
8752
8939
  if (!values["@type"].includes("https://w3id.org/security#DataIntegrityProof")) throw new TypeError("Invalid type: " + values["@type"]);
8753
8940
  }
8754
8941
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : void 0 }, options);
8942
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
8755
8943
  const _3RurJsa7tnptyqMFR5hDGcP9pMs5_cryptosuite = [];
8756
8944
  let _3RurJsa7tnptyqMFR5hDGcP9pMs5_cryptosuite__array = values["https://w3id.org/security#cryptosuite"];
8757
8945
  for (const v of _3RurJsa7tnptyqMFR5hDGcP9pMs5_cryptosuite__array == null ? [] : _3RurJsa7tnptyqMFR5hDGcP9pMs5_cryptosuite__array.length === 1 && "@list" in _3RurJsa7tnptyqMFR5hDGcP9pMs5_cryptosuite__array[0] ? _3RurJsa7tnptyqMFR5hDGcP9pMs5_cryptosuite__array[0]["@list"] : _3RurJsa7tnptyqMFR5hDGcP9pMs5_cryptosuite__array) {
8758
8946
  if (v == null) continue;
8759
- _3RurJsa7tnptyqMFR5hDGcP9pMs5_cryptosuite.push(v["@value"]);
8947
+ const decoded = v["@value"];
8948
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
8949
+ _3RurJsa7tnptyqMFR5hDGcP9pMs5_cryptosuite.push(decoded);
8760
8950
  }
8761
8951
  instance.#_3RurJsa7tnptyqMFR5hDGcP9pMs5_cryptosuite = _3RurJsa7tnptyqMFR5hDGcP9pMs5_cryptosuite;
8762
8952
  const _2mHVKxqA7zncjveJrDEo3pWpMZqg_verificationMethod = [];
@@ -8767,34 +8957,43 @@ var DataIntegrityProof = class {
8767
8957
  _2mHVKxqA7zncjveJrDEo3pWpMZqg_verificationMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
8768
8958
  continue;
8769
8959
  }
8770
- _2mHVKxqA7zncjveJrDEo3pWpMZqg_verificationMethod.push(await Multikey.fromJsonLd(v, {
8960
+ const decoded = await Multikey.fromJsonLd(v, {
8771
8961
  ...options,
8772
8962
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
8773
- }));
8963
+ });
8964
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
8965
+ _2mHVKxqA7zncjveJrDEo3pWpMZqg_verificationMethod.push(decoded);
8774
8966
  }
8775
8967
  instance.#_2mHVKxqA7zncjveJrDEo3pWpMZqg_verificationMethod = _2mHVKxqA7zncjveJrDEo3pWpMZqg_verificationMethod;
8776
8968
  const _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb_proofPurpose = [];
8777
8969
  let _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb_proofPurpose__array = values["https://w3id.org/security#proofPurpose"];
8778
8970
  for (const v of _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb_proofPurpose__array == null ? [] : _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb_proofPurpose__array.length === 1 && "@list" in _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb_proofPurpose__array[0] ? _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb_proofPurpose__array[0]["@list"] : _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb_proofPurpose__array) {
8779
8971
  if (v == null) continue;
8780
- _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb_proofPurpose.push(v["@id"].substring(26));
8972
+ const decoded = v["@id"].substring(26);
8973
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
8974
+ _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb_proofPurpose.push(decoded);
8781
8975
  }
8782
8976
  instance.#_2AeEnPcAvVrPEuKbpmn9ZKNmWHKb_proofPurpose = _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb_proofPurpose;
8783
8977
  const _3CjFK5vfKpX4HQuNh2b18TykoVLq_proofValue = [];
8784
8978
  let _3CjFK5vfKpX4HQuNh2b18TykoVLq_proofValue__array = values["https://w3id.org/security#proofValue"];
8785
8979
  for (const v of _3CjFK5vfKpX4HQuNh2b18TykoVLq_proofValue__array == null ? [] : _3CjFK5vfKpX4HQuNh2b18TykoVLq_proofValue__array.length === 1 && "@list" in _3CjFK5vfKpX4HQuNh2b18TykoVLq_proofValue__array[0] ? _3CjFK5vfKpX4HQuNh2b18TykoVLq_proofValue__array[0]["@list"] : _3CjFK5vfKpX4HQuNh2b18TykoVLq_proofValue__array) {
8786
8980
  if (v == null) continue;
8787
- _3CjFK5vfKpX4HQuNh2b18TykoVLq_proofValue.push(decodeMultibase(v["@value"]));
8981
+ const decoded = decodeMultibase(v["@value"]);
8982
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
8983
+ _3CjFK5vfKpX4HQuNh2b18TykoVLq_proofValue.push(decoded);
8788
8984
  }
8789
8985
  instance.#_3CjFK5vfKpX4HQuNh2b18TykoVLq_proofValue = _3CjFK5vfKpX4HQuNh2b18TykoVLq_proofValue;
8790
8986
  const _3qzP3ukEZoUziK5FEiA1RhU4aqac = [];
8791
8987
  let _3qzP3ukEZoUziK5FEiA1RhU4aqac__array = values["http://purl.org/dc/terms/created"];
8792
8988
  for (const v of _3qzP3ukEZoUziK5FEiA1RhU4aqac__array == null ? [] : _3qzP3ukEZoUziK5FEiA1RhU4aqac__array.length === 1 && "@list" in _3qzP3ukEZoUziK5FEiA1RhU4aqac__array[0] ? _3qzP3ukEZoUziK5FEiA1RhU4aqac__array[0]["@list"] : _3qzP3ukEZoUziK5FEiA1RhU4aqac__array) {
8793
8989
  if (v == null) continue;
8794
- _3qzP3ukEZoUziK5FEiA1RhU4aqac.push(Temporal.Instant.from(v["@value"].substring(19).match(/[Z+-]/) ? v["@value"] : v["@value"] + "Z"));
8990
+ const decoded = Temporal.Instant.from(v["@value"].substring(19).match(/[Z+-]/) ? v["@value"] : v["@value"] + "Z");
8991
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
8992
+ _3qzP3ukEZoUziK5FEiA1RhU4aqac.push(decoded);
8795
8993
  }
8796
8994
  instance.#_3qzP3ukEZoUziK5FEiA1RhU4aqac = _3qzP3ukEZoUziK5FEiA1RhU4aqac;
8797
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
8995
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
8996
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
8798
8997
  instance._cachedJsonLd = structuredClone(json);
8799
8998
  } catch {
8800
8999
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -8849,6 +9048,7 @@ var CryptographicKey = class {
8849
9048
  #tracerProvider;
8850
9049
  #warning;
8851
9050
  #cachedJsonLd;
9051
+ #shouldCacheJsonLd = true;
8852
9052
  id;
8853
9053
  get _documentLoader() {
8854
9054
  return this.#documentLoader;
@@ -8868,6 +9068,17 @@ var CryptographicKey = class {
8868
9068
  set _cachedJsonLd(value) {
8869
9069
  this.#cachedJsonLd = value;
8870
9070
  }
9071
+ get _shouldCacheJsonLd() {
9072
+ return this.#shouldCacheJsonLd;
9073
+ }
9074
+ set _shouldCacheJsonLd(value) {
9075
+ this.#shouldCacheJsonLd = value;
9076
+ }
9077
+ static _shouldCacheDecodedJsonLd(value) {
9078
+ if (value == null || typeof value !== "object") return true;
9079
+ if (!("_shouldCacheJsonLd" in value)) return true;
9080
+ return value._shouldCacheJsonLd;
9081
+ }
8871
9082
  /**
8872
9083
  * The type URI of {@link CryptographicKey}: `https://w3id.org/security#Key`.
8873
9084
  */
@@ -9228,6 +9439,7 @@ var CryptographicKey = class {
9228
9439
  if (!values["@type"].includes("https://w3id.org/security#Key")) throw new TypeError("Invalid type: " + values["@type"]);
9229
9440
  }
9230
9441
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : void 0 }, options);
9442
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
9231
9443
  const _5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner = [];
9232
9444
  let _5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner__array = values["https://w3id.org/security#owner"];
9233
9445
  for (const v of _5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner__array == null ? [] : _5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner__array.length === 1 && "@list" in _5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner__array[0] ? _5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner__array[0]["@list"] : _5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner__array) {
@@ -9252,7 +9464,11 @@ var CryptographicKey = class {
9252
9464
  ...options,
9253
9465
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
9254
9466
  }) : void 0;
9255
- if (typeof decoded === "undefined") continue;
9467
+ if (typeof decoded === "undefined") {
9468
+ shouldCacheJsonLd = false;
9469
+ continue;
9470
+ }
9471
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
9256
9472
  _5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner.push(decoded);
9257
9473
  }
9258
9474
  instance.#_5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner = _5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner;
@@ -9260,10 +9476,13 @@ var CryptographicKey = class {
9260
9476
  let _2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem__array = values["https://w3id.org/security#publicKeyPem"];
9261
9477
  for (const v of _2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem__array == null ? [] : _2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem__array.length === 1 && "@list" in _2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem__array[0] ? _2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem__array[0]["@list"] : _2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem__array) {
9262
9478
  if (v == null) continue;
9263
- _2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem.push(await importPem(v["@value"]));
9479
+ const decoded = await importPem(v["@value"]);
9480
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
9481
+ _2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem.push(decoded);
9264
9482
  }
9265
9483
  instance.#_2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem = _2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem;
9266
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
9484
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
9485
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
9267
9486
  instance._cachedJsonLd = structuredClone(json);
9268
9487
  } catch {
9269
9488
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -9306,6 +9525,7 @@ var Multikey = class {
9306
9525
  #tracerProvider;
9307
9526
  #warning;
9308
9527
  #cachedJsonLd;
9528
+ #shouldCacheJsonLd = true;
9309
9529
  id;
9310
9530
  get _documentLoader() {
9311
9531
  return this.#documentLoader;
@@ -9325,6 +9545,17 @@ var Multikey = class {
9325
9545
  set _cachedJsonLd(value) {
9326
9546
  this.#cachedJsonLd = value;
9327
9547
  }
9548
+ get _shouldCacheJsonLd() {
9549
+ return this.#shouldCacheJsonLd;
9550
+ }
9551
+ set _shouldCacheJsonLd(value) {
9552
+ this.#shouldCacheJsonLd = value;
9553
+ }
9554
+ static _shouldCacheDecodedJsonLd(value) {
9555
+ if (value == null || typeof value !== "object") return true;
9556
+ if (!("_shouldCacheJsonLd" in value)) return true;
9557
+ return value._shouldCacheJsonLd;
9558
+ }
9328
9559
  /**
9329
9560
  * The type URI of {@link Multikey}: `https://w3id.org/security#Multikey`.
9330
9561
  */
@@ -9691,6 +9922,7 @@ var Multikey = class {
9691
9922
  if (!values["@type"].includes("https://w3id.org/security#Multikey")) throw new TypeError("Invalid type: " + values["@type"]);
9692
9923
  }
9693
9924
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : void 0 }, options);
9925
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
9694
9926
  const _2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller = [];
9695
9927
  let _2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller__array = values["https://w3id.org/security#controller"];
9696
9928
  for (const v of _2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller__array == null ? [] : _2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller__array.length === 1 && "@list" in _2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller__array[0] ? _2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller__array[0]["@list"] : _2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller__array) {
@@ -9715,7 +9947,11 @@ var Multikey = class {
9715
9947
  ...options,
9716
9948
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
9717
9949
  }) : void 0;
9718
- if (typeof decoded === "undefined") continue;
9950
+ if (typeof decoded === "undefined") {
9951
+ shouldCacheJsonLd = false;
9952
+ continue;
9953
+ }
9954
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
9719
9955
  _2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller.push(decoded);
9720
9956
  }
9721
9957
  instance.#_2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller = _2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller;
@@ -9723,10 +9959,13 @@ var Multikey = class {
9723
9959
  let _4XLHbsR2gLVWU3NpEqKt9wANzn4F_publicKeyMultibase__array = values["https://w3id.org/security#publicKeyMultibase"];
9724
9960
  for (const v of _4XLHbsR2gLVWU3NpEqKt9wANzn4F_publicKeyMultibase__array == null ? [] : _4XLHbsR2gLVWU3NpEqKt9wANzn4F_publicKeyMultibase__array.length === 1 && "@list" in _4XLHbsR2gLVWU3NpEqKt9wANzn4F_publicKeyMultibase__array[0] ? _4XLHbsR2gLVWU3NpEqKt9wANzn4F_publicKeyMultibase__array[0]["@list"] : _4XLHbsR2gLVWU3NpEqKt9wANzn4F_publicKeyMultibase__array) {
9725
9961
  if (v == null) continue;
9726
- _4XLHbsR2gLVWU3NpEqKt9wANzn4F_publicKeyMultibase.push(await importMultibaseKey(v["@value"]));
9962
+ const decoded = await importMultibaseKey(v["@value"]);
9963
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
9964
+ _4XLHbsR2gLVWU3NpEqKt9wANzn4F_publicKeyMultibase.push(decoded);
9727
9965
  }
9728
9966
  instance.#_4XLHbsR2gLVWU3NpEqKt9wANzn4F_publicKeyMultibase = _4XLHbsR2gLVWU3NpEqKt9wANzn4F_publicKeyMultibase;
9729
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
9967
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
9968
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
9730
9969
  instance._cachedJsonLd = structuredClone(json);
9731
9970
  } catch {
9732
9971
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -9891,7 +10130,9 @@ var Accept = class Accept extends Activity {
9891
10130
  _fromSubclass: true
9892
10131
  });
9893
10132
  if (!(instance instanceof Accept)) throw new TypeError("Unexpected type: " + instance.constructor.name);
9894
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
10133
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
10134
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
10135
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
9895
10136
  instance._cachedJsonLd = structuredClone(json);
9896
10137
  } catch {
9897
10138
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -10041,7 +10282,9 @@ var Add = class Add extends Activity {
10041
10282
  _fromSubclass: true
10042
10283
  });
10043
10284
  if (!(instance instanceof Add)) throw new TypeError("Unexpected type: " + instance.constructor.name);
10044
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
10285
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
10286
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
10287
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
10045
10288
  instance._cachedJsonLd = structuredClone(json);
10046
10289
  } catch {
10047
10290
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -10209,7 +10452,9 @@ var Announce = class Announce extends Activity {
10209
10452
  _fromSubclass: true
10210
10453
  });
10211
10454
  if (!(instance instanceof Announce)) throw new TypeError("Unexpected type: " + instance.constructor.name);
10212
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
10455
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
10456
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
10457
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
10213
10458
  instance._cachedJsonLd = structuredClone(json);
10214
10459
  } catch {
10215
10460
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -13074,12 +13319,17 @@ var Application = class Application extends Object$1 {
13074
13319
  _fromSubclass: true
13075
13320
  });
13076
13321
  if (!(instance instanceof Application)) throw new TypeError("Unexpected type: " + instance.constructor.name);
13322
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
13077
13323
  const _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername = [];
13078
13324
  let _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array = values["https://www.w3.org/ns/activitystreams#preferredUsername"];
13079
13325
  for (const v of _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array == null ? [] : _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array.length === 1 && "@list" in _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array[0] ? _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array[0]["@list"] : _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array) {
13080
13326
  if (v == null) continue;
13081
- const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
13082
- if (typeof decoded === "undefined") continue;
13327
+ const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" && isValidLanguageTag(v["@language"]) ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
13328
+ if (typeof decoded === "undefined") {
13329
+ shouldCacheJsonLd = false;
13330
+ continue;
13331
+ }
13332
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13083
13333
  _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.push(decoded);
13084
13334
  }
13085
13335
  instance.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername = _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername;
@@ -13091,10 +13341,12 @@ var Application = class Application extends Object$1 {
13091
13341
  _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
13092
13342
  continue;
13093
13343
  }
13094
- _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, {
13344
+ const decoded = await CryptographicKey.fromJsonLd(v, {
13095
13345
  ...options,
13096
13346
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13097
- }));
13347
+ });
13348
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13349
+ _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(decoded);
13098
13350
  }
13099
13351
  instance.#_axq166E2eZADq34V4MYUc8KMZdC_publicKey = _axq166E2eZADq34V4MYUc8KMZdC_publicKey;
13100
13352
  const _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
@@ -13105,17 +13357,21 @@ var Application = class Application extends Object$1 {
13105
13357
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
13106
13358
  continue;
13107
13359
  }
13108
- _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, {
13360
+ const decoded = await Multikey.fromJsonLd(v, {
13109
13361
  ...options,
13110
13362
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13111
- }));
13363
+ });
13364
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13365
+ _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
13112
13366
  }
13113
13367
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
13114
13368
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
13115
13369
  let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
13116
13370
  for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
13117
13371
  if (v == null) continue;
13118
- _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.push(v["@value"]);
13372
+ const decoded = v["@value"];
13373
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13374
+ _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.push(decoded);
13119
13375
  }
13120
13376
  instance.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
13121
13377
  const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
@@ -13133,7 +13389,11 @@ var Application = class Application extends Object$1 {
13133
13389
  ...options,
13134
13390
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13135
13391
  }) : void 0;
13136
- if (typeof decoded === "undefined") continue;
13392
+ if (typeof decoded === "undefined") {
13393
+ shouldCacheJsonLd = false;
13394
+ continue;
13395
+ }
13396
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13137
13397
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
13138
13398
  }
13139
13399
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -13152,7 +13412,11 @@ var Application = class Application extends Object$1 {
13152
13412
  ...options,
13153
13413
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13154
13414
  }) : void 0;
13155
- if (typeof decoded === "undefined") continue;
13415
+ if (typeof decoded === "undefined") {
13416
+ shouldCacheJsonLd = false;
13417
+ continue;
13418
+ }
13419
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13156
13420
  _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
13157
13421
  }
13158
13422
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = _41QwhqJouoLg3h8dRPKat21brynC_outbox;
@@ -13164,10 +13428,12 @@ var Application = class Application extends Object$1 {
13164
13428
  _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
13165
13429
  continue;
13166
13430
  }
13167
- _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, {
13431
+ const decoded = await Collection.fromJsonLd(v, {
13168
13432
  ...options,
13169
13433
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13170
- }));
13434
+ });
13435
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13436
+ _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(decoded);
13171
13437
  }
13172
13438
  instance.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following = _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following;
13173
13439
  const _BBCTgfphhsFzpVfKTykGSpBNwoA_followers = [];
@@ -13178,10 +13444,12 @@ var Application = class Application extends Object$1 {
13178
13444
  _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
13179
13445
  continue;
13180
13446
  }
13181
- _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, {
13447
+ const decoded = await Collection.fromJsonLd(v, {
13182
13448
  ...options,
13183
13449
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13184
- }));
13450
+ });
13451
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13452
+ _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(decoded);
13185
13453
  }
13186
13454
  instance.#_BBCTgfphhsFzpVfKTykGSpBNwoA_followers = _BBCTgfphhsFzpVfKTykGSpBNwoA_followers;
13187
13455
  const _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked = [];
@@ -13192,10 +13460,12 @@ var Application = class Application extends Object$1 {
13192
13460
  _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
13193
13461
  continue;
13194
13462
  }
13195
- _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, {
13463
+ const decoded = await Collection.fromJsonLd(v, {
13196
13464
  ...options,
13197
13465
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13198
- }));
13466
+ });
13467
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13468
+ _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(decoded);
13199
13469
  }
13200
13470
  instance.#_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked = _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked;
13201
13471
  const _4N1vBJzXDf8NbBumeECQMFvKetja_featured = [];
@@ -13206,10 +13476,12 @@ var Application = class Application extends Object$1 {
13206
13476
  _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
13207
13477
  continue;
13208
13478
  }
13209
- _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, {
13479
+ const decoded = await Collection.fromJsonLd(v, {
13210
13480
  ...options,
13211
13481
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13212
- }));
13482
+ });
13483
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13484
+ _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(decoded);
13213
13485
  }
13214
13486
  instance.#_4N1vBJzXDf8NbBumeECQMFvKetja_featured = _4N1vBJzXDf8NbBumeECQMFvKetja_featured;
13215
13487
  const _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags = [];
@@ -13220,10 +13492,12 @@ var Application = class Application extends Object$1 {
13220
13492
  _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
13221
13493
  continue;
13222
13494
  }
13223
- _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, {
13495
+ const decoded = await Collection.fromJsonLd(v, {
13224
13496
  ...options,
13225
13497
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13226
- }));
13498
+ });
13499
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13500
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(decoded);
13227
13501
  }
13228
13502
  instance.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags = _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags;
13229
13503
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams = [];
@@ -13234,48 +13508,60 @@ var Application = class Application extends Object$1 {
13234
13508
  _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
13235
13509
  continue;
13236
13510
  }
13237
- _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, {
13511
+ const decoded = await Collection.fromJsonLd(v, {
13238
13512
  ...options,
13239
13513
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13240
- }));
13514
+ });
13515
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13516
+ _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(decoded);
13241
13517
  }
13242
13518
  instance.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams = _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams;
13243
13519
  const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints = [];
13244
13520
  let _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array = values["https://www.w3.org/ns/activitystreams#endpoints"];
13245
13521
  for (const v of _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array == null ? [] : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array.length === 1 && "@list" in _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array[0] ? _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array[0]["@list"] : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array) {
13246
13522
  if (v == null) continue;
13247
- _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints.push(await Endpoints.fromJsonLd(v, {
13523
+ const decoded = await Endpoints.fromJsonLd(v, {
13248
13524
  ...options,
13249
13525
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13250
- }));
13526
+ });
13527
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13528
+ _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints.push(decoded);
13251
13529
  }
13252
13530
  instance.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints = _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints;
13253
13531
  const _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable = [];
13254
13532
  let _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array = values["http://joinmastodon.org/ns#discoverable"];
13255
13533
  for (const v of _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array == null ? [] : _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array.length === 1 && "@list" in _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array[0] ? _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array[0]["@list"] : _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array) {
13256
13534
  if (v == null) continue;
13257
- _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable.push(v["@value"]);
13535
+ const decoded = v["@value"];
13536
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13537
+ _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable.push(decoded);
13258
13538
  }
13259
13539
  instance.#_gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable = _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable;
13260
13540
  const _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = [];
13261
13541
  let _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array = values["http://joinmastodon.org/ns#suspended"];
13262
13542
  for (const v of _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array == null ? [] : _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array.length === 1 && "@list" in _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array[0] ? _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array[0]["@list"] : _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array) {
13263
13543
  if (v == null) continue;
13264
- _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended.push(v["@value"]);
13544
+ const decoded = v["@value"];
13545
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13546
+ _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended.push(decoded);
13265
13547
  }
13266
13548
  instance.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended;
13267
13549
  const _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = [];
13268
13550
  let _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array = values["http://joinmastodon.org/ns#memorial"];
13269
13551
  for (const v of _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array == null ? [] : _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array.length === 1 && "@list" in _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array[0] ? _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array[0]["@list"] : _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array) {
13270
13552
  if (v == null) continue;
13271
- _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial.push(v["@value"]);
13553
+ const decoded = v["@value"];
13554
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13555
+ _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial.push(decoded);
13272
13556
  }
13273
13557
  instance.#_79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial;
13274
13558
  const _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = [];
13275
13559
  let _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array = values["http://joinmastodon.org/ns#indexable"];
13276
13560
  for (const v of _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array == null ? [] : _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array.length === 1 && "@list" in _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array[0] ? _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array[0]["@list"] : _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array) {
13277
13561
  if (v == null) continue;
13278
- _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.push(v["@value"]);
13562
+ const decoded = v["@value"];
13563
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13564
+ _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.push(decoded);
13279
13565
  }
13280
13566
  instance.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable;
13281
13567
  const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
@@ -13302,7 +13588,11 @@ var Application = class Application extends Object$1 {
13302
13588
  ...options,
13303
13589
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13304
13590
  }) : void 0;
13305
- if (typeof decoded === "undefined") continue;
13591
+ if (typeof decoded === "undefined") {
13592
+ shouldCacheJsonLd = false;
13593
+ continue;
13594
+ }
13595
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13306
13596
  _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(decoded);
13307
13597
  }
13308
13598
  instance.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
@@ -13330,7 +13620,11 @@ var Application = class Application extends Object$1 {
13330
13620
  ...options,
13331
13621
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13332
13622
  }) : void 0;
13333
- if (typeof decoded === "undefined") continue;
13623
+ if (typeof decoded === "undefined") {
13624
+ shouldCacheJsonLd = false;
13625
+ continue;
13626
+ }
13627
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13334
13628
  _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(decoded);
13335
13629
  }
13336
13630
  instance.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs;
@@ -13342,27 +13636,34 @@ var Application = class Application extends Object$1 {
13342
13636
  _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
13343
13637
  continue;
13344
13638
  }
13345
- _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(await DidService.fromJsonLd(v, {
13639
+ const decoded = await DidService.fromJsonLd(v, {
13346
13640
  ...options,
13347
13641
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
13348
- }));
13642
+ });
13643
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13644
+ _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(decoded);
13349
13645
  }
13350
13646
  instance.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service;
13351
13647
  const _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
13352
13648
  let _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array = values["https://misskey-hub.net/ns#_misskey_followedMessage"];
13353
13649
  for (const v of _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array == null ? [] : _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array.length === 1 && "@list" in _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array[0] ? _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array[0]["@list"] : _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array) {
13354
13650
  if (v == null) continue;
13355
- _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage.push(v["@value"]);
13651
+ const decoded = v["@value"];
13652
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13653
+ _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage.push(decoded);
13356
13654
  }
13357
13655
  instance.#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage;
13358
13656
  const _2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
13359
13657
  let _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array = values["https://misskey-hub.net/ns#isCat"];
13360
13658
  for (const v of _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array == null ? [] : _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array.length === 1 && "@list" in _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array[0] ? _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array[0]["@list"] : _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array) {
13361
13659
  if (v == null) continue;
13362
- _2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(v["@value"]);
13660
+ const decoded = v["@value"];
13661
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
13662
+ _2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
13363
13663
  }
13364
13664
  instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
13365
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
13665
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
13666
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
13366
13667
  instance._cachedJsonLd = structuredClone(json);
13367
13668
  } catch {
13368
13669
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -13630,7 +13931,9 @@ var IntransitiveActivity = class IntransitiveActivity extends Activity {
13630
13931
  _fromSubclass: true
13631
13932
  });
13632
13933
  if (!(instance instanceof IntransitiveActivity)) throw new TypeError("Unexpected type: " + instance.constructor.name);
13633
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
13934
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
13935
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
13936
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
13634
13937
  instance._cachedJsonLd = structuredClone(json);
13635
13938
  } catch {
13636
13939
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -13779,7 +14082,9 @@ var Arrive = class Arrive extends IntransitiveActivity {
13779
14082
  _fromSubclass: true
13780
14083
  });
13781
14084
  if (!(instance instanceof Arrive)) throw new TypeError("Unexpected type: " + instance.constructor.name);
13782
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
14085
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
14086
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
14087
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
13783
14088
  instance._cachedJsonLd = structuredClone(json);
13784
14089
  } catch {
13785
14090
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -14014,16 +14319,20 @@ var Article = class Article extends Object$1 {
14014
14319
  _fromSubclass: true
14015
14320
  });
14016
14321
  if (!(instance instanceof Article)) throw new TypeError("Unexpected type: " + instance.constructor.name);
14322
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
14017
14323
  const _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl = [];
14018
14324
  let _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["https://www.w3.org/ns/activitystreams#quoteUrl"];
14019
14325
  if (_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null || _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length < 1) _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["https://misskey-hub.net/ns#_misskey_quote"];
14020
14326
  if (_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null || _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length < 1) _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["http://fedibird.com/ns#quoteUri"];
14021
14327
  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) {
14022
14328
  if (v == null) continue;
14023
- _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl.push(new URL(v["@value"]));
14329
+ const decoded = new URL(v["@value"]);
14330
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
14331
+ _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl.push(decoded);
14024
14332
  }
14025
14333
  instance.#_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl = _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl;
14026
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
14334
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
14335
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
14027
14336
  instance._cachedJsonLd = structuredClone(json);
14028
14337
  } catch {
14029
14338
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -14247,21 +14556,27 @@ var Document = class Document extends Object$1 {
14247
14556
  _fromSubclass: true
14248
14557
  });
14249
14558
  if (!(instance instanceof Document)) throw new TypeError("Unexpected type: " + instance.constructor.name);
14559
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
14250
14560
  const _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width = [];
14251
14561
  let _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width__array = values["https://www.w3.org/ns/activitystreams#width"];
14252
14562
  for (const v of _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width__array == null ? [] : _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width__array.length === 1 && "@list" in _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width__array[0] ? _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width__array[0]["@list"] : _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width__array) {
14253
14563
  if (v == null) continue;
14254
- _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width.push(v["@value"]);
14564
+ const decoded = v["@value"];
14565
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
14566
+ _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width.push(decoded);
14255
14567
  }
14256
14568
  instance.#_2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width = _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width;
14257
14569
  const _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [];
14258
14570
  let _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height__array = values["https://www.w3.org/ns/activitystreams#height"];
14259
14571
  for (const v of _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height__array == null ? [] : _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height__array.length === 1 && "@list" in _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height__array[0] ? _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height__array[0]["@list"] : _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height__array) {
14260
14572
  if (v == null) continue;
14261
- _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height.push(v["@value"]);
14573
+ const decoded = v["@value"];
14574
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
14575
+ _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height.push(decoded);
14262
14576
  }
14263
14577
  instance.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height;
14264
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
14578
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
14579
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
14265
14580
  instance._cachedJsonLd = structuredClone(json);
14266
14581
  } catch {
14267
14582
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -14426,7 +14741,9 @@ var Audio = class Audio extends Document {
14426
14741
  _fromSubclass: true
14427
14742
  });
14428
14743
  if (!(instance instanceof Audio)) throw new TypeError("Unexpected type: " + instance.constructor.name);
14429
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
14744
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
14745
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
14746
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
14430
14747
  instance._cachedJsonLd = structuredClone(json);
14431
14748
  } catch {
14432
14749
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -14575,7 +14892,9 @@ var Ignore = class Ignore extends Activity {
14575
14892
  _fromSubclass: true
14576
14893
  });
14577
14894
  if (!(instance instanceof Ignore)) throw new TypeError("Unexpected type: " + instance.constructor.name);
14578
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
14895
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
14896
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
14897
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
14579
14898
  instance._cachedJsonLd = structuredClone(json);
14580
14899
  } catch {
14581
14900
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -14725,7 +15044,9 @@ var Block = class Block extends Ignore {
14725
15044
  _fromSubclass: true
14726
15045
  });
14727
15046
  if (!(instance instanceof Block)) throw new TypeError("Unexpected type: " + instance.constructor.name);
14728
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
15047
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
15048
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
15049
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
14729
15050
  instance._cachedJsonLd = structuredClone(json);
14730
15051
  } catch {
14731
15052
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -16753,11 +17074,14 @@ var Collection = class Collection extends Object$1 {
16753
17074
  _fromSubclass: true
16754
17075
  });
16755
17076
  if (!(instance instanceof Collection)) throw new TypeError("Unexpected type: " + instance.constructor.name);
17077
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
16756
17078
  const _XDbmNDuWHmrhqH712zqtecdbv1V_totalItems = [];
16757
17079
  let _XDbmNDuWHmrhqH712zqtecdbv1V_totalItems__array = values["https://www.w3.org/ns/activitystreams#totalItems"];
16758
17080
  for (const v of _XDbmNDuWHmrhqH712zqtecdbv1V_totalItems__array == null ? [] : _XDbmNDuWHmrhqH712zqtecdbv1V_totalItems__array.length === 1 && "@list" in _XDbmNDuWHmrhqH712zqtecdbv1V_totalItems__array[0] ? _XDbmNDuWHmrhqH712zqtecdbv1V_totalItems__array[0]["@list"] : _XDbmNDuWHmrhqH712zqtecdbv1V_totalItems__array) {
16759
17081
  if (v == null) continue;
16760
- _XDbmNDuWHmrhqH712zqtecdbv1V_totalItems.push(v["@value"]);
17082
+ const decoded = v["@value"];
17083
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
17084
+ _XDbmNDuWHmrhqH712zqtecdbv1V_totalItems.push(decoded);
16761
17085
  }
16762
17086
  instance.#_XDbmNDuWHmrhqH712zqtecdbv1V_totalItems = _XDbmNDuWHmrhqH712zqtecdbv1V_totalItems;
16763
17087
  const _3UyUdxnyn6cDn53QKrh4MBiearma_current = [];
@@ -16768,10 +17092,12 @@ var Collection = class Collection extends Object$1 {
16768
17092
  _3UyUdxnyn6cDn53QKrh4MBiearma_current.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
16769
17093
  continue;
16770
17094
  }
16771
- _3UyUdxnyn6cDn53QKrh4MBiearma_current.push(await CollectionPage.fromJsonLd(v, {
17095
+ const decoded = await CollectionPage.fromJsonLd(v, {
16772
17096
  ...options,
16773
17097
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
16774
- }));
17098
+ });
17099
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
17100
+ _3UyUdxnyn6cDn53QKrh4MBiearma_current.push(decoded);
16775
17101
  }
16776
17102
  instance.#_3UyUdxnyn6cDn53QKrh4MBiearma_current = _3UyUdxnyn6cDn53QKrh4MBiearma_current;
16777
17103
  const _J52RqweMe6hhv7RnLJMC8BExTE5_first = [];
@@ -16782,10 +17108,12 @@ var Collection = class Collection extends Object$1 {
16782
17108
  _J52RqweMe6hhv7RnLJMC8BExTE5_first.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
16783
17109
  continue;
16784
17110
  }
16785
- _J52RqweMe6hhv7RnLJMC8BExTE5_first.push(await CollectionPage.fromJsonLd(v, {
17111
+ const decoded = await CollectionPage.fromJsonLd(v, {
16786
17112
  ...options,
16787
17113
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
16788
- }));
17114
+ });
17115
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
17116
+ _J52RqweMe6hhv7RnLJMC8BExTE5_first.push(decoded);
16789
17117
  }
16790
17118
  instance.#_J52RqweMe6hhv7RnLJMC8BExTE5_first = _J52RqweMe6hhv7RnLJMC8BExTE5_first;
16791
17119
  const _gyJJnyEFnuNVi1HFZKfAn3Hfn26_last = [];
@@ -16796,10 +17124,12 @@ var Collection = class Collection extends Object$1 {
16796
17124
  _gyJJnyEFnuNVi1HFZKfAn3Hfn26_last.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
16797
17125
  continue;
16798
17126
  }
16799
- _gyJJnyEFnuNVi1HFZKfAn3Hfn26_last.push(await CollectionPage.fromJsonLd(v, {
17127
+ const decoded = await CollectionPage.fromJsonLd(v, {
16800
17128
  ...options,
16801
17129
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
16802
- }));
17130
+ });
17131
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
17132
+ _gyJJnyEFnuNVi1HFZKfAn3Hfn26_last.push(decoded);
16803
17133
  }
16804
17134
  instance.#_gyJJnyEFnuNVi1HFZKfAn3Hfn26_last = _gyJJnyEFnuNVi1HFZKfAn3Hfn26_last;
16805
17135
  const _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items = [];
@@ -16877,7 +17207,11 @@ var Collection = class Collection extends Object$1 {
16877
17207
  ...options,
16878
17208
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
16879
17209
  }) : void 0;
16880
- if (typeof decoded === "undefined") continue;
17210
+ if (typeof decoded === "undefined") {
17211
+ shouldCacheJsonLd = false;
17212
+ continue;
17213
+ }
17214
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
16881
17215
  _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(decoded);
16882
17216
  }
16883
17217
  instance.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items = _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items;
@@ -16889,10 +17223,12 @@ var Collection = class Collection extends Object$1 {
16889
17223
  _4TB9Qd9ddtcZEpMfzbHhzafE6jaJ_likesOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
16890
17224
  continue;
16891
17225
  }
16892
- _4TB9Qd9ddtcZEpMfzbHhzafE6jaJ_likesOf.push(await Object$1.fromJsonLd(v, {
17226
+ const decoded = await Object$1.fromJsonLd(v, {
16893
17227
  ...options,
16894
17228
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
16895
- }));
17229
+ });
17230
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
17231
+ _4TB9Qd9ddtcZEpMfzbHhzafE6jaJ_likesOf.push(decoded);
16896
17232
  }
16897
17233
  instance.#_4TB9Qd9ddtcZEpMfzbHhzafE6jaJ_likesOf = _4TB9Qd9ddtcZEpMfzbHhzafE6jaJ_likesOf;
16898
17234
  const _3manzgeKiPsugpztKGiaUUwJ3ito_sharesOf = [];
@@ -16903,10 +17239,12 @@ var Collection = class Collection extends Object$1 {
16903
17239
  _3manzgeKiPsugpztKGiaUUwJ3ito_sharesOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
16904
17240
  continue;
16905
17241
  }
16906
- _3manzgeKiPsugpztKGiaUUwJ3ito_sharesOf.push(await Object$1.fromJsonLd(v, {
17242
+ const decoded = await Object$1.fromJsonLd(v, {
16907
17243
  ...options,
16908
17244
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
16909
- }));
17245
+ });
17246
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
17247
+ _3manzgeKiPsugpztKGiaUUwJ3ito_sharesOf.push(decoded);
16910
17248
  }
16911
17249
  instance.#_3manzgeKiPsugpztKGiaUUwJ3ito_sharesOf = _3manzgeKiPsugpztKGiaUUwJ3ito_sharesOf;
16912
17250
  const _3T3oGm3twpcQUcrnMisXQtmDZ32X_repliesOf = [];
@@ -16917,10 +17255,12 @@ var Collection = class Collection extends Object$1 {
16917
17255
  _3T3oGm3twpcQUcrnMisXQtmDZ32X_repliesOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
16918
17256
  continue;
16919
17257
  }
16920
- _3T3oGm3twpcQUcrnMisXQtmDZ32X_repliesOf.push(await Object$1.fromJsonLd(v, {
17258
+ const decoded = await Object$1.fromJsonLd(v, {
16921
17259
  ...options,
16922
17260
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
16923
- }));
17261
+ });
17262
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
17263
+ _3T3oGm3twpcQUcrnMisXQtmDZ32X_repliesOf.push(decoded);
16924
17264
  }
16925
17265
  instance.#_3T3oGm3twpcQUcrnMisXQtmDZ32X_repliesOf = _3T3oGm3twpcQUcrnMisXQtmDZ32X_repliesOf;
16926
17266
  const _2bvRkAFZjMfVD8jiUWZJr5YokSeN_inboxOf = [];
@@ -16931,10 +17271,12 @@ var Collection = class Collection extends Object$1 {
16931
17271
  _2bvRkAFZjMfVD8jiUWZJr5YokSeN_inboxOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
16932
17272
  continue;
16933
17273
  }
16934
- _2bvRkAFZjMfVD8jiUWZJr5YokSeN_inboxOf.push(await Object$1.fromJsonLd(v, {
17274
+ const decoded = await Object$1.fromJsonLd(v, {
16935
17275
  ...options,
16936
17276
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
16937
- }));
17277
+ });
17278
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
17279
+ _2bvRkAFZjMfVD8jiUWZJr5YokSeN_inboxOf.push(decoded);
16938
17280
  }
16939
17281
  instance.#_2bvRkAFZjMfVD8jiUWZJr5YokSeN_inboxOf = _2bvRkAFZjMfVD8jiUWZJr5YokSeN_inboxOf;
16940
17282
  const _4AHzVZDxHjK6uEWa9UiKHGK34yYm_outboxOf = [];
@@ -16945,10 +17287,12 @@ var Collection = class Collection extends Object$1 {
16945
17287
  _4AHzVZDxHjK6uEWa9UiKHGK34yYm_outboxOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
16946
17288
  continue;
16947
17289
  }
16948
- _4AHzVZDxHjK6uEWa9UiKHGK34yYm_outboxOf.push(await Object$1.fromJsonLd(v, {
17290
+ const decoded = await Object$1.fromJsonLd(v, {
16949
17291
  ...options,
16950
17292
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
16951
- }));
17293
+ });
17294
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
17295
+ _4AHzVZDxHjK6uEWa9UiKHGK34yYm_outboxOf.push(decoded);
16952
17296
  }
16953
17297
  instance.#_4AHzVZDxHjK6uEWa9UiKHGK34yYm_outboxOf = _4AHzVZDxHjK6uEWa9UiKHGK34yYm_outboxOf;
16954
17298
  const _41aoZ5M6yRUHy3Zx8q6iuZQxtopb_followersOf = [];
@@ -16959,10 +17303,12 @@ var Collection = class Collection extends Object$1 {
16959
17303
  _41aoZ5M6yRUHy3Zx8q6iuZQxtopb_followersOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
16960
17304
  continue;
16961
17305
  }
16962
- _41aoZ5M6yRUHy3Zx8q6iuZQxtopb_followersOf.push(await Object$1.fromJsonLd(v, {
17306
+ const decoded = await Object$1.fromJsonLd(v, {
16963
17307
  ...options,
16964
17308
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
16965
- }));
17309
+ });
17310
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
17311
+ _41aoZ5M6yRUHy3Zx8q6iuZQxtopb_followersOf.push(decoded);
16966
17312
  }
16967
17313
  instance.#_41aoZ5M6yRUHy3Zx8q6iuZQxtopb_followersOf = _41aoZ5M6yRUHy3Zx8q6iuZQxtopb_followersOf;
16968
17314
  const _2nXT2Ah42UjEEQF5oJQ39CbKB1xj_followingOf = [];
@@ -16973,10 +17319,12 @@ var Collection = class Collection extends Object$1 {
16973
17319
  _2nXT2Ah42UjEEQF5oJQ39CbKB1xj_followingOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
16974
17320
  continue;
16975
17321
  }
16976
- _2nXT2Ah42UjEEQF5oJQ39CbKB1xj_followingOf.push(await Object$1.fromJsonLd(v, {
17322
+ const decoded = await Object$1.fromJsonLd(v, {
16977
17323
  ...options,
16978
17324
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
16979
- }));
17325
+ });
17326
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
17327
+ _2nXT2Ah42UjEEQF5oJQ39CbKB1xj_followingOf.push(decoded);
16980
17328
  }
16981
17329
  instance.#_2nXT2Ah42UjEEQF5oJQ39CbKB1xj_followingOf = _2nXT2Ah42UjEEQF5oJQ39CbKB1xj_followingOf;
16982
17330
  const _2bsySzmT3qEZcrnoe3tZ5xBjXSju_likedOf = [];
@@ -16987,13 +17335,16 @@ var Collection = class Collection extends Object$1 {
16987
17335
  _2bsySzmT3qEZcrnoe3tZ5xBjXSju_likedOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
16988
17336
  continue;
16989
17337
  }
16990
- _2bsySzmT3qEZcrnoe3tZ5xBjXSju_likedOf.push(await Object$1.fromJsonLd(v, {
17338
+ const decoded = await Object$1.fromJsonLd(v, {
16991
17339
  ...options,
16992
17340
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
16993
- }));
17341
+ });
17342
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
17343
+ _2bsySzmT3qEZcrnoe3tZ5xBjXSju_likedOf.push(decoded);
16994
17344
  }
16995
17345
  instance.#_2bsySzmT3qEZcrnoe3tZ5xBjXSju_likedOf = _2bsySzmT3qEZcrnoe3tZ5xBjXSju_likedOf;
16996
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
17346
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
17347
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
16997
17348
  instance._cachedJsonLd = structuredClone(json);
16998
17349
  } catch {
16999
17350
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -17703,6 +18054,7 @@ var CollectionPage = class CollectionPage extends Collection {
17703
18054
  _fromSubclass: true
17704
18055
  });
17705
18056
  if (!(instance instanceof CollectionPage)) throw new TypeError("Unexpected type: " + instance.constructor.name);
18057
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
17706
18058
  const _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf = [];
17707
18059
  let _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf__array = values["https://www.w3.org/ns/activitystreams#partOf"];
17708
18060
  for (const v of _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf__array == null ? [] : _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf__array.length === 1 && "@list" in _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf__array[0] ? _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf__array[0]["@list"] : _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf__array) {
@@ -17711,10 +18063,12 @@ var CollectionPage = class CollectionPage extends Collection {
17711
18063
  _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
17712
18064
  continue;
17713
18065
  }
17714
- _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf.push(await Collection.fromJsonLd(v, {
18066
+ const decoded = await Collection.fromJsonLd(v, {
17715
18067
  ...options,
17716
18068
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
17717
- }));
18069
+ });
18070
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
18071
+ _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf.push(decoded);
17718
18072
  }
17719
18073
  instance.#_2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf = _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf;
17720
18074
  const _3BT4kQLcXhHx7TAWaNDKh8nFn9eY_next = [];
@@ -17725,10 +18079,12 @@ var CollectionPage = class CollectionPage extends Collection {
17725
18079
  _3BT4kQLcXhHx7TAWaNDKh8nFn9eY_next.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
17726
18080
  continue;
17727
18081
  }
17728
- _3BT4kQLcXhHx7TAWaNDKh8nFn9eY_next.push(await CollectionPage.fromJsonLd(v, {
18082
+ const decoded = await CollectionPage.fromJsonLd(v, {
17729
18083
  ...options,
17730
18084
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
17731
- }));
18085
+ });
18086
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
18087
+ _3BT4kQLcXhHx7TAWaNDKh8nFn9eY_next.push(decoded);
17732
18088
  }
17733
18089
  instance.#_3BT4kQLcXhHx7TAWaNDKh8nFn9eY_next = _3BT4kQLcXhHx7TAWaNDKh8nFn9eY_next;
17734
18090
  const _3b8yG8tDNzQFFEnWhCc13G8eHooA_prev = [];
@@ -17739,13 +18095,16 @@ var CollectionPage = class CollectionPage extends Collection {
17739
18095
  _3b8yG8tDNzQFFEnWhCc13G8eHooA_prev.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
17740
18096
  continue;
17741
18097
  }
17742
- _3b8yG8tDNzQFFEnWhCc13G8eHooA_prev.push(await CollectionPage.fromJsonLd(v, {
18098
+ const decoded = await CollectionPage.fromJsonLd(v, {
17743
18099
  ...options,
17744
18100
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
17745
- }));
18101
+ });
18102
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
18103
+ _3b8yG8tDNzQFFEnWhCc13G8eHooA_prev.push(decoded);
17746
18104
  }
17747
18105
  instance.#_3b8yG8tDNzQFFEnWhCc13G8eHooA_prev = _3b8yG8tDNzQFFEnWhCc13G8eHooA_prev;
17748
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
18106
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
18107
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
17749
18108
  instance._cachedJsonLd = structuredClone(json);
17750
18109
  } catch {
17751
18110
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -17928,7 +18287,9 @@ var Create = class Create extends Activity {
17928
18287
  _fromSubclass: true
17929
18288
  });
17930
18289
  if (!(instance instanceof Create)) throw new TypeError("Unexpected type: " + instance.constructor.name);
17931
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
18290
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
18291
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
18292
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
17932
18293
  instance._cachedJsonLd = structuredClone(json);
17933
18294
  } catch {
17934
18295
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -18092,7 +18453,9 @@ var Delete = class Delete extends Activity {
18092
18453
  _fromSubclass: true
18093
18454
  });
18094
18455
  if (!(instance instanceof Delete)) throw new TypeError("Unexpected type: " + instance.constructor.name);
18095
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
18456
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
18457
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
18458
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
18096
18459
  instance._cachedJsonLd = structuredClone(json);
18097
18460
  } catch {
18098
18461
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -18243,7 +18606,9 @@ var Dislike = class Dislike extends Activity {
18243
18606
  _fromSubclass: true
18244
18607
  });
18245
18608
  if (!(instance instanceof Dislike)) throw new TypeError("Unexpected type: " + instance.constructor.name);
18246
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
18609
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
18610
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
18611
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
18247
18612
  instance._cachedJsonLd = structuredClone(json);
18248
18613
  } catch {
18249
18614
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -18268,6 +18633,7 @@ var Endpoints = class {
18268
18633
  #tracerProvider;
18269
18634
  #warning;
18270
18635
  #cachedJsonLd;
18636
+ #shouldCacheJsonLd = true;
18271
18637
  id;
18272
18638
  get _documentLoader() {
18273
18639
  return this.#documentLoader;
@@ -18287,6 +18653,17 @@ var Endpoints = class {
18287
18653
  set _cachedJsonLd(value) {
18288
18654
  this.#cachedJsonLd = value;
18289
18655
  }
18656
+ get _shouldCacheJsonLd() {
18657
+ return this.#shouldCacheJsonLd;
18658
+ }
18659
+ set _shouldCacheJsonLd(value) {
18660
+ this.#shouldCacheJsonLd = value;
18661
+ }
18662
+ static _shouldCacheDecodedJsonLd(value) {
18663
+ if (value == null || typeof value !== "object") return true;
18664
+ if (!("_shouldCacheJsonLd" in value)) return true;
18665
+ return value._shouldCacheJsonLd;
18666
+ }
18290
18667
  /**
18291
18668
  * The type URI of {@link Endpoints}: `https://www.w3.org/ns/activitystreams#Endpoints`.
18292
18669
  */
@@ -18585,49 +18962,63 @@ var Endpoints = class {
18585
18962
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Endpoints")) throw new TypeError("Invalid type: " + values["@type"]);
18586
18963
  }
18587
18964
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : void 0 }, options);
18965
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
18588
18966
  const _2JCYDbSxEHCCLdBYed33cCETfGyR_proxyUrl = [];
18589
18967
  let _2JCYDbSxEHCCLdBYed33cCETfGyR_proxyUrl__array = values["https://www.w3.org/ns/activitystreams#proxyUrl"];
18590
18968
  for (const v of _2JCYDbSxEHCCLdBYed33cCETfGyR_proxyUrl__array == null ? [] : _2JCYDbSxEHCCLdBYed33cCETfGyR_proxyUrl__array.length === 1 && "@list" in _2JCYDbSxEHCCLdBYed33cCETfGyR_proxyUrl__array[0] ? _2JCYDbSxEHCCLdBYed33cCETfGyR_proxyUrl__array[0]["@list"] : _2JCYDbSxEHCCLdBYed33cCETfGyR_proxyUrl__array) {
18591
18969
  if (v == null) continue;
18592
- _2JCYDbSxEHCCLdBYed33cCETfGyR_proxyUrl.push(v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"])));
18970
+ const decoded = v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"]));
18971
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
18972
+ _2JCYDbSxEHCCLdBYed33cCETfGyR_proxyUrl.push(decoded);
18593
18973
  }
18594
18974
  instance.#_2JCYDbSxEHCCLdBYed33cCETfGyR_proxyUrl = _2JCYDbSxEHCCLdBYed33cCETfGyR_proxyUrl;
18595
18975
  const _25S6UmgzDead8hxL5sQFezZTAusd_oauthAuthorizationEndpoint = [];
18596
18976
  let _25S6UmgzDead8hxL5sQFezZTAusd_oauthAuthorizationEndpoint__array = values["https://www.w3.org/ns/activitystreams#oauthAuthorizationEndpoint"];
18597
18977
  for (const v of _25S6UmgzDead8hxL5sQFezZTAusd_oauthAuthorizationEndpoint__array == null ? [] : _25S6UmgzDead8hxL5sQFezZTAusd_oauthAuthorizationEndpoint__array.length === 1 && "@list" in _25S6UmgzDead8hxL5sQFezZTAusd_oauthAuthorizationEndpoint__array[0] ? _25S6UmgzDead8hxL5sQFezZTAusd_oauthAuthorizationEndpoint__array[0]["@list"] : _25S6UmgzDead8hxL5sQFezZTAusd_oauthAuthorizationEndpoint__array) {
18598
18978
  if (v == null) continue;
18599
- _25S6UmgzDead8hxL5sQFezZTAusd_oauthAuthorizationEndpoint.push(v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"])));
18979
+ const decoded = v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"]));
18980
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
18981
+ _25S6UmgzDead8hxL5sQFezZTAusd_oauthAuthorizationEndpoint.push(decoded);
18600
18982
  }
18601
18983
  instance.#_25S6UmgzDead8hxL5sQFezZTAusd_oauthAuthorizationEndpoint = _25S6UmgzDead8hxL5sQFezZTAusd_oauthAuthorizationEndpoint;
18602
18984
  const _iAMxqrSba7yBCRB1FZ5kEVdKEZ3_oauthTokenEndpoint = [];
18603
18985
  let _iAMxqrSba7yBCRB1FZ5kEVdKEZ3_oauthTokenEndpoint__array = values["https://www.w3.org/ns/activitystreams#oauthTokenEndpoint"];
18604
18986
  for (const v of _iAMxqrSba7yBCRB1FZ5kEVdKEZ3_oauthTokenEndpoint__array == null ? [] : _iAMxqrSba7yBCRB1FZ5kEVdKEZ3_oauthTokenEndpoint__array.length === 1 && "@list" in _iAMxqrSba7yBCRB1FZ5kEVdKEZ3_oauthTokenEndpoint__array[0] ? _iAMxqrSba7yBCRB1FZ5kEVdKEZ3_oauthTokenEndpoint__array[0]["@list"] : _iAMxqrSba7yBCRB1FZ5kEVdKEZ3_oauthTokenEndpoint__array) {
18605
18987
  if (v == null) continue;
18606
- _iAMxqrSba7yBCRB1FZ5kEVdKEZ3_oauthTokenEndpoint.push(v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"])));
18988
+ const decoded = v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"]));
18989
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
18990
+ _iAMxqrSba7yBCRB1FZ5kEVdKEZ3_oauthTokenEndpoint.push(decoded);
18607
18991
  }
18608
18992
  instance.#_iAMxqrSba7yBCRB1FZ5kEVdKEZ3_oauthTokenEndpoint = _iAMxqrSba7yBCRB1FZ5kEVdKEZ3_oauthTokenEndpoint;
18609
18993
  const _8Bx9qN8oU7Bpt2xi6khaxWp1gMr_provideClientKey = [];
18610
18994
  let _8Bx9qN8oU7Bpt2xi6khaxWp1gMr_provideClientKey__array = values["https://www.w3.org/ns/activitystreams#provideClientKey"];
18611
18995
  for (const v of _8Bx9qN8oU7Bpt2xi6khaxWp1gMr_provideClientKey__array == null ? [] : _8Bx9qN8oU7Bpt2xi6khaxWp1gMr_provideClientKey__array.length === 1 && "@list" in _8Bx9qN8oU7Bpt2xi6khaxWp1gMr_provideClientKey__array[0] ? _8Bx9qN8oU7Bpt2xi6khaxWp1gMr_provideClientKey__array[0]["@list"] : _8Bx9qN8oU7Bpt2xi6khaxWp1gMr_provideClientKey__array) {
18612
18996
  if (v == null) continue;
18613
- _8Bx9qN8oU7Bpt2xi6khaxWp1gMr_provideClientKey.push(v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"])));
18997
+ const decoded = v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"]));
18998
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
18999
+ _8Bx9qN8oU7Bpt2xi6khaxWp1gMr_provideClientKey.push(decoded);
18614
19000
  }
18615
19001
  instance.#_8Bx9qN8oU7Bpt2xi6khaxWp1gMr_provideClientKey = _8Bx9qN8oU7Bpt2xi6khaxWp1gMr_provideClientKey;
18616
19002
  const _3dU7PMVQZJpsCpo2F4RQXxBXdPmS_signClientKey = [];
18617
19003
  let _3dU7PMVQZJpsCpo2F4RQXxBXdPmS_signClientKey__array = values["https://www.w3.org/ns/activitystreams#signClientKey"];
18618
19004
  for (const v of _3dU7PMVQZJpsCpo2F4RQXxBXdPmS_signClientKey__array == null ? [] : _3dU7PMVQZJpsCpo2F4RQXxBXdPmS_signClientKey__array.length === 1 && "@list" in _3dU7PMVQZJpsCpo2F4RQXxBXdPmS_signClientKey__array[0] ? _3dU7PMVQZJpsCpo2F4RQXxBXdPmS_signClientKey__array[0]["@list"] : _3dU7PMVQZJpsCpo2F4RQXxBXdPmS_signClientKey__array) {
18619
19005
  if (v == null) continue;
18620
- _3dU7PMVQZJpsCpo2F4RQXxBXdPmS_signClientKey.push(v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"])));
19006
+ const decoded = v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"]));
19007
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
19008
+ _3dU7PMVQZJpsCpo2F4RQXxBXdPmS_signClientKey.push(decoded);
18621
19009
  }
18622
19010
  instance.#_3dU7PMVQZJpsCpo2F4RQXxBXdPmS_signClientKey = _3dU7PMVQZJpsCpo2F4RQXxBXdPmS_signClientKey;
18623
19011
  const _3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox = [];
18624
19012
  let _3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox__array = values["https://www.w3.org/ns/activitystreams#sharedInbox"];
18625
19013
  for (const v of _3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox__array == null ? [] : _3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox__array.length === 1 && "@list" in _3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox__array[0] ? _3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox__array[0]["@list"] : _3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox__array) {
18626
19014
  if (v == null) continue;
18627
- _3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox.push(v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"])));
19015
+ const decoded = v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"]));
19016
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
19017
+ _3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox.push(decoded);
18628
19018
  }
18629
19019
  instance.#_3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox = _3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox;
18630
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
19020
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
19021
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
18631
19022
  instance._cachedJsonLd = structuredClone(json);
18632
19023
  } catch {
18633
19024
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -18816,7 +19207,9 @@ var Event = class Event extends Object$1 {
18816
19207
  _fromSubclass: true
18817
19208
  });
18818
19209
  if (!(instance instanceof Event)) throw new TypeError("Unexpected type: " + instance.constructor.name);
18819
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
19210
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
19211
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
19212
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
18820
19213
  instance._cachedJsonLd = structuredClone(json);
18821
19214
  } catch {
18822
19215
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -18965,7 +19358,9 @@ var Flag = class Flag extends Activity {
18965
19358
  _fromSubclass: true
18966
19359
  });
18967
19360
  if (!(instance instanceof Flag)) throw new TypeError("Unexpected type: " + instance.constructor.name);
18968
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
19361
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
19362
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
19363
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
18969
19364
  instance._cachedJsonLd = structuredClone(json);
18970
19365
  } catch {
18971
19366
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -19118,7 +19513,9 @@ var Follow = class Follow extends Activity {
19118
19513
  _fromSubclass: true
19119
19514
  });
19120
19515
  if (!(instance instanceof Follow)) throw new TypeError("Unexpected type: " + instance.constructor.name);
19121
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
19516
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
19517
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
19518
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
19122
19519
  instance._cachedJsonLd = structuredClone(json);
19123
19520
  } catch {
19124
19521
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -21983,12 +22380,17 @@ var Group = class Group extends Object$1 {
21983
22380
  _fromSubclass: true
21984
22381
  });
21985
22382
  if (!(instance instanceof Group)) throw new TypeError("Unexpected type: " + instance.constructor.name);
22383
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
21986
22384
  const _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername = [];
21987
22385
  let _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array = values["https://www.w3.org/ns/activitystreams#preferredUsername"];
21988
22386
  for (const v of _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array == null ? [] : _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array.length === 1 && "@list" in _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array[0] ? _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array[0]["@list"] : _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array) {
21989
22387
  if (v == null) continue;
21990
- const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
21991
- if (typeof decoded === "undefined") continue;
22388
+ const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" && isValidLanguageTag(v["@language"]) ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
22389
+ if (typeof decoded === "undefined") {
22390
+ shouldCacheJsonLd = false;
22391
+ continue;
22392
+ }
22393
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
21992
22394
  _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.push(decoded);
21993
22395
  }
21994
22396
  instance.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername = _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername;
@@ -22000,10 +22402,12 @@ var Group = class Group extends Object$1 {
22000
22402
  _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
22001
22403
  continue;
22002
22404
  }
22003
- _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, {
22405
+ const decoded = await CryptographicKey.fromJsonLd(v, {
22004
22406
  ...options,
22005
22407
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22006
- }));
22408
+ });
22409
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22410
+ _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(decoded);
22007
22411
  }
22008
22412
  instance.#_axq166E2eZADq34V4MYUc8KMZdC_publicKey = _axq166E2eZADq34V4MYUc8KMZdC_publicKey;
22009
22413
  const _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
@@ -22014,17 +22418,21 @@ var Group = class Group extends Object$1 {
22014
22418
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
22015
22419
  continue;
22016
22420
  }
22017
- _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, {
22421
+ const decoded = await Multikey.fromJsonLd(v, {
22018
22422
  ...options,
22019
22423
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22020
- }));
22424
+ });
22425
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22426
+ _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
22021
22427
  }
22022
22428
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
22023
22429
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
22024
22430
  let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
22025
22431
  for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
22026
22432
  if (v == null) continue;
22027
- _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.push(v["@value"]);
22433
+ const decoded = v["@value"];
22434
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22435
+ _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.push(decoded);
22028
22436
  }
22029
22437
  instance.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
22030
22438
  const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
@@ -22042,7 +22450,11 @@ var Group = class Group extends Object$1 {
22042
22450
  ...options,
22043
22451
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22044
22452
  }) : void 0;
22045
- if (typeof decoded === "undefined") continue;
22453
+ if (typeof decoded === "undefined") {
22454
+ shouldCacheJsonLd = false;
22455
+ continue;
22456
+ }
22457
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22046
22458
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
22047
22459
  }
22048
22460
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -22061,7 +22473,11 @@ var Group = class Group extends Object$1 {
22061
22473
  ...options,
22062
22474
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22063
22475
  }) : void 0;
22064
- if (typeof decoded === "undefined") continue;
22476
+ if (typeof decoded === "undefined") {
22477
+ shouldCacheJsonLd = false;
22478
+ continue;
22479
+ }
22480
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22065
22481
  _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
22066
22482
  }
22067
22483
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = _41QwhqJouoLg3h8dRPKat21brynC_outbox;
@@ -22073,10 +22489,12 @@ var Group = class Group extends Object$1 {
22073
22489
  _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
22074
22490
  continue;
22075
22491
  }
22076
- _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, {
22492
+ const decoded = await Collection.fromJsonLd(v, {
22077
22493
  ...options,
22078
22494
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22079
- }));
22495
+ });
22496
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22497
+ _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(decoded);
22080
22498
  }
22081
22499
  instance.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following = _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following;
22082
22500
  const _BBCTgfphhsFzpVfKTykGSpBNwoA_followers = [];
@@ -22087,10 +22505,12 @@ var Group = class Group extends Object$1 {
22087
22505
  _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
22088
22506
  continue;
22089
22507
  }
22090
- _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, {
22508
+ const decoded = await Collection.fromJsonLd(v, {
22091
22509
  ...options,
22092
22510
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22093
- }));
22511
+ });
22512
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22513
+ _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(decoded);
22094
22514
  }
22095
22515
  instance.#_BBCTgfphhsFzpVfKTykGSpBNwoA_followers = _BBCTgfphhsFzpVfKTykGSpBNwoA_followers;
22096
22516
  const _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked = [];
@@ -22101,10 +22521,12 @@ var Group = class Group extends Object$1 {
22101
22521
  _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
22102
22522
  continue;
22103
22523
  }
22104
- _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, {
22524
+ const decoded = await Collection.fromJsonLd(v, {
22105
22525
  ...options,
22106
22526
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22107
- }));
22527
+ });
22528
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22529
+ _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(decoded);
22108
22530
  }
22109
22531
  instance.#_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked = _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked;
22110
22532
  const _4N1vBJzXDf8NbBumeECQMFvKetja_featured = [];
@@ -22115,10 +22537,12 @@ var Group = class Group extends Object$1 {
22115
22537
  _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
22116
22538
  continue;
22117
22539
  }
22118
- _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, {
22540
+ const decoded = await Collection.fromJsonLd(v, {
22119
22541
  ...options,
22120
22542
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22121
- }));
22543
+ });
22544
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22545
+ _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(decoded);
22122
22546
  }
22123
22547
  instance.#_4N1vBJzXDf8NbBumeECQMFvKetja_featured = _4N1vBJzXDf8NbBumeECQMFvKetja_featured;
22124
22548
  const _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags = [];
@@ -22129,10 +22553,12 @@ var Group = class Group extends Object$1 {
22129
22553
  _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
22130
22554
  continue;
22131
22555
  }
22132
- _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, {
22556
+ const decoded = await Collection.fromJsonLd(v, {
22133
22557
  ...options,
22134
22558
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22135
- }));
22559
+ });
22560
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22561
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(decoded);
22136
22562
  }
22137
22563
  instance.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags = _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags;
22138
22564
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams = [];
@@ -22143,48 +22569,60 @@ var Group = class Group extends Object$1 {
22143
22569
  _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
22144
22570
  continue;
22145
22571
  }
22146
- _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, {
22572
+ const decoded = await Collection.fromJsonLd(v, {
22147
22573
  ...options,
22148
22574
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22149
- }));
22575
+ });
22576
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22577
+ _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(decoded);
22150
22578
  }
22151
22579
  instance.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams = _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams;
22152
22580
  const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints = [];
22153
22581
  let _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array = values["https://www.w3.org/ns/activitystreams#endpoints"];
22154
22582
  for (const v of _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array == null ? [] : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array.length === 1 && "@list" in _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array[0] ? _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array[0]["@list"] : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array) {
22155
22583
  if (v == null) continue;
22156
- _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints.push(await Endpoints.fromJsonLd(v, {
22584
+ const decoded = await Endpoints.fromJsonLd(v, {
22157
22585
  ...options,
22158
22586
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22159
- }));
22587
+ });
22588
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22589
+ _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints.push(decoded);
22160
22590
  }
22161
22591
  instance.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints = _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints;
22162
22592
  const _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable = [];
22163
22593
  let _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array = values["http://joinmastodon.org/ns#discoverable"];
22164
22594
  for (const v of _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array == null ? [] : _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array.length === 1 && "@list" in _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array[0] ? _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array[0]["@list"] : _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array) {
22165
22595
  if (v == null) continue;
22166
- _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable.push(v["@value"]);
22596
+ const decoded = v["@value"];
22597
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22598
+ _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable.push(decoded);
22167
22599
  }
22168
22600
  instance.#_gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable = _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable;
22169
22601
  const _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = [];
22170
22602
  let _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array = values["http://joinmastodon.org/ns#suspended"];
22171
22603
  for (const v of _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array == null ? [] : _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array.length === 1 && "@list" in _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array[0] ? _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array[0]["@list"] : _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array) {
22172
22604
  if (v == null) continue;
22173
- _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended.push(v["@value"]);
22605
+ const decoded = v["@value"];
22606
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22607
+ _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended.push(decoded);
22174
22608
  }
22175
22609
  instance.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended;
22176
22610
  const _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = [];
22177
22611
  let _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array = values["http://joinmastodon.org/ns#memorial"];
22178
22612
  for (const v of _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array == null ? [] : _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array.length === 1 && "@list" in _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array[0] ? _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array[0]["@list"] : _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array) {
22179
22613
  if (v == null) continue;
22180
- _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial.push(v["@value"]);
22614
+ const decoded = v["@value"];
22615
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22616
+ _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial.push(decoded);
22181
22617
  }
22182
22618
  instance.#_79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial;
22183
22619
  const _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = [];
22184
22620
  let _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array = values["http://joinmastodon.org/ns#indexable"];
22185
22621
  for (const v of _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array == null ? [] : _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array.length === 1 && "@list" in _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array[0] ? _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array[0]["@list"] : _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array) {
22186
22622
  if (v == null) continue;
22187
- _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.push(v["@value"]);
22623
+ const decoded = v["@value"];
22624
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22625
+ _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.push(decoded);
22188
22626
  }
22189
22627
  instance.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable;
22190
22628
  const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
@@ -22211,7 +22649,11 @@ var Group = class Group extends Object$1 {
22211
22649
  ...options,
22212
22650
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22213
22651
  }) : void 0;
22214
- if (typeof decoded === "undefined") continue;
22652
+ if (typeof decoded === "undefined") {
22653
+ shouldCacheJsonLd = false;
22654
+ continue;
22655
+ }
22656
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22215
22657
  _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(decoded);
22216
22658
  }
22217
22659
  instance.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
@@ -22239,7 +22681,11 @@ var Group = class Group extends Object$1 {
22239
22681
  ...options,
22240
22682
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22241
22683
  }) : void 0;
22242
- if (typeof decoded === "undefined") continue;
22684
+ if (typeof decoded === "undefined") {
22685
+ shouldCacheJsonLd = false;
22686
+ continue;
22687
+ }
22688
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22243
22689
  _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(decoded);
22244
22690
  }
22245
22691
  instance.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs;
@@ -22251,27 +22697,34 @@ var Group = class Group extends Object$1 {
22251
22697
  _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
22252
22698
  continue;
22253
22699
  }
22254
- _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(await DidService.fromJsonLd(v, {
22700
+ const decoded = await DidService.fromJsonLd(v, {
22255
22701
  ...options,
22256
22702
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
22257
- }));
22703
+ });
22704
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22705
+ _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(decoded);
22258
22706
  }
22259
22707
  instance.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service;
22260
22708
  const _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
22261
22709
  let _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array = values["https://misskey-hub.net/ns#_misskey_followedMessage"];
22262
22710
  for (const v of _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array == null ? [] : _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array.length === 1 && "@list" in _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array[0] ? _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array[0]["@list"] : _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array) {
22263
22711
  if (v == null) continue;
22264
- _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage.push(v["@value"]);
22712
+ const decoded = v["@value"];
22713
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22714
+ _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage.push(decoded);
22265
22715
  }
22266
22716
  instance.#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage;
22267
22717
  const _2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
22268
22718
  let _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array = values["https://misskey-hub.net/ns#isCat"];
22269
22719
  for (const v of _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array == null ? [] : _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array.length === 1 && "@list" in _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array[0] ? _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array[0]["@list"] : _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array) {
22270
22720
  if (v == null) continue;
22271
- _2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(v["@value"]);
22721
+ const decoded = v["@value"];
22722
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22723
+ _2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
22272
22724
  }
22273
22725
  instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
22274
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
22726
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
22727
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
22275
22728
  instance._cachedJsonLd = structuredClone(json);
22276
22729
  } catch {
22277
22730
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -22419,6 +22872,7 @@ var Link = class Link {
22419
22872
  #tracerProvider;
22420
22873
  #warning;
22421
22874
  #cachedJsonLd;
22875
+ #shouldCacheJsonLd = true;
22422
22876
  id;
22423
22877
  get _documentLoader() {
22424
22878
  return this.#documentLoader;
@@ -22438,6 +22892,17 @@ var Link = class Link {
22438
22892
  set _cachedJsonLd(value) {
22439
22893
  this.#cachedJsonLd = value;
22440
22894
  }
22895
+ get _shouldCacheJsonLd() {
22896
+ return this.#shouldCacheJsonLd;
22897
+ }
22898
+ set _shouldCacheJsonLd(value) {
22899
+ this.#shouldCacheJsonLd = value;
22900
+ }
22901
+ static _shouldCacheDecodedJsonLd(value) {
22902
+ if (value == null || typeof value !== "object") return true;
22903
+ if (!("_shouldCacheJsonLd" in value)) return true;
22904
+ return value._shouldCacheJsonLd;
22905
+ }
22441
22906
  /**
22442
22907
  * The type URI of {@link Link}: `https://www.w3.org/ns/activitystreams#Link`.
22443
22908
  */
@@ -22964,33 +23429,44 @@ var Link = class Link {
22964
23429
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Link")) throw new TypeError("Invalid type: " + values["@type"]);
22965
23430
  }
22966
23431
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : void 0 }, options);
23432
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
22967
23433
  const _pVjLsybKQdmkjuU7MHjiVmNnuj7_href = [];
22968
23434
  let _pVjLsybKQdmkjuU7MHjiVmNnuj7_href__array = values["https://www.w3.org/ns/activitystreams#href"];
22969
23435
  for (const v of _pVjLsybKQdmkjuU7MHjiVmNnuj7_href__array == null ? [] : _pVjLsybKQdmkjuU7MHjiVmNnuj7_href__array.length === 1 && "@list" in _pVjLsybKQdmkjuU7MHjiVmNnuj7_href__array[0] ? _pVjLsybKQdmkjuU7MHjiVmNnuj7_href__array[0]["@list"] : _pVjLsybKQdmkjuU7MHjiVmNnuj7_href__array) {
22970
23436
  if (v == null) continue;
22971
- _pVjLsybKQdmkjuU7MHjiVmNnuj7_href.push(v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"])));
23437
+ const decoded = v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"]));
23438
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
23439
+ _pVjLsybKQdmkjuU7MHjiVmNnuj7_href.push(decoded);
22972
23440
  }
22973
23441
  instance.#_pVjLsybKQdmkjuU7MHjiVmNnuj7_href = _pVjLsybKQdmkjuU7MHjiVmNnuj7_href;
22974
23442
  const _2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel = [];
22975
23443
  let _2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel__array = values["https://www.w3.org/ns/activitystreams#rel"];
22976
23444
  for (const v of _2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel__array == null ? [] : _2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel__array.length === 1 && "@list" in _2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel__array[0] ? _2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel__array[0]["@list"] : _2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel__array) {
22977
23445
  if (v == null) continue;
22978
- _2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel.push(v["@value"]);
23446
+ const decoded = v["@value"];
23447
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
23448
+ _2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel.push(decoded);
22979
23449
  }
22980
23450
  instance.#_2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel = _2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel;
22981
23451
  const _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = [];
22982
23452
  let _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array = values["https://www.w3.org/ns/activitystreams#mediaType"];
22983
23453
  for (const v of _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array == null ? [] : _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array.length === 1 && "@list" in _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array[0] ? _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array[0]["@list"] : _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array) {
22984
23454
  if (v == null) continue;
22985
- _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.push(v["@value"]);
23455
+ const decoded = v["@value"];
23456
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
23457
+ _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.push(decoded);
22986
23458
  }
22987
23459
  instance.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType;
22988
23460
  const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [];
22989
23461
  let _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array = values["https://www.w3.org/ns/activitystreams#name"];
22990
23462
  for (const v of _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array == null ? [] : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array.length === 1 && "@list" in _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array[0] ? _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array[0]["@list"] : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array) {
22991
23463
  if (v == null) continue;
22992
- const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
22993
- if (typeof decoded === "undefined") continue;
23464
+ const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" && isValidLanguageTag(v["@language"]) ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
23465
+ if (typeof decoded === "undefined") {
23466
+ shouldCacheJsonLd = false;
23467
+ continue;
23468
+ }
23469
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
22994
23470
  _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.push(decoded);
22995
23471
  }
22996
23472
  instance.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name;
@@ -22998,21 +23474,27 @@ var Link = class Link {
22998
23474
  let _f57HKWCp1YRBbTJE8PF12RbDJGf_hreflang__array = values["https://www.w3.org/ns/activitystreams#hreflang"];
22999
23475
  for (const v of _f57HKWCp1YRBbTJE8PF12RbDJGf_hreflang__array == null ? [] : _f57HKWCp1YRBbTJE8PF12RbDJGf_hreflang__array.length === 1 && "@list" in _f57HKWCp1YRBbTJE8PF12RbDJGf_hreflang__array[0] ? _f57HKWCp1YRBbTJE8PF12RbDJGf_hreflang__array[0]["@list"] : _f57HKWCp1YRBbTJE8PF12RbDJGf_hreflang__array) {
23000
23476
  if (v == null) continue;
23001
- _f57HKWCp1YRBbTJE8PF12RbDJGf_hreflang.push(new Intl.Locale(v["@value"]));
23477
+ const decoded = new Intl.Locale(v["@value"]);
23478
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
23479
+ _f57HKWCp1YRBbTJE8PF12RbDJGf_hreflang.push(decoded);
23002
23480
  }
23003
23481
  instance.#_f57HKWCp1YRBbTJE8PF12RbDJGf_hreflang = _f57HKWCp1YRBbTJE8PF12RbDJGf_hreflang;
23004
23482
  const _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [];
23005
23483
  let _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height__array = values["https://www.w3.org/ns/activitystreams#height"];
23006
23484
  for (const v of _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height__array == null ? [] : _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height__array.length === 1 && "@list" in _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height__array[0] ? _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height__array[0]["@list"] : _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height__array) {
23007
23485
  if (v == null) continue;
23008
- _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height.push(v["@value"]);
23486
+ const decoded = v["@value"];
23487
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
23488
+ _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height.push(decoded);
23009
23489
  }
23010
23490
  instance.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height;
23011
23491
  const _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width = [];
23012
23492
  let _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width__array = values["https://www.w3.org/ns/activitystreams#width"];
23013
23493
  for (const v of _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width__array == null ? [] : _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width__array.length === 1 && "@list" in _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width__array[0] ? _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width__array[0]["@list"] : _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width__array) {
23014
23494
  if (v == null) continue;
23015
- _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width.push(v["@value"]);
23495
+ const decoded = v["@value"];
23496
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
23497
+ _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width.push(decoded);
23016
23498
  }
23017
23499
  instance.#_2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width = _2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width;
23018
23500
  const _gCVTegXxWWCw6wWRxa1QF65zusg_preview = [];
@@ -23090,11 +23572,16 @@ var Link = class Link {
23090
23572
  ...options,
23091
23573
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
23092
23574
  }) : void 0;
23093
- if (typeof decoded === "undefined") continue;
23575
+ if (typeof decoded === "undefined") {
23576
+ shouldCacheJsonLd = false;
23577
+ continue;
23578
+ }
23579
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
23094
23580
  _gCVTegXxWWCw6wWRxa1QF65zusg_preview.push(decoded);
23095
23581
  }
23096
23582
  instance.#_gCVTegXxWWCw6wWRxa1QF65zusg_preview = _gCVTegXxWWCw6wWRxa1QF65zusg_preview;
23097
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
23583
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
23584
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
23098
23585
  instance._cachedJsonLd = structuredClone(json);
23099
23586
  } catch {
23100
23587
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -23294,7 +23781,9 @@ var Hashtag = class Hashtag extends Link {
23294
23781
  _fromSubclass: true
23295
23782
  });
23296
23783
  if (!(instance instanceof Hashtag)) throw new TypeError("Unexpected type: " + instance.constructor.name);
23297
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
23784
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
23785
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
23786
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
23298
23787
  instance._cachedJsonLd = structuredClone(json);
23299
23788
  } catch {
23300
23789
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -23448,7 +23937,9 @@ var Image = class Image extends Document {
23448
23937
  _fromSubclass: true
23449
23938
  });
23450
23939
  if (!(instance instanceof Image)) throw new TypeError("Unexpected type: " + instance.constructor.name);
23451
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
23940
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
23941
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
23942
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
23452
23943
  instance._cachedJsonLd = structuredClone(json);
23453
23944
  } catch {
23454
23945
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -23598,7 +24089,9 @@ var Offer = class Offer extends Activity {
23598
24089
  _fromSubclass: true
23599
24090
  });
23600
24091
  if (!(instance instanceof Offer)) throw new TypeError("Unexpected type: " + instance.constructor.name);
23601
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
24092
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
24093
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
24094
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
23602
24095
  instance._cachedJsonLd = structuredClone(json);
23603
24096
  } catch {
23604
24097
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -23746,7 +24239,9 @@ var Invite = class Invite extends Offer {
23746
24239
  _fromSubclass: true
23747
24240
  });
23748
24241
  if (!(instance instanceof Invite)) throw new TypeError("Unexpected type: " + instance.constructor.name);
23749
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
24242
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
24243
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
24244
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
23750
24245
  instance._cachedJsonLd = structuredClone(json);
23751
24246
  } catch {
23752
24247
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -23894,7 +24389,9 @@ var Join = class Join extends Activity {
23894
24389
  _fromSubclass: true
23895
24390
  });
23896
24391
  if (!(instance instanceof Join)) throw new TypeError("Unexpected type: " + instance.constructor.name);
23897
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
24392
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
24393
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
24394
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
23898
24395
  instance._cachedJsonLd = structuredClone(json);
23899
24396
  } catch {
23900
24397
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -24042,7 +24539,9 @@ var Leave = class Leave extends Activity {
24042
24539
  _fromSubclass: true
24043
24540
  });
24044
24541
  if (!(instance instanceof Leave)) throw new TypeError("Unexpected type: " + instance.constructor.name);
24045
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
24542
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
24543
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
24544
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
24046
24545
  instance._cachedJsonLd = structuredClone(json);
24047
24546
  } catch {
24048
24547
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -24194,7 +24693,9 @@ var Like = class Like extends Activity {
24194
24693
  _fromSubclass: true
24195
24694
  });
24196
24695
  if (!(instance instanceof Like)) throw new TypeError("Unexpected type: " + instance.constructor.name);
24197
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
24696
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
24697
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
24698
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
24198
24699
  instance._cachedJsonLd = structuredClone(json);
24199
24700
  } catch {
24200
24701
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -24341,7 +24842,9 @@ var Listen = class Listen extends Activity {
24341
24842
  _fromSubclass: true
24342
24843
  });
24343
24844
  if (!(instance instanceof Listen)) throw new TypeError("Unexpected type: " + instance.constructor.name);
24344
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
24845
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
24846
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
24847
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
24345
24848
  instance._cachedJsonLd = structuredClone(json);
24346
24849
  } catch {
24347
24850
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -24492,7 +24995,9 @@ var Mention = class Mention extends Link {
24492
24995
  _fromSubclass: true
24493
24996
  });
24494
24997
  if (!(instance instanceof Mention)) throw new TypeError("Unexpected type: " + instance.constructor.name);
24495
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
24998
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
24999
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
25000
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
24496
25001
  instance._cachedJsonLd = structuredClone(json);
24497
25002
  } catch {
24498
25003
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -24641,7 +25146,9 @@ var Move = class Move extends Activity {
24641
25146
  _fromSubclass: true
24642
25147
  });
24643
25148
  if (!(instance instanceof Move)) throw new TypeError("Unexpected type: " + instance.constructor.name);
24644
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
25149
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
25150
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
25151
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
24645
25152
  instance._cachedJsonLd = structuredClone(json);
24646
25153
  } catch {
24647
25154
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -24877,16 +25384,20 @@ var Note = class Note extends Object$1 {
24877
25384
  _fromSubclass: true
24878
25385
  });
24879
25386
  if (!(instance instanceof Note)) throw new TypeError("Unexpected type: " + instance.constructor.name);
25387
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
24880
25388
  const _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl = [];
24881
25389
  let _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["https://www.w3.org/ns/activitystreams#quoteUrl"];
24882
25390
  if (_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null || _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length < 1) _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["https://misskey-hub.net/ns#_misskey_quote"];
24883
25391
  if (_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null || _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length < 1) _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["http://fedibird.com/ns#quoteUri"];
24884
25392
  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) {
24885
25393
  if (v == null) continue;
24886
- _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl.push(new URL(v["@value"]));
25394
+ const decoded = new URL(v["@value"]);
25395
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
25396
+ _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl.push(decoded);
24887
25397
  }
24888
25398
  instance.#_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl = _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl;
24889
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
25399
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
25400
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
24890
25401
  instance._cachedJsonLd = structuredClone(json);
24891
25402
  } catch {
24892
25403
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -25254,6 +25765,7 @@ var OrderedCollection = class OrderedCollection extends Collection {
25254
25765
  _fromSubclass: true
25255
25766
  });
25256
25767
  if (!(instance instanceof OrderedCollection)) throw new TypeError("Unexpected type: " + instance.constructor.name);
25768
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
25257
25769
  const _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items = [];
25258
25770
  let _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items__array = values["https://www.w3.org/ns/activitystreams#items"];
25259
25771
  for (const v of _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items__array == null ? [] : _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items__array.length === 1 && "@list" in _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items__array[0] ? _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items__array[0]["@list"] : _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items__array) {
@@ -25329,11 +25841,16 @@ var OrderedCollection = class OrderedCollection extends Collection {
25329
25841
  ...options,
25330
25842
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
25331
25843
  }) : void 0;
25332
- if (typeof decoded === "undefined") continue;
25844
+ if (typeof decoded === "undefined") {
25845
+ shouldCacheJsonLd = false;
25846
+ continue;
25847
+ }
25848
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
25333
25849
  _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(decoded);
25334
25850
  }
25335
25851
  instance.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items = _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items;
25336
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
25852
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
25853
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
25337
25854
  instance._cachedJsonLd = structuredClone(json);
25338
25855
  } catch {
25339
25856
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -25731,6 +26248,7 @@ var OrderedCollectionPage = class OrderedCollectionPage extends CollectionPage {
25731
26248
  _fromSubclass: true
25732
26249
  });
25733
26250
  if (!(instance instanceof OrderedCollectionPage)) throw new TypeError("Unexpected type: " + instance.constructor.name);
26251
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
25734
26252
  const _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items = [];
25735
26253
  let _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items__array = values["https://www.w3.org/ns/activitystreams#items"];
25736
26254
  for (const v of _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items__array == null ? [] : _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items__array.length === 1 && "@list" in _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items__array[0] ? _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items__array[0]["@list"] : _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items__array) {
@@ -25806,7 +26324,11 @@ var OrderedCollectionPage = class OrderedCollectionPage extends CollectionPage {
25806
26324
  ...options,
25807
26325
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
25808
26326
  }) : void 0;
25809
- if (typeof decoded === "undefined") continue;
26327
+ if (typeof decoded === "undefined") {
26328
+ shouldCacheJsonLd = false;
26329
+ continue;
26330
+ }
26331
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
25810
26332
  _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(decoded);
25811
26333
  }
25812
26334
  instance.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items = _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items;
@@ -25814,10 +26336,13 @@ var OrderedCollectionPage = class OrderedCollectionPage extends CollectionPage {
25814
26336
  let _2W4yinFwqmpneu2h4m1mZ3pcLADd_startIndex__array = values["https://www.w3.org/ns/activitystreams#startIndex"];
25815
26337
  for (const v of _2W4yinFwqmpneu2h4m1mZ3pcLADd_startIndex__array == null ? [] : _2W4yinFwqmpneu2h4m1mZ3pcLADd_startIndex__array.length === 1 && "@list" in _2W4yinFwqmpneu2h4m1mZ3pcLADd_startIndex__array[0] ? _2W4yinFwqmpneu2h4m1mZ3pcLADd_startIndex__array[0]["@list"] : _2W4yinFwqmpneu2h4m1mZ3pcLADd_startIndex__array) {
25816
26338
  if (v == null) continue;
25817
- _2W4yinFwqmpneu2h4m1mZ3pcLADd_startIndex.push(v["@value"]);
26339
+ const decoded = v["@value"];
26340
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
26341
+ _2W4yinFwqmpneu2h4m1mZ3pcLADd_startIndex.push(decoded);
25818
26342
  }
25819
26343
  instance.#_2W4yinFwqmpneu2h4m1mZ3pcLADd_startIndex = _2W4yinFwqmpneu2h4m1mZ3pcLADd_startIndex;
25820
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
26344
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
26345
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
25821
26346
  instance._cachedJsonLd = structuredClone(json);
25822
26347
  } catch {
25823
26348
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -28693,12 +29218,17 @@ var Organization = class Organization extends Object$1 {
28693
29218
  _fromSubclass: true
28694
29219
  });
28695
29220
  if (!(instance instanceof Organization)) throw new TypeError("Unexpected type: " + instance.constructor.name);
29221
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
28696
29222
  const _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername = [];
28697
29223
  let _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array = values["https://www.w3.org/ns/activitystreams#preferredUsername"];
28698
29224
  for (const v of _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array == null ? [] : _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array.length === 1 && "@list" in _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array[0] ? _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array[0]["@list"] : _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array) {
28699
29225
  if (v == null) continue;
28700
- const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
28701
- if (typeof decoded === "undefined") continue;
29226
+ const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" && isValidLanguageTag(v["@language"]) ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
29227
+ if (typeof decoded === "undefined") {
29228
+ shouldCacheJsonLd = false;
29229
+ continue;
29230
+ }
29231
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
28702
29232
  _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.push(decoded);
28703
29233
  }
28704
29234
  instance.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername = _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername;
@@ -28710,10 +29240,12 @@ var Organization = class Organization extends Object$1 {
28710
29240
  _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
28711
29241
  continue;
28712
29242
  }
28713
- _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, {
29243
+ const decoded = await CryptographicKey.fromJsonLd(v, {
28714
29244
  ...options,
28715
29245
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28716
- }));
29246
+ });
29247
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29248
+ _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(decoded);
28717
29249
  }
28718
29250
  instance.#_axq166E2eZADq34V4MYUc8KMZdC_publicKey = _axq166E2eZADq34V4MYUc8KMZdC_publicKey;
28719
29251
  const _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
@@ -28724,17 +29256,21 @@ var Organization = class Organization extends Object$1 {
28724
29256
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
28725
29257
  continue;
28726
29258
  }
28727
- _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, {
29259
+ const decoded = await Multikey.fromJsonLd(v, {
28728
29260
  ...options,
28729
29261
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28730
- }));
29262
+ });
29263
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29264
+ _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
28731
29265
  }
28732
29266
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
28733
29267
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
28734
29268
  let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
28735
29269
  for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
28736
29270
  if (v == null) continue;
28737
- _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.push(v["@value"]);
29271
+ const decoded = v["@value"];
29272
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29273
+ _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.push(decoded);
28738
29274
  }
28739
29275
  instance.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
28740
29276
  const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
@@ -28752,7 +29288,11 @@ var Organization = class Organization extends Object$1 {
28752
29288
  ...options,
28753
29289
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28754
29290
  }) : void 0;
28755
- if (typeof decoded === "undefined") continue;
29291
+ if (typeof decoded === "undefined") {
29292
+ shouldCacheJsonLd = false;
29293
+ continue;
29294
+ }
29295
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
28756
29296
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
28757
29297
  }
28758
29298
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -28771,7 +29311,11 @@ var Organization = class Organization extends Object$1 {
28771
29311
  ...options,
28772
29312
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28773
29313
  }) : void 0;
28774
- if (typeof decoded === "undefined") continue;
29314
+ if (typeof decoded === "undefined") {
29315
+ shouldCacheJsonLd = false;
29316
+ continue;
29317
+ }
29318
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
28775
29319
  _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
28776
29320
  }
28777
29321
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = _41QwhqJouoLg3h8dRPKat21brynC_outbox;
@@ -28783,10 +29327,12 @@ var Organization = class Organization extends Object$1 {
28783
29327
  _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
28784
29328
  continue;
28785
29329
  }
28786
- _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, {
29330
+ const decoded = await Collection.fromJsonLd(v, {
28787
29331
  ...options,
28788
29332
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28789
- }));
29333
+ });
29334
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29335
+ _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(decoded);
28790
29336
  }
28791
29337
  instance.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following = _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following;
28792
29338
  const _BBCTgfphhsFzpVfKTykGSpBNwoA_followers = [];
@@ -28797,10 +29343,12 @@ var Organization = class Organization extends Object$1 {
28797
29343
  _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
28798
29344
  continue;
28799
29345
  }
28800
- _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, {
29346
+ const decoded = await Collection.fromJsonLd(v, {
28801
29347
  ...options,
28802
29348
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28803
- }));
29349
+ });
29350
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29351
+ _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(decoded);
28804
29352
  }
28805
29353
  instance.#_BBCTgfphhsFzpVfKTykGSpBNwoA_followers = _BBCTgfphhsFzpVfKTykGSpBNwoA_followers;
28806
29354
  const _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked = [];
@@ -28811,10 +29359,12 @@ var Organization = class Organization extends Object$1 {
28811
29359
  _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
28812
29360
  continue;
28813
29361
  }
28814
- _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, {
29362
+ const decoded = await Collection.fromJsonLd(v, {
28815
29363
  ...options,
28816
29364
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28817
- }));
29365
+ });
29366
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29367
+ _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(decoded);
28818
29368
  }
28819
29369
  instance.#_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked = _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked;
28820
29370
  const _4N1vBJzXDf8NbBumeECQMFvKetja_featured = [];
@@ -28825,10 +29375,12 @@ var Organization = class Organization extends Object$1 {
28825
29375
  _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
28826
29376
  continue;
28827
29377
  }
28828
- _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, {
29378
+ const decoded = await Collection.fromJsonLd(v, {
28829
29379
  ...options,
28830
29380
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28831
- }));
29381
+ });
29382
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29383
+ _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(decoded);
28832
29384
  }
28833
29385
  instance.#_4N1vBJzXDf8NbBumeECQMFvKetja_featured = _4N1vBJzXDf8NbBumeECQMFvKetja_featured;
28834
29386
  const _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags = [];
@@ -28839,10 +29391,12 @@ var Organization = class Organization extends Object$1 {
28839
29391
  _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
28840
29392
  continue;
28841
29393
  }
28842
- _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, {
29394
+ const decoded = await Collection.fromJsonLd(v, {
28843
29395
  ...options,
28844
29396
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28845
- }));
29397
+ });
29398
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29399
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(decoded);
28846
29400
  }
28847
29401
  instance.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags = _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags;
28848
29402
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams = [];
@@ -28853,48 +29407,60 @@ var Organization = class Organization extends Object$1 {
28853
29407
  _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
28854
29408
  continue;
28855
29409
  }
28856
- _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, {
29410
+ const decoded = await Collection.fromJsonLd(v, {
28857
29411
  ...options,
28858
29412
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28859
- }));
29413
+ });
29414
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29415
+ _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(decoded);
28860
29416
  }
28861
29417
  instance.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams = _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams;
28862
29418
  const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints = [];
28863
29419
  let _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array = values["https://www.w3.org/ns/activitystreams#endpoints"];
28864
29420
  for (const v of _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array == null ? [] : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array.length === 1 && "@list" in _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array[0] ? _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array[0]["@list"] : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array) {
28865
29421
  if (v == null) continue;
28866
- _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints.push(await Endpoints.fromJsonLd(v, {
29422
+ const decoded = await Endpoints.fromJsonLd(v, {
28867
29423
  ...options,
28868
29424
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28869
- }));
29425
+ });
29426
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29427
+ _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints.push(decoded);
28870
29428
  }
28871
29429
  instance.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints = _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints;
28872
29430
  const _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable = [];
28873
29431
  let _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array = values["http://joinmastodon.org/ns#discoverable"];
28874
29432
  for (const v of _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array == null ? [] : _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array.length === 1 && "@list" in _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array[0] ? _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array[0]["@list"] : _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array) {
28875
29433
  if (v == null) continue;
28876
- _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable.push(v["@value"]);
29434
+ const decoded = v["@value"];
29435
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29436
+ _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable.push(decoded);
28877
29437
  }
28878
29438
  instance.#_gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable = _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable;
28879
29439
  const _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = [];
28880
29440
  let _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array = values["http://joinmastodon.org/ns#suspended"];
28881
29441
  for (const v of _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array == null ? [] : _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array.length === 1 && "@list" in _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array[0] ? _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array[0]["@list"] : _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array) {
28882
29442
  if (v == null) continue;
28883
- _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended.push(v["@value"]);
29443
+ const decoded = v["@value"];
29444
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29445
+ _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended.push(decoded);
28884
29446
  }
28885
29447
  instance.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended;
28886
29448
  const _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = [];
28887
29449
  let _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array = values["http://joinmastodon.org/ns#memorial"];
28888
29450
  for (const v of _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array == null ? [] : _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array.length === 1 && "@list" in _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array[0] ? _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array[0]["@list"] : _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array) {
28889
29451
  if (v == null) continue;
28890
- _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial.push(v["@value"]);
29452
+ const decoded = v["@value"];
29453
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29454
+ _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial.push(decoded);
28891
29455
  }
28892
29456
  instance.#_79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial;
28893
29457
  const _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = [];
28894
29458
  let _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array = values["http://joinmastodon.org/ns#indexable"];
28895
29459
  for (const v of _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array == null ? [] : _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array.length === 1 && "@list" in _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array[0] ? _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array[0]["@list"] : _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array) {
28896
29460
  if (v == null) continue;
28897
- _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.push(v["@value"]);
29461
+ const decoded = v["@value"];
29462
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29463
+ _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.push(decoded);
28898
29464
  }
28899
29465
  instance.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable;
28900
29466
  const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
@@ -28921,7 +29487,11 @@ var Organization = class Organization extends Object$1 {
28921
29487
  ...options,
28922
29488
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28923
29489
  }) : void 0;
28924
- if (typeof decoded === "undefined") continue;
29490
+ if (typeof decoded === "undefined") {
29491
+ shouldCacheJsonLd = false;
29492
+ continue;
29493
+ }
29494
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
28925
29495
  _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(decoded);
28926
29496
  }
28927
29497
  instance.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
@@ -28949,7 +29519,11 @@ var Organization = class Organization extends Object$1 {
28949
29519
  ...options,
28950
29520
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28951
29521
  }) : void 0;
28952
- if (typeof decoded === "undefined") continue;
29522
+ if (typeof decoded === "undefined") {
29523
+ shouldCacheJsonLd = false;
29524
+ continue;
29525
+ }
29526
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
28953
29527
  _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(decoded);
28954
29528
  }
28955
29529
  instance.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs;
@@ -28961,27 +29535,34 @@ var Organization = class Organization extends Object$1 {
28961
29535
  _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
28962
29536
  continue;
28963
29537
  }
28964
- _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(await DidService.fromJsonLd(v, {
29538
+ const decoded = await DidService.fromJsonLd(v, {
28965
29539
  ...options,
28966
29540
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
28967
- }));
29541
+ });
29542
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29543
+ _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(decoded);
28968
29544
  }
28969
29545
  instance.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service;
28970
29546
  const _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
28971
29547
  let _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array = values["https://misskey-hub.net/ns#_misskey_followedMessage"];
28972
29548
  for (const v of _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array == null ? [] : _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array.length === 1 && "@list" in _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array[0] ? _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array[0]["@list"] : _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array) {
28973
29549
  if (v == null) continue;
28974
- _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage.push(v["@value"]);
29550
+ const decoded = v["@value"];
29551
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29552
+ _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage.push(decoded);
28975
29553
  }
28976
29554
  instance.#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage;
28977
29555
  const _2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
28978
29556
  let _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array = values["https://misskey-hub.net/ns#isCat"];
28979
29557
  for (const v of _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array == null ? [] : _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array.length === 1 && "@list" in _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array[0] ? _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array[0]["@list"] : _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array) {
28980
29558
  if (v == null) continue;
28981
- _2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(v["@value"]);
29559
+ const decoded = v["@value"];
29560
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
29561
+ _2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
28982
29562
  }
28983
29563
  instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
28984
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
29564
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
29565
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
28985
29566
  instance._cachedJsonLd = structuredClone(json);
28986
29567
  } catch {
28987
29568
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -29251,7 +29832,9 @@ var Page = class Page extends Document {
29251
29832
  _fromSubclass: true
29252
29833
  });
29253
29834
  if (!(instance instanceof Page)) throw new TypeError("Unexpected type: " + instance.constructor.name);
29254
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
29835
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
29836
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
29837
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
29255
29838
  instance._cachedJsonLd = structuredClone(json);
29256
29839
  } catch {
29257
29840
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -32116,12 +32699,17 @@ var Person = class Person extends Object$1 {
32116
32699
  _fromSubclass: true
32117
32700
  });
32118
32701
  if (!(instance instanceof Person)) throw new TypeError("Unexpected type: " + instance.constructor.name);
32702
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
32119
32703
  const _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername = [];
32120
32704
  let _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array = values["https://www.w3.org/ns/activitystreams#preferredUsername"];
32121
32705
  for (const v of _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array == null ? [] : _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array.length === 1 && "@list" in _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array[0] ? _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array[0]["@list"] : _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array) {
32122
32706
  if (v == null) continue;
32123
- const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
32124
- if (typeof decoded === "undefined") continue;
32707
+ const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" && isValidLanguageTag(v["@language"]) ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
32708
+ if (typeof decoded === "undefined") {
32709
+ shouldCacheJsonLd = false;
32710
+ continue;
32711
+ }
32712
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32125
32713
  _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.push(decoded);
32126
32714
  }
32127
32715
  instance.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername = _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername;
@@ -32133,10 +32721,12 @@ var Person = class Person extends Object$1 {
32133
32721
  _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
32134
32722
  continue;
32135
32723
  }
32136
- _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, {
32724
+ const decoded = await CryptographicKey.fromJsonLd(v, {
32137
32725
  ...options,
32138
32726
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32139
- }));
32727
+ });
32728
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32729
+ _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(decoded);
32140
32730
  }
32141
32731
  instance.#_axq166E2eZADq34V4MYUc8KMZdC_publicKey = _axq166E2eZADq34V4MYUc8KMZdC_publicKey;
32142
32732
  const _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
@@ -32147,17 +32737,21 @@ var Person = class Person extends Object$1 {
32147
32737
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
32148
32738
  continue;
32149
32739
  }
32150
- _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, {
32740
+ const decoded = await Multikey.fromJsonLd(v, {
32151
32741
  ...options,
32152
32742
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32153
- }));
32743
+ });
32744
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32745
+ _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
32154
32746
  }
32155
32747
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
32156
32748
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
32157
32749
  let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
32158
32750
  for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
32159
32751
  if (v == null) continue;
32160
- _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.push(v["@value"]);
32752
+ const decoded = v["@value"];
32753
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32754
+ _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.push(decoded);
32161
32755
  }
32162
32756
  instance.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
32163
32757
  const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
@@ -32175,7 +32769,11 @@ var Person = class Person extends Object$1 {
32175
32769
  ...options,
32176
32770
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32177
32771
  }) : void 0;
32178
- if (typeof decoded === "undefined") continue;
32772
+ if (typeof decoded === "undefined") {
32773
+ shouldCacheJsonLd = false;
32774
+ continue;
32775
+ }
32776
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32179
32777
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
32180
32778
  }
32181
32779
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -32194,7 +32792,11 @@ var Person = class Person extends Object$1 {
32194
32792
  ...options,
32195
32793
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32196
32794
  }) : void 0;
32197
- if (typeof decoded === "undefined") continue;
32795
+ if (typeof decoded === "undefined") {
32796
+ shouldCacheJsonLd = false;
32797
+ continue;
32798
+ }
32799
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32198
32800
  _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
32199
32801
  }
32200
32802
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = _41QwhqJouoLg3h8dRPKat21brynC_outbox;
@@ -32206,10 +32808,12 @@ var Person = class Person extends Object$1 {
32206
32808
  _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
32207
32809
  continue;
32208
32810
  }
32209
- _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, {
32811
+ const decoded = await Collection.fromJsonLd(v, {
32210
32812
  ...options,
32211
32813
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32212
- }));
32814
+ });
32815
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32816
+ _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(decoded);
32213
32817
  }
32214
32818
  instance.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following = _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following;
32215
32819
  const _BBCTgfphhsFzpVfKTykGSpBNwoA_followers = [];
@@ -32220,10 +32824,12 @@ var Person = class Person extends Object$1 {
32220
32824
  _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
32221
32825
  continue;
32222
32826
  }
32223
- _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, {
32827
+ const decoded = await Collection.fromJsonLd(v, {
32224
32828
  ...options,
32225
32829
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32226
- }));
32830
+ });
32831
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32832
+ _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(decoded);
32227
32833
  }
32228
32834
  instance.#_BBCTgfphhsFzpVfKTykGSpBNwoA_followers = _BBCTgfphhsFzpVfKTykGSpBNwoA_followers;
32229
32835
  const _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked = [];
@@ -32234,10 +32840,12 @@ var Person = class Person extends Object$1 {
32234
32840
  _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
32235
32841
  continue;
32236
32842
  }
32237
- _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, {
32843
+ const decoded = await Collection.fromJsonLd(v, {
32238
32844
  ...options,
32239
32845
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32240
- }));
32846
+ });
32847
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32848
+ _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(decoded);
32241
32849
  }
32242
32850
  instance.#_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked = _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked;
32243
32851
  const _4N1vBJzXDf8NbBumeECQMFvKetja_featured = [];
@@ -32248,10 +32856,12 @@ var Person = class Person extends Object$1 {
32248
32856
  _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
32249
32857
  continue;
32250
32858
  }
32251
- _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, {
32859
+ const decoded = await Collection.fromJsonLd(v, {
32252
32860
  ...options,
32253
32861
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32254
- }));
32862
+ });
32863
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32864
+ _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(decoded);
32255
32865
  }
32256
32866
  instance.#_4N1vBJzXDf8NbBumeECQMFvKetja_featured = _4N1vBJzXDf8NbBumeECQMFvKetja_featured;
32257
32867
  const _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags = [];
@@ -32262,10 +32872,12 @@ var Person = class Person extends Object$1 {
32262
32872
  _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
32263
32873
  continue;
32264
32874
  }
32265
- _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, {
32875
+ const decoded = await Collection.fromJsonLd(v, {
32266
32876
  ...options,
32267
32877
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32268
- }));
32878
+ });
32879
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32880
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(decoded);
32269
32881
  }
32270
32882
  instance.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags = _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags;
32271
32883
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams = [];
@@ -32276,48 +32888,60 @@ var Person = class Person extends Object$1 {
32276
32888
  _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
32277
32889
  continue;
32278
32890
  }
32279
- _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, {
32891
+ const decoded = await Collection.fromJsonLd(v, {
32280
32892
  ...options,
32281
32893
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32282
- }));
32894
+ });
32895
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32896
+ _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(decoded);
32283
32897
  }
32284
32898
  instance.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams = _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams;
32285
32899
  const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints = [];
32286
32900
  let _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array = values["https://www.w3.org/ns/activitystreams#endpoints"];
32287
32901
  for (const v of _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array == null ? [] : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array.length === 1 && "@list" in _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array[0] ? _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array[0]["@list"] : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array) {
32288
32902
  if (v == null) continue;
32289
- _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints.push(await Endpoints.fromJsonLd(v, {
32903
+ const decoded = await Endpoints.fromJsonLd(v, {
32290
32904
  ...options,
32291
32905
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32292
- }));
32906
+ });
32907
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32908
+ _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints.push(decoded);
32293
32909
  }
32294
32910
  instance.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints = _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints;
32295
32911
  const _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable = [];
32296
32912
  let _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array = values["http://joinmastodon.org/ns#discoverable"];
32297
32913
  for (const v of _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array == null ? [] : _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array.length === 1 && "@list" in _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array[0] ? _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array[0]["@list"] : _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array) {
32298
32914
  if (v == null) continue;
32299
- _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable.push(v["@value"]);
32915
+ const decoded = v["@value"];
32916
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32917
+ _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable.push(decoded);
32300
32918
  }
32301
32919
  instance.#_gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable = _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable;
32302
32920
  const _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = [];
32303
32921
  let _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array = values["http://joinmastodon.org/ns#suspended"];
32304
32922
  for (const v of _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array == null ? [] : _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array.length === 1 && "@list" in _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array[0] ? _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array[0]["@list"] : _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array) {
32305
32923
  if (v == null) continue;
32306
- _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended.push(v["@value"]);
32924
+ const decoded = v["@value"];
32925
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32926
+ _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended.push(decoded);
32307
32927
  }
32308
32928
  instance.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended;
32309
32929
  const _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = [];
32310
32930
  let _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array = values["http://joinmastodon.org/ns#memorial"];
32311
32931
  for (const v of _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array == null ? [] : _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array.length === 1 && "@list" in _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array[0] ? _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array[0]["@list"] : _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array) {
32312
32932
  if (v == null) continue;
32313
- _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial.push(v["@value"]);
32933
+ const decoded = v["@value"];
32934
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32935
+ _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial.push(decoded);
32314
32936
  }
32315
32937
  instance.#_79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial;
32316
32938
  const _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = [];
32317
32939
  let _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array = values["http://joinmastodon.org/ns#indexable"];
32318
32940
  for (const v of _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array == null ? [] : _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array.length === 1 && "@list" in _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array[0] ? _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array[0]["@list"] : _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array) {
32319
32941
  if (v == null) continue;
32320
- _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.push(v["@value"]);
32942
+ const decoded = v["@value"];
32943
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32944
+ _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.push(decoded);
32321
32945
  }
32322
32946
  instance.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable;
32323
32947
  const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
@@ -32344,7 +32968,11 @@ var Person = class Person extends Object$1 {
32344
32968
  ...options,
32345
32969
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32346
32970
  }) : void 0;
32347
- if (typeof decoded === "undefined") continue;
32971
+ if (typeof decoded === "undefined") {
32972
+ shouldCacheJsonLd = false;
32973
+ continue;
32974
+ }
32975
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32348
32976
  _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(decoded);
32349
32977
  }
32350
32978
  instance.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
@@ -32372,7 +33000,11 @@ var Person = class Person extends Object$1 {
32372
33000
  ...options,
32373
33001
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32374
33002
  }) : void 0;
32375
- if (typeof decoded === "undefined") continue;
33003
+ if (typeof decoded === "undefined") {
33004
+ shouldCacheJsonLd = false;
33005
+ continue;
33006
+ }
33007
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32376
33008
  _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(decoded);
32377
33009
  }
32378
33010
  instance.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs;
@@ -32384,27 +33016,34 @@ var Person = class Person extends Object$1 {
32384
33016
  _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
32385
33017
  continue;
32386
33018
  }
32387
- _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(await DidService.fromJsonLd(v, {
33019
+ const decoded = await DidService.fromJsonLd(v, {
32388
33020
  ...options,
32389
33021
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
32390
- }));
33022
+ });
33023
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
33024
+ _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(decoded);
32391
33025
  }
32392
33026
  instance.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service;
32393
33027
  const _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
32394
33028
  let _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array = values["https://misskey-hub.net/ns#_misskey_followedMessage"];
32395
33029
  for (const v of _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array == null ? [] : _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array.length === 1 && "@list" in _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array[0] ? _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array[0]["@list"] : _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array) {
32396
33030
  if (v == null) continue;
32397
- _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage.push(v["@value"]);
33031
+ const decoded = v["@value"];
33032
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
33033
+ _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage.push(decoded);
32398
33034
  }
32399
33035
  instance.#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage;
32400
33036
  const _2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
32401
33037
  let _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array = values["https://misskey-hub.net/ns#isCat"];
32402
33038
  for (const v of _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array == null ? [] : _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array.length === 1 && "@list" in _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array[0] ? _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array[0]["@list"] : _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array) {
32403
33039
  if (v == null) continue;
32404
- _2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(v["@value"]);
33040
+ const decoded = v["@value"];
33041
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
33042
+ _2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
32405
33043
  }
32406
33044
  instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
32407
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
33045
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
33046
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
32408
33047
  instance._cachedJsonLd = structuredClone(json);
32409
33048
  } catch {
32410
33049
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -32851,39 +33490,50 @@ var Place = class Place extends Object$1 {
32851
33490
  _fromSubclass: true
32852
33491
  });
32853
33492
  if (!(instance instanceof Place)) throw new TypeError("Unexpected type: " + instance.constructor.name);
33493
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
32854
33494
  const _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne_accuracy = [];
32855
33495
  let _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne_accuracy__array = values["https://www.w3.org/ns/activitystreams#accuracy"];
32856
33496
  for (const v of _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne_accuracy__array == null ? [] : _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne_accuracy__array.length === 1 && "@list" in _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne_accuracy__array[0] ? _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne_accuracy__array[0]["@list"] : _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne_accuracy__array) {
32857
33497
  if (v == null) continue;
32858
- _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne_accuracy.push(v["@value"]);
33498
+ const decoded = v["@value"];
33499
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
33500
+ _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne_accuracy.push(decoded);
32859
33501
  }
32860
33502
  instance.#_3UCsHnBHvDAXJnBuzw3zw1VVs3Ne_accuracy = _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne_accuracy;
32861
33503
  const _3Q6KDcFQUJRRaBux1BL2yp5QWiBi_altitude = [];
32862
33504
  let _3Q6KDcFQUJRRaBux1BL2yp5QWiBi_altitude__array = values["https://www.w3.org/ns/activitystreams#altitude"];
32863
33505
  for (const v of _3Q6KDcFQUJRRaBux1BL2yp5QWiBi_altitude__array == null ? [] : _3Q6KDcFQUJRRaBux1BL2yp5QWiBi_altitude__array.length === 1 && "@list" in _3Q6KDcFQUJRRaBux1BL2yp5QWiBi_altitude__array[0] ? _3Q6KDcFQUJRRaBux1BL2yp5QWiBi_altitude__array[0]["@list"] : _3Q6KDcFQUJRRaBux1BL2yp5QWiBi_altitude__array) {
32864
33506
  if (v == null) continue;
32865
- _3Q6KDcFQUJRRaBux1BL2yp5QWiBi_altitude.push(v["@value"]);
33507
+ const decoded = v["@value"];
33508
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
33509
+ _3Q6KDcFQUJRRaBux1BL2yp5QWiBi_altitude.push(decoded);
32866
33510
  }
32867
33511
  instance.#_3Q6KDcFQUJRRaBux1BL2yp5QWiBi_altitude = _3Q6KDcFQUJRRaBux1BL2yp5QWiBi_altitude;
32868
33512
  const _3g85RoKRnaNjP7DFyLSvsWDg7HGM_latitude = [];
32869
33513
  let _3g85RoKRnaNjP7DFyLSvsWDg7HGM_latitude__array = values["https://www.w3.org/ns/activitystreams#latitude"];
32870
33514
  for (const v of _3g85RoKRnaNjP7DFyLSvsWDg7HGM_latitude__array == null ? [] : _3g85RoKRnaNjP7DFyLSvsWDg7HGM_latitude__array.length === 1 && "@list" in _3g85RoKRnaNjP7DFyLSvsWDg7HGM_latitude__array[0] ? _3g85RoKRnaNjP7DFyLSvsWDg7HGM_latitude__array[0]["@list"] : _3g85RoKRnaNjP7DFyLSvsWDg7HGM_latitude__array) {
32871
33515
  if (v == null) continue;
32872
- _3g85RoKRnaNjP7DFyLSvsWDg7HGM_latitude.push(v["@value"]);
33516
+ const decoded = v["@value"];
33517
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
33518
+ _3g85RoKRnaNjP7DFyLSvsWDg7HGM_latitude.push(decoded);
32873
33519
  }
32874
33520
  instance.#_3g85RoKRnaNjP7DFyLSvsWDg7HGM_latitude = _3g85RoKRnaNjP7DFyLSvsWDg7HGM_latitude;
32875
33521
  const _B2GEYdS9yBAF3ho1pm1rcRg7cSf_longitude = [];
32876
33522
  let _B2GEYdS9yBAF3ho1pm1rcRg7cSf_longitude__array = values["https://www.w3.org/ns/activitystreams#longitude"];
32877
33523
  for (const v of _B2GEYdS9yBAF3ho1pm1rcRg7cSf_longitude__array == null ? [] : _B2GEYdS9yBAF3ho1pm1rcRg7cSf_longitude__array.length === 1 && "@list" in _B2GEYdS9yBAF3ho1pm1rcRg7cSf_longitude__array[0] ? _B2GEYdS9yBAF3ho1pm1rcRg7cSf_longitude__array[0]["@list"] : _B2GEYdS9yBAF3ho1pm1rcRg7cSf_longitude__array) {
32878
33524
  if (v == null) continue;
32879
- _B2GEYdS9yBAF3ho1pm1rcRg7cSf_longitude.push(v["@value"]);
33525
+ const decoded = v["@value"];
33526
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
33527
+ _B2GEYdS9yBAF3ho1pm1rcRg7cSf_longitude.push(decoded);
32880
33528
  }
32881
33529
  instance.#_B2GEYdS9yBAF3ho1pm1rcRg7cSf_longitude = _B2GEYdS9yBAF3ho1pm1rcRg7cSf_longitude;
32882
33530
  const _3ga86BKHUtRkGx5PHBjRiUXXzwnw_radius = [];
32883
33531
  let _3ga86BKHUtRkGx5PHBjRiUXXzwnw_radius__array = values["https://www.w3.org/ns/activitystreams#radius"];
32884
33532
  for (const v of _3ga86BKHUtRkGx5PHBjRiUXXzwnw_radius__array == null ? [] : _3ga86BKHUtRkGx5PHBjRiUXXzwnw_radius__array.length === 1 && "@list" in _3ga86BKHUtRkGx5PHBjRiUXXzwnw_radius__array[0] ? _3ga86BKHUtRkGx5PHBjRiUXXzwnw_radius__array[0]["@list"] : _3ga86BKHUtRkGx5PHBjRiUXXzwnw_radius__array) {
32885
33533
  if (v == null) continue;
32886
- _3ga86BKHUtRkGx5PHBjRiUXXzwnw_radius.push(v["@value"]);
33534
+ const decoded = v["@value"];
33535
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
33536
+ _3ga86BKHUtRkGx5PHBjRiUXXzwnw_radius.push(decoded);
32887
33537
  }
32888
33538
  instance.#_3ga86BKHUtRkGx5PHBjRiUXXzwnw_radius = _3ga86BKHUtRkGx5PHBjRiUXXzwnw_radius;
32889
33539
  const _oKrwxU4V8wiKhMW1QEYQibcJh8c_units = [];
@@ -32891,11 +33541,16 @@ var Place = class Place extends Object$1 {
32891
33541
  for (const v of _oKrwxU4V8wiKhMW1QEYQibcJh8c_units__array == null ? [] : _oKrwxU4V8wiKhMW1QEYQibcJh8c_units__array.length === 1 && "@list" in _oKrwxU4V8wiKhMW1QEYQibcJh8c_units__array[0] ? _oKrwxU4V8wiKhMW1QEYQibcJh8c_units__array[0]["@list"] : _oKrwxU4V8wiKhMW1QEYQibcJh8c_units__array) {
32892
33542
  if (v == null) continue;
32893
33543
  const decoded = typeof v === "object" && "@value" in v && (v["@value"] == "cm" || v["@value"] == "feet" || v["@value"] == "inches" || v["@value"] == "km" || v["@value"] == "m" || v["@value"] == "miles") ? v["@value"] : typeof v === "object" && "@id" in v && typeof v["@id"] === "string" && v["@id"] !== "" ? v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && (values["@id"] == null ? options.baseUrl : new URL(values["@id"])) ? new URL(v["@id"]) : new URL(v["@id"], values["@id"] == null ? options.baseUrl : new URL(values["@id"])) : void 0;
32894
- if (typeof decoded === "undefined") continue;
33544
+ if (typeof decoded === "undefined") {
33545
+ shouldCacheJsonLd = false;
33546
+ continue;
33547
+ }
33548
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
32895
33549
  _oKrwxU4V8wiKhMW1QEYQibcJh8c_units.push(decoded);
32896
33550
  }
32897
33551
  instance.#_oKrwxU4V8wiKhMW1QEYQibcJh8c_units = _oKrwxU4V8wiKhMW1QEYQibcJh8c_units;
32898
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
33552
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
33553
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
32899
33554
  instance._cachedJsonLd = structuredClone(json);
32900
33555
  } catch {
32901
33556
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -33235,6 +33890,7 @@ var Profile = class Profile extends Object$1 {
33235
33890
  _fromSubclass: true
33236
33891
  });
33237
33892
  if (!(instance instanceof Profile)) throw new TypeError("Unexpected type: " + instance.constructor.name);
33893
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
33238
33894
  const _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes = [];
33239
33895
  let _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes__array = values["https://www.w3.org/ns/activitystreams#describes"];
33240
33896
  for (const v of _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes__array == null ? [] : _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes__array.length === 1 && "@list" in _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes__array[0] ? _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes__array[0]["@list"] : _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes__array) {
@@ -33243,13 +33899,16 @@ var Profile = class Profile extends Object$1 {
33243
33899
  _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
33244
33900
  continue;
33245
33901
  }
33246
- _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes.push(await Object$1.fromJsonLd(v, {
33902
+ const decoded = await Object$1.fromJsonLd(v, {
33247
33903
  ...options,
33248
33904
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
33249
- }));
33905
+ });
33906
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
33907
+ _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes.push(decoded);
33250
33908
  }
33251
33909
  instance.#_3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes = _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes;
33252
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
33910
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
33911
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
33253
33912
  instance._cachedJsonLd = structuredClone(json);
33254
33913
  } catch {
33255
33914
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -33791,6 +34450,7 @@ var Question = class Question extends IntransitiveActivity {
33791
34450
  _fromSubclass: true
33792
34451
  });
33793
34452
  if (!(instance instanceof Question)) throw new TypeError("Unexpected type: " + instance.constructor.name);
34453
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
33794
34454
  const _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf = [];
33795
34455
  let _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf__array = values["https://www.w3.org/ns/activitystreams#oneOf"];
33796
34456
  for (const v of _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf__array == null ? [] : _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf__array.length === 1 && "@list" in _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf__array[0] ? _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf__array[0]["@list"] : _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf__array) {
@@ -33799,10 +34459,12 @@ var Question = class Question extends IntransitiveActivity {
33799
34459
  _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
33800
34460
  continue;
33801
34461
  }
33802
- _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf.push(await Object$1.fromJsonLd(v, {
34462
+ const decoded = await Object$1.fromJsonLd(v, {
33803
34463
  ...options,
33804
34464
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
33805
- }));
34465
+ });
34466
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
34467
+ _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf.push(decoded);
33806
34468
  }
33807
34469
  instance.#_2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf = _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf;
33808
34470
  const _2mV6isMTPRKbWdLCjcpiEysq5dAY_anyOf = [];
@@ -33813,10 +34475,12 @@ var Question = class Question extends IntransitiveActivity {
33813
34475
  _2mV6isMTPRKbWdLCjcpiEysq5dAY_anyOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
33814
34476
  continue;
33815
34477
  }
33816
- _2mV6isMTPRKbWdLCjcpiEysq5dAY_anyOf.push(await Object$1.fromJsonLd(v, {
34478
+ const decoded = await Object$1.fromJsonLd(v, {
33817
34479
  ...options,
33818
34480
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
33819
- }));
34481
+ });
34482
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
34483
+ _2mV6isMTPRKbWdLCjcpiEysq5dAY_anyOf.push(decoded);
33820
34484
  }
33821
34485
  instance.#_2mV6isMTPRKbWdLCjcpiEysq5dAY_anyOf = _2mV6isMTPRKbWdLCjcpiEysq5dAY_anyOf;
33822
34486
  const _3KronwL8DiiKBRcJFKQPiEHm8xb6_closed = [];
@@ -33824,7 +34488,11 @@ var Question = class Question extends IntransitiveActivity {
33824
34488
  for (const v of _3KronwL8DiiKBRcJFKQPiEHm8xb6_closed__array == null ? [] : _3KronwL8DiiKBRcJFKQPiEHm8xb6_closed__array.length === 1 && "@list" in _3KronwL8DiiKBRcJFKQPiEHm8xb6_closed__array[0] ? _3KronwL8DiiKBRcJFKQPiEHm8xb6_closed__array[0]["@list"] : _3KronwL8DiiKBRcJFKQPiEHm8xb6_closed__array) {
33825
34489
  if (v == null) continue;
33826
34490
  const decoded = typeof v === "object" && "@type" in v && "@value" in v && typeof v["@value"] === "string" && v["@type"] === "http://www.w3.org/2001/XMLSchema#dateTime" && new Date(v["@value"]).toString() !== "Invalid Date" ? Temporal.Instant.from(v["@value"].substring(19).match(/[Z+-]/) ? v["@value"] : v["@value"] + "Z") : typeof v === "object" && "@value" in v && typeof v["@value"] === "boolean" ? v["@value"] : void 0;
33827
- if (typeof decoded === "undefined") continue;
34491
+ if (typeof decoded === "undefined") {
34492
+ shouldCacheJsonLd = false;
34493
+ continue;
34494
+ }
34495
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
33828
34496
  _3KronwL8DiiKBRcJFKQPiEHm8xb6_closed.push(decoded);
33829
34497
  }
33830
34498
  instance.#_3KronwL8DiiKBRcJFKQPiEHm8xb6_closed = _3KronwL8DiiKBRcJFKQPiEHm8xb6_closed;
@@ -33832,7 +34500,9 @@ var Question = class Question extends IntransitiveActivity {
33832
34500
  let _3H4RdST7dxfmghccvE3rKD3KgcxG_votersCount__array = values["http://joinmastodon.org/ns#votersCount"];
33833
34501
  for (const v of _3H4RdST7dxfmghccvE3rKD3KgcxG_votersCount__array == null ? [] : _3H4RdST7dxfmghccvE3rKD3KgcxG_votersCount__array.length === 1 && "@list" in _3H4RdST7dxfmghccvE3rKD3KgcxG_votersCount__array[0] ? _3H4RdST7dxfmghccvE3rKD3KgcxG_votersCount__array[0]["@list"] : _3H4RdST7dxfmghccvE3rKD3KgcxG_votersCount__array) {
33834
34502
  if (v == null) continue;
33835
- _3H4RdST7dxfmghccvE3rKD3KgcxG_votersCount.push(v["@value"]);
34503
+ const decoded = v["@value"];
34504
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
34505
+ _3H4RdST7dxfmghccvE3rKD3KgcxG_votersCount.push(decoded);
33836
34506
  }
33837
34507
  instance.#_3H4RdST7dxfmghccvE3rKD3KgcxG_votersCount = _3H4RdST7dxfmghccvE3rKD3KgcxG_votersCount;
33838
34508
  const _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl = [];
@@ -33841,10 +34511,13 @@ var Question = class Question extends IntransitiveActivity {
33841
34511
  if (_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array == null || _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array.length < 1) _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl__array = values["http://fedibird.com/ns#quoteUri"];
33842
34512
  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) {
33843
34513
  if (v == null) continue;
33844
- _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl.push(new URL(v["@value"]));
34514
+ const decoded = new URL(v["@value"]);
34515
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
34516
+ _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl.push(decoded);
33845
34517
  }
33846
34518
  instance.#_K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl = _K1zrMQkQjmciFAmGdGLfaDbG925_quoteUrl;
33847
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
34519
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
34520
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
33848
34521
  instance._cachedJsonLd = structuredClone(json);
33849
34522
  } catch {
33850
34523
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -34017,7 +34690,9 @@ var Read = class Read extends Activity {
34017
34690
  _fromSubclass: true
34018
34691
  });
34019
34692
  if (!(instance instanceof Read)) throw new TypeError("Unexpected type: " + instance.constructor.name);
34020
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
34693
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
34694
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
34695
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
34021
34696
  instance._cachedJsonLd = structuredClone(json);
34022
34697
  } catch {
34023
34698
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -34166,7 +34841,9 @@ var Reject = class Reject extends Activity {
34166
34841
  _fromSubclass: true
34167
34842
  });
34168
34843
  if (!(instance instanceof Reject)) throw new TypeError("Unexpected type: " + instance.constructor.name);
34169
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
34844
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
34845
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
34846
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
34170
34847
  instance._cachedJsonLd = structuredClone(json);
34171
34848
  } catch {
34172
34849
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -34893,6 +35570,7 @@ var Relationship = class Relationship extends Object$1 {
34893
35570
  _fromSubclass: true
34894
35571
  });
34895
35572
  if (!(instance instanceof Relationship)) throw new TypeError("Unexpected type: " + instance.constructor.name);
35573
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
34896
35574
  const _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject = [];
34897
35575
  let _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject__array = values["https://www.w3.org/ns/activitystreams#subject"];
34898
35576
  for (const v of _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject__array == null ? [] : _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject__array.length === 1 && "@list" in _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject__array[0] ? _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject__array[0]["@list"] : _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject__array) {
@@ -34901,10 +35579,12 @@ var Relationship = class Relationship extends Object$1 {
34901
35579
  _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
34902
35580
  continue;
34903
35581
  }
34904
- _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject.push(await Object$1.fromJsonLd(v, {
35582
+ const decoded = await Object$1.fromJsonLd(v, {
34905
35583
  ...options,
34906
35584
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
34907
- }));
35585
+ });
35586
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
35587
+ _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject.push(decoded);
34908
35588
  }
34909
35589
  instance.#_2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject = _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject;
34910
35590
  const _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object = [];
@@ -34915,10 +35595,12 @@ var Relationship = class Relationship extends Object$1 {
34915
35595
  _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
34916
35596
  continue;
34917
35597
  }
34918
- _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(await Object$1.fromJsonLd(v, {
35598
+ const decoded = await Object$1.fromJsonLd(v, {
34919
35599
  ...options,
34920
35600
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
34921
- }));
35601
+ });
35602
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
35603
+ _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(decoded);
34922
35604
  }
34923
35605
  instance.#_2MH19yxjn1wnHsNfa5n4JBhJzxyc_object = _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object;
34924
35606
  const _4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship = [];
@@ -34929,13 +35611,16 @@ var Relationship = class Relationship extends Object$1 {
34929
35611
  _4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
34930
35612
  continue;
34931
35613
  }
34932
- _4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship.push(await Object$1.fromJsonLd(v, {
35614
+ const decoded = await Object$1.fromJsonLd(v, {
34933
35615
  ...options,
34934
35616
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
34935
- }));
35617
+ });
35618
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
35619
+ _4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship.push(decoded);
34936
35620
  }
34937
35621
  instance.#_4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship = _4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship;
34938
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
35622
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
35623
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
34939
35624
  instance._cachedJsonLd = structuredClone(json);
34940
35625
  } catch {
34941
35626
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -35101,7 +35786,9 @@ var Remove = class Remove extends Activity {
35101
35786
  _fromSubclass: true
35102
35787
  });
35103
35788
  if (!(instance instanceof Remove)) throw new TypeError("Unexpected type: " + instance.constructor.name);
35104
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
35789
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
35790
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
35791
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
35105
35792
  instance._cachedJsonLd = structuredClone(json);
35106
35793
  } catch {
35107
35794
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -37966,12 +38653,17 @@ var Service = class Service extends Object$1 {
37966
38653
  _fromSubclass: true
37967
38654
  });
37968
38655
  if (!(instance instanceof Service)) throw new TypeError("Unexpected type: " + instance.constructor.name);
38656
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
37969
38657
  const _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername = [];
37970
38658
  let _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array = values["https://www.w3.org/ns/activitystreams#preferredUsername"];
37971
38659
  for (const v of _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array == null ? [] : _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array.length === 1 && "@list" in _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array[0] ? _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array[0]["@list"] : _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername__array) {
37972
38660
  if (v == null) continue;
37973
- const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
37974
- if (typeof decoded === "undefined") continue;
38661
+ const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" && isValidLanguageTag(v["@language"]) ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
38662
+ if (typeof decoded === "undefined") {
38663
+ shouldCacheJsonLd = false;
38664
+ continue;
38665
+ }
38666
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
37975
38667
  _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.push(decoded);
37976
38668
  }
37977
38669
  instance.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername = _3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername;
@@ -37983,10 +38675,12 @@ var Service = class Service extends Object$1 {
37983
38675
  _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
37984
38676
  continue;
37985
38677
  }
37986
- _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, {
38678
+ const decoded = await CryptographicKey.fromJsonLd(v, {
37987
38679
  ...options,
37988
38680
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
37989
- }));
38681
+ });
38682
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38683
+ _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(decoded);
37990
38684
  }
37991
38685
  instance.#_axq166E2eZADq34V4MYUc8KMZdC_publicKey = _axq166E2eZADq34V4MYUc8KMZdC_publicKey;
37992
38686
  const _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
@@ -37997,17 +38691,21 @@ var Service = class Service extends Object$1 {
37997
38691
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
37998
38692
  continue;
37999
38693
  }
38000
- _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, {
38694
+ const decoded = await Multikey.fromJsonLd(v, {
38001
38695
  ...options,
38002
38696
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
38003
- }));
38697
+ });
38698
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38699
+ _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
38004
38700
  }
38005
38701
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
38006
38702
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
38007
38703
  let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
38008
38704
  for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
38009
38705
  if (v == null) continue;
38010
- _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.push(v["@value"]);
38706
+ const decoded = v["@value"];
38707
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38708
+ _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.push(decoded);
38011
38709
  }
38012
38710
  instance.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
38013
38711
  const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
@@ -38025,7 +38723,11 @@ var Service = class Service extends Object$1 {
38025
38723
  ...options,
38026
38724
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
38027
38725
  }) : void 0;
38028
- if (typeof decoded === "undefined") continue;
38726
+ if (typeof decoded === "undefined") {
38727
+ shouldCacheJsonLd = false;
38728
+ continue;
38729
+ }
38730
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38029
38731
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
38030
38732
  }
38031
38733
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -38044,7 +38746,11 @@ var Service = class Service extends Object$1 {
38044
38746
  ...options,
38045
38747
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
38046
38748
  }) : void 0;
38047
- if (typeof decoded === "undefined") continue;
38749
+ if (typeof decoded === "undefined") {
38750
+ shouldCacheJsonLd = false;
38751
+ continue;
38752
+ }
38753
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38048
38754
  _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
38049
38755
  }
38050
38756
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = _41QwhqJouoLg3h8dRPKat21brynC_outbox;
@@ -38056,10 +38762,12 @@ var Service = class Service extends Object$1 {
38056
38762
  _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
38057
38763
  continue;
38058
38764
  }
38059
- _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, {
38765
+ const decoded = await Collection.fromJsonLd(v, {
38060
38766
  ...options,
38061
38767
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
38062
- }));
38768
+ });
38769
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38770
+ _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(decoded);
38063
38771
  }
38064
38772
  instance.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following = _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following;
38065
38773
  const _BBCTgfphhsFzpVfKTykGSpBNwoA_followers = [];
@@ -38070,10 +38778,12 @@ var Service = class Service extends Object$1 {
38070
38778
  _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
38071
38779
  continue;
38072
38780
  }
38073
- _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, {
38781
+ const decoded = await Collection.fromJsonLd(v, {
38074
38782
  ...options,
38075
38783
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
38076
- }));
38784
+ });
38785
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38786
+ _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(decoded);
38077
38787
  }
38078
38788
  instance.#_BBCTgfphhsFzpVfKTykGSpBNwoA_followers = _BBCTgfphhsFzpVfKTykGSpBNwoA_followers;
38079
38789
  const _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked = [];
@@ -38084,10 +38794,12 @@ var Service = class Service extends Object$1 {
38084
38794
  _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
38085
38795
  continue;
38086
38796
  }
38087
- _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, {
38797
+ const decoded = await Collection.fromJsonLd(v, {
38088
38798
  ...options,
38089
38799
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
38090
- }));
38800
+ });
38801
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38802
+ _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(decoded);
38091
38803
  }
38092
38804
  instance.#_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked = _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked;
38093
38805
  const _4N1vBJzXDf8NbBumeECQMFvKetja_featured = [];
@@ -38098,10 +38810,12 @@ var Service = class Service extends Object$1 {
38098
38810
  _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
38099
38811
  continue;
38100
38812
  }
38101
- _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, {
38813
+ const decoded = await Collection.fromJsonLd(v, {
38102
38814
  ...options,
38103
38815
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
38104
- }));
38816
+ });
38817
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38818
+ _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(decoded);
38105
38819
  }
38106
38820
  instance.#_4N1vBJzXDf8NbBumeECQMFvKetja_featured = _4N1vBJzXDf8NbBumeECQMFvKetja_featured;
38107
38821
  const _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags = [];
@@ -38112,10 +38826,12 @@ var Service = class Service extends Object$1 {
38112
38826
  _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
38113
38827
  continue;
38114
38828
  }
38115
- _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, {
38829
+ const decoded = await Collection.fromJsonLd(v, {
38116
38830
  ...options,
38117
38831
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
38118
- }));
38832
+ });
38833
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38834
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(decoded);
38119
38835
  }
38120
38836
  instance.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags = _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags;
38121
38837
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams = [];
@@ -38126,48 +38842,60 @@ var Service = class Service extends Object$1 {
38126
38842
  _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
38127
38843
  continue;
38128
38844
  }
38129
- _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, {
38845
+ const decoded = await Collection.fromJsonLd(v, {
38130
38846
  ...options,
38131
38847
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
38132
- }));
38848
+ });
38849
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38850
+ _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(decoded);
38133
38851
  }
38134
38852
  instance.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams = _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams;
38135
38853
  const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints = [];
38136
38854
  let _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array = values["https://www.w3.org/ns/activitystreams#endpoints"];
38137
38855
  for (const v of _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array == null ? [] : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array.length === 1 && "@list" in _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array[0] ? _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array[0]["@list"] : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints__array) {
38138
38856
  if (v == null) continue;
38139
- _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints.push(await Endpoints.fromJsonLd(v, {
38857
+ const decoded = await Endpoints.fromJsonLd(v, {
38140
38858
  ...options,
38141
38859
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
38142
- }));
38860
+ });
38861
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38862
+ _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints.push(decoded);
38143
38863
  }
38144
38864
  instance.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints = _sEoQwUbfk4hEfugzNQ2ZiDcLMkG_endpoints;
38145
38865
  const _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable = [];
38146
38866
  let _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array = values["http://joinmastodon.org/ns#discoverable"];
38147
38867
  for (const v of _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array == null ? [] : _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array.length === 1 && "@list" in _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array[0] ? _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array[0]["@list"] : _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable__array) {
38148
38868
  if (v == null) continue;
38149
- _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable.push(v["@value"]);
38869
+ const decoded = v["@value"];
38870
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38871
+ _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable.push(decoded);
38150
38872
  }
38151
38873
  instance.#_gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable = _gAJzg1QDc4rcefFsUzGSYmyXvNH_discoverable;
38152
38874
  const _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = [];
38153
38875
  let _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array = values["http://joinmastodon.org/ns#suspended"];
38154
38876
  for (const v of _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array == null ? [] : _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array.length === 1 && "@list" in _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array[0] ? _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array[0]["@list"] : _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended__array) {
38155
38877
  if (v == null) continue;
38156
- _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended.push(v["@value"]);
38878
+ const decoded = v["@value"];
38879
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38880
+ _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended.push(decoded);
38157
38881
  }
38158
38882
  instance.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = _2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended;
38159
38883
  const _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = [];
38160
38884
  let _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array = values["http://joinmastodon.org/ns#memorial"];
38161
38885
  for (const v of _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array == null ? [] : _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array.length === 1 && "@list" in _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array[0] ? _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array[0]["@list"] : _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial__array) {
38162
38886
  if (v == null) continue;
38163
- _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial.push(v["@value"]);
38887
+ const decoded = v["@value"];
38888
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38889
+ _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial.push(decoded);
38164
38890
  }
38165
38891
  instance.#_79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = _79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial;
38166
38892
  const _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = [];
38167
38893
  let _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array = values["http://joinmastodon.org/ns#indexable"];
38168
38894
  for (const v of _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array == null ? [] : _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array.length === 1 && "@list" in _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array[0] ? _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array[0]["@list"] : _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable__array) {
38169
38895
  if (v == null) continue;
38170
- _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.push(v["@value"]);
38896
+ const decoded = v["@value"];
38897
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38898
+ _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.push(decoded);
38171
38899
  }
38172
38900
  instance.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable;
38173
38901
  const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
@@ -38194,7 +38922,11 @@ var Service = class Service extends Object$1 {
38194
38922
  ...options,
38195
38923
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
38196
38924
  }) : void 0;
38197
- if (typeof decoded === "undefined") continue;
38925
+ if (typeof decoded === "undefined") {
38926
+ shouldCacheJsonLd = false;
38927
+ continue;
38928
+ }
38929
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38198
38930
  _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(decoded);
38199
38931
  }
38200
38932
  instance.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
@@ -38222,7 +38954,11 @@ var Service = class Service extends Object$1 {
38222
38954
  ...options,
38223
38955
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
38224
38956
  }) : void 0;
38225
- if (typeof decoded === "undefined") continue;
38957
+ if (typeof decoded === "undefined") {
38958
+ shouldCacheJsonLd = false;
38959
+ continue;
38960
+ }
38961
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38226
38962
  _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(decoded);
38227
38963
  }
38228
38964
  instance.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs;
@@ -38234,27 +38970,34 @@ var Service = class Service extends Object$1 {
38234
38970
  _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].substring(5))) : new URL(v["@id"]));
38235
38971
  continue;
38236
38972
  }
38237
- _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(await DidService.fromJsonLd(v, {
38973
+ const decoded = await DidService.fromJsonLd(v, {
38238
38974
  ...options,
38239
38975
  baseUrl: values["@id"] == null ? options.baseUrl : new URL(values["@id"])
38240
- }));
38976
+ });
38977
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38978
+ _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(decoded);
38241
38979
  }
38242
38980
  instance.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = _4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service;
38243
38981
  const _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
38244
38982
  let _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array = values["https://misskey-hub.net/ns#_misskey_followedMessage"];
38245
38983
  for (const v of _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array == null ? [] : _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array.length === 1 && "@list" in _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array[0] ? _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array[0]["@list"] : _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage__array) {
38246
38984
  if (v == null) continue;
38247
- _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage.push(v["@value"]);
38985
+ const decoded = v["@value"];
38986
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38987
+ _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage.push(decoded);
38248
38988
  }
38249
38989
  instance.#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = _QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage;
38250
38990
  const _2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
38251
38991
  let _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array = values["https://misskey-hub.net/ns#isCat"];
38252
38992
  for (const v of _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array == null ? [] : _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array.length === 1 && "@list" in _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array[0] ? _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array[0]["@list"] : _2xEU4QtkC53RAun67T81Egqt9vmL_isCat__array) {
38253
38993
  if (v == null) continue;
38254
- _2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(v["@value"]);
38994
+ const decoded = v["@value"];
38995
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38996
+ _2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
38255
38997
  }
38256
38998
  instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
38257
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
38999
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
39000
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
38258
39001
  instance._cachedJsonLd = structuredClone(json);
38259
39002
  } catch {
38260
39003
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -38395,6 +39138,7 @@ var Source = class {
38395
39138
  #tracerProvider;
38396
39139
  #warning;
38397
39140
  #cachedJsonLd;
39141
+ #shouldCacheJsonLd = true;
38398
39142
  id;
38399
39143
  get _documentLoader() {
38400
39144
  return this.#documentLoader;
@@ -38414,6 +39158,17 @@ var Source = class {
38414
39158
  set _cachedJsonLd(value) {
38415
39159
  this.#cachedJsonLd = value;
38416
39160
  }
39161
+ get _shouldCacheJsonLd() {
39162
+ return this.#shouldCacheJsonLd;
39163
+ }
39164
+ set _shouldCacheJsonLd(value) {
39165
+ this.#shouldCacheJsonLd = value;
39166
+ }
39167
+ static _shouldCacheDecodedJsonLd(value) {
39168
+ if (value == null || typeof value !== "object") return true;
39169
+ if (!("_shouldCacheJsonLd" in value)) return true;
39170
+ return value._shouldCacheJsonLd;
39171
+ }
38417
39172
  /**
38418
39173
  * The type URI of {@link Source}: `https://www.w3.org/ns/activitystreams#Source`.
38419
39174
  */
@@ -38611,12 +39366,17 @@ var Source = class {
38611
39366
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Source")) throw new TypeError("Invalid type: " + values["@type"]);
38612
39367
  }
38613
39368
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : void 0 }, options);
39369
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
38614
39370
  const _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content = [];
38615
39371
  let _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content__array = values["https://www.w3.org/ns/activitystreams#content"];
38616
39372
  for (const v of _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content__array == null ? [] : _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content__array.length === 1 && "@list" in _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content__array[0] ? _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content__array[0]["@list"] : _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content__array) {
38617
39373
  if (v == null) continue;
38618
- const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
38619
- if (typeof decoded === "undefined") continue;
39374
+ const decoded = typeof v === "object" && "@value" in v && typeof v["@value"] === "string" && !("@language" in v) ? v["@value"] : typeof v === "object" && "@language" in v && "@value" in v && typeof v["@language"] === "string" && typeof v["@value"] === "string" && isValidLanguageTag(v["@language"]) ? new LanguageString$1(v["@value"], v["@language"]) : void 0;
39375
+ if (typeof decoded === "undefined") {
39376
+ shouldCacheJsonLd = false;
39377
+ continue;
39378
+ }
39379
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
38620
39380
  _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content.push(decoded);
38621
39381
  }
38622
39382
  instance.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content = _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content;
@@ -38624,10 +39384,13 @@ var Source = class {
38624
39384
  let _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array = values["https://www.w3.org/ns/activitystreams#mediaType"];
38625
39385
  for (const v of _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array == null ? [] : _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array.length === 1 && "@list" in _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array[0] ? _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array[0]["@list"] : _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType__array) {
38626
39386
  if (v == null) continue;
38627
- _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.push(v["@value"]);
39387
+ const decoded = v["@value"];
39388
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
39389
+ _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.push(decoded);
38628
39390
  }
38629
39391
  instance.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType;
38630
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
39392
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
39393
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
38631
39394
  instance._cachedJsonLd = structuredClone(json);
38632
39395
  } catch {
38633
39396
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -38791,7 +39554,9 @@ var TentativeAccept = class TentativeAccept extends Accept {
38791
39554
  _fromSubclass: true
38792
39555
  });
38793
39556
  if (!(instance instanceof TentativeAccept)) throw new TypeError("Unexpected type: " + instance.constructor.name);
38794
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
39557
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
39558
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
39559
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
38795
39560
  instance._cachedJsonLd = structuredClone(json);
38796
39561
  } catch {
38797
39562
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -38939,7 +39704,9 @@ var TentativeReject = class TentativeReject extends Reject {
38939
39704
  _fromSubclass: true
38940
39705
  });
38941
39706
  if (!(instance instanceof TentativeReject)) throw new TypeError("Unexpected type: " + instance.constructor.name);
38942
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
39707
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
39708
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
39709
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
38943
39710
  instance._cachedJsonLd = structuredClone(json);
38944
39711
  } catch {
38945
39712
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -39126,14 +39893,18 @@ var Tombstone = class Tombstone extends Object$1 {
39126
39893
  _fromSubclass: true
39127
39894
  });
39128
39895
  if (!(instance instanceof Tombstone)) throw new TypeError("Unexpected type: " + instance.constructor.name);
39896
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
39129
39897
  const _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted = [];
39130
39898
  let _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted__array = values["https://www.w3.org/ns/activitystreams#deleted"];
39131
39899
  for (const v of _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted__array == null ? [] : _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted__array.length === 1 && "@list" in _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted__array[0] ? _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted__array[0]["@list"] : _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted__array) {
39132
39900
  if (v == null) continue;
39133
- _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted.push(Temporal.Instant.from(v["@value"].substring(19).match(/[Z+-]/) ? v["@value"] : v["@value"] + "Z"));
39901
+ const decoded = Temporal.Instant.from(v["@value"].substring(19).match(/[Z+-]/) ? v["@value"] : v["@value"] + "Z");
39902
+ if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
39903
+ _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted.push(decoded);
39134
39904
  }
39135
39905
  instance.#_8g8g4LiVMhFTXskuDEqx4ascxUr_deleted = _8g8g4LiVMhFTXskuDEqx4ascxUr_deleted;
39136
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
39906
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
39907
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
39137
39908
  instance._cachedJsonLd = structuredClone(json);
39138
39909
  } catch {
39139
39910
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -39289,7 +40060,9 @@ var Travel = class Travel extends IntransitiveActivity {
39289
40060
  _fromSubclass: true
39290
40061
  });
39291
40062
  if (!(instance instanceof Travel)) throw new TypeError("Unexpected type: " + instance.constructor.name);
39292
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
40063
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
40064
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
40065
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
39293
40066
  instance._cachedJsonLd = structuredClone(json);
39294
40067
  } catch {
39295
40068
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -39451,7 +40224,9 @@ var Undo = class Undo extends Activity {
39451
40224
  _fromSubclass: true
39452
40225
  });
39453
40226
  if (!(instance instanceof Undo)) throw new TypeError("Unexpected type: " + instance.constructor.name);
39454
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
40227
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
40228
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
40229
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
39455
40230
  instance._cachedJsonLd = structuredClone(json);
39456
40231
  } catch {
39457
40232
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -39651,7 +40426,9 @@ var Update = class Update extends Activity {
39651
40426
  _fromSubclass: true
39652
40427
  });
39653
40428
  if (!(instance instanceof Update)) throw new TypeError("Unexpected type: " + instance.constructor.name);
39654
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
40429
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
40430
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
40431
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
39655
40432
  instance._cachedJsonLd = structuredClone(json);
39656
40433
  } catch {
39657
40434
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -39805,7 +40582,9 @@ var Video = class Video extends Document {
39805
40582
  _fromSubclass: true
39806
40583
  });
39807
40584
  if (!(instance instanceof Video)) throw new TypeError("Unexpected type: " + instance.constructor.name);
39808
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
40585
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
40586
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
40587
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
39809
40588
  instance._cachedJsonLd = structuredClone(json);
39810
40589
  } catch {
39811
40590
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
@@ -39952,7 +40731,9 @@ var View = class View extends Activity {
39952
40731
  _fromSubclass: true
39953
40732
  });
39954
40733
  if (!(instance instanceof View)) throw new TypeError("Unexpected type: " + instance.constructor.name);
39955
- if (!("_fromSubclass" in options) || !options._fromSubclass) try {
40734
+ let shouldCacheJsonLd = instance._shouldCacheJsonLd;
40735
+ instance._shouldCacheJsonLd = shouldCacheJsonLd;
40736
+ if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
39956
40737
  instance._cachedJsonLd = structuredClone(json);
39957
40738
  } catch {
39958
40739
  getLogger(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });