@fedify/vocab 2.5.0-dev.2332 → 2.5.0-dev.2355
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/deno.json +1 -1
- package/dist/mod.cjs +851 -2
- package/dist/mod.d.cts +227 -0
- package/dist/mod.d.ts +227 -0
- package/dist/mod.js +851 -2
- package/dist-tests/{actor-DpNkhFU9.mjs → actor-BbIjMjNa.mjs} +2 -2
- package/dist-tests/actor.test.mjs +3 -3
- package/dist-tests/application.yaml +15 -0
- package/dist-tests/{esm-Cncdk-Cm.mjs → esm-rg6f9oLR.mjs} +1 -1
- package/dist-tests/gateway.test.mjs +3 -3
- package/dist-tests/group.yaml +15 -0
- package/dist-tests/license.test.mjs +538 -0
- package/dist-tests/link.yaml +25 -0
- package/dist-tests/{lookup-CIDHxy5l.mjs → lookup-DKLMyPMJ.mjs} +2 -2
- package/dist-tests/lookup.test.mjs +3 -3
- package/dist-tests/object.yaml +30 -0
- package/dist-tests/organization.yaml +15 -0
- package/dist-tests/person.yaml +15 -0
- package/dist-tests/portable-lookup.test.mjs +4 -4
- package/dist-tests/service.yaml +15 -0
- package/dist-tests/signed-representation.test.mjs +1 -1
- package/dist-tests/src-DVk5F9Ik.mjs +9 -0
- package/dist-tests/translation.test.mjs +3 -6
- package/dist-tests/type.test.mjs +1 -1
- package/dist-tests/{vocab-EFWWufqL.mjs → vocab-Cg2PG-xH.mjs} +851 -2
- package/dist-tests/vocab.test.mjs +9 -3
- package/package.json +4 -4
- package/src/__snapshots__/vocab.test.ts.snap +480 -33
- package/src/application.yaml +15 -0
- package/src/group.yaml +15 -0
- package/src/license.test.ts +588 -0
- package/src/link.yaml +25 -0
- package/src/object.yaml +30 -0
- package/src/organization.yaml +15 -0
- package/src/person.yaml +15 -0
- package/src/service.yaml +15 -0
- package/src/vocab.test.ts +18 -6
- package/LICENSE +0 -20
package/dist/mod.cjs
CHANGED
|
@@ -36,7 +36,7 @@ let _fedify_vocab_runtime_temporal = require("@fedify/vocab-runtime/temporal");
|
|
|
36
36
|
let es_toolkit = require("es-toolkit");
|
|
37
37
|
//#region deno.json
|
|
38
38
|
var name = "@fedify/vocab";
|
|
39
|
-
var version = "2.5.0-dev.
|
|
39
|
+
var version = "2.5.0-dev.2355+c92a1cb1";
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/type.ts
|
|
42
42
|
function getTypeId(object) {
|
|
@@ -3671,10 +3671,25 @@ function isValidLanguageTag(language) {
|
|
|
3671
3671
|
throw error;
|
|
3672
3672
|
}
|
|
3673
3673
|
}
|
|
3674
|
+
function getAbsoluteIriValue(value) {
|
|
3675
|
+
if (value == null || typeof value !== "object") return void 0;
|
|
3676
|
+
const node = value;
|
|
3677
|
+
if (typeof node["@id"] === "string") return node["@id"].startsWith("_:") ? void 0 : node["@id"];
|
|
3678
|
+
if (typeof node["@value"] !== "string") return void 0;
|
|
3679
|
+
const type = node["@type"];
|
|
3680
|
+
return type == null || type === "http://www.w3.org/2001/XMLSchema#string" || type === "http://www.w3.org/2001/XMLSchema#anyURI" ? node["@value"] : void 0;
|
|
3681
|
+
}
|
|
3682
|
+
function isAbsoluteIriValue(value) {
|
|
3683
|
+
const iri = getAbsoluteIriValue(value);
|
|
3684
|
+
return iri != null && canDecodeIri(iri);
|
|
3685
|
+
}
|
|
3674
3686
|
const extraPropertyContexts = {
|
|
3675
3687
|
"https://schema.org/translator": "https://w3id.org/fep/22cd",
|
|
3688
|
+
"https://w3id.org/fep/6757#preferredLicense": "https://w3id.org/fep/6757",
|
|
3689
|
+
"http://purl.org/dc/terms/license": "https://w3id.org/fep/6757",
|
|
3676
3690
|
"https://w3id.org/fep/22cd#translations": "https://w3id.org/fep/22cd"
|
|
3677
3691
|
};
|
|
3692
|
+
const extraContextUrls = ["https://w3id.org/fep/22cd", "https://w3id.org/fep/6757"];
|
|
3678
3693
|
function getExtraContexts(document) {
|
|
3679
3694
|
const contexts = /* @__PURE__ */ new Set();
|
|
3680
3695
|
const pending = [document];
|
|
@@ -3687,7 +3702,10 @@ function getExtraContexts(document) {
|
|
|
3687
3702
|
}
|
|
3688
3703
|
if ("@value" in value) continue;
|
|
3689
3704
|
for (const [key, child] of globalThis.Object.entries(value)) {
|
|
3690
|
-
if (key === "@context")
|
|
3705
|
+
if (key === "@context") {
|
|
3706
|
+
for (const context of Array.isArray(child) ? child : [child]) if (typeof context === "string" && extraContextUrls.includes(context)) contexts.add(context);
|
|
3707
|
+
continue;
|
|
3708
|
+
}
|
|
3691
3709
|
if (globalThis.Object.hasOwn(extraPropertyContexts, key)) contexts.add(extraPropertyContexts[key]);
|
|
3692
3710
|
pending.push(child);
|
|
3693
3711
|
}
|
|
@@ -3728,10 +3746,12 @@ const PORTABLE_IRI_KEYS = /* @__PURE__ */ new Set([
|
|
|
3728
3746
|
"followingOf",
|
|
3729
3747
|
"generator",
|
|
3730
3748
|
"href",
|
|
3749
|
+
"http://creativecommons.org/ns#license",
|
|
3731
3750
|
"http://fedibird.com/ns#emojiReactions",
|
|
3732
3751
|
"http://fedibird.com/ns#quoteUri",
|
|
3733
3752
|
"http://joinmastodon.org/ns#featured",
|
|
3734
3753
|
"http://joinmastodon.org/ns#featuredTags",
|
|
3754
|
+
"http://purl.org/dc/terms/license",
|
|
3735
3755
|
"http://www.w3.org/ns/ldp#inbox",
|
|
3736
3756
|
"https://gotosocial.org/ns#announceAuthorization",
|
|
3737
3757
|
"https://gotosocial.org/ns#approvedBy",
|
|
@@ -3743,6 +3763,7 @@ const PORTABLE_IRI_KEYS = /* @__PURE__ */ new Set([
|
|
|
3743
3763
|
"https://gotosocial.org/ns#replyAuthorization",
|
|
3744
3764
|
"https://misskey-hub.net/ns#_misskey_quote",
|
|
3745
3765
|
"https://schema.org/isBasedOn",
|
|
3766
|
+
"https://schema.org/license",
|
|
3746
3767
|
"https://schema.org/translationOfWork",
|
|
3747
3768
|
"https://schema.org/translator",
|
|
3748
3769
|
"https://w3id.org/fep/044f#quote",
|
|
@@ -3755,6 +3776,7 @@ const PORTABLE_IRI_KEYS = /* @__PURE__ */ new Set([
|
|
|
3755
3776
|
"https://w3id.org/fep/5711#outboxOf",
|
|
3756
3777
|
"https://w3id.org/fep/5711#repliesOf",
|
|
3757
3778
|
"https://w3id.org/fep/5711#sharesOf",
|
|
3779
|
+
"https://w3id.org/fep/6757#preferredLicense",
|
|
3758
3780
|
"https://w3id.org/fep/7aa9#featureAuthorization",
|
|
3759
3781
|
"https://w3id.org/fep/7aa9#featuredCollections",
|
|
3760
3782
|
"https://w3id.org/fep/7aa9#featuredObject",
|
|
@@ -3834,6 +3856,7 @@ const PORTABLE_IRI_KEYS = /* @__PURE__ */ new Set([
|
|
|
3834
3856
|
"isBasedOn",
|
|
3835
3857
|
"items",
|
|
3836
3858
|
"last",
|
|
3859
|
+
"license",
|
|
3837
3860
|
"likeAuthorization",
|
|
3838
3861
|
"liked",
|
|
3839
3862
|
"likedOf",
|
|
@@ -3853,6 +3876,7 @@ const PORTABLE_IRI_KEYS = /* @__PURE__ */ new Set([
|
|
|
3853
3876
|
"outboxOf",
|
|
3854
3877
|
"owner",
|
|
3855
3878
|
"partOf",
|
|
3879
|
+
"preferredLicense",
|
|
3856
3880
|
"prev",
|
|
3857
3881
|
"preview",
|
|
3858
3882
|
"proof",
|
|
@@ -4004,6 +4028,7 @@ var Object$1 = class Object$1 {
|
|
|
4004
4028
|
#_446xEaDBs3Fz6MyzP3PSBaLupkbJ_announceAuthorization = [];
|
|
4005
4029
|
#_trust_446xEaDBs3Fz6MyzP3PSBaLupkbJ_announceAuthorization = /* @__PURE__ */ new Set();
|
|
4006
4030
|
#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations = [];
|
|
4031
|
+
#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = [];
|
|
4007
4032
|
/**
|
|
4008
4033
|
* Constructs a new instance of Object with the given values.
|
|
4009
4034
|
* @param values The values to initialize the instance with.
|
|
@@ -4245,6 +4270,8 @@ var Object$1 = class Object$1 {
|
|
|
4245
4270
|
} else throw new TypeError("The announceAuthorization must be of type AnnounceAuthorization | URL.");
|
|
4246
4271
|
if ("translations" in values && values.translations != null) if (Array.isArray(values.translations) && values.translations.every((v) => v instanceof Translation)) this.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations = values.translations.slice();
|
|
4247
4272
|
else throw new TypeError("The translations must be an array of type Translation.");
|
|
4273
|
+
if ("licenses" in values && values.licenses != null) if (Array.isArray(values.licenses) && values.licenses.every((v) => v instanceof URL)) this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = values.licenses.slice();
|
|
4274
|
+
else throw new TypeError("The licenses must be an array of type URL.");
|
|
4248
4275
|
}
|
|
4249
4276
|
/**
|
|
4250
4277
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -4573,6 +4600,9 @@ var Object$1 = class Object$1 {
|
|
|
4573
4600
|
clone.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations = this.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations.slice();
|
|
4574
4601
|
if ("translations" in values && values.translations != null) if (Array.isArray(values.translations) && values.translations.every((v) => v instanceof Translation)) clone.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations = values.translations.slice();
|
|
4575
4602
|
else throw new TypeError("The translations must be an array of type Translation.");
|
|
4603
|
+
clone.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d.slice();
|
|
4604
|
+
if ("licenses" in values && values.licenses != null) if (Array.isArray(values.licenses) && values.licenses.every((v) => v instanceof URL)) clone.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = values.licenses.slice();
|
|
4605
|
+
else throw new TypeError("The licenses must be an array of type URL.");
|
|
4576
4606
|
return clone;
|
|
4577
4607
|
}
|
|
4578
4608
|
async #fetchAttachment(url, options = {}) {
|
|
@@ -11042,6 +11072,27 @@ var Object$1 = class Object$1 {
|
|
|
11042
11072
|
get translations() {
|
|
11043
11073
|
return this.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations;
|
|
11044
11074
|
}
|
|
11075
|
+
/** The copyright licenses for this object, as defined by
|
|
11076
|
+
* [FEP-6757](https://w3id.org/fep/6757). Each license is identified by its
|
|
11077
|
+
* URI, such as <https://creativecommons.org/licenses/by/4.0/>; license names
|
|
11078
|
+
* and SPDX short identifiers are not license URIs. Multiple values are
|
|
11079
|
+
* alternatives that a consumer may choose from; their order has no meaning.
|
|
11080
|
+
*
|
|
11081
|
+
* An empty list means the object carries no license metadata. Fedify does
|
|
11082
|
+
* not synthesize a default license for it; FEP-6757 suggests that consumers
|
|
11083
|
+
* treat such content as “all rights reserved,” but that is a consumer policy,
|
|
11084
|
+
* not a value of this property. A license on an actor, activity, or
|
|
11085
|
+
* collection covers that object itself, not the objects the actor authored,
|
|
11086
|
+
* the activity's object, or the collection's items. An actor's
|
|
11087
|
+
* `preferredLicense` is not a fallback for this property either.
|
|
11088
|
+
*
|
|
11089
|
+
* The `https://schema.org/license` and
|
|
11090
|
+
* `http://creativecommons.org/ns#license` properties are read as synonyms
|
|
11091
|
+
* when this property is absent, but only this property is written.
|
|
11092
|
+
*/
|
|
11093
|
+
get licenses() {
|
|
11094
|
+
return this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d;
|
|
11095
|
+
}
|
|
11045
11096
|
/**
|
|
11046
11097
|
* Converts this object to a JSON-LD structure.
|
|
11047
11098
|
* @param options The options to use.
|
|
@@ -11455,6 +11506,12 @@ var Object$1 = class Object$1 {
|
|
|
11455
11506
|
compactItems.push(item);
|
|
11456
11507
|
}
|
|
11457
11508
|
if (compactItems.length > 0) result["translations"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
11509
|
+
compactItems = [];
|
|
11510
|
+
for (const v of this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d) {
|
|
11511
|
+
const item = (0, _fedify_vocab_runtime.formatIri)(v);
|
|
11512
|
+
compactItems.push(item);
|
|
11513
|
+
}
|
|
11514
|
+
if (compactItems.length > 0) result["license"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
11458
11515
|
result["type"] = "Object";
|
|
11459
11516
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
11460
11517
|
result["@context"] = [
|
|
@@ -11916,6 +11973,17 @@ var Object$1 = class Object$1 {
|
|
|
11916
11973
|
array.push(element);
|
|
11917
11974
|
}
|
|
11918
11975
|
if (array.length > 0) values["https://w3id.org/fep/22cd#translations"] = array;
|
|
11976
|
+
array = [];
|
|
11977
|
+
for (const v of this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d) {
|
|
11978
|
+
let element = { "@id": (0, _fedify_vocab_runtime.formatIri)(v) };
|
|
11979
|
+
if (Array.isArray(element)) {
|
|
11980
|
+
if (element.length < 1) continue;
|
|
11981
|
+
if (element.length == 1) element = element[0];
|
|
11982
|
+
}
|
|
11983
|
+
if (typeof element === "undefined") continue;
|
|
11984
|
+
array.push(element);
|
|
11985
|
+
}
|
|
11986
|
+
if (array.length > 0) values["http://purl.org/dc/terms/license"] = array;
|
|
11919
11987
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Object"];
|
|
11920
11988
|
if (this.id != null) values["@id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
11921
11989
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, {
|
|
@@ -11935,6 +12003,11 @@ var Object$1 = class Object$1 {
|
|
|
11935
12003
|
}
|
|
11936
12004
|
}
|
|
11937
12005
|
];
|
|
12006
|
+
if (options.context == null) {
|
|
12007
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
12008
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
12009
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
12010
|
+
}
|
|
11938
12011
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
11939
12012
|
if (options.context == null) {
|
|
11940
12013
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -11957,6 +12030,7 @@ var Object$1 = class Object$1 {
|
|
|
11957
12030
|
if (this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof != null && this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.length > 0) return false;
|
|
11958
12031
|
if (this.#_2MHQfh2N74MMmDLDqYWFo7TxYQK2_interactionPolicy != null && this.#_2MHQfh2N74MMmDLDqYWFo7TxYQK2_interactionPolicy.length > 0) return false;
|
|
11959
12032
|
if (this.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations != null && this.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations.length > 0) return false;
|
|
12033
|
+
if (this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d != null && this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d.length > 0) return false;
|
|
11960
12034
|
return true;
|
|
11961
12035
|
}
|
|
11962
12036
|
/**
|
|
@@ -13380,6 +13454,21 @@ var Object$1 = class Object$1 {
|
|
|
13380
13454
|
_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations.push(decoded);
|
|
13381
13455
|
}
|
|
13382
13456
|
instance.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations = _a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations;
|
|
13457
|
+
const _2rzkBRS4gNPrkJk9DohHAMUAxA2d = [];
|
|
13458
|
+
let _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array = values["http://purl.org/dc/terms/license"];
|
|
13459
|
+
if (_2rzkBRS4gNPrkJk9DohHAMUAxA2d__array == null || _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array.length < 1) _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array = values["https://schema.org/license"];
|
|
13460
|
+
if (_2rzkBRS4gNPrkJk9DohHAMUAxA2d__array == null || _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array.length < 1) _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array = values["http://creativecommons.org/ns#license"];
|
|
13461
|
+
for (const v of _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array == null ? [] : _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array.length === 1 && "@list" in _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array[0] ? _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array[0]["@list"] : _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array) {
|
|
13462
|
+
if (v == null) continue;
|
|
13463
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
13464
|
+
if (typeof decoded === "undefined") {
|
|
13465
|
+
shouldCacheJsonLd = false;
|
|
13466
|
+
continue;
|
|
13467
|
+
}
|
|
13468
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
13469
|
+
_2rzkBRS4gNPrkJk9DohHAMUAxA2d.push(decoded);
|
|
13470
|
+
}
|
|
13471
|
+
instance.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = _2rzkBRS4gNPrkJk9DohHAMUAxA2d;
|
|
13383
13472
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
13384
13473
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
13385
13474
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -13605,6 +13694,11 @@ var Object$1 = class Object$1 {
|
|
|
13605
13694
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
13606
13695
|
} : v);
|
|
13607
13696
|
if (_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations.length > 1 || !("translation" in proxy) && _a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations.length > 0) proxy.translations = _a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations;
|
|
13697
|
+
const _2rzkBRS4gNPrkJk9DohHAMUAxA2d = this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d.map((v) => v instanceof URL ? {
|
|
13698
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
13699
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
13700
|
+
} : v);
|
|
13701
|
+
if (_2rzkBRS4gNPrkJk9DohHAMUAxA2d.length > 1 || !("license" in proxy) && _2rzkBRS4gNPrkJk9DohHAMUAxA2d.length > 0) proxy.licenses = _2rzkBRS4gNPrkJk9DohHAMUAxA2d;
|
|
13608
13702
|
return proxy;
|
|
13609
13703
|
}
|
|
13610
13704
|
};
|
|
@@ -13702,6 +13796,11 @@ var Emoji = class Emoji extends Object$1 {
|
|
|
13702
13796
|
"toot": "http://joinmastodon.org/ns#",
|
|
13703
13797
|
"Emoji": "toot:Emoji"
|
|
13704
13798
|
}];
|
|
13799
|
+
if (options.context == null) {
|
|
13800
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
13801
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
13802
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
13803
|
+
}
|
|
13705
13804
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
13706
13805
|
if (options.context == null) {
|
|
13707
13806
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -14527,6 +14626,11 @@ var ChatMessage = class ChatMessage extends Object$1 {
|
|
|
14527
14626
|
}
|
|
14528
14627
|
}
|
|
14529
14628
|
];
|
|
14629
|
+
if (options.context == null) {
|
|
14630
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
14631
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
14632
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
14633
|
+
}
|
|
14530
14634
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
14531
14635
|
if (options.context == null) {
|
|
14532
14636
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -16895,6 +16999,11 @@ var Activity = class Activity extends Object$1 {
|
|
|
16895
16999
|
"https://w3id.org/security/data-integrity/v1",
|
|
16896
17000
|
"https://gotosocial.org/ns"
|
|
16897
17001
|
];
|
|
17002
|
+
if (options.context == null) {
|
|
17003
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
17004
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
17005
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
17006
|
+
}
|
|
16898
17007
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
16899
17008
|
if (options.context == null) {
|
|
16900
17009
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -17303,6 +17412,11 @@ var EmojiReact = class EmojiReact extends Activity {
|
|
|
17303
17412
|
"Emoji": "toot:Emoji"
|
|
17304
17413
|
}
|
|
17305
17414
|
];
|
|
17415
|
+
if (options.context == null) {
|
|
17416
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
17417
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
17418
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
17419
|
+
}
|
|
17306
17420
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
17307
17421
|
if (options.context == null) {
|
|
17308
17422
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -17628,6 +17742,11 @@ var PropertyValue = class {
|
|
|
17628
17742
|
"PropertyValue": "schema:PropertyValue",
|
|
17629
17743
|
"value": "schema:value"
|
|
17630
17744
|
}];
|
|
17745
|
+
if (options.context == null) {
|
|
17746
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
17747
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
17748
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
17749
|
+
}
|
|
17631
17750
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
17632
17751
|
if (options.context == null) {
|
|
17633
17752
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -17980,6 +18099,11 @@ var Measure = class {
|
|
|
17980
18099
|
"hasUnit": "om2:hasUnit",
|
|
17981
18100
|
"hasNumericalValue": "om2:hasNumericalValue"
|
|
17982
18101
|
}];
|
|
18102
|
+
if (options.context == null) {
|
|
18103
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
18104
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
18105
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
18106
|
+
}
|
|
17983
18107
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
17984
18108
|
if (options.context == null) {
|
|
17985
18109
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -18745,6 +18869,11 @@ var AnnounceAuthorization = class AnnounceAuthorization extends Object$1 {
|
|
|
18745
18869
|
"https://w3id.org/security/data-integrity/v1",
|
|
18746
18870
|
"https://gotosocial.org/ns"
|
|
18747
18871
|
];
|
|
18872
|
+
if (options.context == null) {
|
|
18873
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
18874
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
18875
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
18876
|
+
}
|
|
18748
18877
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
18749
18878
|
if (options.context == null) {
|
|
18750
18879
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -19000,6 +19129,11 @@ var AnnounceRequest = class AnnounceRequest extends Activity {
|
|
|
19000
19129
|
"https://w3id.org/security/data-integrity/v1",
|
|
19001
19130
|
"https://gotosocial.org/ns"
|
|
19002
19131
|
];
|
|
19132
|
+
if (options.context == null) {
|
|
19133
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
19134
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
19135
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
19136
|
+
}
|
|
19003
19137
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
19004
19138
|
if (options.context == null) {
|
|
19005
19139
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -19378,6 +19512,11 @@ var InteractionPolicy = class {
|
|
|
19378
19512
|
keepFreeFloatingNodes: true
|
|
19379
19513
|
});
|
|
19380
19514
|
let docContext = options.context ?? ["https://gotosocial.org/ns", "https://w3id.org/fep/7aa9"];
|
|
19515
|
+
if (options.context == null) {
|
|
19516
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
19517
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
19518
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
19519
|
+
}
|
|
19381
19520
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
19382
19521
|
if (options.context == null) {
|
|
19383
19522
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -19822,6 +19961,11 @@ var InteractionRule = class {
|
|
|
19822
19961
|
keepFreeFloatingNodes: true
|
|
19823
19962
|
});
|
|
19824
19963
|
let docContext = options.context ?? "https://gotosocial.org/ns";
|
|
19964
|
+
if (options.context == null) {
|
|
19965
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
19966
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
19967
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
19968
|
+
}
|
|
19825
19969
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
19826
19970
|
if (options.context == null) {
|
|
19827
19971
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -20588,6 +20732,11 @@ var LikeAuthorization = class LikeAuthorization extends Object$1 {
|
|
|
20588
20732
|
"https://w3id.org/security/data-integrity/v1",
|
|
20589
20733
|
"https://gotosocial.org/ns"
|
|
20590
20734
|
];
|
|
20735
|
+
if (options.context == null) {
|
|
20736
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
20737
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
20738
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
20739
|
+
}
|
|
20591
20740
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
20592
20741
|
if (options.context == null) {
|
|
20593
20742
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -20842,6 +20991,11 @@ var LikeRequest = class LikeRequest extends Activity {
|
|
|
20842
20991
|
"https://w3id.org/security/data-integrity/v1",
|
|
20843
20992
|
"https://gotosocial.org/ns"
|
|
20844
20993
|
];
|
|
20994
|
+
if (options.context == null) {
|
|
20995
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
20996
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
20997
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
20998
|
+
}
|
|
20845
20999
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
20846
21000
|
if (options.context == null) {
|
|
20847
21001
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -21574,6 +21728,11 @@ var ReplyAuthorization = class ReplyAuthorization extends Object$1 {
|
|
|
21574
21728
|
"https://w3id.org/security/data-integrity/v1",
|
|
21575
21729
|
"https://gotosocial.org/ns"
|
|
21576
21730
|
];
|
|
21731
|
+
if (options.context == null) {
|
|
21732
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
21733
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
21734
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
21735
|
+
}
|
|
21577
21736
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
21578
21737
|
if (options.context == null) {
|
|
21579
21738
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -21828,6 +21987,11 @@ var ReplyRequest = class ReplyRequest extends Activity {
|
|
|
21828
21987
|
"https://w3id.org/security/data-integrity/v1",
|
|
21829
21988
|
"https://gotosocial.org/ns"
|
|
21830
21989
|
];
|
|
21990
|
+
if (options.context == null) {
|
|
21991
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
21992
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
21993
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
21994
|
+
}
|
|
21831
21995
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
21832
21996
|
if (options.context == null) {
|
|
21833
21997
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -22561,6 +22725,11 @@ var QuoteAuthorization = class QuoteAuthorization extends Object$1 {
|
|
|
22561
22725
|
"https://gotosocial.org/ns",
|
|
22562
22726
|
{ "QuoteAuthorization": "https://w3id.org/fep/044f#QuoteAuthorization" }
|
|
22563
22727
|
];
|
|
22728
|
+
if (options.context == null) {
|
|
22729
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
22730
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
22731
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
22732
|
+
}
|
|
22564
22733
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
22565
22734
|
if (options.context == null) {
|
|
22566
22735
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -22845,6 +23014,11 @@ var QuoteRequest = class QuoteRequest extends Activity {
|
|
|
22845
23014
|
}
|
|
22846
23015
|
}
|
|
22847
23016
|
];
|
|
23017
|
+
if (options.context == null) {
|
|
23018
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
23019
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
23020
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
23021
|
+
}
|
|
22848
23022
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
22849
23023
|
if (options.context == null) {
|
|
22850
23024
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -23698,6 +23872,11 @@ var Translation = class {
|
|
|
23698
23872
|
keepFreeFloatingNodes: true
|
|
23699
23873
|
});
|
|
23700
23874
|
let docContext = options.context ?? ["https://www.w3.org/ns/activitystreams", "https://w3id.org/fep/22cd"];
|
|
23875
|
+
if (options.context == null) {
|
|
23876
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
23877
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
23878
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
23879
|
+
}
|
|
23701
23880
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
23702
23881
|
if (options.context == null) {
|
|
23703
23882
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -24561,6 +24740,11 @@ var FeatureAuthorization = class FeatureAuthorization extends Object$1 {
|
|
|
24561
24740
|
"https://gotosocial.org/ns",
|
|
24562
24741
|
"https://w3id.org/fep/7aa9"
|
|
24563
24742
|
];
|
|
24743
|
+
if (options.context == null) {
|
|
24744
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
24745
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
24746
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
24747
|
+
}
|
|
24564
24748
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
24565
24749
|
if (options.context == null) {
|
|
24566
24750
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -24813,6 +24997,11 @@ var FeatureRequest = class FeatureRequest extends Activity {
|
|
|
24813
24997
|
"https://gotosocial.org/ns",
|
|
24814
24998
|
"https://w3id.org/fep/7aa9"
|
|
24815
24999
|
];
|
|
25000
|
+
if (options.context == null) {
|
|
25001
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
25002
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
25003
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
25004
|
+
}
|
|
24816
25005
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
24817
25006
|
if (options.context == null) {
|
|
24818
25007
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -28234,6 +28423,11 @@ var Collection = class Collection extends Object$1 {
|
|
|
28234
28423
|
}
|
|
28235
28424
|
}
|
|
28236
28425
|
];
|
|
28426
|
+
if (options.context == null) {
|
|
28427
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
28428
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
28429
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
28430
|
+
}
|
|
28237
28431
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
28238
28432
|
if (options.context == null) {
|
|
28239
28433
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -29189,6 +29383,11 @@ var OrderedCollection = class OrderedCollection extends Collection {
|
|
|
29189
29383
|
}
|
|
29190
29384
|
}
|
|
29191
29385
|
];
|
|
29386
|
+
if (options.context == null) {
|
|
29387
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
29388
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
29389
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
29390
|
+
}
|
|
29192
29391
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
29193
29392
|
if (options.context == null) {
|
|
29194
29393
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -29585,6 +29784,11 @@ var FeaturedCollection = class FeaturedCollection extends OrderedCollection {
|
|
|
29585
29784
|
"Hashtag": "as:Hashtag"
|
|
29586
29785
|
}
|
|
29587
29786
|
];
|
|
29787
|
+
if (options.context == null) {
|
|
29788
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
29789
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
29790
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
29791
|
+
}
|
|
29588
29792
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
29589
29793
|
if (options.context == null) {
|
|
29590
29794
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -30354,6 +30558,11 @@ var FeaturedItem = class FeaturedItem extends Object$1 {
|
|
|
30354
30558
|
"https://gotosocial.org/ns",
|
|
30355
30559
|
"https://w3id.org/fep/7aa9"
|
|
30356
30560
|
];
|
|
30561
|
+
if (options.context == null) {
|
|
30562
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
30563
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
30564
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
30565
|
+
}
|
|
30357
30566
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
30358
30567
|
if (options.context == null) {
|
|
30359
30568
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -30689,6 +30898,11 @@ var DidService = class {
|
|
|
30689
30898
|
keepFreeFloatingNodes: true
|
|
30690
30899
|
});
|
|
30691
30900
|
let docContext = options.context ?? "https://www.w3.org/ns/did/v1";
|
|
30901
|
+
if (options.context == null) {
|
|
30902
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
30903
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
30904
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
30905
|
+
}
|
|
30692
30906
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
30693
30907
|
if (options.context == null) {
|
|
30694
30908
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -30892,6 +31106,11 @@ var Export = class Export extends DidService {
|
|
|
30892
31106
|
keepFreeFloatingNodes: true
|
|
30893
31107
|
});
|
|
30894
31108
|
let docContext = options.context ?? "https://www.w3.org/ns/did/v1";
|
|
31109
|
+
if (options.context == null) {
|
|
31110
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
31111
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
31112
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
31113
|
+
}
|
|
30895
31114
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
30896
31115
|
if (options.context == null) {
|
|
30897
31116
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -31469,6 +31688,11 @@ var DataIntegrityProof = class {
|
|
|
31469
31688
|
keepFreeFloatingNodes: true
|
|
31470
31689
|
});
|
|
31471
31690
|
let docContext = options.context ?? "https://w3id.org/security/data-integrity/v1";
|
|
31691
|
+
if (options.context == null) {
|
|
31692
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
31693
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
31694
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
31695
|
+
}
|
|
31472
31696
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
31473
31697
|
if (options.context == null) {
|
|
31474
31698
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -32162,6 +32386,11 @@ var CryptographicKey = class {
|
|
|
32162
32386
|
keepFreeFloatingNodes: true
|
|
32163
32387
|
});
|
|
32164
32388
|
let docContext = options.context ?? "https://w3id.org/security/v1";
|
|
32389
|
+
if (options.context == null) {
|
|
32390
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
32391
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
32392
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
32393
|
+
}
|
|
32165
32394
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
32166
32395
|
if (options.context == null) {
|
|
32167
32396
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -32822,6 +33051,11 @@ var Multikey = class {
|
|
|
32822
33051
|
keepFreeFloatingNodes: true
|
|
32823
33052
|
});
|
|
32824
33053
|
let docContext = options.context ?? "https://w3id.org/security/multikey/v1";
|
|
33054
|
+
if (options.context == null) {
|
|
33055
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
33056
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
33057
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
33058
|
+
}
|
|
32825
33059
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
32826
33060
|
if (options.context == null) {
|
|
32827
33061
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -33207,6 +33441,11 @@ var Agreement = class Agreement extends Object$1 {
|
|
|
33207
33441
|
"hasNumericalValue": "om2:hasNumericalValue"
|
|
33208
33442
|
}
|
|
33209
33443
|
];
|
|
33444
|
+
if (options.context == null) {
|
|
33445
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
33446
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
33447
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
33448
|
+
}
|
|
33210
33449
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
33211
33450
|
if (options.context == null) {
|
|
33212
33451
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -33590,6 +33829,11 @@ var Commitment = class {
|
|
|
33590
33829
|
"hasUnit": "om2:hasUnit",
|
|
33591
33830
|
"hasNumericalValue": "om2:hasNumericalValue"
|
|
33592
33831
|
}];
|
|
33832
|
+
if (options.context == null) {
|
|
33833
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
33834
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
33835
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
33836
|
+
}
|
|
33593
33837
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
33594
33838
|
if (options.context == null) {
|
|
33595
33839
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -34062,6 +34306,11 @@ var Intent = class {
|
|
|
34062
34306
|
"hasUnit": "om2:hasUnit",
|
|
34063
34307
|
"hasNumericalValue": "om2:hasNumericalValue"
|
|
34064
34308
|
}];
|
|
34309
|
+
if (options.context == null) {
|
|
34310
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
34311
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
34312
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
34313
|
+
}
|
|
34065
34314
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
34066
34315
|
if (options.context == null) {
|
|
34067
34316
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -34559,6 +34808,11 @@ var Proposal = class Proposal extends Object$1 {
|
|
|
34559
34808
|
"hasNumericalValue": "om2:hasNumericalValue"
|
|
34560
34809
|
}
|
|
34561
34810
|
];
|
|
34811
|
+
if (options.context == null) {
|
|
34812
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
34813
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
34814
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
34815
|
+
}
|
|
34562
34816
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
34563
34817
|
if (options.context == null) {
|
|
34564
34818
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -34832,6 +35086,11 @@ var Accept = class Accept extends Activity {
|
|
|
34832
35086
|
"https://w3id.org/security/data-integrity/v1",
|
|
34833
35087
|
"https://gotosocial.org/ns"
|
|
34834
35088
|
];
|
|
35089
|
+
if (options.context == null) {
|
|
35090
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
35091
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
35092
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
35093
|
+
}
|
|
34835
35094
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
34836
35095
|
if (options.context == null) {
|
|
34837
35096
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -35028,6 +35287,11 @@ var Add = class Add extends Activity {
|
|
|
35028
35287
|
"https://w3id.org/security/data-integrity/v1",
|
|
35029
35288
|
"https://gotosocial.org/ns"
|
|
35030
35289
|
];
|
|
35290
|
+
if (options.context == null) {
|
|
35291
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
35292
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
35293
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
35294
|
+
}
|
|
35031
35295
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
35032
35296
|
if (options.context == null) {
|
|
35033
35297
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -35251,6 +35515,11 @@ var Announce = class Announce extends Activity {
|
|
|
35251
35515
|
}
|
|
35252
35516
|
}
|
|
35253
35517
|
];
|
|
35518
|
+
if (options.context == null) {
|
|
35519
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
35520
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
35521
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
35522
|
+
}
|
|
35254
35523
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
35255
35524
|
if (options.context == null) {
|
|
35256
35525
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -35414,6 +35683,7 @@ var Application = class Application extends Object$1 {
|
|
|
35414
35683
|
#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = /* @__PURE__ */ new Set();
|
|
35415
35684
|
#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
|
|
35416
35685
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
|
35686
|
+
#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
35417
35687
|
/**
|
|
35418
35688
|
* Constructs a new instance of Application with the given values.
|
|
35419
35689
|
* @param values The values to initialize the instance with.
|
|
@@ -35535,6 +35805,8 @@ var Application = class Application extends Object$1 {
|
|
|
35535
35805
|
else throw new TypeError("The followedMessage must be of type string.");
|
|
35536
35806
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
35537
35807
|
else throw new TypeError("The cat must be of type boolean.");
|
|
35808
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
35809
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
35538
35810
|
}
|
|
35539
35811
|
/**
|
|
35540
35812
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -35716,6 +35988,9 @@ var Application = class Application extends Object$1 {
|
|
|
35716
35988
|
clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.slice();
|
|
35717
35989
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
35718
35990
|
else throw new TypeError("The cat must be of type boolean.");
|
|
35991
|
+
clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.slice();
|
|
35992
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
35993
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
35719
35994
|
return clone;
|
|
35720
35995
|
}
|
|
35721
35996
|
/** A short username which may be used to refer to the actor,
|
|
@@ -39450,6 +39725,18 @@ var Application = class Application extends Object$1 {
|
|
|
39450
39725
|
if (this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length < 1) return null;
|
|
39451
39726
|
return this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
39452
39727
|
}
|
|
39728
|
+
/** The URI of the license this actor prefers for the new objects it creates,
|
|
39729
|
+
* as defined by [FEP-6757](https://w3id.org/fep/6757). A client can use it
|
|
39730
|
+
* as the default `license` of a new object and let the user choose another.
|
|
39731
|
+
*
|
|
39732
|
+
* This is not a fallback license: an object without its own `license` is not
|
|
39733
|
+
* licensed under its author's preferred license.
|
|
39734
|
+
*/
|
|
39735
|
+
get preferredLicense() {
|
|
39736
|
+
if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
39737
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length < 1) return null;
|
|
39738
|
+
return this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
39739
|
+
}
|
|
39453
39740
|
/**
|
|
39454
39741
|
* Converts this object to a JSON-LD structure.
|
|
39455
39742
|
* @param options The options to use.
|
|
@@ -39721,6 +40008,12 @@ var Application = class Application extends Object$1 {
|
|
|
39721
40008
|
compactItems.push(item);
|
|
39722
40009
|
}
|
|
39723
40010
|
if (compactItems.length > 0) result["isCat"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
40011
|
+
compactItems = [];
|
|
40012
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
40013
|
+
const item = (0, _fedify_vocab_runtime.formatIri)(v);
|
|
40014
|
+
compactItems.push(item);
|
|
40015
|
+
}
|
|
40016
|
+
if (compactItems.length > 0) result["preferredLicense"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
39724
40017
|
result["type"] = "Application";
|
|
39725
40018
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
39726
40019
|
result["@context"] = [
|
|
@@ -40043,6 +40336,17 @@ var Application = class Application extends Object$1 {
|
|
|
40043
40336
|
array.push(element);
|
|
40044
40337
|
}
|
|
40045
40338
|
if (array.length > 0) values["https://misskey-hub.net/ns#isCat"] = array;
|
|
40339
|
+
array = [];
|
|
40340
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
40341
|
+
let element = { "@id": (0, _fedify_vocab_runtime.formatIri)(v) };
|
|
40342
|
+
if (Array.isArray(element)) {
|
|
40343
|
+
if (element.length < 1) continue;
|
|
40344
|
+
if (element.length == 1) element = element[0];
|
|
40345
|
+
}
|
|
40346
|
+
if (typeof element === "undefined") continue;
|
|
40347
|
+
array.push(element);
|
|
40348
|
+
}
|
|
40349
|
+
if (array.length > 0) values["https://w3id.org/fep/6757#preferredLicense"] = array;
|
|
40046
40350
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Application"];
|
|
40047
40351
|
if (this.id != null) values["@id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
40048
40352
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, {
|
|
@@ -40094,6 +40398,11 @@ var Application = class Application extends Object$1 {
|
|
|
40094
40398
|
"isCat": "misskey:isCat"
|
|
40095
40399
|
}
|
|
40096
40400
|
];
|
|
40401
|
+
if (options.context == null) {
|
|
40402
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
40403
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
40404
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
40405
|
+
}
|
|
40097
40406
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
40098
40407
|
if (options.context == null) {
|
|
40099
40408
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -40112,6 +40421,7 @@ var Application = class Application extends Object$1 {
|
|
|
40112
40421
|
isCompactable() {
|
|
40113
40422
|
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null && this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0) return false;
|
|
40114
40423
|
if (this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service != null && this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.length > 0) return false;
|
|
40424
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense != null && this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length > 0) return false;
|
|
40115
40425
|
return super.isCompactable();
|
|
40116
40426
|
}
|
|
40117
40427
|
/**
|
|
@@ -40646,6 +40956,19 @@ var Application = class Application extends Object$1 {
|
|
|
40646
40956
|
_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
|
|
40647
40957
|
}
|
|
40648
40958
|
instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
|
|
40959
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
40960
|
+
let _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array = values["https://w3id.org/fep/6757#preferredLicense"];
|
|
40961
|
+
for (const v of _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array == null ? [] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array.length === 1 && "@list" in _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0] ? _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0]["@list"] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array) {
|
|
40962
|
+
if (v == null) continue;
|
|
40963
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
40964
|
+
if (typeof decoded === "undefined") {
|
|
40965
|
+
shouldCacheJsonLd = false;
|
|
40966
|
+
continue;
|
|
40967
|
+
}
|
|
40968
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
40969
|
+
_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.push(decoded);
|
|
40970
|
+
}
|
|
40971
|
+
instance.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense;
|
|
40649
40972
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
40650
40973
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
40651
40974
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -40787,6 +41110,11 @@ var Application = class Application extends Object$1 {
|
|
|
40787
41110
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
40788
41111
|
} : v);
|
|
40789
41112
|
if (_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length == 1) proxy.cat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
41113
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.map((v) => v instanceof URL ? {
|
|
41114
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
41115
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
41116
|
+
} : v);
|
|
41117
|
+
if (_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length == 1) proxy.preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
40790
41118
|
return proxy;
|
|
40791
41119
|
}
|
|
40792
41120
|
};
|
|
@@ -40874,6 +41202,11 @@ var IntransitiveActivity = class IntransitiveActivity extends Activity {
|
|
|
40874
41202
|
"https://w3id.org/security/data-integrity/v1",
|
|
40875
41203
|
"https://gotosocial.org/ns"
|
|
40876
41204
|
];
|
|
41205
|
+
if (options.context == null) {
|
|
41206
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
41207
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
41208
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
41209
|
+
}
|
|
40877
41210
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
40878
41211
|
if (options.context == null) {
|
|
40879
41212
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -41071,6 +41404,11 @@ var Arrive = class Arrive extends IntransitiveActivity {
|
|
|
41071
41404
|
"https://w3id.org/security/data-integrity/v1",
|
|
41072
41405
|
"https://gotosocial.org/ns"
|
|
41073
41406
|
];
|
|
41407
|
+
if (options.context == null) {
|
|
41408
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
41409
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
41410
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
41411
|
+
}
|
|
41074
41412
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
41075
41413
|
if (options.context == null) {
|
|
41076
41414
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -41894,6 +42232,11 @@ var Article = class Article extends Object$1 {
|
|
|
41894
42232
|
}
|
|
41895
42233
|
}
|
|
41896
42234
|
];
|
|
42235
|
+
if (options.context == null) {
|
|
42236
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
42237
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
42238
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
42239
|
+
}
|
|
41897
42240
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
41898
42241
|
if (options.context == null) {
|
|
41899
42242
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -42278,6 +42621,11 @@ var Document = class Document extends Object$1 {
|
|
|
42278
42621
|
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
42279
42622
|
"https://gotosocial.org/ns"
|
|
42280
42623
|
];
|
|
42624
|
+
if (options.context == null) {
|
|
42625
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
42626
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
42627
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
42628
|
+
}
|
|
42281
42629
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
42282
42630
|
if (options.context == null) {
|
|
42283
42631
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -42545,6 +42893,11 @@ var Audio = class Audio extends Document {
|
|
|
42545
42893
|
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
42546
42894
|
"https://gotosocial.org/ns"
|
|
42547
42895
|
];
|
|
42896
|
+
if (options.context == null) {
|
|
42897
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
42898
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
42899
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
42900
|
+
}
|
|
42548
42901
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
42549
42902
|
if (options.context == null) {
|
|
42550
42903
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -42738,6 +43091,11 @@ var Ignore = class Ignore extends Activity {
|
|
|
42738
43091
|
"https://w3id.org/security/data-integrity/v1",
|
|
42739
43092
|
"https://gotosocial.org/ns"
|
|
42740
43093
|
];
|
|
43094
|
+
if (options.context == null) {
|
|
43095
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
43096
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
43097
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
43098
|
+
}
|
|
42741
43099
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
42742
43100
|
if (options.context == null) {
|
|
42743
43101
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -42934,6 +43292,11 @@ var Block = class Block extends Ignore {
|
|
|
42934
43292
|
"https://w3id.org/security/data-integrity/v1",
|
|
42935
43293
|
"https://gotosocial.org/ns"
|
|
42936
43294
|
];
|
|
43295
|
+
if (options.context == null) {
|
|
43296
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
43297
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
43298
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
43299
|
+
}
|
|
42937
43300
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
42938
43301
|
if (options.context == null) {
|
|
42939
43302
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -43973,6 +44336,11 @@ var CollectionPage = class CollectionPage extends Collection {
|
|
|
43973
44336
|
}
|
|
43974
44337
|
}
|
|
43975
44338
|
];
|
|
44339
|
+
if (options.context == null) {
|
|
44340
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
44341
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
44342
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
44343
|
+
}
|
|
43976
44344
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
43977
44345
|
if (options.context == null) {
|
|
43978
44346
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -44275,6 +44643,11 @@ var Create = class Create extends Activity {
|
|
|
44275
44643
|
}
|
|
44276
44644
|
}
|
|
44277
44645
|
];
|
|
44646
|
+
if (options.context == null) {
|
|
44647
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
44648
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
44649
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
44650
|
+
}
|
|
44278
44651
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
44279
44652
|
if (options.context == null) {
|
|
44280
44653
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -44494,6 +44867,11 @@ var Delete = class Delete extends Activity {
|
|
|
44494
44867
|
}
|
|
44495
44868
|
}
|
|
44496
44869
|
];
|
|
44870
|
+
if (options.context == null) {
|
|
44871
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
44872
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
44873
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
44874
|
+
}
|
|
44497
44875
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
44498
44876
|
if (options.context == null) {
|
|
44499
44877
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -44690,6 +45068,11 @@ var Dislike = class Dislike extends Activity {
|
|
|
44690
45068
|
"Emoji": "toot:Emoji"
|
|
44691
45069
|
}
|
|
44692
45070
|
];
|
|
45071
|
+
if (options.context == null) {
|
|
45072
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
45073
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
45074
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
45075
|
+
}
|
|
44693
45076
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
44694
45077
|
if (options.context == null) {
|
|
44695
45078
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -45171,6 +45554,11 @@ var Endpoints = class {
|
|
|
45171
45554
|
keepFreeFloatingNodes: true
|
|
45172
45555
|
});
|
|
45173
45556
|
let docContext = options.context ?? "https://www.w3.org/ns/activitystreams";
|
|
45557
|
+
if (options.context == null) {
|
|
45558
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
45559
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
45560
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
45561
|
+
}
|
|
45174
45562
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
45175
45563
|
if (options.context == null) {
|
|
45176
45564
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -45499,6 +45887,11 @@ var Event = class Event extends Object$1 {
|
|
|
45499
45887
|
"https://w3id.org/security/data-integrity/v1",
|
|
45500
45888
|
"https://gotosocial.org/ns"
|
|
45501
45889
|
];
|
|
45890
|
+
if (options.context == null) {
|
|
45891
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
45892
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
45893
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
45894
|
+
}
|
|
45502
45895
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
45503
45896
|
if (options.context == null) {
|
|
45504
45897
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -45693,6 +46086,11 @@ var Flag = class Flag extends Activity {
|
|
|
45693
46086
|
"https://w3id.org/security/data-integrity/v1",
|
|
45694
46087
|
"https://gotosocial.org/ns"
|
|
45695
46088
|
];
|
|
46089
|
+
if (options.context == null) {
|
|
46090
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
46091
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
46092
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
46093
|
+
}
|
|
45696
46094
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
45697
46095
|
if (options.context == null) {
|
|
45698
46096
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -45891,6 +46289,11 @@ var Follow = class Follow extends Activity {
|
|
|
45891
46289
|
"https://w3id.org/security/multikey/v1",
|
|
45892
46290
|
"https://gotosocial.org/ns"
|
|
45893
46291
|
];
|
|
46292
|
+
if (options.context == null) {
|
|
46293
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
46294
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
46295
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
46296
|
+
}
|
|
45894
46297
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
45895
46298
|
if (options.context == null) {
|
|
45896
46299
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -46054,6 +46457,7 @@ var Group = class Group extends Object$1 {
|
|
|
46054
46457
|
#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = /* @__PURE__ */ new Set();
|
|
46055
46458
|
#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
|
|
46056
46459
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
|
46460
|
+
#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
46057
46461
|
/**
|
|
46058
46462
|
* Constructs a new instance of Group with the given values.
|
|
46059
46463
|
* @param values The values to initialize the instance with.
|
|
@@ -46175,6 +46579,8 @@ var Group = class Group extends Object$1 {
|
|
|
46175
46579
|
else throw new TypeError("The followedMessage must be of type string.");
|
|
46176
46580
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
46177
46581
|
else throw new TypeError("The cat must be of type boolean.");
|
|
46582
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
46583
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
46178
46584
|
}
|
|
46179
46585
|
/**
|
|
46180
46586
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -46356,6 +46762,9 @@ var Group = class Group extends Object$1 {
|
|
|
46356
46762
|
clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.slice();
|
|
46357
46763
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
46358
46764
|
else throw new TypeError("The cat must be of type boolean.");
|
|
46765
|
+
clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.slice();
|
|
46766
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
46767
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
46359
46768
|
return clone;
|
|
46360
46769
|
}
|
|
46361
46770
|
/** A short username which may be used to refer to the actor,
|
|
@@ -50090,6 +50499,18 @@ var Group = class Group extends Object$1 {
|
|
|
50090
50499
|
if (this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length < 1) return null;
|
|
50091
50500
|
return this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
50092
50501
|
}
|
|
50502
|
+
/** The URI of the license this actor prefers for the new objects it creates,
|
|
50503
|
+
* as defined by [FEP-6757](https://w3id.org/fep/6757). A client can use it
|
|
50504
|
+
* as the default `license` of a new object and let the user choose another.
|
|
50505
|
+
*
|
|
50506
|
+
* This is not a fallback license: an object without its own `license` is not
|
|
50507
|
+
* licensed under its author's preferred license.
|
|
50508
|
+
*/
|
|
50509
|
+
get preferredLicense() {
|
|
50510
|
+
if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
50511
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length < 1) return null;
|
|
50512
|
+
return this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
50513
|
+
}
|
|
50093
50514
|
/**
|
|
50094
50515
|
* Converts this object to a JSON-LD structure.
|
|
50095
50516
|
* @param options The options to use.
|
|
@@ -50361,6 +50782,12 @@ var Group = class Group extends Object$1 {
|
|
|
50361
50782
|
compactItems.push(item);
|
|
50362
50783
|
}
|
|
50363
50784
|
if (compactItems.length > 0) result["isCat"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
50785
|
+
compactItems = [];
|
|
50786
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
50787
|
+
const item = (0, _fedify_vocab_runtime.formatIri)(v);
|
|
50788
|
+
compactItems.push(item);
|
|
50789
|
+
}
|
|
50790
|
+
if (compactItems.length > 0) result["preferredLicense"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
50364
50791
|
result["type"] = "Group";
|
|
50365
50792
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
50366
50793
|
result["@context"] = [
|
|
@@ -50683,6 +51110,17 @@ var Group = class Group extends Object$1 {
|
|
|
50683
51110
|
array.push(element);
|
|
50684
51111
|
}
|
|
50685
51112
|
if (array.length > 0) values["https://misskey-hub.net/ns#isCat"] = array;
|
|
51113
|
+
array = [];
|
|
51114
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
51115
|
+
let element = { "@id": (0, _fedify_vocab_runtime.formatIri)(v) };
|
|
51116
|
+
if (Array.isArray(element)) {
|
|
51117
|
+
if (element.length < 1) continue;
|
|
51118
|
+
if (element.length == 1) element = element[0];
|
|
51119
|
+
}
|
|
51120
|
+
if (typeof element === "undefined") continue;
|
|
51121
|
+
array.push(element);
|
|
51122
|
+
}
|
|
51123
|
+
if (array.length > 0) values["https://w3id.org/fep/6757#preferredLicense"] = array;
|
|
50686
51124
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Group"];
|
|
50687
51125
|
if (this.id != null) values["@id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
50688
51126
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, {
|
|
@@ -50734,6 +51172,11 @@ var Group = class Group extends Object$1 {
|
|
|
50734
51172
|
"isCat": "misskey:isCat"
|
|
50735
51173
|
}
|
|
50736
51174
|
];
|
|
51175
|
+
if (options.context == null) {
|
|
51176
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
51177
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
51178
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
51179
|
+
}
|
|
50737
51180
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
50738
51181
|
if (options.context == null) {
|
|
50739
51182
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -50752,6 +51195,7 @@ var Group = class Group extends Object$1 {
|
|
|
50752
51195
|
isCompactable() {
|
|
50753
51196
|
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null && this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0) return false;
|
|
50754
51197
|
if (this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service != null && this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.length > 0) return false;
|
|
51198
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense != null && this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length > 0) return false;
|
|
50755
51199
|
return super.isCompactable();
|
|
50756
51200
|
}
|
|
50757
51201
|
/**
|
|
@@ -51286,6 +51730,19 @@ var Group = class Group extends Object$1 {
|
|
|
51286
51730
|
_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
|
|
51287
51731
|
}
|
|
51288
51732
|
instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
|
|
51733
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
51734
|
+
let _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array = values["https://w3id.org/fep/6757#preferredLicense"];
|
|
51735
|
+
for (const v of _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array == null ? [] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array.length === 1 && "@list" in _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0] ? _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0]["@list"] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array) {
|
|
51736
|
+
if (v == null) continue;
|
|
51737
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
51738
|
+
if (typeof decoded === "undefined") {
|
|
51739
|
+
shouldCacheJsonLd = false;
|
|
51740
|
+
continue;
|
|
51741
|
+
}
|
|
51742
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
51743
|
+
_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.push(decoded);
|
|
51744
|
+
}
|
|
51745
|
+
instance.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense;
|
|
51289
51746
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
51290
51747
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
51291
51748
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -51427,6 +51884,11 @@ var Group = class Group extends Object$1 {
|
|
|
51427
51884
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
51428
51885
|
} : v);
|
|
51429
51886
|
if (_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length == 1) proxy.cat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
51887
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.map((v) => v instanceof URL ? {
|
|
51888
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
51889
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
51890
|
+
} : v);
|
|
51891
|
+
if (_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length == 1) proxy.preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
51430
51892
|
return proxy;
|
|
51431
51893
|
}
|
|
51432
51894
|
};
|
|
@@ -51506,6 +51968,7 @@ var Link = class Link {
|
|
|
51506
51968
|
#_2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width = [];
|
|
51507
51969
|
#_gCVTegXxWWCw6wWRxa1QF65zusg_preview = [];
|
|
51508
51970
|
#_trust_gCVTegXxWWCw6wWRxa1QF65zusg_preview = /* @__PURE__ */ new Set();
|
|
51971
|
+
#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = [];
|
|
51509
51972
|
/**
|
|
51510
51973
|
* Constructs a new instance of Link with the given values.
|
|
51511
51974
|
* @param values The values to initialize the instance with.
|
|
@@ -51551,6 +52014,8 @@ var Link = class Link {
|
|
|
51551
52014
|
this.#_gCVTegXxWWCw6wWRxa1QF65zusg_preview = values.previews.slice();
|
|
51552
52015
|
for (let i = 0; i < values.previews.length; i++) this.#_trust_gCVTegXxWWCw6wWRxa1QF65zusg_preview.add(i);
|
|
51553
52016
|
} else throw new TypeError("The previews must be an array of type Link | Object | URL.");
|
|
52017
|
+
if ("licenses" in values && values.licenses != null) if (Array.isArray(values.licenses) && values.licenses.every((v) => v instanceof URL)) this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = values.licenses.slice();
|
|
52018
|
+
else throw new TypeError("The licenses must be an array of type URL.");
|
|
51554
52019
|
}
|
|
51555
52020
|
/**
|
|
51556
52021
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -51617,6 +52082,9 @@ var Link = class Link {
|
|
|
51617
52082
|
clone.#_trust_gCVTegXxWWCw6wWRxa1QF65zusg_preview = /* @__PURE__ */ new Set();
|
|
51618
52083
|
for (let i = 0; i < values.previews.length; i++) clone.#_trust_gCVTegXxWWCw6wWRxa1QF65zusg_preview.add(i);
|
|
51619
52084
|
} else throw new TypeError("The previews must be an array of type Link | Object | URL.");
|
|
52085
|
+
clone.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d.slice();
|
|
52086
|
+
if ("licenses" in values && values.licenses != null) if (Array.isArray(values.licenses) && values.licenses.every((v) => v instanceof URL)) clone.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = values.licenses.slice();
|
|
52087
|
+
else throw new TypeError("The licenses must be an array of type URL.");
|
|
51620
52088
|
return clone;
|
|
51621
52089
|
}
|
|
51622
52090
|
/** The target resource pointed to by a {@link Link}.
|
|
@@ -51945,6 +52413,22 @@ var Link = class Link {
|
|
|
51945
52413
|
yield v;
|
|
51946
52414
|
}
|
|
51947
52415
|
}
|
|
52416
|
+
/** The copyright licenses for the linked resource, as defined by
|
|
52417
|
+
* [FEP-6757](https://w3id.org/fep/6757). Each license is identified by its
|
|
52418
|
+
* URI, such as <https://creativecommons.org/publicdomain/mark/1.0/>; license
|
|
52419
|
+
* names and SPDX short identifiers are not license URIs. Multiple values are
|
|
52420
|
+
* alternatives that a consumer may choose from; their order has no meaning.
|
|
52421
|
+
*
|
|
52422
|
+
* An empty list means the link carries no license metadata. Fedify does not
|
|
52423
|
+
* synthesize a default license for it.
|
|
52424
|
+
*
|
|
52425
|
+
* The `https://schema.org/license` and
|
|
52426
|
+
* `http://creativecommons.org/ns#license` properties are read as synonyms
|
|
52427
|
+
* when this property is absent, but only this property is written.
|
|
52428
|
+
*/
|
|
52429
|
+
get licenses() {
|
|
52430
|
+
return this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d;
|
|
52431
|
+
}
|
|
51948
52432
|
/**
|
|
51949
52433
|
* Converts this object to a JSON-LD structure.
|
|
51950
52434
|
* @param options The options to use.
|
|
@@ -52030,6 +52514,12 @@ var Link = class Link {
|
|
|
52030
52514
|
compactItems.push(item);
|
|
52031
52515
|
}
|
|
52032
52516
|
if (compactItems.length > 0) result["preview"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
52517
|
+
compactItems = [];
|
|
52518
|
+
for (const v of this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d) {
|
|
52519
|
+
const item = (0, _fedify_vocab_runtime.formatIri)(v);
|
|
52520
|
+
compactItems.push(item);
|
|
52521
|
+
}
|
|
52522
|
+
if (compactItems.length > 0) result["license"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
52033
52523
|
result["type"] = "Link";
|
|
52034
52524
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
52035
52525
|
result["@context"] = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/fep/ef61"];
|
|
@@ -52145,6 +52635,17 @@ var Link = class Link {
|
|
|
52145
52635
|
array.push(element);
|
|
52146
52636
|
}
|
|
52147
52637
|
if (array.length > 0) values["https://www.w3.org/ns/activitystreams#preview"] = array;
|
|
52638
|
+
array = [];
|
|
52639
|
+
for (const v of this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d) {
|
|
52640
|
+
let element = { "@id": (0, _fedify_vocab_runtime.formatIri)(v) };
|
|
52641
|
+
if (Array.isArray(element)) {
|
|
52642
|
+
if (element.length < 1) continue;
|
|
52643
|
+
if (element.length == 1) element = element[0];
|
|
52644
|
+
}
|
|
52645
|
+
if (typeof element === "undefined") continue;
|
|
52646
|
+
array.push(element);
|
|
52647
|
+
}
|
|
52648
|
+
if (array.length > 0) values["http://purl.org/dc/terms/license"] = array;
|
|
52148
52649
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Link"];
|
|
52149
52650
|
if (this.id != null) values["@id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
52150
52651
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, {
|
|
@@ -52152,6 +52653,11 @@ var Link = class Link {
|
|
|
52152
52653
|
keepFreeFloatingNodes: true
|
|
52153
52654
|
});
|
|
52154
52655
|
let docContext = options.context ?? ["https://www.w3.org/ns/activitystreams", "https://w3id.org/fep/ef61"];
|
|
52656
|
+
if (options.context == null) {
|
|
52657
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
52658
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
52659
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
52660
|
+
}
|
|
52155
52661
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
52156
52662
|
if (options.context == null) {
|
|
52157
52663
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -52166,6 +52672,7 @@ var Link = class Link {
|
|
|
52166
52672
|
}
|
|
52167
52673
|
isCompactable() {
|
|
52168
52674
|
if (this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name != null && this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.length > 0) return false;
|
|
52675
|
+
if (this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d != null && this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d.length > 0) return false;
|
|
52169
52676
|
return true;
|
|
52170
52677
|
}
|
|
52171
52678
|
/**
|
|
@@ -52441,6 +52948,21 @@ var Link = class Link {
|
|
|
52441
52948
|
_gCVTegXxWWCw6wWRxa1QF65zusg_preview.push(decoded);
|
|
52442
52949
|
}
|
|
52443
52950
|
instance.#_gCVTegXxWWCw6wWRxa1QF65zusg_preview = _gCVTegXxWWCw6wWRxa1QF65zusg_preview;
|
|
52951
|
+
const _2rzkBRS4gNPrkJk9DohHAMUAxA2d = [];
|
|
52952
|
+
let _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array = values["http://purl.org/dc/terms/license"];
|
|
52953
|
+
if (_2rzkBRS4gNPrkJk9DohHAMUAxA2d__array == null || _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array.length < 1) _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array = values["https://schema.org/license"];
|
|
52954
|
+
if (_2rzkBRS4gNPrkJk9DohHAMUAxA2d__array == null || _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array.length < 1) _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array = values["http://creativecommons.org/ns#license"];
|
|
52955
|
+
for (const v of _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array == null ? [] : _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array.length === 1 && "@list" in _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array[0] ? _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array[0]["@list"] : _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array) {
|
|
52956
|
+
if (v == null) continue;
|
|
52957
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
52958
|
+
if (typeof decoded === "undefined") {
|
|
52959
|
+
shouldCacheJsonLd = false;
|
|
52960
|
+
continue;
|
|
52961
|
+
}
|
|
52962
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
52963
|
+
_2rzkBRS4gNPrkJk9DohHAMUAxA2d.push(decoded);
|
|
52964
|
+
}
|
|
52965
|
+
instance.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = _2rzkBRS4gNPrkJk9DohHAMUAxA2d;
|
|
52444
52966
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
52445
52967
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
52446
52968
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -52507,6 +53029,11 @@ var Link = class Link {
|
|
|
52507
53029
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
52508
53030
|
} : v);
|
|
52509
53031
|
if (_gCVTegXxWWCw6wWRxa1QF65zusg_preview.length > 1 || !("preview" in proxy) && _gCVTegXxWWCw6wWRxa1QF65zusg_preview.length > 0) proxy.previews = _gCVTegXxWWCw6wWRxa1QF65zusg_preview;
|
|
53032
|
+
const _2rzkBRS4gNPrkJk9DohHAMUAxA2d = this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d.map((v) => v instanceof URL ? {
|
|
53033
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
53034
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
53035
|
+
} : v);
|
|
53036
|
+
if (_2rzkBRS4gNPrkJk9DohHAMUAxA2d.length > 1 || !("license" in proxy) && _2rzkBRS4gNPrkJk9DohHAMUAxA2d.length > 0) proxy.licenses = _2rzkBRS4gNPrkJk9DohHAMUAxA2d;
|
|
52510
53037
|
return proxy;
|
|
52511
53038
|
}
|
|
52512
53039
|
};
|
|
@@ -52600,6 +53127,11 @@ var Hashtag = class Hashtag extends Link {
|
|
|
52600
53127
|
keepFreeFloatingNodes: true
|
|
52601
53128
|
});
|
|
52602
53129
|
let docContext = options.context ?? ["https://www.w3.org/ns/activitystreams", { "Hashtag": "as:Hashtag" }];
|
|
53130
|
+
if (options.context == null) {
|
|
53131
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
53132
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
53133
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
53134
|
+
}
|
|
52603
53135
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
52604
53136
|
if (options.context == null) {
|
|
52605
53137
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -52805,6 +53337,11 @@ var Image = class Image extends Document {
|
|
|
52805
53337
|
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
52806
53338
|
"https://gotosocial.org/ns"
|
|
52807
53339
|
];
|
|
53340
|
+
if (options.context == null) {
|
|
53341
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
53342
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
53343
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
53344
|
+
}
|
|
52808
53345
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
52809
53346
|
if (options.context == null) {
|
|
52810
53347
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -52999,6 +53536,11 @@ var Offer = class Offer extends Activity {
|
|
|
52999
53536
|
"https://w3id.org/security/data-integrity/v1",
|
|
53000
53537
|
"https://gotosocial.org/ns"
|
|
53001
53538
|
];
|
|
53539
|
+
if (options.context == null) {
|
|
53540
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
53541
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
53542
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
53543
|
+
}
|
|
53002
53544
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
53003
53545
|
if (options.context == null) {
|
|
53004
53546
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -53193,6 +53735,11 @@ var Invite = class Invite extends Offer {
|
|
|
53193
53735
|
"https://w3id.org/security/data-integrity/v1",
|
|
53194
53736
|
"https://gotosocial.org/ns"
|
|
53195
53737
|
];
|
|
53738
|
+
if (options.context == null) {
|
|
53739
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
53740
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
53741
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
53742
|
+
}
|
|
53196
53743
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
53197
53744
|
if (options.context == null) {
|
|
53198
53745
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -53386,6 +53933,11 @@ var Join = class Join extends Activity {
|
|
|
53386
53933
|
"https://w3id.org/security/data-integrity/v1",
|
|
53387
53934
|
"https://gotosocial.org/ns"
|
|
53388
53935
|
];
|
|
53936
|
+
if (options.context == null) {
|
|
53937
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
53938
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
53939
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
53940
|
+
}
|
|
53389
53941
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
53390
53942
|
if (options.context == null) {
|
|
53391
53943
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -53579,6 +54131,11 @@ var Leave = class Leave extends Activity {
|
|
|
53579
54131
|
"https://w3id.org/security/data-integrity/v1",
|
|
53580
54132
|
"https://gotosocial.org/ns"
|
|
53581
54133
|
];
|
|
54134
|
+
if (options.context == null) {
|
|
54135
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
54136
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
54137
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
54138
|
+
}
|
|
53582
54139
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
53583
54140
|
if (options.context == null) {
|
|
53584
54141
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -53776,6 +54333,11 @@ var Like = class Like extends Activity {
|
|
|
53776
54333
|
"Emoji": "toot:Emoji"
|
|
53777
54334
|
}
|
|
53778
54335
|
];
|
|
54336
|
+
if (options.context == null) {
|
|
54337
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
54338
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
54339
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
54340
|
+
}
|
|
53779
54341
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
53780
54342
|
if (options.context == null) {
|
|
53781
54343
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -53968,6 +54530,11 @@ var Listen = class Listen extends Activity {
|
|
|
53968
54530
|
"https://w3id.org/security/data-integrity/v1",
|
|
53969
54531
|
"https://gotosocial.org/ns"
|
|
53970
54532
|
];
|
|
54533
|
+
if (options.context == null) {
|
|
54534
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
54535
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
54536
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
54537
|
+
}
|
|
53971
54538
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
53972
54539
|
if (options.context == null) {
|
|
53973
54540
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -54166,6 +54733,11 @@ var Mention = class Mention extends Link {
|
|
|
54166
54733
|
keepFreeFloatingNodes: true
|
|
54167
54734
|
});
|
|
54168
54735
|
let docContext = options.context ?? "https://www.w3.org/ns/activitystreams";
|
|
54736
|
+
if (options.context == null) {
|
|
54737
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
54738
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
54739
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
54740
|
+
}
|
|
54169
54741
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
54170
54742
|
if (options.context == null) {
|
|
54171
54743
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -54357,6 +54929,11 @@ var Move = class Move extends Activity {
|
|
|
54357
54929
|
"https://w3id.org/security/data-integrity/v1",
|
|
54358
54930
|
"https://gotosocial.org/ns"
|
|
54359
54931
|
];
|
|
54932
|
+
if (options.context == null) {
|
|
54933
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
54934
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
54935
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
54936
|
+
}
|
|
54360
54937
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
54361
54938
|
if (options.context == null) {
|
|
54362
54939
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -55181,6 +55758,11 @@ var Note = class Note extends Object$1 {
|
|
|
55181
55758
|
}
|
|
55182
55759
|
}
|
|
55183
55760
|
];
|
|
55761
|
+
if (options.context == null) {
|
|
55762
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
55763
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
55764
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
55765
|
+
}
|
|
55184
55766
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
55185
55767
|
if (options.context == null) {
|
|
55186
55768
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -55832,6 +56414,11 @@ var OrderedCollectionPage = class OrderedCollectionPage extends CollectionPage {
|
|
|
55832
56414
|
}
|
|
55833
56415
|
}
|
|
55834
56416
|
];
|
|
56417
|
+
if (options.context == null) {
|
|
56418
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
56419
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
56420
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
56421
|
+
}
|
|
55835
56422
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
55836
56423
|
if (options.context == null) {
|
|
55837
56424
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -56117,6 +56704,7 @@ var Organization = class Organization extends Object$1 {
|
|
|
56117
56704
|
#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = /* @__PURE__ */ new Set();
|
|
56118
56705
|
#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
|
|
56119
56706
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
|
56707
|
+
#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
56120
56708
|
/**
|
|
56121
56709
|
* Constructs a new instance of Organization with the given values.
|
|
56122
56710
|
* @param values The values to initialize the instance with.
|
|
@@ -56238,6 +56826,8 @@ var Organization = class Organization extends Object$1 {
|
|
|
56238
56826
|
else throw new TypeError("The followedMessage must be of type string.");
|
|
56239
56827
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
56240
56828
|
else throw new TypeError("The cat must be of type boolean.");
|
|
56829
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
56830
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
56241
56831
|
}
|
|
56242
56832
|
/**
|
|
56243
56833
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -56419,6 +57009,9 @@ var Organization = class Organization extends Object$1 {
|
|
|
56419
57009
|
clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.slice();
|
|
56420
57010
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
56421
57011
|
else throw new TypeError("The cat must be of type boolean.");
|
|
57012
|
+
clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.slice();
|
|
57013
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
57014
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
56422
57015
|
return clone;
|
|
56423
57016
|
}
|
|
56424
57017
|
/** A short username which may be used to refer to the actor,
|
|
@@ -60153,6 +60746,18 @@ var Organization = class Organization extends Object$1 {
|
|
|
60153
60746
|
if (this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length < 1) return null;
|
|
60154
60747
|
return this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
60155
60748
|
}
|
|
60749
|
+
/** The URI of the license this actor prefers for the new objects it creates,
|
|
60750
|
+
* as defined by [FEP-6757](https://w3id.org/fep/6757). A client can use it
|
|
60751
|
+
* as the default `license` of a new object and let the user choose another.
|
|
60752
|
+
*
|
|
60753
|
+
* This is not a fallback license: an object without its own `license` is not
|
|
60754
|
+
* licensed under its author's preferred license.
|
|
60755
|
+
*/
|
|
60756
|
+
get preferredLicense() {
|
|
60757
|
+
if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
60758
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length < 1) return null;
|
|
60759
|
+
return this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
60760
|
+
}
|
|
60156
60761
|
/**
|
|
60157
60762
|
* Converts this object to a JSON-LD structure.
|
|
60158
60763
|
* @param options The options to use.
|
|
@@ -60424,6 +61029,12 @@ var Organization = class Organization extends Object$1 {
|
|
|
60424
61029
|
compactItems.push(item);
|
|
60425
61030
|
}
|
|
60426
61031
|
if (compactItems.length > 0) result["isCat"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
61032
|
+
compactItems = [];
|
|
61033
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
61034
|
+
const item = (0, _fedify_vocab_runtime.formatIri)(v);
|
|
61035
|
+
compactItems.push(item);
|
|
61036
|
+
}
|
|
61037
|
+
if (compactItems.length > 0) result["preferredLicense"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
60427
61038
|
result["type"] = "Organization";
|
|
60428
61039
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
60429
61040
|
result["@context"] = [
|
|
@@ -60746,6 +61357,17 @@ var Organization = class Organization extends Object$1 {
|
|
|
60746
61357
|
array.push(element);
|
|
60747
61358
|
}
|
|
60748
61359
|
if (array.length > 0) values["https://misskey-hub.net/ns#isCat"] = array;
|
|
61360
|
+
array = [];
|
|
61361
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
61362
|
+
let element = { "@id": (0, _fedify_vocab_runtime.formatIri)(v) };
|
|
61363
|
+
if (Array.isArray(element)) {
|
|
61364
|
+
if (element.length < 1) continue;
|
|
61365
|
+
if (element.length == 1) element = element[0];
|
|
61366
|
+
}
|
|
61367
|
+
if (typeof element === "undefined") continue;
|
|
61368
|
+
array.push(element);
|
|
61369
|
+
}
|
|
61370
|
+
if (array.length > 0) values["https://w3id.org/fep/6757#preferredLicense"] = array;
|
|
60749
61371
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Organization"];
|
|
60750
61372
|
if (this.id != null) values["@id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
60751
61373
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, {
|
|
@@ -60797,6 +61419,11 @@ var Organization = class Organization extends Object$1 {
|
|
|
60797
61419
|
"isCat": "misskey:isCat"
|
|
60798
61420
|
}
|
|
60799
61421
|
];
|
|
61422
|
+
if (options.context == null) {
|
|
61423
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
61424
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
61425
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
61426
|
+
}
|
|
60800
61427
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
60801
61428
|
if (options.context == null) {
|
|
60802
61429
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -60815,6 +61442,7 @@ var Organization = class Organization extends Object$1 {
|
|
|
60815
61442
|
isCompactable() {
|
|
60816
61443
|
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null && this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0) return false;
|
|
60817
61444
|
if (this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service != null && this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.length > 0) return false;
|
|
61445
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense != null && this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length > 0) return false;
|
|
60818
61446
|
return super.isCompactable();
|
|
60819
61447
|
}
|
|
60820
61448
|
/**
|
|
@@ -61349,6 +61977,19 @@ var Organization = class Organization extends Object$1 {
|
|
|
61349
61977
|
_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
|
|
61350
61978
|
}
|
|
61351
61979
|
instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
|
|
61980
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
61981
|
+
let _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array = values["https://w3id.org/fep/6757#preferredLicense"];
|
|
61982
|
+
for (const v of _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array == null ? [] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array.length === 1 && "@list" in _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0] ? _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0]["@list"] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array) {
|
|
61983
|
+
if (v == null) continue;
|
|
61984
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
61985
|
+
if (typeof decoded === "undefined") {
|
|
61986
|
+
shouldCacheJsonLd = false;
|
|
61987
|
+
continue;
|
|
61988
|
+
}
|
|
61989
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
61990
|
+
_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.push(decoded);
|
|
61991
|
+
}
|
|
61992
|
+
instance.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense;
|
|
61352
61993
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
61353
61994
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
61354
61995
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -61490,6 +62131,11 @@ var Organization = class Organization extends Object$1 {
|
|
|
61490
62131
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
61491
62132
|
} : v);
|
|
61492
62133
|
if (_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length == 1) proxy.cat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
62134
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.map((v) => v instanceof URL ? {
|
|
62135
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
62136
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
62137
|
+
} : v);
|
|
62138
|
+
if (_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length == 1) proxy.preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
61493
62139
|
return proxy;
|
|
61494
62140
|
}
|
|
61495
62141
|
};
|
|
@@ -61591,6 +62237,11 @@ var Page = class Page extends Document {
|
|
|
61591
62237
|
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
61592
62238
|
"https://gotosocial.org/ns"
|
|
61593
62239
|
];
|
|
62240
|
+
if (options.context == null) {
|
|
62241
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
62242
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
62243
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
62244
|
+
}
|
|
61594
62245
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
61595
62246
|
if (options.context == null) {
|
|
61596
62247
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -61754,6 +62405,7 @@ var Person = class Person extends Object$1 {
|
|
|
61754
62405
|
#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = /* @__PURE__ */ new Set();
|
|
61755
62406
|
#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
|
|
61756
62407
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
|
62408
|
+
#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
61757
62409
|
/**
|
|
61758
62410
|
* Constructs a new instance of Person with the given values.
|
|
61759
62411
|
* @param values The values to initialize the instance with.
|
|
@@ -61875,6 +62527,8 @@ var Person = class Person extends Object$1 {
|
|
|
61875
62527
|
else throw new TypeError("The followedMessage must be of type string.");
|
|
61876
62528
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
61877
62529
|
else throw new TypeError("The cat must be of type boolean.");
|
|
62530
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
62531
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
61878
62532
|
}
|
|
61879
62533
|
/**
|
|
61880
62534
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -62056,6 +62710,9 @@ var Person = class Person extends Object$1 {
|
|
|
62056
62710
|
clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.slice();
|
|
62057
62711
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
62058
62712
|
else throw new TypeError("The cat must be of type boolean.");
|
|
62713
|
+
clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.slice();
|
|
62714
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
62715
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
62059
62716
|
return clone;
|
|
62060
62717
|
}
|
|
62061
62718
|
/** A short username which may be used to refer to the actor,
|
|
@@ -65790,6 +66447,18 @@ var Person = class Person extends Object$1 {
|
|
|
65790
66447
|
if (this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length < 1) return null;
|
|
65791
66448
|
return this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
65792
66449
|
}
|
|
66450
|
+
/** The URI of the license this actor prefers for the new objects it creates,
|
|
66451
|
+
* as defined by [FEP-6757](https://w3id.org/fep/6757). A client can use it
|
|
66452
|
+
* as the default `license` of a new object and let the user choose another.
|
|
66453
|
+
*
|
|
66454
|
+
* This is not a fallback license: an object without its own `license` is not
|
|
66455
|
+
* licensed under its author's preferred license.
|
|
66456
|
+
*/
|
|
66457
|
+
get preferredLicense() {
|
|
66458
|
+
if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
66459
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length < 1) return null;
|
|
66460
|
+
return this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
66461
|
+
}
|
|
65793
66462
|
/**
|
|
65794
66463
|
* Converts this object to a JSON-LD structure.
|
|
65795
66464
|
* @param options The options to use.
|
|
@@ -66061,6 +66730,12 @@ var Person = class Person extends Object$1 {
|
|
|
66061
66730
|
compactItems.push(item);
|
|
66062
66731
|
}
|
|
66063
66732
|
if (compactItems.length > 0) result["isCat"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
66733
|
+
compactItems = [];
|
|
66734
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
66735
|
+
const item = (0, _fedify_vocab_runtime.formatIri)(v);
|
|
66736
|
+
compactItems.push(item);
|
|
66737
|
+
}
|
|
66738
|
+
if (compactItems.length > 0) result["preferredLicense"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
66064
66739
|
result["type"] = "Person";
|
|
66065
66740
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
66066
66741
|
result["@context"] = [
|
|
@@ -66383,6 +67058,17 @@ var Person = class Person extends Object$1 {
|
|
|
66383
67058
|
array.push(element);
|
|
66384
67059
|
}
|
|
66385
67060
|
if (array.length > 0) values["https://misskey-hub.net/ns#isCat"] = array;
|
|
67061
|
+
array = [];
|
|
67062
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
67063
|
+
let element = { "@id": (0, _fedify_vocab_runtime.formatIri)(v) };
|
|
67064
|
+
if (Array.isArray(element)) {
|
|
67065
|
+
if (element.length < 1) continue;
|
|
67066
|
+
if (element.length == 1) element = element[0];
|
|
67067
|
+
}
|
|
67068
|
+
if (typeof element === "undefined") continue;
|
|
67069
|
+
array.push(element);
|
|
67070
|
+
}
|
|
67071
|
+
if (array.length > 0) values["https://w3id.org/fep/6757#preferredLicense"] = array;
|
|
66386
67072
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Person"];
|
|
66387
67073
|
if (this.id != null) values["@id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
66388
67074
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, {
|
|
@@ -66434,6 +67120,11 @@ var Person = class Person extends Object$1 {
|
|
|
66434
67120
|
"isCat": "misskey:isCat"
|
|
66435
67121
|
}
|
|
66436
67122
|
];
|
|
67123
|
+
if (options.context == null) {
|
|
67124
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
67125
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
67126
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
67127
|
+
}
|
|
66437
67128
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
66438
67129
|
if (options.context == null) {
|
|
66439
67130
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -66452,6 +67143,7 @@ var Person = class Person extends Object$1 {
|
|
|
66452
67143
|
isCompactable() {
|
|
66453
67144
|
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null && this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0) return false;
|
|
66454
67145
|
if (this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service != null && this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.length > 0) return false;
|
|
67146
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense != null && this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length > 0) return false;
|
|
66455
67147
|
return super.isCompactable();
|
|
66456
67148
|
}
|
|
66457
67149
|
/**
|
|
@@ -66986,6 +67678,19 @@ var Person = class Person extends Object$1 {
|
|
|
66986
67678
|
_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
|
|
66987
67679
|
}
|
|
66988
67680
|
instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
|
|
67681
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
67682
|
+
let _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array = values["https://w3id.org/fep/6757#preferredLicense"];
|
|
67683
|
+
for (const v of _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array == null ? [] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array.length === 1 && "@list" in _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0] ? _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0]["@list"] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array) {
|
|
67684
|
+
if (v == null) continue;
|
|
67685
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
67686
|
+
if (typeof decoded === "undefined") {
|
|
67687
|
+
shouldCacheJsonLd = false;
|
|
67688
|
+
continue;
|
|
67689
|
+
}
|
|
67690
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
67691
|
+
_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.push(decoded);
|
|
67692
|
+
}
|
|
67693
|
+
instance.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense;
|
|
66989
67694
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
66990
67695
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
66991
67696
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -67127,6 +67832,11 @@ var Person = class Person extends Object$1 {
|
|
|
67127
67832
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
67128
67833
|
} : v);
|
|
67129
67834
|
if (_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length == 1) proxy.cat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
67835
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.map((v) => v instanceof URL ? {
|
|
67836
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
67837
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
67838
|
+
} : v);
|
|
67839
|
+
if (_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length == 1) proxy.preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
67130
67840
|
return proxy;
|
|
67131
67841
|
}
|
|
67132
67842
|
};
|
|
@@ -67433,6 +68143,11 @@ var Place = class Place extends Object$1 {
|
|
|
67433
68143
|
"https://w3id.org/security/data-integrity/v1",
|
|
67434
68144
|
"https://gotosocial.org/ns"
|
|
67435
68145
|
];
|
|
68146
|
+
if (options.context == null) {
|
|
68147
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
68148
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
68149
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
68150
|
+
}
|
|
67436
68151
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
67437
68152
|
if (options.context == null) {
|
|
67438
68153
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -68013,6 +68728,11 @@ var Profile = class Profile extends Object$1 {
|
|
|
68013
68728
|
"https://w3id.org/security/data-integrity/v1",
|
|
68014
68729
|
"https://gotosocial.org/ns"
|
|
68015
68730
|
];
|
|
68731
|
+
if (options.context == null) {
|
|
68732
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
68733
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
68734
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
68735
|
+
}
|
|
68016
68736
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
68017
68737
|
if (options.context == null) {
|
|
68018
68738
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -69372,6 +70092,11 @@ var Question = class Question extends IntransitiveActivity {
|
|
|
69372
70092
|
}
|
|
69373
70093
|
}
|
|
69374
70094
|
];
|
|
70095
|
+
if (options.context == null) {
|
|
70096
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
70097
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
70098
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
70099
|
+
}
|
|
69375
70100
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
69376
70101
|
if (options.context == null) {
|
|
69377
70102
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -69725,6 +70450,11 @@ var Read = class Read extends Activity {
|
|
|
69725
70450
|
"https://w3id.org/security/data-integrity/v1",
|
|
69726
70451
|
"https://gotosocial.org/ns"
|
|
69727
70452
|
];
|
|
70453
|
+
if (options.context == null) {
|
|
70454
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
70455
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
70456
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
70457
|
+
}
|
|
69728
70458
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
69729
70459
|
if (options.context == null) {
|
|
69730
70460
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -69918,6 +70648,11 @@ var Reject = class Reject extends Activity {
|
|
|
69918
70648
|
"https://w3id.org/security/data-integrity/v1",
|
|
69919
70649
|
"https://gotosocial.org/ns"
|
|
69920
70650
|
];
|
|
70651
|
+
if (options.context == null) {
|
|
70652
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
70653
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
70654
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
70655
|
+
}
|
|
69921
70656
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
69922
70657
|
if (options.context == null) {
|
|
69923
70658
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -71090,6 +71825,11 @@ var Relationship = class Relationship extends Object$1 {
|
|
|
71090
71825
|
"https://w3id.org/security/data-integrity/v1",
|
|
71091
71826
|
"https://gotosocial.org/ns"
|
|
71092
71827
|
];
|
|
71828
|
+
if (options.context == null) {
|
|
71829
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
71830
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
71831
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
71832
|
+
}
|
|
71093
71833
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
71094
71834
|
if (options.context == null) {
|
|
71095
71835
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -71364,6 +72104,11 @@ var Remove = class Remove extends Activity {
|
|
|
71364
72104
|
"https://w3id.org/security/data-integrity/v1",
|
|
71365
72105
|
"https://gotosocial.org/ns"
|
|
71366
72106
|
];
|
|
72107
|
+
if (options.context == null) {
|
|
72108
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
72109
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
72110
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
72111
|
+
}
|
|
71367
72112
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
71368
72113
|
if (options.context == null) {
|
|
71369
72114
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -71527,6 +72272,7 @@ var Service = class Service extends Object$1 {
|
|
|
71527
72272
|
#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = /* @__PURE__ */ new Set();
|
|
71528
72273
|
#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
|
|
71529
72274
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
|
72275
|
+
#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
71530
72276
|
/**
|
|
71531
72277
|
* Constructs a new instance of Service with the given values.
|
|
71532
72278
|
* @param values The values to initialize the instance with.
|
|
@@ -71648,6 +72394,8 @@ var Service = class Service extends Object$1 {
|
|
|
71648
72394
|
else throw new TypeError("The followedMessage must be of type string.");
|
|
71649
72395
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
71650
72396
|
else throw new TypeError("The cat must be of type boolean.");
|
|
72397
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
72398
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
71651
72399
|
}
|
|
71652
72400
|
/**
|
|
71653
72401
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -71829,6 +72577,9 @@ var Service = class Service extends Object$1 {
|
|
|
71829
72577
|
clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.slice();
|
|
71830
72578
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
71831
72579
|
else throw new TypeError("The cat must be of type boolean.");
|
|
72580
|
+
clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.slice();
|
|
72581
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
72582
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
71832
72583
|
return clone;
|
|
71833
72584
|
}
|
|
71834
72585
|
/** A short username which may be used to refer to the actor,
|
|
@@ -75563,6 +76314,18 @@ var Service = class Service extends Object$1 {
|
|
|
75563
76314
|
if (this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length < 1) return null;
|
|
75564
76315
|
return this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
75565
76316
|
}
|
|
76317
|
+
/** The URI of the license this actor prefers for the new objects it creates,
|
|
76318
|
+
* as defined by [FEP-6757](https://w3id.org/fep/6757). A client can use it
|
|
76319
|
+
* as the default `license` of a new object and let the user choose another.
|
|
76320
|
+
*
|
|
76321
|
+
* This is not a fallback license: an object without its own `license` is not
|
|
76322
|
+
* licensed under its author's preferred license.
|
|
76323
|
+
*/
|
|
76324
|
+
get preferredLicense() {
|
|
76325
|
+
if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
76326
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length < 1) return null;
|
|
76327
|
+
return this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
76328
|
+
}
|
|
75566
76329
|
/**
|
|
75567
76330
|
* Converts this object to a JSON-LD structure.
|
|
75568
76331
|
* @param options The options to use.
|
|
@@ -75834,6 +76597,12 @@ var Service = class Service extends Object$1 {
|
|
|
75834
76597
|
compactItems.push(item);
|
|
75835
76598
|
}
|
|
75836
76599
|
if (compactItems.length > 0) result["isCat"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
76600
|
+
compactItems = [];
|
|
76601
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
76602
|
+
const item = (0, _fedify_vocab_runtime.formatIri)(v);
|
|
76603
|
+
compactItems.push(item);
|
|
76604
|
+
}
|
|
76605
|
+
if (compactItems.length > 0) result["preferredLicense"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
75837
76606
|
result["type"] = "Service";
|
|
75838
76607
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
75839
76608
|
result["@context"] = [
|
|
@@ -76156,6 +76925,17 @@ var Service = class Service extends Object$1 {
|
|
|
76156
76925
|
array.push(element);
|
|
76157
76926
|
}
|
|
76158
76927
|
if (array.length > 0) values["https://misskey-hub.net/ns#isCat"] = array;
|
|
76928
|
+
array = [];
|
|
76929
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
76930
|
+
let element = { "@id": (0, _fedify_vocab_runtime.formatIri)(v) };
|
|
76931
|
+
if (Array.isArray(element)) {
|
|
76932
|
+
if (element.length < 1) continue;
|
|
76933
|
+
if (element.length == 1) element = element[0];
|
|
76934
|
+
}
|
|
76935
|
+
if (typeof element === "undefined") continue;
|
|
76936
|
+
array.push(element);
|
|
76937
|
+
}
|
|
76938
|
+
if (array.length > 0) values["https://w3id.org/fep/6757#preferredLicense"] = array;
|
|
76159
76939
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Service"];
|
|
76160
76940
|
if (this.id != null) values["@id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
76161
76941
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, {
|
|
@@ -76207,6 +76987,11 @@ var Service = class Service extends Object$1 {
|
|
|
76207
76987
|
"isCat": "misskey:isCat"
|
|
76208
76988
|
}
|
|
76209
76989
|
];
|
|
76990
|
+
if (options.context == null) {
|
|
76991
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
76992
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
76993
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
76994
|
+
}
|
|
76210
76995
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
76211
76996
|
if (options.context == null) {
|
|
76212
76997
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -76225,6 +77010,7 @@ var Service = class Service extends Object$1 {
|
|
|
76225
77010
|
isCompactable() {
|
|
76226
77011
|
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null && this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0) return false;
|
|
76227
77012
|
if (this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service != null && this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.length > 0) return false;
|
|
77013
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense != null && this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length > 0) return false;
|
|
76228
77014
|
return super.isCompactable();
|
|
76229
77015
|
}
|
|
76230
77016
|
/**
|
|
@@ -76759,6 +77545,19 @@ var Service = class Service extends Object$1 {
|
|
|
76759
77545
|
_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
|
|
76760
77546
|
}
|
|
76761
77547
|
instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
|
|
77548
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
77549
|
+
let _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array = values["https://w3id.org/fep/6757#preferredLicense"];
|
|
77550
|
+
for (const v of _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array == null ? [] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array.length === 1 && "@list" in _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0] ? _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0]["@list"] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array) {
|
|
77551
|
+
if (v == null) continue;
|
|
77552
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
77553
|
+
if (typeof decoded === "undefined") {
|
|
77554
|
+
shouldCacheJsonLd = false;
|
|
77555
|
+
continue;
|
|
77556
|
+
}
|
|
77557
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
77558
|
+
_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.push(decoded);
|
|
77559
|
+
}
|
|
77560
|
+
instance.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense;
|
|
76762
77561
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
76763
77562
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
76764
77563
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -76900,6 +77699,11 @@ var Service = class Service extends Object$1 {
|
|
|
76900
77699
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
76901
77700
|
} : v);
|
|
76902
77701
|
if (_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length == 1) proxy.cat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
77702
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.map((v) => v instanceof URL ? {
|
|
77703
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
77704
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
77705
|
+
} : v);
|
|
77706
|
+
if (_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length == 1) proxy.preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
76903
77707
|
return proxy;
|
|
76904
77708
|
}
|
|
76905
77709
|
};
|
|
@@ -77117,6 +77921,11 @@ var Source = class {
|
|
|
77117
77921
|
keepFreeFloatingNodes: true
|
|
77118
77922
|
});
|
|
77119
77923
|
let docContext = options.context ?? "https://www.w3.org/ns/activitystreams";
|
|
77924
|
+
if (options.context == null) {
|
|
77925
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
77926
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
77927
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
77928
|
+
}
|
|
77120
77929
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
77121
77930
|
if (options.context == null) {
|
|
77122
77931
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -77344,6 +78153,11 @@ var TentativeAccept = class TentativeAccept extends Accept {
|
|
|
77344
78153
|
"https://w3id.org/security/data-integrity/v1",
|
|
77345
78154
|
"https://gotosocial.org/ns"
|
|
77346
78155
|
];
|
|
78156
|
+
if (options.context == null) {
|
|
78157
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
78158
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
78159
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
78160
|
+
}
|
|
77347
78161
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
77348
78162
|
if (options.context == null) {
|
|
77349
78163
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -77537,6 +78351,11 @@ var TentativeReject = class TentativeReject extends Reject {
|
|
|
77537
78351
|
"https://w3id.org/security/data-integrity/v1",
|
|
77538
78352
|
"https://gotosocial.org/ns"
|
|
77539
78353
|
];
|
|
78354
|
+
if (options.context == null) {
|
|
78355
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
78356
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
78357
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
78358
|
+
}
|
|
77540
78359
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
77541
78360
|
if (options.context == null) {
|
|
77542
78361
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -77828,6 +78647,11 @@ var Tombstone = class Tombstone extends Object$1 {
|
|
|
77828
78647
|
"https://w3id.org/security/data-integrity/v1",
|
|
77829
78648
|
"https://gotosocial.org/ns"
|
|
77830
78649
|
];
|
|
78650
|
+
if (options.context == null) {
|
|
78651
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
78652
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
78653
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
78654
|
+
}
|
|
77831
78655
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
77832
78656
|
if (options.context == null) {
|
|
77833
78657
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -78067,6 +78891,11 @@ var Travel = class Travel extends IntransitiveActivity {
|
|
|
78067
78891
|
"https://w3id.org/security/data-integrity/v1",
|
|
78068
78892
|
"https://gotosocial.org/ns"
|
|
78069
78893
|
];
|
|
78894
|
+
if (options.context == null) {
|
|
78895
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
78896
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
78897
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
78898
|
+
}
|
|
78070
78899
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
78071
78900
|
if (options.context == null) {
|
|
78072
78901
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -78274,6 +79103,11 @@ var Undo = class Undo extends Activity {
|
|
|
78274
79103
|
"Emoji": "toot:Emoji"
|
|
78275
79104
|
}
|
|
78276
79105
|
];
|
|
79106
|
+
if (options.context == null) {
|
|
79107
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
79108
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
79109
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
79110
|
+
}
|
|
78277
79111
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
78278
79112
|
if (options.context == null) {
|
|
78279
79113
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -78529,6 +79363,11 @@ var Update = class Update extends Activity {
|
|
|
78529
79363
|
}
|
|
78530
79364
|
}
|
|
78531
79365
|
];
|
|
79366
|
+
if (options.context == null) {
|
|
79367
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
79368
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
79369
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
79370
|
+
}
|
|
78532
79371
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
78533
79372
|
if (options.context == null) {
|
|
78534
79373
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -78737,6 +79576,11 @@ var Video = class Video extends Document {
|
|
|
78737
79576
|
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
78738
79577
|
"https://gotosocial.org/ns"
|
|
78739
79578
|
];
|
|
79579
|
+
if (options.context == null) {
|
|
79580
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
79581
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
79582
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
79583
|
+
}
|
|
78740
79584
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
78741
79585
|
if (options.context == null) {
|
|
78742
79586
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -78929,6 +79773,11 @@ var View = class View extends Activity {
|
|
|
78929
79773
|
"https://w3id.org/security/data-integrity/v1",
|
|
78930
79774
|
"https://gotosocial.org/ns"
|
|
78931
79775
|
];
|
|
79776
|
+
if (options.context == null) {
|
|
79777
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
79778
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
79779
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
79780
|
+
}
|
|
78932
79781
|
let compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
78933
79782
|
if (options.context == null) {
|
|
78934
79783
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|