@fedify/vocab 2.4.0-dev.1599 → 2.4.0-dev.1634

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.
Files changed (41) hide show
  1. package/deno.json +1 -1
  2. package/dist/mod.cjs +472 -16
  3. package/dist/mod.d.cts +119 -1
  4. package/dist/mod.d.ts +119 -1
  5. package/dist/mod.js +473 -17
  6. package/dist-tests/{actor-NhcklZK0.mjs → actor-BQd8S953.mjs} +2 -2
  7. package/dist-tests/actor.test.mjs +2 -2
  8. package/dist-tests/application.yaml +15 -0
  9. package/dist-tests/audio.yaml +2 -1
  10. package/dist-tests/document.yaml +14 -1
  11. package/dist-tests/endpoints.yaml +14 -0
  12. package/dist-tests/group.yaml +15 -0
  13. package/dist-tests/image.yaml +2 -1
  14. package/dist-tests/link.yaml +14 -1
  15. package/dist-tests/lookup.test.mjs +71 -4
  16. package/dist-tests/organization.yaml +15 -0
  17. package/dist-tests/page.yaml +2 -1
  18. package/dist-tests/person.yaml +15 -0
  19. package/dist-tests/service.yaml +15 -0
  20. package/dist-tests/type.test.mjs +1 -1
  21. package/dist-tests/video.yaml +2 -1
  22. package/dist-tests/{vocab-BQ8y6QS7.mjs → vocab-Bjwctrxn.mjs} +472 -16
  23. package/dist-tests/vocab.test.mjs +232 -2
  24. package/package.json +4 -4
  25. package/src/__snapshots__/vocab.test.ts.snap +60 -18
  26. package/src/application.yaml +15 -0
  27. package/src/audio.yaml +2 -1
  28. package/src/document.yaml +14 -1
  29. package/src/endpoints.yaml +14 -0
  30. package/src/group.yaml +15 -0
  31. package/src/image.yaml +2 -1
  32. package/src/link.yaml +14 -1
  33. package/src/lookup.test.ts +121 -0
  34. package/src/lookup.ts +3 -1
  35. package/src/organization.yaml +15 -0
  36. package/src/page.yaml +2 -1
  37. package/src/person.yaml +15 -0
  38. package/src/preprocessors.ts +3 -1
  39. package/src/service.yaml +15 -0
  40. package/src/video.yaml +2 -1
  41. package/src/vocab.test.ts +372 -0
package/dist/mod.js CHANGED
@@ -4,13 +4,13 @@ import { SpanStatusCode, trace } from "@opentelemetry/api";
4
4
  import { domainToASCII, domainToUnicode } from "node:url";
5
5
  import jsonld from "@fedify/vocab-runtime/jsonld";
6
6
  import { getLogger } from "@logtape/logtape";
7
- import { LanguageString, LanguageString as LanguageString$1, decodeMultibase, encodeMultibase, exportMultibaseKey, exportSpki, formatIri, getDocumentLoader, haveSameIriOrigin, importMultibaseKey, importPem, isDecimal, parseDecimal, parseIri, parseJsonLdId } from "@fedify/vocab-runtime";
7
+ import { LanguageString, LanguageString as LanguageString$1, decodeMultibase, encodeMultibase, exportMultibaseKey, exportSpki, formatIri, getDocumentLoader, haveSameFe34Origin, haveSameIriOrigin, importMultibaseKey, importPem, isDecimal, isGatewayUrl, parseDecimal, parseGatewayUrl, parseIri, parseJsonLdId } from "@fedify/vocab-runtime";
8
8
  import { compactJsonLdCache, isTrustedIriOrigin, normalizeJsonLdIris } from "@fedify/vocab-runtime/internal/jsonld-cache";
9
9
  import { isTemporalDuration, isTemporalInstant } from "@fedify/vocab-runtime/temporal";
10
10
  import { delay } from "es-toolkit";
11
11
  //#region deno.json
12
12
  var name = "@fedify/vocab";
13
- var version = "2.4.0-dev.1599+7b19967f";
13
+ var version = "2.4.0-dev.1634+3b4bfbb6";
14
14
  //#endregion
15
15
  //#region src/type.ts
16
16
  function getTypeId(object) {
@@ -25,7 +25,8 @@ function getTypeId(object) {
25
25
  * When an `icon` or `image` property on a vocabulary object contains an
26
26
  * explicit ActivityStreams `Link` rather than an `Image`, this preprocessor
27
27
  * converts it into an `Image` by mapping `href` to `url`, copying
28
- * `mediaType`, `name`, `width`, and `height`, and discarding the rest.
28
+ * `mediaType`, `name`, `width`, `height`, and `digestMultibase`, and
29
+ * discarding the rest.
29
30
  *
30
31
  * If the value is not a Link, or the Link has no `href`, it returns
31
32
  * `undefined` so the normal range decoder continues.
@@ -46,7 +47,8 @@ const normalizeLinkToImage = async (value, context) => {
46
47
  mediaType: link.mediaType,
47
48
  names: link.names != null && link.names.length > 0 ? link.names : void 0,
48
49
  width: link.width,
49
- height: link.height
50
+ height: link.height,
51
+ digestMultibase: link.digestMultibase
50
52
  });
51
53
  };
52
54
  //#endregion
@@ -172,6 +174,7 @@ const PORTABLE_IRI_KEYS = new Set([
172
174
  "https://www.w3.org/ns/activitystreams#target",
173
175
  "https://www.w3.org/ns/activitystreams#to",
174
176
  "https://www.w3.org/ns/activitystreams#units",
177
+ "https://www.w3.org/ns/activitystreams#uploadMedia",
175
178
  "https://www.w3.org/ns/activitystreams#url",
176
179
  "https://www.w3.org/ns/did#service",
177
180
  "https://www.w3.org/ns/did#serviceEndpoint",
@@ -233,6 +236,7 @@ const PORTABLE_IRI_KEYS = new Set([
233
236
  "target",
234
237
  "to",
235
238
  "units",
239
+ "uploadMedia",
236
240
  "url"
237
241
  ]);
238
242
  /** Describes an object of any kind. The Object type serves as the base type for
@@ -21968,6 +21972,7 @@ var Application = class Application extends Object$1 {
21968
21972
  #_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
21969
21973
  #_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
21970
21974
  #_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
21975
+ #_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
21971
21976
  #_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
21972
21977
  #_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
21973
21978
  #_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
@@ -22036,6 +22041,13 @@ var Application = class Application extends Object$1 {
22036
22041
  for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
22037
22042
  } else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
22038
22043
  }
22044
+ if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
22045
+ else throw new TypeError("The gateway must be of type URL.");
22046
+ if ("gateways" in values && values.gateways != null) {
22047
+ if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
22048
+ if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
22049
+ else throw new TypeError("The gateways must be an array of type URL.");
22050
+ }
22039
22051
  if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
22040
22052
  else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
22041
22053
  if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
@@ -22166,6 +22178,14 @@ var Application = class Application extends Object$1 {
22166
22178
  for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
22167
22179
  } else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
22168
22180
  }
22181
+ clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
22182
+ if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
22183
+ else throw new TypeError("The gateway must be of type URL.");
22184
+ if ("gateways" in values && values.gateways != null) {
22185
+ if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
22186
+ if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
22187
+ else throw new TypeError("The gateways must be an array of type URL.");
22188
+ }
22169
22189
  clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
22170
22190
  if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
22171
22191
  else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
@@ -22639,6 +22659,24 @@ var Application = class Application extends Object$1 {
22639
22659
  yield v;
22640
22660
  }
22641
22661
  }
22662
+ /** Gateways where the latest version of this portable actor object can be
22663
+ * retrieved.
22664
+ *
22665
+ * See [FEP-ef61](https://w3id.org/fep/ef61) for details.
22666
+ */
22667
+ get gateway() {
22668
+ if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
22669
+ if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
22670
+ return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
22671
+ }
22672
+ /** Gateways where the latest version of this portable actor object can be
22673
+ * retrieved.
22674
+ *
22675
+ * See [FEP-ef61](https://w3id.org/fep/ef61) for details.
22676
+ */
22677
+ get gateways() {
22678
+ return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
22679
+ }
22642
22680
  /** When `true`, conveys that for this actor, follow requests are not usually
22643
22681
  * automatically approved, but instead are examined by a person who may accept
22644
22682
  * or reject the request, at some time in the future. Setting of `false`
@@ -24508,6 +24546,12 @@ var Application = class Application extends Object$1 {
24508
24546
  }
24509
24547
  if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
24510
24548
  compactItems = [];
24549
+ for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
24550
+ const item = formatIri(v);
24551
+ compactItems.push(item);
24552
+ }
24553
+ if (compactItems.length > 0) result["gateways"] = compactItems;
24554
+ compactItems = [];
24511
24555
  for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
24512
24556
  const item = v;
24513
24557
  compactItems.push(item);
@@ -24723,6 +24767,7 @@ var Application = class Application extends Object$1 {
24723
24767
  if (this.id != null) result["id"] = formatIri(this.id);
24724
24768
  result["@context"] = [
24725
24769
  "https://www.w3.org/ns/activitystreams",
24770
+ "https://w3id.org/fep/ef61",
24726
24771
  "https://w3id.org/security/v1",
24727
24772
  "https://w3id.org/security/data-integrity/v1",
24728
24773
  "https://www.w3.org/ns/did/v1",
@@ -24795,6 +24840,12 @@ var Application = class Application extends Object$1 {
24795
24840
  }
24796
24841
  if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
24797
24842
  array = [];
24843
+ for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
24844
+ const element = { "@id": formatIri(v) };
24845
+ array.push(element);
24846
+ }
24847
+ if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
24848
+ array = [];
24798
24849
  for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
24799
24850
  const element = { "@value": v };
24800
24851
  array.push(element);
@@ -24919,6 +24970,7 @@ var Application = class Application extends Object$1 {
24919
24970
  if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
24920
24971
  const docContext = options.context ?? [
24921
24972
  "https://www.w3.org/ns/activitystreams",
24973
+ "https://w3id.org/fep/ef61",
24922
24974
  "https://w3id.org/security/v1",
24923
24975
  "https://w3id.org/security/data-integrity/v1",
24924
24976
  "https://www.w3.org/ns/did/v1",
@@ -25082,6 +25134,15 @@ var Application = class Application extends Object$1 {
25082
25134
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
25083
25135
  }
25084
25136
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
25137
+ const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
25138
+ let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
25139
+ for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
25140
+ if (v == null) continue;
25141
+ const decoded = parseGatewayUrl(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
25142
+ if (typeof decoded === "undefined") continue;
25143
+ _hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
25144
+ }
25145
+ instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
25085
25146
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
25086
25147
  let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
25087
25148
  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) {
@@ -25423,6 +25484,12 @@ var Application = class Application extends Object$1 {
25423
25484
  } : v);
25424
25485
  if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
25425
25486
  if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
25487
+ const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
25488
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
25489
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
25490
+ } : v);
25491
+ if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
25492
+ if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
25426
25493
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
25427
25494
  [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
25428
25495
  [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
@@ -26513,6 +26580,7 @@ var Document = class Document extends Object$1 {
26513
26580
  }
26514
26581
  #_2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width = [];
26515
26582
  #_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [];
26583
+ #_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [];
26516
26584
  /**
26517
26585
  * Constructs a new instance of Document with the given values.
26518
26586
  * @param values The values to initialize the instance with.
@@ -26524,6 +26592,8 @@ var Document = class Document extends Object$1 {
26524
26592
  else throw new TypeError("The width must be of type number.");
26525
26593
  if ("height" in values && values.height != null) if (typeof values.height === "number" && Number.isInteger(values.height) && values.height >= 0) this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [values.height];
26526
26594
  else throw new TypeError("The height must be of type number.");
26595
+ if ("digestMultibase" in values && values.digestMultibase != null) if (typeof values.digestMultibase === "string") this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [values.digestMultibase];
26596
+ else throw new TypeError("The digestMultibase must be of type string.");
26527
26597
  }
26528
26598
  /**
26529
26599
  * Clones this instance, optionally updating it with the given values.
@@ -26546,6 +26616,9 @@ var Document = class Document extends Object$1 {
26546
26616
  clone.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height;
26547
26617
  if ("height" in values && values.height != null) if (typeof values.height === "number" && Number.isInteger(values.height) && values.height >= 0) clone.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [values.height];
26548
26618
  else throw new TypeError("The height must be of type number.");
26619
+ clone.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase;
26620
+ if ("digestMultibase" in values && values.digestMultibase != null) if (typeof values.digestMultibase === "string") clone.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [values.digestMultibase];
26621
+ else throw new TypeError("The digestMultibase must be of type string.");
26549
26622
  return clone;
26550
26623
  }
26551
26624
  /** Specifies a hint as to the rendering width in
@@ -26564,6 +26637,16 @@ var Document = class Document extends Object$1 {
26564
26637
  if (this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height.length < 1) return null;
26565
26638
  return this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height[0];
26566
26639
  }
26640
+ /** The multibase-encoded integrity digest of an external resource represented
26641
+ * by this document.
26642
+ *
26643
+ * See [FEP-ef61](https://w3id.org/fep/ef61) for details.
26644
+ */
26645
+ get digestMultibase() {
26646
+ if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
26647
+ if (this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.length < 1) return null;
26648
+ return this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase[0];
26649
+ }
26567
26650
  /**
26568
26651
  * Converts this object to a JSON-LD structure.
26569
26652
  * @param options The options to use.
@@ -26599,11 +26682,18 @@ var Document = class Document extends Object$1 {
26599
26682
  compactItems.push(item);
26600
26683
  }
26601
26684
  if (compactItems.length > 0) result["height"] = compactItems.length > 1 ? compactItems : compactItems[0];
26685
+ compactItems = [];
26686
+ for (const v of this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase) {
26687
+ const item = v;
26688
+ compactItems.push(item);
26689
+ }
26690
+ if (compactItems.length > 0) result["digestMultibase"] = compactItems.length > 1 ? compactItems : compactItems[0];
26602
26691
  result["type"] = "Document";
26603
26692
  if (this.id != null) result["id"] = formatIri(this.id);
26604
26693
  result["@context"] = [
26605
26694
  "https://www.w3.org/ns/activitystreams",
26606
- "https://w3id.org/security/data-integrity/v1",
26695
+ "https://w3id.org/security/data-integrity/v2",
26696
+ { "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
26607
26697
  "https://gotosocial.org/ns"
26608
26698
  ];
26609
26699
  return result;
@@ -26632,12 +26722,19 @@ var Document = class Document extends Object$1 {
26632
26722
  array.push(element);
26633
26723
  }
26634
26724
  if (array.length > 0) values["https://www.w3.org/ns/activitystreams#height"] = array;
26725
+ array = [];
26726
+ for (const v of this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase) {
26727
+ const element = { "@value": v };
26728
+ array.push(element);
26729
+ }
26730
+ if (array.length > 0) values["https://www.w3.org/ns/credentials/v2#digestMultibase"] = array;
26635
26731
  values["@type"] = ["https://www.w3.org/ns/activitystreams#Document"];
26636
26732
  if (this.id != null) values["@id"] = formatIri(this.id);
26637
26733
  if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
26638
26734
  const docContext = options.context ?? [
26639
26735
  "https://www.w3.org/ns/activitystreams",
26640
- "https://w3id.org/security/data-integrity/v1",
26736
+ "https://w3id.org/security/data-integrity/v2",
26737
+ { "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
26641
26738
  "https://gotosocial.org/ns"
26642
26739
  ];
26643
26740
  const compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
@@ -26738,6 +26835,15 @@ var Document = class Document extends Object$1 {
26738
26835
  _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height.push(decoded);
26739
26836
  }
26740
26837
  instance.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height;
26838
+ const _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [];
26839
+ let _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array = values["https://www.w3.org/ns/credentials/v2#digestMultibase"];
26840
+ for (const v of _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array == null ? [] : _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array.length === 1 && "@list" in _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array[0] ? _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array[0]["@list"] : _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array) {
26841
+ if (v == null) continue;
26842
+ const decoded = v["@value"];
26843
+ if (typeof decoded === "undefined") continue;
26844
+ _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.push(decoded);
26845
+ }
26846
+ instance.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase;
26741
26847
  if (!("_fromSubclass" in options) || !options._fromSubclass) try {
26742
26848
  if (cacheJsonLd != null && cacheJsonLd !== expanded) {
26743
26849
  const compactArray = Array.isArray(json) && json.length === 1;
@@ -26762,6 +26868,11 @@ var Document = class Document extends Object$1 {
26762
26868
  [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
26763
26869
  } : v);
26764
26870
  if (_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height.length == 1) proxy.height = _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height[0];
26871
+ const _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.map((v) => v instanceof URL ? {
26872
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
26873
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
26874
+ } : v);
26875
+ if (_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.length == 1) proxy.digestMultibase = _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase[0];
26765
26876
  return proxy;
26766
26877
  }
26767
26878
  };
@@ -26831,7 +26942,8 @@ var Audio = class Audio extends Document {
26831
26942
  if (this.id != null) result["id"] = formatIri(this.id);
26832
26943
  result["@context"] = [
26833
26944
  "https://www.w3.org/ns/activitystreams",
26834
- "https://w3id.org/security/data-integrity/v1",
26945
+ "https://w3id.org/security/data-integrity/v2",
26946
+ { "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
26835
26947
  "https://gotosocial.org/ns"
26836
26948
  ];
26837
26949
  return result;
@@ -26846,7 +26958,8 @@ var Audio = class Audio extends Document {
26846
26958
  if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
26847
26959
  const docContext = options.context ?? [
26848
26960
  "https://www.w3.org/ns/activitystreams",
26849
- "https://w3id.org/security/data-integrity/v1",
26961
+ "https://w3id.org/security/data-integrity/v2",
26962
+ { "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
26850
26963
  "https://gotosocial.org/ns"
26851
26964
  ];
26852
26965
  const compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
@@ -28625,6 +28738,7 @@ var Endpoints = class {
28625
28738
  #_8Bx9qN8oU7Bpt2xi6khaxWp1gMr_provideClientKey = [];
28626
28739
  #_3dU7PMVQZJpsCpo2F4RQXxBXdPmS_signClientKey = [];
28627
28740
  #_3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox = [];
28741
+ #_KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia = [];
28628
28742
  /**
28629
28743
  * Constructs a new instance of Endpoints with the given values.
28630
28744
  * @param values The values to initialize the instance with.
@@ -28651,6 +28765,8 @@ var Endpoints = class {
28651
28765
  else throw new TypeError("The signClientKey must be of type URL.");
28652
28766
  if ("sharedInbox" in values && values.sharedInbox != null) if (values.sharedInbox instanceof URL) this.#_3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox = [values.sharedInbox];
28653
28767
  else throw new TypeError("The sharedInbox must be of type URL.");
28768
+ if ("uploadMedia" in values && values.uploadMedia != null) if (values.uploadMedia instanceof URL) this.#_KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia = [values.uploadMedia];
28769
+ else throw new TypeError("The uploadMedia must be of type URL.");
28654
28770
  }
28655
28771
  /**
28656
28772
  * Clones this instance, optionally updating it with the given values.
@@ -28685,6 +28801,9 @@ var Endpoints = class {
28685
28801
  clone.#_3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox = this.#_3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox;
28686
28802
  if ("sharedInbox" in values && values.sharedInbox != null) if (values.sharedInbox instanceof URL) clone.#_3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox = [values.sharedInbox];
28687
28803
  else throw new TypeError("The sharedInbox must be of type URL.");
28804
+ clone.#_KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia = this.#_KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia;
28805
+ if ("uploadMedia" in values && values.uploadMedia != null) if (values.uploadMedia instanceof URL) clone.#_KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia = [values.uploadMedia];
28806
+ else throw new TypeError("The uploadMedia must be of type URL.");
28688
28807
  return clone;
28689
28808
  }
28690
28809
  /** Endpoint URI so this actor's clients may access remote ActivityStreams
@@ -28752,6 +28871,18 @@ var Endpoints = class {
28752
28871
  if (this.#_3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox.length < 1) return null;
28753
28872
  return this.#_3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox[0];
28754
28873
  }
28874
+ /** Upload endpoint URI for this user for binary data, such as an image or
28875
+ * video, as described in the [ActivityPub Media
28876
+ * Upload](https://www.w3.org/wiki/SocialCG/ActivityPub/MediaUpload) extension.
28877
+ * Clients `POST` a `multipart/form-data` request containing a `file` part
28878
+ * (the binary payload) and an `object` part (an ActivityStreams object shell)
28879
+ * to this endpoint.
28880
+ */
28881
+ get uploadMedia() {
28882
+ if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
28883
+ if (this.#_KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia.length < 1) return null;
28884
+ return this.#_KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia[0];
28885
+ }
28755
28886
  /**
28756
28887
  * Converts this object to a JSON-LD structure.
28757
28888
  * @param options The options to use.
@@ -28807,6 +28938,12 @@ var Endpoints = class {
28807
28938
  compactItems.push(item);
28808
28939
  }
28809
28940
  if (compactItems.length > 0) result["sharedInbox"] = compactItems.length > 1 ? compactItems : compactItems[0];
28941
+ compactItems = [];
28942
+ for (const v of this.#_KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia) {
28943
+ const item = formatIri(v);
28944
+ compactItems.push(item);
28945
+ }
28946
+ if (compactItems.length > 0) result["uploadMedia"] = compactItems.length > 1 ? compactItems : compactItems[0];
28810
28947
  if (this.id != null) result["id"] = formatIri(this.id);
28811
28948
  result["@context"] = "https://www.w3.org/ns/activitystreams";
28812
28949
  return result;
@@ -28849,6 +28986,12 @@ var Endpoints = class {
28849
28986
  array.push(element);
28850
28987
  }
28851
28988
  if (array.length > 0) values["https://www.w3.org/ns/activitystreams#sharedInbox"] = array;
28989
+ array = [];
28990
+ for (const v of this.#_KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia) {
28991
+ const element = { "@id": formatIri(v) };
28992
+ array.push(element);
28993
+ }
28994
+ if (array.length > 0) values["https://www.w3.org/ns/activitystreams#uploadMedia"] = array;
28852
28995
  if (this.id != null) values["@id"] = formatIri(this.id);
28853
28996
  if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
28854
28997
  const docContext = options.context ?? "https://www.w3.org/ns/activitystreams";
@@ -28974,6 +29117,15 @@ var Endpoints = class {
28974
29117
  _3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox.push(decoded);
28975
29118
  }
28976
29119
  instance.#_3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox = _3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox;
29120
+ const _KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia = [];
29121
+ let _KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia__array = values["https://www.w3.org/ns/activitystreams#uploadMedia"];
29122
+ for (const v of _KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia__array == null ? [] : _KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia__array.length === 1 && "@list" in _KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia__array[0] ? _KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia__array[0]["@list"] : _KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia__array) {
29123
+ if (v == null) continue;
29124
+ const decoded = parseIri(v["@id"], options.baseUrl);
29125
+ if (typeof decoded === "undefined") continue;
29126
+ _KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia.push(decoded);
29127
+ }
29128
+ instance.#_KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia = _KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia;
28977
29129
  if (!("_fromSubclass" in options) || !options._fromSubclass) try {
28978
29130
  if (cacheJsonLd != null && cacheJsonLd !== expanded) {
28979
29131
  const compactArray = Array.isArray(json) && json.length === 1;
@@ -29022,6 +29174,11 @@ var Endpoints = class {
29022
29174
  [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
29023
29175
  } : v);
29024
29176
  if (_3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox.length == 1) proxy.sharedInbox = _3JprUSDLVqqX4dwHRi37qGZZCRCc_sharedInbox[0];
29177
+ const _KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia = this.#_KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia.map((v) => v instanceof URL ? {
29178
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
29179
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
29180
+ } : v);
29181
+ if (_KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia.length == 1) proxy.uploadMedia = _KukVKGqFRETxAxXA15YCYAA7XAT_uploadMedia[0];
29025
29182
  return proxy;
29026
29183
  }
29027
29184
  };
@@ -29553,6 +29710,7 @@ var Group = class Group extends Object$1 {
29553
29710
  #_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
29554
29711
  #_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
29555
29712
  #_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
29713
+ #_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
29556
29714
  #_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
29557
29715
  #_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
29558
29716
  #_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
@@ -29621,6 +29779,13 @@ var Group = class Group extends Object$1 {
29621
29779
  for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
29622
29780
  } else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
29623
29781
  }
29782
+ if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
29783
+ else throw new TypeError("The gateway must be of type URL.");
29784
+ if ("gateways" in values && values.gateways != null) {
29785
+ if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
29786
+ if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
29787
+ else throw new TypeError("The gateways must be an array of type URL.");
29788
+ }
29624
29789
  if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
29625
29790
  else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
29626
29791
  if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
@@ -29751,6 +29916,14 @@ var Group = class Group extends Object$1 {
29751
29916
  for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
29752
29917
  } else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
29753
29918
  }
29919
+ clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
29920
+ if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
29921
+ else throw new TypeError("The gateway must be of type URL.");
29922
+ if ("gateways" in values && values.gateways != null) {
29923
+ if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
29924
+ if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
29925
+ else throw new TypeError("The gateways must be an array of type URL.");
29926
+ }
29754
29927
  clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
29755
29928
  if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
29756
29929
  else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
@@ -30224,6 +30397,24 @@ var Group = class Group extends Object$1 {
30224
30397
  yield v;
30225
30398
  }
30226
30399
  }
30400
+ /** Gateways where the latest version of this portable actor object can be
30401
+ * retrieved.
30402
+ *
30403
+ * See [FEP-ef61](https://w3id.org/fep/ef61) for details.
30404
+ */
30405
+ get gateway() {
30406
+ if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
30407
+ if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
30408
+ return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
30409
+ }
30410
+ /** Gateways where the latest version of this portable actor object can be
30411
+ * retrieved.
30412
+ *
30413
+ * See [FEP-ef61](https://w3id.org/fep/ef61) for details.
30414
+ */
30415
+ get gateways() {
30416
+ return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
30417
+ }
30227
30418
  /** When `true`, conveys that for this actor, follow requests are not usually
30228
30419
  * automatically approved, but instead are examined by a person who may accept
30229
30420
  * or reject the request, at some time in the future. Setting of `false`
@@ -32093,6 +32284,12 @@ var Group = class Group extends Object$1 {
32093
32284
  }
32094
32285
  if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
32095
32286
  compactItems = [];
32287
+ for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
32288
+ const item = formatIri(v);
32289
+ compactItems.push(item);
32290
+ }
32291
+ if (compactItems.length > 0) result["gateways"] = compactItems;
32292
+ compactItems = [];
32096
32293
  for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
32097
32294
  const item = v;
32098
32295
  compactItems.push(item);
@@ -32308,6 +32505,7 @@ var Group = class Group extends Object$1 {
32308
32505
  if (this.id != null) result["id"] = formatIri(this.id);
32309
32506
  result["@context"] = [
32310
32507
  "https://www.w3.org/ns/activitystreams",
32508
+ "https://w3id.org/fep/ef61",
32311
32509
  "https://w3id.org/security/v1",
32312
32510
  "https://w3id.org/security/data-integrity/v1",
32313
32511
  "https://www.w3.org/ns/did/v1",
@@ -32380,6 +32578,12 @@ var Group = class Group extends Object$1 {
32380
32578
  }
32381
32579
  if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
32382
32580
  array = [];
32581
+ for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
32582
+ const element = { "@id": formatIri(v) };
32583
+ array.push(element);
32584
+ }
32585
+ if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
32586
+ array = [];
32383
32587
  for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
32384
32588
  const element = { "@value": v };
32385
32589
  array.push(element);
@@ -32504,6 +32708,7 @@ var Group = class Group extends Object$1 {
32504
32708
  if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
32505
32709
  const docContext = options.context ?? [
32506
32710
  "https://www.w3.org/ns/activitystreams",
32711
+ "https://w3id.org/fep/ef61",
32507
32712
  "https://w3id.org/security/v1",
32508
32713
  "https://w3id.org/security/data-integrity/v1",
32509
32714
  "https://www.w3.org/ns/did/v1",
@@ -32667,6 +32872,15 @@ var Group = class Group extends Object$1 {
32667
32872
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
32668
32873
  }
32669
32874
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
32875
+ const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
32876
+ let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
32877
+ for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
32878
+ if (v == null) continue;
32879
+ const decoded = parseGatewayUrl(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
32880
+ if (typeof decoded === "undefined") continue;
32881
+ _hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
32882
+ }
32883
+ instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
32670
32884
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
32671
32885
  let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
32672
32886
  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) {
@@ -33008,6 +33222,12 @@ var Group = class Group extends Object$1 {
33008
33222
  } : v);
33009
33223
  if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
33010
33224
  if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
33225
+ const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
33226
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
33227
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
33228
+ } : v);
33229
+ if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
33230
+ if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
33011
33231
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
33012
33232
  [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
33013
33233
  [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
@@ -33166,6 +33386,7 @@ var Link = class Link {
33166
33386
  #_pVjLsybKQdmkjuU7MHjiVmNnuj7_href = [];
33167
33387
  #_2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel = [];
33168
33388
  #_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = [];
33389
+ #_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [];
33169
33390
  #_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [];
33170
33391
  #_f57HKWCp1YRBbTJE8PF12RbDJGf_hreflang = [];
33171
33392
  #_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [];
@@ -33197,6 +33418,8 @@ var Link = class Link {
33197
33418
  }
33198
33419
  if ("mediaType" in values && values.mediaType != null) if (typeof values.mediaType === "string") this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = [values.mediaType];
33199
33420
  else throw new TypeError("The mediaType must be of type string.");
33421
+ if ("digestMultibase" in values && values.digestMultibase != null) if (typeof values.digestMultibase === "string") this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [values.digestMultibase];
33422
+ else throw new TypeError("The digestMultibase must be of type string.");
33200
33423
  if ("name" in values && values.name != null) if (typeof values.name === "string" || values.name instanceof LanguageString$1) this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [values.name];
33201
33424
  else throw new TypeError("The name must be of type string | LanguageString.");
33202
33425
  if ("names" in values && values.names != null) {
@@ -33244,6 +33467,9 @@ var Link = class Link {
33244
33467
  clone.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType;
33245
33468
  if ("mediaType" in values && values.mediaType != null) if (typeof values.mediaType === "string") clone.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = [values.mediaType];
33246
33469
  else throw new TypeError("The mediaType must be of type string.");
33470
+ clone.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase;
33471
+ if ("digestMultibase" in values && values.digestMultibase != null) if (typeof values.digestMultibase === "string") clone.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [values.digestMultibase];
33472
+ else throw new TypeError("The digestMultibase must be of type string.");
33247
33473
  clone.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name;
33248
33474
  if ("name" in values && values.name != null) if (typeof values.name === "string" || values.name instanceof LanguageString$1) clone.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [values.name];
33249
33475
  else throw new TypeError("The name must be of type string | LanguageString.");
@@ -33307,6 +33533,15 @@ var Link = class Link {
33307
33533
  if (this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.length < 1) return null;
33308
33534
  return this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType[0];
33309
33535
  }
33536
+ /** The multibase-encoded integrity digest of the linked resource.
33537
+ *
33538
+ * See [FEP-ef61](https://w3id.org/fep/ef61) for details.
33539
+ */
33540
+ get digestMultibase() {
33541
+ if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
33542
+ if (this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.length < 1) return null;
33543
+ return this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase[0];
33544
+ }
33310
33545
  /** A simple, human-readable, plain-text name for the object. HTML markup MUST
33311
33546
  * NOT be included. The name MAY be expressed using multiple language-tagged
33312
33547
  * values.
@@ -33519,6 +33754,12 @@ var Link = class Link {
33519
33754
  }
33520
33755
  if (compactItems.length > 0) result["mediaType"] = compactItems.length > 1 ? compactItems : compactItems[0];
33521
33756
  compactItems = [];
33757
+ for (const v of this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase) {
33758
+ const item = v;
33759
+ compactItems.push(item);
33760
+ }
33761
+ if (compactItems.length > 0) result["digestMultibase"] = compactItems.length > 1 ? compactItems : compactItems[0];
33762
+ compactItems = [];
33522
33763
  for (const v of this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name) {
33523
33764
  const item = typeof v === "string" ? v : {
33524
33765
  "@value": v.toString(),
@@ -33561,7 +33802,7 @@ var Link = class Link {
33561
33802
  if (compactItems.length > 0) result["preview"] = compactItems.length > 1 ? compactItems : compactItems[0];
33562
33803
  result["type"] = "Link";
33563
33804
  if (this.id != null) result["id"] = formatIri(this.id);
33564
- result["@context"] = "https://www.w3.org/ns/activitystreams";
33805
+ result["@context"] = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/fep/ef61"];
33565
33806
  return result;
33566
33807
  }
33567
33808
  let array;
@@ -33585,6 +33826,12 @@ var Link = class Link {
33585
33826
  }
33586
33827
  if (array.length > 0) values["https://www.w3.org/ns/activitystreams#mediaType"] = array;
33587
33828
  array = [];
33829
+ for (const v of this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase) {
33830
+ const element = { "@value": v };
33831
+ array.push(element);
33832
+ }
33833
+ if (array.length > 0) values["https://www.w3.org/ns/credentials/v2#digestMultibase"] = array;
33834
+ array = [];
33588
33835
  for (const v of this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name) {
33589
33836
  const element = typeof v === "string" ? { "@value": v } : {
33590
33837
  "@value": v.toString(),
@@ -33626,7 +33873,7 @@ var Link = class Link {
33626
33873
  values["@type"] = ["https://www.w3.org/ns/activitystreams#Link"];
33627
33874
  if (this.id != null) values["@id"] = formatIri(this.id);
33628
33875
  if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
33629
- const docContext = options.context ?? "https://www.w3.org/ns/activitystreams";
33876
+ const docContext = options.context ?? ["https://www.w3.org/ns/activitystreams", "https://w3id.org/fep/ef61"];
33630
33877
  const compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
33631
33878
  if (docContext != null) {}
33632
33879
  return compacted;
@@ -33725,6 +33972,15 @@ var Link = class Link {
33725
33972
  _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.push(decoded);
33726
33973
  }
33727
33974
  instance.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType;
33975
+ const _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [];
33976
+ let _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array = values["https://www.w3.org/ns/credentials/v2#digestMultibase"];
33977
+ for (const v of _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array == null ? [] : _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array.length === 1 && "@list" in _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array[0] ? _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array[0]["@list"] : _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array) {
33978
+ if (v == null) continue;
33979
+ const decoded = v["@value"];
33980
+ if (typeof decoded === "undefined") continue;
33981
+ _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.push(decoded);
33982
+ }
33983
+ instance.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase;
33728
33984
  const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [];
33729
33985
  let _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array = values["https://www.w3.org/ns/activitystreams#name"];
33730
33986
  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) {
@@ -33889,6 +34145,11 @@ var Link = class Link {
33889
34145
  [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
33890
34146
  } : v);
33891
34147
  if (_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.length == 1) proxy.mediaType = _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType[0];
34148
+ const _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.map((v) => v instanceof URL ? {
34149
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
34150
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
34151
+ } : v);
34152
+ if (_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.length == 1) proxy.digestMultibase = _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase[0];
33892
34153
  const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.map((v) => v instanceof URL ? {
33893
34154
  [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
33894
34155
  [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
@@ -34151,7 +34412,8 @@ var Image = class Image extends Document {
34151
34412
  if (this.id != null) result["id"] = formatIri(this.id);
34152
34413
  result["@context"] = [
34153
34414
  "https://www.w3.org/ns/activitystreams",
34154
- "https://w3id.org/security/data-integrity/v1",
34415
+ "https://w3id.org/security/data-integrity/v2",
34416
+ { "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
34155
34417
  "https://gotosocial.org/ns"
34156
34418
  ];
34157
34419
  return result;
@@ -34166,7 +34428,8 @@ var Image = class Image extends Document {
34166
34428
  if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
34167
34429
  const docContext = options.context ?? [
34168
34430
  "https://www.w3.org/ns/activitystreams",
34169
- "https://w3id.org/security/data-integrity/v1",
34431
+ "https://w3id.org/security/data-integrity/v2",
34432
+ { "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
34170
34433
  "https://gotosocial.org/ns"
34171
34434
  ];
34172
34435
  const compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
@@ -36777,6 +37040,7 @@ var Organization = class Organization extends Object$1 {
36777
37040
  #_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
36778
37041
  #_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
36779
37042
  #_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
37043
+ #_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
36780
37044
  #_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
36781
37045
  #_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
36782
37046
  #_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
@@ -36845,6 +37109,13 @@ var Organization = class Organization extends Object$1 {
36845
37109
  for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
36846
37110
  } else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
36847
37111
  }
37112
+ if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
37113
+ else throw new TypeError("The gateway must be of type URL.");
37114
+ if ("gateways" in values && values.gateways != null) {
37115
+ if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
37116
+ if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
37117
+ else throw new TypeError("The gateways must be an array of type URL.");
37118
+ }
36848
37119
  if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
36849
37120
  else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
36850
37121
  if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
@@ -36975,6 +37246,14 @@ var Organization = class Organization extends Object$1 {
36975
37246
  for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
36976
37247
  } else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
36977
37248
  }
37249
+ clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
37250
+ if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
37251
+ else throw new TypeError("The gateway must be of type URL.");
37252
+ if ("gateways" in values && values.gateways != null) {
37253
+ if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
37254
+ if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
37255
+ else throw new TypeError("The gateways must be an array of type URL.");
37256
+ }
36978
37257
  clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
36979
37258
  if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
36980
37259
  else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
@@ -37448,6 +37727,24 @@ var Organization = class Organization extends Object$1 {
37448
37727
  yield v;
37449
37728
  }
37450
37729
  }
37730
+ /** Gateways where the latest version of this portable actor object can be
37731
+ * retrieved.
37732
+ *
37733
+ * See [FEP-ef61](https://w3id.org/fep/ef61) for details.
37734
+ */
37735
+ get gateway() {
37736
+ if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
37737
+ if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
37738
+ return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
37739
+ }
37740
+ /** Gateways where the latest version of this portable actor object can be
37741
+ * retrieved.
37742
+ *
37743
+ * See [FEP-ef61](https://w3id.org/fep/ef61) for details.
37744
+ */
37745
+ get gateways() {
37746
+ return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
37747
+ }
37451
37748
  /** When `true`, conveys that for this actor, follow requests are not usually
37452
37749
  * automatically approved, but instead are examined by a person who may accept
37453
37750
  * or reject the request, at some time in the future. Setting of `false`
@@ -39317,6 +39614,12 @@ var Organization = class Organization extends Object$1 {
39317
39614
  }
39318
39615
  if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
39319
39616
  compactItems = [];
39617
+ for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
39618
+ const item = formatIri(v);
39619
+ compactItems.push(item);
39620
+ }
39621
+ if (compactItems.length > 0) result["gateways"] = compactItems;
39622
+ compactItems = [];
39320
39623
  for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
39321
39624
  const item = v;
39322
39625
  compactItems.push(item);
@@ -39532,6 +39835,7 @@ var Organization = class Organization extends Object$1 {
39532
39835
  if (this.id != null) result["id"] = formatIri(this.id);
39533
39836
  result["@context"] = [
39534
39837
  "https://www.w3.org/ns/activitystreams",
39838
+ "https://w3id.org/fep/ef61",
39535
39839
  "https://w3id.org/security/v1",
39536
39840
  "https://w3id.org/security/data-integrity/v1",
39537
39841
  "https://www.w3.org/ns/did/v1",
@@ -39604,6 +39908,12 @@ var Organization = class Organization extends Object$1 {
39604
39908
  }
39605
39909
  if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
39606
39910
  array = [];
39911
+ for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
39912
+ const element = { "@id": formatIri(v) };
39913
+ array.push(element);
39914
+ }
39915
+ if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
39916
+ array = [];
39607
39917
  for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
39608
39918
  const element = { "@value": v };
39609
39919
  array.push(element);
@@ -39728,6 +40038,7 @@ var Organization = class Organization extends Object$1 {
39728
40038
  if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
39729
40039
  const docContext = options.context ?? [
39730
40040
  "https://www.w3.org/ns/activitystreams",
40041
+ "https://w3id.org/fep/ef61",
39731
40042
  "https://w3id.org/security/v1",
39732
40043
  "https://w3id.org/security/data-integrity/v1",
39733
40044
  "https://www.w3.org/ns/did/v1",
@@ -39891,6 +40202,15 @@ var Organization = class Organization extends Object$1 {
39891
40202
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
39892
40203
  }
39893
40204
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
40205
+ const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
40206
+ let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
40207
+ for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
40208
+ if (v == null) continue;
40209
+ const decoded = parseGatewayUrl(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
40210
+ if (typeof decoded === "undefined") continue;
40211
+ _hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
40212
+ }
40213
+ instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
39894
40214
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
39895
40215
  let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
39896
40216
  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) {
@@ -40232,6 +40552,12 @@ var Organization = class Organization extends Object$1 {
40232
40552
  } : v);
40233
40553
  if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
40234
40554
  if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
40555
+ const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
40556
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
40557
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
40558
+ } : v);
40559
+ if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
40560
+ if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
40235
40561
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
40236
40562
  [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
40237
40563
  [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
@@ -40403,7 +40729,8 @@ var Page = class Page extends Document {
40403
40729
  if (this.id != null) result["id"] = formatIri(this.id);
40404
40730
  result["@context"] = [
40405
40731
  "https://www.w3.org/ns/activitystreams",
40406
- "https://w3id.org/security/data-integrity/v1",
40732
+ "https://w3id.org/security/data-integrity/v2",
40733
+ { "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
40407
40734
  "https://gotosocial.org/ns"
40408
40735
  ];
40409
40736
  return result;
@@ -40418,7 +40745,8 @@ var Page = class Page extends Document {
40418
40745
  if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
40419
40746
  const docContext = options.context ?? [
40420
40747
  "https://www.w3.org/ns/activitystreams",
40421
- "https://w3id.org/security/data-integrity/v1",
40748
+ "https://w3id.org/security/data-integrity/v2",
40749
+ { "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
40422
40750
  "https://gotosocial.org/ns"
40423
40751
  ];
40424
40752
  const compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
@@ -40533,6 +40861,7 @@ var Person = class Person extends Object$1 {
40533
40861
  #_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
40534
40862
  #_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
40535
40863
  #_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
40864
+ #_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
40536
40865
  #_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
40537
40866
  #_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
40538
40867
  #_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
@@ -40601,6 +40930,13 @@ var Person = class Person extends Object$1 {
40601
40930
  for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
40602
40931
  } else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
40603
40932
  }
40933
+ if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
40934
+ else throw new TypeError("The gateway must be of type URL.");
40935
+ if ("gateways" in values && values.gateways != null) {
40936
+ if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
40937
+ if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
40938
+ else throw new TypeError("The gateways must be an array of type URL.");
40939
+ }
40604
40940
  if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
40605
40941
  else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
40606
40942
  if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
@@ -40731,6 +41067,14 @@ var Person = class Person extends Object$1 {
40731
41067
  for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
40732
41068
  } else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
40733
41069
  }
41070
+ clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
41071
+ if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
41072
+ else throw new TypeError("The gateway must be of type URL.");
41073
+ if ("gateways" in values && values.gateways != null) {
41074
+ if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
41075
+ if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
41076
+ else throw new TypeError("The gateways must be an array of type URL.");
41077
+ }
40734
41078
  clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
40735
41079
  if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
40736
41080
  else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
@@ -41204,6 +41548,24 @@ var Person = class Person extends Object$1 {
41204
41548
  yield v;
41205
41549
  }
41206
41550
  }
41551
+ /** Gateways where the latest version of this portable actor object can be
41552
+ * retrieved.
41553
+ *
41554
+ * See [FEP-ef61](https://w3id.org/fep/ef61) for details.
41555
+ */
41556
+ get gateway() {
41557
+ if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
41558
+ if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
41559
+ return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
41560
+ }
41561
+ /** Gateways where the latest version of this portable actor object can be
41562
+ * retrieved.
41563
+ *
41564
+ * See [FEP-ef61](https://w3id.org/fep/ef61) for details.
41565
+ */
41566
+ get gateways() {
41567
+ return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
41568
+ }
41207
41569
  /** When `true`, conveys that for this actor, follow requests are not usually
41208
41570
  * automatically approved, but instead are examined by a person who may accept
41209
41571
  * or reject the request, at some time in the future. Setting of `false`
@@ -43073,6 +43435,12 @@ var Person = class Person extends Object$1 {
43073
43435
  }
43074
43436
  if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
43075
43437
  compactItems = [];
43438
+ for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
43439
+ const item = formatIri(v);
43440
+ compactItems.push(item);
43441
+ }
43442
+ if (compactItems.length > 0) result["gateways"] = compactItems;
43443
+ compactItems = [];
43076
43444
  for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
43077
43445
  const item = v;
43078
43446
  compactItems.push(item);
@@ -43288,6 +43656,7 @@ var Person = class Person extends Object$1 {
43288
43656
  if (this.id != null) result["id"] = formatIri(this.id);
43289
43657
  result["@context"] = [
43290
43658
  "https://www.w3.org/ns/activitystreams",
43659
+ "https://w3id.org/fep/ef61",
43291
43660
  "https://w3id.org/security/v1",
43292
43661
  "https://w3id.org/security/data-integrity/v1",
43293
43662
  "https://www.w3.org/ns/did/v1",
@@ -43360,6 +43729,12 @@ var Person = class Person extends Object$1 {
43360
43729
  }
43361
43730
  if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
43362
43731
  array = [];
43732
+ for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
43733
+ const element = { "@id": formatIri(v) };
43734
+ array.push(element);
43735
+ }
43736
+ if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
43737
+ array = [];
43363
43738
  for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
43364
43739
  const element = { "@value": v };
43365
43740
  array.push(element);
@@ -43484,6 +43859,7 @@ var Person = class Person extends Object$1 {
43484
43859
  if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
43485
43860
  const docContext = options.context ?? [
43486
43861
  "https://www.w3.org/ns/activitystreams",
43862
+ "https://w3id.org/fep/ef61",
43487
43863
  "https://w3id.org/security/v1",
43488
43864
  "https://w3id.org/security/data-integrity/v1",
43489
43865
  "https://www.w3.org/ns/did/v1",
@@ -43647,6 +44023,15 @@ var Person = class Person extends Object$1 {
43647
44023
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
43648
44024
  }
43649
44025
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
44026
+ const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
44027
+ let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
44028
+ for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
44029
+ if (v == null) continue;
44030
+ const decoded = parseGatewayUrl(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
44031
+ if (typeof decoded === "undefined") continue;
44032
+ _hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
44033
+ }
44034
+ instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
43650
44035
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
43651
44036
  let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
43652
44037
  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) {
@@ -43988,6 +44373,12 @@ var Person = class Person extends Object$1 {
43988
44373
  } : v);
43989
44374
  if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
43990
44375
  if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
44376
+ const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
44377
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
44378
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
44379
+ } : v);
44380
+ if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
44381
+ if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
43991
44382
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
43992
44383
  [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
43993
44384
  [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
@@ -47222,6 +47613,7 @@ var Service = class Service extends Object$1 {
47222
47613
  #_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
47223
47614
  #_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
47224
47615
  #_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
47616
+ #_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
47225
47617
  #_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
47226
47618
  #_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
47227
47619
  #_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
@@ -47290,6 +47682,13 @@ var Service = class Service extends Object$1 {
47290
47682
  for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
47291
47683
  } else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
47292
47684
  }
47685
+ if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
47686
+ else throw new TypeError("The gateway must be of type URL.");
47687
+ if ("gateways" in values && values.gateways != null) {
47688
+ if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
47689
+ if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
47690
+ else throw new TypeError("The gateways must be an array of type URL.");
47691
+ }
47293
47692
  if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
47294
47693
  else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
47295
47694
  if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
@@ -47420,6 +47819,14 @@ var Service = class Service extends Object$1 {
47420
47819
  for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
47421
47820
  } else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
47422
47821
  }
47822
+ clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
47823
+ if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
47824
+ else throw new TypeError("The gateway must be of type URL.");
47825
+ if ("gateways" in values && values.gateways != null) {
47826
+ if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
47827
+ if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
47828
+ else throw new TypeError("The gateways must be an array of type URL.");
47829
+ }
47423
47830
  clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
47424
47831
  if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
47425
47832
  else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
@@ -47893,6 +48300,24 @@ var Service = class Service extends Object$1 {
47893
48300
  yield v;
47894
48301
  }
47895
48302
  }
48303
+ /** Gateways where the latest version of this portable actor object can be
48304
+ * retrieved.
48305
+ *
48306
+ * See [FEP-ef61](https://w3id.org/fep/ef61) for details.
48307
+ */
48308
+ get gateway() {
48309
+ if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
48310
+ if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
48311
+ return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
48312
+ }
48313
+ /** Gateways where the latest version of this portable actor object can be
48314
+ * retrieved.
48315
+ *
48316
+ * See [FEP-ef61](https://w3id.org/fep/ef61) for details.
48317
+ */
48318
+ get gateways() {
48319
+ return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
48320
+ }
47896
48321
  /** When `true`, conveys that for this actor, follow requests are not usually
47897
48322
  * automatically approved, but instead are examined by a person who may accept
47898
48323
  * or reject the request, at some time in the future. Setting of `false`
@@ -49762,6 +50187,12 @@ var Service = class Service extends Object$1 {
49762
50187
  }
49763
50188
  if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
49764
50189
  compactItems = [];
50190
+ for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
50191
+ const item = formatIri(v);
50192
+ compactItems.push(item);
50193
+ }
50194
+ if (compactItems.length > 0) result["gateways"] = compactItems;
50195
+ compactItems = [];
49765
50196
  for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
49766
50197
  const item = v;
49767
50198
  compactItems.push(item);
@@ -49977,6 +50408,7 @@ var Service = class Service extends Object$1 {
49977
50408
  if (this.id != null) result["id"] = formatIri(this.id);
49978
50409
  result["@context"] = [
49979
50410
  "https://www.w3.org/ns/activitystreams",
50411
+ "https://w3id.org/fep/ef61",
49980
50412
  "https://w3id.org/security/v1",
49981
50413
  "https://w3id.org/security/data-integrity/v1",
49982
50414
  "https://www.w3.org/ns/did/v1",
@@ -50049,6 +50481,12 @@ var Service = class Service extends Object$1 {
50049
50481
  }
50050
50482
  if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
50051
50483
  array = [];
50484
+ for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
50485
+ const element = { "@id": formatIri(v) };
50486
+ array.push(element);
50487
+ }
50488
+ if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
50489
+ array = [];
50052
50490
  for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
50053
50491
  const element = { "@value": v };
50054
50492
  array.push(element);
@@ -50173,6 +50611,7 @@ var Service = class Service extends Object$1 {
50173
50611
  if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
50174
50612
  const docContext = options.context ?? [
50175
50613
  "https://www.w3.org/ns/activitystreams",
50614
+ "https://w3id.org/fep/ef61",
50176
50615
  "https://w3id.org/security/v1",
50177
50616
  "https://w3id.org/security/data-integrity/v1",
50178
50617
  "https://www.w3.org/ns/did/v1",
@@ -50336,6 +50775,15 @@ var Service = class Service extends Object$1 {
50336
50775
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
50337
50776
  }
50338
50777
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
50778
+ const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
50779
+ let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
50780
+ for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
50781
+ if (v == null) continue;
50782
+ const decoded = parseGatewayUrl(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
50783
+ if (typeof decoded === "undefined") continue;
50784
+ _hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
50785
+ }
50786
+ instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
50339
50787
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
50340
50788
  let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
50341
50789
  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) {
@@ -50677,6 +51125,12 @@ var Service = class Service extends Object$1 {
50677
51125
  } : v);
50678
51126
  if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
50679
51127
  if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
51128
+ const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
51129
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
51130
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
51131
+ } : v);
51132
+ if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
51133
+ if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
50680
51134
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
50681
51135
  [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
50682
51136
  [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
@@ -52321,7 +52775,8 @@ var Video = class Video extends Document {
52321
52775
  if (this.id != null) result["id"] = formatIri(this.id);
52322
52776
  result["@context"] = [
52323
52777
  "https://www.w3.org/ns/activitystreams",
52324
- "https://w3id.org/security/data-integrity/v1",
52778
+ "https://w3id.org/security/data-integrity/v2",
52779
+ { "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
52325
52780
  "https://gotosocial.org/ns"
52326
52781
  ];
52327
52782
  return result;
@@ -52336,7 +52791,8 @@ var Video = class Video extends Document {
52336
52791
  if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
52337
52792
  const docContext = options.context ?? [
52338
52793
  "https://www.w3.org/ns/activitystreams",
52339
- "https://w3id.org/security/data-integrity/v1",
52794
+ "https://w3id.org/security/data-integrity/v2",
52795
+ { "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
52340
52796
  "https://gotosocial.org/ns"
52341
52797
  ];
52342
52798
  const compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
@@ -53203,7 +53659,7 @@ async function lookupObjectInternal(identifier, options = {}) {
53203
53659
  }
53204
53660
  throw error;
53205
53661
  }
53206
- if (options.crossOrigin !== "trust" && object.id != null && !haveSameIriOrigin(object.id, documentUrl)) {
53662
+ if (options.crossOrigin !== "trust" && object.id != null && !haveSameIriOrigin(object.id, documentUrl) && !haveSameFe34Origin(object.id, documentUrl)) {
53207
53663
  if (options.crossOrigin === "throw") throw new Error(`The object's @id (${object.id.href}) has a different origin than the document URL (${remoteDoc.documentUrl}); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to "trust".`);
53208
53664
  logger.warn("The object's @id ({objectId}) has a different origin than the document URL ({documentUrl}); refusing to return the object. If you want to bypass this check and are aware of the security implications, set the crossOrigin option to \"trust\".", {
53209
53665
  ...remoteDoc,